vanilla-breeze 0.1.0 → 0.1.2

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 (99) hide show
  1. package/dist/cdn/components/adr-record.js +383 -0
  2. package/dist/cdn/components/adr-wc.js +403 -0
  3. package/dist/cdn/components/analytics-panel.js +34 -0
  4. package/dist/cdn/components/author-index.js +3 -0
  5. package/dist/cdn/components/brand-mark.js +2 -0
  6. package/dist/cdn/components/calendar-wc.js +2 -2
  7. package/dist/cdn/components/carousel-wc.js +1 -1
  8. package/dist/cdn/components/chart-wc.js +25 -25
  9. package/dist/cdn/components/color-palette.js +13 -7
  10. package/dist/cdn/components/comment-wc.js +2 -0
  11. package/dist/cdn/components/consent-banner.js +1 -1
  12. package/dist/cdn/components/content-lens.js +2 -0
  13. package/dist/cdn/components/day-view.js +2 -0
  14. package/dist/cdn/components/empathy-map.js +42 -25
  15. package/dist/cdn/components/flow-diagram.js +2 -0
  16. package/dist/cdn/components/font-pairer.js +108 -0
  17. package/dist/cdn/components/gantt-chart.js +2 -0
  18. package/dist/cdn/components/geo-map.js +7 -7
  19. package/dist/cdn/components/glossary-wc.js +2 -0
  20. package/dist/cdn/components/gradient-builder.js +52 -0
  21. package/dist/cdn/components/highlight-wc.js +3 -0
  22. package/dist/cdn/components/manifest.json +134 -26
  23. package/dist/cdn/components/markdown-viewer.js +3 -3
  24. package/dist/cdn/components/motion-specimen.js +21 -0
  25. package/dist/cdn/components/note-wc.js +3 -0
  26. package/dist/cdn/components/notification-wc.js +37 -0
  27. package/dist/cdn/components/page-info.js +55 -24
  28. package/dist/cdn/components/page-toc.js +1 -1
  29. package/dist/cdn/components/popularity-index.js +9 -0
  30. package/dist/cdn/components/print-page.js +1 -1
  31. package/dist/cdn/components/recently-visited.js +3 -0
  32. package/dist/cdn/components/review-surface.js +541 -0
  33. package/dist/cdn/components/selection-menu.js +2 -0
  34. package/dist/cdn/components/semantic-palette.js +30 -0
  35. package/dist/cdn/components/settings-panel.js +55 -51
  36. package/dist/cdn/components/share-wc.js +2 -2
  37. package/dist/cdn/components/site-map-wc.js +2 -0
  38. package/dist/cdn/components/spacing-specimen.js +5 -5
  39. package/dist/cdn/components/split-surface.js +1 -1
  40. package/dist/cdn/components/text-reader.js +2 -2
  41. package/dist/cdn/components/theme-export.js +18 -0
  42. package/dist/cdn/components/theme-picker.js +58 -58
  43. package/dist/cdn/components/token-specimen.js +25 -20
  44. package/dist/cdn/components/topic-map.js +3 -0
  45. package/dist/cdn/components/trust-filter.js +4 -0
  46. package/dist/cdn/components/type-specimen.js +16 -13
  47. package/dist/cdn/components/user-journey.js +48 -30
  48. package/dist/cdn/components/user-persona.js +17 -15
  49. package/dist/cdn/components/user-story.js +55 -22
  50. package/dist/cdn/components/watch-wc.js +3 -0
  51. package/dist/cdn/components/week-view.js +2 -0
  52. package/dist/cdn/components/work-item.js +446 -0
  53. package/dist/cdn/packs/design-system.full.js +124 -47
  54. package/dist/cdn/packs/effects.full.js +1 -1
  55. package/dist/cdn/packs/kawaii.full.css +1 -1
  56. package/dist/cdn/packs/kawaii.full.js +1 -1
  57. package/dist/cdn/packs/kawaii.theme.css +1 -1
  58. package/dist/cdn/packs/manifest.json +10 -40
  59. package/dist/cdn/packs/prototype.full.js +1 -1
  60. package/dist/cdn/packs/ui.full.css +1 -1
  61. package/dist/cdn/packs/ui.full.js +50 -50
  62. package/dist/cdn/packs/ux-planning.full.css +1 -1
  63. package/dist/cdn/packs/ux-planning.full.js +1546 -92
  64. package/dist/cdn/themes/8bit.css +1 -1
  65. package/dist/cdn/themes/alpha1999.css +1 -1
  66. package/dist/cdn/themes/bauhaus.css +1 -1
  67. package/dist/cdn/themes/brutalist.css +1 -1
  68. package/dist/cdn/themes/claymorphism.css +1 -1
  69. package/dist/cdn/themes/cottagecore.css +1 -1
  70. package/dist/cdn/themes/cyber.css +1 -1
  71. package/dist/cdn/themes/genai.css +1 -1
  72. package/dist/cdn/themes/glassmorphism.css +1 -1
  73. package/dist/cdn/themes/kawaii.css +1 -1
  74. package/dist/cdn/themes/magna.css +1 -1
  75. package/dist/cdn/themes/manifest.json +20 -20
  76. package/dist/cdn/themes/nes.css +1 -1
  77. package/dist/cdn/themes/neumorphism.css +1 -1
  78. package/dist/cdn/themes/organic.css +1 -1
  79. package/dist/cdn/themes/rough.css +1 -1
  80. package/dist/cdn/themes/startup.css +1 -1
  81. package/dist/cdn/themes/super2026.css +1 -1
  82. package/dist/cdn/themes/terminal.css +1 -1
  83. package/dist/cdn/themes/vaporwave.css +1 -1
  84. package/dist/cdn/themes/win9x.css +1 -1
  85. package/dist/cdn/vanilla-breeze-charts.js +25 -25
  86. package/dist/cdn/vanilla-breeze-core.css +1 -1
  87. package/dist/cdn/vanilla-breeze-core.js +119 -47
  88. package/dist/cdn/vanilla-breeze-dev.js +1 -1
  89. package/dist/cdn/vanilla-breeze-extras.js +154 -74
  90. package/dist/cdn/vanilla-breeze.css +1 -1
  91. package/dist/cdn/vanilla-breeze.js +1988 -248
  92. package/package.json +8 -6
  93. package/dist/cdn/packs/retro.bundle.js +0 -2
  94. package/dist/cdn/packs/retro.components.js +0 -1
  95. package/dist/cdn/packs/retro.effects.css +0 -2
  96. package/dist/cdn/packs/retro.effects.js +0 -16
  97. package/dist/cdn/packs/retro.full.css +0 -5
  98. package/dist/cdn/packs/retro.full.js +0 -16
  99. package/dist/cdn/packs/retro.theme.css +0 -2
@@ -1,9 +1,10 @@
1
- var bn=Object.defineProperty;var dt=(s,t)=>()=>(s&&(t=s(s=0)),t);var ut=(s,t)=>{for(var e in t)bn(s,e,{get:t[e],enumerable:!0})};var Qs={};ut(Qs,{addDialogDismiss:()=>Js,addLongPress:()=>Xs,addPullToRefresh:()=>_n,addSwipeListener:()=>Gs,haptic:()=>gt,initGestures:()=>Zs,makeSwipeable:()=>Ks});function Gs(s,t={}){let e=t.threshold??50,i=t.restraint??100,n=t.timeout??300,r,a,o;function c(h){h.isPrimary&&(r=h.clientX,a=h.clientY,o=Date.now())}function l(h){if(!h.isPrimary)return;let d=h.clientX-r,u=h.clientY-a,m=Date.now()-o;if(m>n)return;let y=Math.abs(d),p=Math.abs(u),f;if(y>=e&&p<=i?f=d<0?"left":"right":p>=e&&y<=i&&(f=u<0?"up":"down"),f){let v=f==="left"||f==="right"?y:p;s.dispatchEvent(new CustomEvent(`swipe-${f}`,{bubbles:!0,detail:{distance:v,duration:m}}))}}return s.addEventListener("pointerdown",c,{passive:!0}),s.addEventListener("pointerup",l,{passive:!0}),()=>{s.removeEventListener("pointerdown",c),s.removeEventListener("pointerup",l)}}function Ks(s,t={}){let e=t.threshold??100,i=t.direction??"horizontal",n=t.removeOnDismiss??!0,r=i==="horizontal",a=0,o=0,c=!1;function l(p){!p.isPrimary||s.hasAttribute("data-dismissed")||(p.preventDefault(),c=!0,a=r?p.clientX:p.clientY,o=0,s.setPointerCapture(p.pointerId),s.setAttribute("data-swiping",""))}function h(p){if(!c||!p.isPrimary)return;o=(r?p.clientX:p.clientY)-a;let v=1-Math.min(Math.abs(o)/e,1)*.5;r?s.style.transform=`translateX(${o}px)`:s.style.transform=`translateY(${o}px)`,s.style.opacity=String(v)}function d(p){!c||!p.isPrimary||(c=!1,s.releasePointerCapture(p.pointerId),s.removeAttribute("data-swiping"),Math.abs(o)>=e?m(o>0?"right":"left"):y())}function u(p){!c||!p.isPrimary||(c=!1,s.releasePointerCapture(p.pointerId),s.removeAttribute("data-swiping"),y())}function m(p){let f=p==="right"?"100%":"-100%";s.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",s.style.transform=r?`translateX(${f})`:`translateY(${f})`,s.style.opacity="0",s.setAttribute("data-dismissed",""),gt.dismiss(),s.dispatchEvent(new CustomEvent("swipe-dismiss",{bubbles:!0,detail:{direction:p,distance:Math.abs(o)}})),n&&s.addEventListener("transitionend",()=>s.remove(),{once:!0})}function y(){s.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",s.style.transform="",s.style.opacity="",s.addEventListener("transitionend",()=>{s.style.transition=""},{once:!0})}return s.addEventListener("pointerdown",l),s.addEventListener("pointermove",h),s.addEventListener("pointerup",d),s.addEventListener("pointercancel",u),()=>{s.removeEventListener("pointerdown",l),s.removeEventListener("pointermove",h),s.removeEventListener("pointerup",d),s.removeEventListener("pointercancel",u)}}function _n(s,t,e={}){let i=e.threshold??70,n=e.maxPull??120,r=document.createElement("div");r.setAttribute("data-pull-indicator",""),r.setAttribute("aria-hidden","true");let a=document.createElement("div");a.setAttribute("data-pull-spinner",""),r.appendChild(a),s.prepend(r);let o=0,c=!1,l=!1;function h(f){!f.isPrimary||l||s.scrollTop<=0&&(o=f.clientY,c=!0)}function d(f){if(!c||!f.isPrimary||l)return;let v=f.clientY-o;if(v<=0){r.style.transform="",r.style.opacity="";return}let A=Math.min(v,n),C=A/i;r.style.transform=`translateY(${A}px)`,r.style.opacity=String(Math.min(C,1)),C>=1?r.setAttribute("data-pull-ready",""):r.removeAttribute("data-pull-ready")}function u(f){!c||!f.isPrimary||(c=!1,r.hasAttribute("data-pull-ready")&&!l?y():p())}function m(f){!c||!f.isPrimary||(c=!1,p())}async function y(){l=!0,r.removeAttribute("data-pull-ready"),r.setAttribute("data-pull-loading",""),r.style.transform=`translateY(${i}px)`,r.style.opacity="1";try{await t()}finally{l=!1,r.removeAttribute("data-pull-loading"),p()}}function p(){r.style.transition="transform 0.3s ease, opacity 0.3s ease",r.style.transform="",r.style.opacity="",r.removeAttribute("data-pull-ready"),r.addEventListener("transitionend",()=>{r.style.transition=""},{once:!0})}return s.addEventListener("pointerdown",h,{passive:!0}),s.addEventListener("pointermove",d,{passive:!0}),s.addEventListener("pointerup",u,{passive:!0}),s.addEventListener("pointercancel",m,{passive:!0}),()=>{s.removeEventListener("pointerdown",h),s.removeEventListener("pointermove",d),s.removeEventListener("pointerup",u),s.removeEventListener("pointercancel",m),r.remove()}}function Xs(s,t,e={}){let i=e.duration??500,n=e.hapticFeedback??!0,r=e.blockContextMenu??!0,a=null;function o(h){h.isPrimary&&(a=setTimeout(()=>{n&&gt.tap(),t(h),a=null},i))}function c(){a&&(clearTimeout(a),a=null)}function l(h){r&&h.preventDefault()}return s.addEventListener("pointerdown",o,{passive:!0}),s.addEventListener("pointermove",c,{passive:!0}),s.addEventListener("pointerup",c,{passive:!0}),s.addEventListener("pointercancel",c,{passive:!0}),s.addEventListener("contextmenu",l),()=>{c(),s.removeEventListener("pointerdown",o),s.removeEventListener("pointermove",c),s.removeEventListener("pointerup",c),s.removeEventListener("pointercancel",c),s.removeEventListener("contextmenu",l)}}function Js(s,t={}){let e=t.threshold??80,i=0,n=0,r=!1;function a(u){if(!u.isPrimary||!s.open)return;let m=u.target;m.closest("a, button, input, select, textarea, [contenteditable]")&&!m.closest("header")||(r=!0,i=u.clientY,n=0,s.setPointerCapture(u.pointerId),s.style.transition="none")}function o(u){if(!r||!u.isPrimary)return;if(n=u.clientY-i,n<=0){s.style.transform="",s.style.opacity="";return}let y=1-Math.min(n/e,1)*.4;s.style.transform=`translateY(${n}px)`,s.style.opacity=String(y)}function c(u){!r||!u.isPrimary||(r=!1,s.releasePointerCapture(u.pointerId),n>=e?h():d())}function l(u){!r||!u.isPrimary||(r=!1,s.releasePointerCapture(u.pointerId),d())}function h(){s.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",s.style.transform="translateY(100%)",s.style.opacity="0",gt.dismiss(),s.addEventListener("transitionend",()=>{s.style.transition="",s.style.transform="",s.style.opacity="",s.close("dismiss")},{once:!0})}function d(){s.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",s.style.transform="",s.style.opacity="",s.addEventListener("transitionend",()=>{s.style.transition=""},{once:!0})}return s.addEventListener("pointerdown",a),s.addEventListener("pointermove",o),s.addEventListener("pointerup",c),s.addEventListener("pointercancel",l),()=>{s.removeEventListener("pointerdown",a),s.removeEventListener("pointermove",o),s.removeEventListener("pointerup",c),s.removeEventListener("pointercancel",l)}}function Zs(s=document){let t=[];for(let e of s.querySelectorAll('[data-gesture="swipe"]'))t.push(Gs(e));for(let e of s.querySelectorAll('[data-gesture="dismiss"]'))t.push(Ks(e));for(let e of s.querySelectorAll('[data-gesture="long-press"]'))t.push(Xs(e,()=>{e.dispatchEvent(new CustomEvent("long-press",{bubbles:!0}))}));for(let e of s.querySelectorAll('dialog[data-gesture="dismiss-down"]'))t.push(Js(e));return()=>t.forEach(e=>e())}var gt,ti=dt(()=>{gt={tap:()=>navigator.vibrate?.(8),confirm:()=>navigator.vibrate?.([8,40,8]),error:()=>navigator.vibrate?.([30,60,30]),dismiss:()=>navigator.vibrate?.(15)};Zs()});var St={};ut(St,{destroyStickyManager:()=>Zn,initStickyManager:()=>Ee});function R(){let s=document.documentElement;if(!s.hasAttribute("data-sticky"))return;let t=document.querySelector("header");t&&!t.hasAttribute("data-sticky")&&(t.dataset.sticky="",ye=!0);let e=document.querySelector("header[data-sticky]"),i=e?e.getBoundingClientRect().height:0;s.style.setProperty("--sticky-offset",`${i}px`)}function di(){R()}function Ee(){if(At)return;At=!0,R(),requestAnimationFrame(R),document.fonts?.ready?.then(R),window.addEventListener("resize",R,{passive:!0}),document.addEventListener("toggle",di,!0),ve=new ResizeObserver(R);let s=document.querySelector("header[data-sticky]");s&&ve.observe(s)}function Zn(){if(At){if(At=!1,window.removeEventListener("resize",R),document.removeEventListener("toggle",di,!0),ve?.disconnect(),ye){let s=document.querySelector("header[data-sticky]");s&&delete s.dataset.sticky,ye=!1}document.documentElement.style.removeProperty("--sticky-offset")}}var At,ve,ye,st=dt(()=>{At=!1,ye=!1});var pi={};ut(pi,{SoundManager:()=>Qn});var ui,we,Qn,fi=dt(()=>{ui="vb-sound",we={enabled:!1,volume:.5},Qn={_ctx:null,_enabled:!1,_volume:.5,_initialized:!1,init(){if(this._initialized)return this;let s=this._load();return this._enabled=s.enabled,this._volume=s.volume,this._initialized=!0,this},_getContext(){return this._ctx||(this._ctx=new(window.AudioContext||window.webkitAudioContext)),this._ctx.state==="suspended"&&this._ctx.resume(),this._ctx},_load(){try{let s=localStorage.getItem(ui);return s?{...we,...JSON.parse(s)}:{...we}}catch{return{...we}}},_save(s){try{let t=this._load();localStorage.setItem(ui,JSON.stringify({...t,...s}))}catch{}},_playTone(s,t,e="sine"){if(!this._enabled)return;let i=this._getContext(),n=i.createOscillator(),r=i.createGain();n.connect(r),r.connect(i.destination),n.frequency.value=s,n.type=e,r.gain.value=this._volume*.3,n.start(),r.gain.exponentialRampToValueAtTime(.01,i.currentTime+t),n.stop(i.currentTime+t)},enable(){this._enabled=!0,this._save({enabled:!0}),this.play("click")},disable(){this._enabled=!1,this._save({enabled:!1})},toggle(){return this._enabled?this.disable():this.enable(),this._enabled},isEnabled(){return this._enabled},setVolume(s){this._volume=Math.max(0,Math.min(1,s)),this._save({volume:this._volume})},getVolume(){return this._volume},play(s){if(this._enabled)switch(s){case"click":this._playTone(800,.1);break;case"success":this._playTone(523,.1),setTimeout(()=>this._playTone(659,.1),100),setTimeout(()=>this._playTone(784,.15),200);break;case"error":this._playTone(200,.15,"sawtooth"),setTimeout(()=>this._playTone(180,.2,"sawtooth"),150);break;case"notification":this._playTone(880,.1),setTimeout(()=>this._playTone(1100,.15),100);break;case"soft":this._playTone(600,.05);break;case"tick":this._playTone(1200,.02,"square");break}},getState(){return{enabled:this._enabled,volume:this._volume}}}});var dn={};ut(dn,{WizardController:()=>_t,initWizards:()=>bs});function ms(s){if(s.hasAttribute("data-wizard-enhanced"))return;let t=new _t(s);s.wizardController=t,s.wizardGoTo=e=>t.goTo(e),s.wizardNext=()=>t.next(),s.wizardPrev=()=>t.prev(),s.wizardReset=()=>t.reset()}function bs(){document.querySelectorAll("form[data-wizard]").forEach(s=>{ms(s)})}function hn(){new MutationObserver(t=>{for(let e of t)for(let i of e.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let n=i;n.matches("form[data-wizard]")&&ms(n),n.querySelectorAll?.("form[data-wizard]:not([data-wizard-enhanced])").forEach(r=>{ms(r)})}}).observe(document.documentElement,{childList:!0,subtree:!0})}var _t,un=dt(()=>{_t=class{#e;#t=[];#s=0;#r=null;#i=null;#n=null;#a=!1;#c="step";#o=null;#u="";#h=0;#p=0;constructor(t){if(!t||!(t instanceof HTMLFormElement))throw new Error("WizardController requires a form element");this.#e=t,this.#d()}#d(){if(this.#t=Array.from(this.#e.querySelectorAll("fieldset[data-wizard-step]")),this.#t.length===0){console.warn("Wizard form has no steps");return}this.#a=this.#e.hasAttribute("data-wizard-history"),this.#c=this.#e.getAttribute("data-wizard-validate")||"step",this.#l(),this.#r=this.#e.querySelector("[data-wizard-progress]"),this.#v(),this.#E(),this.#m(),this.#e.setAttribute("data-wizard-enhanced",""),this.#e.setAttribute("data-wizard-total",String(this.#t.length)),this.#B(),this.#x(),this.#N();let t=()=>{cancelAnimationFrame(this.#h),this.#h=requestAnimationFrame(()=>this.#L())};if(this.#e.addEventListener("change",t),this.#e.addEventListener("input",t),this.#o&&(this.#e.addEventListener("change",()=>this.#b()),this.#e.addEventListener("input",()=>this.#b())),this.#e.addEventListener("submit",e=>this.#S(e)),this.#e.addEventListener("reset",()=>{requestAnimationFrame(()=>this.reset())}),this.#a){let e=this.#q();e!==null&&e>=0&&e<this.#t.length&&(this.#s=e),window.addEventListener("hashchange",()=>{let i=this.#q();i!==null&&i!==this.#s&&this.goTo(i)})}this.#g(),this.#L(),this.#M()}#l(){let t=this.#e.getAttribute("data-wizard-persist");if(t){if(!this.#e.id){console.warn("Wizard persistence requires an id on the form element");return}this.#u=`vb-wizard:${this.#e.id}`,t==="local"?this.#o=localStorage:this.#o=sessionStorage}}#f(){if(!this.#o)return;let t={},e=new FormData(this.#e);for(let[i,n]of e.entries())t[i]!==void 0?(Array.isArray(t[i])||(t[i]=[t[i]]),t[i].push(n)):t[i]=n;try{this.#o.setItem(this.#u,JSON.stringify({step:this.#s,data:t}))}catch{}}#b(){this.#o&&(cancelAnimationFrame(this.#p),this.#p=requestAnimationFrame(()=>this.#f()))}#g(){if(this.#o)try{let t=this.#o.getItem(this.#u);if(!t)return;let e=JSON.parse(t);if(!e||typeof e!="object")return;if(e.data&&typeof e.data=="object")for(let[i,n]of Object.entries(e.data)){let r=this.#e.elements.namedItem(i);if(r)if(r instanceof RadioNodeList)r.value=n;else if(r instanceof HTMLInputElement)if(r.type==="checkbox"){let a=Array.isArray(n)?n:[n];r.checked=a.includes(r.value||"on")}else r.type==="radio"?r.checked=r.value===n:r.value=n;else(r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement)&&(r.value=n)}typeof e.step=="number"&&e.step>=0&&e.step<this.#t.length&&(this.#s=e.step)}catch{}}#y(){this.#o&&this.#o.removeItem(this.#u)}#S(t){let e=this.#C();this.#s===e.length-1&&(this.#z("wizard:complete"),this.#y())}#m(){this.#i=document.createElement("div"),this.#i.setAttribute("role","status"),this.#i.setAttribute("aria-live","polite"),this.#i.setAttribute("aria-atomic","true"),this.#i.setAttribute("data-wizard-status",""),this.#e.prepend(this.#i)}#v(){let t=this.#e.getAttribute("data-wizard-steps");if(t){this.#n=document.querySelector(t);return}this.#n=this.#e.querySelector("nav.steps")}#E(){if(!this.#n)return;let t=this.#n.querySelector("ol");if(!(!t||t.children.length>0))for(let e of this.#t){let i=e.querySelector("legend"),n=document.createElement("li");n.textContent=i?.textContent||`Step ${this.#t.indexOf(e)+1}`,t.appendChild(n)}}#F(){if(!this.#n)return;let t=Array.from(this.#n.querySelectorAll("ol > li")),e=this.#C(),i=0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n],a=t[i];if(!a)break;if(r.hasAttribute("data-wizard-hidden")){a.setAttribute("hidden","");continue}else a.removeAttribute("hidden");let o=e.indexOf(r);if(a.removeAttribute("data-completed"),a.removeAttribute("aria-current"),a.removeAttribute("aria-disabled"),o<this.#s){a.setAttribute("data-completed",""),this.#P(a,o);let c=a.querySelector("a");if(c){let h=r.querySelector("legend")?.textContent||`Step ${o+1}`;c.setAttribute("aria-label",`Go to ${h} (completed)`)}}else o===this.#s?a.setAttribute("aria-current","step"):a.setAttribute("aria-disabled","true");i++}for(let n of t){if(n.hasAttribute("hidden"))continue;let r=n.querySelector("a, button")||n,a=n.hasAttribute("aria-current");r.setAttribute("tabindex",a?"0":"-1")}}#P(t,e){if(t.hasAttribute("data-wizard-nav-bound"))return;t.setAttribute("data-wizard-nav-bound","");let i=t.querySelector("a, button")||t;i.addEventListener("click",n=>{n.preventDefault(),this.goTo(e)}),i===t&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","0"),t.setAttribute("role","button"),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this.goTo(e))}))}#x(){let t=this.#e.querySelector("[data-wizard-prev]"),e=this.#e.querySelector("[data-wizard-next]");t?.addEventListener("click",i=>{i.preventDefault(),this.prev()}),e?.addEventListener("click",i=>{i.preventDefault(),this.next()})}#B(){if(this.#e.querySelector("[data-wizard-nav]"))return;let t=document.createElement("nav");t.setAttribute("data-wizard-nav","");let e=document.createElement("button");e.type="button",e.setAttribute("data-wizard-prev",""),e.textContent="Back";let i=document.createElement("button");i.type="button",i.setAttribute("data-wizard-next",""),i.textContent="Next";let n=document.createElement("button");n.type="submit",n.textContent="Submit",t.append(e,i,n),this.#e.appendChild(t)}#N(){this.#n&&this.#n.addEventListener("keydown",t=>{let e=Array.from(this.#n.querySelectorAll("ol > li:not([hidden])")),i=t.target.closest("li"),n=e.indexOf(i);if(n===-1)return;let r;switch(t.key){case"ArrowRight":case"ArrowDown":r=Math.min(n+1,e.length-1);break;case"ArrowLeft":case"ArrowUp":r=Math.max(n-1,0);break;case"Home":r=0;break;case"End":r=e.length-1;break;default:return}t.preventDefault();let a=e[n].querySelector("a, button")||e[n],o=e[r].querySelector("a, button")||e[r];a.setAttribute("tabindex","-1"),o.setAttribute("tabindex","0"),o.focus()})}#C(){return this.#t.filter(t=>!t.hasAttribute("data-wizard-hidden"))}#_(){return this.#C()[this.#s]}#M(){let t=this.#C();this.#t.forEach(n=>{n.removeAttribute("data-wizard-active")});let e=t[this.#s];e&&e.setAttribute("data-wizard-active","");let i=this.#s+1;this.#e.setAttribute("data-wizard-current",String(i)),this.#e.setAttribute("data-wizard-total",String(t.length)),this.#s===t.length-1?this.#e.setAttribute("data-wizard-last",""):this.#e.removeAttribute("data-wizard-last"),this.#R(),this.#F(),this.#a&&this.#T(),this.#D(),this.#A()}#R(){if(!this.#r)return;let t=this.#C();this.#r.max=t.length,this.#r.value=this.#s+1}#T(){let t=`#step=${this.#s+1}`;window.location.hash!==t&&history.replaceState(null,"",t)}#q(){let e=window.location.hash.match(/step=(\d+)/);return e?parseInt(e[1],10)-1:null}#D(){if(!this.#i)return;let i=this.#_()?.querySelector("legend")?.textContent||`Step ${this.#s+1}`,n=this.#C();this.#i.textContent=`Now on step ${this.#s+1} of ${n.length}: ${i}`}#k(){if(this.#c==="none")return!0;let t=this.#_();if(!t||t.hasAttribute("data-wizard-optional"))return!0;let e=t.querySelectorAll("input, select, textarea"),i=!0;for(let n of e){let r=n;if(!r.checkValidity()){r.reportValidity(),i=!1;break}}return i}#L(){this.#t.forEach(e=>{let i=e.getAttribute("data-wizard-if");if(!i)return;this.#I(i)?e.removeAttribute("data-wizard-hidden"):e.setAttribute("data-wizard-hidden","")});let t=this.#C();this.#s>=t.length&&(this.#s=Math.max(0,t.length-1)),this.#M()}#I(t){return t.includes("||")?t.split("||").some(e=>this.#I(e.trim())):t.includes("&&")?t.split("&&").every(e=>this.#H(e.trim())):this.#H(t)}#H(t){let e=t.startsWith("!"),i=e?t.slice(1):t;if(i.includes(":")){let[o,c]=i.split(":"),l=c.startsWith("!"),h=l?c.slice(1):c,d=this.#w(o);return l?d!==h:d===h}let a=!!this.#w(i);return e?!a:a}#w(t){let e=this.#e.elements.namedItem(t);return e?e instanceof RadioNodeList?e.value:e instanceof HTMLInputElement?e.type==="checkbox"?e.checked?e.value||"true":"":e.value:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.value:"":""}#A(){let t=this.#_();if(!t||!t.hasAttribute("data-wizard-summary"))return;let e=t.querySelectorAll("[data-wizard-field]");if(e.length>0){for(let r of e){let a=r.getAttribute("data-wizard-field");r.textContent=this.#w(a)||"\u2014"}return}let i=t.querySelector("[data-wizard-summary-list]");i||(i=document.createElement("dl"),i.setAttribute("data-wizard-summary-list",""),t.appendChild(i)),i.innerHTML="";let n=new Set;for(let r of this.#t){if(r===t||r.hasAttribute("data-wizard-hidden"))continue;let a=r.querySelectorAll("input, select, textarea");for(let o of a){let c=o.name;if(!c||n.has(c))continue;n.add(c);let l=this.#w(c);if(!l)continue;let h=this.#O(o),d=document.createElement("dt");d.textContent=h||c;let u=document.createElement("dd");u.textContent=l,i.append(d,u)}}}#O(t){if(t.id){let n=this.#e.querySelector(`label[for="${CSS.escape(t.id)}"]`);if(n)return n.textContent.trim()}let e=t.closest("label");if(e){let n=e.cloneNode(!0);n.querySelectorAll("input, select, textarea").forEach(a=>a.remove());let r=n.textContent.trim();if(r)return r}let i=t.closest("form-field");if(i){let n=i.querySelector("label");if(n)return n.textContent.trim()}return""}#z(t,e={}){this.#e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))}goTo(t){let e=this.#C();if(t<0||t>=e.length||t>this.#s&&!this.#k())return!1;let i=this.#s;return this.#s=t,this.#M(),this.#z("wizard:step-change",{from:i,to:t}),this.#b(),!0}next(){let t=this.#C();return this.#s>=t.length-1?!1:this.goTo(this.#s+1)}prev(){return this.#s<=0?!1:this.goTo(this.#s-1)}reset(){this.#s=0,this.#M(),this.#y(),this.#z("wizard:reset")}get currentStep(){return this.#s}get totalSteps(){return this.#C().length}get form(){return this.#e}};typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{bs(),hn()}):(bs(),hn()))});var B=new Map,Ot=new Map;var Ts=null;function Ls(){if(typeof window<"u"&&window.__VB_THEME_BASE)return String(window.__VB_THEME_BASE).replace(/\/$/,"");if(Ts)return Ts;if(typeof document<"u"){let s=document.querySelectorAll('script[src*="vanilla-breeze"]');for(let t of s){let e=t.getAttribute("src");if(e){let i=e.lastIndexOf("/");if(i!==-1)return e.slice(0,i)}}}return"/cdn"}var gn=new Set(["default","a11y-high-contrast","a11y-large-text","a11y-dyslexia","modern","minimal","classic"]),vn=new Set(["kawaii","retro","memphis"]);function Ft(s){return vn.has(s)}function yn(s,t){return`${t}/themes/${s}.css`}function Ms(s,t){if(!Ft(s))return Promise.resolve();if(Ot.has(s))return Ot.get(s);let e=import(`${t}/packs/${s}.full.js`).catch(()=>{});return Ot.set(s,e),e}function En(s,t){let e=Ls(),i=()=>{(Ft(t)||s.hasAttribute("data-vb-pack"))&&Ms(t,e)};return s.getAttribute("data-vb-theme-state")==="error"?Promise.reject(new Error(`Failed to load theme: ${t}`)):s.getAttribute("data-vb-theme-state")==="ready"||s.sheet?(i(),Promise.resolve()):new Promise((n,r)=>{let a=()=>{s.setAttribute("data-vb-theme-state","ready"),c(),i(),n()},o=()=>{s.setAttribute("data-vb-theme-state","error"),B.delete(t),c(),r(new Error(`Failed to load theme: ${t}`))},c=()=>{s.removeEventListener("load",a),s.removeEventListener("error",o)};s.addEventListener("load",a,{once:!0}),s.addEventListener("error",o,{once:!0})})}async function Rt(s){if(!s||gn.has(s))return;if(B.has(s))return B.get(s);if(typeof document<"u"){let i=document.querySelector(`link[data-vb-theme="${s}"]`);if(i){let n=En(i,s);return B.set(s,n),n}}let t=Ls(),e=Ft(s)?An(s,t):wn(s,t);return B.set(s,e),e}async function wn(s,t){let e=yn(s,t);return new Promise((i,n)=>{let r=document.querySelector(`link[data-vb-theme-preload="${s}"]`);r&&r.remove();let a=document.createElement("link");a.rel="stylesheet",a.href=e,a.setAttribute("data-vb-theme",s),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready"),i()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),B.delete(s),n(new Error(`Failed to load theme: ${s}`))},document.head.appendChild(a)})}function An(s,t){let e=`${t}/themes/${s}.css`;return new Promise((i,n)=>{let r=document.querySelector(`link[data-vb-theme-preload="${s}"]`);r&&r.remove();let a=document.createElement("link");a.rel="stylesheet",a.href=e,a.setAttribute("data-vb-theme",s),a.setAttribute("data-vb-pack",s),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready"),Ms(s,t),i()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),B.delete(s),n(new Error(`Failed to load pack: ${s}`))},document.head.appendChild(a)})}var Ds=[{id:"default",name:"Default",swatchBg:"#3b82f6",seeds:{}},{id:"ocean",name:"Ocean",swatchBg:"#0891b2",seeds:{"--hue-primary":200,"--hue-secondary":180,"--hue-accent":45,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"45%","--chroma-secondary":.1,"--lightness-accent":"70%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"forest",name:"Forest",swatchBg:"#059669",seeds:{"--hue-primary":145,"--hue-secondary":90,"--hue-accent":30,"--lightness-primary":"45%","--chroma-primary":.15,"--lightness-secondary":"55%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"55%","--chroma-primary":.12}},{id:"sunset",name:"Sunset",swatchBg:"#ea580c",seeds:{"--hue-primary":25,"--hue-secondary":0,"--hue-accent":280,"--lightness-primary":"60%","--chroma-primary":.2,"--lightness-secondary":"55%","--chroma-secondary":.18,"--lightness-accent":"55%","--chroma-accent":.18},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.16}},{id:"rose",name:"Rose",swatchBg:"#e11d48",seeds:{"--hue-primary":350,"--hue-secondary":330,"--hue-accent":200,"--lightness-primary":"55%","--chroma-primary":.18,"--lightness-secondary":"50%","--chroma-secondary":.14,"--lightness-accent":"60%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.14}},{id:"lavender",name:"Lavender",swatchBg:"#a855f7",seeds:{"--hue-primary":280,"--hue-secondary":300,"--hue-accent":60,"--lightness-primary":"55%","--chroma-primary":.14,"--lightness-secondary":"50%","--chroma-secondary":.12,"--lightness-accent":"70%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.12}},{id:"coral",name:"Coral",swatchBg:"#f97316",seeds:{"--hue-primary":15,"--hue-secondary":25,"--hue-accent":180,"--lightness-primary":"60%","--chroma-primary":.18,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"55%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.15}},{id:"slate",name:"Slate",swatchBg:"#64748b",seeds:{"--hue-primary":220,"--hue-secondary":210,"--hue-accent":45,"--lightness-primary":"48%","--chroma-primary":.1,"--lightness-secondary":"45%","--chroma-secondary":.06,"--lightness-accent":"68%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.08}},{id:"emerald",name:"Emerald",swatchBg:"#10b981",seeds:{"--hue-primary":160,"--hue-secondary":140,"--hue-accent":30,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"48%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"amber",name:"Amber",swatchBg:"#f59e0b",seeds:{"--hue-primary":45,"--hue-secondary":30,"--hue-accent":240,"--lightness-primary":"60%","--chroma-primary":.16,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"52%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"68%","--chroma-primary":.14}},{id:"indigo",name:"Indigo",swatchBg:"#6366f1",seeds:{"--hue-primary":250,"--hue-secondary":270,"--hue-accent":35,"--lightness-primary":"48%","--chroma-primary":.18,"--lightness-secondary":"45%","--chroma-secondary":.14,"--lightness-accent":"68%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"62%","--chroma-primary":.14}}],Ns=[{id:"modern",name:"Modern",hue:270,shape:"rounded",character:"Vibrant & elevated",swatchBg:"#6366f1",tier:"core"},{id:"minimal",name:"Minimal",hue:240,shape:"sharp",character:"Clean & flat",swatchBg:"#71717a",tier:"core"},{id:"classic",name:"Classic",hue:220,shape:"subtle",character:"Serif & elegant",swatchBg:"#92400e",tier:"core"}],Ht=[{id:"swiss",name:"Swiss",icon:"grid-3x3",character:"Precision grid",swatchBg:"#ff3e00",swatchFg:"white",tier:"showcase",category:"Design"},{id:"brutalist",name:"Brutalist",icon:"square",character:"Raw, industrial",swatchBg:"#1a1a1a",swatchFg:"#f5f5f5",tier:"showcase",category:"Design"},{id:"art-deco",name:"Art Deco",icon:"crown",character:"1920s luxury",swatchBg:"#1A1A1A",swatchFg:"#C9A84C",tier:"showcase",category:"Design"},{id:"editorial",name:"Editorial",icon:"newspaper",character:"Magazine elegance",swatchBg:"#1a1a1a",swatchFg:"#c9a227",tier:"showcase",category:"Content"},{id:"genai",name:"GenAI",icon:"sparkles",character:"AI aesthetic",swatchBg:"#1a0a2e",swatchFg:"#a855f7",tier:"showcase",category:"Modern"},{id:"glassmorphism",name:"Glass",icon:"glass-water",character:"Frosted surfaces",swatchBg:"#667eea",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"startup",name:"Startup",icon:"rocket",character:"SaaS energy",swatchBg:"#4f46e5",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"organic",name:"Organic",icon:"leaf",character:"Natural, handcrafted",swatchBg:"#2d5016",swatchFg:"#faf5e6",tier:"showcase",category:"Creative"},{id:"rough",name:"Rough",icon:"pencil",character:"Hand-drawn sketch",swatchBg:"#f5f0e8",swatchFg:"#3a3a3a",tier:"showcase",category:"Creative"},{id:"cyber",name:"Cyber",icon:"zap",character:"Neon futuristic",swatchBg:"#0a0a1a",swatchFg:"#00ff88",tier:"showcase",category:"Creative"},{id:"vaporwave",name:"Vaporwave",icon:"radio",character:"Neon dreamy",swatchBg:"#2b0040",swatchFg:"#ff6ad5",tier:"showcase",category:"Aesthetic"},{id:"neumorphism",name:"Neumorph",icon:"circle",character:"Soft embossed",swatchBg:"#e0e0e0",swatchFg:"#a0a0a0",tier:"showcase",category:"Aesthetic"},{id:"bauhaus",name:"Bauhaus",icon:"shapes",character:"Geometric",swatchBg:"#F1FAEE",swatchFg:"#E63946",tier:"showcase",category:"Aesthetic"},{id:"claymorphism",name:"Clay",icon:"circle-dot",character:"Puffy 3D",swatchBg:"#f0f0f5",swatchFg:"#FF6B9D",tier:"showcase",category:"Aesthetic"},{id:"alpha1999",name:"Alpha1999",icon:"orbit",character:"Space retro-fi",swatchBg:"#0a0a14",swatchFg:"#d4880f",tier:"showcase",category:"Signature"},{id:"super2026",name:"Super2026",icon:"triangle",character:"Supergraphic bold",swatchBg:"#f5f0e6",swatchFg:"#c23616",tier:"showcase",category:"Signature"},{id:"win9x",name:"Win9x",icon:"monitor",character:"Classic desktop",swatchBg:"#008080",swatchFg:"#c0c0c0",tier:"showcase",category:"OS Styles"},{id:"nes",name:"NES",icon:"joystick",character:"Console pixels",swatchBg:"#bcbcbc",swatchFg:"#e40521",tier:"showcase",category:"OS Styles"},{id:"8bit",name:"8-Bit",icon:"gamepad-2",character:"Retro pixel art",swatchBg:"#000080",swatchFg:"#ffff00",tier:"showcase",category:"OS Styles"},{id:"magna",name:"Magna",icon:"orbit",character:"Odyssey 2 retro",swatchBg:"#0d0b14",swatchFg:"#f97316",tier:"showcase",category:"OS Styles"}],zt=[{id:"nord",name:"Nord",icon:"snowflake",character:"Arctic calm",swatchBg:"#2E3440",swatchFg:"#81A1C1",tier:"community",category:"Editor Palettes"},{id:"solarized",name:"Solarized",icon:"sun-dim",character:"Engineered precision",swatchBg:"#002B36",swatchFg:"#268BD2",tier:"community",category:"Editor Palettes"},{id:"dracula",name:"Dracula",icon:"moon-star",character:"Dark elegance",swatchBg:"#282A36",swatchFg:"#BD93F9",tier:"community",category:"Editor Palettes"},{id:"catppuccin-mocha",name:"Catppuccin",icon:"coffee",character:"Warm pastels",swatchBg:"#1E1E2E",swatchFg:"#CBA6F7",tier:"community",category:"Editor Palettes"},{id:"catppuccin-latte",name:"Ctp Latte",icon:"coffee",character:"Cozy daytime",swatchBg:"#eff1f5",swatchFg:"#8839ef",tier:"community",category:"Editor Palettes"},{id:"catppuccin-frappe",name:"Ctp Frapp\xE9",icon:"coffee",character:"Cool twilight",swatchBg:"#303446",swatchFg:"#ca9ee6",tier:"community",category:"Editor Palettes"},{id:"catppuccin-macchiato",name:"Ctp Macchiato",icon:"coffee",character:"Deep blue",swatchBg:"#24273a",swatchFg:"#c6a0f6",tier:"community",category:"Editor Palettes"},{id:"gruvbox",name:"Gruvbox",icon:"palette",character:"Retro warmth",swatchBg:"#282828",swatchFg:"#ebdbb2",tier:"community",category:"Editor Palettes"},{id:"tokyo-night",name:"Tokyo Night",icon:"moon",character:"Night-owl vibes",swatchBg:"#1a1b26",swatchFg:"#7aa2f7",tier:"community",category:"Editor Palettes"},{id:"rose-pine",name:"Ros\xE9 Pine",icon:"flower-2",character:"Muted elegance",swatchBg:"#191724",swatchFg:"#ebbcba",tier:"community",category:"Editor Palettes"},{id:"cottagecore",name:"Cottagecore",icon:"flower-2",character:"Pastoral",swatchBg:"#fdf8f0",swatchFg:"#7d8c6d",tier:"community",category:"Niche"},{id:"terminal",name:"Terminal",icon:"terminal",character:"Retro CRT",swatchBg:"#0d1117",swatchFg:"#00ff00",tier:"community",category:"Niche"},{id:"clinical",name:"Clinical",icon:"heart-pulse",character:"Sterile precision",swatchBg:"#ffffff",swatchFg:"#0077b6",tier:"community",category:"Industry"},{id:"financial",name:"Financial",icon:"landmark",character:"Navy + gold",swatchBg:"#1b2a4a",swatchFg:"#c9a84c",tier:"community",category:"Industry"},{id:"government",name:"Government",icon:"shield",character:"Official",swatchBg:"#002868",swatchFg:"#bf0a30",tier:"community",category:"Industry"},{id:"dawn",name:"Dawn",icon:"sunrise",character:"Golden morning",swatchBg:"#fef3e2",swatchFg:"#d4a574",tier:"community",category:"Mood/Time"},{id:"dusk",name:"Dusk",icon:"sunset",character:"Twilight",swatchBg:"#1a1b2e",swatchFg:"#e5a858",tier:"community",category:"Mood/Time"},{id:"midnight",name:"Midnight",icon:"moon",character:"Deep night",swatchBg:"#0d1117",swatchFg:"#58a6ff",tier:"community",category:"Mood/Time"},{id:"high-noon",name:"High Noon",icon:"sun",character:"Maximum bright",swatchBg:"#ffffff",swatchFg:"#e63946",tier:"community",category:"Mood/Time"}],qs=[{id:"kawaii",name:"Kawaii",icon:"heart",character:"Cute aesthetic",swatchBg:"#ffb7c5",swatchFg:"#ff69b4",tier:"showcase",category:"Packs"},{id:"retro",name:"Retro",icon:"tv",character:"CRT terminal",swatchBg:"#0a0a14",swatchFg:"#00ff66",tier:"showcase",category:"Packs"},{id:"memphis",name:"Memphis",icon:"star",character:"Bold patterns",swatchBg:"#FFF8F0",swatchFg:"#d03040",tier:"showcase",category:"Packs"}];var Na=[...Ht,...zt],qa=[...Ns,...Ht,...zt,...qs],_=s=>Ht.filter(t=>t.category===s),Is=[{label:"Style",themes:Ns,tier:"core"},{label:"Design",themes:_("Design"),tier:"showcase"},{label:"Content",themes:_("Content"),tier:"showcase"},{label:"Modern",themes:_("Modern"),tier:"showcase"},{label:"Creative",themes:_("Creative"),tier:"showcase"},{label:"Aesthetic",themes:_("Aesthetic"),tier:"showcase"},{label:"Signature",themes:_("Signature"),tier:"showcase"},{label:"OS Styles",themes:_("OS Styles"),tier:"showcase"},{label:"Packs",themes:qs,tier:"showcase"},{label:"More Themes",themes:zt,tier:"community"}];var Vt="vb-theme",pt={mode:"auto",brand:"default",accent:"default",borderStyle:"",iconSet:"",fluid:"",backdrop:"",backdropChrome:"",pageBgType:"",pageBgColor:"",pageBgGradStart:"",pageBgGradEnd:"",pageBgGradDir:""},$s=["--hue-primary","--hue-secondary","--hue-accent","--lightness-primary","--chroma-primary","--lightness-secondary","--chroma-secondary","--lightness-accent","--chroma-accent"],E={_initPromise:null,async init(){return this._initPromise?this._initPromise:(this._initPromise=(async()=>{let s=this.load();try{await Rt(s.brand)}catch{s.brand="default"}return this.apply(s),this._watchSystemPreference(),s})(),this._initPromise)},load(){try{let s=localStorage.getItem(Vt);return s?{...pt,...JSON.parse(s)}:{...pt}}catch{return{...pt}}},save(s){let e={...this.load(),...s};try{localStorage.setItem(Vt,JSON.stringify(e))}catch{}return e},apply({mode:s="auto",brand:t="default",borderStyle:e="",iconSet:i="",fluid:n="",backdrop:r="",backdropChrome:a="",pageBgType:o="",pageBgColor:c="",pageBgGradStart:l="",pageBgGradEnd:h="",pageBgGradDir:d=""}={}){let u=document.documentElement;u.dataset.mode=s==="auto"?this.getEffectiveMode():s;let y=(u.dataset.theme||"").split(" ").filter(C=>C.startsWith("a11y-")),p=t!=="default"?[t,...y]:[...y];p.length?u.dataset.theme=p.join(" "):delete u.dataset.theme;let f=e||this._readCSSHint("--theme-border-style");f&&f!=="clean"?u.dataset.borderStyle=f:delete u.dataset.borderStyle;let v=i||this._readCSSHint("--theme-icon-set");if(v&&v!=="lucide"?u.dataset.iconSet=v:delete u.dataset.iconSet,n?u.dataset.fluid=n:delete u.dataset.fluid,r?u.dataset.backdrop=r:delete u.dataset.backdrop,a&&a!=="card"?u.dataset.backdropChrome=a:delete u.dataset.backdropChrome,o==="color"&&c)u.style.setProperty("--page-bg-color",c),u.style.removeProperty("--page-bg-gradient");else if(o==="gradient"&&l&&h){let C=d||"to bottom";u.style.setProperty("--page-bg-gradient",`linear-gradient(${C}, ${l}, ${h})`),u.style.removeProperty("--page-bg-color")}else u.style.removeProperty("--page-bg-color"),u.style.removeProperty("--page-bg-gradient");let A=this.load().accent||"default";this._applyAccent(A),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{mode:s,brand:t,accent:A,borderStyle:f,iconSet:v,fluid:n,backdrop:r,backdropChrome:a,pageBgType:o,effectiveMode:this.getEffectiveMode()}}))},setMode(s){let t=this.save({mode:s});this.apply(t)},async setBrand(s){try{await Rt(s)}catch(e){console.warn(`[VB] Theme "${s}" failed to load, using default`,e),s="default"}let t=this.save({brand:s});this.apply(t)},setAccent(s){let t=this.save({accent:s});this._applyAccent(s),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}}))},setBorderStyle(s){let t=this.save({borderStyle:s});this.apply(t)},setIconSet(s){let t=this.save({iconSet:s});this.apply(t)},setFluid(s){let t=this.save({fluid:s});this.apply(t)},setBackdrop(s){let t=this.save({backdrop:s});this.apply(t)},setBackdropChrome(s){let t=this.save({backdropChrome:s});this.apply(t)},setPageBg({type:s="",color:t="",gradStart:e="",gradEnd:i="",gradDir:n=""}={}){let r=this.save({pageBgType:s,pageBgColor:t,pageBgGradStart:e,pageBgGradEnd:i,pageBgGradDir:n});this.apply(r)},getEffectiveMode(){let{mode:s}=this.load();return s!=="auto"?s:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},getState(){let{mode:s,brand:t,accent:e,borderStyle:i,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:l,pageBgGradStart:h,pageBgGradEnd:d,pageBgGradDir:u}=this.load();return{mode:s,brand:t,accent:e,borderStyle:i,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:l,pageBgGradStart:h,pageBgGradEnd:d,pageBgGradDir:u,effectiveMode:this.getEffectiveMode()}},toggleMode(){let t=this.getEffectiveMode()==="dark"?"light":"dark";this.setMode(t)},reset(){try{localStorage.removeItem(Vt)}catch{}let s=document.documentElement;s.style.removeProperty("--page-bg-color"),s.style.removeProperty("--page-bg-gradient");for(let t of $s)s.style.removeProperty(t);this.apply(pt)},_readCSSHint(s){return getComputedStyle(document.documentElement).getPropertyValue(s).trim()},_applyAccent(s){let t=document.documentElement,e=Ds.find(i=>i.id===s);for(let i of $s)t.style.removeProperty(i);if(!(!e||!e.seeds||Object.keys(e.seeds).length===0)){for(let[i,n]of Object.entries(e.seeds))t.style.setProperty(i,String(n));if(e.seedsDark&&this.getEffectiveMode()==="dark")for(let[i,n]of Object.entries(e.seedsDark))t.style.setProperty(i,String(n))}},_watchSystemPreference(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{let t=this.load();t.mode==="auto"&&this.apply(t)})}};var Sn=["layout-text","layout-reel","layout-canvas","dl-item"];Sn.forEach(s=>{customElements.get(s)||customElements.define(s,class extends HTMLElement{})});var Oa=window.matchMedia("(prefers-reduced-motion: reduce)");var Ps=new Map;function b(s,t,e={}){let i=e.priority??10,n={impl:t,bundle:e.bundle,contract:e.contract,priority:i},r=Ps.get(s);if(customElements.get(s)){if(!r||r.priority>=i){r&&r.priority===i&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=i){r.priority===i&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${r.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}Ps.set(s,n),customElements.define(s,t)}var g=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,n){t.addEventListener(e,i,n),this.#e.push(()=>t.removeEventListener(e,i,n))}setup(){}teardown(){}};var xn=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],Ut=class extends g{#e=null;#t=null;#s=!1;setup(){if(this.#e=this.querySelector("input, textarea, select"),this.#t=this.querySelector("output.error")??this.querySelector("output:not(.hint)"),!this.#e)return!1;this.listen(this.#e,"blur",()=>this.validate()),this.listen(this.#e,"input",()=>{this.#s&&this.validate()})}teardown(){this.#e=null,this.#t=null,this.#s=!1}validate(){let t=this.#e;if(!t)return!0;t.validity.customError||t.setCustomValidity("");let e=t.checkValidity();return e?(this.#r(t.value?"valid":null),t.removeAttribute("aria-invalid"),this.#t&&(this.#t.textContent="")):(this.#s=!0,this.#r("invalid"),t.setAttribute("aria-invalid","true"),this.#i(t.validity)),e}setError(t){this.#e&&(this.#e.setCustomValidity(t),this.#s=!0,this.#r("invalid"),this.#e.setAttribute("aria-invalid","true"),this.#t&&(this.#t.textContent=t))}clearError(){this.#e&&(this.#e.setCustomValidity(""),this.#r(null),this.#e.removeAttribute("aria-invalid"),this.#s=!1,this.#t&&(this.#t.textContent=""))}get fieldName(){return this.querySelector("label")?.textContent?.trim()??this.#e?.getAttribute("aria-label")??this.#e?.name??this.#e?.id??"Field"}get input(){return this.#e}#r(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#i(t){if(!this.#t)return;let e=this.#e;for(let i of xn){if(!t[i])continue;let n=`data-message-${i.toLowerCase()}`,r=e.getAttribute(n)??e.validationMessage;this.#t.textContent=r;return}}};b("form-field",Ut);function D(s){return document.startViewTransition?document.startViewTransition(s):s()}var Cn=0,Wt=class extends g{#e=[];#t=[];#s=!1;#r=0;setup(){if(this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0)return!1;this.#a(),this.#c(),this.#i()}teardown(){this.#e=[],this.#t=[],this.#s=!1}#i(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#s=!0;let t=++Cn,e=this.getAttribute("transition")||"fade",i=e==="slide"?"vt-tabs-slide":e==="scale"?"vt-tabs-scale":"vt-tabs";this.#e.forEach(n=>{let r=n.querySelector(":scope > :not(summary)");r&&(r.style.viewTransitionName=`tabs-${t}`,r.style.viewTransitionClass=i)}),this.#r=this.#e.findIndex(n=>n.open),this.#r===-1&&(this.#r=0)}#n(t){if(t===this.#r)return;let e=t>this.#r?"forward":"backward";document.documentElement.dataset.vtDirection=e,D(()=>{this.#e[t].open=!0}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}#a(){this.#e.forEach((t,e)=>{let i=this.#t[e],n=t.querySelector(":scope > :not(summary)");if(!i||!n)return;let r=i.id||`tab-${crypto.randomUUID().slice(0,8)}`,a=n.id||`panel-${crypto.randomUUID().slice(0,8)}`;i.id=r,i.setAttribute("aria-controls",a),i.setAttribute("tabindex",t.open?"0":"-1"),i.setAttribute("aria-selected",t.open?"true":"false"),n.id=a,n.setAttribute("aria-labelledby",r),this.listen(i,"click",o=>{this.#s&&(o.preventDefault(),this.#n(e))}),this.listen(i,"keydown",o=>this.#h(o,e)),this.listen(t,"toggle",()=>this.#o(e))})}#c(){!this.#e.some(e=>e.open)&&this.#e.length>0&&(this.#e[0].open=!0,this.#u())}#o(t){this.#e[t].open&&(this.#r=t),this.#u(),this.dispatchEvent(new CustomEvent("tab-set:change",{detail:{index:t},bubbles:!0}))}#u(){this.#e.forEach((t,e)=>{let i=this.#t[e];i.setAttribute("tabindex",t.open?"0":"-1"),i.setAttribute("aria-selected",t.open?"true":"false")})}#h(t,e){let{key:i}=t,n;switch(i){case"ArrowRight":n=(e+1)%this.#e.length;break;case"ArrowLeft":n=(e-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#s?this.#n(n):this.#e[n].open=!0,this.#t[n].focus()}};b("tab-set",Wt);var Yt=class s extends g{static#e=0;#t;#s=[];#r="Back to content";setup(){this.#t=++s.#e,this.hasAttribute("data-back-label")&&(this.#r=this.getAttribute("data-back-label")??this.#r),this.#i(),this.getAttribute("data-mode")==="sidenotes"?this.#c():this.#n()}#i(){let t=[...document.querySelectorAll("foot-note:not([data-enhanced])")];this.#s=t.filter(e=>this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}#n(){if(this.#s.length===0)return;let t=document.createElement("ol");this.#s.forEach((e,i)=>{let n=i+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;this.#a(e,n,r,a);let o=this.#u(e,n,r,a);t.appendChild(o)}),this.appendChild(t)}#a(t,e,i,n){t.setAttribute("data-enhanced",""),t.id=i;let r=t.innerHTML,a=document.createElement("span");a.innerHTML=r;let o=document.createElement("a");o.href=`#${n}`,o.setAttribute("aria-describedby",n),o.textContent=`[${e}]`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#c(){if(this.#s.length===0)return;let t=[];if(this.#s.forEach((e,i)=>{let n=i+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;e.getAttribute("data-side")==="false"?(this.#a(e,n,r,a),t.push({ref:e,num:n,refId:r,noteId:a})):this.#o(e,n,r,a)}),t.length>0){let e=document.createElement("ol");for(let{ref:i,num:n,refId:r,noteId:a}of t)e.appendChild(this.#u(i,n,r,a));this.appendChild(e)}else this.hidden=!0}#o(t,e,i,n){let r=t.innerHTML;t.setAttribute("data-enhanced",""),t.setAttribute("data-side",""),t.id=i;let a=document.createElement("a");a.href=`#${n}`,a.setAttribute("aria-describedby",n),a.textContent=`[${e}]`;let o=document.createElement("aside");o.className="sidenote",o.id=n,o.setAttribute("role","note"),o.innerHTML=`<span class="sidenote-number">${e}.</span> ${r}`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#u(t,e,i,n){let r=document.createElement("li");r.id=n;let a=t.querySelector("span"),o=a?a.innerHTML:"",c=document.createElement("a");return c.href=`#${i}`,c.setAttribute("data-backref",""),c.setAttribute("aria-label",this.#r),c.textContent="\u21A9",r.innerHTML=o+" ",r.appendChild(c),r}},jt=class extends HTMLElement{};b("foot-notes",Yt);b("foot-note",jt);var kn=0,Gt=class extends g{#e=[];#t=[];#s=[];#r=!1;setup(){if(this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0)return!1;this.#i(),this.#c(),this.#n()}teardown(){this.#e=[],this.#t=[],this.#s=[],this.#r=!1}#i(){this.#s=this.#e.map(t=>{let e=t.querySelector("summary");if(!e)return null;let i=[...t.children].filter(n=>n!==e);if(i.length===1)return i[0];if(i.length>1){let n=document.createElement("div");for(let r of i)n.appendChild(r);return t.appendChild(n),n}return null})}#n(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#r=!0;let t=++kn,e=this.getAttribute("transition")||"fade",i=e==="slide"?"vt-accordion-slide":e==="scale"?"vt-accordion-scale":"vt-accordion";this.#s.forEach((n,r)=>{n&&(n.style.viewTransitionName=`accordion-${t}-${r}`,n.style.viewTransitionClass=i)})}#a(t){D(()=>{t.open=!t.open})}#c(){this.#e.forEach((t,e)=>{let i=this.#t[e],n=this.#s[e];if(i){if(n){let r=i.id||`accordion-heading-${crypto.randomUUID().slice(0,8)}`,a=n.id||`accordion-panel-${crypto.randomUUID().slice(0,8)}`;i.id=r,n.id=a,i.setAttribute("aria-expanded",t.open?"true":"false"),i.setAttribute("aria-controls",a),n.setAttribute("aria-labelledby",r),n.setAttribute("role","region")}else i.setAttribute("aria-expanded",t.open?"true":"false");this.listen(i,"click",r=>{this.#r&&(r.preventDefault(),this.#a(t))}),this.listen(i,"keydown",r=>this.#u(r,e)),this.listen(t,"toggle",()=>this.#o(t,e))}})}#o(t,e){this.#t[e].setAttribute("aria-expanded",t.open?"true":"false"),this.hasAttribute("single")&&t.open&&this.#e.forEach((n,r)=>{r!==e&&n.open&&(n.open=!1,this.#t[r].setAttribute("aria-expanded","false"))}),this.dispatchEvent(new CustomEvent("accordion-wc:toggle",{detail:{index:e,open:t.open},bubbles:!0}))}#u(t,e){let{key:i}=t,n;switch(i){case"ArrowDown":n=(e+1)%this.#e.length;break;case"ArrowUp":n=(e-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#t[n].focus()}open(t){t<0||t>=this.#e.length||(this.#r&&!this.#e[t].open?D(()=>{this.#e[t].open=!0}):this.#e[t].open=!0)}close(t){t<0||t>=this.#e.length||(this.#r&&this.#e[t].open?D(()=>{this.#e[t].open=!1}):this.#e[t].open=!1)}toggle(t){t<0||t>=this.#e.length||(this.#r?this.#a(this.#e[t]):this.#e[t].open=!this.#e[t].open)}openAll(){this.hasAttribute("single")||this.#e.forEach(t=>{t.open=!0})}closeAll(){this.#e.forEach(t=>{t.open=!1})}};b("accordion-wc",Gt);var Kt=class extends g{#e=[];#t=[];static get observedAttributes(){return["position","max"]}setup(){this.setAttribute("role","region"),this.setAttribute("aria-label","Notifications"),this.setAttribute("aria-live","polite")}teardown(){this.#t.forEach(t=>{t._dismissTimer&&clearTimeout(t._dismissTimer)}),this.#e=[],this.#t=[]}show(t){let{message:e,variant:i="info",duration:n=this.#n(),dismissible:r=!0,action:a,onAction:o}=t,c=this.#s({message:e,variant:i,dismissible:r,action:a,onAction:o}),l=this.#a();return this.#t.length>=l?this.#e.push({toast:c,duration:n}):this.#r(c,n),c}#s({message:t,variant:e,dismissible:i,action:n,onAction:r}){let a=document.createElement("div");a.className="toast",a.setAttribute("role",e==="error"||e==="warning"?"alert":"status"),a.setAttribute("data-variant",e);let o={info:"&#9432;",success:"&#10003;",warning:"&#9888;",error:"&#10007;"};return a.innerHTML=`
1
+ var sa=Object.defineProperty;var D=(i,t)=>()=>(i&&(t=i(i=0)),t);var bt=(i,t)=>{for(var e in t)sa(i,e,{get:t[e],enumerable:!0})};function ha(){let i=globalThis.localStorage;if(!i)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return i.getItem(t)},async setRaw(t,e){i.setItem(t,e)},async removeRaw(t){i.removeItem(t)},async keys(t){let e=[];for(let s=0;s<i.length;s++){let n=i.key(s);n&&n.startsWith(t)&&e.push(n)}return e}}}function V(){return Rt||(Rt=ha()),Rt}function Ee(i,t){if(typeof i!="string"||!i)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${i}:${t}`}function Rs(i){if(typeof i!="string"||!i)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${i}:`}function Hs(i){try{let t=JSON.parse(i);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var Rt,w,W=D(()=>{Rt=null;w={configure(i={}){Rt=i.backend??null},async set(i,t,e){let s={data:e,timestamp:Date.now()};await V().setRaw(Ee(i,t),JSON.stringify(s))},async get(i,t,e){let s=await V().getRaw(Ee(i,t));if(s==null)return null;let n=Hs(s);return!n||e?.maxAge!=null&&Date.now()-n.timestamp>e.maxAge?null:n.data},async remove(i,t){await V().removeRaw(Ee(i,t))},async list(i){let t=Rs(i),e=await V().keys(t),s=[];for(let n of e){let r=await V().getRaw(n);if(r==null)continue;let a=Hs(r);a&&s.push({key:n.slice(t.length),data:a.data,timestamp:a.timestamp})}return s},async clear(i){let t=Rs(i),e=await V().keys(t);for(let s of e)await V().removeRaw(s)},async clearAll(){let i=await V().keys("vb:");for(let t of i)await V().removeRaw(t)},async setMany(i,t){for(let[e,s]of t)await w.set(i,e,s)}}});var cn={};bt(cn,{addDialogDismiss:()=>an,addLongPress:()=>rn,addPullToRefresh:()=>ka,addSwipeListener:()=>sn,haptic:()=>Ut,initGestures:()=>on,makeSwipeable:()=>nn});function sn(i,t={}){let e=t.threshold??50,s=t.restraint??100,n=t.timeout??300,r,a,o;function c(h){h.isPrimary&&(r=h.clientX,a=h.clientY,o=Date.now())}function l(h){if(!h.isPrimary)return;let d=h.clientX-r,u=h.clientY-a,b=Date.now()-o;if(b>n)return;let y=Math.abs(d),p=Math.abs(u),E;if(y>=e&&p<=s?E=d<0?"left":"right":p>=e&&y<=s&&(E=u<0?"up":"down"),E){let v=E==="left"||E==="right"?y:p;i.dispatchEvent(new CustomEvent(`swipe-${E}`,{bubbles:!0,detail:{distance:v,duration:b}}))}}return i.addEventListener("pointerdown",c,{passive:!0}),i.addEventListener("pointerup",l,{passive:!0}),()=>{i.removeEventListener("pointerdown",c),i.removeEventListener("pointerup",l)}}function nn(i,t={}){let e=t.threshold??100,s=t.direction??"horizontal",n=t.removeOnDismiss??!0,r=s==="horizontal",a=0,o=0,c=!1;function l(p){!p.isPrimary||i.hasAttribute("data-dismissed")||(p.preventDefault(),c=!0,a=r?p.clientX:p.clientY,o=0,i.setPointerCapture(p.pointerId),i.setAttribute("data-swiping",""))}function h(p){if(!c||!p.isPrimary)return;o=(r?p.clientX:p.clientY)-a;let v=1-Math.min(Math.abs(o)/e,1)*.5;r?i.style.transform=`translateX(${o}px)`:i.style.transform=`translateY(${o}px)`,i.style.opacity=String(v)}function d(p){!c||!p.isPrimary||(c=!1,i.releasePointerCapture(p.pointerId),i.removeAttribute("data-swiping"),Math.abs(o)>=e?b(o>0?"right":"left"):y())}function u(p){!c||!p.isPrimary||(c=!1,i.releasePointerCapture(p.pointerId),i.removeAttribute("data-swiping"),y())}function b(p){let E=p==="right"?"100%":"-100%";i.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",i.style.transform=r?`translateX(${E})`:`translateY(${E})`,i.style.opacity="0",i.setAttribute("data-dismissed",""),Ut.dismiss(),i.dispatchEvent(new CustomEvent("swipe-dismiss",{bubbles:!0,detail:{direction:p,distance:Math.abs(o)}})),n&&i.addEventListener("transitionend",()=>i.remove(),{once:!0})}function y(){i.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",i.style.transform="",i.style.opacity="",i.addEventListener("transitionend",()=>{i.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",l),i.addEventListener("pointermove",h),i.addEventListener("pointerup",d),i.addEventListener("pointercancel",u),()=>{i.removeEventListener("pointerdown",l),i.removeEventListener("pointermove",h),i.removeEventListener("pointerup",d),i.removeEventListener("pointercancel",u)}}function ka(i,t,e={}){let s=e.threshold??70,n=e.maxPull??120,r=document.createElement("div");r.setAttribute("data-pull-indicator",""),r.setAttribute("aria-hidden","true");let a=document.createElement("div");a.setAttribute("data-pull-spinner",""),r.appendChild(a),i.prepend(r);let o=0,c=!1,l=!1;function h(E){!E.isPrimary||l||i.scrollTop<=0&&(o=E.clientY,c=!0)}function d(E){if(!c||!E.isPrimary||l)return;let v=E.clientY-o;if(v<=0){r.style.transform="",r.style.opacity="";return}let T=Math.min(v,n),q=T/s;r.style.transform=`translateY(${T}px)`,r.style.opacity=String(Math.min(q,1)),q>=1?r.setAttribute("data-pull-ready",""):r.removeAttribute("data-pull-ready")}function u(E){!c||!E.isPrimary||(c=!1,r.hasAttribute("data-pull-ready")&&!l?y():p())}function b(E){!c||!E.isPrimary||(c=!1,p())}async function y(){l=!0,r.removeAttribute("data-pull-ready"),r.setAttribute("data-pull-loading",""),r.style.transform=`translateY(${s}px)`,r.style.opacity="1";try{await t()}finally{l=!1,r.removeAttribute("data-pull-loading"),p()}}function p(){r.style.transition="transform 0.3s ease, opacity 0.3s ease",r.style.transform="",r.style.opacity="",r.removeAttribute("data-pull-ready"),r.addEventListener("transitionend",()=>{r.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",h,{passive:!0}),i.addEventListener("pointermove",d,{passive:!0}),i.addEventListener("pointerup",u,{passive:!0}),i.addEventListener("pointercancel",b,{passive:!0}),()=>{i.removeEventListener("pointerdown",h),i.removeEventListener("pointermove",d),i.removeEventListener("pointerup",u),i.removeEventListener("pointercancel",b),r.remove()}}function rn(i,t,e={}){let s=e.duration??500,n=e.hapticFeedback??!0,r=e.blockContextMenu??!0,a=null;function o(h){h.isPrimary&&(a=setTimeout(()=>{n&&Ut.tap(),t(h),a=null},s))}function c(){a&&(clearTimeout(a),a=null)}function l(h){r&&h.preventDefault()}return i.addEventListener("pointerdown",o,{passive:!0}),i.addEventListener("pointermove",c,{passive:!0}),i.addEventListener("pointerup",c,{passive:!0}),i.addEventListener("pointercancel",c,{passive:!0}),i.addEventListener("contextmenu",l),()=>{c(),i.removeEventListener("pointerdown",o),i.removeEventListener("pointermove",c),i.removeEventListener("pointerup",c),i.removeEventListener("pointercancel",c),i.removeEventListener("contextmenu",l)}}function an(i,t={}){let e=t.threshold??80,s=0,n=0,r=!1;function a(u){if(!u.isPrimary||!i.open)return;let b=u.target;b.closest("a, button, input, select, textarea, [contenteditable]")&&!b.closest("header")||(r=!0,s=u.clientY,n=0,i.setPointerCapture(u.pointerId),i.style.transition="none")}function o(u){if(!r||!u.isPrimary)return;if(n=u.clientY-s,n<=0){i.style.transform="",i.style.opacity="";return}let y=1-Math.min(n/e,1)*.4;i.style.transform=`translateY(${n}px)`,i.style.opacity=String(y)}function c(u){!r||!u.isPrimary||(r=!1,i.releasePointerCapture(u.pointerId),n>=e?h():d())}function l(u){!r||!u.isPrimary||(r=!1,i.releasePointerCapture(u.pointerId),d())}function h(){i.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",i.style.transform="translateY(100%)",i.style.opacity="0",Ut.dismiss(),i.addEventListener("transitionend",()=>{i.style.transition="",i.style.transform="",i.style.opacity="",i.close("dismiss")},{once:!0})}function d(){i.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",i.style.transform="",i.style.opacity="",i.addEventListener("transitionend",()=>{i.style.transition=""},{once:!0})}return i.addEventListener("pointerdown",a),i.addEventListener("pointermove",o),i.addEventListener("pointerup",c),i.addEventListener("pointercancel",l),()=>{i.removeEventListener("pointerdown",a),i.removeEventListener("pointermove",o),i.removeEventListener("pointerup",c),i.removeEventListener("pointercancel",l)}}function on(i=document){let t=[];for(let e of i.querySelectorAll('[data-gesture="swipe"]'))t.push(sn(e));for(let e of i.querySelectorAll('[data-gesture="dismiss"]'))t.push(nn(e));for(let e of i.querySelectorAll('[data-gesture="long-press"]'))t.push(rn(e,()=>{e.dispatchEvent(new CustomEvent("long-press",{bubbles:!0}))}));for(let e of i.querySelectorAll('dialog[data-gesture="dismiss-down"]'))t.push(an(e));return()=>t.forEach(e=>e())}var Ut,ln=D(()=>{Ut={tap:()=>navigator.vibrate?.(8),confirm:()=>navigator.vibrate?.([8,40,8]),error:()=>navigator.vibrate?.([30,60,30]),dismiss:()=>navigator.vibrate?.(15)};on()});var Xt={};bt(Xt,{destroyStickyManager:()=>Ra,initStickyManager:()=>ti});function et(){let i=document.documentElement;if(!i.hasAttribute("data-sticky"))return;let t=document.querySelector("header");t&&!t.hasAttribute("data-sticky")&&(t.dataset.sticky="",Qe=!0);let e=document.querySelector("header[data-sticky]"),s=e?e.getBoundingClientRect().height:0;i.style.setProperty("--sticky-offset",`${s}px`)}function En(){et()}function ti(){if(Kt)return;Kt=!0,et(),requestAnimationFrame(et),document.fonts?.ready?.then(et),window.addEventListener("resize",et,{passive:!0}),document.addEventListener("toggle",En,!0),Ze=new ResizeObserver(et);let i=document.querySelector("header[data-sticky]");i&&Ze.observe(i)}function Ra(){if(Kt){if(Kt=!1,window.removeEventListener("resize",et),document.removeEventListener("toggle",En,!0),Ze?.disconnect(),Qe){let i=document.querySelector("header[data-sticky]");i&&delete i.dataset.sticky,Qe=!1}document.documentElement.style.removeProperty("--sticky-offset")}}var Kt,Ze,Qe,kt=D(()=>{Kt=!1,Qe=!1});var Sn={};bt(Sn,{SoundManager:()=>Ha});var An,ei,Ha,Cn=D(()=>{An="vb-sound",ei={enabled:!1,volume:.5},Ha={_ctx:null,_enabled:!1,_volume:.5,_initialized:!1,init(){if(this._initialized)return this;let i=this._load();return this._enabled=i.enabled,this._volume=i.volume,this._initialized=!0,this},_getContext(){return this._ctx||(this._ctx=new(window.AudioContext||window.webkitAudioContext)),this._ctx.state==="suspended"&&this._ctx.resume(),this._ctx},_load(){try{let i=localStorage.getItem(An);return i?{...ei,...JSON.parse(i)}:{...ei}}catch{return{...ei}}},_save(i){try{let t=this._load();localStorage.setItem(An,JSON.stringify({...t,...i}))}catch{}},_playTone(i,t,e="sine"){if(!this._enabled)return;let s=this._getContext(),n=s.createOscillator(),r=s.createGain();n.connect(r),r.connect(s.destination),n.frequency.value=i,n.type=e,r.gain.value=this._volume*.3,n.start(),r.gain.exponentialRampToValueAtTime(.01,s.currentTime+t),n.stop(s.currentTime+t)},enable(){this._enabled=!0,this._save({enabled:!0}),this.play("click")},disable(){this._enabled=!1,this._save({enabled:!1})},toggle(){return this._enabled?this.disable():this.enable(),this._enabled},isEnabled(){return this._enabled},setVolume(i){this._volume=Math.max(0,Math.min(1,i)),this._save({volume:this._volume})},getVolume(){return this._volume},play(i){if(this._enabled)switch(i){case"click":this._playTone(800,.1);break;case"success":this._playTone(523,.1),setTimeout(()=>this._playTone(659,.1),100),setTimeout(()=>this._playTone(784,.15),200);break;case"error":this._playTone(200,.15,"sawtooth"),setTimeout(()=>this._playTone(180,.2,"sawtooth"),150);break;case"notification":this._playTone(880,.1),setTimeout(()=>this._playTone(1100,.15),100);break;case"soft":this._playTone(600,.05);break;case"tick":this._playTone(1200,.02,"square");break}},getState(){return{enabled:this._enabled,volume:this._volume}}}});function Va(i,t){if(!t)return i;let e=i??new URLSearchParams;for(let[s,n]of Object.entries(t))n!=null&&e.set(s,String(n));return e}async function za(i){if((i.headers.get("content-type")??"").includes("application/json"))try{return await i.json()}catch{return null}try{return await i.text()}catch{return null}}function kn(i){return i.endsWith("/")?i.slice(0,-1):i}var R,z,it,si=D(()=>{R={baseUrl:"/go",headers:{},services:{}},z=class extends Error{constructor(t,e,s,n){super(`VBService(${s}): ${t} ${n}`),this.name="VBServiceError",this.status=t,this.body=e,this.role=s,this.path=n}};it=class i{static configure(t={}){R={baseUrl:t.baseUrl??R.baseUrl,headers:{...R.headers,...t.headers??{}},services:{...R.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");return R.services[t]?kn(R.services[t]):R.baseUrl?`${kn(R.baseUrl)}/${t}`:`/go/${t}`}static _reset(){R={baseUrl:"/go",headers:{},services:{}}}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,e){return this.#e("GET",t,{params:e})}async post(t,e){return this.#e("POST",t,{body:e})}async patch(t,e){return this.#e("PATCH",t,{body:e})}async delete(t){return this.#e("DELETE",t,{})}async#e(t,e,s){let n=i.resolve(this.role),r=e?e.startsWith("/")?e:`/${e}`:"",a=new URL(`${n}${r}`,globalThis.location?.origin??"http://localhost"),o=Va(a.searchParams,s.params);o&&(a.search=o.toString());let c={method:t,headers:{...R.headers}};s.body!==void 0&&(c.body=JSON.stringify(s.body),c.headers["content-type"]="application/json");let l=a.toString(),h=await fetch(l,c),d=await za(h);if(!h.ok)throw new z(h.status,d,this.role,`${r||"/"}`);return d}}});function Zt(i){let t=2166136261;for(let e=0;e<i.length;e++)t^=i.charCodeAt(e),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Ya(){return"hn-"+crypto.randomUUID().slice(0,8)}function Nn(i,t){return getComputedStyle(i).getPropertyValue(`--highlight-${t}`).trim()}function Ga(i){if(rt){Tt++;return}rt=new CSSStyleSheet;let t=i.map(e=>`::highlight(hn-${e}) { background-color: var(--highlight-${e}); text-decoration-line: underline; text-decoration-color: var(--highlight-${e}); text-underline-offset: 2px; }`).join(`
2
+ `);rt.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,rt],Tt=1}function Ka(){Tt--,Tt<=0&&rt&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(i=>i!==rt),rt=null,Tt=0)}function Xa(){return C||(C=document.createElement("div"),C.className="hn-toolbar",C.setAttribute("role","toolbar"),C.setAttribute("aria-label","Highlight tools"),C.setAttribute("popover","auto"),C.hidden=!0,document.body.appendChild(C),C.addEventListener("toggle",i=>{i.newState==="closed"&&(C.hidden=!0,Qt=null)}),C)}function ai(i,t,e){let s=Xa();s.innerHTML="",Qt=t;let n=t.colors,r=t.element,a=e?.color,o=document.createElement("div");if(o.className="hn-swatches",o.setAttribute("role","group"),o.setAttribute("aria-label","Highlight colors"),n.forEach((c,l)=>{let h=document.createElement("button");h.type="button",h.className="hn-swatch",h.dataset.color=c,h.setAttribute("aria-label",`Highlight ${c}${a===c?" (current)":""}`),h.setAttribute("tabindex",l===0?"0":"-1");let d=Nn(r,c);d&&(h.style.backgroundColor=d),a===c&&h.setAttribute("aria-pressed","true"),h.addEventListener("click",()=>{e?t._changeColor(e.id,c):t._createFromSelection(c),xt()}),o.appendChild(h)}),s.appendChild(o),e){let c=document.createElement("span");c.className="hn-separator",c.setAttribute("aria-hidden","true"),s.appendChild(c);let l=document.createElement("button");l.type="button",l.className="hn-action",l.textContent=e.note?"Edit Note":"Add Note",l.addEventListener("click",()=>{Dn(t,e),xt()}),s.appendChild(l);let h=document.createElement("button");h.type="button",h.className="hn-action hn-action-remove",h.textContent="Remove",h.addEventListener("click",()=>{t.removeHighlight(e.id),xt()}),s.appendChild(h)}o.addEventListener("keydown",c=>{let l=[...o.querySelectorAll("button")],h=l.indexOf(document.activeElement);if(h<0)return;let d=-1;if(c.key==="ArrowRight"||c.key==="ArrowDown")c.preventDefault(),d=(h+1)%l.length;else if(c.key==="ArrowLeft"||c.key==="ArrowUp")c.preventDefault(),d=(h-1+l.length)%l.length;else if(c.key==="Escape"){xt();return}d>=0&&(l[h].setAttribute("tabindex","-1"),l[d].setAttribute("tabindex","0"),l[d].focus())}),s.hidden=!1;try{s.showPopover()}catch{}Ja(i),requestAnimationFrame(()=>{let c=s.querySelector(".hn-swatch");c&&c.focus()})}function Dn(i,t){nt();let e=i.element,s=st(e,t.startOffset,t.endOffset);if(!s)return;M=document.createElement("div"),M.className="hn-note-panel",M.setAttribute("role","dialog"),M.setAttribute("aria-label","Private note");let n=document.createElement("header");n.className="hn-note-header",n.innerHTML="<small>PRIVATE NOTE</small>",M.appendChild(n);let r=document.createElement("blockquote");r.className="hn-note-quote",r.textContent=t.text.length>80?t.text.slice(0,80)+"\u2026":t.text,M.appendChild(r);let a=document.createElement("textarea");a.className="hn-note-textarea",a.placeholder="Add a note\u2026",a.value=t.note||"",a.rows=3,a.setAttribute("aria-label","Note for highlighted text"),M.appendChild(a);let o=document.createElement("footer");o.className="hn-note-actions";let c=document.createElement("button");c.type="button",c.className="hn-action hn-action-save",c.textContent="Save",c.addEventListener("click",()=>{i._updateNote(t.id,a.value.trim()),nt()});let l=document.createElement("button");l.type="button",l.className="hn-action",l.textContent="Cancel",l.addEventListener("click",()=>nt()),o.append(c,l),M.appendChild(o),a.addEventListener("keydown",u=>{u.key==="Escape"&&(u.preventDefault(),nt()),u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),i._updateNote(t.id,a.value.trim()),nt())}),e.style.position="relative",e.appendChild(M);let h=s.getClientRects()[0],d=e.getBoundingClientRect();if(h){let u=h.top-d.top;M.style.top=`${u}px`}requestAnimationFrame(()=>{a.focus(),document.addEventListener("pointerdown",_n)})}function _n(i){M&&!M.contains(i.target)&&nt()}function nt(){M&&(document.removeEventListener("pointerdown",_n),M.remove(),M=null)}function Ja(i){C&&requestAnimationFrame(()=>{let t=C.getBoundingClientRect(),e=t.width||200,s=t.height||40,n=i.top-s-Tn,r=i.left+i.width/2-e/2;n<ri&&(n=i.bottom+Tn);let a=window.innerWidth-e-ri;r=Math.max(ri,Math.min(r,a)),C.style.top=`${n}px`,C.style.left=`${r}px`})}function xt(){if(C){try{C.hidePopover()}catch{}C.hidden=!0,Qt=null}}function oi(i){K||(K=document.createElement("div"),K.setAttribute("aria-live","polite"),K.setAttribute("aria-atomic","true"),K.className="hn-sr-only",document.body.appendChild(K)),K.textContent="",requestAnimationFrame(()=>{K.textContent=i})}function Ln(i,t,e){let s=document.createTreeWalker(i,NodeFilter.SHOW_TEXT),n=0;for(;s.nextNode();){if(s.currentNode===t)return n+e;n+=(s.currentNode.textContent??"").length}return-1}function st(i,t,e){let s=document.createTreeWalker(i,NodeFilter.SHOW_TEXT),n=0,r=null,a=0,o=null,c=0;for(;s.nextNode();){let l=s.currentNode,h=(l.textContent??"").length;if(!r&&n+h>t&&(r=l,a=t-n),n+h>=e){o=l,c=e-n;break}n+=h}if(!r||!o)return null;try{let l=document.createRange();return l.setStart(r,Math.min(a,(r.textContent??"").length)),l.setEnd(o,Math.min(c,(o.textContent??"").length)),l}catch{return null}}function di(i){if(ci.has(i))return ci.get(i);let t=new hi(i);return ci.set(i,t),t}function Mn(i=document){i.querySelectorAll(li).forEach(t=>{t.hasAttribute("data-highlights-init")||di(t)})}var li,xn,Wa,Tn,ri,ja,rt,Tt,C,Qt,M,K,hi,ci,Za,qn=D(()=>{W();li="[data-highlights]",xn="highlights",Wa=["yellow","green","blue","pink"],Tn=8,ri=8,ja=typeof CSS<"u"&&"highlights"in CSS;rt=null,Tt=0;C=null,Qt=null;M=null;K=null;hi=class{#e;#t;#i;#n;#s=[];#r=!ja;#a;#c;#o=!1;#p=[];constructor(t){this.#e=t,this.#n=t.hasAttribute("data-highlights-readonly");let e=t.dataset.highlights;this.#t=e&&e!==""?e:location.pathname;let s=t.dataset.highlightsColors;this.#i=s?s.split(",").map(n=>n.trim()).filter(Boolean):[...Wa],this.#r||Ga(this.#i),this.#m(),this.#n||(this.#a=this.#h.bind(this),this.#c=this.#f.bind(this),t.addEventListener("pointerup",this.#a),t.addEventListener("click",this.#c)),t.setAttribute("data-highlights-init",""),this.#l().then(()=>{this.#o||this.#m()})}get colors(){return[...this.#i]}get element(){return this.#e}getHighlights(){return this.#s.map(t=>({...t}))}removeHighlight(t){let e=this.#s.findIndex(s=>s.id===t);e<0||(this.#s.splice(e,1),this.#u(),this.#m(),this.#y("highlights:removed",{id:t}),oi("Highlight removed"))}clearAll(){this.#s=[],this.#u(),this.#m()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#s})}importHighlights(t){try{let e=typeof t=="string"?JSON.parse(t):t;if(!e.highlights||!Array.isArray(e.highlights))return;this.#s=e.highlights,this.#u(),this.#m()}catch{}}destroy(){if(!this.#o){if(this.#o=!0,this.#a&&this.#e.removeEventListener("pointerup",this.#a),this.#c&&this.#e.removeEventListener("click",this.#c),this.#r)this.#e.querySelectorAll("mark[data-hn-id]").forEach(t=>{let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t),e.normalize()});else{for(let t of this.#i)CSS.highlights.delete(`hn-${t}`);Ka()}this.#A(),this.#e.removeAttribute("data-highlights-init"),Qt===this&&xt(),nt()}}#h(){requestAnimationFrame(()=>{if(this.#o||this.#e.hasAttribute("data-selection-menu"))return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let e=t.getRangeAt(0);if(!this.#e.contains(e.commonAncestorContainer))return;let s=e.getBoundingClientRect();ai(s,this,null)})}#f(t){if(this.#e.hasAttribute("data-selection-menu"))return;let e=t.target.closest?.(".hn-margin-annotation");if(e){let n=e.dataset.hnId,r=this.#s.find(a=>a.id===n);if(r){Dn(this,r);return}}let s=t.target.closest?.("mark[data-hn-id]");if(s){let n=s.dataset.hnId,r=this.#s.find(a=>a.id===n);if(r){this.#y("highlights:clicked",{id:n});let a=s.getBoundingClientRect();ai(a,this,r);return}}if(!this.#r){let n=this.#d(t.clientX,t.clientY);if(n){this.#y("highlights:clicked",{id:n.id});let r=st(this.#e,n.startOffset,n.endOffset);r&&ai(r.getBoundingClientRect(),this,n)}}}#d(t,e){for(let s of this.#s){let n=st(this.#e,s.startOffset,s.endOffset);if(!n)continue;let r=n.getClientRects();for(let a of r)if(t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom)return s}return null}_createFromSelection(t){let e=window.getSelection();if(!e||e.isCollapsed)return;let s=e.getRangeAt(0);if(!this.#e.contains(s.commonAncestorContainer))return;let n=Ln(this.#e,s.startContainer,s.startOffset),r=Ln(this.#e,s.endContainer,s.endOffset);if(n<0||r<0||n>=r)return;let a=e.toString().trim(),o={id:Ya(),startOffset:n,endOffset:r,text:a,color:t,note:"",created:Date.now()};this.#s.push(o),this.#u(),this.#m(),e.removeAllRanges(),this.#y("highlights:added",{id:o.id,text:a,color:t,note:""}),oi("Highlight added")}_changeColor(t,e){let s=this.#s.find(n=>n.id===t);s&&(s.color=e,this.#u(),this.#m())}_updateNote(t,e){let s=this.#s.find(n=>n.id===t);s&&(s.note=e,this.#u(),this.#b(),this.#y("highlights:note-changed",{id:t,note:e}),oi("Note saved"))}async#l(){let t=await w.get(xn,this.#t);if(!t||!Array.isArray(t.highlights))return;let e=Zt(this.#e.textContent);t.contentHash&&t.contentHash!==e?(this.#s=t.highlights.filter(s=>{let n=st(this.#e,s.startOffset,s.endOffset);return n?n.toString().trim()===s.text:!1}),this.#u()):this.#s=t.highlights}#u(){let t={version:1,contentHash:Zt(this.#e.textContent),highlights:this.#s};w.set(xn,this.#t,t).catch(()=>{})}#m(){this.#r?this.#v():this.#g(),this.#b()}#g(){let t=new Map;for(let e of this.#i)t.set(e,[]);for(let e of this.#s){let s=st(this.#e,e.startOffset,e.endOffset);s&&t.has(e.color)&&t.get(e.color).push(s)}for(let[e,s]of t){let n=`hn-${e}`;s.length===0?CSS.highlights.delete(n):CSS.highlights.set(n,new Highlight(...s))}}#v(){this.#e.querySelectorAll("mark[data-hn-id]").forEach(e=>{let s=e.parentNode;for(;e.firstChild;)s.insertBefore(e.firstChild,e);s.removeChild(e)}),this.#e.normalize();let t=[...this.#s].sort((e,s)=>s.startOffset-e.startOffset);for(let e of t){let s=st(this.#e,e.startOffset,e.endOffset);if(!s)continue;let n=Nn(this.#e,e.color),r=document.createElement("mark");r.dataset.hnId=e.id,r.dataset.hnColor=e.color,n&&(r.style.backgroundColor=n,r.style.textDecorationColor=n);try{s.surroundContents(r)}catch{let a=s.extractContents();r.appendChild(a),s.insertNode(r)}}}#A(){for(let t of this.#p)t.remove();this.#p=[]}#b(){if(this.#A(),this.#s.length===0)return;getComputedStyle(this.#e).position==="static"&&(this.#e.style.position="relative");for(let e of this.#s){let s=st(this.#e,e.startOffset,e.endOffset);if(!s)continue;let n=s.getClientRects();if(n.length===0)continue;let r=n[0],a=this.#e.getBoundingClientRect(),o=r.top-a.top,c=document.createElement("span");c.className="hn-margin-annotation",c.dataset.hnId=e.id,c.setAttribute("aria-hidden","true"),c.style.top=`${o}px`,e.note?(c.innerHTML='<span class="hn-note-indicator">*</span> You highlighted',c.classList.add("hn-has-note")):c.textContent="You highlighted",this.#e.appendChild(c),this.#p.push(c)}}#y(t,e={}){this.#e.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}},ci=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Mn()):Mn();Za=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(li)&&di(s),s.querySelectorAll(li).forEach(n=>{n.hasAttribute("data-highlights-init")||di(n)})}});Za.observe(document.documentElement,{childList:!0,subtree:!0})});var yi={};bt(yi,{currentHash:()=>gi,initPageWatch:()=>mi,readWatch:()=>te,removeWatch:()=>In,writeWatch:()=>Lt});function $n(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function Qa(i){if(!$n())return null;try{let t=new it("notify"),e={url:i.url,type:"page-watch",notify:["panel"]},s=await t.post("/subscribe",e);return typeof s?.id=="string"?s.id:null}catch(t){let e=t instanceof z?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",e),null}}async function to(i){if(!(!i||!$n()))try{await new it("notify").delete(`/subscribe/${encodeURIComponent(i)}`)}catch(t){let e=t instanceof z?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",e)}}function eo(){return document.querySelector("main")||document.querySelector("article")||document.body}function Mt(){return location.pathname||"/"}function gi(){let i=eo();return i?Zt(i.textContent||""):""}function io(){return document.title||Mt()}async function te(){return await w.get(bi,Mt())}async function Lt(i){await w.set(bi,Mt(),i)}async function In(){await w.remove(bi,Mt())}function ui(i,t){i.setAttribute("aria-pressed",t?"true":"false"),i.dataset.watching="",t||delete i.dataset.watching;let e=i.querySelector("icon-wc");e&&e.setAttribute("name",t?"bookmark-check":"bookmark");let s=[...i.childNodes].find(n=>n.nodeType===Node.TEXT_NODE&&(n.textContent||"").trim());s&&!i.hasAttribute("data-watch-label-locked")&&(s.textContent=t?"Watching":"Watch for updates"),i.setAttribute("title",t?"Stop watching this page":"Watch this page for content updates")}async function fi(i){if(i.hasAttribute("data-watch-page-init"))return;i.setAttribute("data-watch-page-init",""),i.setAttribute("type",i.getAttribute("type")||"button");let t=await te();ui(i,!!t),i.addEventListener("click",async e=>{e.preventDefault();let s=await te();if(s)await In(),ui(i,!1),i.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:s.url,subscriptionId:s.subscriptionId}})),to(s.subscriptionId);else{let n={url:Mt(),title:io(),contentHash:gi(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await Lt(n),ui(i,!0),i.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:n}}));let r=await Qa(n);r&&await Lt({...n,subscriptionId:r})}})}async function so(){let i=await te();if(!i)return;let t=gi(),e=new Date().toISOString(),s=i.contentHash,n={...i,lastChecked:e};if(t&&t!==s){n.contentHash=t,n.lastChanged=e,await Lt(n);let r={id:`page-watch:${i.url}:${t}`,type:"watch",title:`Updated: ${i.title}`,body:"Content changed since your last visit.",url:i.url,date:e,read:!1,dismissed:!1,priority:"normal"};document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:r}}))}else await Lt(n)}function mi(i=document){for(let t of i.querySelectorAll(pi))fi(t);so()}var pi,bi,no,vi=D(()=>{W();si();qn();pi="[data-watch-page]",bi="watches";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>mi()):mi();no=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches?.(pi)&&fi(s),s.querySelectorAll?.(pi).forEach(n=>fi(n))}});no.observe(document.documentElement,{childList:!0,subtree:!0})});function pe(i){try{if(sessionStorage.getItem("vb_optout")==="1")return!0}catch{}if(navigator.globalPrivacyControl===!0||navigator.doNotTrack==="1")return!0;if(typeof i.consent=="function")try{return i.consent()===!1}catch{return!0}return!1}function qr(i){return i?.closest?.("[data-vb-no-track]")!=null}function Rc(){let{dataset:i}=document.documentElement,t={};for(let e of Object.keys(i)){let s=i[e];s!=null&&s!==""&&(t[e]=s)}return t}function Hc(){let i={};for(let t of document.querySelectorAll('meta[name^="vb:"]')){let e=t.getAttribute("name").slice(3),s=t.getAttribute("content")?.trim();e&&s&&(i[e]=s)}return i}function Vc(i,t){if(!t?.length)return i;for(let{pattern:e,replace:s}of t)if(e.test(i))return i.replace(e,s);return i}function zc(i,t){let e=JSON.stringify(t);if(typeof navigator.sendBeacon=="function"){let s=new Blob([e],{type:"application/json"});if(navigator.sendBeacon(i,s))return!0}try{return fetch(i,{method:"POST",body:e,keepalive:!0,headers:{"content-type":"application/json"}}),!0}catch{return!1}}function $r(i){return`${(A.config?.endpoint??"/api/analytics").replace(/\/+$/,"")}/${i}`}function bs(i,t){let e=A.config,s=Vc(location.pathname+location.search,e.urlMasks),n=typeof e.context=="function"?e.context()??{}:{};return{name:i,ts:Date.now(),site:e.siteId,path:s,referrer:document.referrer||"",context:{...Rc(),...Hc(),...n},props:t??{}}}function fe(i,t){let e=A.config;return!e||e.transport==="disabled"?!1:e.transport==="console"?(console.log("%c[vb:analytics]","color:#0aa;font-weight:600",i,t),!0):zc($r(i),t)}function Ir(){let i=A.config?.sampleRate??1;return i>=1?!0:Math.random()<i}function Or(){if(!A.config||pe(A.config)||document.documentElement.hasAttribute("data-vb-no-track")||!Ir())return;let i=location.pathname+location.search;i!==Dr&&(Dr=i,fe("hit",bs("page.view",{})))}function Uc(){let i,t=()=>{clearTimeout(i),i=setTimeout(Or,100)},e=history.pushState.bind(history);history.pushState=function(...n){e(...n),t()};let s=history.replaceState.bind(history);history.replaceState=function(...n){s(...n),t()},window.addEventListener("popstate",t)}function Wc(i){let t={};for(let[e,s]of Object.entries(i.dataset)){if(e==="vbEvent"||!e.startsWith("vbEvent"))continue;let n=e.slice(7).replace(/^./,r=>r.toLowerCase());t[n]=s}return t}function jc(i){if(!A.config||pe(A.config))return;let t=i.target.closest?.("[data-vb-event]");if(!t||qr(t))return;let e=t.dataset.vbEvent;e&&g.track(e,Wc(t))}function _r(){let i=document.querySelectorAll('a[href^="http"]');for(let t of i){if(t.hostname===location.hostname||qr(t)||t.hasAttribute("data-vb-analytics-wired"))continue;let e=encodeURIComponent(A.config?.siteId??"default"),s=`${$r("click")}?site=${e}&from=${encodeURIComponent(location.pathname)}`;t.hasAttribute("ping")||t.setAttribute("ping",s),t.addEventListener("click",()=>{if(pe(A.config))return;let n=navigator.userAgent;/Firefox|Brave/.test(n)&&fe("click",bs("link.outbound",{to:t.hostname,href:t.href}))}),t.setAttribute("data-vb-analytics-wired","")}}function ms(){if(!A.queue.length)return;let i=A.queue.splice(0);fe("events",{site:A.config?.siteId,events:i})}function Yc(){document.visibilityState==="hidden"&&ms()}function Kc(){try{return window.top!==window.self}catch{return!0}}var A,Dr,Gc,g,ot=D(()=>{A={config:null,queue:[]};Dr=null;Gc={endpoint:"/api/analytics",siteId:"default",transport:"disabled",sampleRate:1,consent:null,context:null,urlMasks:null,autoPageView:!0,autoOutboundLinks:!0,autoDeclarative:!0,allowInIframe:!1};g={init(i={}){if(!A.config){if(A.config={...Gc,...i},Kc()&&!A.config.allowInIframe){A.config.transport="disabled",A.config.autoPageView=!1,A.config.autoOutboundLinks=!1,A.config.autoDeclarative=!1;return}A.config.transport==="disabled"&&(A.config.autoOutboundLinks=!1),A.config.autoDeclarative&&document.addEventListener("click",jc,{capture:!0}),A.config.autoOutboundLinks&&(_r(),new MutationObserver(()=>_r()).observe(document.body,{childList:!0,subtree:!0})),A.config.autoPageView&&(Or(),Uc()),document.addEventListener("visibilitychange",Yc),window.addEventListener("pagehide",ms)}},track(i,t={}){A.config&&(pe(A.config)||Ir()&&fe("hit",bs(i,t)))},flush:ms,setConsent(i){try{i?sessionStorage.removeItem("vb_optout"):sessionStorage.setItem("vb_optout","1")}catch{}},get config(){return A.config?{...A.config}:null}}});var sl={};function Qc(i,t,e){return i<=t?"good":i<=e?"needs-improvement":"poor"}function me(i,t,e,s,n={}){g.track(i,{value:Math.round(t*1e3)/1e3,rating:Qc(t,e,s),...n})}function tl(){let i=null,t=new PerformanceObserver(s=>{let n=s.getEntries();i=n[n.length-1]});try{t.observe({type:"largest-contentful-paint",buffered:!0})}catch{return}let e=()=>{i&&(me("perf.lcp",i.startTime,2500,4e3),i=null)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function el(){let i=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries())n.hadRecentInput||(i+=n.value)});try{t.observe({type:"layout-shift",buffered:!0})}catch{return}let e=()=>{me("perf.cls",i,.1,.25),i=0};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function il(){let i=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries())n.duration>i&&(i=n.duration)});try{t.observe({type:"event",durationThreshold:40,buffered:!0})}catch{return}let e=()=>{i!==0&&(me("perf.inp",i,200,500),i=0)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()}),window.addEventListener("pagehide",e)}function Rr(){try{let[i]=performance.getEntriesByType("navigation");if(!i||!i.responseStart)return;me("perf.ttfb",i.responseStart,800,1800,{navigationType:i.type})}catch{}}var Hr=D(()=>{ot();typeof window<"u"&&"PerformanceObserver"in window&&(tl(),el(),il(),document.readyState==="complete"?Rr():window.addEventListener("load",Rr,{once:!0}))});var rl={};function nl(i){if(typeof i!="string"||!i)return"";try{let t=new URL(i,location.origin);return t.pathname.split("/").pop()||t.pathname}catch{return i.split("/").pop()??i}}function Vr(i){return typeof i!="string"?String(i??"").slice(0,ys):i.length>ys?i.slice(0,ys):i}var ys,zr=D(()=>{ot();ys=200;typeof window<"u"&&(window.addEventListener("error",i=>{i.target&&i.target!==window||g.track("error.js_runtime",{message:Vr(i.message),source:nl(i.filename),line:i.lineno??0,col:i.colno??0})}),window.addEventListener("unhandledrejection",i=>{let t=i.reason,e=t instanceof Error?t.message:typeof t=="string"?t:JSON.stringify(t??null);g.track("error.unhandled_promise",{message:Vr(e)})}))});var ol={};function Gr(){let i=window.scrollY+window.innerHeight,t=Math.max(document.documentElement.scrollHeight,document.body?.scrollHeight??0);return t<=0?0:Math.min(100,Math.max(0,Math.round(i/t*100)))}function al(){clearTimeout(Wr),Wr=setTimeout(()=>{let i=Gr();i>vs&&(vs=i)},500)}function jr(){Ot==null&&(Ot=Date.now())}function Kr(){Ot!=null&&(ws+=Date.now()-Ot,Ot=null)}function Yr(){if(Ur)return;Ur=!0,Kr();let i=Math.max(vs,Gr());i>0&&g.track("__scroll",{depth:i}),ws>0&&g.track("__attention",{ms:ws})}var vs,Ot,ws,Ur,Wr,Xr=D(()=>{ot();vs=0,Ot=null,ws=0,Ur=!1,Wr=null;typeof window<"u"&&(window.addEventListener("scroll",al,{passive:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?jr():(Kr(),Yr())}),window.addEventListener("pagehide",Yr),document.visibilityState==="visible"&&jr())});var Zr={};bt(Zr,{WizardController:()=>be,initWizards:()=>As});function Es(i){if(i.hasAttribute("data-wizard-enhanced"))return;let t=new be(i);i.wizardController=t,i.wizardGoTo=e=>t.goTo(e),i.wizardNext=()=>t.next(),i.wizardPrev=()=>t.prev(),i.wizardReset=()=>t.reset()}function As(){document.querySelectorAll("form[data-wizard]").forEach(i=>{Es(i)})}function Jr(){new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches("form[data-wizard]")&&Es(n),n.querySelectorAll?.("form[data-wizard]:not([data-wizard-enhanced])").forEach(r=>{Es(r)})}}).observe(document.documentElement,{childList:!0,subtree:!0})}var be,Qr=D(()=>{be=class{#e;#t=[];#i=0;#n=null;#s=null;#r=null;#a=!1;#c="step";#o=null;#p="";#h=0;#f=0;constructor(t){if(!t||!(t instanceof HTMLFormElement))throw new Error("WizardController requires a form element");this.#e=t,this.#d()}#d(){if(this.#t=Array.from(this.#e.querySelectorAll("fieldset[data-wizard-step]")),this.#t.length===0){console.warn("Wizard form has no steps");return}this.#a=this.#e.hasAttribute("data-wizard-history"),this.#c=this.#e.getAttribute("data-wizard-validate")||"step",this.#l(),this.#n=this.#e.querySelector("[data-wizard-progress]"),this.#y(),this.#w(),this.#b(),this.#e.setAttribute("data-wizard-enhanced",""),this.#e.setAttribute("data-wizard-total",String(this.#t.length)),this.#$(),this.#S(),this.#D();let t=()=>{cancelAnimationFrame(this.#h),this.#h=requestAnimationFrame(()=>this.#M())};if(this.#e.addEventListener("change",t),this.#e.addEventListener("input",t),this.#o&&(this.#e.addEventListener("change",()=>this.#m()),this.#e.addEventListener("input",()=>this.#m())),this.#e.addEventListener("submit",e=>this.#A(e)),this.#e.addEventListener("reset",()=>{requestAnimationFrame(()=>this.reset())}),this.#a){let e=this.#q();e!==null&&e>=0&&e<this.#t.length&&(this.#i=e),window.addEventListener("hashchange",()=>{let s=this.#q();s!==null&&s!==this.#i&&this.goTo(s)})}this.#g(),this.#M(),this.#_()}#l(){let t=this.#e.getAttribute("data-wizard-persist");if(t){if(!this.#e.id){console.warn("Wizard persistence requires an id on the form element");return}this.#p=`vb-wizard:${this.#e.id}`,t==="local"?this.#o=localStorage:this.#o=sessionStorage}}#u(){if(!this.#o)return;let t={},e=new FormData(this.#e);for(let[s,n]of e.entries())t[s]!==void 0?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(n)):t[s]=n;try{this.#o.setItem(this.#p,JSON.stringify({step:this.#i,data:t}))}catch{}}#m(){this.#o&&(cancelAnimationFrame(this.#f),this.#f=requestAnimationFrame(()=>this.#u()))}#g(){if(this.#o)try{let t=this.#o.getItem(this.#p);if(!t)return;let e=JSON.parse(t);if(!e||typeof e!="object")return;if(e.data&&typeof e.data=="object")for(let[s,n]of Object.entries(e.data)){let r=this.#e.elements.namedItem(s);if(r)if(r instanceof RadioNodeList)r.value=n;else if(r instanceof HTMLInputElement)if(r.type==="checkbox"){let a=Array.isArray(n)?n:[n];r.checked=a.includes(r.value||"on")}else r.type==="radio"?r.checked=r.value===n:r.value=n;else(r instanceof HTMLSelectElement||r instanceof HTMLTextAreaElement)&&(r.value=n)}typeof e.step=="number"&&e.step>=0&&e.step<this.#t.length&&(this.#i=e.step)}catch{}}#v(){this.#o&&this.#o.removeItem(this.#p)}#A(t){let e=this.#k();this.#i===e.length-1&&(this.#z("wizard:complete"),this.#v())}#b(){this.#s=document.createElement("div"),this.#s.setAttribute("role","status"),this.#s.setAttribute("aria-live","polite"),this.#s.setAttribute("aria-atomic","true"),this.#s.setAttribute("data-wizard-status",""),this.#e.prepend(this.#s)}#y(){let t=this.#e.getAttribute("data-wizard-steps");if(t){this.#r=document.querySelector(t);return}this.#r=this.#e.querySelector("nav.steps")}#w(){if(!this.#r)return;let t=this.#r.querySelector("ol");if(!(!t||t.children.length>0))for(let e of this.#t){let s=e.querySelector("legend"),n=document.createElement("li");n.textContent=s?.textContent||`Step ${this.#t.indexOf(e)+1}`,t.appendChild(n)}}#B(){if(!this.#r)return;let t=Array.from(this.#r.querySelectorAll("ol > li")),e=this.#k(),s=0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n],a=t[s];if(!a)break;if(r.hasAttribute("data-wizard-hidden")){a.setAttribute("hidden","");continue}else a.removeAttribute("hidden");let o=e.indexOf(r);if(a.removeAttribute("data-completed"),a.removeAttribute("aria-current"),a.removeAttribute("aria-disabled"),o<this.#i){a.setAttribute("data-completed",""),this.#N(a,o);let c=a.querySelector("a");if(c){let h=r.querySelector("legend")?.textContent||`Step ${o+1}`;c.setAttribute("aria-label",`Go to ${h} (completed)`)}}else o===this.#i?a.setAttribute("aria-current","step"):a.setAttribute("aria-disabled","true");s++}for(let n of t){if(n.hasAttribute("hidden"))continue;let r=n.querySelector("a, button")||n,a=n.hasAttribute("aria-current");r.setAttribute("tabindex",a?"0":"-1")}}#N(t,e){if(t.hasAttribute("data-wizard-nav-bound"))return;t.setAttribute("data-wizard-nav-bound","");let s=t.querySelector("a, button")||t;s.addEventListener("click",n=>{n.preventDefault(),this.goTo(e)}),s===t&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","0"),t.setAttribute("role","button"),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),this.goTo(e))}))}#S(){let t=this.#e.querySelector("[data-wizard-prev]"),e=this.#e.querySelector("[data-wizard-next]");t?.addEventListener("click",s=>{s.preventDefault(),this.prev()}),e?.addEventListener("click",s=>{s.preventDefault(),this.next()})}#$(){if(this.#e.querySelector("[data-wizard-nav]"))return;let t=document.createElement("nav");t.setAttribute("data-wizard-nav","");let e=document.createElement("button");e.type="button",e.setAttribute("data-wizard-prev",""),e.textContent="Back";let s=document.createElement("button");s.type="button",s.setAttribute("data-wizard-next",""),s.textContent="Next";let n=document.createElement("button");n.type="submit",n.textContent="Submit",t.append(e,s,n),this.#e.appendChild(t)}#D(){this.#r&&this.#r.addEventListener("keydown",t=>{let e=Array.from(this.#r.querySelectorAll("ol > li:not([hidden])")),s=t.target.closest("li"),n=e.indexOf(s);if(n===-1)return;let r;switch(t.key){case"ArrowRight":case"ArrowDown":r=Math.min(n+1,e.length-1);break;case"ArrowLeft":case"ArrowUp":r=Math.max(n-1,0);break;case"Home":r=0;break;case"End":r=e.length-1;break;default:return}t.preventDefault();let a=e[n].querySelector("a, button")||e[n],o=e[r].querySelector("a, button")||e[r];a.setAttribute("tabindex","-1"),o.setAttribute("tabindex","0"),o.focus()})}#k(){return this.#t.filter(t=>!t.hasAttribute("data-wizard-hidden"))}#I(){return this.#k()[this.#i]}#_(){let t=this.#k();this.#t.forEach(n=>{n.removeAttribute("data-wizard-active")});let e=t[this.#i];e&&e.setAttribute("data-wizard-active","");let s=this.#i+1;this.#e.setAttribute("data-wizard-current",String(s)),this.#e.setAttribute("data-wizard-total",String(t.length)),this.#i===t.length-1?this.#e.setAttribute("data-wizard-last",""):this.#e.removeAttribute("data-wizard-last"),this.#F(),this.#B(),this.#a&&this.#T(),this.#L(),this.#C()}#F(){if(!this.#n)return;let t=this.#k();this.#n.max=t.length,this.#n.value=this.#i+1}#T(){let t=`#step=${this.#i+1}`;window.location.hash!==t&&history.replaceState(null,"",t)}#q(){let e=window.location.hash.match(/step=(\d+)/);return e?parseInt(e[1],10)-1:null}#L(){if(!this.#s)return;let s=this.#I()?.querySelector("legend")?.textContent||`Step ${this.#i+1}`,n=this.#k();this.#s.textContent=`Now on step ${this.#i+1} of ${n.length}: ${s}`}#x(){if(this.#c==="none")return!0;let t=this.#I();if(!t||t.hasAttribute("data-wizard-optional"))return!0;let e=t.querySelectorAll("input, select, textarea"),s=!0;for(let n of e){let r=n;if(!r.checkValidity()){r.reportValidity(),s=!1;break}}return s}#M(){this.#t.forEach(e=>{let s=e.getAttribute("data-wizard-if");if(!s)return;this.#P(s)?e.removeAttribute("data-wizard-hidden"):e.setAttribute("data-wizard-hidden","")});let t=this.#k();this.#i>=t.length&&(this.#i=Math.max(0,t.length-1)),this.#_()}#P(t){return t.includes("||")?t.split("||").some(e=>this.#P(e.trim())):t.includes("&&")?t.split("&&").every(e=>this.#V(e.trim())):this.#V(t)}#V(t){let e=t.startsWith("!"),s=e?t.slice(1):t;if(s.includes(":")){let[o,c]=s.split(":"),l=c.startsWith("!"),h=l?c.slice(1):c,d=this.#E(o);return l?d!==h:d===h}let a=!!this.#E(s);return e?!a:a}#E(t){let e=this.#e.elements.namedItem(t);return e?e instanceof RadioNodeList?e.value:e instanceof HTMLInputElement?e.type==="checkbox"?e.checked?e.value||"true":"":e.value:e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement?e.value:"":""}#C(){let t=this.#I();if(!t||!t.hasAttribute("data-wizard-summary"))return;let e=t.querySelectorAll("[data-wizard-field]");if(e.length>0){for(let r of e){let a=r.getAttribute("data-wizard-field");r.textContent=this.#E(a)||"\u2014"}return}let s=t.querySelector("[data-wizard-summary-list]");s||(s=document.createElement("dl"),s.setAttribute("data-wizard-summary-list",""),t.appendChild(s)),s.innerHTML="";let n=new Set;for(let r of this.#t){if(r===t||r.hasAttribute("data-wizard-hidden"))continue;let a=r.querySelectorAll("input, select, textarea");for(let o of a){let c=o.name;if(!c||n.has(c))continue;n.add(c);let l=this.#E(c);if(!l)continue;let h=this.#R(o),d=document.createElement("dt");d.textContent=h||c;let u=document.createElement("dd");u.textContent=l,s.append(d,u)}}}#R(t){if(t.id){let n=this.#e.querySelector(`label[for="${CSS.escape(t.id)}"]`);if(n)return n.textContent.trim()}let e=t.closest("label");if(e){let n=e.cloneNode(!0);n.querySelectorAll("input, select, textarea").forEach(a=>a.remove());let r=n.textContent.trim();if(r)return r}let s=t.closest("form-field");if(s){let n=s.querySelector("label");if(n)return n.textContent.trim()}return""}#z(t,e={}){this.#e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))}goTo(t){let e=this.#k();if(t<0||t>=e.length||t>this.#i&&!this.#x())return!1;let s=this.#i;return this.#i=t,this.#_(),this.#z("wizard:step-change",{from:s,to:t}),this.#m(),!0}next(){let t=this.#k();return this.#i>=t.length-1?!1:this.goTo(this.#i+1)}prev(){return this.#i<=0?!1:this.goTo(this.#i-1)}reset(){this.#i=0,this.#_(),this.#v(),this.#z("wizard:reset")}get currentStep(){return this.#i}get totalSteps(){return this.#k().length}get form(){return this.#e}};typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{As(),Jr()}):(As(),Jr()))});var J=new Map,ge=new Map;var qs=null;function $s(){if(typeof window<"u"&&window.__VB_THEME_BASE)return String(window.__VB_THEME_BASE).replace(/\/$/,"");if(qs)return qs;if(typeof document<"u"){let i=document.querySelectorAll('script[src*="vanilla-breeze"]');for(let t of i){let e=t.getAttribute("src");if(e){let s=e.lastIndexOf("/");if(s!==-1)return e.slice(0,s)}}}return"/cdn"}var na=new Set(["default","a11y-high-contrast","a11y-large-text","a11y-dyslexia","modern","minimal","classic"]),ra=new Set(["kawaii","memphis"]);function ye(i){return ra.has(i)}function aa(i,t){return`${t}/themes/${i}.css`}function Is(i,t){if(!ye(i))return Promise.resolve();if(ge.has(i))return ge.get(i);let e=import(`${t}/packs/${i}.full.js`).catch(()=>{});return ge.set(i,e),e}function oa(i,t){let e=$s(),s=()=>{(ye(t)||i.hasAttribute("data-vb-pack"))&&Is(t,e)};return i.getAttribute("data-vb-theme-state")==="error"?Promise.reject(new Error(`Failed to load theme: ${t}`)):i.getAttribute("data-vb-theme-state")==="ready"||i.sheet?(s(),Promise.resolve()):new Promise((n,r)=>{let a=()=>{i.setAttribute("data-vb-theme-state","ready"),c(),s(),n()},o=()=>{i.setAttribute("data-vb-theme-state","error"),J.delete(t),c(),r(new Error(`Failed to load theme: ${t}`))},c=()=>{i.removeEventListener("load",a),i.removeEventListener("error",o)};i.addEventListener("load",a,{once:!0}),i.addEventListener("error",o,{once:!0})})}async function Ft(i){if(!i||na.has(i))return;if(J.has(i))return J.get(i);if(typeof document<"u"){let s=document.querySelector(`link[data-vb-theme="${i}"]`);if(s){let n=oa(s,i);return J.set(i,n),n}}let t=$s(),e=ye(i)?la(i,t):ca(i,t);return J.set(i,e),e}async function ca(i,t){let e=aa(i,t);return new Promise((s,n)=>{let r=document.querySelector(`link[data-vb-theme-preload="${i}"]`);r&&r.remove();let a=document.createElement("link");a.rel="stylesheet",a.href=e,a.setAttribute("data-vb-theme",i),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready"),s()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),J.delete(i),n(new Error(`Failed to load theme: ${i}`))},document.head.appendChild(a)})}function la(i,t){let e=`${t}/packs/${i}.theme.css`,s=`${t}/packs/${i}.effects.css`;return new Promise((n,r)=>{let a=document.querySelector(`link[data-vb-theme-preload="${i}"]`);a&&a.remove();let o=document.createElement("link");o.rel="stylesheet",o.href=e,o.setAttribute("data-vb-theme",i),o.setAttribute("data-vb-pack",i),o.setAttribute("data-vb-theme-state","loading"),o.onload=()=>{o.setAttribute("data-vb-theme-state","ready");let c=document.createElement("link");c.rel="stylesheet",c.href=s,c.setAttribute("data-vb-pack-effects",i),document.head.appendChild(c),Is(i,t),n()},o.onerror=()=>{o.setAttribute("data-vb-theme-state","error"),o.remove(),J.delete(i),r(new Error(`Failed to load pack: ${i}`))},document.head.appendChild(o)})}var Os=[{id:"default",name:"Default",swatchBg:"#3b82f6",seeds:{}},{id:"ocean",name:"Ocean",swatchBg:"#0891b2",seeds:{"--hue-primary":200,"--hue-secondary":180,"--hue-accent":45,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"45%","--chroma-secondary":.1,"--lightness-accent":"70%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"forest",name:"Forest",swatchBg:"#059669",seeds:{"--hue-primary":145,"--hue-secondary":90,"--hue-accent":30,"--lightness-primary":"45%","--chroma-primary":.15,"--lightness-secondary":"55%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"55%","--chroma-primary":.12}},{id:"sunset",name:"Sunset",swatchBg:"#ea580c",seeds:{"--hue-primary":25,"--hue-secondary":0,"--hue-accent":280,"--lightness-primary":"60%","--chroma-primary":.2,"--lightness-secondary":"55%","--chroma-secondary":.18,"--lightness-accent":"55%","--chroma-accent":.18},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.16}},{id:"rose",name:"Rose",swatchBg:"#e11d48",seeds:{"--hue-primary":350,"--hue-secondary":330,"--hue-accent":200,"--lightness-primary":"55%","--chroma-primary":.18,"--lightness-secondary":"50%","--chroma-secondary":.14,"--lightness-accent":"60%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.14}},{id:"lavender",name:"Lavender",swatchBg:"#a855f7",seeds:{"--hue-primary":280,"--hue-secondary":300,"--hue-accent":60,"--lightness-primary":"55%","--chroma-primary":.14,"--lightness-secondary":"50%","--chroma-secondary":.12,"--lightness-accent":"70%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.12}},{id:"coral",name:"Coral",swatchBg:"#f97316",seeds:{"--hue-primary":15,"--hue-secondary":25,"--hue-accent":180,"--lightness-primary":"60%","--chroma-primary":.18,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"55%","--chroma-accent":.12},seedsDark:{"--lightness-primary":"65%","--chroma-primary":.15}},{id:"slate",name:"Slate",swatchBg:"#64748b",seeds:{"--hue-primary":220,"--hue-secondary":210,"--hue-accent":45,"--lightness-primary":"48%","--chroma-primary":.1,"--lightness-secondary":"45%","--chroma-secondary":.06,"--lightness-accent":"68%","--chroma-accent":.15},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.08}},{id:"emerald",name:"Emerald",swatchBg:"#10b981",seeds:{"--hue-primary":160,"--hue-secondary":140,"--hue-accent":30,"--lightness-primary":"50%","--chroma-primary":.15,"--lightness-secondary":"48%","--chroma-secondary":.12,"--lightness-accent":"65%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"60%","--chroma-primary":.12}},{id:"amber",name:"Amber",swatchBg:"#f59e0b",seeds:{"--hue-primary":45,"--hue-secondary":30,"--hue-accent":240,"--lightness-primary":"60%","--chroma-primary":.16,"--lightness-secondary":"55%","--chroma-secondary":.15,"--lightness-accent":"52%","--chroma-accent":.14},seedsDark:{"--lightness-primary":"68%","--chroma-primary":.14}},{id:"indigo",name:"Indigo",swatchBg:"#6366f1",seeds:{"--hue-primary":250,"--hue-secondary":270,"--hue-accent":35,"--lightness-primary":"48%","--chroma-primary":.18,"--lightness-secondary":"45%","--chroma-secondary":.14,"--lightness-accent":"68%","--chroma-accent":.16},seedsDark:{"--lightness-primary":"62%","--chroma-primary":.14}}],Bs=[{id:"default",name:"Default",hue:210,shape:"balanced",character:"The default",swatchBg:"#3b82f6",tier:"core"},{id:"modern",name:"Modern",hue:270,shape:"rounded",character:"Vibrant & elevated",swatchBg:"#6366f1",tier:"core"},{id:"minimal",name:"Minimal",hue:240,shape:"sharp",character:"Clean & flat",swatchBg:"#71717a",tier:"core"},{id:"classic",name:"Classic",hue:220,shape:"subtle",character:"Serif & elegant",swatchBg:"#92400e",tier:"core"}],ve=[{id:"swiss",name:"Swiss",icon:"grid-3x3",character:"Precision grid",swatchBg:"#ff3e00",swatchFg:"white",tier:"showcase",category:"Design"},{id:"brutalist",name:"Brutalist",icon:"square",character:"Raw, industrial",swatchBg:"#1a1a1a",swatchFg:"#f5f5f5",tier:"showcase",category:"Design"},{id:"art-deco",name:"Art Deco",icon:"crown",character:"1920s luxury",swatchBg:"#1A1A1A",swatchFg:"#C9A84C",tier:"showcase",category:"Design"},{id:"editorial",name:"Editorial",icon:"newspaper",character:"Magazine elegance",swatchBg:"#1a1a1a",swatchFg:"#c9a227",tier:"showcase",category:"Content"},{id:"genai",name:"GenAI",icon:"sparkles",character:"AI aesthetic",swatchBg:"#1a0a2e",swatchFg:"#a855f7",tier:"showcase",category:"Modern"},{id:"glassmorphism",name:"Glass",icon:"glass-water",character:"Frosted surfaces",swatchBg:"#667eea",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"startup",name:"Startup",icon:"rocket",character:"SaaS energy",swatchBg:"#4f46e5",swatchFg:"#ffffff",tier:"showcase",category:"Modern"},{id:"organic",name:"Organic",icon:"leaf",character:"Natural, handcrafted",swatchBg:"#2d5016",swatchFg:"#faf5e6",tier:"showcase",category:"Creative"},{id:"rough",name:"Rough",icon:"pencil",character:"Hand-drawn sketch",swatchBg:"#f5f0e8",swatchFg:"#3a3a3a",tier:"showcase",category:"Creative"},{id:"cyber",name:"Cyber",icon:"zap",character:"Neon futuristic",swatchBg:"#0a0a1a",swatchFg:"#00ff88",tier:"showcase",category:"Creative"},{id:"vaporwave",name:"Vaporwave",icon:"radio",character:"Neon dreamy",swatchBg:"#2b0040",swatchFg:"#ff6ad5",tier:"showcase",category:"Aesthetic"},{id:"neumorphism",name:"Neumorph",icon:"circle",character:"Soft embossed",swatchBg:"#e0e0e0",swatchFg:"#a0a0a0",tier:"showcase",category:"Aesthetic"},{id:"bauhaus",name:"Bauhaus",icon:"shapes",character:"Geometric",swatchBg:"#F1FAEE",swatchFg:"#E63946",tier:"showcase",category:"Aesthetic"},{id:"claymorphism",name:"Clay",icon:"circle-dot",character:"Puffy 3D",swatchBg:"#f0f0f5",swatchFg:"#FF6B9D",tier:"showcase",category:"Aesthetic"},{id:"alpha1999",name:"Alpha1999",icon:"orbit",character:"Space retro-fi",swatchBg:"#0a0a14",swatchFg:"#d4880f",tier:"showcase",category:"Signature"},{id:"super2026",name:"Super2026",icon:"triangle",character:"Supergraphic bold",swatchBg:"#f5f0e6",swatchFg:"#c23616",tier:"showcase",category:"Signature"},{id:"magna",name:"Magna",icon:"orbit",character:"Odyssey 2 retro",swatchBg:"#0d0b14",swatchFg:"#f97316",tier:"showcase",category:"Signature"},{id:"win9x",name:"Win9x",icon:"monitor",character:"Classic desktop",swatchBg:"#008080",swatchFg:"#c0c0c0",tier:"showcase",category:"OS Styles"},{id:"nes",name:"NES",icon:"joystick",character:"Console pixels",swatchBg:"#bcbcbc",swatchFg:"#e40521",tier:"showcase",category:"OS Styles"},{id:"8bit",name:"8-Bit",icon:"gamepad-2",character:"Retro pixel art",swatchBg:"#000080",swatchFg:"#ffff00",tier:"showcase",category:"OS Styles"}],we=[{id:"nord",name:"Nord",icon:"snowflake",character:"Arctic calm",swatchBg:"#2E3440",swatchFg:"#81A1C1",tier:"community",category:"Editor Palettes"},{id:"solarized",name:"Solarized",icon:"sun-dim",character:"Engineered precision",swatchBg:"#002B36",swatchFg:"#268BD2",tier:"community",category:"Editor Palettes"},{id:"dracula",name:"Dracula",icon:"moon-star",character:"Dark elegance",swatchBg:"#282A36",swatchFg:"#BD93F9",tier:"community",category:"Editor Palettes"},{id:"catppuccin-mocha",name:"Catppuccin",icon:"coffee",character:"Warm pastels",swatchBg:"#1E1E2E",swatchFg:"#CBA6F7",tier:"community",category:"Editor Palettes"},{id:"catppuccin-latte",name:"Ctp Latte",icon:"coffee",character:"Cozy daytime",swatchBg:"#eff1f5",swatchFg:"#8839ef",tier:"community",category:"Editor Palettes"},{id:"catppuccin-frappe",name:"Ctp Frapp\xE9",icon:"coffee",character:"Cool twilight",swatchBg:"#303446",swatchFg:"#ca9ee6",tier:"community",category:"Editor Palettes"},{id:"catppuccin-macchiato",name:"Ctp Macchiato",icon:"coffee",character:"Deep blue",swatchBg:"#24273a",swatchFg:"#c6a0f6",tier:"community",category:"Editor Palettes"},{id:"gruvbox",name:"Gruvbox",icon:"palette",character:"Retro warmth",swatchBg:"#282828",swatchFg:"#ebdbb2",tier:"community",category:"Editor Palettes"},{id:"tokyo-night",name:"Tokyo Night",icon:"moon",character:"Night-owl vibes",swatchBg:"#1a1b26",swatchFg:"#7aa2f7",tier:"community",category:"Editor Palettes"},{id:"rose-pine",name:"Ros\xE9 Pine",icon:"flower-2",character:"Muted elegance",swatchBg:"#191724",swatchFg:"#ebbcba",tier:"community",category:"Editor Palettes"},{id:"cottagecore",name:"Cottagecore",icon:"flower-2",character:"Pastoral",swatchBg:"#fdf8f0",swatchFg:"#7d8c6d",tier:"community",category:"Niche"},{id:"terminal",name:"Terminal",icon:"terminal",character:"Retro CRT",swatchBg:"#0d1117",swatchFg:"#00ff00",tier:"community",category:"Niche"},{id:"clinical",name:"Clinical",icon:"heart-pulse",character:"Sterile precision",swatchBg:"#ffffff",swatchFg:"#0077b6",tier:"community",category:"Industry"},{id:"financial",name:"Financial",icon:"landmark",character:"Navy + gold",swatchBg:"#1b2a4a",swatchFg:"#c9a84c",tier:"community",category:"Industry"},{id:"government",name:"Government",icon:"shield",character:"Official",swatchBg:"#002868",swatchFg:"#bf0a30",tier:"community",category:"Industry"},{id:"dawn",name:"Dawn",icon:"sunrise",character:"Golden morning",swatchBg:"#fef3e2",swatchFg:"#d4a574",tier:"community",category:"Mood/Time"},{id:"dusk",name:"Dusk",icon:"sunset",character:"Twilight",swatchBg:"#1a1b2e",swatchFg:"#e5a858",tier:"community",category:"Mood/Time"},{id:"midnight",name:"Midnight",icon:"moon",character:"Deep night",swatchBg:"#0d1117",swatchFg:"#58a6ff",tier:"community",category:"Mood/Time"},{id:"high-noon",name:"High Noon",icon:"sun",character:"Maximum bright",swatchBg:"#ffffff",swatchFg:"#e63946",tier:"community",category:"Mood/Time"}],Ps=[{id:"kawaii",name:"Kawaii",icon:"heart",character:"Cute aesthetic",swatchBg:"#ffb7c5",swatchFg:"#ff69b4",tier:"showcase",category:"Packs"},{id:"memphis",name:"Memphis",icon:"star",character:"Bold patterns",swatchBg:"#FFF8F0",swatchFg:"#d03040",tier:"showcase",category:"Packs"}];var hl=[...ve,...we],dl=[...Bs,...ve,...we,...Ps],Z=i=>ve.filter(t=>t.category===i),Fs=[{label:"Style",themes:Bs,tier:"core"},{label:"Design",themes:Z("Design"),tier:"showcase"},{label:"Content",themes:Z("Content"),tier:"showcase"},{label:"Modern",themes:Z("Modern"),tier:"showcase"},{label:"Creative",themes:Z("Creative"),tier:"showcase"},{label:"Aesthetic",themes:Z("Aesthetic"),tier:"showcase"},{label:"Signature",themes:Z("Signature"),tier:"showcase"},{label:"OS Styles",themes:Z("OS Styles"),tier:"showcase"},{label:"Packs",themes:Ps,tier:"showcase"},{label:"More Themes",themes:we,tier:"community"}];W();var Ae="theme",Se="current",ct={mode:"auto",brand:"default",accent:"default",borderStyle:"",iconSet:"",fluid:"",backdrop:"",backdropChrome:"",pageBgType:"",pageBgColor:"",pageBgGradStart:"",pageBgGradEnd:"",pageBgGradDir:""},Vs=["--hue-primary","--hue-secondary","--hue-accent","--lightness-primary","--chroma-primary","--lightness-secondary","--chroma-secondary","--lightness-accent","--chroma-accent"],k=null,S={_initPromise:null,async init(){return this._initPromise?this._initPromise:(this._initPromise=(async()=>{let i=await w.get(Ae,Se);k=i?{...ct,...i}:{...ct};try{await Ft(k.brand)}catch{k.brand="default"}return this.apply(k),this._watchSystemPreference(),this._watchRootAttributes(),k})(),this._initPromise)},load(){return k?{...k}:{...ct}},save(i){let t={...k??ct,...i};return k=t,w.set(Ae,Se,t).catch(()=>{}),t},apply({mode:i="auto",brand:t="default",borderStyle:e="",iconSet:s="",fluid:n="",backdrop:r="",backdropChrome:a="",pageBgType:o="",pageBgColor:c="",pageBgGradStart:l="",pageBgGradEnd:h="",pageBgGradDir:d=""}={}){let u=document.documentElement;u.dataset.mode=i==="auto"?this.getEffectiveMode():i;let y=(u.dataset.theme||"").split(" ").filter(q=>q.startsWith("a11y-")),p=t!=="default"?[t,...y]:[...y];p.length?u.dataset.theme=p.join(" "):delete u.dataset.theme;let E=e||this._readCSSHint("--theme-border-style");E&&E!=="clean"?u.dataset.borderStyle=E:delete u.dataset.borderStyle;let v=s||this._readCSSHint("--theme-icon-set");if(v&&v!=="lucide"?u.dataset.iconSet=v:delete u.dataset.iconSet,n?u.dataset.fluid=n:delete u.dataset.fluid,r?u.dataset.backdrop=r:delete u.dataset.backdrop,a&&a!=="card"?u.dataset.backdropChrome=a:delete u.dataset.backdropChrome,o==="color"&&c)u.style.setProperty("--page-bg-color",c),u.style.removeProperty("--page-bg-gradient");else if(o==="gradient"&&l&&h){let q=d||"to bottom";u.style.setProperty("--page-bg-gradient",`linear-gradient(${q}, ${l}, ${h})`),u.style.removeProperty("--page-bg-color")}else u.style.removeProperty("--page-bg-color"),u.style.removeProperty("--page-bg-gradient");let T=this.load().accent||"default";this._applyAccent(T),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{mode:i,brand:t,accent:T,borderStyle:E,iconSet:v,fluid:n,backdrop:r,backdropChrome:a,pageBgType:o,effectiveMode:this.getEffectiveMode()}}))},setMode(i){let t=this.save({mode:i});this.apply(t)},async setBrand(i){try{await Ft(i)}catch(e){console.warn(`[VB] Theme "${i}" failed to load, using default`,e),i="default"}let t=this.save({brand:i});this.apply(t)},setAccent(i){this.save({accent:i}),this._applyAccent(i),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}}))},setBorderStyle(i){let t=this.save({borderStyle:i});this.apply(t)},setIconSet(i){let t=this.save({iconSet:i});this.apply(t)},setFluid(i){let t=this.save({fluid:i});this.apply(t)},setBackdrop(i){let t=this.save({backdrop:i});this.apply(t)},setBackdropChrome(i){let t=this.save({backdropChrome:i});this.apply(t)},setPageBg({type:i="",color:t="",gradStart:e="",gradEnd:s="",gradDir:n=""}={}){let r=this.save({pageBgType:i,pageBgColor:t,pageBgGradStart:e,pageBgGradEnd:s,pageBgGradDir:n});this.apply(r)},getEffectiveMode(){let{mode:i}=this.load();return i!=="auto"?i:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},getState(){let{mode:i,brand:t,accent:e,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:l,pageBgGradStart:h,pageBgGradEnd:d,pageBgGradDir:u}=this.load();return{mode:i,brand:t,accent:e,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:l,pageBgGradStart:h,pageBgGradEnd:d,pageBgGradDir:u,effectiveMode:this.getEffectiveMode()}},toggleMode(){let t=this.getEffectiveMode()==="dark"?"light":"dark";this.setMode(t)},reset(){k={...ct},w.remove(Ae,Se).catch(()=>{});let i=document.documentElement;i.style.removeProperty("--page-bg-color"),i.style.removeProperty("--page-bg-gradient");for(let t of Vs)i.style.removeProperty(t);this.apply(ct)},_readCSSHint(i){return getComputedStyle(document.documentElement).getPropertyValue(i).trim()},_applyAccent(i){let t=document.documentElement,e=Os.find(s=>s.id===i);for(let s of Vs)t.style.removeProperty(s);if(!(!e||!e.seeds||Object.keys(e.seeds).length===0)){for(let[s,n]of Object.entries(e.seeds))t.style.setProperty(s,String(n));if(e.seedsDark&&this.getEffectiveMode()==="dark")for(let[s,n]of Object.entries(e.seedsDark))t.style.setProperty(s,String(n))}},_watchRootAttributes(){this._rootObserver||(this._rootObserver=new MutationObserver(i=>{for(let t of i)t.attributeName==="data-theme"?this._syncFromDataTheme():t.attributeName==="data-mode"&&this._syncFromDataMode()}),this._rootObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","data-mode"]}))},_syncFromDataTheme(){if(!k)return;let e=(document.documentElement.dataset.theme||"").split(/\s+/).filter(Boolean).find(s=>!s.startsWith("a11y-"))||"default";e!==k.brand&&(k.brand=e,Ft(e).catch(()=>{}),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_syncFromDataMode(){if(!k)return;let i=document.documentElement.dataset.mode||"auto",t=k.mode==="auto"?this.getEffectiveMode():k.mode;i!==t&&(k.mode=i,window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_watchSystemPreference(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{let t=this.load();t.mode==="auto"&&this.apply(t)})}};var da=["layout-text","layout-reel","layout-canvas","dl-item"];da.forEach(i=>{customElements.get(i)||customElements.define(i,class extends HTMLElement{})});var vl=window.matchMedia("(prefers-reduced-motion: reduce)");var zs=new Map;function f(i,t,e={}){let s=e.priority??10,n={impl:t,bundle:e.bundle,contract:e.contract,priority:s},r=zs.get(i);if(customElements.get(i)){if(!r||r.priority>=s){r&&r.priority===s&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=s){r.priority===s&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${r.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}zs.set(i,n),customElements.define(i,t)}var m=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,s,n){t.addEventListener(e,s,n),this.#e.push(()=>t.removeEventListener(e,s,n))}setup(){}teardown(){}};var ua=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],Ce=class extends m{#e=null;#t=null;#i=!1;setup(){if(this.#e=this.querySelector("input, textarea, select"),this.#t=this.querySelector("output.error")??this.querySelector("output:not(.hint)"),!this.#e)return!1;this.listen(this.#e,"blur",()=>this.validate()),this.listen(this.#e,"input",()=>{this.#i&&this.validate()})}teardown(){this.#e=null,this.#t=null,this.#i=!1}validate(){let t=this.#e;if(!t)return!0;t.validity.customError||t.setCustomValidity("");let e=t.checkValidity();return e?(this.#n(t.value?"valid":null),t.removeAttribute("aria-invalid"),this.#t&&(this.#t.textContent="")):(this.#i=!0,this.#n("invalid"),t.setAttribute("aria-invalid","true"),this.#s(t.validity)),e}setError(t){this.#e&&(this.#e.setCustomValidity(t),this.#i=!0,this.#n("invalid"),this.#e.setAttribute("aria-invalid","true"),this.#t&&(this.#t.textContent=t))}clearError(){this.#e&&(this.#e.setCustomValidity(""),this.#n(null),this.#e.removeAttribute("aria-invalid"),this.#i=!1,this.#t&&(this.#t.textContent=""))}get fieldName(){return this.querySelector("label")?.textContent?.trim()??this.#e?.getAttribute("aria-label")??this.#e?.name??this.#e?.id??"Field"}get input(){return this.#e}#n(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#s(t){if(!this.#t)return;let e=this.#e;for(let s of ua){if(!t[s])continue;let n=`data-message-${s.toLowerCase()}`,r=e.getAttribute(n)??e.validationMessage;this.#t.textContent=r;return}}};f("form-field",Ce);function P(i){return document.startViewTransition?document.startViewTransition(i):i()}var pa=0,ke=class extends m{#e=[];#t=[];#i=!1;#n=0;setup(){if(this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0)return!1;this.#a(),this.#c(),this.#s()}teardown(){this.#e=[],this.#t=[],this.#i=!1}#s(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#i=!0;let t=++pa,e=this.getAttribute("transition")||"fade",s=e==="slide"?"vt-tabs-slide":e==="scale"?"vt-tabs-scale":"vt-tabs";this.#e.forEach(n=>{let r=n.querySelector(":scope > :not(summary)");r&&(r.style.viewTransitionName=`tabs-${t}`,r.style.viewTransitionClass=s)}),this.#n=this.#e.findIndex(n=>n.open),this.#n===-1&&(this.#n=0)}#r(t){if(t===this.#n)return;let e=t>this.#n?"forward":"backward";document.documentElement.dataset.vtDirection=e,P(()=>{this.#e[t].open=!0}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}#a(){this.#e.forEach((t,e)=>{let s=this.#t[e],n=t.querySelector(":scope > :not(summary)");if(!s||!n)return;let r=s.id||`tab-${crypto.randomUUID().slice(0,8)}`,a=n.id||`panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,s.setAttribute("aria-controls",a),s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-selected",t.open?"true":"false"),n.id=a,n.setAttribute("aria-labelledby",r),this.listen(s,"click",o=>{this.#i&&(o.preventDefault(),this.#r(e))}),this.listen(s,"keydown",o=>this.#h(o,e)),this.listen(t,"toggle",()=>this.#o(e))})}#c(){!this.#e.some(e=>e.open)&&this.#e.length>0&&(this.#e[0].open=!0,this.#p())}#o(t){this.#e[t].open&&(this.#n=t),this.#p(),this.dispatchEvent(new CustomEvent("tab-set:change",{detail:{index:t},bubbles:!0}))}#p(){this.#e.forEach((t,e)=>{let s=this.#t[e];s.setAttribute("tabindex",t.open?"0":"-1"),s.setAttribute("aria-selected",t.open?"true":"false")})}#h(t,e){let{key:s}=t,n;switch(s){case"ArrowRight":n=(e+1)%this.#e.length;break;case"ArrowLeft":n=(e-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#i?this.#r(n):this.#e[n].open=!0,this.#t[n].focus()}};f("tab-set",ke);var xe=class i extends m{static#e=0;#t;#i=[];#n="Back to content";setup(){this.#t=++i.#e,this.hasAttribute("data-back-label")&&(this.#n=this.getAttribute("data-back-label")??this.#n),this.#s(),this.getAttribute("data-mode")==="sidenotes"?this.#c():this.#r()}#s(){let t=[...document.querySelectorAll("foot-note:not([data-enhanced])")];this.#i=t.filter(e=>this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}#r(){if(this.#i.length===0)return;let t=document.createElement("ol");this.#i.forEach((e,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;this.#a(e,n,r,a);let o=this.#p(e,n,r,a);t.appendChild(o)}),this.appendChild(t)}#a(t,e,s,n){t.setAttribute("data-enhanced",""),t.id=s;let r=t.innerHTML,a=document.createElement("span");a.innerHTML=r;let o=document.createElement("a");o.href=`#${n}`,o.setAttribute("aria-describedby",n),o.textContent=`[${e}]`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#c(){if(this.#i.length===0)return;let t=[];if(this.#i.forEach((e,s)=>{let n=s+1,r=`fnref-${this.#t}-${n}`,a=`fn-${this.#t}-${n}`;e.getAttribute("data-side")==="false"?(this.#a(e,n,r,a),t.push({ref:e,num:n,refId:r,noteId:a})):this.#o(e,n,r,a)}),t.length>0){let e=document.createElement("ol");for(let{ref:s,num:n,refId:r,noteId:a}of t)e.appendChild(this.#p(s,n,r,a));this.appendChild(e)}else this.hidden=!0}#o(t,e,s,n){let r=t.innerHTML;t.setAttribute("data-enhanced",""),t.setAttribute("data-side",""),t.id=s;let a=document.createElement("a");a.href=`#${n}`,a.setAttribute("aria-describedby",n),a.textContent=`[${e}]`;let o=document.createElement("aside");o.className="sidenote",o.id=n,o.setAttribute("role","note"),o.innerHTML=`<span class="sidenote-number">${e}.</span> ${r}`,t.innerHTML="",t.appendChild(a),t.appendChild(o)}#p(t,e,s,n){let r=document.createElement("li");r.id=n;let a=t.querySelector("span"),o=a?a.innerHTML:"",c=document.createElement("a");return c.href=`#${s}`,c.setAttribute("data-backref",""),c.setAttribute("aria-label",this.#n),c.textContent="\u21A9",r.innerHTML=o+" ",r.appendChild(c),r}},Te=class extends HTMLElement{};f("foot-notes",xe);f("foot-note",Te);var fa=0,Le=class extends m{#e=[];#t=[];#i=[];#n=!1;setup(){if(this.#e=[...this.querySelectorAll(":scope > details")],this.#t=this.#e.map(t=>t.querySelector("summary")),this.#e.length===0)return!1;this.#s(),this.#c(),this.#r()}teardown(){this.#e=[],this.#t=[],this.#i=[],this.#n=!1}#s(){this.#i=this.#e.map(t=>{let e=t.querySelector("summary");if(!e)return null;let s=[...t.children].filter(n=>n!==e);if(s.length===1)return s[0];if(s.length>1){let n=document.createElement("div");for(let r of s)n.appendChild(r);return t.appendChild(n),n}return null})}#r(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#n=!0;let t=++fa,e=this.getAttribute("transition")||"fade",s=e==="slide"?"vt-accordion-slide":e==="scale"?"vt-accordion-scale":"vt-accordion";this.#i.forEach((n,r)=>{n&&(n.style.viewTransitionName=`accordion-${t}-${r}`,n.style.viewTransitionClass=s)})}#a(t){P(()=>{t.open=!t.open})}#c(){this.#e.forEach((t,e)=>{let s=this.#t[e],n=this.#i[e];if(s){if(n){let r=s.id||`accordion-heading-${crypto.randomUUID().slice(0,8)}`,a=n.id||`accordion-panel-${crypto.randomUUID().slice(0,8)}`;s.id=r,n.id=a,s.setAttribute("aria-expanded",t.open?"true":"false"),s.setAttribute("aria-controls",a),n.setAttribute("aria-labelledby",r),n.setAttribute("role","region")}else s.setAttribute("aria-expanded",t.open?"true":"false");this.listen(s,"click",r=>{this.#n&&(r.preventDefault(),this.#a(t))}),this.listen(s,"keydown",r=>this.#p(r,e)),this.listen(t,"toggle",()=>this.#o(t,e))}})}#o(t,e){this.#t[e].setAttribute("aria-expanded",t.open?"true":"false"),this.hasAttribute("single")&&t.open&&this.#e.forEach((n,r)=>{r!==e&&n.open&&(n.open=!1,this.#t[r].setAttribute("aria-expanded","false"))}),this.dispatchEvent(new CustomEvent("accordion-wc:toggle",{detail:{index:e,open:t.open},bubbles:!0}))}#p(t,e){let{key:s}=t,n;switch(s){case"ArrowDown":n=(e+1)%this.#e.length;break;case"ArrowUp":n=(e-1+this.#e.length)%this.#e.length;break;case"Home":n=0;break;case"End":n=this.#e.length-1;break;default:return}t.preventDefault(),this.#t[n].focus()}open(t){t<0||t>=this.#e.length||(this.#n&&!this.#e[t].open?P(()=>{this.#e[t].open=!0}):this.#e[t].open=!0)}close(t){t<0||t>=this.#e.length||(this.#n&&this.#e[t].open?P(()=>{this.#e[t].open=!1}):this.#e[t].open=!1)}toggle(t){t<0||t>=this.#e.length||(this.#n?this.#a(this.#e[t]):this.#e[t].open=!this.#e[t].open)}openAll(){this.hasAttribute("single")||this.#e.forEach(t=>{t.open=!0})}closeAll(){this.#e.forEach(t=>{t.open=!1})}};f("accordion-wc",Le);var Me=class extends m{#e=[];#t=[];static get observedAttributes(){return["position","max"]}setup(){this.setAttribute("role","region"),this.setAttribute("aria-label","Notifications"),this.setAttribute("aria-live","polite")}teardown(){this.#t.forEach(t=>{t._dismissTimer&&clearTimeout(t._dismissTimer)}),this.#e=[],this.#t=[]}show(t){let{message:e,variant:s="info",duration:n=this.#r(),dismissible:r=!0,action:a,onAction:o}=t,c=this.#i({message:e,variant:s,dismissible:r,action:a,onAction:o}),l=this.#a();return this.#t.length>=l?this.#e.push({toast:c,duration:n}):this.#n(c,n),c}#i({message:t,variant:e,dismissible:s,action:n,onAction:r}){let a=document.createElement("div");a.className="toast",a.setAttribute("role",e==="error"||e==="warning"?"alert":"status"),a.setAttribute("data-variant",e);let o={info:"&#9432;",success:"&#10003;",warning:"&#9888;",error:"&#10007;"};return a.innerHTML=`
2
3
  <span class="icon" aria-hidden="true">${o[e]||o.info}</span>
3
4
  <span class="message">${this.#c(t)}</span>
4
5
  ${n?`<button type="button" class="action">${this.#c(n)}</button>`:""}
5
- ${i?'<button type="button" class="close" aria-label="Dismiss">&#x2715;</button>':""}
6
- `,i&&a.querySelector(".close")?.addEventListener("click",()=>{this.#i(a)}),n&&r&&a.querySelector(".action")?.addEventListener("click",()=>{r(),this.#i(a)}),a}#r(t,e){this.appendChild(t),this.#t.push(t),requestAnimationFrame(()=>{t.setAttribute("data-state","visible")}),e>0&&(t._dismissTimer=setTimeout(()=>{this.#i(t)},e)),this.dispatchEvent(new CustomEvent("toast-msg:show",{bubbles:!0,detail:{toast:t}}))}#i(t){if(!this.contains(t))return;t._dismissTimer&&clearTimeout(t._dismissTimer),t.setAttribute("data-state","hiding");let e=()=>{t.removeEventListener("animationend",e),t.remove();let i=this.#t.indexOf(t);if(i>-1&&this.#t.splice(i,1),this.#e.length>0){let{toast:n,duration:r}=this.#e.shift();this.#r(n,r)}this.dispatchEvent(new CustomEvent("toast-msg:hide",{bubbles:!0,detail:{toast:t}}))};t.addEventListener("animationend",e),setTimeout(()=>{this.contains(t)&&e()},300)}dismissAll(){this.#e=[],[...this.#t].forEach(t=>this.#i(t))}#n(){let t=this.getAttribute("duration");return t!==null?parseInt(t,10):5e3}#a(){let t=this.getAttribute("max");return t!==null?parseInt(t,10):5}#c(t){let e=document.createElement("div");return e.textContent=t,e.innerHTML}};b("toast-msg",Kt);var Bs=CSS.supports("anchor-name","--test"),Tn=new Set(["BUTTON","A","AREA"]);function _s(s){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?Tn.has(s.tagName):!1}var Xt=class extends g{#e;#t;#s;#r;#i=!Bs;#n=!1;#a=!1;#c;setup(){this.#n=this.getAttribute("variant")==="card",this.#n?this.#u():this.#o()}#o(){if(this.#e=this.querySelector(":scope > :not(template)"),!this.#e)return;this.#a=_s(this.#e);let t=this.querySelector(":scope > template[data-tooltip]"),e=this.getAttribute("content"),i=this.#e.getAttribute("title");if(!t&&!e&&!i)return;i&&(this.#c=i,this.#e.removeAttribute("title")),this.#t=document.createElement("div"),this.#t.className="tooltip",this.#t.setAttribute("role","tooltip"),this.#t.setAttribute("popover","hint"),t?this.#t.innerHTML=t.innerHTML:this.#t.textContent=e||i,this.#t.id=`tooltip-${crypto.randomUUID().slice(0,8)}`;let n=this.getAttribute("position")||"top";this.#t.dataset.tooltipPosition=n;let r=document.createElement("span");if(r.className="tooltip-arrow",r.setAttribute("aria-hidden","true"),this.#t.appendChild(r),this.appendChild(this.#t),Bs){let a=`--tooltip-anchor-${this.#t.id}`;this.#e.style.anchorName=a,this.#t.style.positionAnchor=a,this.#t.setAttribute("data-anchor","")}this.#a?(this.#e.setAttribute("interestfor",this.#t.id),this.#e.hasAttribute("aria-describedby")||this.#e.setAttribute("aria-describedby",this.#t.id),this.#i&&this.listen(this.#t,"toggle",this.#h)):(this.#e.setAttribute("aria-describedby",this.#t.id),this.listen(this.#e,"mouseenter",this.#p),this.listen(this.#e,"mouseleave",this.#d),this.listen(this.#e,"focus",this.#l),this.listen(this.#e,"blur",this.#f),this.listen(this.#t,"mouseenter",this.#b),this.listen(this.#t,"mouseleave",this.#d))}#u(){this.#e=this.querySelector(":scope > [data-trigger]");let t=this.querySelector(":scope > [data-content]");!this.#e||!t||(this.#a=_s(this.#e),this.#t=document.createElement("div"),this.#t.className="hover-card",this.#t.setAttribute("popover","manual"),this.#t.id=`hc-${crypto.randomUUID().slice(0,8)}`,this.#t.appendChild(t),t.removeAttribute("data-content"),t.hidden=!1,this.appendChild(this.#t),this.#a?(this.#e.setAttribute("interestfor",this.#t.id),this.listen(this.#t,"toggle",this.#h)):(this.listen(this.#e,"mouseenter",this.#p),this.listen(this.#e,"mouseleave",this.#d),this.listen(this.#e,"focus",this.#l),this.listen(this.#e,"blur",this.#d),this.listen(this.#t,"mouseenter",this.#b),this.listen(this.#t,"mouseleave",this.#d),this.listen(document,"keydown",this.#g)))}teardown(){this.#e&&(this.#a&&this.#e.removeAttribute("interestfor"),this.#c&&(this.#e.setAttribute("title",this.#c),this.#c=void 0)),this.#t&&(this.#t.remove(),this.#t=null),clearTimeout(this.#s),clearTimeout(this.#r)}#h=t=>{t.newState==="open"?(this.#n?this.#S():this.#i&&this.#y(),this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))):this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))};#p=()=>{clearTimeout(this.#r);let t=this.#n?300:200,e=parseInt(this.getAttribute("delay")||String(t),10);this.#s=setTimeout(()=>this.show(),e)};#d=()=>{clearTimeout(this.#s);let t=this.#n?200:100;this.#r=setTimeout(()=>this.hide(),t)};#l=()=>{clearTimeout(this.#r),this.show()};#f=()=>{clearTimeout(this.#s),this.hide()};#b=()=>{clearTimeout(this.#r)};#g=t=>{t.key==="Escape"&&this.isVisible&&this.hide()};show(){!this.#t||this.isVisible||(this.#t.showPopover(),this.#n?this.#S():this.#i&&this.#y(),this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0})))}hide(){!this.#t||!this.isVisible||(this.#t.hidePopover(),this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0})))}#y(){if(!this.#e||!this.#t)return;let t=this.#e.getBoundingClientRect(),e=this.#t.getBoundingClientRect(),i=this.getAttribute("position")||"top",n=8,r,a;switch(i){case"bottom":r=t.bottom+n,a=t.left+(t.width-e.width)/2;break;case"left":r=t.top+(t.height-e.height)/2,a=t.left-e.width-n;break;case"right":r=t.top+(t.height-e.height)/2,a=t.right+n;break;default:r=t.top-e.height-n,a=t.left+(t.width-e.width)/2;break}let o=8;a=Math.max(o,Math.min(a,window.innerWidth-e.width-o)),r=Math.max(o,Math.min(r,window.innerHeight-e.height-o)),this.#t.style.top=`${r}px`,this.#t.style.left=`${a}px`}#S(){if(!this.#e||!this.#t)return;let t=this.#e.getBoundingClientRect(),e=this.#t.getBoundingClientRect(),i=this.getAttribute("position")||"bottom",n=8,r=8,a,o;o=t.left+(t.width-e.width)/2,o=Math.max(r,Math.min(o,window.innerWidth-e.width-r)),i==="top"?(a=t.top-e.height-n,a<r&&(a=t.bottom+n)):(a=t.bottom+n,a+e.height>window.innerHeight-r&&(a=t.top-e.height-n)),this.#t.style.position="fixed",this.#t.style.top=`${a}px`,this.#t.style.left=`${o}px`}get isVisible(){return this.#t?.matches(":popover-open")??!1}};b("tool-tip",Xt);var N="popover"in HTMLElement.prototype;var Jt=class extends g{#e;#t;#s=[];#r=-1;#i=!1;#n=!1;#a=null;#c=!1;setup(){if(this.#e=this.querySelector(":scope > [data-trigger]"),this.#e||(this.#e=this.querySelector(":scope > button")),!this.#e||(this.#t=this.querySelector(':scope > menu, :scope > ul[role="menu"]'),!this.#t))return!1;this.#n=this.hasAttribute("hover"),this.#c=N&&!this.#n,this.#c&&this.#t.setAttribute("popover","auto"),this.#e.setAttribute("aria-haspopup","menu"),this.#e.setAttribute("aria-expanded","false"),this.#t.id||(this.#t.id=`dropdown-menu-${crypto.randomUUID().slice(0,8)}`),this.#e.setAttribute("aria-controls",this.#t.id),this.#t.setAttribute("role","menu"),this.#o(),this.#n?(this.listen(this,"mouseenter",this.#h),this.listen(this,"mouseleave",this.#p),this.listen(this.#e,"focus",this.#d),this.listen(this.#e,"blur",this.#l)):this.listen(this.#e,"click",this.#u),this.listen(this.#e,"keydown",this.#f),this.listen(this.#t,"keydown",this.#b),this.#c?this.listen(this.#t,"toggle",this.#S):(this.listen(document,"click",this.#g),this.listen(document,"keydown",this.#y))}teardown(){this.#a&&clearTimeout(this.#a)}#o(){this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.closest('[role="separator"]')),this.#s.forEach((t,e)=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",t.addEventListener("click",this.#m)}),this.#t.querySelectorAll('li:empty, [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")})}#u=t=>{t.stopPropagation(),this.toggle()};#h=()=>{this.#a&&(clearTimeout(this.#a),this.#a=null),this.open()};#p=()=>{this.#a=setTimeout(()=>{this.close()},100)};#d=()=>{this.#a&&(clearTimeout(this.#a),this.#a=null),this.open()};#l=t=>{this.#t?.contains(t.relatedTarget)||(this.#a=setTimeout(()=>{this.contains(document.activeElement)||this.close()},100))};#f=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#v(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#v(this.#s.length-1);break}};#b=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#v(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#v(this.#r-1);break;case"Home":t.preventDefault(),this.#v(0);break;case"End":t.preventDefault(),this.#v(this.#s.length-1);break;case"Tab":this.close();break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break}};#g=t=>{this.#i&&!this.contains(t.target)&&this.close()};#y=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close(),this.#e?.focus())};#S=t=>{t.newState==="closed"&&this.#i&&(this.#i=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#m=t=>{t.defaultPrevented||(this.close(),this.#e?.focus())};#v(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}open(){if(!(this.#i||!this.#t)){if(this.#i=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#r=-1,this.#E(),this.#c)try{this.#t.showPopover()}catch{}this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0}))}}close(){if(!(!this.#i||!this.#t)){if(this.#i=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#c)try{this.#t.hidePopover()}catch{}this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0}))}}toggle(){this.#i?this.close():this.open()}#E(){if(!this.#e||!this.#t)return;let t=this.getAttribute("position")||"bottom-start",e=this.hasAttribute("no-flip"),i=this.#e.getBoundingClientRect(),n=this.#t.getBoundingClientRect(),r=window.innerHeight,a=window.innerWidth,o=4;if(this.#c){let c,l;t.startsWith("top")?(c=i.top-n.height-o,!e&&c<0&&(c=i.bottom+o)):(c=i.bottom+o,!e&&c+n.height>r&&(c=i.top-n.height-o)),t.endsWith("end")?(l=i.right-n.width,l<0&&(l=i.left)):(l=i.left,l+n.width>a&&(l=i.right-n.width)),this.#t.style.setProperty("--dropdown-top",`${Math.max(0,c)}px`),this.#t.style.setProperty("--dropdown-left",`${Math.max(0,l)}px`)}else{let c,l;t.startsWith("top")?(c=-n.height-o,!e&&i.top+c<0&&(c=i.height+o)):(c=i.height+o,!e&&i.bottom+n.height+o>r&&(c=-n.height-o)),t.endsWith("end")?(l=i.width-n.width,i.left+l<0&&(l=0)):(l=0,i.left+n.width>a&&(l=i.width-n.width)),this.#t.style.setProperty("--dropdown-top",`${c}px`),this.#t.style.setProperty("--dropdown-left",`${l}px`)}}get isOpen(){return this.#i}};b("drop-down",Jt);var Os=`
6
+ ${s?'<button type="button" class="close" aria-label="Dismiss">&#x2715;</button>':""}
7
+ `,s&&a.querySelector(".close")?.addEventListener("click",()=>{this.#s(a)}),n&&r&&a.querySelector(".action")?.addEventListener("click",()=>{r(),this.#s(a)}),a}#n(t,e){this.appendChild(t),this.#t.push(t),requestAnimationFrame(()=>{t.setAttribute("data-state","visible")}),e>0&&(t._dismissTimer=setTimeout(()=>{this.#s(t)},e)),this.dispatchEvent(new CustomEvent("toast-msg:show",{bubbles:!0,detail:{toast:t}}))}#s(t){if(!this.contains(t))return;t._dismissTimer&&clearTimeout(t._dismissTimer),t.setAttribute("data-state","hiding");let e=()=>{t.removeEventListener("animationend",e),t.remove();let s=this.#t.indexOf(t);if(s>-1&&this.#t.splice(s,1),this.#e.length>0){let{toast:n,duration:r}=this.#e.shift();this.#n(n,r)}this.dispatchEvent(new CustomEvent("toast-msg:hide",{bubbles:!0,detail:{toast:t}}))};t.addEventListener("animationend",e),setTimeout(()=>{this.contains(t)&&e()},300)}dismissAll(){this.#e=[],[...this.#t].forEach(t=>this.#s(t))}#r(){let t=this.getAttribute("duration");return t!==null?parseInt(t,10):5e3}#a(){let t=this.getAttribute("max");return t!==null?parseInt(t,10):5}#c(t){let e=document.createElement("div");return e.textContent=t,e.innerHTML}};f("toast-msg",Me);var Us=CSS.supports("anchor-name","--test"),ma=new Set(["BUTTON","A","AREA"]);function Ws(i){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?ma.has(i.tagName):!1}var Ne=class extends m{#e;#t;#i;#n;#s=!Us;#r=!1;#a=!1;#c;setup(){this.#r=this.getAttribute("variant")==="card",this.#r?this.#p():this.#o()}#o(){if(this.#e=this.querySelector(":scope > :not(template)"),!this.#e)return;this.#a=Ws(this.#e);let t=this.querySelector(":scope > template[data-tooltip]"),e=this.getAttribute("content"),s=this.#e.getAttribute("title");if(!t&&!e&&!s)return;s&&(this.#c=s,this.#e.removeAttribute("title")),this.#t=document.createElement("div"),this.#t.className="tooltip",this.#t.setAttribute("role","tooltip"),this.#t.setAttribute("popover","hint"),t?this.#t.innerHTML=t.innerHTML:this.#t.textContent=e||s,this.#t.id=`tooltip-${crypto.randomUUID().slice(0,8)}`;let n=this.getAttribute("position")||"top";this.#t.dataset.tooltipPosition=n;let r=document.createElement("span");if(r.className="tooltip-arrow",r.setAttribute("aria-hidden","true"),this.#t.appendChild(r),this.appendChild(this.#t),Us){let a=`--tooltip-anchor-${this.#t.id}`;this.#e.style.anchorName=a,this.#t.style.positionAnchor=a,this.#t.setAttribute("data-anchor","")}this.#a?(this.#e.setAttribute("interestfor",this.#t.id),this.#e.hasAttribute("aria-describedby")||this.#e.setAttribute("aria-describedby",this.#t.id),this.#s&&this.listen(this.#t,"toggle",this.#h)):(this.#e.setAttribute("aria-describedby",this.#t.id),this.listen(this.#e,"mouseenter",this.#f),this.listen(this.#e,"mouseleave",this.#d),this.listen(this.#e,"focus",this.#l),this.listen(this.#e,"blur",this.#u),this.listen(this.#t,"mouseenter",this.#m),this.listen(this.#t,"mouseleave",this.#d))}#p(){this.#e=this.querySelector(":scope > [data-trigger]");let t=this.querySelector(":scope > [data-content]");!this.#e||!t||(this.#a=Ws(this.#e),this.#t=document.createElement("div"),this.#t.className="hover-card",this.#t.setAttribute("popover","manual"),this.#t.id=`hc-${crypto.randomUUID().slice(0,8)}`,this.#t.appendChild(t),t.removeAttribute("data-content"),t.hidden=!1,this.appendChild(this.#t),this.#a?(this.#e.setAttribute("interestfor",this.#t.id),this.listen(this.#t,"toggle",this.#h)):(this.listen(this.#e,"mouseenter",this.#f),this.listen(this.#e,"mouseleave",this.#d),this.listen(this.#e,"focus",this.#l),this.listen(this.#e,"blur",this.#d),this.listen(this.#t,"mouseenter",this.#m),this.listen(this.#t,"mouseleave",this.#d),this.listen(document,"keydown",this.#g)))}teardown(){this.#e&&(this.#a&&this.#e.removeAttribute("interestfor"),this.#c&&(this.#e.setAttribute("title",this.#c),this.#c=void 0)),this.#t&&(this.#t.remove(),this.#t=null),clearTimeout(this.#i),clearTimeout(this.#n)}#h=t=>{t.newState==="open"?(this.#r?this.#A():this.#s&&this.#v(),this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))):this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))};#f=()=>{clearTimeout(this.#n);let t=this.#r?300:200,e=parseInt(this.getAttribute("delay")||String(t),10);this.#i=setTimeout(()=>this.show(),e)};#d=()=>{clearTimeout(this.#i);let t=this.#r?200:100;this.#n=setTimeout(()=>this.hide(),t)};#l=()=>{clearTimeout(this.#n),this.show()};#u=()=>{clearTimeout(this.#i),this.hide()};#m=()=>{clearTimeout(this.#n)};#g=t=>{t.key==="Escape"&&this.isVisible&&this.hide()};show(){!this.#t||this.isVisible||(this.#t.showPopover(),this.#r?this.#A():this.#s&&this.#v(),this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0})))}hide(){!this.#t||!this.isVisible||(this.#t.hidePopover(),this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0})))}#v(){if(!this.#e||!this.#t)return;let t=this.#e.getBoundingClientRect(),e=this.#t.getBoundingClientRect(),s=this.getAttribute("position")||"top",n=8,r,a;switch(s){case"bottom":r=t.bottom+n,a=t.left+(t.width-e.width)/2;break;case"left":r=t.top+(t.height-e.height)/2,a=t.left-e.width-n;break;case"right":r=t.top+(t.height-e.height)/2,a=t.right+n;break;default:r=t.top-e.height-n,a=t.left+(t.width-e.width)/2;break}let o=8;a=Math.max(o,Math.min(a,window.innerWidth-e.width-o)),r=Math.max(o,Math.min(r,window.innerHeight-e.height-o)),this.#t.style.top=`${r}px`,this.#t.style.left=`${a}px`}#A(){if(!this.#e||!this.#t)return;let t=this.#e.getBoundingClientRect(),e=this.#t.getBoundingClientRect(),s=this.getAttribute("position")||"bottom",n=8,r=8,a,o;o=t.left+(t.width-e.width)/2,o=Math.max(r,Math.min(o,window.innerWidth-e.width-r)),s==="top"?(a=t.top-e.height-n,a<r&&(a=t.bottom+n)):(a=t.bottom+n,a+e.height>window.innerHeight-r&&(a=t.top-e.height-n)),this.#t.style.position="fixed",this.#t.style.top=`${a}px`,this.#t.style.left=`${o}px`}get isVisible(){return this.#t?.matches(":popover-open")??!1}};f("tool-tip",Ne);var F="popover"in HTMLElement.prototype;var De=class extends m{#e;#t;#i=[];#n=-1;#s=!1;#r=!1;#a=null;#c=!1;setup(){if(this.#e=this.querySelector(":scope > [data-trigger]"),this.#e||(this.#e=this.querySelector(":scope > button")),!this.#e||(this.#t=this.querySelector(':scope > menu, :scope > ul[role="menu"]'),!this.#t))return!1;this.#r=this.hasAttribute("hover"),this.#c=F&&!this.#r,this.#c&&this.#t.setAttribute("popover","auto"),this.#e.setAttribute("aria-haspopup","menu"),this.#e.setAttribute("aria-expanded","false"),this.#t.id||(this.#t.id=`dropdown-menu-${crypto.randomUUID().slice(0,8)}`),this.#e.setAttribute("aria-controls",this.#t.id),this.#t.setAttribute("role","menu"),this.#o(),this.#r?(this.listen(this,"mouseenter",this.#h),this.listen(this,"mouseleave",this.#f),this.listen(this.#e,"focus",this.#d),this.listen(this.#e,"blur",this.#l)):this.listen(this.#e,"click",this.#p),this.listen(this.#e,"keydown",this.#u),this.listen(this.#t,"keydown",this.#m),this.#c?this.listen(this.#t,"toggle",this.#A):(this.listen(document,"click",this.#g),this.listen(document,"keydown",this.#v))}teardown(){this.#a&&clearTimeout(this.#a)}#o(){this.#i=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.closest('[role="separator"]')),this.#i.forEach((t,e)=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",t.addEventListener("click",this.#b)}),this.#t.querySelectorAll('li:empty, [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")})}#p=t=>{t.stopPropagation(),this.toggle()};#h=()=>{this.#a&&(clearTimeout(this.#a),this.#a=null),this.open()};#f=()=>{this.#a=setTimeout(()=>{this.close()},100)};#d=()=>{this.#a&&(clearTimeout(this.#a),this.#a=null),this.open()};#l=t=>{this.#t?.contains(t.relatedTarget)||(this.#a=setTimeout(()=>{this.contains(document.activeElement)||this.close()},100))};#u=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#y(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#y(this.#i.length-1);break}};#m=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#y(this.#n+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#y(this.#n-1);break;case"Home":t.preventDefault(),this.#y(0);break;case"End":t.preventDefault(),this.#y(this.#i.length-1);break;case"Tab":this.close();break;case"Enter":case" ":t.preventDefault(),this.#n>=0&&this.#i[this.#n].click();break}};#g=t=>{this.#s&&!this.contains(t.target)&&this.close()};#v=t=>{t.key==="Escape"&&this.#s&&(t.preventDefault(),this.close(),this.#e?.focus())};#A=t=>{t.newState==="closed"&&this.#s&&(this.#s=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#n=-1,this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#b=t=>{t.defaultPrevented||(this.close(),this.#e?.focus())};#y(t){this.#i.length!==0&&(t<0&&(t=this.#i.length-1),t>=this.#i.length&&(t=0),this.#n=t,this.#i[t].focus())}open(){if(!(this.#s||!this.#t)){if(this.#s=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#n=-1,this.#w(),this.#c)try{this.#t.showPopover()}catch{}this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0}))}}close(){if(!(!this.#s||!this.#t)){if(this.#s=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#n=-1,this.#c)try{this.#t.hidePopover()}catch{}this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0}))}}toggle(){this.#s?this.close():this.open()}#w(){if(!this.#e||!this.#t)return;let t=this.getAttribute("position")||"bottom-start",e=this.hasAttribute("no-flip"),s=this.#e.getBoundingClientRect(),n=this.#t.getBoundingClientRect(),r=window.innerHeight,a=window.innerWidth,o=4;if(this.#c){let c,l;t.startsWith("top")?(c=s.top-n.height-o,!e&&c<0&&(c=s.bottom+o)):(c=s.bottom+o,!e&&c+n.height>r&&(c=s.top-n.height-o)),t.endsWith("end")?(l=s.right-n.width,l<0&&(l=s.left)):(l=s.left,l+n.width>a&&(l=s.right-n.width)),this.#t.style.setProperty("--dropdown-top",`${Math.max(0,c)}px`),this.#t.style.setProperty("--dropdown-left",`${Math.max(0,l)}px`)}else{let c,l;t.startsWith("top")?(c=-n.height-o,!e&&s.top+c<0&&(c=s.height+o)):(c=s.height+o,!e&&s.bottom+n.height+o>r&&(c=-n.height-o)),t.endsWith("end")?(l=s.width-n.width,s.left+l<0&&(l=0)):(l=0,s.left+n.width>a&&(l=s.width-n.width)),this.#t.style.setProperty("--dropdown-top",`${c}px`),this.#t.style.setProperty("--dropdown-left",`${l}px`)}}get isOpen(){return this.#s}};f("drop-down",De);var js=`
7
8
  :host {
8
9
  display: inline-flex;
9
10
  align-items: center;
@@ -64,12 +65,12 @@ svg {
64
65
  :host([hidden]) {
65
66
  display: none;
66
67
  }
67
- `;var G=new Map,K=new Map,Zt=class s extends HTMLElement{static#e=new Set;static#t=null;static#s(){s.#t||(s.#t=new MutationObserver(t=>{for(let e of t)if(e.attributeName==="data-icon-set")for(let i of s.#e)i.hasAttribute("set")||(i.render(),i.loadIcon())}),s.#t?.observe(document.documentElement,{attributes:!0,attributeFilter:["data-icon-set"]}))}static get observedAttributes(){return["name","set","size","label"]}constructor(){super(),this.attachShadow({mode:"open"})}get name(){return this.getAttribute("name")||""}get set(){return this.getAttribute("set")||document.documentElement.dataset.iconSet||"lucide"}get size(){return this.getAttribute("size")||"md"}get label(){return this.getAttribute("label")}get basePath(){return this.getAttribute("base-path")||document.documentElement.dataset.iconPath||"/cdn/icons"}get iconPath(){return`${this.basePath}/${this.set}/${this.name}.svg`}render(){this.shadowRoot.innerHTML=`
68
- <style>${Os}</style>
68
+ `;var gt=new Map,yt=new Map,_e=class i extends HTMLElement{static#e=new Set;static#t=null;static#i(){i.#t||(i.#t=new MutationObserver(t=>{for(let e of t)if(e.attributeName==="data-icon-set")for(let s of i.#e)s.hasAttribute("set")||(s.render(),s.loadIcon())}),i.#t?.observe(document.documentElement,{attributes:!0,attributeFilter:["data-icon-set"]}))}static get observedAttributes(){return["name","set","size","label"]}constructor(){super(),this.attachShadow({mode:"open"})}get name(){return this.getAttribute("name")||""}get set(){return this.getAttribute("set")||document.documentElement.dataset.iconSet||"lucide"}get size(){return this.getAttribute("size")||"md"}get label(){return this.getAttribute("label")}get basePath(){return this.getAttribute("base-path")||document.documentElement.dataset.iconPath||"/cdn/icons"}get iconPath(){return`${this.basePath}/${this.set}/${this.name}.svg`}render(){this.shadowRoot.innerHTML=`
69
+ <style>${js}</style>
69
70
  <slot></slot>
70
- `}async loadIcon(){if(!this.name){this.setError("No icon name specified");return}let t=`${this.set}/${this.name}`;if(G.has(t)){this.displayIcon(G.get(t));return}try{let e=await this.#r(this.set,t);this.displayIcon(e)}catch(e){let i="lucide";if(this.set!==i){let n=`${i}/${this.name}`;if(G.has(n)){this.displayIcon(G.get(n));return}try{let r=await this.#r(i,n);this.displayIcon(r);return}catch{}}this.setError(e.message)}}async#r(t,e){return K.has(e)||K.set(e,this.#i(t).then(i=>(G.set(e,i),K.delete(e),i)).catch(i=>{throw K.delete(e),i})),K.get(e)}async#i(t){let e=`${this.basePath}/${t}/${this.name}.svg`,i=await fetch(e);if(!i.ok)throw new Error(`Icon not found: ${this.name}`);let n=await i.text();if(!n.includes("<svg"))throw new Error(`Invalid SVG: ${this.name}`);return n}displayIcon(t){let n=new DOMParser().parseFromString(t,"image/svg+xml").querySelector("svg");if(!n){this.setError("Invalid SVG content");return}n.removeAttribute("width"),n.removeAttribute("height"),this.label?(n.setAttribute("role","img"),n.setAttribute("aria-label",this.label)):n.setAttribute("aria-hidden","true"),this.removeAttribute("data-error");let r=this.shadowRoot?.querySelector("slot");r&&r.replaceWith(n)}setError(t){this.setAttribute("data-error","true"),console.warn(`icon-wc: ${t}`);let e=this.shadowRoot?.querySelector("slot");e&&(e.textContent="")}connectedCallback(){s.#e.add(this),s.#s(),this.render(),this.loadIcon(),this._onThemeChange=()=>{let t=this.shadowRoot?.querySelector("svg");t&&(t.style.stroke="none",requestAnimationFrame(()=>{t.style.stroke=""}))},window.addEventListener("vb:theme-change",this._onThemeChange),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded"),s.#e.delete(this),this._onThemeChange&&window.removeEventListener("vb:theme-change",this._onThemeChange)}attributeChangedCallback(t,e,i){if(e!==i&&this.isConnected){if(t==="name"||t==="set")this.render(),this.loadIcon();else if(t==="label"){let n=this.shadowRoot?.querySelector("svg");n&&(i?(n.setAttribute("role","img"),n.setAttribute("aria-label",i)):(n.removeAttribute("role"),n.setAttribute("aria-hidden","true")))}}}};b("icon-wc",Zt);var Qt=class extends g{#e;#t=new WeakSet;setup(){this.#s(),this.#e=new MutationObserver(t=>{for(let e of t)e.type==="childList"&&this.#s()}),this.#e.observe(this,{childList:!0,subtree:!0})}teardown(){this.#e?.disconnect()}#s(){let e=(this.getAttribute("levels")||"h2,h3").split(",").map(n=>n.trim()).join(","),i=this.querySelectorAll(e);for(let n of i)this.#t.has(n)||(this.#r(n),this.#t.add(n))}#r(t){if(t.closest("dialog, [data-toc-ignore]")||t.hasAttribute("data-toc-ignore")||(t.id||(t.id=this.#i(t.textContent)),t.querySelector(".heading-anchor")))return;let e=document.createElement("a");e.className="heading-anchor",e.href=`#${t.id}`,e.setAttribute("aria-label",`Link to ${t.textContent.trim()}`),e.innerHTML='<icon-wc name="link" size="sm"></icon-wc>',e.addEventListener("click",i=>{i.preventDefault(),this.#n(t,e)}),t.appendChild(e),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1")}#i(t){let e=t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").substring(0,50),i=e,n=1;for(;document.getElementById(i);)i=`${e}-${n}`,n++;return i}async#n(t,e){let i=new URL(window.location.href);i.hash=t.id,window.history.pushState(null,"",i),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus();try{await navigator.clipboard.writeText(i.href);let n=e.innerHTML;e.innerHTML='<icon-wc name="check" size="sm"></icon-wc>',e.classList.add("copied"),setTimeout(()=>{e.innerHTML=n,e.classList.remove("copied")},1500),this.#a("Link copied to clipboard")}catch{}this.dispatchEvent(new CustomEvent("heading-links:navigate",{bubbles:!0,detail:{id:t.id,url:i.href}}))}#a(t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="sr-only",e.textContent=t,this.appendChild(e),setTimeout(()=>e.remove(),1e3)}};b("heading-links",Qt);var te=class extends g{#e;#t=[];#s=new Map;#r;#i;#n;#a=!1;setup(){requestAnimationFrame(()=>this.#c())}teardown(){this.#e?.disconnect(),clearTimeout(this.#n)}#c(){this.#a=this.#o(),this.#a?this.#u():this.#y(),this.#v(),this.#h(),this.#l()}#o(){return this.querySelector("nav, details")!==null}#u(){this.#i=this.querySelector("details");let t=this.querySelectorAll('a[href^="#"]');for(let e of t){let i=e.getAttribute("href");if(!i)continue;let n=i.slice(1);if(n){let r=document.getElementById(n);r&&(this.#t.push(r),this.#s.set(n,e),e.classList.contains("link")||e.classList.add("link"),e.addEventListener("click",a=>{a.preventDefault(),this.#m(r)}))}}}#h(){this.#r=window.matchMedia("(min-width: 64rem)"),this.listen(this.#r,"change",this.#p),this.listen(window,"resize",this.#d)}#p=t=>{t.matches&&this.#i&&(this.#i.open=!0)};#d=()=>{clearTimeout(this.#n),this.#n=setTimeout(()=>this.#b(),150)};#l(){this.listen(window,"hashchange",this.#f),this.#b()}#f=()=>{this.#b()};#b(){let t=window.location.hash.slice(1);t&&this.#s.has(t)&&this.#g(t)}#g(t){for(let i of this.#s.values())i.classList.remove("active"),i.removeAttribute("aria-current");let e=this.#s.get(t);e&&(e.classList.add("active"),e.setAttribute("aria-current","true"))}#y(){let t=this.getAttribute("levels")||"h2,h3",e=this.getAttribute("scope")||"main",i=this.getAttribute("title")||"On this page",n=document.querySelector(e);if(!n)return;let r=t.split(",").map(d=>d.trim()).join(",");if(this.#t=Array.from(n.querySelectorAll(r)).filter(d=>d.id).filter(d=>!d.hasAttribute("data-toc-ignore")&&!d.closest("[data-toc-ignore]")),this.#t.length===0)return;this.#i=document.createElement("details"),this.#i.className="details",this.#i.open=!0;let a=this.#i,o=document.createElement("summary");o.className="summary",o.textContent=i,a.appendChild(o);let c=document.createElement("nav");c.className="nav",c.setAttribute("aria-label",i);let l=document.createElement("ul");l.className="list";let h=t.split(",").map(d=>d.trim().toLowerCase());for(let d of this.#t){let u=d.tagName.toLowerCase(),m=h.indexOf(u),y=m>=0?m:0,p=document.createElement("li");p.className="item",p.dataset.level=String(y);let f=document.createElement("a");f.href=`#${d.id}`,f.className="link",f.textContent=this.#S(d),f.addEventListener("click",v=>{v.preventDefault(),this.#m(d)}),p.appendChild(f),l.appendChild(p),this.#s.set(d.id,f)}c.appendChild(l),a.appendChild(c),this.appendChild(a)}#S(t){let e=t.cloneNode(!0);return e.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),e.textContent.trim()}#m(t){let e=new URL(window.location.href);e.hash=t.id,window.history.pushState(null,"",e),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:t.id}}))}#v(){if(this.#t.length===0)return;let t=new Set;this.#e=new IntersectionObserver(e=>{for(let i of e)i.isIntersecting?t.add(i.target.id):t.delete(i.target.id);this.#E(t)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let e of this.#t)this.#e.observe(e)}#E(t){for(let e of this.#t)if(t.has(e.id)){this.#g(e.id);return}this.#b()}refresh(){this.#a||(this.innerHTML=""),this.#s.clear(),this.#t=[],this.#e?.disconnect(),this.#c()}};b("page-toc",te);var ee=class extends g{#e;#t;#s=[];#r=[];#i=[];#n=-1;#a=null;#c=1;#o=0;#u=null;#h=null;#p=null;#d="";#l=null;#f=null;setup(){if(this.#e=this.querySelector(":scope > table"),!this.#e||(this.#t=this.#e.querySelector("tbody"),!this.#t))return!1;this.#b()}teardown(){this.#g(),this.#s=[],this.#r=[],this.#i=[]}#b(){this.#r=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#i=[...this.#r],this.#y(),this.#e.hasAttribute("data-filterable")&&this.#B();let t=this.#e.getAttribute("data-paginate");t&&(this.#o=parseInt(t,10),this.#o>0&&this.#_()),this.#M(),this.#T(),this.#A()}#g(){this.#p&&clearTimeout(this.#p),this.#u?.parentElement?.remove(),this.#h?.remove()}#y(){this.#e.querySelectorAll("thead th[data-sort]").forEach((e,i)=>{let n=e.getAttribute("data-sort"),r=this.#S(e);this.#s.push({th:e,sortType:n,columnIndex:r}),e.setAttribute("tabindex","0"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e.dataset.columnIndex=r,this.listen(e,"click",this.#m),this.listen(e,"keydown",this.#v)})}#S(t){return[...t.parentElement.children].indexOf(t)}#m=t=>{let e=t.currentTarget,i=parseInt(e.dataset.columnIndex,10);this.#F(i)};#v=t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let e=t.currentTarget,i=parseInt(e.dataset.columnIndex,10);this.#F(i)}};#E(t,e,i){let n=this.#i;if(n.length<2)return!0;let r=i==="asc"?1:-1;for(let a=1;a<n.length;a++){let o=this.#x(n[a-1].children[t],e),c=this.#x(n[a].children[t],e);if((typeof o=="string"?o.localeCompare(c)*r:(o-c)*r)>0)return!1}return!0}#F(t){let e=this.#s.find(n=>n.columnIndex===t);if(!e)return;let i;this.#n===t?i=this.#a==="asc"?"desc":"asc":this.#E(t,e.sortType,"asc")?i="desc":i="asc",this.#s.forEach(({th:n})=>{n.setAttribute("aria-sort","none")}),e.th.setAttribute("aria-sort",i==="asc"?"ascending":"descending"),this.#n=t,this.#a=i,this.#P(t,i,e.sortType),this.#c=1,this.#A(),this.dispatchEvent(new CustomEvent("data-table:sort",{detail:{column:t,direction:i,columnName:e.th.textContent.trim()},bubbles:!0}))}#P(t,e,i){let n=e==="asc"?1:-1;this.#i.sort((r,a)=>{let o=r.children[t],c=a.children[t];if(!o||!c)return 0;let l=this.#x(o,i),h=this.#x(c,i),d=0;switch(i){case"number":d=l-h;break;case"date":d=l-h;break;default:d=l.localeCompare(h,void 0,{numeric:!0,sensitivity:"base"});break}return d*n})}#x(t,e){let n=t.getAttribute("data-sort-value")??t.textContent.trim();switch(e){case"number":return parseFloat(n)||0;case"date":return new Date(n).getTime()||0;default:return n.toLowerCase()}}#B(){let t=document.createElement("div");t.setAttribute("data-table-filter","");let e=document.createElement("input");e.type="search",e.setAttribute("data-filter-input",""),e.setAttribute("placeholder","Filter table..."),e.setAttribute("aria-label","Filter table rows"),t.appendChild(e),this.insertBefore(t,this.#e),this.#u=e,this.listen(e,"input",this.#N)}#N=t=>{let e=t.target.value;this.#p&&clearTimeout(this.#p),this.#p=setTimeout(()=>{this.#C(e)},150)};#C(t){if(this.#d=t.toLowerCase().trim(),this.#d===""?this.#i=[...this.#r]:this.#i=this.#r.filter(e=>[...e.children].some(n=>(n.getAttribute("data-filter-value")??n.textContent).toLowerCase().includes(this.#d))),this.#n>=0&&this.#a){let e=this.#s.find(i=>i.columnIndex===this.#n);e&&this.#P(this.#n,this.#a,e.sortType)}this.#c=1,this.#A(),this.dispatchEvent(new CustomEvent("data-table:filter",{detail:{query:this.#d,count:this.#i.length},bubbles:!0}))}#_(){let t=document.createElement("nav");t.setAttribute("data-pagination",""),t.setAttribute("aria-label","Table pagination"),this.appendChild(t),this.#h=t}#M(){this.listen(this.#e,"click",this.#R)}#R=t=>{let e=t.target.closest('[data-action="toggle-expand"]');if(!e)return;let i=e.closest("tr[data-expandable]");if(!i)return;let n=i.hasAttribute("data-state-expanded"),r=i.nextElementSibling;n?(i.removeAttribute("data-state-expanded"),e.setAttribute("aria-expanded","false"),r?.hasAttribute("data-expand-content")&&(r.hidden=!0,r.setAttribute("aria-hidden","true"))):(i.setAttribute("data-state-expanded",""),e.setAttribute("aria-expanded","true"),r?.hasAttribute("data-expand-content")&&(r.hidden=!1,r.removeAttribute("aria-hidden"))),this.dispatchEvent(new CustomEvent("data-table:expand",{detail:{row:i,expanded:!n},bubbles:!0}))};#T(){this.#l=this.#e.querySelector('thead [data-action="select-all"]'),this.#l&&this.listen(this.#l,"change",this.#q),this.listen(this.#t,"change",this.#D),this.#f=this.querySelector("[data-selected-count]"),this.#k()}#q=t=>{let e=t.target.checked;this.#t.querySelectorAll("tr[data-selectable]").forEach(n=>{let r=n.querySelector('[data-action="select-row"]');e?(n.setAttribute("data-state-selected",""),r&&(r.checked=!0)):(n.removeAttribute("data-state-selected"),r&&(r.checked=!1))}),t.target.indeterminate=!1,this.#L(),this.#I()};#D=t=>{let e=t.target.closest('[data-action="select-row"]');if(!e)return;let i=e.closest("tr[data-selectable]");i&&(e.checked?i.setAttribute("data-state-selected",""):i.removeAttribute("data-state-selected"),this.#k(),this.#I())};#k(){if(!this.#l){this.#L();return}let t=this.#t.querySelectorAll("tr[data-selectable]"),e=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]"),i=t.length,n=e.length;n===0?(this.#l.checked=!1,this.#l.indeterminate=!1):n===i?(this.#l.checked=!0,this.#l.indeterminate=!1):(this.#l.checked=!1,this.#l.indeterminate=!0),this.#L()}#L(){let e=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]").length;this.#f&&(this.#f.textContent=e)}#I(){let t=[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")];this.dispatchEvent(new CustomEvent("data-table:selection",{detail:{count:t.length,rows:t},bubbles:!0}))}#H(){if(!this.#h||this.#o<=0)return;let t=this.#h,e=Math.ceil(this.#i.length/this.#o);if(t.innerHTML="",e<=1)return;let i=document.createElement("button");i.type="button",i.textContent="Previous",i.setAttribute("data-pagination-prev",""),i.disabled=this.#c===1,i.addEventListener("click",()=>this.goToPage(this.#c-1)),t.appendChild(i),this.#w(e).forEach(a=>{if(a==="..."){let o=document.createElement("span");o.textContent="...",o.setAttribute("data-pagination-ellipsis",""),t.appendChild(o)}else{let o=document.createElement("button");o.type="button",o.textContent=a,o.setAttribute("data-pagination-page",""),a===this.#c&&(o.setAttribute("aria-current","page"),o.setAttribute("data-current","")),o.addEventListener("click",()=>this.goToPage(a)),t.appendChild(o)}});let r=document.createElement("button");r.type="button",r.textContent="Next",r.setAttribute("data-pagination-next",""),r.disabled=this.#c===e,r.addEventListener("click",()=>this.goToPage(this.#c+1)),t.appendChild(r)}#w(t){let e=this.#c,i=[];if(t<=7)for(let n=1;n<=t;n++)i.push(n);else{i.push(1),e>3&&i.push("...");let n=Math.max(2,e-1),r=Math.min(t-1,e+1);for(let a=n;a<=r;a++)i.push(a);e<t-2&&i.push("..."),i.push(t)}return i}#A(){this.#r.forEach(e=>{e.setAttribute("data-state-hidden","")});let t;if(this.#o>0){let e=(this.#c-1)*this.#o,i=e+this.#o;t=this.#i.slice(e,i)}else t=this.#i;t.forEach(e=>{e.removeAttribute("data-state-hidden"),this.#t.appendChild(e);let i=e.nextElementSibling?.hasAttribute?.("data-expand-content")?e.nextElementSibling:this.#O(e);i&&this.#t.appendChild(i)}),this.#i.forEach(e=>{if(e.hasAttribute("data-state-hidden")){this.#t.appendChild(e);let i=this.#O(e);i&&this.#t.appendChild(i)}}),this.#r.forEach(e=>{if(!this.#i.includes(e)){this.#t.appendChild(e);let i=this.#O(e);i&&this.#t.appendChild(i)}}),this.#H()}#O(t){if(!t.hasAttribute("data-expandable"))return null;let e=t.nextElementSibling;return e?.hasAttribute("data-expand-content")?e:null}goToPage(t){let e=Math.ceil(this.#i.length/this.#o),i=Math.max(1,Math.min(t,e));i!==this.#c&&(this.#c=i,this.#A(),this.dispatchEvent(new CustomEvent("data-table:page",{detail:{page:this.#c},bubbles:!0})))}setFilter(t){this.#u&&(this.#u.value=t),this.#C(t)}refresh(){if(this.#r=[...this.#t.querySelectorAll(":scope > tr")],this.#d?this.#C(this.#d):this.#i=[...this.#r],this.#n>=0&&this.#a){let e=this.#s.find(i=>i.columnIndex===this.#n);e&&this.#P(this.#n,this.#a,e.sortType)}let t=Math.max(1,Math.ceil(this.#i.length/this.#o));this.#c>t&&(this.#c=t),this.#A()}get currentPage(){return this.#c}get totalPages(){return this.#o<=0?1:Math.ceil(this.#i.length/this.#o)}get filteredCount(){return this.#i.length}get totalCount(){return this.#r.length}getSelectedRows(){return this.#t?[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")]:[]}};b("data-table",ee);var H=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),X={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}};function Fs(s){let t=H?X.mac:X.other;return s.split("+").map(e=>{let i=e.trim().toLowerCase();return t[i]??i.toUpperCase()}).join(H?"":"+")}function Rs(s){let t=s.toLowerCase().split("+").map(i=>i.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function Hs(s,t){if(s.key.toLowerCase()!==t.key)return!1;let e,i;return H?(e=t.meta,i=t.ctrl):(e=!1,i=t.meta||t.ctrl),!(e!==s.metaKey||i!==s.ctrlKey||t.shift!==s.shiftKey||t.alt!==s.altKey)}var Ln=new Set(["INPUT","TEXTAREA","SELECT"]),z=[],zs=!1;function Mn(s){let t=Ln.has(s.target.tagName)||s.target.isContentEditable;for(let e of z)if(!(t&&!e.global)&&Hs(s,e.descriptor)){s.preventDefault(),e.callback(s);return}}function Dn(){zs||(document.addEventListener("keydown",Mn),zs=!0)}function ft(s,t,e={}){Dn();let i=Rs(s),n={combo:s,descriptor:i,callback:t,global:e.global===!0};return z.find(a=>a.combo===s)&&console.warn(`[hotkey-bind] Shortcut "${s}" already bound. Last-connected-wins.`),z.unshift(n),function(){let o=z.indexOf(n);o!==-1&&z.splice(o,1)}}function Vs(){return z.map(s=>s.combo)}var se=class s extends g{static#e=150;static#t=8;#s=null;#r=null;#i=null;#n=null;#a=[];#c=-1;#o=!1;#u=null;#h=null;#p=null;setup(){this.#d(),this.#l()}teardown(){this.#o&&(document.body.style.overflow="",this.removeAttribute("open"),this.#o=!1),this.#p?.(),this.#B()}#d(){this.#s=this.querySelector(":scope > [data-trigger]"),this.#s||(this.#s=this.querySelector(":scope > button")),this.#s||(this.#s=document.createElement("button"),this.#s.setAttribute("data-trigger",""),this.#s.innerHTML=`
71
+ `}async loadIcon(){if(!this.name){this.setError("No icon name specified");return}let t=`${this.set}/${this.name}`;if(gt.has(t)){this.displayIcon(gt.get(t));return}try{let e=await this.#n(this.set,t);this.displayIcon(e)}catch(e){let s="lucide";if(this.set!==s){let n=`${s}/${this.name}`;if(gt.has(n)){this.displayIcon(gt.get(n));return}try{let r=await this.#n(s,n);this.displayIcon(r);return}catch{}}this.setError(e.message)}}async#n(t,e){return yt.has(e)||yt.set(e,this.#s(t).then(s=>(gt.set(e,s),yt.delete(e),s)).catch(s=>{throw yt.delete(e),s})),yt.get(e)}async#s(t){let e=`${this.basePath}/${t}/${this.name}.svg`,s=await fetch(e);if(!s.ok)throw new Error(`Icon not found: ${this.name}`);let n=await s.text();if(!n.includes("<svg"))throw new Error(`Invalid SVG: ${this.name}`);return n}displayIcon(t){let n=new DOMParser().parseFromString(t,"image/svg+xml").querySelector("svg");if(!n){this.setError("Invalid SVG content");return}n.removeAttribute("width"),n.removeAttribute("height"),this.label?(n.setAttribute("role","img"),n.setAttribute("aria-label",this.label)):n.setAttribute("aria-hidden","true"),this.removeAttribute("data-error");let r=this.shadowRoot?.querySelector("slot");r&&r.replaceWith(n)}setError(t){this.setAttribute("data-error","true"),console.warn(`icon-wc: ${t}`);let e=this.shadowRoot?.querySelector("slot");e&&(e.textContent="")}connectedCallback(){i.#e.add(this),i.#i(),this.render(),this.loadIcon(),this._onThemeChange=()=>{let t=this.shadowRoot?.querySelector("svg");t&&(t.style.stroke="none",requestAnimationFrame(()=>{t.style.stroke=""}))},window.addEventListener("vb:theme-change",this._onThemeChange),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded"),i.#e.delete(this),this._onThemeChange&&window.removeEventListener("vb:theme-change",this._onThemeChange)}attributeChangedCallback(t,e,s){if(e!==s&&this.isConnected){if(t==="name"||t==="set")this.render(),this.loadIcon();else if(t==="label"){let n=this.shadowRoot?.querySelector("svg");n&&(s?(n.setAttribute("role","img"),n.setAttribute("aria-label",s)):(n.removeAttribute("role"),n.setAttribute("aria-hidden","true")))}}}};f("icon-wc",_e);var qe=class extends m{#e;#t=new WeakSet;setup(){this.#i(),this.#e=new MutationObserver(t=>{for(let e of t)e.type==="childList"&&this.#i()}),this.#e.observe(this,{childList:!0,subtree:!0})}teardown(){this.#e?.disconnect()}#i(){let e=(this.getAttribute("levels")||"h2,h3").split(",").map(n=>n.trim()).join(","),s=this.querySelectorAll(e);for(let n of s)this.#t.has(n)||(this.#n(n),this.#t.add(n))}#n(t){if(t.closest("dialog, [data-toc-ignore]")||t.hasAttribute("data-toc-ignore")||(t.id||(t.id=this.#s(t.textContent)),t.querySelector(".heading-anchor")))return;let e=document.createElement("a");e.className="heading-anchor",e.href=`#${t.id}`,e.setAttribute("aria-label",`Link to ${t.textContent.trim()}`),e.innerHTML='<icon-wc name="link" size="sm"></icon-wc>',e.addEventListener("click",s=>{s.preventDefault(),this.#r(t,e)}),t.appendChild(e),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1")}#s(t){let e=t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").substring(0,50),s=e,n=1;for(;document.getElementById(s);)s=`${e}-${n}`,n++;return s}async#r(t,e){let s=new URL(window.location.href);s.hash=t.id,window.history.pushState(null,"",s),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus();try{await navigator.clipboard.writeText(s.href);let n=e.innerHTML;e.innerHTML='<icon-wc name="check" size="sm"></icon-wc>',e.classList.add("copied"),setTimeout(()=>{e.innerHTML=n,e.classList.remove("copied")},1500),this.#a("Link copied to clipboard")}catch{}this.dispatchEvent(new CustomEvent("heading-links:navigate",{bubbles:!0,detail:{id:t.id,url:s.href}}))}#a(t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="sr-only",e.textContent=t,this.appendChild(e),setTimeout(()=>e.remove(),1e3)}};f("heading-links",qe);var $e=class extends m{#e;#t=[];#i=new Map;#n;#s;#r;#a=!1;setup(){requestAnimationFrame(()=>this.#c())}teardown(){this.#e?.disconnect(),clearTimeout(this.#r)}#c(){this.#a=this.#o(),this.#a?this.#p():this.#v(),this.#y(),this.#h(),this.#l()}#o(){return this.querySelector("nav, details")!==null}#p(){this.#s=this.querySelector("details");let t=this.querySelectorAll('a[href^="#"]');for(let e of t){let s=e.getAttribute("href");if(!s)continue;let n=s.slice(1);if(n){let r=document.getElementById(n);r&&(this.#t.push(r),this.#i.set(n,e),e.classList.contains("link")||e.classList.add("link"),e.addEventListener("click",a=>{a.preventDefault(),this.#b(r)}))}}}#h(){this.#n=window.matchMedia("(min-width: 64rem)"),this.listen(this.#n,"change",this.#f),this.listen(window,"resize",this.#d)}#f=t=>{t.matches&&this.#s&&(this.#s.open=!0)};#d=()=>{clearTimeout(this.#r),this.#r=setTimeout(()=>this.#m(),150)};#l(){this.listen(window,"hashchange",this.#u),this.#m()}#u=()=>{this.#m()};#m(){let t=window.location.hash.slice(1);t&&this.#i.has(t)&&this.#g(t)}#g(t){for(let s of this.#i.values())s.classList.remove("active"),s.removeAttribute("aria-current");let e=this.#i.get(t);e&&(e.classList.add("active"),e.setAttribute("aria-current","true"))}#v(){let t=(this.getAttribute("levels")||"h2,h3").split(",").map(h=>h.trim().toLowerCase()),e=this.getAttribute("scope")||"main",s=this.getAttribute("title")||"On this page",n=document.querySelector(e);if(!n||(this.#t=Array.from(n.querySelectorAll(t.join(","))).filter(h=>h.id).filter(h=>!h.hasAttribute("data-toc-ignore")&&!h.closest("[data-toc-ignore]")),this.#t.length===0))return;let r={depth:-1,children:[]},a=[r];for(let h of this.#t){let d=t.indexOf(h.tagName.toLowerCase());for(;a[a.length-1].depth>=d;)a.pop();let u={heading:h,depth:d,children:[]};a[a.length-1].children.push(u),a.push(u)}let o=h=>{let d=document.createElement("ul");d.className="list";for(let u of h){let b=document.createElement("li");b.className="item",b.dataset.level=String(u.depth);let y=document.createElement("a");y.href=`#${u.heading.id}`,y.className="link",y.textContent=this.#A(u.heading),y.addEventListener("click",p=>{p.preventDefault(),this.#b(u.heading)}),b.appendChild(y),u.children.length&&b.appendChild(o(u.children)),d.appendChild(b),this.#i.set(u.heading.id,y)}return d};this.#s=document.createElement("details"),this.#s.className="details",this.#s.open=!0;let c=document.createElement("summary");c.className="summary",c.textContent=s,this.#s.appendChild(c);let l=document.createElement("nav");l.className="nav",l.setAttribute("aria-label",s),l.appendChild(o(r.children)),this.#s.appendChild(l),this.appendChild(this.#s)}#A(t){let e=t.cloneNode(!0);return e.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),e.textContent.trim()}#b(t){let e=new URL(window.location.href);e.hash=t.id,window.history.pushState(null,"",e),t.scrollIntoView({behavior:"smooth",block:"start"}),t.focus(),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:t.id}}))}#y(){if(this.#t.length===0)return;let t=new Set;this.#e=new IntersectionObserver(e=>{for(let s of e)s.isIntersecting?t.add(s.target.id):t.delete(s.target.id);this.#w(t)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let e of this.#t)this.#e.observe(e)}#w(t){for(let e of this.#t)if(t.has(e.id)){this.#g(e.id);return}this.#m()}refresh(){this.#a||(this.innerHTML=""),this.#i.clear(),this.#t=[],this.#e?.disconnect(),this.#c()}};f("page-toc",$e);var Ie=class extends m{#e;#t;#i=[];#n=[];#s=[];#r=-1;#a=null;#c=1;#o=0;#p=null;#h=null;#f=null;#d="";#l=null;#u=null;setup(){if(this.#e=this.querySelector(":scope > table"),!this.#e||(this.#t=this.#e.querySelector("tbody"),!this.#t))return!1;this.#m()}teardown(){this.#g(),this.#i=[],this.#n=[],this.#s=[]}#m(){this.#n=[...this.#t.querySelectorAll(":scope > tr:not([data-expand-content])")],this.#s=[...this.#n],this.#v(),this.#e.hasAttribute("data-filterable")&&this.#$();let t=this.#e.getAttribute("data-paginate");t&&(this.#o=parseInt(t,10),this.#o>0&&this.#I()),this.#_(),this.#T(),this.#C()}#g(){this.#f&&clearTimeout(this.#f),this.#p?.parentElement?.remove(),this.#h?.remove()}#v(){this.#e.querySelectorAll("thead th[data-sort]").forEach((e,s)=>{let n=e.getAttribute("data-sort"),r=this.#A(e);this.#i.push({th:e,sortType:n,columnIndex:r}),e.setAttribute("tabindex","0"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e.dataset.columnIndex=r,this.listen(e,"click",this.#b),this.listen(e,"keydown",this.#y)})}#A(t){return[...t.parentElement.children].indexOf(t)}#b=t=>{let e=t.currentTarget,s=parseInt(e.dataset.columnIndex,10);this.#B(s)};#y=t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();let e=t.currentTarget,s=parseInt(e.dataset.columnIndex,10);this.#B(s)}};#w(t,e,s){let n=this.#s;if(n.length<2)return!0;let r=s==="asc"?1:-1;for(let a=1;a<n.length;a++){let o=this.#S(n[a-1].children[t],e),c=this.#S(n[a].children[t],e);if((typeof o=="string"?o.localeCompare(c)*r:(o-c)*r)>0)return!1}return!0}#B(t){let e=this.#i.find(n=>n.columnIndex===t);if(!e)return;let s;this.#r===t?s=this.#a==="asc"?"desc":"asc":this.#w(t,e.sortType,"asc")?s="desc":s="asc",this.#i.forEach(({th:n})=>{n.setAttribute("aria-sort","none")}),e.th.setAttribute("aria-sort",s==="asc"?"ascending":"descending"),this.#r=t,this.#a=s,this.#N(t,s,e.sortType),this.#c=1,this.#C(),this.dispatchEvent(new CustomEvent("data-table:sort",{detail:{column:t,direction:s,columnName:e.th.textContent.trim()},bubbles:!0}))}#N(t,e,s){let n=e==="asc"?1:-1;this.#s.sort((r,a)=>{let o=r.children[t],c=a.children[t];if(!o||!c)return 0;let l=this.#S(o,s),h=this.#S(c,s),d=0;switch(s){case"number":d=l-h;break;case"date":d=l-h;break;default:d=l.localeCompare(h,void 0,{numeric:!0,sensitivity:"base"});break}return d*n})}#S(t,e){let n=t.getAttribute("data-sort-value")??t.textContent.trim();switch(e){case"number":return parseFloat(n)||0;case"date":return new Date(n).getTime()||0;default:return n.toLowerCase()}}#$(){let t=document.createElement("div");t.setAttribute("data-table-filter","");let e=document.createElement("input");e.type="search",e.setAttribute("data-filter-input",""),e.setAttribute("placeholder","Filter table..."),e.setAttribute("aria-label","Filter table rows"),t.appendChild(e),this.insertBefore(t,this.#e),this.#p=e,this.listen(e,"input",this.#D)}#D=t=>{let e=t.target.value;this.#f&&clearTimeout(this.#f),this.#f=setTimeout(()=>{this.#k(e)},150)};#k(t){if(this.#d=t.toLowerCase().trim(),this.#d===""?this.#s=[...this.#n]:this.#s=this.#n.filter(e=>[...e.children].some(n=>(n.getAttribute("data-filter-value")??n.textContent).toLowerCase().includes(this.#d))),this.#r>=0&&this.#a){let e=this.#i.find(s=>s.columnIndex===this.#r);e&&this.#N(this.#r,this.#a,e.sortType)}this.#c=1,this.#C(),this.dispatchEvent(new CustomEvent("data-table:filter",{detail:{query:this.#d,count:this.#s.length},bubbles:!0}))}#I(){let t=document.createElement("nav");t.setAttribute("data-pagination",""),t.setAttribute("aria-label","Table pagination"),this.appendChild(t),this.#h=t}#_(){this.listen(this.#e,"click",this.#F)}#F=t=>{let e=t.target.closest('[data-action="toggle-expand"]');if(!e)return;let s=e.closest("tr[data-expandable]");if(!s)return;let n=s.hasAttribute("data-state-expanded"),r=s.nextElementSibling;n?(s.removeAttribute("data-state-expanded"),e.setAttribute("aria-expanded","false"),r?.hasAttribute("data-expand-content")&&(r.hidden=!0,r.setAttribute("aria-hidden","true"))):(s.setAttribute("data-state-expanded",""),e.setAttribute("aria-expanded","true"),r?.hasAttribute("data-expand-content")&&(r.hidden=!1,r.removeAttribute("aria-hidden"))),this.dispatchEvent(new CustomEvent("data-table:expand",{detail:{row:s,expanded:!n},bubbles:!0}))};#T(){this.#l=this.#e.querySelector('thead [data-action="select-all"]'),this.#l&&this.listen(this.#l,"change",this.#q),this.listen(this.#t,"change",this.#L),this.#u=this.querySelector("[data-selected-count]"),this.#x()}#q=t=>{let e=t.target.checked;this.#t.querySelectorAll("tr[data-selectable]").forEach(n=>{let r=n.querySelector('[data-action="select-row"]');e?(n.setAttribute("data-state-selected",""),r&&(r.checked=!0)):(n.removeAttribute("data-state-selected"),r&&(r.checked=!1))}),t.target.indeterminate=!1,this.#M(),this.#P()};#L=t=>{let e=t.target.closest('[data-action="select-row"]');if(!e)return;let s=e.closest("tr[data-selectable]");s&&(e.checked?s.setAttribute("data-state-selected",""):s.removeAttribute("data-state-selected"),this.#x(),this.#P())};#x(){if(!this.#l){this.#M();return}let t=this.#t.querySelectorAll("tr[data-selectable]"),e=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]"),s=t.length,n=e.length;n===0?(this.#l.checked=!1,this.#l.indeterminate=!1):n===s?(this.#l.checked=!0,this.#l.indeterminate=!1):(this.#l.checked=!1,this.#l.indeterminate=!0),this.#M()}#M(){let e=this.#t.querySelectorAll("tr[data-selectable][data-state-selected]").length;this.#u&&(this.#u.textContent=e)}#P(){let t=[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")];this.dispatchEvent(new CustomEvent("data-table:selection",{detail:{count:t.length,rows:t},bubbles:!0}))}#V(){if(!this.#h||this.#o<=0)return;let t=this.#h,e=Math.ceil(this.#s.length/this.#o);if(t.innerHTML="",e<=1)return;let s=document.createElement("button");s.type="button",s.textContent="Previous",s.setAttribute("data-pagination-prev",""),s.disabled=this.#c===1,s.addEventListener("click",()=>this.goToPage(this.#c-1)),t.appendChild(s),this.#E(e).forEach(a=>{if(a==="..."){let o=document.createElement("span");o.textContent="...",o.setAttribute("data-pagination-ellipsis",""),t.appendChild(o)}else{let o=document.createElement("button");o.type="button",o.textContent=a,o.setAttribute("data-pagination-page",""),a===this.#c&&(o.setAttribute("aria-current","page"),o.setAttribute("data-current","")),o.addEventListener("click",()=>this.goToPage(a)),t.appendChild(o)}});let r=document.createElement("button");r.type="button",r.textContent="Next",r.setAttribute("data-pagination-next",""),r.disabled=this.#c===e,r.addEventListener("click",()=>this.goToPage(this.#c+1)),t.appendChild(r)}#E(t){let e=this.#c,s=[];if(t<=7)for(let n=1;n<=t;n++)s.push(n);else{s.push(1),e>3&&s.push("...");let n=Math.max(2,e-1),r=Math.min(t-1,e+1);for(let a=n;a<=r;a++)s.push(a);e<t-2&&s.push("..."),s.push(t)}return s}#C(){this.#n.forEach(e=>{e.setAttribute("data-state-hidden","")});let t;if(this.#o>0){let e=(this.#c-1)*this.#o,s=e+this.#o;t=this.#s.slice(e,s)}else t=this.#s;t.forEach(e=>{e.removeAttribute("data-state-hidden"),this.#t.appendChild(e);let s=e.nextElementSibling?.hasAttribute?.("data-expand-content")?e.nextElementSibling:this.#R(e);s&&this.#t.appendChild(s)}),this.#s.forEach(e=>{if(e.hasAttribute("data-state-hidden")){this.#t.appendChild(e);let s=this.#R(e);s&&this.#t.appendChild(s)}}),this.#n.forEach(e=>{if(!this.#s.includes(e)){this.#t.appendChild(e);let s=this.#R(e);s&&this.#t.appendChild(s)}}),this.#V()}#R(t){if(!t.hasAttribute("data-expandable"))return null;let e=t.nextElementSibling;return e?.hasAttribute("data-expand-content")?e:null}goToPage(t){let e=Math.ceil(this.#s.length/this.#o),s=Math.max(1,Math.min(t,e));s!==this.#c&&(this.#c=s,this.#C(),this.dispatchEvent(new CustomEvent("data-table:page",{detail:{page:this.#c},bubbles:!0})))}setFilter(t){this.#p&&(this.#p.value=t),this.#k(t)}refresh(){if(this.#n=[...this.#t.querySelectorAll(":scope > tr")],this.#d?this.#k(this.#d):this.#s=[...this.#n],this.#r>=0&&this.#a){let e=this.#i.find(s=>s.columnIndex===this.#r);e&&this.#N(this.#r,this.#a,e.sortType)}let t=Math.max(1,Math.ceil(this.#s.length/this.#o));this.#c>t&&(this.#c=t),this.#C()}get currentPage(){return this.#c}get totalPages(){return this.#o<=0?1:Math.ceil(this.#s.length/this.#o)}get filteredCount(){return this.#s.length}get totalCount(){return this.#n.length}getSelectedRows(){return this.#t?[...this.#t.querySelectorAll("tr[data-selectable][data-state-selected]")]:[]}};f("data-table",Ie);var lt=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),vt={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}};function Ys(i){let t=lt?vt.mac:vt.other;return i.split("+").map(e=>{let s=e.trim().toLowerCase();return t[s]??s.toUpperCase()}).join(lt?"":"+")}function Gs(i){let t=i.toLowerCase().split("+").map(s=>s.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function Ks(i,t){if(i.key.toLowerCase()!==t.key)return!1;let e,s;return lt?(e=t.meta,s=t.ctrl):(e=!1,s=t.meta||t.ctrl),!(e!==i.metaKey||s!==i.ctrlKey||t.shift!==i.shiftKey||t.alt!==i.altKey)}var ba=new Set(["INPUT","TEXTAREA","SELECT"]),ht=[],Xs=!1;function ga(i){let t=ba.has(i.target.tagName)||i.target.isContentEditable;for(let e of ht)if(!(t&&!e.global)&&Ks(i,e.descriptor)){i.preventDefault(),e.callback(i);return}}function ya(){Xs||(document.addEventListener("keydown",ga),Xs=!0)}function Ht(i,t,e={}){ya();let s=Gs(i),n={combo:i,descriptor:s,callback:t,global:e.global===!0};return ht.find(a=>a.combo===i)&&console.warn(`[hotkey-bind] Shortcut "${i}" already bound. Last-connected-wins.`),ht.unshift(n),function(){let o=ht.indexOf(n);o!==-1&&ht.splice(o,1)}}function Js(){return ht.map(i=>i.combo)}var Oe=class i extends m{static#e=150;static#t=8;#i=null;#n=null;#s=null;#r=null;#a=[];#c=-1;#o=!1;#p=null;#h=null;#f=null;setup(){this.#d(),this.#l()}teardown(){this.#o&&(document.body.style.overflow="",this.removeAttribute("open"),this.#o=!1),this.#f?.(),this.#$()}#d(){this.#i=this.querySelector(":scope > [data-trigger]"),this.#i||(this.#i=this.querySelector(":scope > button")),this.#i||(this.#i=document.createElement("button"),this.#i.setAttribute("data-trigger",""),this.#i.innerHTML=`
71
72
  <icon-wc name="search" label="Search"></icon-wc>
72
- `,this.prepend(this.#s)),this.#s.setAttribute("aria-haspopup","dialog"),this.#s.setAttribute("aria-expanded","false"),this.#r=document.createElement("div"),this.#r.className="dialog",this.#r.setAttribute("role","dialog"),this.#r.setAttribute("aria-label","Site search"),this.#r.id=`search-dialog-${crypto.randomUUID().slice(0,8)}`,this.#s.setAttribute("aria-controls",this.#r.id),this.#r.innerHTML=`
73
+ `,this.prepend(this.#i)),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#n=document.createElement("div"),this.#n.className="dialog",this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-label","Site search"),this.#n.id=`search-dialog-${crypto.randomUUID().slice(0,8)}`,this.#i.setAttribute("aria-controls",this.#n.id),this.#n.innerHTML=`
73
74
  <div class="backdrop"></div>
74
75
  <div class="panel">
75
76
  <div class="input-wrapper">
@@ -100,24 +101,24 @@ svg {
100
101
  </span>
101
102
  </div>
102
103
  </div>
103
- `,this.appendChild(this.#r),this.#i=this.#r.querySelector(".input"),this.#n=this.#r.querySelector(".results")}#l(){this.#s.addEventListener("click",this.#f),Vs().includes("meta+k")||(this.#p=ft("meta+k",()=>{this.#o?this.close():this.open()},{global:!0})),this.listen(document,"keydown",this.#b),this.#r.querySelector(".backdrop")?.addEventListener("click",()=>this.close()),this.#i.addEventListener("input",this.#g),this.#i.addEventListener("keydown",this.#y),this.#n.addEventListener("click",this.#S)}#f=t=>{t.stopPropagation(),this.open()};#b=t=>{t.key==="Escape"&&this.#o&&(t.preventDefault(),this.close())};#g=()=>{this.#B(),this.#h=setTimeout(()=>{this.#v(this.#i.value)},s.#e)};#y=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#P(this.#c+1);break;case"ArrowUp":t.preventDefault(),this.#P(this.#c-1);break;case"Enter":t.preventDefault(),this.#c>=0&&this.#a[this.#c]&&this.#x(this.#a[this.#c]);break}};#S=t=>{let e=t.target.closest("[data-result-index]");if(e){let i=parseInt(e.dataset.resultIndex,10);this.#a[i]&&this.#x(this.#a[i])}};async#m(){if(!this.#u)try{this.#u=await import("/pagefind/pagefind.js"),await this.#u.options({excerptLength:20})}catch{console.warn("Pagefind not available. Run `npm run search:index` to build the search index."),this.#u=null}}async#v(t){if(!t.trim()){this.#E([]);return}if(await this.#m(),!this.#u){this.#F();return}try{this.#n.innerHTML='<div class="loading">Searching...</div>';let e=await this.#u.search(t),i=await Promise.all(e.results.slice(0,s.#t).map(n=>n.data()));this.#a=i,this.#E(i)}catch(e){console.error("Search error:",e),this.#n.innerHTML='<div class="error">Search error. Please try again.</div>'}}#E(t){if(this.#c=-1,t.length===0){this.#i.value.trim()?this.#n.innerHTML='<div class="empty">No results found</div>':this.#n.innerHTML="";return}this.#n.innerHTML=t.map((e,i)=>`
104
+ `,this.appendChild(this.#n),this.#s=this.#n.querySelector(".input"),this.#r=this.#n.querySelector(".results")}#l(){this.#i.addEventListener("click",this.#u),Js().includes("meta+k")||(this.#f=Ht("meta+k",()=>{this.#o?this.close():this.open()},{global:!0})),this.listen(document,"keydown",this.#m),this.#n.querySelector(".backdrop")?.addEventListener("click",()=>this.close()),this.#s.addEventListener("input",this.#g),this.#s.addEventListener("keydown",this.#v),this.#r.addEventListener("click",this.#A)}#u=t=>{t.stopPropagation(),this.open()};#m=t=>{t.key==="Escape"&&this.#o&&(t.preventDefault(),this.close())};#g=()=>{this.#$(),this.#h=setTimeout(()=>{this.#y(this.#s.value)},i.#e)};#v=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#N(this.#c+1);break;case"ArrowUp":t.preventDefault(),this.#N(this.#c-1);break;case"Enter":t.preventDefault(),this.#c>=0&&this.#a[this.#c]&&this.#S(this.#a[this.#c]);break}};#A=t=>{let e=t.target.closest("[data-result-index]");if(e){let s=parseInt(e.dataset.resultIndex,10);this.#a[s]&&this.#S(this.#a[s])}};async#b(){if(!this.#p)try{this.#p=await import("/pagefind/pagefind.js"),await this.#p.options({excerptLength:20})}catch{console.warn("Pagefind not available. Run `npm run search:index` to build the search index."),this.#p=null}}async#y(t){if(!t.trim()){this.#w([]);return}if(await this.#b(),!this.#p){this.#B();return}try{this.#r.innerHTML='<div class="loading">Searching...</div>';let e=await this.#p.search(t),s=await Promise.all(e.results.slice(0,i.#t).map(n=>n.data()));this.#a=s,this.#w(s)}catch(e){console.error("Search error:",e),this.#r.innerHTML='<div class="error">Search error. Please try again.</div>'}}#w(t){if(this.#c=-1,t.length===0){this.#s.value.trim()?this.#r.innerHTML='<div class="empty">No results found</div>':this.#r.innerHTML="";return}this.#r.innerHTML=t.map((e,s)=>`
104
105
  <a
105
- id="search-result-${i}"
106
+ id="search-result-${s}"
106
107
  href="${e.url}"
107
108
  class="result"
108
109
  role="option"
109
- data-result-index="${i}"
110
+ data-result-index="${s}"
110
111
  tabindex="-1"
111
112
  >
112
113
  <span class="result-title">${e.meta?.title||"Untitled"}</span>
113
114
  <span class="result-excerpt">${e.excerpt||""}</span>
114
115
  </a>
115
- `).join("")}#F(){this.#n.innerHTML=`
116
+ `).join("")}#B(){this.#r.innerHTML=`
116
117
  <div class="error">
117
118
  Search index not found.<br>
118
119
  Run <code>npm run search:index</code> after building.
119
120
  </div>
120
- `}#P(t){if(this.#a.length===0)return;t<0&&(t=this.#a.length-1),t>=this.#a.length&&(t=0);let e=this.#n.querySelector("[data-active]");e&&e.removeAttribute("data-active"),this.#i?.removeAttribute("aria-activedescendant"),this.#c=t;let i=this.#n.querySelector(`[data-result-index="${t}"]`);i&&(i.setAttribute("data-active",""),this.#i?.setAttribute("aria-activedescendant",i.id),i.scrollIntoView({block:"nearest"}))}#x(t){t.url&&(this.close(),window.location.href=t.url)}#B(){this.#h&&(clearTimeout(this.#h),this.#h=null)}open(){this.#o||(this.#o=!0,this.setAttribute("open",""),this.#s?.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",requestAnimationFrame(()=>{this.#i?.focus(),this.#i?.select()}),this.#m(),this.dispatchEvent(new CustomEvent("site-search:open",{bubbles:!0})))}close(){this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#s?.setAttribute("aria-expanded","false"),document.body.style.overflow="",this.#B(),this.#i.value="",this.#i?.removeAttribute("aria-activedescendant"),this.#a=[],this.#c=-1,this.#n.innerHTML="",this.#s?.focus(),this.dispatchEvent(new CustomEvent("site-search:close",{bubbles:!0})))}get isOpen(){return this.#o}};b("site-search",se);function ie(s){if(!s||typeof s!="string")return"";let t=document.createElement("template");return t.innerHTML=s,t.content.querySelectorAll("script, iframe, object, embed, form, base, link, meta, noscript").forEach(n=>n.remove()),t.content.querySelectorAll("*").forEach(n=>{for(let r of[...n.attributes]){if(r.name.startsWith("on")){n.removeAttribute(r.name);continue}if(["href","src","action","formaction","xlink:href"].includes(r.name)){let a=r.value.trim().toLowerCase();(a.startsWith("javascript:")||a.startsWith("data:text/html"))&&n.removeAttribute(r.name);continue}(r.name==="srcdoc"||r.name==="data"&&n.tagName==="OBJECT")&&n.removeAttribute(r.name)}}),t.innerHTML}var Nn=/^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*|\[\d+\])*$/;function Us(s){return!s||typeof s!="string"?!1:Nn.test(s.trim())}function J(s,t){if(!Us(t)){console.warn(`[card-list] Unsafe property path rejected: "${t}"`);return}let i=t.replace(/\[(\d+)\]/g,".$1").split("."),n=s;for(let r of i){if(n==null)return;n=n[r]}return n}function qn(s){return s?s.split(",").map(t=>{let[e,i]=t.split(":").map(n=>n.trim());return{attr:e,path:i}}).filter(({attr:t,path:e})=>t&&e):[]}var ne=class extends g{#e=null;#t=[];#s="id";static get observedAttributes(){return["src","data-items","data-key"]}setup(){if(this.#e=this.querySelector("template"),!this.#e)return console.warn("[card-list] No template found"),!1;this.#s=this.getAttribute("data-key")||"id";let t=this.getAttribute("data-items");if(t){try{this.#t=JSON.parse(t),this.#i()}catch(i){console.error("[card-list] Invalid JSON in data-items:",i)}return}let e=this.getAttribute("src");e&&this.#r(e)}attributeChangedCallback(t,e,i){if(e!==i)if(t==="data-items"&&i)try{this.#t=JSON.parse(i),this.#i()}catch(n){console.error("[card-list] Invalid JSON in data-items:",n)}else t==="src"&&i?this.#r(i):t==="data-key"&&(this.#s=i||"id",this.#i())}async#r(t){try{this.setAttribute("data-loading","");let e=await fetch(t);if(!e.ok)throw new Error(`HTTP ${e.status}`);let i=await e.json();this.#t=Array.isArray(i)?i:i.items||i.data||[],this.#i()}catch(e){console.error("[card-list] Fetch error:",e),this.setAttribute("data-error",e.message)}finally{this.removeAttribute("data-loading")}}#i(){if(!this.#e)return;this.querySelectorAll(":scope > :not(template)").forEach(i=>i.remove());let e=document.createDocumentFragment();for(let i of this.#t){let n=this.#e.content.cloneNode(!0);this.#n(n,i),e.appendChild(n)}this.appendChild(e),this.dispatchEvent(new CustomEvent("card-list:rendered",{detail:{count:this.#t.length},bubbles:!0}))}#n(t,e){t.querySelectorAll("[data-field]").forEach(i=>{let n=i.getAttribute("data-field"),r=J(e,n);i.textContent=r??""}),t.querySelectorAll("[data-field-attr]").forEach(i=>{let n=qn(i.getAttribute("data-field-attr"));for(let{attr:r,path:a}of n){if(!Us(a))continue;let o=J(e,a);o!=null&&i.setAttribute(r,o)}}),t.querySelectorAll("[data-field-html]").forEach(i=>{let n=i.getAttribute("data-field-html"),r=J(e,n);i.innerHTML=ie(r)}),t.querySelectorAll("[data-field-if]").forEach(i=>{let n=i.getAttribute("data-field-if");J(e,n)||i.remove()}),t.querySelectorAll("[data-field-unless]").forEach(i=>{let n=i.getAttribute("data-field-unless");J(e,n)&&i.remove()})}setItems(t){this.#t=Array.isArray(t)?t:[],this.#i()}getItems(){return[...this.#t]}};b("card-list",ne);var In=0;function bt(s,t){return s.matches("content-swap")?t:`data-${t}`}function mt(s){s.style.viewTransitionName||(s.style.viewTransitionName=`content-swap-${++In}`);let t=s.querySelector(':scope > [data-face="front"]'),e=s.querySelector(':scope > [data-face="back"]');if(!t||!e)return;let i=[];function n(o,c,l,h){o.addEventListener(c,l,h),i.push(()=>o.removeEventListener(c,l,h))}let r=[...s.querySelectorAll("[data-swap]")].filter(o=>o!==s&&o.closest("content-swap, [data-swap]")===s);return r.length===0?(s.setAttribute("role","button"),s.setAttribute("tabindex","0"),s.getAttribute("aria-label")||s.setAttribute("aria-label","Toggle content"),n(s,"click",()=>Q(s,"pointer")),n(s,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),Q(s,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),Q(s,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),Q(s,"keyboard"))})}),js(s,t,e),()=>{for(let o of i)o();i.length=0}}function js(s,t,e){let i=s.hasAttribute(bt(s,"swapped"));t.inert=i,e.inert=!i}function $n(s){return{front:s.querySelector(':scope > [data-face="front"]'),back:s.querySelector(':scope > [data-face="back"]')}}function Z(s,t,e="api"){let{front:i,back:n}=$n(s);if(!i||!n)return;let r=bt(s,"swapped");if(t&&s.hasAttribute(r)||!t&&!s.hasAttribute(r))return;D(()=>{t?s.setAttribute(r,""):s.removeAttribute(r),js(s,i,n),Pn(s);let o=t?n:i,c=o.querySelector("[autofocus]");c?c.focus():e==="keyboard"&&Bn(o)})}function Q(s,t="api"){Z(s,!s.hasAttribute(bt(s,"swapped")),t)}function Pn(s){s.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:s.hasAttribute(bt(s,"swapped"))},bubbles:!0}))}function Bn(s){let t=s.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var re=class extends g{#e=null;setup(){this.#e=mt(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){Z(this,!0)}unflip(){Z(this,!1)}toggle(){Q(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Z(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Z(this,!!t)}};b("content-swap",re);function Ws(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(s=>{s.querySelector(":scope > [data-face]")&&(mt(s),s.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ws):Ws();var Ys=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.hasAttribute("data-swap")&&!i.matches("content-swap")&&!i.hasAttribute("data-swap-init")&&i.querySelector(":scope > [data-face]")&&(mt(i),i.setAttribute("data-swap-init","")),i.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(mt(n),n.setAttribute("data-swap-init",""))})}});document.body?Ys.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{Ys.observe(document.body,{childList:!0,subtree:!0})});var On=0,ae=class extends g{#e;#t=[];#s;#r;#i;#n;#a;#c=null;#o=0;#u=!1;#h=!1;#p=null;get currentIndex(){return this.#o}get slideCount(){return this.#t.length}get playing(){return this.#c!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#u=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#h=this.hasAttribute("transition")&&!!document.startViewTransition,this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Carousel"),this.#e=document.createElement("div"),this.#e.className="carousel-track",this.#e.setAttribute("tabindex","0"),this.#e.setAttribute("aria-label","Slides"),t.forEach((r,a)=>{r.setAttribute("role","group"),r.setAttribute("aria-roledescription","slide"),r.setAttribute("aria-label",`${a+1} of ${t.length}`),this.#e.appendChild(r)}),this.#t=[...this.#e.children],this.#s=document.createElement("button"),this.#s.className="carousel-prev",this.#s.setAttribute("aria-label","Previous slide"),this.#s.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#r=document.createElement("button"),this.#r.className="carousel-next",this.#r.setAttribute("aria-label","Next slide"),this.#r.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#i=document.createElement("div"),this.#i.className="carousel-indicators",this.#i.setAttribute("aria-label","Slide indicators"),this.#t.forEach((r,a)=>{let o=document.createElement("button");o.className="carousel-dot",o.setAttribute("aria-label",`Go to slide ${a+1}`),o.setAttribute("aria-current",a===0?"true":"false"),this.listen(o,"click",()=>this.goTo(a)),this.#i.appendChild(o)})),this.#n=document.createElement("div"),this.#n.className="carousel-live",this.#n.setAttribute("aria-live","polite"),this.#n.setAttribute("aria-atomic","true"),this.appendChild(this.#s),this.appendChild(this.#e),this.appendChild(this.#r),this.#i&&this.appendChild(this.#i),this.appendChild(this.#n),this.listen(this.#s,"click",()=>this.prev()),this.listen(this.#r,"click",()=>this.next()),this.listen(this.#e,"keydown",this.#g),this.#h){let r=++On,a=this.getAttribute("transition")||"fade",o=a==="slide"?"vt-carousel-slide":a==="scale"?"vt-carousel-scale":"vt-carousel";this.#e.style.viewTransitionName=`carousel-${r}`,this.#e.style.viewTransitionClass=o}this.#h&&Promise.resolve().then(()=>(ti(),Qs)).then(({addSwipeListener:r})=>{this.#p=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#h||(this.#a=new IntersectionObserver(this.#b,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)));let n=this.#S()??(Number(this.getAttribute("start"))||0);if(this.#h){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#l(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);this.#f(),this.hasAttribute("autoplay")&&!this.#u&&this.#y()}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#p&&(this.#p(),this.#p=null),this.#t=[],this.#h=!1}next(){let t=this.hasAttribute("loop");this.#o<this.#t.length-1?this.goTo(this.#o+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#o>0?this.goTo(this.#o-1):t&&this.goTo(this.#t.length-1)}goTo(t,e=!0){if(!(t<0||t>=this.#t.length)){if(this.#h)if(e&&t!==this.#o){let i=t>this.#o?"forward":"backward";document.documentElement.dataset.vtDirection=i,D(()=>{this.#d(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#d(t);else{let i=this.#t[t].offsetLeft-this.#e.offsetLeft,n=e&&!this.#u?"smooth":"instant";this.#e.scrollTo({left:i,behavior:n})}this.#l(t)}}#d(t){this.#t.forEach((e,i)=>{e.hidden=i!==t})}play(){if(this.#c||this.#u)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#c=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#c&&(clearInterval(this.#c),this.#c=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#v()}#l(t){this.#o=t,this.#f(),this.#m(),this.#n&&(this.#n.textContent=`Slide ${t+1} of ${this.#t.length}`),this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:t,slide:this.#t[t]},bubbles:!0}))}#f(){let t=this.hasAttribute("loop"),e=this.#o===0,i=this.#o===this.#t.length-1;if(this.#s&&(this.#s.disabled=!t&&e),this.#r&&(this.#r.disabled=!t&&i),this.#i){let n=this.#i.children;for(let r=0;r<n.length;r++){let a=r===this.#o;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#b=t=>{for(let e of t)if(e.isIntersecting){let i=this.#t.indexOf(e.target);i!==-1&&i!==this.#o&&this.#l(i)}};#g=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#t.length-1);break}};#y(){this.play(),this.listen(this,"mouseenter",()=>this.pause()),this.listen(this,"mouseleave",()=>{this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"focusin",()=>this.pause()),this.listen(this,"focusout",t=>{!this.contains(t.relatedTarget)&&this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"touchstart",()=>this.pause(),{passive:!0})}#S(){let t=this.getAttribute("persist");if(!t)return null;try{let e=localStorage.getItem(`carousel:${t}`);return e!==null?Number(e):null}catch{return null}}#m(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#o))}catch{}}#v(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};b("carousel-wc",ae);function ei(s,t,e){"role"in ElementInternals.prototype?t.role=e:s.setAttribute("role",e)}var oe=class extends g{static formAssociated=!0;#e;#t;#s;#r=[];#i=[];#n=-1;#a=!1;#c=!1;#o="";#u="";#h="";#p;#d;#l=[];constructor(){super(),this.#e=this.attachInternals()}get#f(){return this.hasAttribute("multiple")}setup(){if(this.#t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input"),!this.#t||(this.#s=this.querySelector(":scope > ul, :scope > ol"),!this.#s))return!1;this.#c=N,this.#c&&this.#s.setAttribute("popover","manual"),this.#f&&(this.#p=document.createElement("div"),this.#p.className="tags-input-area",this.insertBefore(this.#p,this.#s),this.#p.appendChild(this.#t),this.#d=document.createElement("div"),this.#d.setAttribute("aria-live","polite"),this.#d.setAttribute("aria-atomic","true"),this.#d.className="sr-only",this.appendChild(this.#d));let t=this.getAttribute("placeholder");t&&!this.#t.getAttribute("placeholder")&&this.#t.setAttribute("placeholder",t);let e=crypto.randomUUID().slice(0,8);if(this.#s.id||(this.#s.id=`combobox-listbox-${e}`),ei(this.#t,this.#e,"combobox"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-autocomplete","list"),this.#t.setAttribute("aria-controls",this.#s.id),this.#t.setAttribute("autocomplete","off"),this.#s.setAttribute("role","listbox"),this.#f&&this.#s.setAttribute("aria-multiselectable","true"),this.#b(),!this.#f){let i=this.getAttribute("value");i&&this.#T(i,!1),this.#h=this.#o}this.listen(this.#t,"input",this.#v),this.listen(this.#t,"keydown",this.#E),this.listen(this.#t,"focus",this.#F),this.listen(this.#t,"click",this.#P),this.listen(this.#s,"click",this.#x),this.listen(this.#s,"pointerdown",this.#B),this.listen(document,"click",this.#N),this.#c&&this.listen(this.#s,"toggle",this.#H),this.#w(),this.#A(),this.#k()}teardown(){window.removeEventListener("scroll",this.#q,{capture:!0}),window.removeEventListener("resize",this.#q)}#b(){this.#r=Array.from(this.#s.querySelectorAll(":scope > li[data-value]")),this.#r.forEach((t,e)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#s.id}-option-${e}`)}),this.#i=[...this.#r]}#g(t,e){if(this.#l.some(o=>o.value===t))return;let i=this.#S();if(i&&this.#l.length>=i)return;this.#l.push({value:t,label:e});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=e+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${e}`),r.innerHTML="&times;",r.addEventListener("click",o=>{o.stopPropagation(),this.#y(t)}),n.appendChild(r),this.#p.insertBefore(n,this.#t);let a=this.#r.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#m(`${e} added`),this.#t.value="",this.#C(""),this.#w(),this.#A(),this.#O(),i&&this.#l.length>=i&&(this.#t.disabled=!0,this.#k())}#y(t){let e=this.#l.findIndex(o=>o.value===t);if(e===-1)return;let i=this.#l.splice(e,1)[0],n=this.#p.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#r.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#m(`${i.label} removed`),this.#S()&&this.#t.disabled&&(this.#t.disabled=!1),this.#C(this.#t.value.trim()),this.#w(),this.#A(),this.#O(),this.#t.focus()}#S(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#m(t){this.#d&&(this.#d.textContent="",requestAnimationFrame(()=>{this.#d.textContent=t}))}#v=()=>{let t=this.#t.value.trim();if(!this.#f&&this.#o){let e=this.#s.querySelector('[aria-selected="true"]');e&&e.setAttribute("aria-selected","false"),this.#o="",this.#u="",this.removeAttribute("value"),this.#w(),this.#A()}this.#C(t),this.#D()};#E=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#a||this.#D(),this.#_(this.#n+1);break;case"ArrowUp":t.preventDefault(),this.#a||this.#D(),this.#_(this.#n-1);break;case"Home":this.#a&&(t.preventDefault(),this.#_(0));break;case"End":this.#a&&(t.preventDefault(),this.#_(this.#i.length-1));break;case"Enter":if(t.preventDefault(),this.#a&&this.#n>=0&&this.#i[this.#n]){let e=this.#i[this.#n];this.#f?this.#g(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e)}else if(this.#f&&this.hasAttribute("custom")&&this.#t.value.trim()){let e=this.#t.value.trim();this.#g(e,e)}break;case"Backspace":if(this.#f&&!this.#t.value&&this.#l.length>0){let e=this.#l[this.#l.length-1];this.#y(e.value)}break;case",":if(this.#f&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let e=this.#t.value.trim();this.#g(e,e)}break;case"Escape":this.#a&&(t.preventDefault(),t.stopPropagation(),this.#k(),this.#t.focus());break;case"Tab":this.#a&&this.#k();break}};#F=()=>{this.#f?(this.#C(this.#t.value.trim()),this.#D()):(this.#t.value||!this.#o)&&(this.#C(this.#t.value.trim()),this.#D())};#P=()=>{this.#a||(this.#C(this.#t.value.trim()),this.#D())};#x=t=>{let e=t.target.closest("li[data-value]");e&&this.#i.includes(e)&&(this.#f?this.#g(e.getAttribute("data-value"),e.textContent.trim()):this.#R(e))};#B=t=>{t.preventDefault()};#N=t=>{this.#a&&!this.contains(t.target)&&this.#k()};#C(t){let e=this.getAttribute("filter")||"contains",i=t.toLowerCase(),n=this.#f?new Set(this.#l.map(r=>r.value)):null;this.#i=[],this.#r.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?e==="startsWith"?c=o.startsWith(i):c=o.includes(i):c=!0,r.hidden=!c,c&&this.#i.push(r)}),this.#n=-1,this.#M()}#_(t){if(this.#i.length===0)return;t<0&&(t=this.#i.length-1),t>=this.#i.length&&(t=0),this.#n>=0&&this.#i[this.#n]&&this.#i[this.#n].removeAttribute("data-active"),this.#n=t;let e=this.#i[t];e.setAttribute("data-active",""),e.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",e.id)}#M(){this.#r.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#R(t){let e=t.getAttribute("data-value"),i=t.textContent.trim();this.#r.forEach(n=>n.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#o=e,this.#u=i,this.#t.value=i,this.setAttribute("value",e),this.#w(),this.#A(),this.#k(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:e,label:i}}))}#T(t,e=!0){let i=this.#r.find(n=>n.getAttribute("data-value")===t);i&&(e?this.#R(i):(i.setAttribute("aria-selected","true"),this.#o=t,this.#u=i.textContent.trim(),this.#t.value=this.#u,this.setAttribute("value",t)))}#q=()=>this.#I();#D(){if(!this.#a){if(this.#a=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#s.hidden=!1,this.#c){this.#I();try{this.#s.showPopover()}catch{}window.addEventListener("scroll",this.#q,{capture:!0,passive:!0}),window.addEventListener("resize",this.#q,{passive:!0})}this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0}))}}#k(){if(!(!this.#a&&this.#s.hidden)){if(this.#a=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#s.hidden=!0,this.#n=-1,this.#M(),this.#c){try{this.#s.hidePopover()}catch{}window.removeEventListener("scroll",this.#q,{capture:!0}),window.removeEventListener("resize",this.#q)}this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0}))}}get#L(){return this.#f&&this.#p?this.#p:this.#t}#I(){if(!this.#c)return;let t=this.#L;if(!t)return;let e=t.getBoundingClientRect();this.#s.style.setProperty("--combobox-top",`${e.bottom+2}px`),this.#s.style.setProperty("--combobox-left",`${e.left}px`),this.#s.style.setProperty("--combobox-width",`${e.width}px`)}#H=t=>{t.newState==="closed"&&this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#s.hidden=!0,this.#n=-1,this.#M(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#w(){if(this.#f)if(this.#l.length>0){let t=new FormData,e=this.getAttribute("name")||"";for(let i of this.#l)t.append(e,i.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#o?this.#e.setFormValue(this.#o,this.#u):this.#e.setFormValue(null)}#A(){this.hasAttribute("required")?this.#f?this.#l.length===0?this.#e.setValidity({valueMissing:!0},"Please select at least one option",this.#t):this.#e.setValidity({}):this.#o?this.#e.setValidity({}):this.#e.setValidity({valueMissing:!0},"Please select an option",this.#t):this.#e.setValidity({})}#O(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#l.map(t=>t.value),labels:this.#l.map(t=>t.label)}}))}formResetCallback(){this.#f?(this.#p.querySelectorAll(".tag").forEach(t=>t.remove()),this.#l=[],this.#t.value="",this.#t.disabled=!1):(this.#o="",this.#u="",this.#t.value="",this.removeAttribute("value")),this.#r.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#i=[...this.#r],this.#n=-1,this.#M(),this.#k(),!this.#f&&this.#h&&this.#T(this.#h,!1),this.#w(),this.#A()}formStateRestoreCallback(t){t&&(this.#f||(this.#T(t,!1),this.#w(),this.#A()))}get value(){return this.#o}set value(t){t?this.#T(t):(this.#r.forEach(e=>e.setAttribute("aria-selected","false")),this.#o="",this.#u="",this.#t.value="",this.removeAttribute("value"),this.#w(),this.#A())}get label(){return this.#u}get values(){return this.#l.map(t=>t.value)}get labels(){return this.#l.map(t=>t.label)}static get observedAttributes(){return["value"]}attributeChangedCallback(t,e,i){t==="value"&&this.#t&&i!==this.#o&&i&&(this.#T(i,!1),this.#w(),this.#A())}};b("combo-box",oe);function Fn(){try{let s=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return s.hourCycle==="h12"||s.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function k(s){return String(s).padStart(2,"0")}function V(s){if(!s)return null;let t=s.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function tt(s,t,e,i){return i?`${k(s)}:${k(t)}:${k(e)}`:`${k(s)}:${k(t)}`}function Rn(s,t,e,i,n){if(n==="12h"){let r=s>=12?"PM":"AM",a=s%12||12;return i?`${a}:${k(t)}:${k(e)} ${r}`:`${a}:${k(t)} ${r}`}return tt(s,t,e,i)}function si(s){let t=s.trim();if(!t)return null;let e=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),i=null,n=t;e&&(i=e[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,e.index).trim());let r=n.split(/[:.]/);if(r.length<1||r.length>3)return null;let a=Number(r[0]),o=r.length>1?Number(r[1]):0,c=r.length>2?Number(r[2]):0;if(isNaN(a)||isNaN(o)||isNaN(c)||o<0||o>59||c<0||c>59)return null;let l=a;if(i){if(l<1||l>12)return null;i==="AM"?l=l===12?0:l:l=l===12?12:l+12}else if(l<0||l>23)return null;return{h:l,m:o,s:c}}function Hn(s,t,e){return s>e?t:s<t?e:s}var ce=class extends g{static formAssociated=!0;#e;#t;#s;#r;#i;#n;#a=[];#c;#o;#u;#h=0;#p=0;#d=0;#l="AM";#f=null;#b=null;#g=60;#y;#S=0;#m=!1;#v;constructor(){super(),this.#e=this.attachInternals()}setup(){if(this.#t=this.querySelector(':scope > input[type="time"]'),!this.#t)return!1;this.#g=Number(this.#t.getAttribute("step"))||60,this.#u=this.#g<60,this.#f=V(this.#t.getAttribute("min")),this.#b=V(this.#t.getAttribute("max")),this.#o=this.getAttribute("data-format")||Fn();let t=V(this.#t.value);t&&(this.#h=t.h,this.#p=t.m,this.#d=t.s),this.#y=this.#t.value,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#E(),this.#F(),this.#H(),this.#w(),this.#A(),this.#O(),this.listen(document,"click",this.#C),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#s.disabled=!0)}#E(){this.#r=document.createElement("div"),this.#r.className="time-trigger",this.#s=document.createElement("input"),this.#s.type="text",this.#s.className="time-input",this.#s.setAttribute("role","combobox"),this.#s.setAttribute("aria-haspopup","listbox"),this.#s.setAttribute("aria-expanded","false"),this.#s.setAttribute("autocomplete","off"),this.#s.setAttribute("placeholder","Type a time\u2026"),this.#r.appendChild(this.#s),this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="time-trigger-icon",this.#i.setAttribute("aria-label","Toggle time spinner"),this.#i.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","clock"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#i.appendChild(t),this.#r.appendChild(this.#i),this.appendChild(this.#r),this.listen(this.#i,"click",e=>{e.stopPropagation(),this.#m?this.#N():this.#B(),this.#s.focus()}),this.listen(this.#s,"focus",()=>this.#s.select()),this.listen(this.#s,"keydown",this.#_),this.listen(this.#s,"blur",this.#M)}#F(){this.#v=`tp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="time-panel",this.#n.id=this.#v,this.#n.setAttribute("role","group"),this.#n.setAttribute("aria-label","Time spinners"),this.#s.setAttribute("aria-controls",this.#v);let t=this.#o==="12h"?1:0,e=this.#o==="12h"?12:23,i=this.#P("Hours",t,e,1);this.#n.appendChild(i.el),this.#a.push(i),this.#n.appendChild(this.#x());let n=this.#g>=60?Math.max(1,Math.round(this.#g/60)):1,r=this.#P("Minutes",0,59,n);if(this.#n.appendChild(r.el),this.#a.push(r),this.#u){this.#n.appendChild(this.#x());let a=this.#P("Seconds",0,59,this.#g);this.#n.appendChild(a.el),this.#a.push(a)}this.#o==="12h"&&(this.#c=document.createElement("button"),this.#c.type="button",this.#c.className="period-toggle",this.#c.setAttribute("aria-label","Toggle AM/PM"),this.#c.textContent=this.#l,this.#n.appendChild(this.#c),this.listen(this.#c,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#c.textContent=this.#l,this.#h=this.#z(this.#V(),this.#l),this.#I()}),this.listen(this.#c,"keydown",a=>{a.key==="ArrowLeft"&&(a.preventDefault(),this.#$(this.#a.length-1)),a.key==="Escape"&&(a.preventDefault(),this.#N(),this.#s.focus())})),this.appendChild(this.#n)}#P(t,e,i,n){let r=document.createElement("div");r.className="time-spinner",r.setAttribute("role","spinbutton"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin",String(e)),r.setAttribute("aria-valuemax",String(i)),r.setAttribute("tabindex","0");let a=document.createElement("button");a.type="button",a.className="time-inc",a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.innerHTML="&#x25B2;";let o=document.createElement("span");o.className="time-value";let c=document.createElement("button");c.type="button",c.className="time-dec",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.innerHTML="&#x25BC;",r.appendChild(a),r.appendChild(o),r.appendChild(c);let l={el:r,valueEl:o,label:t,min:e,max:i,step:n};return this.listen(a,"click",()=>{this.#k(l,n)}),this.listen(c,"click",()=>{this.#k(l,-n)}),this.listen(r,"keydown",h=>{this.#R(h,l)}),this.listen(r,"focus",()=>{this.#S=this.#a.indexOf(l)}),l}#x(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#B(){this.#m||(this.#m=!0,this.#n.setAttribute("data-open",""),this.#s.setAttribute("aria-expanded","true"))}#N(){this.#m&&(this.#m=!1,this.#n.removeAttribute("data-open"),this.#s.setAttribute("aria-expanded","false"))}#C=t=>{this.#m&&!this.contains(t.target)&&this.#N()};#_=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let e=si(this.#s.value);e&&(this.#h=e.h,this.#p=e.m,this.#d=e.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#I()),this.#w(),this.#m&&this.#N();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#m||this.#B(),requestAnimationFrame(()=>this.#$(0));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#m&&this.#N(),this.#w();return;case"Tab":this.#m&&this.#N();return}};#M=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#s.value.trim();if(e){let i=si(e);i&&(this.#h=i.h,this.#p=i.m,this.#d=i.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#A(),this.#O(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:tt(this.#h,this.#p,this.#d,this.#u),hours:this.#h,minutes:this.#p,seconds:this.#d}})))}this.#w(),this.#m&&this.#N(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#R=(t,e)=>{let i=this.#a.indexOf(e);switch(t.key){case"ArrowUp":t.preventDefault(),this.#k(e,e.step);break;case"ArrowDown":t.preventDefault(),this.#k(e,-e.step);break;case"ArrowRight":t.preventDefault(),i<this.#a.length-1?this.#$(i+1):this.#c&&this.#c.focus();break;case"ArrowLeft":t.preventDefault(),i>0&&this.#$(i-1);break;case"PageUp":t.preventDefault(),this.#k(e,e.step*(e.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#k(e,-e.step*(e.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#L(e,e.min);break;case"End":t.preventDefault(),this.#L(e,e.max);break;case"Escape":t.preventDefault(),this.#N(),this.#s.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#D(t.key,e))}};#T="";#q=0;#D(t,e){clearTimeout(this.#q),this.#T+=t;let i=Number(this.#T);if(this.#T.length>=2||i*10>e.max){let n=Math.min(Math.max(i,e.min),e.max);this.#L(e,n),this.#T=""}else this.#q=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,e.min),e.max);this.#L(e,r),this.#T=""},800)}#k(t,e){let i;t.label==="Hours"?i=this.#o==="12h"?this.#V():this.#h:t.label==="Minutes"?i=this.#p:i=this.#d;let n=Hn(i+e,t.min,t.max);this.#L(t,n)}#L(t,e){t.label==="Hours"?this.#o==="12h"?this.#h=this.#z(e,this.#l):this.#h=e:t.label==="Minutes"?this.#p=e:this.#d=e,this.#I()}#I(){this.#H(),this.#w(),this.#A(),this.#O(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:tt(this.#h,this.#p,this.#d,this.#u),hours:this.#h,minutes:this.#p,seconds:this.#d}}))}#H(){let t=this.#o==="12h"?this.#V():this.#h;this.#a[0].valueEl.textContent=k(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#o==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=k(this.#p),this.#a[1].el.setAttribute("aria-valuenow",String(this.#p)),this.#u&&this.#a[2]&&(this.#a[2].valueEl.textContent=k(this.#d),this.#a[2].el.setAttribute("aria-valuenow",String(this.#d))),this.#c&&(this.#c.textContent=this.#l)}#w(){this.#h!==void 0&&(this.#s.value=Rn(this.#h,this.#p,this.#d,this.#u,this.#o))}#A(){let t=tt(this.#h,this.#p,this.#d,this.#u);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#O(){if((this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#t.value){this.#e.setValidity({valueMissing:!0},"Please select a time",this.#s||this);return}this.#e.setValidity({})}#z(t,e){return e==="AM"?t===12?0:t:t===12?12:t+12}#V(){if(this.#o==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#$(t){this.#a[t]?.el.focus()}formResetCallback(){let t=V(this.#y);t?(this.#h=t.h,this.#p=t.m,this.#d=t.s):(this.#h=0,this.#p=0,this.#d=0),this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#I()}formStateRestoreCallback(t){if(!t)return;let e=V(t);e&&(this.#h=e.h,this.#p=e.m,this.#d=e.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#I())}get value(){return tt(this.#h,this.#p,this.#d,this.#u)}set value(t){let e=V(t);e&&(this.#h=e.h,this.#p=e.m,this.#d=e.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#I())}};b("time-picker",ce);var zn=["Su","Mo","Tu","We","Th","Fr","Sa"],Vn=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],de=["january","february","march","april","may","june","july","august","september","october","november","december"];function T(s){let t=s.getFullYear(),e=String(s.getMonth()+1).padStart(2,"0"),i=String(s.getDate()).padStart(2,"0");return`${t}-${e}-${i}`}function L(s){if(!s)return null;let[t,e,i]=s.split("-").map(Number);return new Date(t,e-1,i)}function vt(s,t){return new Date(s,t+1,0).getDate()}function Un(){try{let s=new Intl.Locale(navigator.language);if(s.weekInfo)return s.weekInfo.firstDay%7}catch{}return 0}function Wn(s){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(s)}catch{return T(s)}}function yt(s,t){return s&&t&&s.getFullYear()===t.getFullYear()&&s.getMonth()===t.getMonth()&&s.getDate()===t.getDate()}function Yn(){let s=new Map;de.forEach((t,e)=>{s.set(t,e),s.set(t.slice(0,3),e)});try{for(let t=0;t<12;t++){let e=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(2e3,t,1)).toLowerCase(),i=new Intl.DateTimeFormat(void 0,{month:"short"}).format(new Date(2e3,t,1)).toLowerCase().replace(".","");s.set(e,t),s.set(i,t)}}catch{}return s}var le=Yn();function he(s){let t=s.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=L(t);return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}if(/^\d{4}\/\d{2}\/\d{2}$/.test(t)){let a=L(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let e=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,i=t.match(e);if(i){let a=le.get(i[1].toLowerCase());if(a!==void 0){let o=new Date(Number(i[3]),a,Number(i[2]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let n=/^(\d{1,2})\s+([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(i=t.match(n),i){let a=le.get(i[2].toLowerCase());if(a!==void 0){let o=new Date(Number(i[3]),a,Number(i[1]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let r=/^([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(i=t.match(r),i){let a=le.get(i[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(i[2]),month:a}}}return{date:null,partial:null}}var ue=class extends g{static formAssociated=!0;#e;#t;#s;#r;#i;#n;#a;#c;#o;#u;#h=!1;#p=!1;#d=null;#l=null;#f;#b;#g=null;#y=null;#S=new Map;#m=new Map;#v;#E;constructor(){super(),this.#e=this.attachInternals()}setup(){if(this.#t=this.querySelector(':scope > input[type="date"]'),!this.#t)return!1;this.#g=L(this.#t.getAttribute("min")),this.#y=L(this.#t.getAttribute("max")),this.#E=Un();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#S.set(r,a||null)});let e=this.getAttribute("data-highlight-dates");e&&e.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#m.set(r,a||null)}),this.#d=L(this.#t.value),this.#v=this.#t.value;let i=new Date;this.#y&&i>this.#y&&(i=this.#y),this.#g&&i<this.#g&&(i=this.#g),this.#f=this.#d?this.#d.getFullYear():i.getFullYear(),this.#b=this.#d?this.#d.getMonth():i.getMonth(),this.#l=this.#d||i,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#F(),this.#P(),this.#T(),this.#V(),this.#$(),this.#p=N,this.#p&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#A),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#s.disabled=!0)}teardown(){window.removeEventListener("scroll",this.#L,{capture:!0}),window.removeEventListener("resize",this.#L)}#F(){this.#i=document.createElement("div"),this.#i.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","Type a date\u2026"),this.#i.appendChild(this.#s),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="date-trigger-icon",this.#r.setAttribute("aria-label","Toggle calendar"),this.#r.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#r.appendChild(t),this.#i.appendChild(this.#r),this.appendChild(this.#i),this.listen(this.#r,"click",e=>{e.stopPropagation(),this.#h?this.#D():this.#q(),this.#s.focus()}),this.listen(this.#s,"focus",()=>this.#s.select()),this.listen(this.#s,"input",this.#I),this.listen(this.#s,"keydown",this.#H),this.listen(this.#s,"blur",this.#w)}#P(){this.#a=`dp-${Math.random().toString(36).slice(2,8)}`,this.#n=document.createElement("div"),this.#n.className="calendar",this.#n.id=this.#a,this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-modal","false"),this.#n.setAttribute("aria-label","Choose date"),this.#n.hidden=!0,this.#s.setAttribute("aria-controls",this.#a);let t=document.createElement("div");t.className="calendar-header";let e=document.createElement("button");e.type="button",e.className="calendar-nav",e.setAttribute("aria-label","Previous month");let i=document.createElement("icon-wc");i.setAttribute("name","chevron-left"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),e.appendChild(i);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#o=document.createElement("span"),this.#o.className="calendar-month",this.#u=document.createElement("select"),this.#u.className="calendar-year",this.#u.setAttribute("aria-label","Year"),this.#C(),n.appendChild(this.#o),n.appendChild(this.#u);let r=document.createElement("button");r.type="button",r.className="calendar-nav",r.setAttribute("aria-label","Next month");let a=document.createElement("icon-wc");a.setAttribute("name","chevron-right"),a.setAttribute("size","sm"),a.setAttribute("aria-hidden","true"),r.appendChild(a),t.appendChild(e),t.appendChild(n),t.appendChild(r),this.#n.appendChild(t);let o=document.createElement("table");o.setAttribute("role","grid"),o.setAttribute("aria-labelledby",`${this.#a}-title`);let c=document.createElement("thead"),l=document.createElement("tr");for(let h=0;h<7;h++){let d=(this.#E+h)%7,u=document.createElement("th");u.setAttribute("abbr",Vn[d]),u.setAttribute("scope","col"),u.textContent=zn[d],l.appendChild(u)}c.appendChild(l),o.appendChild(c),this.#c=document.createElement("tbody"),o.appendChild(this.#c),this.#n.appendChild(o),this.appendChild(this.#n),this.#x(),this.listen(e,"click",()=>this.#_(-1)),this.listen(r,"click",()=>this.#_(1)),this.listen(this.#u,"change",()=>{this.#f=Number(this.#u.value);let h=vt(this.#f,this.#b),d=Math.min(this.#l.getDate(),h);this.#l=new Date(this.#f,this.#b,d),this.#x()}),this.listen(this.#c,"click",this.#O),this.listen(this.#n,"keydown",this.#z)}#x(){try{this.#o.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#f,this.#b,1))}catch{this.#o.textContent=de[this.#b].charAt(0).toUpperCase()+de[this.#b].slice(1)}this.#u.querySelector(`option[value="${this.#f}"]`)||this.#C(),this.#u.value=String(this.#f),this.#c.innerHTML="";let t=vt(this.#f,this.#b),i=(new Date(this.#f,this.#b,1).getDay()-this.#E+7)%7,n=new Date,r=document.createElement("tr");for(let o=0;o<i;o++)r.appendChild(document.createElement("td"));for(let o=1;o<=t;o++){let c=new Date(this.#f,this.#b,o),l=T(c),h=document.createElement("td"),d=document.createElement("button");d.type="button",d.setAttribute("data-date",l),d.textContent=String(o),yt(c,n)&&d.setAttribute("aria-current","date"),yt(c,this.#d)&&d.setAttribute("aria-selected","true");let u=this.#N(c,l);if(u.disabled&&(d.setAttribute("aria-disabled","true"),d.setAttribute("disabled",""),u.reason&&d.setAttribute("data-disabled-reason",u.reason)),this.#m.has(l)){let m=this.#m.get(l);d.setAttribute("data-highlight",m||"")}yt(c,this.#l)?(d.setAttribute("tabindex","0"),yt(c,this.#d)||d.setAttribute("data-focused","")):d.setAttribute("tabindex","-1"),h.appendChild(d),r.appendChild(h),(i+o)%7===0&&(this.#c.appendChild(r),r=document.createElement("tr"))}let a=(i+t)%7;if(a>0){for(let o=a;o<7;o++)r.appendChild(document.createElement("td"));this.#c.appendChild(r)}}#B(t,e){return this.#N(t,e).disabled}#N(t,e){return this.#S.has(e)?{disabled:!0,reason:this.#S.get(e)}:this.#g&&t<this.#g?{disabled:!0,reason:null}:this.#y&&t>this.#y?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#C(){this.#u.innerHTML="";let t=new Date().getFullYear(),e=this.#g?this.#g.getFullYear():t-100,i=this.#y?this.#y.getFullYear():t+10;for(let n=e;n<=i;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#u.appendChild(r)}}#_(t){this.#b+=t,this.#b>11?(this.#b=0,this.#f++):this.#b<0&&(this.#b=11,this.#f--);let e=vt(this.#f,this.#b),i=Math.min(this.#l.getDate(),e);this.#l=new Date(this.#f,this.#b,i),this.#x(),this.#R(this.#l)}#M(t){let e=T(t);this.#B(t,e)||(this.#d=t,this.#l=t,this.#T(),this.#V(),this.#$(),this.#x(),this.#D(),this.#s.focus(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:e,date:new Date(t)}})))}#R(t){let e=T(t),i=this.#c.querySelector(`[data-date="${e}"]`);i&&(this.#c.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),i.setAttribute("tabindex","0"),i.focus())}#T(){this.#d?this.#s.value=Wn(this.#d):this.#s.value=""}#q(){if(!this.#h){if(this.#h=!0,this.setAttribute("open",""),this.#s.setAttribute("aria-expanded","true"),this.#n.hidden=!1,this.#f=this.#l.getFullYear(),this.#b=this.#l.getMonth(),this.#x(),this.#p){try{this.#n.showPopover()}catch{}this.#k(),window.addEventListener("scroll",this.#L,{capture:!0,passive:!0}),window.addEventListener("resize",this.#L,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#D(){if(this.#h){if(this.#h=!1,this.removeAttribute("open"),this.#s.setAttribute("aria-expanded","false"),this.#n.hidden=!0,this.#p){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#L,{capture:!0}),window.removeEventListener("resize",this.#L)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#k(){if(!this.#p)return;let t=this.#i.getBoundingClientRect(),e=this.#n.getBoundingClientRect(),i=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,l;o<e.height&&c>o?(l=t.top-e.height-i,this.#n.dataset.placement="top"):(l=t.bottom+i,delete this.#n.dataset.placement);let h=t.left;h+e.width>a-n&&(h=a-e.width-n),h<n&&(h=n),this.#n.style.setProperty("--calendar-top",`${l}px`),this.#n.style.setProperty("--calendar-left",`${h}px`)}#L=()=>{this.#h&&this.#k()};#I=()=>{let t=this.#s.value,{date:e,partial:i}=he(t);if(e)this.#l=e,this.#f=e.getFullYear(),this.#b=e.getMonth(),this.#x();else if(i){this.#f=i.year,this.#b=i.month;let n=vt(i.year,i.month),r=Math.min(this.#l.getDate(),n);this.#l=new Date(i.year,i.month,r),this.#x()}!this.#h&&t.length>0&&this.#q()};#H=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:e}=he(this.#s.value);e&&!this.#B(e,T(e))&&this.#M(e);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#q(),requestAnimationFrame(()=>this.#R(this.#l));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#h&&this.#D(),this.#T();return;case"Tab":this.#h&&this.#D();return}};#w=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#s.value.trim();if(e){let{date:i}=he(e);i&&!this.#B(i,T(i))&&(this.#d=i,this.#l=i,this.#V(),this.#$(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:T(i),date:new Date(i)}})))}this.#T(),this.#h&&this.#D(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#A=t=>{this.#h&&!this.contains(t.target)&&this.#D()};#O=t=>{let e=t.target.closest("button[data-date]");!e||e.hasAttribute("disabled")||this.#M(L(e.getAttribute("data-date")))};#z=t=>{if(t.key==="Tab"){this.#D();return}let e=this.#l,i;switch(t.key){case"ArrowRight":i=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1);break;case"ArrowLeft":i=new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);break;case"ArrowDown":i=new Date(e.getFullYear(),e.getMonth(),e.getDate()+7);break;case"ArrowUp":i=new Date(e.getFullYear(),e.getMonth(),e.getDate()-7);break;case"PageDown":t.shiftKey?i=new Date(e.getFullYear()+1,e.getMonth(),e.getDate()):i=new Date(e.getFullYear(),e.getMonth()+1,e.getDate());break;case"PageUp":t.shiftKey?i=new Date(e.getFullYear()-1,e.getMonth(),e.getDate()):i=new Date(e.getFullYear(),e.getMonth()-1,e.getDate());break;case"Home":i=new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+this.#E);break;case"End":i=new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-e.getDay()+this.#E));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#M(e);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#D(),this.#s.focus();return;default:return}t.preventDefault(),t.stopPropagation(),i&&(this.#g&&i<this.#g&&(i=this.#g),this.#y&&i>this.#y&&(i=this.#y),this.#l=i,(i.getMonth()!==this.#b||i.getFullYear()!==this.#f)&&(this.#b=i.getMonth(),this.#f=i.getFullYear(),this.#x()),this.#R(i))};#V(){let t=this.#d?T(this.#d):"";this.#e.setFormValue(t||null),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#$(){(this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#d?this.#e.setValidity({valueMissing:!0},"Please select a date",this.#s||this):this.#e.setValidity({})}formResetCallback(){this.#d=L(this.#v);let t=new Date;this.#l=this.#d||t,this.#f=this.#l.getFullYear(),this.#b=this.#l.getMonth(),this.#T(),this.#V(),this.#$(),this.#h&&this.#x()}formStateRestoreCallback(t){t&&(this.#d=L(t),this.#d&&(this.#l=this.#d,this.#f=this.#d.getFullYear(),this.#b=this.#d.getMonth(),this.#T(),this.#V(),this.#$()))}get value(){return this.#d?T(this.#d):""}set value(t){let e=L(t);e&&this.#M(e)}get min(){return this.#g?T(this.#g):""}set min(t){this.#g=t?L(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#x()}get max(){return this.#y?T(this.#y):""}set max(t){this.#y=t?L(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#x()}};b("date-picker",ue);function Et(s,t,e){t/=100,e/=100;let i=a=>(a+s/30)%12,n=t*Math.min(e,1-e),r=a=>e-n*Math.max(-1,Math.min(i(a)-3,9-i(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function pe(s,t,e){s/=255,t/=255,e/=255;let i=Math.max(s,t,e),n=Math.min(s,t,e),r=(i+n)/2,a=0,o=0;if(i!==n){let c=i-n;switch(o=r>.5?c/(2-i-n):c/(i+n),i){case s:a=((t-e)/c+(t<e?6:0))/6;break;case t:a=((e-s)/c+2)/6;break;case e:a=((s-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function jn(s){s=s.replace(/^#/,""),s.length===3&&(s=s[0]+s[0]+s[1]+s[1]+s[2]+s[2]);let t=parseInt(s,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function Gn(s,t,e){return"#"+[s,t,e].map(i=>Math.max(0,Math.min(255,Math.round(i))).toString(16).padStart(2,"0")).join("")}function $(s){let{r:t,g:e,b:i}=jn(s);return pe(t,e,i)}function O(s,t,e){let{r:i,g:n,b:r}=Et(s,t,e);return Gn(i,n,r)}function M(s,t,e){return Math.max(t,Math.min(e,s))}var fe=class extends g{static formAssociated=!0;#e;#t;#s;#r;#i;#n;#a;#c;#o;#u;#h;#p;#d;#l;#f;#b;#g;#y=!1;#S=!1;#m=0;#v=100;#E=50;#F;constructor(){super(),this.#e=this.attachInternals()}setup(){if(this.#t=this.querySelector(':scope > input[type="color"]'),!this.#t)return!1;let t=this.#t.value||"#000000";this.#F=t;let e=$(t);this.#m=e.h,this.#v=e.s,this.#E=e.l,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#P(),this.#x(),this.#A(),this.#W(),this.#S=N,this.#S&&this.#n.setAttribute("popover","manual"),this.listen(document,"click",this.#U),(this.#t.disabled||this.hasAttribute("disabled"))&&this.setAttribute("data-disabled","")}teardown(){window.removeEventListener("scroll",this.#$,{capture:!0}),window.removeEventListener("resize",this.#$)}#P(){this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="color-trigger",this.#s.setAttribute("aria-haspopup","dialog"),this.#s.setAttribute("aria-expanded","false"),this.#r=document.createElement("span"),this.#r.className="color-swatch",this.#i=document.createElement("span"),this.#i.className="color-hex",this.#s.appendChild(this.#r),this.#s.appendChild(this.#i),this.appendChild(this.#s),this.listen(this.#s,"click",()=>{this.#y?this.#z():this.#O()})}#x(){this.#n=document.createElement("div"),this.#n.className="color-panel",this.#n.setAttribute("role","dialog"),this.#n.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("tabindex","0"),this.#c=document.createElement("div"),this.#c.className="color-area-thumb",this.#a.appendChild(this.#c),this.#n.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#o=document.createElement("div"),this.#o.className="color-hue",this.#o.setAttribute("role","slider"),this.#o.setAttribute("aria-label","Hue"),this.#o.setAttribute("aria-valuemin","0"),this.#o.setAttribute("aria-valuemax","360"),this.#o.setAttribute("tabindex","0"),this.#u=document.createElement("div"),this.#u.className="color-hue-thumb",this.#o.appendChild(this.#u),t.appendChild(this.#o),this.#n.appendChild(t);let e=document.createElement("div");e.className="color-inputs",this.#h=this.#B("Hex","hex",7),this.#p=this.#N("R","r",0,255),this.#d=this.#N("G","g",0,255),this.#l=this.#N("B","b",0,255),e.appendChild(this.#h.wrapper),e.appendChild(this.#p.wrapper),e.appendChild(this.#d.wrapper),e.appendChild(this.#l.wrapper),this.#n.appendChild(e);let i=this.querySelector(":scope > datalist");if(i){this.#f=document.createElement("div"),this.#f.className="color-swatches",this.#f.setAttribute("role","listbox"),this.#f.setAttribute("aria-label","Preset colors");for(let r of i.querySelectorAll("option[value]")){let a=document.createElement("button");a.type="button",a.setAttribute("role","option"),a.style.background=r.value,a.setAttribute("aria-label",r.textContent||r.value),a.setAttribute("data-color",r.value),this.#f.appendChild(a)}this.#n.appendChild(this.#f),this.listen(this.#f,"click",this.#L)}let n=document.createElement("div");n.className="color-actions","EyeDropper"in window&&(this.#b=document.createElement("button"),this.#b.type="button",this.#b.className="color-eyedropper",this.#b.setAttribute("aria-label","Pick color from screen"),this.#b.textContent="\u{1F4A7}",n.appendChild(this.#b),this.listen(this.#b,"click",this.#I)),this.#g=document.createElement("button"),this.#g.type="button",this.#g.className="color-copy",this.#g.setAttribute("aria-label","Copy hex value"),this.#g.textContent="Copy",n.appendChild(this.#g),this.listen(this.#g,"click",this.#H),this.#n.appendChild(n),this.appendChild(this.#n),this.listen(this.#a,"pointerdown",this.#C),this.listen(this.#a,"keydown",this.#M),this.listen(this.#o,"pointerdown",this.#R),this.listen(this.#o,"keydown",this.#q),this.listen(this.#h.input,"change",this.#D),this.listen(this.#p.input,"change",this.#k),this.listen(this.#d.input,"change",this.#k),this.listen(this.#l.input,"change",this.#k)}#B(t,e,i){let n=document.createElement("label");n.className="color-input-label";let r=document.createElement("span");r.textContent=t;let a=document.createElement("input");return a.type="text",a.setAttribute("data-channel",e),a.setAttribute("maxlength",String(i)),a.setAttribute("spellcheck","false"),a.setAttribute("autocomplete","off"),n.appendChild(r),n.appendChild(a),{wrapper:n,input:a}}#N(t,e,i,n){let r=document.createElement("label");r.className="color-input-label";let a=document.createElement("span");a.textContent=t;let o=document.createElement("input");return o.type="number",o.setAttribute("data-channel",e),o.min=String(i),o.max=String(n),r.appendChild(a),r.appendChild(o),{wrapper:r,input:o}}#C=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#_(t);let e=n=>this.#_(n),i=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",e),this.#a.removeEventListener("pointerup",i)};this.#a.addEventListener("pointermove",e),this.#a.addEventListener("pointerup",i)};#_(t){let e=this.#a.getBoundingClientRect(),i=M((t.clientX-e.left)/e.width,0,1),n=M((t.clientY-e.top)/e.height,0,1);this.#v=Math.round(i*100),this.#E=Math.round((1-n)*100),this.#w()}#M=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#v=M(this.#v+e,0,100);break;case"ArrowLeft":t.preventDefault(),this.#v=M(this.#v-e,0,100);break;case"ArrowUp":t.preventDefault(),this.#E=M(this.#E+e,0,100);break;case"ArrowDown":t.preventDefault(),this.#E=M(this.#E-e,0,100);break;default:return}this.#w()};#R=t=>{t.preventDefault(),this.#o.setPointerCapture(t.pointerId),this.#T(t);let e=n=>this.#T(n),i=n=>{this.#o.releasePointerCapture(n.pointerId),this.#o.removeEventListener("pointermove",e),this.#o.removeEventListener("pointerup",i)};this.#o.addEventListener("pointermove",e),this.#o.addEventListener("pointerup",i)};#T(t){let e=this.#o.getBoundingClientRect(),i=M((t.clientX-e.left)/e.width,0,1);this.#m=Math.round(i*360),this.#w()}#q=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#m=(this.#m+e)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#m=(this.#m-e+361)%361;break;default:return}this.#w()};#D=()=>{let t=this.#h.input.value.trim();if(t.startsWith("#")||(t="#"+t),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t)){let e=$(t);this.#m=e.h,this.#v=e.s,this.#E=e.l,this.#w()}};#k=()=>{let t=M(Number(this.#p.input.value)||0,0,255),e=M(Number(this.#d.input.value)||0,0,255),i=M(Number(this.#l.input.value)||0,0,255),n=pe(t,e,i);this.#m=n.h,this.#v=n.s,this.#E=n.l,this.#w()};#L=t=>{let e=t.target.closest("button[data-color]");if(!e)return;let i=e.getAttribute("data-color"),n=$(i);this.#m=n.h,this.#v=n.s,this.#E=n.l,this.#w()};#I=async()=>{try{let e=await new EyeDropper().open(),i=$(e.sRGBHex);this.#m=i.h,this.#v=i.s,this.#E=i.l,this.#w()}catch{}};#H=async()=>{let t=O(this.#m,this.#v,this.#E);try{await navigator.clipboard.writeText(t),this.#g.textContent="Copied!",setTimeout(()=>{this.#g.textContent="Copy"},1500)}catch{}};#w(){this.#A(),this.#W();let t=O(this.#m,this.#v,this.#E),e=Et(this.#m,this.#v,this.#E);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:t,rgb:{r:e.r,g:e.g,b:e.b},hsl:{h:this.#m,s:this.#v,l:this.#E}}}))}#A(){let t=O(this.#m,this.#v,this.#E),e=Et(this.#m,this.#v,this.#E),i=O(this.#m,100,50);this.#r.style.background=t,this.#i.textContent=t,this.#a.style.setProperty("--area-hue",i),this.#c.style.insetInlineStart=`${this.#v}%`,this.#c.style.insetBlockStart=`${100-this.#E}%`,this.#c.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#v}%, Lightness ${this.#E}%`),this.#u.style.insetInlineStart=`${this.#m/360*100}%`,this.#o.setAttribute("aria-valuenow",String(this.#m)),this.#o.setAttribute("aria-valuetext",`Hue ${this.#m}\xB0`),this.#h.input.value=t,this.#p.input.value=String(e.r),this.#d.input.value=String(e.g),this.#l.input.value=String(e.b)}#O(){if(!this.#y){if(this.#y=!0,this.setAttribute("open",""),this.#s.setAttribute("aria-expanded","true"),this.#S){this.#V();try{this.#n.showPopover()}catch{}window.addEventListener("scroll",this.#$,{capture:!0,passive:!0}),window.addEventListener("resize",this.#$,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#z(){if(this.#y){if(this.#y=!1,this.removeAttribute("open"),this.#s.setAttribute("aria-expanded","false"),this.#S){try{this.#n.hidePopover()}catch{}window.removeEventListener("scroll",this.#$,{capture:!0}),window.removeEventListener("resize",this.#$)}this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}}#V(){if(!this.#S)return;let t=this.#s.getBoundingClientRect();this.#n.style.setProperty("--panel-top",`${t.bottom+4}px`),this.#n.style.setProperty("--panel-left",`${t.left}px`)}#$=()=>{this.#y&&this.#V()};#U=t=>{this.#y&&!this.contains(t.target)&&this.#z()};#W(){let t=O(this.#m,this.#v,this.#E);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){let t=$(this.#F);this.#m=t.h,this.#v=t.s,this.#E=t.l,this.#A(),this.#W()}formStateRestoreCallback(t){if(!t)return;let e=$(t);this.#m=e.h,this.#v=e.s,this.#E=e.l,this.#A(),this.#W()}get value(){return O(this.#m,this.#v,this.#E)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let e=$(t);this.#m=e.h,this.#v=e.s,this.#E=e.l,this.#w()}};b("color-picker",fe);var me=class extends g{#e;#t;#s=[];#r=-1;#i=!1;#n=[];#a=!1;setup(){if(this.#e=this.querySelector(":scope > [data-trigger]"),this.#t=this.querySelector(':scope > menu, :scope > ul[role="menu"]'),!this.#e||!this.#t)return!1;this.#a=N,this.#a&&this.#t.setAttribute("popover","auto"),this.#e?.setAttribute("aria-expanded","false"),this.#t.setAttribute("role","menu"),this.#t.id||(this.#t.id=`ctx-menu-${crypto.randomUUID().slice(0,8)}`),this.#t.querySelectorAll(":scope > li[data-group]").forEach(t=>{t.setAttribute("role","presentation"),t.classList.add("ctx-group-label")}),this.#s=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.hasAttribute("data-disabled")),this.#s.forEach(t=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",this.listen(t,"click",this.#h);let e=t.getAttribute("data-shortcut");if(e){let i=document.createElement("kbd");i.className="ctx-kbd",i.textContent=Fs(e),t.appendChild(i);let n=ft(e,()=>t.click());this.#n.push(n)}}),this.#t.querySelectorAll('li:empty:not([data-group]), [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")}),this.listen(this.#e,"contextmenu",this.#c),this.listen(this.#t,"keydown",this.#u),this.listen(window,"scroll",this.#b,{capture:!0}),this.#a?this.listen(this.#t,"toggle",this.#f):(this.listen(document,"click",this.#p),this.listen(document,"contextmenu",this.#d),this.listen(document,"keydown",this.#l))}teardown(){this.#n.forEach(t=>t()),this.#n=[]}#c=t=>{t.preventDefault(),this.#o(t.clientX,t.clientY)};#o(t,e){if(this.#i=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#t.style.setProperty("--ctx-top",`${e}px`),this.#t.style.setProperty("--ctx-left",`${t}px`),this.#a)try{this.#t.showPopover()}catch{}requestAnimationFrame(()=>{let i=this.#t.getBoundingClientRect(),n=t+i.width>window.innerWidth?t-i.width:t,r=e+i.height>window.innerHeight?e-i.height:e;this.#t.style.setProperty("--ctx-top",`${Math.max(0,r)}px`),this.#t.style.setProperty("--ctx-left",`${Math.max(0,n)}px`)}),this.#r=-1,this.#g(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){if(this.#i){if(this.#i=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#r=-1,this.#a)try{this.#t.hidePopover()}catch{}this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0}))}}#u=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#g(this.#r+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#g(this.#r-1);break;case"Home":t.preventDefault(),this.#g(0);break;case"End":t.preventDefault(),this.#g(this.#s.length-1);break;case"Enter":case" ":t.preventDefault(),this.#r>=0&&this.#s[this.#r].click();break;case"Tab":this.close();break}};#h=()=>{this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:this.#s[this.#r]}}))};#p=t=>{this.#i&&!this.#t.contains(t.target)&&this.close()};#d=t=>{this.#i&&!this.#e.contains(t.target)&&this.close()};#l=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close())};#f=t=>{t.newState==="closed"&&this.#i&&(this.#i=!1,this.removeAttribute("data-open"),this.#r=-1,this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#b=()=>{this.#i&&this.close()};#g(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r=t,this.#s[t].focus())}get isOpen(){return this.#i}};b("context-menu",me);var be=class extends g{#e;#t;#s=null;#r=!1;setup(){if(this.#r)return;let t=this.getAttribute("src");if(!t)return!1;this.#s===null&&(this.#s=this.innerHTML),this.hasAttribute("lazy")?this.#n():this.#a(t)}teardown(){this.#e?.disconnect(),this.#t?.abort()}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,i){t==="src"&&i&&e!==i&&this.isConnected&&(this.hasAttribute("lazy")&&!this.#i()?this.#n():this.#a(i))}#i(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#n(){this.#e?.disconnect(),this.#e=new IntersectionObserver(t=>{for(let e of t)if(e.isIntersecting){this.#e.disconnect();let i=this.getAttribute("src");i&&this.#a(i)}},{rootMargin:"200px"}),this.#e.observe(this)}async#a(t){this.#t?.abort(),this.#t=new AbortController,this.setAttribute("data-loading",""),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let e=await fetch(t,{signal:this.#t.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);let i=await e.text(),n=this.getAttribute("mode")||"replace";n==="replace"?this.innerHTML=i:n==="append"?this.insertAdjacentHTML("beforeend",i):n==="prepend"&&this.insertAdjacentHTML("afterbegin",i),this.hasAttribute("allow-scripts")?this.querySelectorAll("script").forEach(r=>{let a=document.createElement("script");for(let o of r.attributes)a.setAttribute(o.name,o.value);a.textContent=r.textContent,r.replaceWith(a)}):this.querySelectorAll("script").forEach(r=>r.remove()),this.removeAttribute("data-loading"),this.setAttribute("data-loaded",""),this.#r=!0,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,html:i}}))}catch(e){if(e.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),(this.getAttribute("mode")||"replace")==="replace"&&this.#s!==null&&!this.#r&&(this.innerHTML=this.#s),this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:e.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};b("include-file",be);var ii="vb-environment",ge={timeOfDay:!1,seasonal:!1},Kn=900*1e3;function F(s,t,e){return s+(t-s)*Math.min(1,Math.max(0,e))}var et={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,init(){let s=this.load();(s.timeOfDay||s.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){try{let s=localStorage.getItem(ii);return s?{...ge,...JSON.parse(s)}:{...ge}}catch{return{...ge}}},save(s){try{localStorage.setItem(ii,JSON.stringify(s))}catch{}return s},setTimeOverride(s){this._timeOverride=s,this._hasActiveSource()&&this._update()},setMonthOverride(s){this._monthOverride=s,this._hasActiveSource()&&this._update()},setSource(s,t){let e={...this.load(),[s]:t};this.save(e),t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(e)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(s){let t=s||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let s=document.documentElement;s.style.removeProperty("--hue-primary"),s.style.removeProperty("--hue-secondary"),s.style.removeProperty("--hue-accent");let t=s.getAttribute("data-theme");if(t){let e=`[data-theme~="${t}"]`;for(let i of document.styleSheets)try{for(let n=0;n<i.cssRules.length;n++){let r=i.cssRules[n];if(r.selectorText?.includes(e)&&!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 s=this.load(),t=0;s.timeOfDay&&(t+=this._getTimeOfDayOffset()),s.seasonal&&(t+=this._getSeasonalOffset());let e=document.documentElement;t!==0&&this._baseHues?(e.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),e.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),e.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let s=document.documentElement;s.style.removeProperty("--hue-primary"),s.style.removeProperty("--hue-secondary"),s.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let s=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return s<5?-20:s<7?F(-20,20,(s-5)/2):s<10?F(20,5,(s-7)/3):s<14?F(5,0,(s-10)/4):s<17?F(0,-5,(s-14)/3):s<19?F(-5,15,(s-17)/2):s<21?F(15,-10,(s-19)/2):F(-10,-20,(s-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let s=this._monthOverride??new Date().getMonth(),e=this._getHemisphere()==="south"?(s+6)%12:s;return e>=2&&e<=4?5:e>=5&&e<=7?10:e>=8&&e<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Kn))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var wt=null;function ri(){return"0.1.0"}function Xn(){let s=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let e of s){let i=e.getAttribute("src");if(i){let n=i.lastIndexOf("/");if(n!==-1){t=i.slice(0,n)+"/sw.js";break}}}return t}function ai(){return wt||(wt=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),wt}function oi(s){return new Promise((t,e)=>{navigator.serviceWorker?.controller?ni(navigator.serviceWorker.controller,s,t,e):ai().then(i=>{let n=i.active||i.waiting||i.installing;n?ni(n,s,t,e):e(new Error("No active service worker"))}).catch(e)})}function ni(s,t,e,i){let n=new MessageChannel;n.port1.onmessage=r=>e(r.data),n.port1.onmessageerror=()=>i(new Error("Message error")),s.postMessage({type:t},[n.port2]),setTimeout(()=>i(new Error("SW message timeout")),5e3)}async function ci(){return oi("GET_STATUS")}async function li(){return oi("CLEAR_CACHE")}async function hi(){let s=await ai();return await s.update(),{updated:!!s.waiting}}function Jn(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Jn()){let s=Xn();window.addEventListener("load",()=>{wt=navigator.serviceWorker.register(s).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}var U=null,Ae="vb-extensions",xt={motionFx:!0,sounds:!1},mi="vb-a11y-themes",Se="vb-sticky",xe=class extends g{#e=null;#t=null;#s=!1;setup(){this.#l(),this.#b(),this.#L(),this.listen(window,"vb:theme-change",this.#k),this.listen(window,"vb:extensions-change",this.#k),this.listen(window,"vb:a11y-themes-change",this.#k)}teardown(){}#r(t){return t!==""&&t!==void 0}#i(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#n(t,e){return t?e==="compact"?"compact":e==="spacious"?"spacious":"default":""}#a(){try{return localStorage.getItem(Se)==="on"}catch{return!1}}#c(t){return t!==""&&t!==void 0}#o(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#u(t,e){return t?e==="flush"?"flush":e==="elevated"?"elevated":"default":""}#h(t){if(!t)return"card";let e=t.split(/\s+/);for(let i of e)if(i==="stretch"||i==="integrated")return i;return"card"}#p(t){return t?t.split(/\s+/).includes("fixed"):!1}#d(t,e){let i=[];return t&&t!=="card"&&i.push(t),e&&i.push("fixed"),i.join(" ")||"card"}#l(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.setAttribute("data-trigger",""),this.#e.setAttribute("aria-label","Site settings"),this.#e.className="settings-trigger",this.#e.innerHTML='<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>',this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#t=document.createElement("div"),this.#t.className="settings-panel",this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#t.id=t,this.#e.setAttribute("aria-controls",t),this.#t.innerHTML=this.#f(),this.appendChild(this.#t)}#f(){let{mode:t,brand:e,fluid:i,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:h}=E.getState(),d=this.#A(),u=this.#U(),m=this.#r(i),y=this.#i(i),p=this.#c(n),f=this.#o(n);return`
121
+ `}#N(t){if(this.#a.length===0)return;t<0&&(t=this.#a.length-1),t>=this.#a.length&&(t=0);let e=this.#r.querySelector("[data-active]");e&&e.removeAttribute("data-active"),this.#s?.removeAttribute("aria-activedescendant"),this.#c=t;let s=this.#r.querySelector(`[data-result-index="${t}"]`);s&&(s.setAttribute("data-active",""),this.#s?.setAttribute("aria-activedescendant",s.id),s.scrollIntoView({block:"nearest"}))}#S(t){t.url&&(this.close(),window.location.href=t.url)}#$(){this.#h&&(clearTimeout(this.#h),this.#h=null)}open(){this.#o||(this.#o=!0,this.setAttribute("open",""),this.#i?.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",requestAnimationFrame(()=>{this.#s?.focus(),this.#s?.select()}),this.#b(),this.dispatchEvent(new CustomEvent("site-search:open",{bubbles:!0})))}close(){this.#o&&(this.#o=!1,this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),document.body.style.overflow="",this.#$(),this.#s.value="",this.#s?.removeAttribute("aria-activedescendant"),this.#a=[],this.#c=-1,this.#r.innerHTML="",this.#i?.focus(),this.dispatchEvent(new CustomEvent("site-search:close",{bubbles:!0})))}get isOpen(){return this.#o}};f("site-search",Oe);function Be(i){if(!i||typeof i!="string")return"";let t=document.createElement("template");return t.innerHTML=i,t.content.querySelectorAll("script, iframe, object, embed, form, base, link, meta, noscript").forEach(n=>n.remove()),t.content.querySelectorAll("*").forEach(n=>{for(let r of[...n.attributes]){if(r.name.startsWith("on")){n.removeAttribute(r.name);continue}if(["href","src","action","formaction","xlink:href"].includes(r.name)){let a=r.value.trim().toLowerCase();(a.startsWith("javascript:")||a.startsWith("data:text/html"))&&n.removeAttribute(r.name);continue}(r.name==="srcdoc"||r.name==="data"&&n.tagName==="OBJECT")&&n.removeAttribute(r.name)}}),t.innerHTML}var va=/^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*|\[\d+\])*$/;function Zs(i){return!i||typeof i!="string"?!1:va.test(i.trim())}function wt(i,t){if(!Zs(t)){console.warn(`[card-list] Unsafe property path rejected: "${t}"`);return}let s=t.replace(/\[(\d+)\]/g,".$1").split("."),n=i;for(let r of s){if(n==null)return;n=n[r]}return n}function wa(i){return i?i.split(",").map(t=>{let[e,s]=t.split(":").map(n=>n.trim());return{attr:e,path:s}}).filter(({attr:t,path:e})=>t&&e):[]}var Pe=class extends m{#e=null;#t=[];#i="id";static get observedAttributes(){return["src","data-items","data-key"]}setup(){if(this.#e=this.querySelector("template"),!this.#e)return console.warn("[card-list] No template found"),!1;this.#i=this.getAttribute("data-key")||"id";let t=this.getAttribute("data-items");if(t){try{this.#t=JSON.parse(t),this.#s()}catch(s){console.error("[card-list] Invalid JSON in data-items:",s)}return}let e=this.getAttribute("src");e&&this.#n(e)}attributeChangedCallback(t,e,s){if(e!==s)if(t==="data-items"&&s)try{this.#t=JSON.parse(s),this.#s()}catch(n){console.error("[card-list] Invalid JSON in data-items:",n)}else t==="src"&&s?this.#n(s):t==="data-key"&&(this.#i=s||"id",this.#s())}async#n(t){try{this.setAttribute("data-loading","");let e=await fetch(t);if(!e.ok)throw new Error(`HTTP ${e.status}`);let s=await e.json();this.#t=Array.isArray(s)?s:s.items||s.data||[],this.#s()}catch(e){console.error("[card-list] Fetch error:",e),this.setAttribute("data-error",e.message)}finally{this.removeAttribute("data-loading")}}#s(){if(!this.#e)return;this.querySelectorAll(":scope > :not(template)").forEach(s=>s.remove());let e=document.createDocumentFragment();for(let s of this.#t){let n=this.#e.content.cloneNode(!0);this.#r(n,s),e.appendChild(n)}this.appendChild(e),this.dispatchEvent(new CustomEvent("card-list:rendered",{detail:{count:this.#t.length},bubbles:!0}))}#r(t,e){t.querySelectorAll("[data-field]").forEach(s=>{let n=s.getAttribute("data-field"),r=wt(e,n);s.textContent=r??""}),t.querySelectorAll("[data-field-attr]").forEach(s=>{let n=wa(s.getAttribute("data-field-attr"));for(let{attr:r,path:a}of n){if(!Zs(a))continue;let o=wt(e,a);o!=null&&s.setAttribute(r,o)}}),t.querySelectorAll("[data-field-html]").forEach(s=>{let n=s.getAttribute("data-field-html"),r=wt(e,n);s.innerHTML=Be(r)}),t.querySelectorAll("[data-field-if]").forEach(s=>{let n=s.getAttribute("data-field-if");wt(e,n)||s.remove()}),t.querySelectorAll("[data-field-unless]").forEach(s=>{let n=s.getAttribute("data-field-unless");wt(e,n)&&s.remove()})}setItems(t){this.#t=Array.isArray(t)?t:[],this.#s()}getItems(){return[...this.#t]}};f("card-list",Pe);var Ea=0;function zt(i,t){return i.matches("content-swap")?t:`data-${t}`}function Vt(i){i.style.viewTransitionName||(i.style.viewTransitionName=`content-swap-${++Ea}`);let t=i.querySelector(':scope > [data-face="front"]'),e=i.querySelector(':scope > [data-face="back"]');if(!t||!e)return;let s=[];function n(o,c,l,h){o.addEventListener(c,l,h),s.push(()=>o.removeEventListener(c,l,h))}let r=[...i.querySelectorAll("[data-swap]")].filter(o=>o!==i&&o.closest("content-swap, [data-swap]")===i);return r.length===0?(i.setAttribute("role","button"),i.setAttribute("tabindex","0"),i.getAttribute("aria-label")||i.setAttribute("aria-label","Toggle content"),n(i,"click",()=>At(i,"pointer")),n(i,"keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),At(i,"keyboard"))})):r.forEach(o=>{n(o,"click",c=>{c.stopPropagation(),At(i,"pointer")}),n(o,"keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),At(i,"keyboard"))})}),en(i,t,e),()=>{for(let o of s)o();s.length=0}}function en(i,t,e){let s=i.hasAttribute(zt(i,"swapped"));t.inert=s,e.inert=!s}function Aa(i){return{front:i.querySelector(':scope > [data-face="front"]'),back:i.querySelector(':scope > [data-face="back"]')}}function Et(i,t,e="api"){let{front:s,back:n}=Aa(i);if(!s||!n)return;let r=zt(i,"swapped");if(t&&i.hasAttribute(r)||!t&&!i.hasAttribute(r))return;P(()=>{t?i.setAttribute(r,""):i.removeAttribute(r),en(i,s,n),Sa(i);let o=t?n:s,c=o.querySelector("[autofocus]");c?c.focus():e==="keyboard"&&Ca(o)})}function At(i,t="api"){Et(i,!i.hasAttribute(zt(i,"swapped")),t)}function Sa(i){i.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:i.hasAttribute(zt(i,"swapped"))},bubbles:!0}))}function Ca(i){let t=i.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var Fe=class extends m{#e=null;setup(){this.#e=Vt(this)??null}teardown(){this.#e?.(),this.#e=null}flip(){Et(this,!0)}unflip(){Et(this,!1)}toggle(){At(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Et(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Et(this,!!t)}};f("content-swap",Fe);function Qs(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(i=>{i.querySelector(":scope > [data-face]")&&(Vt(i),i.setAttribute("data-swap-init",""))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Qs):Qs();var tn=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&(Vt(s),s.setAttribute("data-swap-init","")),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&(Vt(n),n.setAttribute("data-swap-init",""))})}});document.body?tn.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{tn.observe(document.body,{childList:!0,subtree:!0})});var xa=0,Re=class extends m{#e;#t=[];#i;#n;#s;#r;#a;#c=null;#o=0;#p=!1;#h=!1;#f=null;get currentIndex(){return this.#o}get slideCount(){return this.#t.length}get playing(){return this.#c!==null}setup(){let t=[...this.children];if(t.length===0)return!1;if(this.#p=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#h=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#h&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Carousel"),this.#e=document.createElement("div"),this.#e.className="carousel-track",this.#e.setAttribute("tabindex","0"),this.#e.setAttribute("aria-label","Slides"),t.forEach((r,a)=>{r.setAttribute("role","group"),r.setAttribute("aria-roledescription","slide"),r.setAttribute("aria-label",`${a+1} of ${t.length}`),this.#e.appendChild(r)}),this.#t=[...this.#e.children],this.#i=document.createElement("button"),this.#i.className="carousel-prev",this.#i.setAttribute("aria-label","Previous slide"),this.#i.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#n=document.createElement("button"),this.#n.className="carousel-next",this.#n.setAttribute("aria-label","Next slide"),this.#n.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#s=document.createElement("div"),this.#s.className="carousel-indicators",this.#s.setAttribute("aria-label","Slide indicators"),this.#t.forEach((r,a)=>{let o=document.createElement("button");o.className="carousel-dot",o.setAttribute("aria-label",`Go to slide ${a+1}`),o.setAttribute("aria-current",a===0?"true":"false"),this.listen(o,"click",()=>this.goTo(a)),this.#s.appendChild(o)})),this.#r=document.createElement("div"),this.#r.className="carousel-live",this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.appendChild(this.#i),this.appendChild(this.#e),this.appendChild(this.#n),this.#s&&this.appendChild(this.#s),this.appendChild(this.#r),this.listen(this.#i,"click",()=>this.prev()),this.listen(this.#n,"click",()=>this.next()),this.listen(this.#e,"keydown",this.#g),this.#h){let r=++xa,a=this.getAttribute("transition")||"fade",o=a==="slide"?"vt-carousel-slide":a==="scale"?"vt-carousel-scale":"vt-carousel";this.#e.style.viewTransitionName=`carousel-${r}`,this.#e.style.viewTransitionClass=o}this.#h&&Promise.resolve().then(()=>(ln(),cn)).then(({addSwipeListener:r})=>{this.#f=r(this.#e,{threshold:40}),this.listen(this.#e,"swipe-left",()=>this.next()),this.listen(this.#e,"swipe-right",()=>this.prev())}),this.#h||(this.#a=new IntersectionObserver(this.#m,{root:this.#e,threshold:.5}),this.#t.forEach(r=>this.#a.observe(r)));let n=this.#A()??(Number(this.getAttribute("start"))||0);if(this.#h){let r=n>0&&n<this.#t.length?n:0;this.#t.forEach((a,o)=>{a.hidden=o!==r}),this.#l(r)}else n>0&&n<this.#t.length&&this.goTo(n,!1);this.#u(),this.hasAttribute("autoplay")&&!this.#p&&this.#v()}teardown(){this.pause(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#f&&(this.#f(),this.#f=null),this.#t=[],this.#h=!1}next(){let t=this.hasAttribute("loop");this.#o<this.#t.length-1?this.goTo(this.#o+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#o>0?this.goTo(this.#o-1):t&&this.goTo(this.#t.length-1)}goTo(t,e=!0){if(!(t<0||t>=this.#t.length)){if(this.#h)if(e&&t!==this.#o){let s=t>this.#o?"forward":"backward";document.documentElement.dataset.vtDirection=s,P(()=>{this.#d(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#d(t);else{let s=this.#t[t].offsetLeft-this.#e.offsetLeft,n=e&&!this.#p?"smooth":"instant";this.#e.scrollTo({left:s,behavior:n})}this.#l(t)}}#d(t){this.#t.forEach((e,s)=>{e.hidden=s!==t})}play(){if(this.#c||this.#p)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#c=setInterval(()=>this.next(),t),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}pause(){this.#c&&(clearInterval(this.#c),this.#c=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#y()}#l(t){this.#o=t,this.#u(),this.#b(),this.#r&&(this.#r.textContent=`Slide ${t+1} of ${this.#t.length}`),this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:t,slide:this.#t[t]},bubbles:!0}))}#u(){let t=this.hasAttribute("loop"),e=this.#o===0,s=this.#o===this.#t.length-1;if(this.#i&&(this.#i.disabled=!t&&e),this.#n&&(this.#n.disabled=!t&&s),this.#s){let n=this.#s.children;for(let r=0;r<n.length;r++){let a=r===this.#o;n[r].setAttribute("aria-current",a?"true":"false"),a?n[r].setAttribute("data-active",""):n[r].removeAttribute("data-active")}}}#m=t=>{for(let e of t)if(e.isIntersecting){let s=this.#t.indexOf(e.target);s!==-1&&s!==this.#o&&this.#l(s)}};#g=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#t.length-1);break}};#v(){this.play(),this.listen(this,"mouseenter",()=>this.pause()),this.listen(this,"mouseleave",()=>{this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"focusin",()=>this.pause()),this.listen(this,"focusout",t=>{!this.contains(t.relatedTarget)&&this.hasAttribute("autoplay")&&this.play()}),this.listen(this,"touchstart",()=>this.pause(),{passive:!0})}#A(){let t=this.getAttribute("persist");if(!t)return null;try{let e=localStorage.getItem(`carousel:${t}`);return e!==null?Number(e):null}catch{return null}}#b(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#o))}catch{}}#y(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};f("carousel-wc",Re);function hn(i,t,e){"role"in ElementInternals.prototype?t.role=e:i.setAttribute("role",e)}var He=class extends m{static formAssociated=!0;#e;#t;#i;#n=[];#s=[];#r=-1;#a=!1;#c=!1;#o="";#p="";#h="";#f;#d;#l=[];constructor(){super(),this.#e=this.attachInternals()}get#u(){return this.hasAttribute("multiple")}setup(){if(this.#t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input"),!this.#t||(this.#i=this.querySelector(":scope > ul, :scope > ol"),!this.#i))return!1;this.#c=F,this.#c&&this.#i.setAttribute("popover","manual"),this.#u&&(this.#f=document.createElement("div"),this.#f.className="tags-input-area",this.insertBefore(this.#f,this.#i),this.#f.appendChild(this.#t),this.#d=document.createElement("div"),this.#d.setAttribute("aria-live","polite"),this.#d.setAttribute("aria-atomic","true"),this.#d.className="sr-only",this.appendChild(this.#d));let t=this.getAttribute("placeholder");t&&!this.#t.getAttribute("placeholder")&&this.#t.setAttribute("placeholder",t);let e=crypto.randomUUID().slice(0,8);if(this.#i.id||(this.#i.id=`combobox-listbox-${e}`),hn(this.#t,this.#e,"combobox"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-autocomplete","list"),this.#t.setAttribute("aria-controls",this.#i.id),this.#t.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#u&&this.#i.setAttribute("aria-multiselectable","true"),this.#m(),!this.#u){let s=this.getAttribute("value");s&&this.#T(s,!1),this.#h=this.#o}this.listen(this.#t,"input",this.#y),this.listen(this.#t,"keydown",this.#w),this.listen(this.#t,"focus",this.#B),this.listen(this.#t,"click",this.#N),this.listen(this.#i,"click",this.#S),this.listen(this.#i,"pointerdown",this.#$),this.listen(document,"click",this.#D),this.#c&&this.listen(this.#i,"toggle",this.#V),this.#E(),this.#C(),this.#x()}teardown(){window.removeEventListener("scroll",this.#q,{capture:!0}),window.removeEventListener("resize",this.#q)}#m(){this.#n=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#n.forEach((t,e)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${e}`)}),this.#s=[...this.#n]}#g(t,e){if(this.#l.some(o=>o.value===t))return;let s=this.#A();if(s&&this.#l.length>=s)return;this.#l.push({value:t,label:e});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=e+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${e}`),r.innerHTML="&times;",r.addEventListener("click",o=>{o.stopPropagation(),this.#v(t)}),n.appendChild(r),this.#f.insertBefore(n,this.#t);let a=this.#n.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#b(`${e} added`),this.#t.value="",this.#k(""),this.#E(),this.#C(),this.#R(),s&&this.#l.length>=s&&(this.#t.disabled=!0,this.#x())}#v(t){let e=this.#l.findIndex(o=>o.value===t);if(e===-1)return;let s=this.#l.splice(e,1)[0],n=this.#f.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#n.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#b(`${s.label} removed`),this.#A()&&this.#t.disabled&&(this.#t.disabled=!1),this.#k(this.#t.value.trim()),this.#E(),this.#C(),this.#R(),this.#t.focus()}#A(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#b(t){this.#d&&(this.#d.textContent="",requestAnimationFrame(()=>{this.#d.textContent=t}))}#y=()=>{let t=this.#t.value.trim();if(!this.#u&&this.#o){let e=this.#i.querySelector('[aria-selected="true"]');e&&e.setAttribute("aria-selected","false"),this.#o="",this.#p="",this.removeAttribute("value"),this.#E(),this.#C()}this.#k(t),this.#L()};#w=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#a||this.#L(),this.#I(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#a||this.#L(),this.#I(this.#r-1);break;case"Home":this.#a&&(t.preventDefault(),this.#I(0));break;case"End":this.#a&&(t.preventDefault(),this.#I(this.#s.length-1));break;case"Enter":if(t.preventDefault(),this.#a&&this.#r>=0&&this.#s[this.#r]){let e=this.#s[this.#r];this.#u?this.#g(e.getAttribute("data-value"),e.textContent.trim()):this.#F(e)}else if(this.#u&&this.hasAttribute("custom")&&this.#t.value.trim()){let e=this.#t.value.trim();this.#g(e,e)}break;case"Backspace":if(this.#u&&!this.#t.value&&this.#l.length>0){let e=this.#l[this.#l.length-1];this.#v(e.value)}break;case",":if(this.#u&&this.hasAttribute("custom")&&this.#t.value.trim()){t.preventDefault();let e=this.#t.value.trim();this.#g(e,e)}break;case"Escape":this.#a&&(t.preventDefault(),t.stopPropagation(),this.#x(),this.#t.focus());break;case"Tab":this.#a&&this.#x();break}};#B=()=>{this.#u?(this.#k(this.#t.value.trim()),this.#L()):(this.#t.value||!this.#o)&&(this.#k(this.#t.value.trim()),this.#L())};#N=()=>{this.#a||(this.#k(this.#t.value.trim()),this.#L())};#S=t=>{let e=t.target.closest("li[data-value]");e&&this.#s.includes(e)&&(this.#u?this.#g(e.getAttribute("data-value"),e.textContent.trim()):this.#F(e))};#$=t=>{t.preventDefault()};#D=t=>{this.#a&&!this.contains(t.target)&&this.#x()};#k(t){let e=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#u?new Set(this.#l.map(r=>r.value)):null;this.#s=[],this.#n.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?e==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#s.push(r)}),this.#r=-1,this.#_()}#I(t){if(this.#s.length===0)return;t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#r>=0&&this.#s[this.#r]&&this.#s[this.#r].removeAttribute("data-active"),this.#r=t;let e=this.#s[t];e.setAttribute("data-active",""),e.scrollIntoView({block:"nearest"}),this.#t.setAttribute("aria-activedescendant",e.id)}#_(){this.#n.forEach(t=>t.removeAttribute("data-active")),this.#t.removeAttribute("aria-activedescendant")}#F(t){let e=t.getAttribute("data-value"),s=t.textContent.trim();this.#n.forEach(n=>n.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#o=e,this.#p=s,this.#t.value=s,this.setAttribute("value",e),this.#E(),this.#C(),this.#x(),this.#t.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:e,label:s}}))}#T(t,e=!0){let s=this.#n.find(n=>n.getAttribute("data-value")===t);s&&(e?this.#F(s):(s.setAttribute("aria-selected","true"),this.#o=t,this.#p=s.textContent.trim(),this.#t.value=this.#p,this.setAttribute("value",t)))}#q=()=>this.#P();#L(){if(!this.#a){if(this.#a=!0,this.setAttribute("open",""),this.#t.setAttribute("aria-expanded","true"),this.#i.hidden=!1,this.#c){this.#P();try{this.#i.showPopover()}catch{}window.addEventListener("scroll",this.#q,{capture:!0,passive:!0}),window.addEventListener("resize",this.#q,{passive:!0})}this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0}))}}#x(){if(!(!this.#a&&this.#i.hidden)){if(this.#a=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#i.hidden=!0,this.#r=-1,this.#_(),this.#c){try{this.#i.hidePopover()}catch{}window.removeEventListener("scroll",this.#q,{capture:!0}),window.removeEventListener("resize",this.#q)}this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0}))}}get#M(){return this.#u&&this.#f?this.#f:this.#t}#P(){if(!this.#c)return;let t=this.#M;if(!t)return;let e=t.getBoundingClientRect();this.#i.style.setProperty("--combobox-top",`${e.bottom+2}px`),this.#i.style.setProperty("--combobox-left",`${e.left}px`),this.#i.style.setProperty("--combobox-width",`${e.width}px`)}#V=t=>{t.newState==="closed"&&this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#t.setAttribute("aria-expanded","false"),this.#i.hidden=!0,this.#r=-1,this.#_(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#E(){if(this.#u)if(this.#l.length>0){let t=new FormData,e=this.getAttribute("name")||"";for(let s of this.#l)t.append(e,s.value);this.#e.setFormValue(t)}else this.#e.setFormValue(null);else this.#o?this.#e.setFormValue(this.#o,this.#p):this.#e.setFormValue(null)}#C(){this.hasAttribute("required")?this.#u?this.#l.length===0?this.#e.setValidity({valueMissing:!0},"Please select at least one option",this.#t):this.#e.setValidity({}):this.#o?this.#e.setValidity({}):this.#e.setValidity({valueMissing:!0},"Please select an option",this.#t):this.#e.setValidity({})}#R(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#l.map(t=>t.value),labels:this.#l.map(t=>t.label)}}))}formResetCallback(){this.#u?(this.#f.querySelectorAll(".tag").forEach(t=>t.remove()),this.#l=[],this.#t.value="",this.#t.disabled=!1):(this.#o="",this.#p="",this.#t.value="",this.removeAttribute("value")),this.#n.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#s=[...this.#n],this.#r=-1,this.#_(),this.#x(),!this.#u&&this.#h&&this.#T(this.#h,!1),this.#E(),this.#C()}formStateRestoreCallback(t){t&&(this.#u||(this.#T(t,!1),this.#E(),this.#C()))}get value(){return this.#o}set value(t){t?this.#T(t):(this.#n.forEach(e=>e.setAttribute("aria-selected","false")),this.#o="",this.#p="",this.#t.value="",this.removeAttribute("value"),this.#E(),this.#C())}get label(){return this.#p}get values(){return this.#l.map(t=>t.value)}get labels(){return this.#l.map(t=>t.label)}static get observedAttributes(){return["value"]}attributeChangedCallback(t,e,s){t==="value"&&this.#t&&s!==this.#o&&s&&(this.#T(s,!1),this.#E(),this.#C())}};f("combo-box",He);function Ta(){try{let i=new Intl.DateTimeFormat(void 0,{hour:"numeric"}).resolvedOptions();return i.hourCycle==="h12"||i.hourCycle==="h11"?"12h":"24h"}catch{return"12h"}}function $(i){return String(i).padStart(2,"0")}function dt(i){if(!i)return null;let t=i.split(":").map(Number);return{h:t[0]||0,m:t[1]||0,s:t[2]||0}}function St(i,t,e,s){return s?`${$(i)}:${$(t)}:${$(e)}`:`${$(i)}:${$(t)}`}function La(i,t,e,s,n){if(n==="12h"){let r=i>=12?"PM":"AM",a=i%12||12;return s?`${a}:${$(t)}:${$(e)} ${r}`:`${a}:${$(t)} ${r}`}return St(i,t,e,s)}function dn(i){let t=i.trim();if(!t)return null;let e=t.match(/\s*(am|pm|a\.m\.|p\.m\.|a|p)\s*$/i),s=null,n=t;e&&(s=e[1].toLowerCase().replace(/\./g,"").startsWith("p")?"PM":"AM",n=t.slice(0,e.index).trim());let r=n.split(/[:.]/);if(r.length<1||r.length>3)return null;let a=Number(r[0]),o=r.length>1?Number(r[1]):0,c=r.length>2?Number(r[2]):0;if(isNaN(a)||isNaN(o)||isNaN(c)||o<0||o>59||c<0||c>59)return null;let l=a;if(s){if(l<1||l>12)return null;s==="AM"?l=l===12?0:l:l=l===12?12:l+12}else if(l<0||l>23)return null;return{h:l,m:o,s:c}}function Ma(i,t,e){return i>e?t:i<t?e:i}var Ve=class extends m{static formAssociated=!0;#e;#t;#i;#n;#s;#r;#a=[];#c;#o;#p;#h=0;#f=0;#d=0;#l="AM";#u=null;#m=null;#g=60;#v;#A=0;#b=!1;#y;constructor(){super(),this.#e=this.attachInternals()}setup(){if(this.#t=this.querySelector(':scope > input[type="time"]'),!this.#t)return!1;this.#g=Number(this.#t.getAttribute("step"))||60,this.#p=this.#g<60,this.#u=dt(this.#t.getAttribute("min")),this.#m=dt(this.#t.getAttribute("max")),this.#o=this.getAttribute("data-format")||Ta();let t=dt(this.#t.value);t&&(this.#h=t.h,this.#f=t.m,this.#d=t.s),this.#v=this.#t.value,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#w(),this.#B(),this.#V(),this.#E(),this.#C(),this.#R(),this.listen(document,"click",this.#k),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0)}#w(){this.#n=document.createElement("div"),this.#n.className="time-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="time-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","listbox"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a time\u2026"),this.#n.appendChild(this.#i),this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="time-trigger-icon",this.#s.setAttribute("aria-label","Toggle time spinner"),this.#s.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","clock"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#s.appendChild(t),this.#n.appendChild(this.#s),this.appendChild(this.#n),this.listen(this.#s,"click",e=>{e.stopPropagation(),this.#b?this.#D():this.#$(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"keydown",this.#I),this.listen(this.#i,"blur",this.#_)}#B(){this.#y=`tp-${Math.random().toString(36).slice(2,8)}`,this.#r=document.createElement("div"),this.#r.className="time-panel",this.#r.id=this.#y,this.#r.setAttribute("role","group"),this.#r.setAttribute("aria-label","Time spinners"),this.#i.setAttribute("aria-controls",this.#y);let t=this.#o==="12h"?1:0,e=this.#o==="12h"?12:23,s=this.#N("Hours",t,e,1);this.#r.appendChild(s.el),this.#a.push(s),this.#r.appendChild(this.#S());let n=this.#g>=60?Math.max(1,Math.round(this.#g/60)):1,r=this.#N("Minutes",0,59,n);if(this.#r.appendChild(r.el),this.#a.push(r),this.#p){this.#r.appendChild(this.#S());let a=this.#N("Seconds",0,59,this.#g);this.#r.appendChild(a.el),this.#a.push(a)}this.#o==="12h"&&(this.#c=document.createElement("button"),this.#c.type="button",this.#c.className="period-toggle",this.#c.setAttribute("aria-label","Toggle AM/PM"),this.#c.textContent=this.#l,this.#r.appendChild(this.#c),this.listen(this.#c,"click",()=>{this.#l=this.#l==="AM"?"PM":"AM",this.#c.textContent=this.#l,this.#h=this.#z(this.#H(),this.#l),this.#P()}),this.listen(this.#c,"keydown",a=>{a.key==="ArrowLeft"&&(a.preventDefault(),this.#O(this.#a.length-1)),a.key==="Escape"&&(a.preventDefault(),this.#D(),this.#i.focus())})),this.appendChild(this.#r)}#N(t,e,s,n){let r=document.createElement("div");r.className="time-spinner",r.setAttribute("role","spinbutton"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin",String(e)),r.setAttribute("aria-valuemax",String(s)),r.setAttribute("tabindex","0");let a=document.createElement("button");a.type="button",a.className="time-inc",a.setAttribute("aria-hidden","true"),a.setAttribute("tabindex","-1"),a.innerHTML="&#x25B2;";let o=document.createElement("span");o.className="time-value";let c=document.createElement("button");c.type="button",c.className="time-dec",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.innerHTML="&#x25BC;",r.appendChild(a),r.appendChild(o),r.appendChild(c);let l={el:r,valueEl:o,label:t,min:e,max:s,step:n};return this.listen(a,"click",()=>{this.#x(l,n)}),this.listen(c,"click",()=>{this.#x(l,-n)}),this.listen(r,"keydown",h=>{this.#F(h,l)}),this.listen(r,"focus",()=>{this.#A=this.#a.indexOf(l)}),l}#S(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#$(){this.#b||(this.#b=!0,this.#r.setAttribute("data-open",""),this.#i.setAttribute("aria-expanded","true"))}#D(){this.#b&&(this.#b=!1,this.#r.removeAttribute("data-open"),this.#i.setAttribute("aria-expanded","false"))}#k=t=>{this.#b&&!this.contains(t.target)&&this.#D()};#I=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let e=dn(this.#i.value);e&&(this.#h=e.h,this.#f=e.m,this.#d=e.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P()),this.#E(),this.#b&&this.#D();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#b||this.#$(),requestAnimationFrame(()=>this.#O(0));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#b&&this.#D(),this.#E();return;case"Tab":this.#b&&this.#D();return}};#_=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let s=dn(e);s&&(this.#h=s.h,this.#f=s.m,this.#d=s.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#C(),this.#R(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:St(this.#h,this.#f,this.#d,this.#p),hours:this.#h,minutes:this.#f,seconds:this.#d}})))}this.#E(),this.#b&&this.#D(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#F=(t,e)=>{let s=this.#a.indexOf(e);switch(t.key){case"ArrowUp":t.preventDefault(),this.#x(e,e.step);break;case"ArrowDown":t.preventDefault(),this.#x(e,-e.step);break;case"ArrowRight":t.preventDefault(),s<this.#a.length-1?this.#O(s+1):this.#c&&this.#c.focus();break;case"ArrowLeft":t.preventDefault(),s>0&&this.#O(s-1);break;case"PageUp":t.preventDefault(),this.#x(e,e.step*(e.label==="Hours"?1:10));break;case"PageDown":t.preventDefault(),this.#x(e,-e.step*(e.label==="Hours"?1:10));break;case"Home":t.preventDefault(),this.#M(e,e.min);break;case"End":t.preventDefault(),this.#M(e,e.max);break;case"Escape":t.preventDefault(),this.#D(),this.#i.focus();break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#L(t.key,e))}};#T="";#q=0;#L(t,e){clearTimeout(this.#q),this.#T+=t;let s=Number(this.#T);if(this.#T.length>=2||s*10>e.max){let n=Math.min(Math.max(s,e.min),e.max);this.#M(e,n),this.#T=""}else this.#q=setTimeout(()=>{let n=Number(this.#T),r=Math.min(Math.max(n,e.min),e.max);this.#M(e,r),this.#T=""},800)}#x(t,e){let s;t.label==="Hours"?s=this.#o==="12h"?this.#H():this.#h:t.label==="Minutes"?s=this.#f:s=this.#d;let n=Ma(s+e,t.min,t.max);this.#M(t,n)}#M(t,e){t.label==="Hours"?this.#o==="12h"?this.#h=this.#z(e,this.#l):this.#h=e:t.label==="Minutes"?this.#f=e:this.#d=e,this.#P()}#P(){this.#V(),this.#E(),this.#C(),this.#R(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{value:St(this.#h,this.#f,this.#d,this.#p),hours:this.#h,minutes:this.#f,seconds:this.#d}}))}#V(){let t=this.#o==="12h"?this.#H():this.#h;this.#a[0].valueEl.textContent=$(t),this.#a[0].el.setAttribute("aria-valuenow",String(t)),this.#a[0].el.setAttribute("aria-valuetext",this.#o==="12h"?`${t} ${this.#l}`:String(t)),this.#a[1].valueEl.textContent=$(this.#f),this.#a[1].el.setAttribute("aria-valuenow",String(this.#f)),this.#p&&this.#a[2]&&(this.#a[2].valueEl.textContent=$(this.#d),this.#a[2].el.setAttribute("aria-valuenow",String(this.#d))),this.#c&&(this.#c.textContent=this.#l)}#E(){this.#h!==void 0&&(this.#i.value=La(this.#h,this.#f,this.#d,this.#p,this.#o))}#C(){let t=St(this.#h,this.#f,this.#d,this.#p);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#R(){if((this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#t.value){this.#e.setValidity({valueMissing:!0},"Please select a time",this.#i||this);return}this.#e.setValidity({})}#z(t,e){return e==="AM"?t===12?0:t:t===12?12:t+12}#H(){if(this.#o==="24h")return this.#h;let t=this.#h%12;return t===0?12:t}#O(t){this.#a[t]?.el.focus()}formResetCallback(){let t=dt(this.#v);t?(this.#h=t.h,this.#f=t.m,this.#d=t.s):(this.#h=0,this.#f=0,this.#d=0),this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P()}formStateRestoreCallback(t){if(!t)return;let e=dt(t);e&&(this.#h=e.h,this.#f=e.m,this.#d=e.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P())}get value(){return St(this.#h,this.#f,this.#d,this.#p)}set value(t){let e=dt(t);e&&(this.#h=e.h,this.#f=e.m,this.#d=e.s,this.#o==="12h"&&(this.#l=this.#h>=12?"PM":"AM"),this.#P())}};f("time-picker",Ve);var Na=["Su","Mo","Tu","We","Th","Fr","Sa"],Da=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],We=["january","february","march","april","may","june","july","august","september","october","november","december"];function I(i){let t=i.getFullYear(),e=String(i.getMonth()+1).padStart(2,"0"),s=String(i.getDate()).padStart(2,"0");return`${t}-${e}-${s}`}function O(i){if(!i)return null;let[t,e,s]=i.split("-").map(Number);return new Date(t,e-1,s)}function Wt(i,t){return new Date(i,t+1,0).getDate()}function _a(){try{let i=new Intl.Locale(navigator.language);if(i.weekInfo)return i.weekInfo.firstDay%7}catch{}return 0}function qa(i){try{return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(i)}catch{return I(i)}}function jt(i,t){return i&&t&&i.getFullYear()===t.getFullYear()&&i.getMonth()===t.getMonth()&&i.getDate()===t.getDate()}function $a(){let i=new Map;We.forEach((t,e)=>{i.set(t,e),i.set(t.slice(0,3),e)});try{for(let t=0;t<12;t++){let e=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(2e3,t,1)).toLowerCase(),s=new Intl.DateTimeFormat(void 0,{month:"short"}).format(new Date(2e3,t,1)).toLowerCase().replace(".","");i.set(e,t),i.set(s,t)}}catch{}return i}var ze=$a();function Ue(i){let t=i.trim();if(!t)return{date:null,partial:null};if(/^\d{4}-\d{2}-\d{2}$/.test(t)){let a=O(t);return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}if(/^\d{4}\/\d{2}\/\d{2}$/.test(t)){let a=O(t.replace(/\//g,"-"));return a&&!isNaN(a.getTime())?{date:a,partial:null}:{date:null,partial:null}}let e=/^([a-z\u00C0-\u024F]+)\s+(\d{1,2}),?\s+(\d{4})$/i,s=t.match(e);if(s){let a=ze.get(s[1].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[2]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let n=/^(\d{1,2})\s+([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(n),s){let a=ze.get(s[2].toLowerCase());if(a!==void 0){let o=new Date(Number(s[3]),a,Number(s[1]));if(!isNaN(o.getTime()))return{date:o,partial:null}}}let r=/^([a-z\u00C0-\u024F]+)\s+(\d{4})$/i;if(s=t.match(r),s){let a=ze.get(s[1].toLowerCase());if(a!==void 0)return{date:null,partial:{year:Number(s[2]),month:a}}}return{date:null,partial:null}}var je=class extends m{static formAssociated=!0;#e;#t;#i;#n;#s;#r;#a;#c;#o;#p;#h=!1;#f=!1;#d=null;#l=null;#u;#m;#g=null;#v=null;#A=new Map;#b=new Map;#y;#w;constructor(){super(),this.#e=this.attachInternals()}setup(){if(this.#t=this.querySelector(':scope > input[type="date"]'),!this.#t)return!1;this.#g=O(this.#t.getAttribute("min")),this.#v=O(this.#t.getAttribute("max")),this.#w=_a();let t=this.getAttribute("data-disabled-dates");t&&t.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#A.set(r,a||null)});let e=this.getAttribute("data-highlight-dates");e&&e.split(",").forEach(n=>{let[r,a]=n.trim().split(":");this.#b.set(r,a||null)}),this.#d=O(this.#t.value),this.#y=this.#t.value;let s=new Date;this.#v&&s>this.#v&&(s=this.#v),this.#g&&s<this.#g&&(s=this.#g),this.#u=this.#d?this.#d.getFullYear():s.getFullYear(),this.#m=this.#d?this.#d.getMonth():s.getMonth(),this.#l=this.#d||s,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#B(),this.#N(),this.#T(),this.#H(),this.#O(),this.#f=F,this.#f&&this.#r.setAttribute("popover","manual"),this.listen(document,"click",this.#C),(this.#t.disabled||this.hasAttribute("disabled"))&&(this.setAttribute("data-disabled",""),this.#i.disabled=!0)}teardown(){window.removeEventListener("scroll",this.#M,{capture:!0}),window.removeEventListener("resize",this.#M)}#B(){this.#s=document.createElement("div"),this.#s.className="date-trigger",this.#i=document.createElement("input"),this.#i.type="text",this.#i.className="date-input",this.#i.setAttribute("role","combobox"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("autocomplete","off"),this.#i.setAttribute("placeholder","Type a date\u2026"),this.#s.appendChild(this.#i),this.#n=document.createElement("button"),this.#n.type="button",this.#n.className="date-trigger-icon",this.#n.setAttribute("aria-label","Toggle calendar"),this.#n.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#n.appendChild(t),this.#s.appendChild(this.#n),this.appendChild(this.#s),this.listen(this.#n,"click",e=>{e.stopPropagation(),this.#h?this.#L():this.#q(),this.#i.focus()}),this.listen(this.#i,"focus",()=>this.#i.select()),this.listen(this.#i,"input",this.#P),this.listen(this.#i,"keydown",this.#V),this.listen(this.#i,"blur",this.#E)}#N(){this.#a=`dp-${Math.random().toString(36).slice(2,8)}`,this.#r=document.createElement("div"),this.#r.className="calendar",this.#r.id=this.#a,this.#r.setAttribute("role","dialog"),this.#r.setAttribute("aria-modal","false"),this.#r.setAttribute("aria-label","Choose date"),this.#r.hidden=!0,this.#i.setAttribute("aria-controls",this.#a);let t=document.createElement("div");t.className="calendar-header";let e=document.createElement("button");e.type="button",e.className="calendar-nav",e.setAttribute("aria-label","Previous month");let s=document.createElement("icon-wc");s.setAttribute("name","chevron-left"),s.setAttribute("size","sm"),s.setAttribute("aria-hidden","true"),e.appendChild(s);let n=document.createElement("span");n.className="calendar-title",n.id=`${this.#a}-title`,n.setAttribute("aria-live","polite"),this.#o=document.createElement("span"),this.#o.className="calendar-month",this.#p=document.createElement("select"),this.#p.className="calendar-year",this.#p.setAttribute("aria-label","Year"),this.#k(),n.appendChild(this.#o),n.appendChild(this.#p);let r=document.createElement("button");r.type="button",r.className="calendar-nav",r.setAttribute("aria-label","Next month");let a=document.createElement("icon-wc");a.setAttribute("name","chevron-right"),a.setAttribute("size","sm"),a.setAttribute("aria-hidden","true"),r.appendChild(a),t.appendChild(e),t.appendChild(n),t.appendChild(r),this.#r.appendChild(t);let o=document.createElement("table");o.setAttribute("role","grid"),o.setAttribute("aria-labelledby",`${this.#a}-title`);let c=document.createElement("thead"),l=document.createElement("tr");for(let h=0;h<7;h++){let d=(this.#w+h)%7,u=document.createElement("th");u.setAttribute("abbr",Da[d]),u.setAttribute("scope","col"),u.textContent=Na[d],l.appendChild(u)}c.appendChild(l),o.appendChild(c),this.#c=document.createElement("tbody"),o.appendChild(this.#c),this.#r.appendChild(o),this.appendChild(this.#r),this.#S(),this.listen(e,"click",()=>this.#I(-1)),this.listen(r,"click",()=>this.#I(1)),this.listen(this.#p,"change",()=>{this.#u=Number(this.#p.value);let h=Wt(this.#u,this.#m),d=Math.min(this.#l.getDate(),h);this.#l=new Date(this.#u,this.#m,d),this.#S()}),this.listen(this.#c,"click",this.#R),this.listen(this.#r,"keydown",this.#z)}#S(){try{this.#o.textContent=new Intl.DateTimeFormat(void 0,{month:"long"}).format(new Date(this.#u,this.#m,1))}catch{this.#o.textContent=We[this.#m].charAt(0).toUpperCase()+We[this.#m].slice(1)}this.#p.querySelector(`option[value="${this.#u}"]`)||this.#k(),this.#p.value=String(this.#u),this.#c.innerHTML="";let t=Wt(this.#u,this.#m),s=(new Date(this.#u,this.#m,1).getDay()-this.#w+7)%7,n=new Date,r=document.createElement("tr");for(let o=0;o<s;o++)r.appendChild(document.createElement("td"));for(let o=1;o<=t;o++){let c=new Date(this.#u,this.#m,o),l=I(c),h=document.createElement("td"),d=document.createElement("button");d.type="button",d.setAttribute("data-date",l),d.textContent=String(o),jt(c,n)&&d.setAttribute("aria-current","date"),jt(c,this.#d)&&d.setAttribute("aria-selected","true");let u=this.#D(c,l);if(u.disabled&&(d.setAttribute("aria-disabled","true"),d.setAttribute("disabled",""),u.reason&&d.setAttribute("data-disabled-reason",u.reason)),this.#b.has(l)){let b=this.#b.get(l);d.setAttribute("data-highlight",b||"")}jt(c,this.#l)?(d.setAttribute("tabindex","0"),jt(c,this.#d)||d.setAttribute("data-focused","")):d.setAttribute("tabindex","-1"),h.appendChild(d),r.appendChild(h),(s+o)%7===0&&(this.#c.appendChild(r),r=document.createElement("tr"))}let a=(s+t)%7;if(a>0){for(let o=a;o<7;o++)r.appendChild(document.createElement("td"));this.#c.appendChild(r)}}#$(t,e){return this.#D(t,e).disabled}#D(t,e){return this.#A.has(e)?{disabled:!0,reason:this.#A.get(e)}:this.#g&&t<this.#g?{disabled:!0,reason:null}:this.#v&&t>this.#v?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#k(){this.#p.innerHTML="";let t=new Date().getFullYear(),e=this.#g?this.#g.getFullYear():t-100,s=this.#v?this.#v.getFullYear():t+10;for(let n=e;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#p.appendChild(r)}}#I(t){this.#m+=t,this.#m>11?(this.#m=0,this.#u++):this.#m<0&&(this.#m=11,this.#u--);let e=Wt(this.#u,this.#m),s=Math.min(this.#l.getDate(),e);this.#l=new Date(this.#u,this.#m,s),this.#S(),this.#F(this.#l)}#_(t){let e=I(t);this.#$(t,e)||(this.#d=t,this.#l=t,this.#T(),this.#H(),this.#O(),this.#S(),this.#L(),this.#i.focus(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:e,date:new Date(t)}})))}#F(t){let e=I(t),s=this.#c.querySelector(`[data-date="${e}"]`);s&&(this.#c.querySelectorAll('button[tabindex="0"]').forEach(n=>{n.setAttribute("tabindex","-1")}),s.setAttribute("tabindex","0"),s.focus())}#T(){this.#d?this.#i.value=qa(this.#d):this.#i.value=""}#q(){if(!this.#h){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#r.hidden=!1,this.#u=this.#l.getFullYear(),this.#m=this.#l.getMonth(),this.#S(),this.#f){try{this.#r.showPopover()}catch{}this.#x(),window.addEventListener("scroll",this.#M,{capture:!0,passive:!0}),window.addEventListener("resize",this.#M,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#L(){if(this.#h){if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#r.hidden=!0,this.#f){try{this.#r.hidePopover()}catch{}window.removeEventListener("scroll",this.#M,{capture:!0}),window.removeEventListener("resize",this.#M)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#x(){if(!this.#f)return;let t=this.#s.getBoundingClientRect(),e=this.#r.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,l;o<e.height&&c>o?(l=t.top-e.height-s,this.#r.dataset.placement="top"):(l=t.bottom+s,delete this.#r.dataset.placement);let h=t.left;h+e.width>a-n&&(h=a-e.width-n),h<n&&(h=n),this.#r.style.setProperty("--calendar-top",`${l}px`),this.#r.style.setProperty("--calendar-left",`${h}px`)}#M=()=>{this.#h&&this.#x()};#P=()=>{let t=this.#i.value,{date:e,partial:s}=Ue(t);if(e)this.#l=e,this.#u=e.getFullYear(),this.#m=e.getMonth(),this.#S();else if(s){this.#u=s.year,this.#m=s.month;let n=Wt(s.year,s.month),r=Math.min(this.#l.getDate(),n);this.#l=new Date(s.year,s.month,r),this.#S()}!this.#h&&t.length>0&&this.#q()};#V=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let{date:e}=Ue(this.#i.value);e&&!this.#$(e,I(e))&&this.#_(e);return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#h||this.#q(),requestAnimationFrame(()=>this.#F(this.#l));return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#h&&this.#L(),this.#T();return;case"Tab":this.#h&&this.#L();return}};#E=t=>{if(t.relatedTarget&&this.contains(t.relatedTarget))return;let e=this.#i.value.trim();if(e){let{date:s}=Ue(e);s&&!this.#$(s,I(s))&&(this.#d=s,this.#l=s,this.#H(),this.#O(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:I(s),date:new Date(s)}})))}this.#T(),this.#h&&this.#L(),this.#t.dispatchEvent(new Event("blur",{bubbles:!0}))};#C=t=>{this.#h&&!this.contains(t.target)&&this.#L()};#R=t=>{let e=t.target.closest("button[data-date]");!e||e.hasAttribute("disabled")||this.#_(O(e.getAttribute("data-date")))};#z=t=>{if(t.key==="Tab"){this.#L();return}let e=this.#l,s;switch(t.key){case"ArrowRight":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1);break;case"ArrowLeft":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);break;case"ArrowDown":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+7);break;case"ArrowUp":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-7);break;case"PageDown":t.shiftKey?s=new Date(e.getFullYear()+1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()+1,e.getDate());break;case"PageUp":t.shiftKey?s=new Date(e.getFullYear()-1,e.getMonth(),e.getDate()):s=new Date(e.getFullYear(),e.getMonth()-1,e.getDate());break;case"Home":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+this.#w);break;case"End":s=new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-e.getDay()+this.#w));break;case"Enter":case" ":t.preventDefault(),t.stopPropagation(),this.#_(e);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#L(),this.#i.focus();return;default:return}t.preventDefault(),t.stopPropagation(),s&&(this.#g&&s<this.#g&&(s=this.#g),this.#v&&s>this.#v&&(s=this.#v),this.#l=s,(s.getMonth()!==this.#m||s.getFullYear()!==this.#u)&&(this.#m=s.getMonth(),this.#u=s.getFullYear(),this.#S()),this.#F(s))};#H(){let t=this.#d?I(this.#d):"";this.#e.setFormValue(t||null),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}#O(){(this.hasAttribute("required")||this.#t.hasAttribute("required"))&&!this.#d?this.#e.setValidity({valueMissing:!0},"Please select a date",this.#i||this):this.#e.setValidity({})}formResetCallback(){this.#d=O(this.#y);let t=new Date;this.#l=this.#d||t,this.#u=this.#l.getFullYear(),this.#m=this.#l.getMonth(),this.#T(),this.#H(),this.#O(),this.#h&&this.#S()}formStateRestoreCallback(t){t&&(this.#d=O(t),this.#d&&(this.#l=this.#d,this.#u=this.#d.getFullYear(),this.#m=this.#d.getMonth(),this.#T(),this.#H(),this.#O()))}get value(){return this.#d?I(this.#d):""}set value(t){let e=O(t);e&&this.#_(e)}get min(){return this.#g?I(this.#g):""}set min(t){this.#g=t?O(t):null,this.#t&&this.#t.setAttribute("min",t||""),this.#S()}get max(){return this.#v?I(this.#v):""}set max(t){this.#v=t?O(t):null,this.#t&&this.#t.setAttribute("max",t||""),this.#S()}};f("date-picker",je);function Yt(i,t,e){t/=100,e/=100;let s=a=>(a+i/30)%12,n=t*Math.min(e,1-e),r=a=>e-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 Ye(i,t,e){i/=255,t/=255,e/=255;let s=Math.max(i,t,e),n=Math.min(i,t,e),r=(s+n)/2,a=0,o=0;if(s!==n){let c=s-n;switch(o=r>.5?c/(2-s-n):c/(s+n),s){case i:a=((t-e)/c+(t<e?6:0))/6;break;case t:a=((e-i)/c+2)/6;break;case e:a=((i-t)/c+4)/6;break}}return{h:Math.round(a*360),s:Math.round(o*100),l:Math.round(r*100)}}function Ia(i){i=i.replace(/^#/,""),i.length===3&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);let t=parseInt(i,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function Oa(i,t,e){return"#"+[i,t,e].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function j(i){let{r:t,g:e,b:s}=Ia(i);return Ye(t,e,s)}function Q(i,t,e){let{r:s,g:n,b:r}=Yt(i,t,e);return Oa(s,n,r)}function B(i,t,e){return Math.max(t,Math.min(e,i))}var Ge=class extends m{static formAssociated=!0;#e;#t;#i;#n;#s;#r;#a;#c;#o;#p;#h;#f;#d;#l;#u;#m;#g;#v=!1;#A=!1;#b=0;#y=100;#w=50;#B;constructor(){super(),this.#e=this.attachInternals()}setup(){if(this.#t=this.querySelector(':scope > input[type="color"]'),!this.#t)return!1;let t=this.#t.value||"#000000";this.#B=t;let e=j(t);this.#b=e.h,this.#y=e.s,this.#w=e.l,this.#t.setAttribute("tabindex","-1"),this.#t.setAttribute("aria-hidden","true"),this.#t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.#N(),this.#S(),this.#C(),this.#U(),this.#A=F,this.#A&&this.#r.setAttribute("popover","manual"),this.listen(document,"click",this.#W),(this.#t.disabled||this.hasAttribute("disabled"))&&this.setAttribute("data-disabled","")}teardown(){window.removeEventListener("scroll",this.#O,{capture:!0}),window.removeEventListener("resize",this.#O)}#N(){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.#i.appendChild(this.#n),this.#i.appendChild(this.#s),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#v?this.#z():this.#R()})}#S(){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("tabindex","0"),this.#c=document.createElement("div"),this.#c.className="color-area-thumb",this.#a.appendChild(this.#c),this.#r.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#o=document.createElement("div"),this.#o.className="color-hue",this.#o.setAttribute("role","slider"),this.#o.setAttribute("aria-label","Hue"),this.#o.setAttribute("aria-valuemin","0"),this.#o.setAttribute("aria-valuemax","360"),this.#o.setAttribute("tabindex","0"),this.#p=document.createElement("div"),this.#p.className="color-hue-thumb",this.#o.appendChild(this.#p),t.appendChild(this.#o),this.#r.appendChild(t);let e=document.createElement("div");e.className="color-inputs",this.#h=this.#$("Hex","hex",7),this.#f=this.#D("R","r",0,255),this.#d=this.#D("G","g",0,255),this.#l=this.#D("B","b",0,255),e.appendChild(this.#h.wrapper),e.appendChild(this.#f.wrapper),e.appendChild(this.#d.wrapper),e.appendChild(this.#l.wrapper),this.#r.appendChild(e);let s=this.querySelector(":scope > datalist");if(s){this.#u=document.createElement("div"),this.#u.className="color-swatches",this.#u.setAttribute("role","listbox"),this.#u.setAttribute("aria-label","Preset colors");for(let r of s.querySelectorAll("option[value]")){let a=document.createElement("button");a.type="button",a.setAttribute("role","option"),a.style.background=r.value,a.setAttribute("aria-label",r.textContent||r.value),a.setAttribute("data-color",r.value),this.#u.appendChild(a)}this.#r.appendChild(this.#u),this.listen(this.#u,"click",this.#M)}let n=document.createElement("div");n.className="color-actions","EyeDropper"in window&&(this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-eyedropper",this.#m.setAttribute("aria-label","Pick color from screen"),this.#m.textContent="\u{1F4A7}",n.appendChild(this.#m),this.listen(this.#m,"click",this.#P)),this.#g=document.createElement("button"),this.#g.type="button",this.#g.className="color-copy",this.#g.setAttribute("aria-label","Copy hex value"),this.#g.textContent="Copy",n.appendChild(this.#g),this.listen(this.#g,"click",this.#V),this.#r.appendChild(n),this.appendChild(this.#r),this.listen(this.#a,"pointerdown",this.#k),this.listen(this.#a,"keydown",this.#_),this.listen(this.#o,"pointerdown",this.#F),this.listen(this.#o,"keydown",this.#q),this.listen(this.#h.input,"change",this.#L),this.listen(this.#f.input,"change",this.#x),this.listen(this.#d.input,"change",this.#x),this.listen(this.#l.input,"change",this.#x)}#$(t,e,s){let n=document.createElement("label");n.className="color-input-label";let r=document.createElement("span");r.textContent=t;let a=document.createElement("input");return a.type="text",a.setAttribute("data-channel",e),a.setAttribute("maxlength",String(s)),a.setAttribute("spellcheck","false"),a.setAttribute("autocomplete","off"),n.appendChild(r),n.appendChild(a),{wrapper:n,input:a}}#D(t,e,s,n){let r=document.createElement("label");r.className="color-input-label";let a=document.createElement("span");a.textContent=t;let o=document.createElement("input");return o.type="number",o.setAttribute("data-channel",e),o.min=String(s),o.max=String(n),r.appendChild(a),r.appendChild(o),{wrapper:r,input:o}}#k=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#I(t);let e=n=>this.#I(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",e),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",e),this.#a.addEventListener("pointerup",s)};#I(t){let e=this.#a.getBoundingClientRect(),s=B((t.clientX-e.left)/e.width,0,1),n=B((t.clientY-e.top)/e.height,0,1);this.#y=Math.round(s*100),this.#w=Math.round((1-n)*100),this.#E()}#_=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":t.preventDefault(),this.#y=B(this.#y+e,0,100);break;case"ArrowLeft":t.preventDefault(),this.#y=B(this.#y-e,0,100);break;case"ArrowUp":t.preventDefault(),this.#w=B(this.#w+e,0,100);break;case"ArrowDown":t.preventDefault(),this.#w=B(this.#w-e,0,100);break;default:return}this.#E()};#F=t=>{t.preventDefault(),this.#o.setPointerCapture(t.pointerId),this.#T(t);let e=n=>this.#T(n),s=n=>{this.#o.releasePointerCapture(n.pointerId),this.#o.removeEventListener("pointermove",e),this.#o.removeEventListener("pointerup",s)};this.#o.addEventListener("pointermove",e),this.#o.addEventListener("pointerup",s)};#T(t){let e=this.#o.getBoundingClientRect(),s=B((t.clientX-e.left)/e.width,0,1);this.#b=Math.round(s*360),this.#E()}#q=t=>{let e=t.shiftKey?10:1;switch(t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#b=(this.#b+e)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#b=(this.#b-e+361)%361;break;default:return}this.#E()};#L=()=>{let t=this.#h.input.value.trim();if(t.startsWith("#")||(t="#"+t),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t)){let e=j(t);this.#b=e.h,this.#y=e.s,this.#w=e.l,this.#E()}};#x=()=>{let t=B(Number(this.#f.input.value)||0,0,255),e=B(Number(this.#d.input.value)||0,0,255),s=B(Number(this.#l.input.value)||0,0,255),n=Ye(t,e,s);this.#b=n.h,this.#y=n.s,this.#w=n.l,this.#E()};#M=t=>{let e=t.target.closest("button[data-color]");if(!e)return;let s=e.getAttribute("data-color"),n=j(s);this.#b=n.h,this.#y=n.s,this.#w=n.l,this.#E()};#P=async()=>{try{let e=await new EyeDropper().open(),s=j(e.sRGBHex);this.#b=s.h,this.#y=s.s,this.#w=s.l,this.#E()}catch{}};#V=async()=>{let t=Q(this.#b,this.#y,this.#w);try{await navigator.clipboard.writeText(t),this.#g.textContent="Copied!",setTimeout(()=>{this.#g.textContent="Copy"},1500)}catch{}};#E(){this.#C(),this.#U();let t=Q(this.#b,this.#y,this.#w),e=Yt(this.#b,this.#y,this.#w);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:t,rgb:{r:e.r,g:e.g,b:e.b},hsl:{h:this.#b,s:this.#y,l:this.#w}}}))}#C(){let t=Q(this.#b,this.#y,this.#w),e=Yt(this.#b,this.#y,this.#w),s=Q(this.#b,100,50);this.#n.style.background=t,this.#s.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#c.style.insetInlineStart=`${this.#y}%`,this.#c.style.insetBlockStart=`${100-this.#w}%`,this.#c.style.background=t,this.#a.setAttribute("aria-valuetext",`Saturation ${this.#y}%, Lightness ${this.#w}%`),this.#p.style.insetInlineStart=`${this.#b/360*100}%`,this.#o.setAttribute("aria-valuenow",String(this.#b)),this.#o.setAttribute("aria-valuetext",`Hue ${this.#b}\xB0`),this.#h.input.value=t,this.#f.input.value=String(e.r),this.#d.input.value=String(e.g),this.#l.input.value=String(e.b)}#R(){if(!this.#v){if(this.#v=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#A){this.#H();try{this.#r.showPopover()}catch{}window.addEventListener("scroll",this.#O,{capture:!0,passive:!0}),window.addEventListener("resize",this.#O,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#z(){if(this.#v){if(this.#v=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#A){try{this.#r.hidePopover()}catch{}window.removeEventListener("scroll",this.#O,{capture:!0}),window.removeEventListener("resize",this.#O)}this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}}#H(){if(!this.#A)return;let t=this.#i.getBoundingClientRect();this.#r.style.setProperty("--panel-top",`${t.bottom+4}px`),this.#r.style.setProperty("--panel-left",`${t.left}px`)}#O=()=>{this.#v&&this.#H()};#W=t=>{this.#v&&!this.contains(t.target)&&this.#z()};#U(){let t=Q(this.#b,this.#y,this.#w);this.#e.setFormValue(t),this.#t.value=t,this.#t.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){let t=j(this.#B);this.#b=t.h,this.#y=t.s,this.#w=t.l,this.#C(),this.#U()}formStateRestoreCallback(t){if(!t)return;let e=j(t);this.#b=e.h,this.#y=e.s,this.#w=e.l,this.#C(),this.#U()}get value(){return Q(this.#b,this.#y,this.#w)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let e=j(t);this.#b=e.h,this.#y=e.s,this.#w=e.l,this.#E()}};f("color-picker",Ge);var Ke=class extends m{#e;#t;#i=[];#n=-1;#s=!1;#r=[];#a=!1;setup(){if(this.#e=this.querySelector(":scope > [data-trigger]"),this.#t=this.querySelector(':scope > menu, :scope > ul[role="menu"]'),!this.#e||!this.#t)return!1;this.#a=F,this.#a&&this.#t.setAttribute("popover","auto"),this.#e?.setAttribute("aria-expanded","false"),this.#t.setAttribute("role","menu"),this.#t.id||(this.#t.id=`ctx-menu-${crypto.randomUUID().slice(0,8)}`),this.#t.querySelectorAll(":scope > li[data-group]").forEach(t=>{t.setAttribute("role","presentation"),t.classList.add("ctx-group-label")}),this.#i=Array.from(this.#t.querySelectorAll('button, a, [role="menuitem"]')).filter(t=>!t.disabled&&!t.hasAttribute("data-disabled")),this.#i.forEach(t=>{t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1"),t.style.cssText+=";border:none;box-shadow:none;transform:none;border-radius:0;",this.listen(t,"click",this.#h);let e=t.getAttribute("data-shortcut");if(e){let s=document.createElement("kbd");s.className="ctx-kbd",s.textContent=Ys(e),t.appendChild(s);let n=Ht(e,()=>t.click());this.#r.push(n)}}),this.#t.querySelectorAll('li:empty:not([data-group]), [role="separator"], hr').forEach(t=>{t.setAttribute("role","separator")}),this.listen(this.#e,"contextmenu",this.#c),this.listen(this.#t,"keydown",this.#p),this.listen(window,"scroll",this.#m,{capture:!0}),this.#a?this.listen(this.#t,"toggle",this.#u):(this.listen(document,"click",this.#f),this.listen(document,"contextmenu",this.#d),this.listen(document,"keydown",this.#l))}teardown(){this.#r.forEach(t=>t()),this.#r=[]}#c=t=>{t.preventDefault(),this.#o(t.clientX,t.clientY)};#o(t,e){if(this.#s=!0,this.setAttribute("data-open",""),this.#e?.setAttribute("aria-expanded","true"),this.#t.style.setProperty("--ctx-top",`${e}px`),this.#t.style.setProperty("--ctx-left",`${t}px`),this.#a)try{this.#t.showPopover()}catch{}requestAnimationFrame(()=>{let s=this.#t.getBoundingClientRect(),n=t+s.width>window.innerWidth?t-s.width:t,r=e+s.height>window.innerHeight?e-s.height:e;this.#t.style.setProperty("--ctx-top",`${Math.max(0,r)}px`),this.#t.style.setProperty("--ctx-left",`${Math.max(0,n)}px`)}),this.#n=-1,this.#g(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){if(this.#s){if(this.#s=!1,this.removeAttribute("data-open"),this.#e?.setAttribute("aria-expanded","false"),this.#n=-1,this.#a)try{this.#t.hidePopover()}catch{}this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0}))}}#p=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#g(this.#n+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#g(this.#n-1);break;case"Home":t.preventDefault(),this.#g(0);break;case"End":t.preventDefault(),this.#g(this.#i.length-1);break;case"Enter":case" ":t.preventDefault(),this.#n>=0&&this.#i[this.#n].click();break;case"Tab":this.close();break}};#h=()=>{this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:this.#i[this.#n]}}))};#f=t=>{this.#s&&!this.#t.contains(t.target)&&this.close()};#d=t=>{this.#s&&!this.#e.contains(t.target)&&this.close()};#l=t=>{t.key==="Escape"&&this.#s&&(t.preventDefault(),this.close())};#u=t=>{t.newState==="closed"&&this.#s&&(this.#s=!1,this.removeAttribute("data-open"),this.#n=-1,this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#m=()=>{this.#s&&this.close()};#g(t){this.#i.length!==0&&(t<0&&(t=this.#i.length-1),t>=this.#i.length&&(t=0),this.#n=t,this.#i[t].focus())}get isOpen(){return this.#s}};f("context-menu",Ke);var Xe=class extends m{#e;#t;#i=null;#n=!1;setup(){if(this.#n)return;let t=this.getAttribute("src");if(!t)return!1;this.#i===null&&(this.#i=this.innerHTML),this.hasAttribute("lazy")?this.#r():this.#a(t)}teardown(){this.#e?.disconnect(),this.#t?.abort()}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e,s){t==="src"&&s&&e!==s&&this.isConnected&&(this.hasAttribute("lazy")&&!this.#s()?this.#r():this.#a(s))}#s(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#r(){this.#e?.disconnect(),this.#e=new IntersectionObserver(t=>{for(let e of t)if(e.isIntersecting){this.#e.disconnect();let s=this.getAttribute("src");s&&this.#a(s)}},{rootMargin:"200px"}),this.#e.observe(this)}async#a(t){this.#t?.abort(),this.#t=new AbortController,this.setAttribute("data-loading",""),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let e=await fetch(t,{signal:this.#t.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);let s=await e.text(),n=this.getAttribute("mode")||"replace";n==="replace"?this.innerHTML=s:n==="append"?this.insertAdjacentHTML("beforeend",s):n==="prepend"&&this.insertAdjacentHTML("afterbegin",s),this.hasAttribute("allow-scripts")?this.querySelectorAll("script").forEach(r=>{let a=document.createElement("script");for(let o of r.attributes)a.setAttribute(o.name,o.value);a.textContent=r.textContent,r.replaceWith(a)}):this.querySelectorAll("script").forEach(r=>r.remove()),this.removeAttribute("data-loading"),this.setAttribute("data-loaded",""),this.#n=!0,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,html:s}}))}catch(e){if(e.name==="AbortError")return;this.removeAttribute("data-loading"),this.setAttribute("data-error",""),(this.getAttribute("mode")||"replace")==="replace"&&this.#i!==null&&!this.#n&&(this.innerHTML=this.#i),this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:e.message}}))}}reload(){let t=this.getAttribute("src");t&&this.#a(t)}};f("include-file",Xe);W();var un="environment",pn="preferences",Je={timeOfDay:!1,seasonal:!1},Ba=900*1e3,Y={...Je};function tt(i,t,e){return i+(t-i)*Math.min(1,Math.max(0,e))}var Ct={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let i=await w.get(un,pn);Y=i?{...Je,...i}:{...Je},(Y.timeOfDay||Y.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...Y}},save(i){return Y={...Y,...i},w.set(un,pn,Y).catch(()=>{}),{...Y}},setTimeOverride(i){this._timeOverride=i,this._hasActiveSource()&&this._update()},setMonthOverride(i){this._monthOverride=i,this._hasActiveSource()&&this._update()},setSource(i,t){let e=this.save({[i]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(e)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(i){let t=i||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent");let t=i.getAttribute("data-theme");if(t){let e=`[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(e)&&!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 i=this.load(),t=0;i.timeOfDay&&(t+=this._getTimeOfDayOffset()),i.seasonal&&(t+=this._getSeasonalOffset());let e=document.documentElement;t!==0&&this._baseHues?(e.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),e.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),e.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let i=document.documentElement;i.style.removeProperty("--hue-primary"),i.style.removeProperty("--hue-secondary"),i.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let i=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return i<5?-20:i<7?tt(-20,20,(i-5)/2):i<10?tt(20,5,(i-7)/3):i<14?tt(5,0,(i-10)/4):i<17?tt(0,-5,(i-14)/3):i<19?tt(-5,15,(i-17)/2):i<21?tt(15,-10,(i-19)/2):tt(-10,-20,(i-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let i=this._monthOverride??new Date().getMonth(),e=this._getHemisphere()==="south"?(i+6)%12:i;return e>=2&&e<=4?5:e>=5&&e<=7?10:e>=8&&e<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Ba))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var Gt=null;function mn(){return"0.1.2-9bbc11a4"}function Pa(){let i=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let e of i){let s=e.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function bn(){return Gt||(Gt=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),Gt}function gn(i){return new Promise((t,e)=>{navigator.serviceWorker?.controller?fn(navigator.serviceWorker.controller,i,t,e):bn().then(s=>{let n=s.active||s.waiting||s.installing;n?fn(n,i,t,e):e(new Error("No active service worker"))}).catch(e)})}function fn(i,t,e,s){let n=new MessageChannel;n.port1.onmessage=r=>e(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),i.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function yn(){return gn("GET_STATUS")}async function vn(){return gn("CLEAR_CACHE")}async function wn(){let i=await bn();return await i.update(),{updated:!!i.waiting}}function Fa(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Fa()){let i=Pa();window.addEventListener("load",()=>{Gt=navigator.serviceWorker.register(i).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}W();var ut=null,G="settings",Jt={motionFx:!0,sounds:!1},ii=class extends m{#e=null;#t=null;#i=!1;#n=[];#s={...Jt};#r=!1;async setup(){await this.#a(),this.#v(),this.#b(),this.#C(),this.listen(window,"vb:theme-change",this.#E),this.listen(window,"vb:extensions-change",this.#E),this.listen(window,"vb:a11y-themes-change",this.#E)}teardown(){}async#a(){let[t,e,s]=await Promise.all([w.get(G,"a11y"),w.get(G,"extensions"),w.get(G,"sticky")]);this.#n=Array.isArray(t)?t:[],this.#s={...Jt,...e??{}},this.#r=s==="on"}#c(t){return t!==""&&t!==void 0}#o(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#p(t,e){return t?e==="compact"?"compact":e==="spacious"?"spacious":"default":""}#h(){return this.#r}#f(t){return t!==""&&t!==void 0}#d(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#l(t,e){return t?e==="flush"?"flush":e==="elevated"?"elevated":"default":""}#u(t){if(!t)return"card";let e=t.split(/\s+/);for(let s of e)if(s==="stretch"||s==="integrated")return s;return"card"}#m(t){return t?t.split(/\s+/).includes("fixed"):!1}#g(t,e){let s=[];return t&&t!=="card"&&s.push(t),e&&s.push("fixed"),s.join(" ")||"card"}#v(){this.#e=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#e||(this.#e=document.createElement("button"),this.#e.setAttribute("data-trigger",""),this.#e.setAttribute("aria-label","Site settings"),this.#e.className="settings-trigger",this.#e.innerHTML='<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>',this.prepend(this.#e)),this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.#t=document.createElement("div"),this.#t.className="settings-panel",this.#t.setAttribute("role","dialog"),this.#t.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#t.id=t,this.#e.setAttribute("aria-controls",t),this.#t.innerHTML=this.#A(),this.appendChild(this.#t)}#A(){let{mode:t,brand:e,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:h}=S.getState(),d=this.#O(),u=this.#Y(),b=this.#c(s),y=this.#o(s),p=this.#f(n),E=this.#d(n);return`
121
122
  <header class="settings-header">
122
123
  <strong>Settings</strong>
123
124
  <button type="button" class="settings-close" aria-label="Close settings">
@@ -131,21 +132,22 @@ svg {
131
132
  <summary>Appearance</summary>
132
133
  <div class="settings-section">
133
134
  <span class="settings-label">Color Mode</span>
134
- <div class="segmented-control" role="radiogroup" aria-label="Color mode">
135
+ <fieldset data-segmented>
136
+ <legend class="visually-hidden">Color mode</legend>
135
137
  ${[{id:"auto",name:"Auto",icon:"monitor"},{id:"light",name:"Light",icon:"sun"},{id:"dark",name:"Dark",icon:"moon"}].map(v=>`
136
- <label class="segment">
138
+ <label>
137
139
  <input type="radio" name="settings-mode" value="${v.id}" ${t===v.id?"checked":""} />
138
- <span><icon-wc name="${v.icon}" size="xs"></icon-wc> ${v.name}</span>
140
+ <icon-wc name="${v.icon}" size="xs"></icon-wc> ${v.name}
139
141
  </label>
140
142
  `).join("")}
141
- </div>
143
+ </fieldset>
142
144
 
143
145
  <label class="settings-label" for="settings-theme">Theme</label>
144
146
  <select id="settings-theme" name="settings-theme">
145
- ${Is.map(v=>`
147
+ ${Fs.map(v=>`
146
148
  <optgroup label="${v.label}">
147
- ${v.themes.map(A=>`
148
- <option value="${A.id}" ${e===A.id?"selected":""}>${A.name}</option>
149
+ ${v.themes.map(T=>`
150
+ <option value="${T.id}" ${e===T.id?"selected":""}>${T.name}</option>
149
151
  `).join("")}
150
152
  </optgroup>
151
153
  `).join("")}
@@ -178,18 +180,19 @@ svg {
178
180
  <div class="settings-section">
179
181
  <label class="toggle-row">
180
182
  <span>Fluid Scaling</span>
181
- <input type="checkbox" name="fluid-scaling" data-switch="sm" data-fluid-toggle ${m?"checked":""} />
183
+ <input type="checkbox" name="fluid-scaling" data-switch="sm" data-fluid-toggle ${b?"checked":""} />
182
184
  </label>
183
- <div class="density-row" ${m?"":"hidden"}>
185
+ <div class="density-row" ${b?"":"hidden"}>
184
186
  <span class="settings-label">Density</span>
185
- <div class="segmented-control" role="radiogroup" aria-label="Density">
187
+ <fieldset data-segmented>
188
+ <legend class="visually-hidden">Density</legend>
186
189
  ${["compact","default","spacious"].map(v=>`
187
- <label class="segment">
190
+ <label>
188
191
  <input type="radio" name="settings-density" value="${v}" ${y===v?"checked":""} />
189
- <span>${v[0].toUpperCase()+v.slice(1)}</span>
192
+ ${v[0].toUpperCase()+v.slice(1)}
190
193
  </label>
191
194
  `).join("")}
192
- </div>
195
+ </fieldset>
193
196
  </div>
194
197
 
195
198
  <label class="toggle-row">
@@ -198,30 +201,32 @@ svg {
198
201
  </label>
199
202
  <div class="backdrop-row" ${p?"":"hidden"}>
200
203
  <span class="settings-label">Style</span>
201
- <div class="segmented-control" role="radiogroup" aria-label="Backdrop style">
204
+ <fieldset data-segmented>
205
+ <legend class="visually-hidden">Backdrop style</legend>
202
206
  ${["default","flush","elevated"].map(v=>`
203
- <label class="segment">
204
- <input type="radio" name="settings-backdrop" value="${v}" ${f===v?"checked":""} />
205
- <span>${v[0].toUpperCase()+v.slice(1)}</span>
207
+ <label>
208
+ <input type="radio" name="settings-backdrop" value="${v}" ${E===v?"checked":""} />
209
+ ${v[0].toUpperCase()+v.slice(1)}
206
210
  </label>
207
211
  `).join("")}
208
- </div>
212
+ </fieldset>
209
213
  </div>
210
214
  <div class="backdrop-row" ${p?"":"hidden"}>
211
215
  <span class="settings-label">Chrome</span>
212
- <div class="segmented-control" role="radiogroup" aria-label="Backdrop chrome mode">
216
+ <fieldset data-segmented>
217
+ <legend class="visually-hidden">Backdrop chrome mode</legend>
213
218
  ${["card","stretch","integrated"].map(v=>`
214
- <label class="segment">
215
- <input type="radio" name="settings-backdrop-chrome" value="${v}" ${this.#h(r)===v?"checked":""} />
216
- <span>${v[0].toUpperCase()+v.slice(1)}</span>
219
+ <label>
220
+ <input type="radio" name="settings-backdrop-chrome" value="${v}" ${this.#u(r)===v?"checked":""} />
221
+ ${v[0].toUpperCase()+v.slice(1)}
217
222
  </label>
218
223
  `).join("")}
219
- </div>
224
+ </fieldset>
220
225
  </div>
221
226
  <div class="backdrop-row" ${p?"":"hidden"}>
222
227
  <label class="toggle-row">
223
228
  <span>Fixed Header</span>
224
- <input type="checkbox" name="settings-backdrop-fixed" data-switch="sm" data-backdrop-fixed ${this.#p(r)?"checked":""} />
229
+ <input type="checkbox" name="settings-backdrop-fixed" data-switch="sm" data-backdrop-fixed ${this.#m(r)?"checked":""} />
225
230
  </label>
226
231
  </div>
227
232
  <div class="backdrop-row" ${p?"":"hidden"}>
@@ -254,7 +259,7 @@ svg {
254
259
 
255
260
  <label class="toggle-row">
256
261
  <span>Sticky Navigation</span>
257
- <input type="checkbox" name="sticky-nav" data-switch="sm" data-sticky-toggle ${this.#a()?"checked":""} />
262
+ <input type="checkbox" name="sticky-nav" data-switch="sm" data-sticky-toggle ${this.#h()?"checked":""} />
258
263
  </label>
259
264
  </div>
260
265
  </details>
@@ -280,11 +285,11 @@ svg {
280
285
  <div class="settings-section">
281
286
  <label class="toggle-row">
282
287
  <span>Time-of-Day Shifts</span>
283
- <input type="checkbox" name="env-timeOfDay" data-switch="sm" data-env="timeOfDay" ${this.#$().timeOfDay?"checked":""} />
288
+ <input type="checkbox" name="env-timeOfDay" data-switch="sm" data-env="timeOfDay" ${this.#j().timeOfDay?"checked":""} />
284
289
  </label>
285
290
  <label class="toggle-row">
286
291
  <span>Seasonal Tinting</span>
287
- <input type="checkbox" name="env-seasonal" data-switch="sm" data-env="seasonal" ${this.#$().seasonal?"checked":""} />
292
+ <input type="checkbox" name="env-seasonal" data-switch="sm" data-env="seasonal" ${this.#j().seasonal?"checked":""} />
288
293
  </label>
289
294
  </div>
290
295
  </details>
@@ -293,7 +298,7 @@ svg {
293
298
  <details name="settings">
294
299
  <summary>System</summary>
295
300
  <div class="settings-section system-info">
296
- <p class="system-version">Vanilla Breeze <code>v${ri()}</code></p>
301
+ <p class="system-version">Vanilla Breeze <code>v${mn()}</code></p>
297
302
  <p class="system-sw-status" data-sw-status>Service Worker: <span>checking\u2026</span></p>
298
303
  <footer class="system-actions">
299
304
  <button type="button" data-action="clear-cache">Clear Cache</button>
@@ -306,8 +311,75 @@ svg {
306
311
  <footer class="settings-footer">
307
312
  <button type="button" class="settings-reset">Reset to Defaults</button>
308
313
  </footer>
309
- `}#b(){this.#e.addEventListener("click",this.#g),this.listen(document,"click",this.#y),this.listen(document,"keydown",this.#S),this.#t.querySelector(".settings-close")?.addEventListener("click",()=>this.close()),this.#t.querySelectorAll('input[name="settings-mode"]').forEach(t=>{t.addEventListener("change",this.#m)}),this.#t.querySelector("#settings-theme")?.addEventListener("change",this.#v),this.#t.querySelector("input[data-fluid-toggle]")?.addEventListener("change",this.#E),this.#t.querySelectorAll('input[name="settings-density"]').forEach(t=>{t.addEventListener("change",this.#F)}),this.#t.querySelector("input[data-backdrop-toggle]")?.addEventListener("change",this.#P),this.#t.querySelectorAll('input[name="settings-backdrop"]').forEach(t=>{t.addEventListener("change",this.#x)}),this.#t.querySelectorAll('input[name="settings-backdrop-chrome"]').forEach(t=>{t.addEventListener("change",this.#B)}),this.#t.querySelector("input[data-backdrop-fixed]")?.addEventListener("change",this.#N),this.#t.querySelector("input[data-sticky-toggle]")?.addEventListener("change",this.#C),this.#t.querySelector('[name="settings-page-bg"]')?.addEventListener("change",this.#_),this.#t.querySelector('[name="settings-page-bg-color"]')?.addEventListener("input",this.#M),this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.addEventListener("input",this.#M),this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.addEventListener("input",this.#M),this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.addEventListener("change",this.#M),this.#t.querySelectorAll("input[data-a11y]").forEach(t=>{t.addEventListener("change",this.#R)}),this.#t.querySelectorAll("input[data-ext]").forEach(t=>{t.addEventListener("change",this.#T)}),this.#t.querySelectorAll("input[data-env]").forEach(t=>{t.addEventListener("change",this.#q)}),this.#t.querySelector(".settings-reset")?.addEventListener("click",this.#D),this.#t.querySelector('[data-action="clear-cache"]')?.addEventListener("click",this.#G),this.#t.querySelector('[data-action="check-update"]')?.addEventListener("click",this.#K),this.#j()}#g=t=>{t.stopPropagation(),this.toggle()};#y=t=>{this.#s&&!this.contains(t.target)&&this.close()};#S=t=>{t.key==="Escape"&&this.#s&&(t.preventDefault(),this.close(),this.#e?.focus())};#m=t=>{E.setMode(t.target.value)};#v=async t=>{let e=t.target;e.disabled=!0;try{await E.setBrand(e.value),this.#V()}catch{console.warn("[VB] Theme load failed, using default")}finally{e.disabled=!1}};#E=t=>{let e=t.target.checked,i=this.#i(E.getState().fluid)||"default";E.setFluid(this.#n(e,i)),this.#I(e)};#F=t=>{E.setFluid(this.#n(!0,t.target.value))};#P=t=>{let e=t.target.checked,i=this.#o(E.getState().backdrop)||"default";E.setBackdrop(this.#u(e,i)),this.#H(e)};#x=t=>{E.setBackdrop(this.#u(!0,t.target.value))};#B=t=>{let e=this.#p(E.getState().backdropChrome);E.setBackdropChrome(this.#d(t.target.value,e))};#N=t=>{let e=this.#h(E.getState().backdropChrome);E.setBackdropChrome(this.#d(e,t.target.checked))};#C=async t=>{let e=t.target.checked;try{localStorage.setItem(Se,e?"on":"off")}catch{}let i=document.querySelector("header");if(e){document.documentElement.dataset.sticky="",i&&(i.dataset.sticky="");let{initStickyManager:n}=await Promise.resolve().then(()=>(st(),St));n()}else{delete document.documentElement.dataset.sticky,i&&delete i.dataset.sticky;let{destroyStickyManager:n}=await Promise.resolve().then(()=>(st(),St));n()}};#_=t=>{let e=t.target.value;if(this.#w(e),e==="color"){let i=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"#1a1a2e";E.setPageBg({type:e,color:i})}else if(e==="gradient"){let i=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"#1a1a2e",n=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"#16213e",r=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";E.setPageBg({type:e,gradStart:i,gradEnd:n,gradDir:r})}else E.setPageBg({})};#M=()=>{let t=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";if(t==="color"){let e=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"";E.setPageBg({type:t,color:e})}else if(t==="gradient"){let e=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"",i=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"",n=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";E.setPageBg({type:t,gradStart:e,gradEnd:i,gradDir:n})}};#R=t=>{let e=t.target.dataset.a11y,i=this.#A();if(t.target.checked&&!i.includes(e))i.push(e);else if(!t.target.checked){let n=i.indexOf(e);n!==-1&&i.splice(n,1)}this.#O(i),this.#z(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:i}))};#T=t=>{let e=t.target.dataset.ext,i=t.target.checked;this.#W(e,i),this.#Y()};#q=t=>{let e=t.target.dataset.env,i=t.target.checked;et.setSource(e,i)};#D=()=>{if(confirm("Reset all settings to defaults?")){E.reset(),this.#O([]),this.#z(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[]}));try{localStorage.removeItem(Ae)}catch{}this.#Y();try{localStorage.removeItem(Se)}catch{}delete document.documentElement.dataset.sticky,Promise.resolve().then(()=>(st(),St)).then(t=>t.destroyStickyManager()).catch(()=>{}),et.setSource("timeOfDay",!1),et.setSource("seasonal",!1),this.#L()}};#k=()=>{this.#L()};#L(){let{mode:t,brand:e,fluid:i,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:h}=E.getState(),d=this.#A(),u=this.#U(),m=this.#r(i),y=this.#i(i),p=this.#c(n),f=this.#o(n),v=this.#t.querySelector(`input[name="settings-mode"][value="${t}"]`);v&&(v.checked=!0);let A=this.#t.querySelector("#settings-theme");A&&(A.value=e||"default");let C=this.#t.querySelector("input[data-fluid-toggle]");C&&(C.checked=m);let lt=this.#t.querySelector(`input[name="settings-density"][value="${y}"]`);lt&&(lt.checked=!0),this.#I(m);let gs=this.#t.querySelector("input[data-backdrop-toggle]");gs&&(gs.checked=p);let vs=this.#t.querySelector(`input[name="settings-backdrop"][value="${f}"]`);vs&&(vs.checked=!0);let pn=this.#h(r),ys=this.#t.querySelector(`input[name="settings-backdrop-chrome"][value="${pn}"]`);ys&&(ys.checked=!0);let Es=this.#t.querySelector("input[data-backdrop-fixed]");Es&&(Es.checked=this.#p(r)),this.#H(p);let ws=this.#t.querySelector('[name="settings-page-bg"]');ws&&(ws.value=a||"");let As=this.#t.querySelector('[name="settings-page-bg-color"]');As&&o&&(As.value=o);let Ss=this.#t.querySelector('[name="settings-page-bg-grad-start"]');Ss&&c&&(Ss.value=c);let xs=this.#t.querySelector('[name="settings-page-bg-grad-end"]');xs&&l&&(xs.value=l);let Cs=this.#t.querySelector('[name="settings-page-bg-grad-dir"]');Cs&&h&&(Cs.value=h),p&&this.#w(a||""),this.#t.querySelectorAll("input[data-a11y]").forEach(j=>{let I=j;I.checked=d.includes(I.dataset.a11y)}),this.#t.querySelectorAll("input[data-ext]").forEach(j=>{let I=j,ht=I.dataset.ext,mn=u[ht];I.checked=mn??xt[ht]});let ks=this.#t.querySelector("input[data-sticky-toggle]");ks&&(ks.checked=this.#a());let fn=this.#$();this.#t.querySelectorAll("input[data-env]").forEach(j=>{let I=j,ht=I.dataset.env;I.checked=fn[ht]??!1})}#I(t){let e=this.#t.querySelector(".density-row");e&&(e.hidden=!t)}#H(t){if(this.#t.querySelectorAll(".backdrop-row").forEach(e=>{e.hidden=!t}),t){let e=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";this.#w(e)}}#w(t){let e=this.#t.querySelector(".page-bg-color-row"),i=this.#t.querySelector(".page-bg-grad-row"),n=this.#t.querySelector(".page-bg-grad-dir-row");e&&(e.hidden=t!=="color"),i&&(i.hidden=t!=="gradient"),n&&(n.hidden=t!=="gradient")}#A(){try{let t=localStorage.getItem(mi);return t?JSON.parse(t):[]}catch{return[]}}#O(t){try{localStorage.setItem(mi,JSON.stringify(t))}catch{}}#z(){let t=this.#A(),{brand:e}=E.getState(),i=document.documentElement,n=e!=="default"?[e,...t]:[...t];n.length?i.dataset.theme=n.join(" "):delete i.dataset.theme}#V(){this.#z()}#$(){return et.load()}#U(){try{let t=localStorage.getItem(Ae);return t?{...xt,...JSON.parse(t)}:{...xt}}catch{return{...xt}}}#W(t,e){try{let i=this.#U();i[t]=e,localStorage.setItem(Ae,JSON.stringify(i))}catch{}}async#Y(){let t=this.#U(),e=document.documentElement;t.motionFx?delete e.dataset.motionReduced:e.dataset.motionReduced="",t.sounds?(U||(U=(await Promise.resolve().then(()=>(fi(),pi))).SoundManager),U.init(),U.enable()):U&&U.disable(),window.dispatchEvent(new CustomEvent("vb:extensions-change",{detail:t}))}async#j(){let t=this.#t.querySelector("[data-sw-status] span");if(t){if(!("serviceWorker"in navigator)){t.textContent="Not supported";return}try{let i=(await ci()).cachedURLs?.length??0;t.textContent=`Active (${i} cached files)`}catch{t.textContent="Not registered"}}}#G=async t=>{let e=t.target;e.disabled=!0,e.textContent="Clearing\u2026";try{await li(),e.textContent="Cleared!",this.#j(),setTimeout(()=>{e.textContent="Clear Cache",e.disabled=!1},2e3)}catch{e.textContent="Failed",setTimeout(()=>{e.textContent="Clear Cache",e.disabled=!1},2e3)}};#K=async t=>{let e=t.target;e.disabled=!0,e.textContent="Checking\u2026";try{let{updated:i}=await hi();e.textContent=i?"Update available!":"Up to date",setTimeout(()=>{e.textContent="Check for Updates",e.disabled=!1},2e3)}catch{e.textContent="Failed",setTimeout(()=>{e.textContent="Check for Updates",e.disabled=!1},2e3)}};open(){this.#s||(this.#s=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#L(),this.#X())}#X(){let t=this.getBoundingClientRect(),e=this.#t;e.style.removeProperty("top"),e.style.removeProperty("bottom"),e.style.removeProperty("left"),e.style.removeProperty("right");let i=e.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,a=t.top,o=r-t.bottom;a<i.height&&o>a?(e.style.top="calc(100% + 8px)",e.style.bottom="auto"):(e.style.bottom="calc(100% + 8px)",e.style.top="auto");let c=n-t.right,l=t.left,h=i.width;t.right<h&&l<c?(e.style.left="0",e.style.right="auto"):(e.style.right="0",e.style.left="auto")}close(){this.#s&&(this.#s=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"))}toggle(){this.#s?this.close():this.open()}};b("settings-panel",xe);var S="interestfor",yi="interestForElement"in HTMLButtonElement.prototype,w=new WeakMap,W=new WeakMap,Tt=new Set,Te=!1,Le=CSS.supports?.("anchor-name","--a")??!1;function bi(s){let t=String(s).trim(),e=t.match(/^([\d.]+)s$/);if(e)return parseFloat(e[1])*1e3;let i=t.match(/^([\d.]+)ms$/);return i?parseFloat(i[1]):parseFloat(t)||0}function Ei(s,t){let e=getComputedStyle(s),i=e.getPropertyValue(t).trim();if(i.toLowerCase()!=="normal")return bi(i);let n=e.getPropertyValue("--interest-delay").trim();if(n&&n.toLowerCase()!=="normal"){let r=n.split(/\s+/).filter(a=>a.length>0);if(r.length>0){let a=t==="--interest-delay-start"?r[0]:r[1]||r[0];if(a.toLowerCase()!=="normal")return bi(a)}}return t==="--interest-delay-start"?500:250}var tr=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(","),er="h1,h2,h3,h4,h5,h6,ul,ol,li,table,nav,header,footer,main,aside,article,section,form,blockquote,details,summary,dialog";function Me(s){if(s.getAttribute("popover")?.toLowerCase()!=="hint"||s.querySelector(tr)||s.querySelector(er))return!1;for(let t of s.querySelectorAll("[role]")){let e=t.getAttribute("role").toLowerCase();if(!["presentation","none","generic","image"].includes(e))return!1}return!0}function sr(s,t){Me(t)?s.setAttribute("aria-describedby",t.id):(s.setAttribute("aria-details",t.id),s.setAttribute("aria-expanded","false"),t.hasAttribute("role")||t.setAttribute("role","tooltip"))}function q(s){let t=s.getAttribute(S);return t?document.getElementById(t):null}function kt(s){let t=W.get(s);return t?.invoker&&w.get(t.invoker)?.state==="full"?t.invoker:null}function rt(s){if(w.has(s))return w.get(s);let t={state:"none",gainedTimer:null,lostTimer:null,longPressTimer:null};w.set(s,t);let e=q(s);return e&&sr(s,e),t}function wi(s,t){if(!s||!t||!s.isConnected||q(s)!==t)return!1;let e=kt(t);if(e){if(e===s)return clearTimeout(w.get(e).lostTimer),!1;if(!nt(e,t)||!s.isConnected||q(s)!==t)return!1}let i=rt(s);if(i.state!=="none")return!1;let n=new CustomEvent("interest",{bubbles:!1,cancelable:!0,detail:{source:s}});if(t.dispatchEvent(n),t.hasAttribute("popover")){try{t.showPopover()}catch{}nr(s,t)}i.state="full",W.has(t)||W.set(t,{});let r=W.get(t);if(r.invoker=s,t.hasAttribute("popover")){let a=o=>{o.newState==="closed"&&nt(s,t)};r.toggleListener=a,t.addEventListener("toggle",a)}return Tt.add(s),s.classList.add("interest-source"),t.classList.add("interest-target"),Me(t)||s.setAttribute("aria-expanded","true"),!0}function nt(s,t){if(!s||!t||q(s)!==t||kt(t)!==s)return!1;let e=w.get(s);if(!e||e.state==="none")return!1;if(clearTimeout(e.gainedTimer),clearTimeout(e.lostTimer),t.dispatchEvent(new CustomEvent("loseinterest",{bubbles:!1,detail:{source:s}})),t.hasAttribute("popover"))try{t.hidePopover()}catch{}let i=W.get(t);return i?.toggleListener&&t.removeEventListener("toggle",i.toggleListener),W.delete(t),Tt.delete(s),s.classList.remove("interest-source"),t.classList.remove("interest-target"),Me(t)||s.setAttribute("aria-expanded","false"),e.state="none",!0}function ir(s){let t=rt(s);clearTimeout(t.gainedTimer);let e=Ei(s,"--interest-delay-start");t.gainedTimer=setTimeout(()=>{let i=q(s);i&&wi(s,i)},e)}function Ce(s){let t=w.get(s);if(!t)return;clearTimeout(t.lostTimer);let e=Ei(s,"--interest-delay-end");t.lostTimer=setTimeout(()=>{let i=q(s);i&&nt(s,i)},e)}function it(s){if(!Le)return;let t=s.getAttribute(S),e=t?document.getElementById(t):null;if(!e?.id)return;let i=`--interest-${e.id}`;s.style.anchorName=i,e.style.positionAnchor=i}function nr(s,t){if(Le)return;let e=s.getBoundingClientRect(),i=t.getBoundingClientRect(),n=8,r=8,a=e.top-i.height-n,o=e.left+(e.width-i.width)/2;a<r&&(a=e.bottom+n),o=Math.max(r,Math.min(o,window.innerWidth-i.width-r)),a=Math.max(r,Math.min(a,window.innerHeight-i.height-r)),t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.margin="0"}function rr(s,t){if(Te||!s.isConnected)return;if(!q(s)){let r=s.closest(".interest-target");if(r){let a=kt(r);a&&(t?clearTimeout(w.get(a)?.lostTimer):Ce(a))}return}let i=rt(s),n=kt(s);if(t)clearTimeout(i.lostTimer),n&&clearTimeout(w.get(n)?.lostTimer),ir(s);else if(clearTimeout(i.gainedTimer),i.state!=="none"&&Ce(s),n){let r=w.get(n);r&&clearTimeout(r.gainedTimer),Ce(n)}}function ar(){let s=(i,n)=>{for(let r=i.target;r;r=r.parentElement)rr(r,n)};document.body.addEventListener("mouseover",i=>s(i,!0)),document.body.addEventListener("mouseout",i=>s(i,!1)),document.body.addEventListener("focusin",i=>s(i,!0)),document.body.addEventListener("focusout",i=>s(i,!1)),document.body.addEventListener("keydown",i=>{if(i.key==="Escape")for(let n of Tt){let r=q(n);r&&nt(n,r)}});let t=500;document.body.addEventListener("touchstart",i=>{Te=!0;let n=i.target.closest(`button[${S}]`);if(!n)return;let r=rt(n);r.longPressTimer=setTimeout(()=>{let a=q(n);a&&wi(n,a),r.longPressTimer=null},t)});let e=i=>{let n=i.target.closest(`button[${S}]`);if(!n)return;let r=w.get(n);r?.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)};document.body.addEventListener("touchend",i=>{e(i),Te=!1}),document.body.addEventListener("touchmove",e)}function or(){let s=document.createElement("style");s.textContent=['@property --interest-delay-start { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay-end { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay { syntax: "*"; inherits: false; initial-value: normal; }'].join(`
310
- `),document.head.appendChild(s)}function Ct(s){rt(s),it(s)}function ke(s){let t=w.get(s);if(t){if(clearTimeout(t.gainedTimer),clearTimeout(t.lostTimer),clearTimeout(t.longPressTimer),t.state!=="none"){let e=q(s);e&&nt(s,e)}s.classList.remove("interest-source"),w.delete(s),Tt.delete(s)}}function gi(s=document){s.querySelectorAll(`[${S}]`).forEach(Ct)}var vi=new MutationObserver(s=>{for(let t of s){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.hasAttribute(S)&&Ct(i),i.querySelectorAll(`[${S}]`).forEach(Ct)}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;w.has(i)&&ke(i),i.querySelectorAll(`[${S}]`).forEach(n=>{w.has(n)&&ke(n)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let e=t.target;e.hasAttribute(S)?w.has(e)||Ct(e):w.has(e)&&ke(e)}}});yi||(or(),ar(),document.documentElement.setAttribute("data-interest-polyfill",""),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{gi(),vi.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[S]})}):(gi(),vi.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[S]})));if(yi&&Le){let s=()=>{document.querySelectorAll(`[${S}]`).forEach(it),new MutationObserver(t=>{for(let e of t){for(let i of e.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let n=i;n.hasAttribute(S)&&it(n),n.querySelectorAll(`[${S}]`).forEach(it)}e.type==="attributes"&&e.target.hasAttribute?.(S)&&it(e.target)}}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[S]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",s):s()}var De="[data-copy], [data-copy-target]";function Ai(s=document){s.querySelectorAll(De).forEach(Ne)}function Ne(s){if(s.hasAttribute("data-copy-init"))return;s.setAttribute("data-copy-init","");let t;s.addEventListener("click",async()=>{let e=cr(s);if(e)try{await navigator.clipboard.writeText(e),s.dataset.state="copied",clearTimeout(t),t=setTimeout(()=>{delete s.dataset.state},1500),lr("Copied to clipboard",s),s.dispatchEvent(new CustomEvent("copy",{bubbles:!0,detail:{text:e}}))}catch{}})}function cr(s){return s.dataset.copy?s.dataset.copy:s.dataset.copyTarget?document.querySelector(s.dataset.copyTarget)?.textContent??"":""}function lr(s,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="sr-only",e.textContent=s,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ai()):Ai();var hr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(De)&&Ne(i),i.querySelectorAll(De).forEach(n=>Ne(n))}});hr.observe(document.documentElement,{childList:!0,subtree:!0});var qe="kbd[data-hotkey]";function Si(s=document){s.querySelectorAll(qe).forEach(Ie)}function Ie(s){if(s.hasAttribute("data-hotkey-init"))return;s.setAttribute("data-hotkey-init","");let t=s.dataset.hotkey;if(!t)return;let e=H?X.mac:X.other,i=t.toLowerCase().split("+").map(r=>r.trim()),n=document.createDocumentFragment();i.forEach((r,a)=>{let o=document.createElement("kbd");o.textContent=e[r]??r.toUpperCase(),n.appendChild(o),a<i.length-1&&!H&&n.appendChild(document.createTextNode("+"))}),s.replaceChildren(n),s.setAttribute("aria-label",s.textContent)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Si()):Si();var dr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(qe)&&Ie(i),i.querySelectorAll(qe).forEach(n=>Ie(n))}});dr.observe(document.documentElement,{childList:!0,subtree:!0});function Y(){return document.documentElement.lang||navigator.language||"en"}var $e="data[data-format-number]";function xi(s=document){s.querySelectorAll($e).forEach(Pe)}function Pe(s){if(s.hasAttribute("data-format-number-init"))return;s.setAttribute("data-format-number-init","");let t=s.getAttribute("value");if(t==null)return;let e=Number(t);if(isNaN(e))return;s.title||(s.title=s.textContent.trim());let i=s.getAttribute("data-format-number")||"decimal",n=s.getAttribute("data-locale")||Y(),r={};switch(i){case"currency":{r.style="currency",r.currency=s.getAttribute("data-currency")||"USD";break}case"percent":r.style="percent";break;case"compact":r.notation="compact";break;default:break}try{s.textContent=new Intl.NumberFormat(n,r).format(e)}catch{}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>xi()):xi();var ur=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches($e)&&Pe(i),i.querySelectorAll($e).forEach(n=>Pe(n))}});ur.observe(document.documentElement,{childList:!0,subtree:!0});var Lt="time[data-format-date]",at=new Map;function Ci(s=document){s.querySelectorAll(Lt).forEach(Be)}function Be(s){if(s.hasAttribute("data-format-date-init"))return;s.setAttribute("data-format-date-init","");let t=s.getAttribute("datetime");if(!t)return;let e=new Date(t);if(isNaN(e.getTime()))return;s.title||(s.title=s.textContent.trim());let i=s.getAttribute("data-format-date")||"medium",n=s.getAttribute("data-locale")||Y();i==="relative"?(s.textContent=Ti(e,n),Li(s,e,n)):s.textContent=pr(e,i,s,n)}function pr(s,t,e,i){let n=t||"medium",r=e.getAttribute("data-format-time")||void 0;try{let a={dateStyle:n};return r&&(a.timeStyle=r),new Intl.DateTimeFormat(i,a).format(s)}catch{return e.textContent}}function Ti(s,t){let e=Date.now(),i=Math.round((s.getTime()-e)/1e3),n=Math.abs(i),r=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(let{unit:a,seconds:o}of r)if(n>=o){let c=Math.round(i/o);try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(c,a)}catch{let l=Math.abs(c),h=l===1?a:`${a}s`;return c<0?`${l} ${h} ago`:`in ${l} ${h}`}}try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second")}catch{return"just now"}}function Li(s,t,e){clearInterval(at.get(s));let i=Math.abs(Date.now()-t.getTime()),n=36e5,r=864e5,a;i<n?a=6e4:i<r?a=3e5:a=36e5;let o=setInterval(()=>{s.textContent=Ti(t,e),Li(s,t,e)},a);at.set(s,o)}function ki(s){at.has(s)&&(clearInterval(at.get(s)),at.delete(s))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ci()):Ci();var fr=new MutationObserver(s=>{for(let t of s){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Lt)&&Be(i),i.querySelectorAll(Lt).forEach(n=>Be(n))}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;ki(i),i.querySelectorAll(Lt).forEach(ki)}}});fr.observe(document.documentElement,{childList:!0,subtree:!0});var Oe="data[data-format-bytes]",_e=["B","KB","MB","GB","TB","PB"];function Mi(s=document){s.querySelectorAll(Oe).forEach(Fe)}function Fe(s){if(s.hasAttribute("data-format-bytes-init"))return;s.setAttribute("data-format-bytes-init","");let t=s.getAttribute("value");if(t==null)return;let e=Number(t);if(isNaN(e)||e<0)return;s.title||(s.title=s.textContent.trim());let i=parseInt(s.getAttribute("data-format-bytes")??"0",10)||0,n=s.getAttribute("data-unit")==="decimal",r=s.getAttribute("data-locale")||Y(),a=n?1e3:1024;if(e===0){s.textContent="0 B";return}let o=Math.min(Math.floor(Math.log(e)/Math.log(a)),_e.length-1),c=e/Math.pow(a,o);try{let l=new Intl.NumberFormat(r,{minimumFractionDigits:i,maximumFractionDigits:i}).format(c);s.textContent=`${l} ${_e[o]}`}catch{s.textContent=`${c.toFixed(i)} ${_e[o]}`}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Mi()):Mi();var mr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Oe)&&Fe(i),i.querySelectorAll(Oe).forEach(n=>Fe(n))}});mr.observe(document.documentElement,{childList:!0,subtree:!0});var Re="[data-spoiler]";var qi=new Set(["SPAN","EM","STRONG","CODE","A","B","I","S","U","SMALL","SUB","SUP","MARK","ABBR","Q","CITE","DFN","SAMP","VAR","KBD","BDI","BDO","DATA","TIME","WBR"]);function Di(s=document){s.querySelectorAll(Re).forEach(He)}function He(s){if(s.hasAttribute("data-spoiler-init"))return;s.setAttribute("data-spoiler-init","");let t=s.getAttribute("data-spoiler")||"blur";s.getAttribute("data-spoiler")||s.setAttribute("data-spoiler","blur");let e=qi.has(s.tagName),i=e?"span":"div";s.setAttribute("role","group"),s.setAttribute("aria-label","Spoiler");let n=document.createElement(i);for(n.setAttribute("data-spoiler-content",""),n.setAttribute("inert","");s.firstChild;)n.appendChild(s.firstChild);s.appendChild(n);let r=s.getAttribute("data-spoiler-label")||"Reveal spoiler",a;e?(a=document.createElement("span"),a.setAttribute("role","button"),a.setAttribute("tabindex","0")):(a=document.createElement("button"),a.setAttribute("type","button")),a.setAttribute("data-spoiler-trigger",""),a.setAttribute("aria-expanded","false");let o=document.createElement("span");o.setAttribute("data-spoiler-label",""),o.textContent=r,a.appendChild(o),s.appendChild(a),a.addEventListener("click",()=>Ni(s)),e&&a.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),Ni(s))}),s.addEventListener("keydown",c=>{c.key==="Escape"&&s.hasAttribute("data-spoiler-visible")&&(c.stopPropagation(),Mt(s))})}function Ni(s){let t=s.getAttribute("data-spoiler-group");t&&document.querySelectorAll(`[data-spoiler-group="${t}"][data-spoiler-visible]`).forEach(n=>{n!==s&&Mt(n)});let e=s.querySelector("[data-spoiler-content]"),i=s.querySelector("[data-spoiler-trigger]");if(e&&e.removeAttribute("inert"),i&&(i.setAttribute("aria-expanded","true"),i.hidden=!0),s.setAttribute("data-spoiler-visible",""),!s.hasAttribute("data-spoiler-persist")){let n=qi.has(s.tagName),r;n?(r=document.createElement("span"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),Mt(s))})):(r=document.createElement("button"),r.setAttribute("type","button")),r.setAttribute("data-spoiler-hide",""),r.textContent="Hide",r.addEventListener("click",()=>Mt(s)),s.appendChild(r)}br("Spoiler revealed"),s.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!0}}))}function Mt(s){if(s.hasAttribute("data-spoiler-persist"))return;let t=s.querySelector("[data-spoiler-content]"),e=s.querySelector("[data-spoiler-trigger]"),i=s.querySelector("[data-spoiler-hide]");t&&t.setAttribute("inert",""),e&&(e.setAttribute("aria-expanded","false"),e.hidden=!1,e.focus()),i&&i.remove(),s.removeAttribute("data-spoiler-visible"),s.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!1}}))}function br(s){let t=document.createElement("div");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:"0"}),t.textContent=s,document.body.appendChild(t),setTimeout(()=>t.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Di()):Di();var gr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Re)&&He(i),i.querySelectorAll(Re).forEach(He)}});gr.observe(document.documentElement,{childList:!0,subtree:!0});var ze="[data-splitter]";function Ii(s=document){s.querySelectorAll(ze).forEach(Ve)}function Ve(s){if(s.hasAttribute("data-splitter-init"))return;s.setAttribute("data-splitter-init","");let t=[...s.children];if(t.length<2)return;let e=t[0],i=t[1],n=s.getAttribute("data-splitter")==="vertical",r=Number(e.dataset.min)||10,a=Number(e.dataset.max)||90,o=document.createElement("div");o.className="split-divider",o.setAttribute("role","separator"),o.setAttribute("aria-orientation",n?"vertical":"horizontal"),o.setAttribute("aria-valuenow","50"),o.setAttribute("aria-valuemin",String(r)),o.setAttribute("aria-valuemax",String(a)),o.setAttribute("aria-label","Resize panels"),o.setAttribute("tabindex","0"),s.insertBefore(o,i),e.style.flexBasis="50%",e.style.flexGrow="0",e.style.flexShrink="0",e.style.overflow="auto",i.style.flexGrow="1",i.style.overflow="auto";let c=!1;function l(h){let d=Math.min(a,Math.max(r,h));e.style.flexBasis=`${d}%`,o.setAttribute("aria-valuenow",String(Math.round(d))),s.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:d},bubbles:!0}))}o.addEventListener("pointerdown",h=>{h.preventDefault(),c=!0,o.setPointerCapture(h.pointerId),s.style.userSelect="none"}),o.addEventListener("pointermove",h=>{if(!c)return;let d=s.getBoundingClientRect(),u;n?u=(h.clientY-d.top)/d.height*100:u=(h.clientX-d.left)/d.width*100,l(u)}),o.addEventListener("pointerup",h=>{c=!1,o.releasePointerCapture(h.pointerId),s.style.userSelect=""}),o.addEventListener("keydown",h=>{let d=h.shiftKey?10:1,u=Number(o.getAttribute("aria-valuenow")),m=n?["ArrowUp"]:["ArrowLeft"],y=n?["ArrowDown"]:["ArrowRight"];m.includes(h.key)?(h.preventDefault(),l(u-d)):y.includes(h.key)?(h.preventDefault(),l(u+d)):h.key==="Home"?(h.preventDefault(),l(r)):h.key==="End"&&(h.preventDefault(),l(a))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ii()):Ii();var vr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(ze)&&Ve(i),i.querySelectorAll(ze).forEach(Ve)}});vr.observe(document.documentElement,{childList:!0,subtree:!0});var Ue='input[type="checkbox"][data-switch]';function We(s){s.hasAttribute("data-switch-init")||(s.setAttribute("data-switch-init",""),s.setAttribute("role","switch"))}function $i(s=document){s.querySelectorAll(Ue).forEach(We)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>$i()):$i();var yr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Ue)&&We(i),i.querySelectorAll(Ue).forEach(n=>We(n))}});yr.observe(document.documentElement,{childList:!0,subtree:!0});var Dt=new Map,Ye=null,Nt=!1;function Er(s){for(let[t,e]of Dt)s.querySelectorAll(t).forEach(e)}function wr(s){if(s.nodeType!==Node.ELEMENT_NODE)return;let t=s;for(let[e,i]of Dt)t.matches(e)&&i(t),t.querySelectorAll(e).forEach(i)}function Ar(){Ye||(Ye=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes)wr(e)}),Ye.observe(document.documentElement,{childList:!0,subtree:!0}))}function Sr(){Nt||(Nt=!0,Er(document))}function x(s,t){Dt.set(s,t),Ar(),Nt||document.readyState!=="loading"?(Nt=!0,document.querySelectorAll(s).forEach(t)):Dt.size===1&&document.addEventListener("DOMContentLoaded",Sr)}var xr="textarea[data-count]";function Cr(s){if(s.hasAttribute("data-count-init"))return;s.setAttribute("data-count-init","");let t=s.dataset.count==="words",e=t?parseInt(s.dataset.maxwords??"0",10)||0:s.maxLength>0?s.maxLength:0,i=document.createElement("output");i.className="textarea-counter",i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true");let n=s.closest("form-field");n?n.appendChild(i):s.insertAdjacentElement("afterend",i);function r(){let a=s.value,o=t?a.trim()?a.trim().split(/\s+/).length:0:a.length;if(e>0){i.textContent=`${o} / ${e}`;let c=o/e;i.dataset.state=c>=1?"error":c>=.8?"warning":""}else{let c=t?o===1?"word":"words":o===1?"character":"characters";i.textContent=`${o} ${c}`,i.dataset.state=""}}s.addEventListener("input",r),r()}x(xr,Cr);var kr="textarea[data-grow]",Tr=CSS.supports("field-sizing","content");function Lr(s){if(s.hasAttribute("data-grow-init"))return;s.setAttribute("data-grow-init","");let t=parseInt(s.dataset.maxRows??"0",10)||0;if(s.style.resize="none",Tr){s.style.fieldSizing="content",t>0&&(s.style.maxBlockSize=`${t}lh`);return}s.style.overflow="hidden";function e(){s.style.blockSize="auto";let i=s.scrollHeight;if(t>0){let n=getComputedStyle(s),r=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2,a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=r*t+a;i>o?(i=o,s.style.overflow="auto"):s.style.overflow="hidden"}s.style.blockSize=i+"px"}s.addEventListener("input",e),s.addEventListener("change",e),e()}x(kr,Lr);var qt="[data-show-when], [data-hide-when]";function je(s){let t=s.indexOf("=");return t===-1?{name:s,value:null}:{name:s.slice(0,t),value:s.slice(t+1)}}function Mr(s,t){let e=t.querySelectorAll(`[name="${CSS.escape(s)}"]`);if(!e.length)return"";let i=e[0];if(i.type==="radio"){let n=Array.from(e).find(r=>r.checked);return n?n.value:""}return i.type==="checkbox"?i.checked?i.value||"true":"":i.value}function Pi(s,t){let e=Mr(s.name,t);return s.value===null?e!=="":e===s.value}function It(s){let t=s.closest("form")||document,e;if(s.dataset.showWhen){let i=je(s.dataset.showWhen);e=Pi(i,t)}else if(s.dataset.hideWhen){let i=je(s.dataset.hideWhen);e=!Pi(i,t)}e?(s.removeAttribute("hidden"),s.removeAttribute("inert")):(s.setAttribute("hidden",""),s.setAttribute("inert",""))}function Bi(s=document){let t=s.querySelectorAll(qt);t.forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),It(n))});let e=new Set;t.forEach(n=>{let r=n.closest("form");r&&!r.hasAttribute("data-conditional-listener")&&(r.setAttribute("data-conditional-listener",""),e.add(r))}),(e.size?[...e]:[document]).forEach(n=>{n.addEventListener("change",_i),n.addEventListener("input",_i)})}function _i(s){let t=s.target.name;if(!t)return;(s.target.closest("form")||document).querySelectorAll(qt).forEach(n=>{let r=n.dataset.showWhen||n.dataset.hideWhen||"";je(r).name===t&&It(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Bi()):Bi();var Dr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(qt)&&(i.hasAttribute("data-conditional-init")||(i.setAttribute("data-conditional-init",""),It(i))),i.querySelectorAll(qt).forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),It(n))})}});Dr.observe(document.documentElement,{childList:!0,subtree:!0});var Nr='input[type="range"][data-range]';function qr(s){if(s.hasAttribute("data-range-init"))return;s.setAttribute("data-range-init","");let t=s.dataset.prefix||"",e=s.dataset.suffix||"",i=s.hasAttribute("data-bubble"),n=document.createElement("div");if(n.className="range-wrapper",!s.parentNode)return;s.parentNode.insertBefore(n,s),n.appendChild(s);function r(){let h=parseFloat(s.min)||0,d=parseFloat(s.max)||100,m=(parseFloat(s.value)-h)/(d-h)*100;n.style.setProperty("--range-pct",`${m}%`)}let a;i&&(a=document.createElement("output"),a.className="range-bubble",a.setAttribute("for",s.id||""),n.appendChild(a));function o(){if(!a)return;a.textContent=`${t}${s.value}${e}`;let h=parseFloat(s.min)||0,d=parseFloat(s.max)||100,u=(parseFloat(s.value)-h)/(d-h),m=s.offsetWidth,p=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize),f=s.offsetLeft+p/2+u*(m-p);a.style.insetInlineStart=`${f}px`}if(s.hasAttribute("data-markers")){let h=parseFloat(s.min)||0,d=parseFloat(s.max)||100,u=parseFloat(s.step)||1,m=document.createElement("div");m.className="range-markers";let y=Math.round((d-h)/u);for(let p=0;p<=y;p++)m.appendChild(document.createElement("span"));n.appendChild(m)}let c=s.getAttribute("list");if(c){let h=document.getElementById(c);if(h){let d=document.createElement("div");d.className="range-labels";let u=parseFloat(s.min)||0,m=parseFloat(s.max)||100;requestAnimationFrame(()=>{let y=s.offsetWidth,f=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize);Array.from(h.options).forEach(v=>{let A=document.createElement("span");A.textContent=v.label||v.value;let C=(parseFloat(v.value)-u)/(m-u),lt=s.offsetLeft+f/2+C*(y-f);A.style.insetInlineStart=`${lt}px`,d.appendChild(A)})}),n.appendChild(d)}}function l(){r(),o()}s.addEventListener("input",l),l()}x(Nr,qr);var Ge='input[type="file"][data-upload]';function Ir(s){if(s===0)return"0 B";let t=["B","KB","MB","GB"],e=Math.floor(Math.log(s)/Math.log(1024));return`${(s/Math.pow(1024,e)).toFixed(e>0?1:0)} ${t[e]}`}function Ke(s){if(s.hasAttribute("data-upload-init"))return;s.setAttribute("data-upload-init","");let t=s.hasAttribute("multiple"),e=s.getAttribute("accept")||"",i=document.createElement("div");if(i.className="upload-zone",i.setAttribute("role","presentation"),!s.parentNode)return;s.parentNode.insertBefore(i,s),i.appendChild(s);let n=document.createElement("div");n.className="upload-prompt",n.innerHTML=`
314
+ `}#b(){this.#e.addEventListener("click",this.#y),this.listen(document,"click",this.#w),this.listen(document,"keydown",this.#B),this.#t.querySelector(".settings-close")?.addEventListener("click",()=>this.close()),this.#t.querySelectorAll('input[name="settings-mode"]').forEach(t=>{t.addEventListener("change",this.#N)}),this.#t.querySelector("#settings-theme")?.addEventListener("change",this.#S),this.#t.querySelector("input[data-fluid-toggle]")?.addEventListener("change",this.#$),this.#t.querySelectorAll('input[name="settings-density"]').forEach(t=>{t.addEventListener("change",this.#D)}),this.#t.querySelector("input[data-backdrop-toggle]")?.addEventListener("change",this.#k),this.#t.querySelectorAll('input[name="settings-backdrop"]').forEach(t=>{t.addEventListener("change",this.#I)}),this.#t.querySelectorAll('input[name="settings-backdrop-chrome"]').forEach(t=>{t.addEventListener("change",this.#_)}),this.#t.querySelector("input[data-backdrop-fixed]")?.addEventListener("change",this.#F),this.#t.querySelector("input[data-sticky-toggle]")?.addEventListener("change",this.#T),this.#t.querySelector('[name="settings-page-bg"]')?.addEventListener("change",this.#q),this.#t.querySelector('[name="settings-page-bg-color"]')?.addEventListener("input",this.#L),this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.addEventListener("input",this.#L),this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.addEventListener("input",this.#L),this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.addEventListener("change",this.#L),this.#t.querySelectorAll("input[data-a11y]").forEach(t=>{t.addEventListener("change",this.#x)}),this.#t.querySelectorAll("input[data-ext]").forEach(t=>{t.addEventListener("change",this.#M)}),this.#t.querySelectorAll("input[data-env]").forEach(t=>{t.addEventListener("change",this.#P)}),this.#t.querySelector(".settings-reset")?.addEventListener("click",this.#V),this.#t.querySelector('[data-action="clear-cache"]')?.addEventListener("click",this.#Z),this.#t.querySelector('[data-action="check-update"]')?.addEventListener("click",this.#Q),this.#K()}#y=t=>{t.stopPropagation(),this.toggle()};#w=t=>{this.#i&&!this.contains(t.target)&&this.close()};#B=t=>{t.key==="Escape"&&this.#i&&(t.preventDefault(),this.close(),this.#e?.focus())};#N=t=>{S.setMode(t.target.value)};#S=async t=>{let e=t.target;e.disabled=!0;try{await S.setBrand(e.value),this.#X()}catch{console.warn("[VB] Theme load failed, using default")}finally{e.disabled=!1}};#$=t=>{let e=t.target.checked,s=this.#o(S.getState().fluid)||"default";S.setFluid(this.#p(e,s)),this.#R(e)};#D=t=>{S.setFluid(this.#p(!0,t.target.value))};#k=t=>{let e=t.target.checked,s=this.#d(S.getState().backdrop)||"default";S.setBackdrop(this.#l(e,s)),this.#z(e)};#I=t=>{S.setBackdrop(this.#l(!0,t.target.value))};#_=t=>{let e=this.#m(S.getState().backdropChrome);S.setBackdropChrome(this.#g(t.target.value,e))};#F=t=>{let e=this.#u(S.getState().backdropChrome);S.setBackdropChrome(this.#g(e,t.target.checked))};#T=async t=>{let e=t.target.checked;this.#r=e,await w.set(G,"sticky",e?"on":"off");let s=document.querySelector("header");if(e){document.documentElement.dataset.sticky="",s&&(s.dataset.sticky="");let{initStickyManager:n}=await Promise.resolve().then(()=>(kt(),Xt));n()}else{delete document.documentElement.dataset.sticky,s&&delete s.dataset.sticky;let{destroyStickyManager:n}=await Promise.resolve().then(()=>(kt(),Xt));n()}};#q=t=>{let e=t.target.value;if(this.#H(e),e==="color"){let s=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"#1a1a2e";S.setPageBg({type:e,color:s})}else if(e==="gradient"){let s=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"#1a1a2e",n=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"#16213e",r=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";S.setPageBg({type:e,gradStart:s,gradEnd:n,gradDir:r})}else S.setPageBg({})};#L=()=>{let t=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";if(t==="color"){let e=this.#t.querySelector('[name="settings-page-bg-color"]')?.value||"";S.setPageBg({type:t,color:e})}else if(t==="gradient"){let e=this.#t.querySelector('[name="settings-page-bg-grad-start"]')?.value||"",s=this.#t.querySelector('[name="settings-page-bg-grad-end"]')?.value||"",n=this.#t.querySelector('[name="settings-page-bg-grad-dir"]')?.value||"to bottom";S.setPageBg({type:t,gradStart:e,gradEnd:s,gradDir:n})}};#x=t=>{let e=t.target.dataset.a11y,s=this.#O();if(t.target.checked&&!s.includes(e))s.push(e);else if(!t.target.checked){let n=s.indexOf(e);n!==-1&&s.splice(n,1)}this.#W(s),this.#U(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:s}))};#M=t=>{let e=t.target.dataset.ext,s=t.target.checked;this.#J(e,s),this.#G()};#P=t=>{let e=t.target.dataset.env,s=t.target.checked;Ct.setSource(e,s)};#V=()=>{confirm("Reset all settings to defaults?")&&(S.reset(),this.#W([]),this.#U(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[]})),this.#s={...Jt},w.remove(G,"extensions").catch(()=>{}),this.#G(),this.#r=!1,w.remove(G,"sticky").catch(()=>{}),delete document.documentElement.dataset.sticky,Promise.resolve().then(()=>(kt(),Xt)).then(t=>t.destroyStickyManager()).catch(()=>{}),Ct.setSource("timeOfDay",!1),Ct.setSource("seasonal",!1),this.#C())};#E=()=>{this.#C()};#C(){let{mode:t,brand:e,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:h}=S.getState(),d=this.#O(),u=this.#Y(),b=this.#c(s),y=this.#o(s),p=this.#f(n),E=this.#d(n),v=this.#t.querySelector(`input[name="settings-mode"][value="${t}"]`);v&&(v.checked=!0);let T=this.#t.querySelector("#settings-theme");T&&(T.value=e||"default");let q=this.#t.querySelector("input[data-fluid-toggle]");q&&(q.checked=b);let Bt=this.#t.querySelector(`input[name="settings-density"][value="${y}"]`);Bt&&(Bt.checked=!0),this.#R(b);let Ss=this.#t.querySelector("input[data-backdrop-toggle]");Ss&&(Ss.checked=p);let Cs=this.#t.querySelector(`input[name="settings-backdrop"][value="${E}"]`);Cs&&(Cs.checked=!0);let ta=this.#u(r),ks=this.#t.querySelector(`input[name="settings-backdrop-chrome"][value="${ta}"]`);ks&&(ks.checked=!0);let xs=this.#t.querySelector("input[data-backdrop-fixed]");xs&&(xs.checked=this.#m(r)),this.#z(p);let Ts=this.#t.querySelector('[name="settings-page-bg"]');Ts&&(Ts.value=a||"");let Ls=this.#t.querySelector('[name="settings-page-bg-color"]');Ls&&o&&(Ls.value=o);let Ms=this.#t.querySelector('[name="settings-page-bg-grad-start"]');Ms&&c&&(Ms.value=c);let Ns=this.#t.querySelector('[name="settings-page-bg-grad-end"]');Ns&&l&&(Ns.value=l);let Ds=this.#t.querySelector('[name="settings-page-bg-grad-dir"]');Ds&&h&&(Ds.value=h),p&&this.#H(a||""),this.#t.querySelectorAll("input[data-a11y]").forEach(mt=>{let U=mt;U.checked=d.includes(U.dataset.a11y)}),this.#t.querySelectorAll("input[data-ext]").forEach(mt=>{let U=mt,Pt=U.dataset.ext,ia=u[Pt];U.checked=ia??Jt[Pt]});let _s=this.#t.querySelector("input[data-sticky-toggle]");_s&&(_s.checked=this.#h());let ea=this.#j();this.#t.querySelectorAll("input[data-env]").forEach(mt=>{let U=mt,Pt=U.dataset.env;U.checked=ea[Pt]??!1})}#R(t){let e=this.#t.querySelector(".density-row");e&&(e.hidden=!t)}#z(t){if(this.#t.querySelectorAll(".backdrop-row").forEach(e=>{e.hidden=!t}),t){let e=this.#t.querySelector('[name="settings-page-bg"]')?.value||"";this.#H(e)}}#H(t){let e=this.#t.querySelector(".page-bg-color-row"),s=this.#t.querySelector(".page-bg-grad-row"),n=this.#t.querySelector(".page-bg-grad-dir-row");e&&(e.hidden=t!=="color"),s&&(s.hidden=t!=="gradient"),n&&(n.hidden=t!=="gradient")}#O(){return[...this.#n]}#W(t){this.#n=[...t],w.set(G,"a11y",this.#n).catch(()=>{})}#U(){let t=this.#O(),{brand:e}=S.getState(),s=document.documentElement,n=e!=="default"?[e,...t]:[...t];n.length?s.dataset.theme=n.join(" "):delete s.dataset.theme}#X(){this.#U()}#j(){return Ct.load()}#Y(){return{...this.#s}}#J(t,e){this.#s={...this.#s,[t]:e},w.set(G,"extensions",this.#s).catch(()=>{})}async#G(){let t=this.#Y(),e=document.documentElement;t.motionFx?delete e.dataset.motionReduced:e.dataset.motionReduced="",t.sounds?(ut||(ut=(await Promise.resolve().then(()=>(Cn(),Sn))).SoundManager),ut.init(),ut.enable()):ut&&ut.disable(),window.dispatchEvent(new CustomEvent("vb:extensions-change",{detail:t}))}async#K(){let t=this.#t.querySelector("[data-sw-status] span");if(t){if(!("serviceWorker"in navigator)){t.textContent="Not supported";return}try{let s=(await yn()).cachedURLs?.length??0;t.textContent=`Active (${s} cached files)`}catch{t.textContent="Not registered"}}}#Z=async t=>{let e=t.target;e.disabled=!0,e.textContent="Clearing\u2026";try{await vn(),e.textContent="Cleared!",this.#K(),setTimeout(()=>{e.textContent="Clear Cache",e.disabled=!1},2e3)}catch{e.textContent="Failed",setTimeout(()=>{e.textContent="Clear Cache",e.disabled=!1},2e3)}};#Q=async t=>{let e=t.target;e.disabled=!0,e.textContent="Checking\u2026";try{let{updated:s}=await wn();e.textContent=s?"Update available!":"Up to date",setTimeout(()=>{e.textContent="Check for Updates",e.disabled=!1},2e3)}catch{e.textContent="Failed",setTimeout(()=>{e.textContent="Check for Updates",e.disabled=!1},2e3)}};open(){this.#i||(this.#i=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#C(),this.#tt())}#tt(){let t=this.getBoundingClientRect(),e=this.#t;e.style.removeProperty("top"),e.style.removeProperty("bottom"),e.style.removeProperty("left"),e.style.removeProperty("right");let s=e.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,a=t.top,o=r-t.bottom;a<s.height&&o>a?(e.style.top="calc(100% + 8px)",e.style.bottom="auto"):(e.style.bottom="calc(100% + 8px)",e.style.top="auto");let c=n-t.right,l=t.left,h=s.width;t.right<h&&l<c?(e.style.left="0",e.style.right="auto"):(e.style.right="0",e.style.left="auto")}close(){this.#i&&(this.#i=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"))}toggle(){this.#i?this.close():this.open()}};f("settings-panel",ii);W();si();var Ua={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"};function N(i){return String(i??"").replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}var ni=class extends m{#e="panel";#t=null;#i=null;#n=null;#s=null;#r=new Set;#a=[];#c=!1;#o=null;#p=new Set;#h="all";#f=[];setup(){return this.#e=this.getAttribute("mode")==="banner"?"banner":"panel",this.#e==="banner"?this.#d():this.#u()}teardown(){this.#o!=null&&(clearInterval(this.#o),this.#o=null)}async#d(){let t=this.getAttribute("persist");if(t||console.warn("[notification-wc] banner mode requires a persist attribute"),this.dataset.mode="banner",this.dataset.variant=this.getAttribute("variant")||"info",this.dataset.position=this.getAttribute("position")||"top",t){let s=Number(this.getAttribute("expires")??""),n=Number.isFinite(s)&&s>0?s*864e5:void 0,r=await w.get("notifications",t,n?{maxAge:n}:void 0);if(r&&r.dismissed){this.hidden=!0;return}}let e=this.querySelector('[value="dismiss"], [data-dismiss]');e&&(this.#t=e,this.listen(e,"click",this.#l))}#l=async t=>{t.preventDefault();let e=this.getAttribute("persist");e&&await w.set("notifications",e,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:e}})),this.hidden=!0};async#u(){if(this.dataset.mode="panel",await this.#m(),this.#v(),this.#A(),await this.#N(),this.#B(),this.listen(document,"click",this.#_),this.listen(document,"keydown",this.#F),this.listen(document,"page-watch:add",()=>this.#N()),this.listen(document,"page-watch:remove",()=>this.#N()),this.getAttribute("src")){await this.#M();let t=Number(this.getAttribute("poll"));Number.isFinite(t)&&t>0&&(this.#o=setInterval(()=>this.#M(),t))}}async#m(){let t=this.getAttribute("storage-key")||"notifications",e=await w.get(t,"read-ids");Array.isArray(e)&&(this.#r=new Set(e.filter(s=>typeof s=="string")))}async#g(){let t=this.getAttribute("storage-key")||"notifications";await w.set(t,"read-ids",Array.from(this.#r))}#v(){if(this.#i=this.querySelector(":scope > [data-trigger]"),this.#i){let t=this.#i.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.hidden=!0,this.#i.appendChild(t))}else{let t=document.createElement("button");t.type="button",t.setAttribute("data-trigger",""),t.className="notification-trigger",t.setAttribute("aria-label","Notifications"),t.innerHTML='<icon-wc name="bell" size="sm"></icon-wc><span class="notification-badge" hidden>0</span>',this.#i=t,this.prepend(t)}this.#s=this.#i.querySelector(".notification-badge"),this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.listen(this.#i,"click",this.#I)}#A(){this.#n=document.createElement("div"),this.#n.className="notification-panel",this.#n.setAttribute("role","dialog"),this.#n.setAttribute("aria-label","Notifications"),this.#n.hidden=!0;let t=`notification-panel-${crypto.randomUUID().slice(0,8)}`;this.#n.id=t,this.#i?.setAttribute("aria-controls",t),this.#n.innerHTML=`
315
+ <header class="notification-header">
316
+ <strong>Notifications</strong>
317
+ <button type="button" class="notification-mark-all">Mark all read</button>
318
+ </header>
319
+ <nav class="notification-tabs" role="tablist" aria-label="Notification categories">
320
+ <button type="button" role="tab" data-tab="all" aria-selected="true">All</button>
321
+ <button type="button" role="tab" data-tab="watching" aria-selected="false">Watching <span class="notification-tab-count" hidden>0</span></button>
322
+ </nav>
323
+ <ul class="notification-list" role="list" data-tab-panel="all"></ul>
324
+ <ul class="notification-watch-list" role="list" data-tab-panel="watching" hidden></ul>
325
+ <footer class="notification-footer" hidden>
326
+ <em>No notifications</em>
327
+ </footer>
328
+ `,this.appendChild(this.#n);let e=this.#n.querySelector(".notification-mark-all");e&&this.listen(e,"click",this.#q);for(let s of this.#n.querySelectorAll('[role="tab"]'))this.listen(s,"click",this.#D);this.#y()}#b(){let t=Array.from(this.querySelectorAll(":scope > article")),e=new Map;for(let s of t){let n=s.getAttribute("data-id")||s.id||`static-${e.size}`,r=s.getAttribute("data-type")||"update",a=s.getAttribute("data-date")||"",o=s.querySelector("h1, h2, h3, h4, h5, h6")?.textContent?.trim()||n,l=s.querySelector("p")?.textContent?.trim()||"",h=s.querySelector("a");e.set(n,{id:n,type:r,date:a,title:o,body:l,url:h?.getAttribute("href")||null,source:"static"})}for(let s of this.#a)if(!(!s||typeof s.id!="string")){if(s.dismissed){e.delete(s.id);continue}e.set(s.id,{...e.get(s.id),...s,source:"dynamic"})}return Array.from(e.values()).sort((s,n)=>{let r=s.date?Date.parse(s.date):0;return(n.date?Date.parse(n.date):0)-r})}#y(){if(!this.#n)return;let t=this.#n.querySelector(".notification-list"),e=this.#n.querySelector(".notification-footer");if(!t)return;let s=this.#b();t.innerHTML=s.map(n=>this.#w(n)).join(""),e&&(e.hidden=s.length>0);for(let n of t.querySelectorAll("[data-notification-id]"))this.listen(n,"click",this.#T);this.#B()}#w(t){let e=Ua[t.type]||"bell",s=this.#r.has(t.id),n=t.date?new Date(t.date).toLocaleString():"",r=`
329
+ <icon-wc class="notification-type-icon" name="${N(e)}" size="sm"></icon-wc>
330
+ <div class="notification-body">
331
+ <h4>${N(t.title)}</h4>
332
+ ${t.body?`<p>${N(t.body)}</p>`:""}
333
+ ${n?`<time datetime="${N(t.date)}">${N(n)}</time>`:""}
334
+ </div>
335
+ `,a=t.url?"a":"button",o=t.url?`href="${N(t.url)}"`:'type="button"';return`<li role="listitem" data-notification-id="${N(t.id)}" data-type="${N(t.type||"update")}"${s?" data-read":""}>
336
+ <${a} class="notification-row" ${o}>${r}</${a}>
337
+ </li>`}#B(){if(!this.#s)return;let e=this.#b().filter(s=>!this.#r.has(s.id)).length;e>0?(this.#s.textContent=String(e),this.#s.hidden=!1,this.#i?.querySelector("icon-wc")?.setAttribute("name","bell-dot")):(this.#s.hidden=!0,this.#i?.querySelector("icon-wc")?.setAttribute("name","bell"))}async#N(){try{this.#f=await w.list("watches")}catch{this.#f=[]}this.#S()}#S(){if(!this.#n)return;let t=this.#n.querySelector(".notification-watch-list"),e=this.#n.querySelector(".notification-tab-count");if(t){if(t.innerHTML=this.#f.map(s=>this.#$(s)).join("")||`<li class="notification-empty"><em>You aren't watching any pages yet. Use the &ldquo;Watch&rdquo; button on a page to start.</em></li>`,e){let s=this.#f.length;s>0?(e.textContent=String(s),e.hidden=!1):e.hidden=!0}for(let s of t.querySelectorAll("[data-watch-unwatch]"))this.listen(s,"click",this.#k)}}#$(t){let e=t.data||{},s=e.url||t.key,n=e.title||s,r=e.lastChecked?new Date(e.lastChecked).toLocaleString():"\u2014",a=!!e.lastChanged;return`<li class="notification-watch-item"${a?" data-changed":""}>
338
+ <a class="notification-watch-row" href="${N(s)}">
339
+ <icon-wc class="notification-type-icon" name="eye" size="sm"></icon-wc>
340
+ <div class="notification-body">
341
+ <h4>${N(n)}${a?' <span class="notification-changed-badge">Changed</span>':""}</h4>
342
+ <p>${N(s)}</p>
343
+ <time>Last checked: ${N(r)}</time>
344
+ </div>
345
+ </a>
346
+ <button type="button" class="notification-unwatch" data-watch-unwatch data-watch-key="${N(t.key)}" aria-label="Unwatch ${N(n)}">
347
+ <icon-wc name="x" size="xs"></icon-wc>
348
+ </button>
349
+ </li>`}#D=t=>{let e=t.currentTarget.dataset.tab;if(!e||e===this.#h||(this.#h=e,!this.#n))return;for(let n of this.#n.querySelectorAll('[role="tab"]')){let r=n.dataset.tab===e;n.setAttribute("aria-selected",r?"true":"false")}for(let n of this.#n.querySelectorAll("[data-tab-panel]"))n.hidden=n.dataset.tabPanel!==e;let s=this.#n.querySelector(".notification-footer");s&&(s.hidden=!0)};#k=async t=>{t.preventDefault(),t.stopPropagation();let s=t.currentTarget.getAttribute("data-watch-key");if(!s)return;let n=this.#f.find(r=>r.key===s);await w.remove("watches",s),this.#f=this.#f.filter(r=>r.key!==s),this.#S(),this.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:n?.data?.url||s,subscriptionId:n?.data?.subscriptionId||null}}))};#I=t=>{t.stopPropagation(),this.#c?this.#x():this.#L()};#_=t=>{this.#c&&!this.contains(t.target)&&this.#x()};#F=t=>{t.key==="Escape"&&this.#c&&(t.preventDefault(),this.#x(),this.#i?.focus())};#T=async t=>{let e=t.currentTarget.closest("[data-notification-id]");if(!e)return;let s=e.getAttribute("data-notification-id");s&&(this.#r.has(s)||(this.#r.add(s),e.setAttribute("data-read",""),await this.#g(),this.#B(),this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:s}}))))};#q=async()=>{let t=this.#b();for(let e of t)this.#r.add(e.id);await this.#g(),this.#y();for(let e of t)this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:e.id}}))};#L(){this.#n&&(this.#c=!0,this.#n.hidden=!1,this.#i?.setAttribute("aria-expanded","true"),this.#N(),this.dispatchEvent(new CustomEvent("notification-wc:open",{bubbles:!0,composed:!0})))}#x(){this.#n&&(this.#c=!1,this.#n.hidden=!0,this.#i?.setAttribute("aria-expanded","false"),this.dispatchEvent(new CustomEvent("notification-wc:close",{bubbles:!0,composed:!0})))}async#M(){let t=this.getAttribute("src");if(!t)return;let e,s=0;try{if(t.startsWith("http")||t.startsWith("/")){let c=await fetch(t,{headers:{accept:"application/json"}});if(s=c.status,!c.ok)throw new Error(`${c.status}`);e=await c.json()}else e=await new it(t).get("/")}catch(c){let l=c instanceof z?c.status:s;if(l===404||l===503)return;let h=c instanceof z?`${c.status}`:String(c);console.warn("[notification-wc] failed to fetch",t,h);return}let n=Array.isArray(e)?e:Array.isArray(e?.notifications)?e.notifications:[],r=this.#p,a=r.size===0,o=this.hasAttribute("toast-new")?document.querySelector("toast-msg"):null;for(let c of n)c?.id&&(r.has(c.id)||(this.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:c}})),!a&&o&&typeof o.show=="function"&&o.show({message:c.title||c.body||"New notification",variant:c.type==="alert"||c.type==="stewardship"?"warning":"info",duration:5e3})),r.add(c.id));this.#a=n,this.#y()}};f("notification-wc",ni);var On="Watch for updates",ro="Watching",wi=class extends m{#e=null;setup(){if(this.hasAttribute("server-sync")){let e=window;e.vbPageWatch={...e.vbPageWatch??{},serverSync:!0}}let t=this.#t();this.dataset.variant=t;for(let e of Array.from(this.children))e.hasAttribute?.("data-watch-page")&&e.remove();this.#e=this.#i(t),this.appendChild(this.#e),this.listen(document,"page-watch:add",this.#n),this.listen(document,"page-watch:remove",this.#n)}teardown(){this.#e&&(this.#e.remove(),this.#e=null)}#t(){let t=this.getAttribute("variant");return t==="compact"||t==="button"?t:"icon"}#i(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-watch-page",""),e.className="ghost",e.setAttribute("aria-label","Watch this page for updates");let s=t==="icon"?"sm":"xs",n=this.getAttribute("label")??On;return t==="icon"?e.innerHTML=`<icon-wc name="bookmark" size="${s}"></icon-wc>`:(e.innerHTML=`<icon-wc name="bookmark" size="${s}"></icon-wc><span>${this.#s(n)}</span>`,e.setAttribute("data-watch-label-locked","")),e}#n=async()=>{if(this.#e)try{let{readWatch:t}=await Promise.resolve().then(()=>(vi(),yi)),s=!!await t();this.#e.setAttribute("aria-pressed",s?"true":"false");let n=this.#e.querySelector("icon-wc");n&&n.setAttribute("name",s?"bookmark-check":"bookmark");let r=this.#e.querySelector("span");if(r&&this.#t()!=="icon"){let a=this.getAttribute("label");r.textContent=a||(s?ro:On)}this.#e.setAttribute("title",s?"Stop watching this page":"Watch this page for content updates")}catch{}};#s(t){let e=document.createElement("div");return e.textContent=t,e.innerHTML}};f("watch-wc",wi);var at={optout:"vb_optout",sessionCount:"vb_sc",eventQueue:"vb_q"};function ao(i){return String(i).replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function oo(i){return typeof i!="number"||i<=0?"\u2014":i<6e4?`${Math.round(i/1e3)}s`:`${Math.floor(i/6e4)}m ${Math.round(i%6e4/1e3)}s`}var Ei=class extends m{setup(){this.#n(),this.listen(this,"click",this.#e)}get isOptedOut(){try{return sessionStorage.getItem(at.optout)==="1"}catch{return!1}}get sessionCounter(){try{let t=sessionStorage.getItem(at.sessionCount);return t?JSON.parse(t):null}catch{return null}}get queuedEvents(){try{let t=sessionStorage.getItem(at.eventQueue);return t?JSON.parse(t):[]}catch{return[]}}get hasSessionData(){return this.sessionCounter!=null||this.queuedEvents.length>0}#e=t=>{let e=t.target?.closest?.("[data-analytics-action]");if(!e||!this.contains(e))return;let s=e.dataset.analyticsAction;s==="clear"&&this.#t(),s==="optout"&&this.#i(),s==="refresh"&&this.#n()};#t(){try{sessionStorage.removeItem(at.sessionCount),sessionStorage.removeItem(at.eventQueue)}catch{}this.dispatchEvent(new CustomEvent("analytics-panel:cleared",{bubbles:!0,composed:!0})),this.#n()}#i(){let t=!this.isOptedOut;try{t?sessionStorage.setItem(at.optout,"1"):sessionStorage.removeItem(at.optout)}catch{}this.dispatchEvent(new CustomEvent(t?"analytics-panel:optout":"analytics-panel:optin",{bubbles:!0,composed:!0})),t?this.#t():this.#n()}#n(){let t=this.getAttribute("title")||"Analytics data",e=this.isOptedOut,s=this.hasSessionData;this.innerHTML=`
350
+ <header class="analytics-panel__header">
351
+ <h3>${ao(t)}</h3>
352
+ <p class="analytics-panel__status" role="status">
353
+ <span class="analytics-panel__dot analytics-panel__dot--${e?"paused":"active"}" aria-hidden="true"></span>
354
+ ${e?"Analytics paused for this tab. No data is being collected.":"Analytics active. Only aggregate, device-scoped data is collected."}
355
+ </p>
356
+ </header>
357
+
358
+ <section class="analytics-panel__body">
359
+ <h4>Stored on this device (this session only)</h4>
360
+ ${this.#s()}
361
+ </section>
362
+
363
+ <footer class="analytics-panel__actions">
364
+ ${s?`
365
+ <button type="button" data-analytics-action="clear" class="analytics-panel__action analytics-panel__action--danger">
366
+ Clear my data
367
+ </button>
368
+ `:""}
369
+ <button type="button" data-analytics-action="optout" class="analytics-panel__action analytics-panel__action--toggle">
370
+ ${e?"Resume analytics":"Pause analytics"}
371
+ </button>
372
+ <button type="button" data-analytics-action="refresh" class="analytics-panel__action">
373
+ Refresh
374
+ </button>
375
+ </footer>
376
+
377
+ <p class="analytics-panel__note">
378
+ No cookies, no cross-site identifiers, no IP address stored.
379
+ Data is cleared automatically when you close this tab.
380
+ </p>
381
+ `}#s(){if(!this.hasSessionData)return'<p class="analytics-panel__empty">No data stored on this device in this session.</p>';let t=this.sessionCounter,e=this.queuedEvents,s=e.find(o=>o?.id==="__scroll"),n=e.find(o=>o?.id==="__attention"),r=e.filter(o=>!o?.id?.startsWith?.("__")).length,a=[];return t?.v!=null&&a.push(`<dt>Pages this session</dt><dd>${t.v}</dd>`),s&&a.push(`<dt>Max scroll depth</dt><dd>${s.params?.depth??"?"}%</dd>`),n&&a.push(`<dt>Active reading time</dt><dd>${oo(n.params?.ms)}</dd>`),r>0&&a.push(`<dt>Queued events</dt><dd>${r}</dd>`),`<dl class="analytics-panel__data">${a.join("")}</dl>`}};f("analytics-panel",Ei);var Ai=class extends m{static observedAttributes=["src","src-dark","src-compact","alt","wordmark","height"];#e="";#t=null;#i=null;setup(){this.#e=this.#c(),this.hasAttribute("src-dark")&&this.#s(),this.#a()}teardown(){this.#t?.removeEventListener("change",this.#r),this.#t=null,this.#i?.disconnect(),this.#i=null}attributeChangedCallback(t,e,s){e!==s&&(!this.isConnected||!this.hasAttribute("data-upgraded")||(t==="src-dark"&&(s?this.#s():(this.#t?.removeEventListener("change",this.#r),this.#i?.disconnect())),this.#a()))}#n(){let t=document.documentElement.getAttribute("data-mode");return t==="dark"?!0:t==="light"?!1:this.#t?.matches??!1}#s(){this.#t||(this.#t=matchMedia("(prefers-color-scheme: dark)"),this.#t.addEventListener("change",this.#r)),this.#i||(this.#i=new MutationObserver(this.#r),this.#i.observe(document.documentElement,{attributes:!0,attributeFilter:["data-mode"]}))}#r=()=>{this.isConnected&&this.#a()};#a(){let t=this.getAttribute("src"),e=this.getAttribute("src-dark"),s=e&&this.#n()?e:t;if(!s){this.#e&&this.querySelector("img")&&(this.replaceChildren(document.createTextNode(this.#e)),this.removeAttribute("aria-label"));return}let n=this.#e||this.getAttribute("alt")||"",r=this.hasAttribute("wordmark"),a=this.getAttribute("height");if(this.querySelector("img")?.getAttribute("src")===s){let l=this.querySelector(".brand-mark-wordmark");if(r&&!l){let h=document.createElement("span");h.className="brand-mark-wordmark",h.textContent=n,this.appendChild(h)}else!r&&l&&l.remove();return}let c=document.createElement("img");if(c.src=s,c.alt=r?"":n,c.decoding="async",a&&(c.height=parseInt(a,10)),r){let l=document.createElement("span");l.className="brand-mark-wordmark",l.textContent=n,this.replaceChildren(c,l)}else this.replaceChildren(c),this.getAttribute("alt")||this.setAttribute("aria-label",n)}#c(){let t="";for(let e of this.childNodes)(e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE&&e.tagName!=="IMG")&&(t+=e.textContent);return t.trim()}};f("brand-mark",Ai);var co="52rem",Si=class extends HTMLElement{#e=null;connectedCallback(){let t=this.getAttribute("breakpoint")||co;this.#e=matchMedia(`(max-width: ${t})`),this.#e.addEventListener("change",this.#t),this.#t()}disconnectedCallback(){this.#e?.removeEventListener("change",this.#t),this.#e=null}#t=()=>{let t=this.#e?.matches??!1;if(t)this.setAttribute("data-mobile","");else{this.removeAttribute("data-mobile");let s=this.querySelector("[popover]");s?.matches(":popover-open")&&s.hidePopover()}let e=this.closest("header");if(e)for(let s of e.children)s!==this&&s.matches("nav, site-tools")&&(s.style.display=t?"none":"")}};customElements.get("mobile-menu")||customElements.define("mobile-menu",Si);var L="interestfor",Rn="interestForElement"in HTMLButtonElement.prototype,x=new WeakMap,pt=new WeakMap,se=new Set,xi=!1,Ti=CSS.supports?.("anchor-name","--a")??!1;function Bn(i){let t=String(i).trim(),e=t.match(/^([\d.]+)s$/);if(e)return parseFloat(e[1])*1e3;let s=t.match(/^([\d.]+)ms$/);return s?parseFloat(s[1]):parseFloat(t)||0}function Hn(i,t){let e=getComputedStyle(i),s=e.getPropertyValue(t).trim();if(s.toLowerCase()!=="normal")return Bn(s);let n=e.getPropertyValue("--interest-delay").trim();if(n&&n.toLowerCase()!=="normal"){let r=n.split(/\s+/).filter(a=>a.length>0);if(r.length>0){let a=t==="--interest-delay-start"?r[0]:r[1]||r[0];if(a.toLowerCase()!=="normal")return Bn(a)}}return t==="--interest-delay-start"?500:250}var lo=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(","),ho="h1,h2,h3,h4,h5,h6,ul,ol,li,table,nav,header,footer,main,aside,article,section,form,blockquote,details,summary,dialog";function Li(i){if(i.getAttribute("popover")?.toLowerCase()!=="hint"||i.querySelector(lo)||i.querySelector(ho))return!1;for(let t of i.querySelectorAll("[role]")){let e=t.getAttribute("role").toLowerCase();if(!["presentation","none","generic","image"].includes(e))return!1}return!0}function uo(i,t){Li(t)?i.setAttribute("aria-describedby",t.id):(i.setAttribute("aria-details",t.id),i.setAttribute("aria-expanded","false"),t.hasAttribute("role")||t.setAttribute("role","tooltip"))}function H(i){let t=i.getAttribute(L);return t?document.getElementById(t):null}function ie(i){let t=pt.get(i);return t?.invoker&&x.get(t.invoker)?.state==="full"?t.invoker:null}function _t(i){if(x.has(i))return x.get(i);let t={state:"none",gainedTimer:null,lostTimer:null,longPressTimer:null};x.set(i,t);let e=H(i);return e&&uo(i,e),t}function Vn(i,t){if(!i||!t||!i.isConnected||H(i)!==t)return!1;let e=ie(t);if(e){if(e===i)return clearTimeout(x.get(e).lostTimer),!1;if(!Dt(e,t)||!i.isConnected||H(i)!==t)return!1}let s=_t(i);if(s.state!=="none")return!1;let n=new CustomEvent("interest",{bubbles:!1,cancelable:!0,detail:{source:i}});if(t.dispatchEvent(n),t.hasAttribute("popover")){try{t.showPopover()}catch{}fo(i,t)}s.state="full",pt.has(t)||pt.set(t,{});let r=pt.get(t);if(r.invoker=i,t.hasAttribute("popover")){let a=o=>{o.newState==="closed"&&Dt(i,t)};r.toggleListener=a,t.addEventListener("toggle",a)}return se.add(i),i.classList.add("interest-source"),t.classList.add("interest-target"),Li(t)||i.setAttribute("aria-expanded","true"),!0}function Dt(i,t){if(!i||!t||H(i)!==t||ie(t)!==i)return!1;let e=x.get(i);if(!e||e.state==="none")return!1;if(clearTimeout(e.gainedTimer),clearTimeout(e.lostTimer),t.dispatchEvent(new CustomEvent("loseinterest",{bubbles:!1,detail:{source:i}})),t.hasAttribute("popover"))try{t.hidePopover()}catch{}let s=pt.get(t);return s?.toggleListener&&t.removeEventListener("toggle",s.toggleListener),pt.delete(t),se.delete(i),i.classList.remove("interest-source"),t.classList.remove("interest-target"),Li(t)||i.setAttribute("aria-expanded","false"),e.state="none",!0}function po(i){let t=_t(i);clearTimeout(t.gainedTimer);let e=Hn(i,"--interest-delay-start");t.gainedTimer=setTimeout(()=>{let s=H(i);s&&Vn(i,s)},e)}function Ci(i){let t=x.get(i);if(!t)return;clearTimeout(t.lostTimer);let e=Hn(i,"--interest-delay-end");t.lostTimer=setTimeout(()=>{let s=H(i);s&&Dt(i,s)},e)}function Nt(i){if(!Ti)return;let t=i.getAttribute(L),e=t?document.getElementById(t):null;if(!e?.id)return;let s=`--interest-${e.id}`;i.style.anchorName=s,e.style.positionAnchor=s}function fo(i,t){if(Ti)return;let e=i.getBoundingClientRect(),s=t.getBoundingClientRect(),n=8,r=8,a=e.top-s.height-n,o=e.left+(e.width-s.width)/2;a<r&&(a=e.bottom+n),o=Math.max(r,Math.min(o,window.innerWidth-s.width-r)),a=Math.max(r,Math.min(a,window.innerHeight-s.height-r)),t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.margin="0"}function mo(i,t){if(xi||!i.isConnected)return;if(!H(i)){let r=i.closest(".interest-target");if(r){let a=ie(r);a&&(t?clearTimeout(x.get(a)?.lostTimer):Ci(a))}return}let s=_t(i),n=ie(i);if(t)clearTimeout(s.lostTimer),n&&clearTimeout(x.get(n)?.lostTimer),po(i);else if(clearTimeout(s.gainedTimer),s.state!=="none"&&Ci(i),n){let r=x.get(n);r&&clearTimeout(r.gainedTimer),Ci(n)}}function bo(){let i=(s,n)=>{for(let r=s.target;r;r=r.parentElement)mo(r,n)};document.body.addEventListener("mouseover",s=>i(s,!0)),document.body.addEventListener("mouseout",s=>i(s,!1)),document.body.addEventListener("focusin",s=>i(s,!0)),document.body.addEventListener("focusout",s=>i(s,!1)),document.body.addEventListener("keydown",s=>{if(s.key==="Escape")for(let n of se){let r=H(n);r&&Dt(n,r)}});let t=500;document.body.addEventListener("touchstart",s=>{xi=!0;let n=s.target.closest(`button[${L}]`);if(!n)return;let r=_t(n);r.longPressTimer=setTimeout(()=>{let a=H(n);a&&Vn(n,a),r.longPressTimer=null},t)});let e=s=>{let n=s.target.closest(`button[${L}]`);if(!n)return;let r=x.get(n);r?.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)};document.body.addEventListener("touchend",s=>{e(s),xi=!1}),document.body.addEventListener("touchmove",e)}function go(){let i=document.createElement("style");i.textContent=['@property --interest-delay-start { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay-end { syntax: "normal | <time>"; inherits: false; initial-value: normal; }','@property --interest-delay { syntax: "*"; inherits: false; initial-value: normal; }'].join(`
382
+ `),document.head.appendChild(i)}function ee(i){_t(i),Nt(i)}function ki(i){let t=x.get(i);if(t){if(clearTimeout(t.gainedTimer),clearTimeout(t.lostTimer),clearTimeout(t.longPressTimer),t.state!=="none"){let e=H(i);e&&Dt(i,e)}i.classList.remove("interest-source"),x.delete(i),se.delete(i)}}function Pn(i=document){i.querySelectorAll(`[${L}]`).forEach(ee)}var Fn=new MutationObserver(i=>{for(let t of i){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.hasAttribute(L)&&ee(s),s.querySelectorAll(`[${L}]`).forEach(ee)}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;x.has(s)&&ki(s),s.querySelectorAll(`[${L}]`).forEach(n=>{x.has(n)&&ki(n)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let e=t.target;e.hasAttribute(L)?x.has(e)||ee(e):x.has(e)&&ki(e)}}});Rn||(go(),bo(),document.documentElement.setAttribute("data-interest-polyfill",""),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Pn(),Fn.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[L]})}):(Pn(),Fn.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[L]})));if(Rn&&Ti){let i=()=>{document.querySelectorAll(`[${L}]`).forEach(Nt),new MutationObserver(t=>{for(let e of t){for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.hasAttribute(L)&&Nt(n),n.querySelectorAll(`[${L}]`).forEach(Nt)}e.type==="attributes"&&e.target.hasAttribute?.(L)&&Nt(e.target)}}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[L]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i):i()}var Mi="[data-copy], [data-copy-target]";function zn(i=document){i.querySelectorAll(Mi).forEach(Ni)}function Ni(i){if(i.hasAttribute("data-copy-init"))return;i.setAttribute("data-copy-init","");let t;i.addEventListener("click",async()=>{let e=yo(i);if(e)try{await navigator.clipboard.writeText(e),i.dataset.state="copied",clearTimeout(t),t=setTimeout(()=>{delete i.dataset.state},1500),vo("Copied to clipboard",i),i.dispatchEvent(new CustomEvent("copy",{bubbles:!0,detail:{text:e}}))}catch{}})}function yo(i){return i.dataset.copy?i.dataset.copy:i.dataset.copyTarget?document.querySelector(i.dataset.copyTarget)?.textContent??"":""}function vo(i,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="sr-only",e.textContent=i,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>zn()):zn();var wo=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Mi)&&Ni(s),s.querySelectorAll(Mi).forEach(n=>Ni(n))}});wo.observe(document.documentElement,{childList:!0,subtree:!0});var Di="kbd[data-hotkey]";function Un(i=document){i.querySelectorAll(Di).forEach(_i)}function _i(i){if(i.hasAttribute("data-hotkey-init"))return;i.setAttribute("data-hotkey-init","");let t=i.dataset.hotkey;if(!t)return;let e=lt?vt.mac:vt.other,s=t.toLowerCase().split("+").map(r=>r.trim()),n=document.createDocumentFragment();s.forEach((r,a)=>{let o=document.createElement("kbd");o.textContent=e[r]??r.toUpperCase(),n.appendChild(o),a<s.length-1&&!lt&&n.appendChild(document.createTextNode("+"))}),i.replaceChildren(n),i.setAttribute("aria-label",i.textContent)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Un()):Un();var Eo=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Di)&&_i(s),s.querySelectorAll(Di).forEach(n=>_i(n))}});Eo.observe(document.documentElement,{childList:!0,subtree:!0});function ft(){return document.documentElement.lang||navigator.language||"en"}var qi="data[data-format-number]";function Wn(i=document){i.querySelectorAll(qi).forEach($i)}function $i(i){if(i.hasAttribute("data-format-number-init"))return;i.setAttribute("data-format-number-init","");let t=i.getAttribute("value");if(t==null)return;let e=Number(t);if(isNaN(e))return;i.title||(i.title=i.textContent.trim());let s=i.getAttribute("data-format-number")||"decimal",n=i.getAttribute("data-locale")||ft(),r={};switch(s){case"currency":{r.style="currency",r.currency=i.getAttribute("data-currency")||"USD";break}case"percent":r.style="percent";break;case"compact":r.notation="compact";break;default:break}try{i.textContent=new Intl.NumberFormat(n,r).format(e)}catch{}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Wn()):Wn();var Ao=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(qi)&&$i(s),s.querySelectorAll(qi).forEach(n=>$i(n))}});Ao.observe(document.documentElement,{childList:!0,subtree:!0});var ne="time[data-format-date]",qt=new Map;function jn(i=document){i.querySelectorAll(ne).forEach(Ii)}function Ii(i){if(i.hasAttribute("data-format-date-init"))return;i.setAttribute("data-format-date-init","");let t=i.getAttribute("datetime");if(!t)return;let e=new Date(t);if(isNaN(e.getTime()))return;i.title||(i.title=i.textContent.trim());let s=i.getAttribute("data-format-date")||"medium",n=i.getAttribute("data-locale")||ft();s==="relative"?(i.textContent=Gn(e,n),Kn(i,e,n)):i.textContent=So(e,s,i,n)}function So(i,t,e,s){let n=t||"medium",r=e.getAttribute("data-format-time")||void 0;try{let a={dateStyle:n};return r&&(a.timeStyle=r),new Intl.DateTimeFormat(s,a).format(i)}catch{return e.textContent}}function Gn(i,t){let e=Date.now(),s=Math.round((i.getTime()-e)/1e3),n=Math.abs(s),r=[{unit:"year",seconds:31536e3},{unit:"month",seconds:2592e3},{unit:"week",seconds:604800},{unit:"day",seconds:86400},{unit:"hour",seconds:3600},{unit:"minute",seconds:60},{unit:"second",seconds:1}];for(let{unit:a,seconds:o}of r)if(n>=o){let c=Math.round(s/o);try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(c,a)}catch{let l=Math.abs(c),h=l===1?a:`${a}s`;return c<0?`${l} ${h} ago`:`in ${l} ${h}`}}try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second")}catch{return"just now"}}function Kn(i,t,e){clearInterval(qt.get(i));let s=Math.abs(Date.now()-t.getTime()),n=36e5,r=864e5,a;s<n?a=6e4:s<r?a=3e5:a=36e5;let o=setInterval(()=>{i.textContent=Gn(t,e),Kn(i,t,e)},a);qt.set(i,o)}function Yn(i){qt.has(i)&&(clearInterval(qt.get(i)),qt.delete(i))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>jn()):jn();var Co=new MutationObserver(i=>{for(let t of i){for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ne)&&Ii(s),s.querySelectorAll(ne).forEach(n=>Ii(n))}for(let e of t.removedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;Yn(s),s.querySelectorAll(ne).forEach(Yn)}}});Co.observe(document.documentElement,{childList:!0,subtree:!0});var Bi="data[data-format-bytes]",Oi=["B","KB","MB","GB","TB","PB"];function Xn(i=document){i.querySelectorAll(Bi).forEach(Pi)}function Pi(i){if(i.hasAttribute("data-format-bytes-init"))return;i.setAttribute("data-format-bytes-init","");let t=i.getAttribute("value");if(t==null)return;let e=Number(t);if(isNaN(e)||e<0)return;i.title||(i.title=i.textContent.trim());let s=parseInt(i.getAttribute("data-format-bytes")??"0",10)||0,n=i.getAttribute("data-unit")==="decimal",r=i.getAttribute("data-locale")||ft(),a=n?1e3:1024;if(e===0){i.textContent="0 B";return}let o=Math.min(Math.floor(Math.log(e)/Math.log(a)),Oi.length-1),c=e/Math.pow(a,o);try{let l=new Intl.NumberFormat(r,{minimumFractionDigits:s,maximumFractionDigits:s}).format(c);i.textContent=`${l} ${Oi[o]}`}catch{i.textContent=`${c.toFixed(s)} ${Oi[o]}`}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Xn()):Xn();var ko=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Bi)&&Pi(s),s.querySelectorAll(Bi).forEach(n=>Pi(n))}});ko.observe(document.documentElement,{childList:!0,subtree:!0});var Fi="[data-spoiler]";var Qn=new Set(["SPAN","EM","STRONG","CODE","A","B","I","S","U","SMALL","SUB","SUP","MARK","ABBR","Q","CITE","DFN","SAMP","VAR","KBD","BDI","BDO","DATA","TIME","WBR"]);function Jn(i=document){i.querySelectorAll(Fi).forEach(Ri)}function Ri(i){if(i.hasAttribute("data-spoiler-init"))return;i.setAttribute("data-spoiler-init","");let t=i.getAttribute("data-spoiler")||"blur";i.getAttribute("data-spoiler")||i.setAttribute("data-spoiler","blur");let e=Qn.has(i.tagName),s=e?"span":"div";i.setAttribute("role","group"),i.setAttribute("aria-label","Spoiler");let n=document.createElement(s);for(n.setAttribute("data-spoiler-content",""),n.setAttribute("inert","");i.firstChild;)n.appendChild(i.firstChild);i.appendChild(n);let r=i.getAttribute("data-spoiler-label")||"Reveal spoiler",a;e?(a=document.createElement("span"),a.setAttribute("role","button"),a.setAttribute("tabindex","0")):(a=document.createElement("button"),a.setAttribute("type","button")),a.setAttribute("data-spoiler-trigger",""),a.setAttribute("aria-expanded","false");let o=document.createElement("span");o.setAttribute("data-spoiler-label",""),o.textContent=r,a.appendChild(o),i.appendChild(a),a.addEventListener("click",()=>Zn(i)),e&&a.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),Zn(i))}),i.addEventListener("keydown",c=>{c.key==="Escape"&&i.hasAttribute("data-spoiler-visible")&&(c.stopPropagation(),re(i))})}function Zn(i){let t=i.getAttribute("data-spoiler-group");t&&document.querySelectorAll(`[data-spoiler-group="${t}"][data-spoiler-visible]`).forEach(n=>{n!==i&&re(n)});let e=i.querySelector("[data-spoiler-content]"),s=i.querySelector("[data-spoiler-trigger]");if(e&&e.removeAttribute("inert"),s&&(s.setAttribute("aria-expanded","true"),s.hidden=!0),i.setAttribute("data-spoiler-visible",""),!i.hasAttribute("data-spoiler-persist")){let n=Qn.has(i.tagName),r;n?(r=document.createElement("span"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),re(i))})):(r=document.createElement("button"),r.setAttribute("type","button")),r.setAttribute("data-spoiler-hide",""),r.textContent="Hide",r.addEventListener("click",()=>re(i)),i.appendChild(r)}xo("Spoiler revealed"),i.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!0}}))}function re(i){if(i.hasAttribute("data-spoiler-persist"))return;let t=i.querySelector("[data-spoiler-content]"),e=i.querySelector("[data-spoiler-trigger]"),s=i.querySelector("[data-spoiler-hide]");t&&t.setAttribute("inert",""),e&&(e.setAttribute("aria-expanded","false"),e.hidden=!1,e.focus()),s&&s.remove(),i.removeAttribute("data-spoiler-visible"),i.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!1}}))}function xo(i){let t=document.createElement("div");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),Object.assign(t.style,{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:"0"}),t.textContent=i,document.body.appendChild(t),setTimeout(()=>t.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Jn()):Jn();var To=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Fi)&&Ri(s),s.querySelectorAll(Fi).forEach(Ri)}});To.observe(document.documentElement,{childList:!0,subtree:!0});var Hi="[data-splitter]";function tr(i=document){i.querySelectorAll(Hi).forEach(Vi)}function Vi(i){if(i.hasAttribute("data-splitter-init"))return;i.setAttribute("data-splitter-init","");let t=[...i.children];if(t.length<2)return;let e=t[0],s=t[1],n=i.getAttribute("data-splitter")==="vertical",r=Number(e.dataset.min)||10,a=Number(e.dataset.max)||90,o=document.createElement("div");o.className="split-divider",o.setAttribute("role","separator"),o.setAttribute("aria-orientation",n?"vertical":"horizontal"),o.setAttribute("aria-valuenow","50"),o.setAttribute("aria-valuemin",String(r)),o.setAttribute("aria-valuemax",String(a)),o.setAttribute("aria-label","Resize panels"),o.setAttribute("tabindex","0"),i.insertBefore(o,s),e.style.flexBasis="50%",e.style.flexGrow="0",e.style.flexShrink="0",e.style.overflow="auto",s.style.flexGrow="1",s.style.overflow="auto";let c=!1;function l(h){let d=Math.min(a,Math.max(r,h));e.style.flexBasis=`${d}%`,o.setAttribute("aria-valuenow",String(Math.round(d))),i.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:d},bubbles:!0}))}o.addEventListener("pointerdown",h=>{h.preventDefault(),c=!0,o.setPointerCapture(h.pointerId),i.style.userSelect="none"}),o.addEventListener("pointermove",h=>{if(!c)return;let d=i.getBoundingClientRect(),u;n?u=(h.clientY-d.top)/d.height*100:u=(h.clientX-d.left)/d.width*100,l(u)}),o.addEventListener("pointerup",h=>{c=!1,o.releasePointerCapture(h.pointerId),i.style.userSelect=""}),o.addEventListener("keydown",h=>{let d=h.shiftKey?10:1,u=Number(o.getAttribute("aria-valuenow")),b=n?["ArrowUp"]:["ArrowLeft"],y=n?["ArrowDown"]:["ArrowRight"];b.includes(h.key)?(h.preventDefault(),l(u-d)):y.includes(h.key)?(h.preventDefault(),l(u+d)):h.key==="Home"?(h.preventDefault(),l(r)):h.key==="End"&&(h.preventDefault(),l(a))})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>tr()):tr();var Lo=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Hi)&&Vi(s),s.querySelectorAll(Hi).forEach(Vi)}});Lo.observe(document.documentElement,{childList:!0,subtree:!0});var zi='input[type="checkbox"][data-switch]';function Ui(i){i.hasAttribute("data-switch-init")||(i.setAttribute("data-switch-init",""),i.setAttribute("role","switch"))}function er(i=document){i.querySelectorAll(zi).forEach(Ui)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>er()):er();var Mo=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(zi)&&Ui(s),s.querySelectorAll(zi).forEach(n=>Ui(n))}});Mo.observe(document.documentElement,{childList:!0,subtree:!0});var ae=new Map,Wi=null,oe=!1;function No(i){for(let[t,e]of ae)i.querySelectorAll(t).forEach(e)}function Do(i){if(i.nodeType!==Node.ELEMENT_NODE)return;let t=i;for(let[e,s]of ae)t.matches(e)&&s(t),t.querySelectorAll(e).forEach(s)}function _o(){Wi||(Wi=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes)Do(e)}),Wi.observe(document.documentElement,{childList:!0,subtree:!0}))}function qo(){oe||(oe=!0,No(document))}function _(i,t){ae.set(i,t),_o(),oe||document.readyState!=="loading"?(oe=!0,document.querySelectorAll(i).forEach(t)):ae.size===1&&document.addEventListener("DOMContentLoaded",qo)}var $o="textarea[data-count]";function Io(i){if(i.hasAttribute("data-count-init"))return;i.setAttribute("data-count-init","");let t=i.dataset.count==="words",e=t?parseInt(i.dataset.maxwords??"0",10)||0:i.maxLength>0?i.maxLength:0,s=document.createElement("output");s.className="textarea-counter",s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true");let n=i.closest("form-field");n?n.appendChild(s):i.insertAdjacentElement("afterend",s);function r(){let a=i.value,o=t?a.trim()?a.trim().split(/\s+/).length:0:a.length;if(e>0){s.textContent=`${o} / ${e}`;let c=o/e;s.dataset.state=c>=1?"error":c>=.8?"warning":""}else{let c=t?o===1?"word":"words":o===1?"character":"characters";s.textContent=`${o} ${c}`,s.dataset.state=""}}i.addEventListener("input",r),r()}_($o,Io);var Oo="textarea[data-grow]",Bo=CSS.supports("field-sizing","content");function Po(i){if(i.hasAttribute("data-grow-init"))return;i.setAttribute("data-grow-init","");let t=parseInt(i.dataset.maxRows??"0",10)||0;if(i.style.resize="none",Bo){i.style.fieldSizing="content",t>0&&(i.style.maxBlockSize=`${t}lh`);return}i.style.overflow="hidden";function e(){i.style.blockSize="auto";let s=i.scrollHeight;if(t>0){let n=getComputedStyle(i),r=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2,a=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),o=r*t+a;s>o?(s=o,i.style.overflow="auto"):i.style.overflow="hidden"}i.style.blockSize=s+"px"}i.addEventListener("input",e),i.addEventListener("change",e),e()}_(Oo,Po);var ce="[data-show-when], [data-hide-when]";function ji(i){let t=i.indexOf("=");return t===-1?{name:i,value:null}:{name:i.slice(0,t),value:i.slice(t+1)}}function Fo(i,t){let e=t.querySelectorAll(`[name="${CSS.escape(i)}"]`);if(!e.length)return"";let s=e[0];if(s.type==="radio"){let n=Array.from(e).find(r=>r.checked);return n?n.value:""}return s.type==="checkbox"?s.checked?s.value||"true":"":s.value}function ir(i,t){let e=Fo(i.name,t);return i.value===null?e!=="":e===i.value}function le(i){let t=i.closest("form")||document,e;if(i.dataset.showWhen){let s=ji(i.dataset.showWhen);e=ir(s,t)}else if(i.dataset.hideWhen){let s=ji(i.dataset.hideWhen);e=!ir(s,t)}e?(i.removeAttribute("hidden"),i.removeAttribute("inert")):(i.setAttribute("hidden",""),i.setAttribute("inert",""))}function sr(i=document){let t=i.querySelectorAll(ce);t.forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),le(n))});let e=new Set;t.forEach(n=>{let r=n.closest("form");r&&!r.hasAttribute("data-conditional-listener")&&(r.setAttribute("data-conditional-listener",""),e.add(r))}),(e.size?[...e]:[document]).forEach(n=>{n.addEventListener("change",nr),n.addEventListener("input",nr)})}function nr(i){let t=i.target.name;if(!t)return;(i.target.closest("form")||document).querySelectorAll(ce).forEach(n=>{let r=n.dataset.showWhen||n.dataset.hideWhen||"";ji(r).name===t&&le(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>sr()):sr();var Ro=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ce)&&(s.hasAttribute("data-conditional-init")||(s.setAttribute("data-conditional-init",""),le(s))),s.querySelectorAll(ce).forEach(n=>{n.hasAttribute("data-conditional-init")||(n.setAttribute("data-conditional-init",""),le(n))})}});Ro.observe(document.documentElement,{childList:!0,subtree:!0});var Ho='input[type="range"][data-range]';function Vo(i){if(i.hasAttribute("data-range-init"))return;i.setAttribute("data-range-init","");let t=i.dataset.prefix||"",e=i.dataset.suffix||"",s=i.hasAttribute("data-bubble"),n=document.createElement("div");if(n.className="range-wrapper",!i.parentNode)return;i.parentNode.insertBefore(n,i),n.appendChild(i);function r(){let h=parseFloat(i.min)||0,d=parseFloat(i.max)||100,b=(parseFloat(i.value)-h)/(d-h)*100;n.style.setProperty("--range-pct",`${b}%`)}let a;s&&(a=document.createElement("output"),a.className="range-bubble",a.setAttribute("for",i.id||""),n.appendChild(a));function o(){if(!a)return;a.textContent=`${t}${i.value}${e}`;let h=parseFloat(i.min)||0,d=parseFloat(i.max)||100,u=(parseFloat(i.value)-h)/(d-h),b=i.offsetWidth,p=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize),E=i.offsetLeft+p/2+u*(b-p);a.style.insetInlineStart=`${E}px`}if(i.hasAttribute("data-markers")){let h=parseFloat(i.min)||0,d=parseFloat(i.max)||100,u=parseFloat(i.step)||1,b=document.createElement("div");b.className="range-markers";let y=Math.round((d-h)/u);for(let p=0;p<=y;p++)b.appendChild(document.createElement("span"));n.appendChild(b)}let c=i.getAttribute("list");if(c){let h=document.getElementById(c);if(h){let d=document.createElement("div");d.className="range-labels";let u=parseFloat(i.min)||0,b=parseFloat(i.max)||100;requestAnimationFrame(()=>{let y=i.offsetWidth,E=1.25*parseFloat(getComputedStyle(document.documentElement).fontSize);Array.from(h.options).forEach(v=>{let T=document.createElement("span");T.textContent=v.label||v.value;let q=(parseFloat(v.value)-u)/(b-u),Bt=i.offsetLeft+E/2+q*(y-E);T.style.insetInlineStart=`${Bt}px`,d.appendChild(T)})}),n.appendChild(d)}}function l(){r(),o()}i.addEventListener("input",l),l()}_(Ho,Vo);var Yi='input[type="file"][data-upload]';function zo(i){if(i===0)return"0 B";let t=["B","KB","MB","GB"],e=Math.floor(Math.log(i)/Math.log(1024));return`${(i/Math.pow(1024,e)).toFixed(e>0?1:0)} ${t[e]}`}function Gi(i){if(i.hasAttribute("data-upload-init"))return;i.setAttribute("data-upload-init","");let t=i.hasAttribute("multiple"),e=i.getAttribute("accept")||"",s=document.createElement("div");if(s.className="upload-zone",s.setAttribute("role","presentation"),!i.parentNode)return;i.parentNode.insertBefore(s,i),s.appendChild(i);let n=document.createElement("div");n.className="upload-prompt",n.innerHTML=`
311
383
  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
312
384
  <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
313
385
  <polyline points="17 8 12 3 7 8"/>
@@ -315,12 +387,12 @@ svg {
315
387
  </svg>
316
388
  <span>Drag files here or <button type="button" class="upload-browse">browse</button></span>
317
389
  ${e?`<small>${e.replace(/\./g,"").toUpperCase().replace(/,/g,", ")}</small>`:""}
318
- `,i.appendChild(n);let r=document.createElement("ul");r.className="upload-file-list",r.setAttribute("aria-label","Selected files"),i.appendChild(r);let a=n.querySelector(".upload-browse");if(!a)return;a.addEventListener("click",()=>s.click()),i.addEventListener("click",c=>{(c.target===i||c.target===n||c.target.closest(".upload-prompt"))&&s.click()});let o=0;i.addEventListener("dragenter",c=>{c.preventDefault(),o++,i.dataset.dragover=""}),i.addEventListener("dragleave",()=>{o--,o===0&&delete i.dataset.dragover}),i.addEventListener("dragover",c=>{c.preventDefault()}),i.addEventListener("drop",c=>{c.preventDefault(),o=0,delete i.dataset.dragover,c.dataTransfer&&c.dataTransfer.files.length&&(s.files=c.dataTransfer.files,s.dispatchEvent(new Event("change",{bubbles:!0})))}),s.addEventListener("change",()=>{r.innerHTML="";let c=Array.from(s.files??[]);if(c.length===0){r.hidden=!0;return}r.hidden=!1,c.forEach(l=>{let h=document.createElement("li");h.innerHTML=`
319
- <span class="upload-file-name">${$r(l.name)}</span>
320
- <span class="upload-file-size">${Ir(l.size)}</span>
321
- `,r.appendChild(h)})})}function $r(s){let t=document.createElement("div");return t.textContent=s,t.innerHTML}function Oi(s=document){s.querySelectorAll(Ge).forEach(Ke)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Oi()):Oi();var Pr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Ge)&&Ke(i),i.querySelectorAll(Ge).forEach(n=>Ke(n))}});Pr.observe(document.documentElement,{childList:!0,subtree:!0});var Xe="form[data-autosave]";function Je(s){if(s.hasAttribute("data-autosave-init"))return;s.setAttribute("data-autosave-init","");let t=`vb-autosave:${s.dataset.autosave}`,e;function i(){let c={},l=s.elements;for(let h of l){let d=h;d.name&&(d.type==="password"||d.type==="file"||(d.type==="checkbox"?c[d.name]=d.checked?"on":"":d.type==="radio"?d.checked&&(c[d.name]=d.value):c[d.name]=d.value))}return c}function n(){let l={data:i(),timestamp:Date.now()};try{localStorage.setItem(t,JSON.stringify(l))}catch{}}function r(){try{let c=localStorage.getItem(t);if(!c)return!1;let l=JSON.parse(c);if(Date.now()-l.timestamp>864e5)return localStorage.removeItem(t),!1;let h=l.data,d=!1;for(let[u,m]of Object.entries(h)){let y=s.querySelectorAll(`[name="${CSS.escape(u)}"]`);y.forEach(p=>{let f=p;f.type==="checkbox"?f.checked=m==="on":f.type==="radio"?f.checked=f.value===m:f.value=m}),y.length&&(d=!0)}return d}catch{return!1}}function a(){localStorage.removeItem(t)}function o(){if(customElements.get("toast-msg")){let c=document.createElement("toast-msg");c.setAttribute("variant","info"),c.setAttribute("duration","3000"),c.textContent="Draft restored",document.body.appendChild(c)}}r()&&(o(),Array.from(s.elements).forEach(c=>{let l=c;l.name&&l.type!=="password"&&l.type!=="file"&&l.dispatchEvent(new Event("input",{bubbles:!0}))})),s.addEventListener("input",()=>{clearTimeout(e),e=setTimeout(n,500)}),s.addEventListener("change",()=>{clearTimeout(e),e=setTimeout(n,500)}),s.addEventListener("submit",a),s.addEventListener("reset",()=>{setTimeout(a,0)})}function Fi(s=document){s.querySelectorAll(Xe).forEach(Je)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Fi()):Fi();var Br=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Xe)&&Je(i),i.querySelectorAll(Xe).forEach(Je)}});Br.observe(document.documentElement,{childList:!0,subtree:!0});var _r="input[data-mask]",Ri={phone:{pattern:"(###) ###-####",accept:/\d/},"credit-card":{pattern:"#### #### #### ####",accept:/\d/},date:{pattern:"##/##/####",accept:/\d/},ssn:{pattern:"###-##-####",accept:/\d/},zip:{pattern:"#####",accept:/\d/}},Or={"#":/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/};function Fr(s){let t=s.dataset.mask;if(Ri[t])return Ri[t];if(t==="custom"&&s.dataset.pattern){let e=s.dataset.pattern,i=new Set;for(let r of e)r==="#"?i.add("0-9"):r==="A"?i.add("a-zA-Z"):r==="*"&&i.add("a-zA-Z0-9");let n=i.size>0?new RegExp(`[${[...i].join("")}]`):/./;return{pattern:e,accept:n}}return null}function $t(s){return s==="#"||s==="A"||s==="*"}function Rr(s,t){let e=Or[s];return e?e.test(t):!1}function Hi(s,t){let e="",i=0;for(let n=0;n<t.length&&i<s.length;n++){let r=t[n];if($t(r)){for(;i<s.length&&!Rr(r,s[i]);)i++;i<s.length&&(e+=s[i],i++)}else e+=r}return e}function zi(s,t){return s.split("").filter(e=>t.test(e)).join("")}function Hr(s){for(let t of s)if($t(t)&&t!=="#")return!1;return!0}function zr(s){if(s.hasAttribute("data-mask-init"))return;s.setAttribute("data-mask-init","");let t=Fr(s);if(!t)return;let{pattern:e}=t,i=t.accept;Hr(e)&&!s.getAttribute("inputmode")&&s.setAttribute("inputmode","numeric"),s.getAttribute("maxlength")||s.setAttribute("maxlength",String(e.length));let n=!1;s.addEventListener("compositionstart",()=>{n=!0}),s.addEventListener("compositionend",()=>{n=!1,r()});function r(){if(n)return;let a=s.selectionStart??0,o=0;for(let u=0;u<a&&u<s.value.length;u++)i.test(s.value[u])&&o++;let c=zi(s.value,i),l=Hi(c,e);s.value=l,s.dataset.rawValue=c;let h=0,d=l.length;for(let u=0;u<l.length;u++)if(u<e.length&&$t(e[u])&&(h++,h===o)){for(d=u+1;d<e.length&&!$t(e[d]);)d++;break}s.setSelectionRange(d,d)}if(s.addEventListener("input",r),s.value){let a=zi(s.value,i);s.value=Hi(a,e),s.dataset.rawValue=a}}x(_r,zr);var Vr="input[data-accept]",Ur={digits:{pattern:"[0-9]",inputmode:"numeric"},alpha:{pattern:"[a-zA-Z]",inputmode:"text"},alphanum:{pattern:"[a-zA-Z0-9]",inputmode:"text"},phone:{pattern:"[0-9+()\\- ]",inputmode:"tel"},date:{pattern:"[0-9/\\-.]",inputmode:"numeric"},hex:{pattern:"[0-9a-fA-F]",inputmode:"text"},currency:{pattern:"[0-9.,]",inputmode:"decimal"},cc:{pattern:"[0-9 \\-]",inputmode:"numeric"}};function Wr(s){if(!s)return null;let t=Ur[s];if(t)return{regex:new RegExp(t.pattern),inputmode:t.inputmode};if(s.startsWith("["))try{return{regex:new RegExp(s),inputmode:"text"}}catch{return console.warn(`[data-accept] Invalid character class: ${s}`),null}return console.warn(`[data-accept] Unknown preset: ${s}`),null}function Yr(s){if(s.hasAttribute("data-accept-init"))return;if(s.setAttribute("data-accept-init",""),s.hasAttribute("data-mask")){console.warn("[data-accept] Conflict: data-mask is also present \u2014 deferring to mask.",s);return}let t=Wr(s.dataset.accept);if(!t)return;let{regex:e,inputmode:i}=t;s.dataset.acceptPattern=e.source,s.getAttribute("inputmode")||s.setAttribute("inputmode",i);let n=!1;s.addEventListener("compositionstart",()=>{n=!0}),s.addEventListener("compositionend",()=>{n=!1,r()}),s.addEventListener("beforeinput",a=>{if(n)return;let o=a.data;if(o!=null){if(a.inputType==="insertFromPaste"){let c=o.split("").filter(l=>e.test(l)).join("");if(c===o||(a.preventDefault(),!c))return;document.execCommand("insertText",!1,c)||jr(s,c);return}if(a.inputType==="insertText"||a.inputType==="insertCompositionText"){for(let c of o)if(!e.test(c)){a.preventDefault();return}}}}),s.addEventListener("input",()=>{n||r()});function r(){let a=s.value,o=a.split("").filter(d=>e.test(d)).join("");if(o===a)return;let c=s.selectionStart??0,l=0;for(let d=0;d<c&&d<a.length;d++)e.test(a[d])&&l++;s.value=o;let h=Math.min(l,o.length);s.setSelectionRange(h,h)}if(s.value){let a=s.value.split("").filter(o=>e.test(o)).join("");a!==s.value&&(s.value=a)}}function jr(s,t){let e=s.selectionStart??0,i=s.selectionEnd??0,n=s.value.slice(0,e),r=s.value.slice(i);s.value=n+t+r;let a=e+t.length;s.setSelectionRange(a,a),s.dispatchEvent(new Event("input",{bubbles:!0}))}x(Vr,Yr);var Ze="fieldset[data-toggle-tags][data-max]";function Qe(s){if(s.hasAttribute("data-toggle-tags-init"))return;s.setAttribute("data-toggle-tags-init","");let t=parseInt(s.dataset.max,10);if(!t||t<1)return;function e(){let i=s.querySelectorAll('input[type="checkbox"]'),n=s.querySelectorAll('input[type="checkbox"]:checked').length;i.forEach(r=>{r.checked||(r.disabled=n>=t)})}s.addEventListener("change",e),e()}function Vi(s=document){s.querySelectorAll(Ze).forEach(Qe)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Vi()):Vi();var Gr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(Ze)&&Qe(i),i.querySelectorAll(Ze).forEach(Qe)}});Gr.observe(document.documentElement,{childList:!0,subtree:!0});var Kr='input[type="number"][data-stepper]',Xr='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="5" y1="12" x2="19" y2="12"/></svg>',Jr='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function Zr(s){if(s.hasAttribute("data-stepper-init"))return;s.setAttribute("data-stepper-init","");let t=document.createElement("div");t.className="number-wrapper",s.parentNode.insertBefore(t,s);let e=document.createElement("button");e.type="button",e.className="number-dec",e.innerHTML=Xr,e.setAttribute("aria-label","Decrease"),e.tabIndex=-1;let i=document.createElement("button");i.type="button",i.className="number-inc",i.innerHTML=Jr,i.setAttribute("aria-label","Increase"),i.tabIndex=-1,t.appendChild(e),t.appendChild(s),t.appendChild(i);function n(a){let o=s.min!==""?parseFloat(s.min):-1/0,c=s.max!==""?parseFloat(s.max):1/0,l=parseFloat(s.step)||1,h=parseFloat(s.value)||0,d=(l.toString().split(".")[1]||"").length,u=parseFloat((h+l*a).toFixed(d)),m=Math.min(Math.max(u,o),c);s.value=m,s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),r()}function r(){let a=s.min!==""?parseFloat(s.min):-1/0,o=s.max!==""?parseFloat(s.max):1/0,c=parseFloat(s.value)||0;e.disabled=c<=a,i.disabled=c>=o}e.addEventListener("click",()=>n(-1)),i.addEventListener("click",()=>n(1)),s.addEventListener("input",r),r()}x(Kr,Zr);var ts='input[type="color"][data-color]';function es(s){if(s.hasAttribute("data-color-init")||s.closest("color-picker"))return;s.setAttribute("data-color-init","");let t=document.createElement("div");t.className="color-wrapper",s.parentNode.insertBefore(t,s),t.appendChild(s);let e=document.createElement("button");e.type="button",e.className="color-display";let i=document.createElement("span");i.className="color-swatch";let n=document.createElement("span");n.className="color-hex",e.appendChild(i),e.appendChild(n),t.appendChild(e);function r(){i.style.background=s.value,n.textContent=s.value}e.addEventListener("click",()=>s.click()),s.addEventListener("input",r),r()}function Ui(s=document){s.querySelectorAll(ts).forEach(es)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ui()):Ui();var Qr=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(ts)&&es(i),i.querySelectorAll(ts).forEach(es)}});Qr.observe(document.documentElement,{childList:!0,subtree:!0});var ta=window.matchMedia("(prefers-reduced-motion: reduce)");function Wi(){return ta.matches||document.documentElement.hasAttribute("data-motion-reduced")}var Yi=0,P={_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_transitionCleanups:new WeakMap,_observer:null,effect(s,t){this._effects.set(s,t),document.querySelectorAll("[data-effect]").forEach(e=>{(e.getAttribute("data-effect")||"").split(/\s+/).includes(s)&&this._initEffect(e,s)})},trigger(s,t){this._triggers.set(s,t)},transition(s,t){this._transitions.set(s,t)},uid(s){return s.id?s.id:(s._vbUid||(Yi++,s._vbUid=`vb-${Yi}`),s._vbUid)},theme(s,t){this._themes=this._themes||new Map,this._themes.set(s,t)},applyTheme(s,t=document.documentElement){let e=this._themes?.get(s);if(e)for(let[i,n]of Object.entries(e))t.style.setProperty(i,n)},swap(s){return document.startViewTransition?document.startViewTransition(s):s()},observe(s=document){if(s.querySelectorAll("[data-effect]").forEach(e=>this._processElement(e)),s.querySelectorAll("[data-stagger]").forEach(e=>this._processStagger(e)),s.querySelectorAll("[data-transition]").forEach(e=>this._processTransition(e)),this._observer)return;this._observer=new MutationObserver(e=>{for(let i of e){if(i.type==="childList"){for(let n of i.addedNodes)n.nodeType===Node.ELEMENT_NODE&&this._processTree(n);for(let n of i.removedNodes)n.nodeType===Node.ELEMENT_NODE&&this._cleanupTree(n)}if(i.type==="attributes"){let n=i.target;i.attributeName==="data-effect"&&this._reconcileEffects(n),i.attributeName==="data-trigger"&&this._reconcileTrigger(n),i.attributeName==="data-stagger"&&this._processStagger(n),i.attributeName==="data-transition"&&this._processTransition(n)}}});let t=s===document?document.body:s;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]})},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null)},params(s){let t=getComputedStyle(s);return{get(e){return t.getPropertyValue(`--vb-${e}`).trim()},getNumber(e,i=0){let n=t.getPropertyValue(`--vb-${e}`).trim();return n?parseFloat(n):i},hasClass(e){return s.classList.contains(e)}}},emit(s,t,e={}){s.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))},prefersReducedMotion:Wi,_processTree(s){s.hasAttribute?.("data-effect")&&this._processElement(s),s.hasAttribute?.("data-stagger")&&this._processStagger(s),s.hasAttribute?.("data-transition")&&this._processTransition(s),s.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),s.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),s.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(s){s.hasAttribute?.("data-effect")&&this._cleanupElement(s),s.hasAttribute?.("data-transition")&&this._cleanupTransition(s),s.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),s.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(s){if(s.hasAttribute("data-effect-processed"))return;s.setAttribute("data-effect-processed","");let t=s.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let e of t)this._initEffect(s,e);this._wireTrigger(s,t)},_initEffect(s,t){let e=this._effects.get(t);if(!e)return;let i=this._instances.get(s);if(i?.has(t))return;Wi();let n=e(s);n&&(i||(i=new Map,this._instances.set(s,i)),typeof n=="function"?i.set(t,{cleanup:n}):i.set(t,n))},_wireTrigger(s,t){let e=s.getAttribute("data-trigger");if(!e){this._activateEffects(s);return}let i=e.split(/\s+/).filter(Boolean);for(let n of i){let r=n.indexOf(":"),a=r>-1?n.slice(0,r):n,o=r>-1?n.slice(r+1):null,c=this._triggers.get(a);if(!c)continue;let l=c(s,()=>this._activateEffects(s),o);if(l){let h=this._triggerCleanups.get(s);if(h){let d=h;this._triggerCleanups.set(s,()=>{d(),l()})}else this._triggerCleanups.set(s,l)}}},_activateEffects(s){s.setAttribute("data-effect-active","");let t=this._instances.get(s);if(t)for(let[,e]of t)e.activate&&e.activate()},_cleanupElement(s){let t=this._instances.get(s);if(t){for(let[,i]of t)i.cleanup&&i.cleanup();this._instances.delete(s)}let e=this._triggerCleanups.get(s);e&&(e(),this._triggerCleanups.delete(s))},_reconcileEffects(s){let t=s.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],e=this._instances.get(s);if(e)for(let[i,n]of e)t.includes(i)||(n.cleanup&&n.cleanup(),e.delete(i));for(let i of t)e?.has(i)||this._initEffect(s,i);s.hasAttribute("data-effect-processed")||(s.setAttribute("data-effect-processed",""),this._wireTrigger(s,t))},_reconcileTrigger(s){let t=this._triggerCleanups.get(s);t&&(t(),this._triggerCleanups.delete(s));let e=s.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(s,e)},_processStagger(s){let t=s.children;for(let e=0;e<t.length;e++)t[e].style.setProperty("--vb-stagger-index",String(e))},_processTransition(s){if(s.hasAttribute("data-transition-processed"))return;s.setAttribute("data-transition-processed","");let t=s.getAttribute("data-transition");if(!t)return;let e=this._transitions.get(t);if(e){let i=e(s);i&&this._transitionCleanups.set(s,i)}else s.style.viewTransitionName=`${t}-${this.uid(s)}`},_cleanupTransition(s){let t=this._transitionCleanups.get(s);t&&(t(),this._transitionCleanups.delete(s)),s.style.viewTransitionName=""}};typeof window<"u"&&(window.VB=P);function ea(s){let t=s.textContent;s.setAttribute("aria-label",t),s.innerHTML="",t.split(/(\s+)/).forEach((i,n)=>{if(/^\s+$/.test(i)){s.appendChild(document.createTextNode(i));return}let r=document.createElement("span");r.className="vb-reveal-chunk",r.textContent=i,r.style.setProperty("--i",String(Math.floor(n/2))),r.setAttribute("aria-hidden","true"),s.appendChild(r)})}function sa(s){let t=s.textContent;s.setAttribute("aria-label",t);let e=document.createElement("div");e.style.cssText=getComputedStyle(s).cssText,e.style.position="absolute",e.style.visibility="hidden",e.style.whiteSpace="normal",document.body.appendChild(e);let i=t.split(/\s+/).filter(Boolean),n=[],r="";i.forEach(a=>{let o=r?r+" "+a:a;e.textContent=o,e.style.width=getComputedStyle(s).width,e.scrollWidth>e.clientWidth&&r?(n.push(r),r=a):r=o}),r&&n.push(r),document.body.removeChild(e),n.length===0&&n.push(t),s.innerHTML="",n.forEach((a,o)=>{let c=document.createElement("span");c.className="vb-reveal-chunk",c.textContent=a,c.style.setProperty("--i",String(o)),c.setAttribute("aria-hidden","true"),s.appendChild(c),o<n.length-1&&s.appendChild(document.createTextNode(" "))})}P.effect("reveal",s=>{if(s.hasAttribute("data-effect-reveal-init")||(s.setAttribute("data-effect-reveal-init",""),P.prefersReducedMotion()))return;let t=s.classList.contains("line")?"line":"word",e=P.params(s),i=e.get("reveal-delay")||"80ms",n=e.get("reveal-duration")||"400ms";return s.style.setProperty("--reveal-delay",i),s.style.setProperty("--reveal-duration",n),t==="line"?sa(s):ea(s),{activate(){s.setAttribute("data-effect-active","")},cleanup(){}}});P.effect("highlight",s=>{if(s.hasAttribute("data-effect-highlight-init"))return;s.setAttribute("data-effect-highlight-init","");let e=getComputedStyle(s).getPropertyValue("--vb-highlight-color").trim();return e&&s.style.setProperty("--highlight-color",e),P.prefersReducedMotion()&&s.setAttribute("data-effect-active",""),{activate(){s.setAttribute("data-effect-active","")},cleanup(){}}});var ss="[data-select-all]";function ji(s=document){s.querySelectorAll(ss).forEach(is)}function is(s){if(s.hasAttribute("data-select-all-init"))return;s.setAttribute("data-select-all-init","");let t=s.dataset.selectAll??"";if(!t)return;function e(){return(s.closest("[data-select-all-scope]")||s.closest("table, form, fieldset")||document).querySelectorAll(t)}function i(){let a=e(),o=a.length,c=0;a.forEach(d=>{d.checked&&c++}),c===0?(s.checked=!1,s.indeterminate=!1):c===o?(s.checked=!0,s.indeterminate=!1):(s.checked=!1,s.indeterminate=!0);let h=(s.closest("[data-select-all-scope]")||s.closest("table, form, fieldset")||document).querySelector("[data-selected-count]");h&&(h.textContent=String(c)),s.dispatchEvent(new CustomEvent("select-all:change",{bubbles:!0,detail:{checked:c,total:o,selected:[...a].filter(d=>d.checked)}}))}let n=!1;s.addEventListener("change",()=>{n=!0;let a=s.checked;e().forEach(c=>{c.checked=a,c.dispatchEvent(new Event("change",{bubbles:!0}))}),n=!1,s.indeterminate=!1,i()}),(s.closest("[data-select-all-scope]")||s.closest("table, form, fieldset")||document).addEventListener("change",a=>{n||a.target!==s&&a.target.matches?.(t)&&i()}),i()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ji()):ji();var ia=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(ss)&&is(i),i.querySelectorAll(ss).forEach(n=>is(n))}});ia.observe(document.documentElement,{childList:!0,subtree:!0});var ns="[data-math], code.language-math";var Gi=0;window.VBMath=window.VBMath||{equations:[]};function Ki(s=document){s.querySelectorAll(ns).forEach(rs)}function na(s){let t=s.getAttribute("data-math")||"";return new Set(t.split(/\s+/).filter(Boolean))}function rs(s){if(s.hasAttribute("data-math-init"))return;s.setAttribute("data-math-init",""),!s.hasAttribute("data-math")&&s.classList.contains("language-math")&&s.setAttribute("data-math","");let t=na(s),e=s.getAttribute("data-mathml"),i=s.textContent.trim(),n=t.has("inline");if(!e){s.setAttribute("data-math-state","source");return}let r=n?document.createElement("span"):document.createElement("div");r.setAttribute("data-math-rendered",""),r.innerHTML=e;let a=s.id||null;a&&(r.id=a,s.removeAttribute("id"));let o=r.querySelector("math");o&&!n&&o.setAttribute("display","block");let c=null;t.has("numbered")&&(Gi++,c=Gi,r.setAttribute("data-math-numbered",""),r.setAttribute("data-equation-number",String(c)),a&&window.VBMath?.equations.push({id:a,number:c,latex:i})),t.has("copyable")&&(r.setAttribute("data-math-copyable",""),r.style.cursor="copy",r.addEventListener("click",async()=>{try{await navigator.clipboard.writeText(i),aa("Copied to clipboard",r)}catch{}})),s.setAttribute("data-math-state","rendered"),s.insertAdjacentElement("afterend",r);let l=s.closest("pre");l?(l.setAttribute("data-math-state","rendered"),l.hidden=!0):s.hidden=!0,ra(),s.dispatchEvent(new CustomEvent("math:rendered",{bubbles:!0,detail:{latex:i,inline:n,number:c}}))}function ra(){if(document.querySelector("[data-vb-math-font]"))return;let s=document.createElement("link");s.rel="stylesheet",s.href="/fonts/math-fonts.css",s.setAttribute("data-vb-math-font",""),document.head.appendChild(s)}function aa(s,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="sr-only",e.textContent=s,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ki()):Ki();var oa=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(ns)&&rs(i),i.querySelectorAll(ns).forEach(rs)}});oa.observe(document.documentElement,{childList:!0,subtree:!0});var ca=CSS.supports("anchor-name","--test"),la=new Set(["BUTTON","A","AREA"]);function ha(s){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?la.has(s.tagName):!1}function as(s,t){if(ha(s)){s.setAttribute("interestfor",t.id),t.addEventListener("toggle",l=>{l.newState==="open"&&Pt(s,t)});return}let e=null,i=null,n=t,r=()=>{clearTimeout(i),e=setTimeout(()=>{n.showPopover(),Pt(s,t)},200)},a=()=>{clearTimeout(e),i=setTimeout(()=>{n.hidePopover()},100)},o=()=>{clearTimeout(i),n.showPopover(),Pt(s,t)},c=()=>{clearTimeout(e),n.hidePopover()};s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",a),s.addEventListener("focus",o),s.addEventListener("blur",c),t.addEventListener("mouseenter",()=>clearTimeout(i)),t.addEventListener("mouseleave",a)}function os(s,t){if(!ca)return;let e=`--tooltip-anchor-${t.id}`;s.style.anchorName=e,t.style.positionAnchor=e,t.setAttribute("data-anchor","")}function da(s){let t=s.getAttribute("title");if(!t)return;s.removeAttribute("title");let e=document.createElement("div");e.setAttribute("role","tooltip"),e.setAttribute("popover","hint"),e.id=`tooltip-${crypto.randomUUID().slice(0,8)}`,e.textContent=t;let i=s.dataset.tooltipPosition||"top";e.dataset.tooltipPosition=i;let n=document.createElement("span");n.className="tooltip-arrow",n.setAttribute("aria-hidden","true"),e.appendChild(n),s.after(e),s.setAttribute("aria-describedby",e.id),os(s,e),as(s,e)}function ua(s,t){let e=document.getElementById(t);e?.hasAttribute("popover")&&(s.hasAttribute("title")&&s.removeAttribute("title"),s.hasAttribute("aria-describedby")||s.setAttribute("aria-describedby",t),os(s,e),as(s,e))}function Xi(s=document){s.querySelectorAll("[data-tooltip]").forEach(t=>{if(t.closest("tool-tip")||t.hasAttribute("data-tooltip-init"))return;t.setAttribute("data-tooltip-init","");let e=t.dataset.tooltip;e?ua(t,e):da(t)}),s.querySelectorAll("[aria-describedby]").forEach(t=>{let e=t.getAttribute("aria-describedby")??"",i=document.getElementById(e);!i?.hasAttribute("popover")||!i.matches('[role="tooltip"]')||t.closest("tool-tip")||t.hasAttribute("data-tooltip-init")||(t.setAttribute("data-tooltip-init",""),os(t,i),as(t,i))}),s.querySelectorAll("[popovertarget]").forEach(t=>{let e=t.getAttribute("popovertarget")??"",i=document.getElementById(e);!i?.hasAttribute("popover")||!i.matches('[role="tooltip"]')||i.hasAttribute("data-tooltip-click-init")||(i.setAttribute("data-tooltip-click-init",""),i.addEventListener("toggle",n=>{n.newState==="open"&&Pt(t,i)}))})}function Pt(s,t){if(t.hasAttribute("data-anchor"))return;let e=s.getBoundingClientRect(),i=t.dataset.tooltipPosition||"top",n=8,r=t.getBoundingClientRect(),a,o;switch(i){case"bottom":a=e.bottom+n,o=e.left+(e.width-r.width)/2;break;case"left":a=e.top+(e.height-r.height)/2,o=e.left-r.width-n;break;case"right":a=e.top+(e.height-r.height)/2,o=e.right+n;break;default:a=e.top-r.height-n,o=e.left+(e.width-r.width)/2;break}let c=8;o=Math.max(c,Math.min(o,window.innerWidth-r.width-c)),a=Math.max(c,Math.min(a,window.innerHeight-r.height-c)),t.style.top=`${a}px`,t.style.left=`${o}px`}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Xi()):Xi();var cs="[data-vt-name]";function ls(s){s.hasAttribute("data-vt-name-init")||(s.setAttribute("data-vt-name-init",""),s.style.viewTransitionName=s.dataset.vtName)}function Ji(s=document){s.querySelectorAll(cs).forEach(ls)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ji()):Ji();var pa=new MutationObserver(s=>{for(let t of s)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let i=e;i.matches(cs)&&ls(i),i.querySelectorAll(cs).forEach(ls)}});pa.observe(document.documentElement,{childList:!0,subtree:!0});function Zi(s){document.querySelectorAll("browser-window").forEach(t=>{t.setAttribute("mode",s)}),document.querySelectorAll("code-block").forEach(t=>{t.setAttribute("theme",s)})}function Qi(){let{effectiveMode:s}=E.getState();Zi(s),window.addEventListener("vb:theme-change",e=>{Zi(e.detail.effectiveMode)}),new MutationObserver(e=>{let{effectiveMode:i}=E.getState();for(let n of e)for(let r of n.addedNodes){if(r.nodeType!==Node.ELEMENT_NODE)continue;let a=r;a.tagName==="BROWSER-WINDOW"?a.setAttribute("mode",i):a.tagName==="CODE-BLOCK"&&a.setAttribute("theme",i),a.querySelectorAll("browser-window").forEach(o=>{o.setAttribute("mode",i)}),a.querySelectorAll("code-block").forEach(o=>{o.setAttribute("theme",i)})}}).observe(document.body,{childList:!0,subtree:!0})}st();function ct(s){return[...s.querySelectorAll("input, select, textarea")].filter(t=>t.type!=="submit"&&t.type!=="button"&&t.type!=="hidden"&&!("honeypot"in t.dataset))}function sn(s){return[...s.querySelectorAll("form-field[data-upgraded]")]}function fa(s){return s.labels?.[0]?.textContent?.trim()??s.getAttribute("aria-label")??s.name??s.id}function ot(s,t){let e=s.dataset.match;if(!e)return;let i=t.querySelector(`#${CSS.escape(e)}`)??t.querySelector(`[name="${CSS.escape(e)}"]`);if(i){if(s.setCustomValidity(""),s.value&&i.value&&s.value!==i.value){let n=s.dataset.messageMatch??"Values do not match";s.setCustomValidity(n);let r=tn(s);r&&(r.textContent=n)}else if(s.validity.valid){let n=tn(s);n&&(n.textContent="")}}}function tn(s){let t=s.getAttribute("aria-describedby")?.split(/\s+/)??[];for(let i of t){let n=document.getElementById(i);if(n?.tagName==="OUTPUT"&&n.classList.contains("error"))return n}return s.closest("form-field")?.querySelector("output.error")??null}function en(s){let e=[...s.querySelectorAll('input[type="checkbox"]')].filter(o=>o.checked).length,i=parseInt(s.dataset.minChecked??"0",10),n=parseInt(s.dataset.maxChecked??"999",10),r=s.querySelector(":scope > output"),a=null;return e<i&&(a=s.dataset.messageMinChecked??`Select at least ${i}`),e>n&&(a=s.dataset.messageMaxChecked??`Select no more than ${n}`),r&&(r.textContent=a??""),a?s.dataset.invalid="":delete s.dataset.invalid,!a}function nn(s){let t=s.querySelector("[data-form-summary]");if(t)return{el:t,type:"authored"};let e=s.querySelector("output.error-summary");return e?{el:e,type:"legacy"}:null}function Bt(s,t,{focus:e=!1}={}){if(!t)return;let i=[];for(let n of ct(s))n.validity.valid||i.push({id:n.id||n.name,label:fa(n),message:n.validationMessage});for(let n of s.querySelectorAll("fieldset[data-invalid]")){let r=n.querySelector(":scope > output");i.push({id:n.id||"",label:n.querySelector("legend")?.textContent?.trim()??"Group",message:r?.textContent||"Invalid selection"})}if(i.length===0){rn(t);return}if(t.type==="authored"){let n=t.el.querySelector("[data-summary-list]");if(n){n.innerHTML="";for(let r of i){let a=document.createElement("li"),o=document.createElement("a");o.href=r.id?`#${r.id}`:"#",o.textContent=`${r.label}: ${r.message}`,a.appendChild(o),n.appendChild(a)}}t.el.removeAttribute("hidden"),t.el.dataset.visible=""}else{let n=i.length,r=i.map(a=>`<li><a href="${a.id?`#${a.id}`:"#"}">${a.label}: ${a.message}</a></li>`).join(`
390
+ `,s.appendChild(n);let r=document.createElement("ul");r.className="upload-file-list",r.setAttribute("aria-label","Selected files"),s.appendChild(r);let a=n.querySelector(".upload-browse");if(!a)return;a.addEventListener("click",()=>i.click()),s.addEventListener("click",c=>{(c.target===s||c.target===n||c.target.closest(".upload-prompt"))&&i.click()});let o=0;s.addEventListener("dragenter",c=>{c.preventDefault(),o++,s.dataset.dragover=""}),s.addEventListener("dragleave",()=>{o--,o===0&&delete s.dataset.dragover}),s.addEventListener("dragover",c=>{c.preventDefault()}),s.addEventListener("drop",c=>{c.preventDefault(),o=0,delete s.dataset.dragover,c.dataTransfer&&c.dataTransfer.files.length&&(i.files=c.dataTransfer.files,i.dispatchEvent(new Event("change",{bubbles:!0})))}),i.addEventListener("change",()=>{r.innerHTML="";let c=Array.from(i.files??[]);if(c.length===0){r.hidden=!0;return}r.hidden=!1,c.forEach(l=>{let h=document.createElement("li");h.innerHTML=`
391
+ <span class="upload-file-name">${Uo(l.name)}</span>
392
+ <span class="upload-file-size">${zo(l.size)}</span>
393
+ `,r.appendChild(h)})})}function Uo(i){let t=document.createElement("div");return t.textContent=i,t.innerHTML}function rr(i=document){i.querySelectorAll(Yi).forEach(Gi)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>rr()):rr();var Wo=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Yi)&&Gi(s),s.querySelectorAll(Yi).forEach(n=>Gi(n))}});Wo.observe(document.documentElement,{childList:!0,subtree:!0});W();var Xi="form[data-autosave]",Ki="autosave",ar=500,jo=1440*60*1e3;function Ji(i){if(i.hasAttribute("data-autosave-init"))return;i.setAttribute("data-autosave-init","");let t=i.dataset.autosave,e;function s(){let c={},l=i.elements;for(let h of l){let d=h;d.name&&(d.type==="password"||d.type==="file"||(d.type==="checkbox"?c[d.name]=d.checked?"on":"":d.type==="radio"?d.checked&&(c[d.name]=d.value):c[d.name]=d.value))}return c}function n(){w.set(Ki,t,s()).catch(()=>{})}async function r(){let c=await w.get(Ki,t,{maxAge:jo});if(!c)return!1;let l=!1;for(let[h,d]of Object.entries(c)){let u=i.querySelectorAll(`[name="${CSS.escape(h)}"]`);u.forEach(b=>{let y=b;y.type==="checkbox"?y.checked=d==="on":y.type==="radio"?y.checked=y.value===d:y.value=d}),u.length&&(l=!0)}return l}function a(){w.remove(Ki,t).catch(()=>{})}function o(){if(customElements.get("toast-msg")){let c=document.createElement("toast-msg");c.setAttribute("variant","info"),c.setAttribute("duration","3000"),c.textContent="Draft restored",document.body.appendChild(c)}}r().then(c=>{c&&(o(),Array.from(i.elements).forEach(l=>{let h=l;h.name&&h.type!=="password"&&h.type!=="file"&&h.dispatchEvent(new Event("input",{bubbles:!0}))}))}),i.addEventListener("input",()=>{clearTimeout(e),e=setTimeout(n,ar)}),i.addEventListener("change",()=>{clearTimeout(e),e=setTimeout(n,ar)}),i.addEventListener("submit",a),i.addEventListener("reset",()=>{setTimeout(a,0)})}function or(i=document){i.querySelectorAll(Xi).forEach(Ji)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>or()):or();var Yo=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Xi)&&Ji(s),s.querySelectorAll(Xi).forEach(Ji)}});Yo.observe(document.documentElement,{childList:!0,subtree:!0});var Go="input[data-mask]",cr={phone:{pattern:"(###) ###-####",accept:/\d/},"credit-card":{pattern:"#### #### #### ####",accept:/\d/},date:{pattern:"##/##/####",accept:/\d/},ssn:{pattern:"###-##-####",accept:/\d/},zip:{pattern:"#####",accept:/\d/}},Ko={"#":/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/};function Xo(i){let t=i.dataset.mask;if(cr[t])return cr[t];if(t==="custom"&&i.dataset.pattern){let e=i.dataset.pattern,s=new Set;for(let r of e)r==="#"?s.add("0-9"):r==="A"?s.add("a-zA-Z"):r==="*"&&s.add("a-zA-Z0-9");let n=s.size>0?new RegExp(`[${[...s].join("")}]`):/./;return{pattern:e,accept:n}}return null}function he(i){return i==="#"||i==="A"||i==="*"}function Jo(i,t){let e=Ko[i];return e?e.test(t):!1}function lr(i,t){let e="",s=0;for(let n=0;n<t.length&&s<i.length;n++){let r=t[n];if(he(r)){for(;s<i.length&&!Jo(r,i[s]);)s++;s<i.length&&(e+=i[s],s++)}else e+=r}return e}function hr(i,t){return i.split("").filter(e=>t.test(e)).join("")}function Zo(i){for(let t of i)if(he(t)&&t!=="#")return!1;return!0}function Qo(i){if(i.hasAttribute("data-mask-init"))return;i.setAttribute("data-mask-init","");let t=Xo(i);if(!t)return;let{pattern:e}=t,s=t.accept;Zo(e)&&!i.getAttribute("inputmode")&&i.setAttribute("inputmode","numeric"),i.getAttribute("maxlength")||i.setAttribute("maxlength",String(e.length));let n=!1;i.addEventListener("compositionstart",()=>{n=!0}),i.addEventListener("compositionend",()=>{n=!1,r()});function r(){if(n)return;let a=i.selectionStart??0,o=0;for(let u=0;u<a&&u<i.value.length;u++)s.test(i.value[u])&&o++;let c=hr(i.value,s),l=lr(c,e);i.value=l,i.dataset.rawValue=c;let h=0,d=l.length;for(let u=0;u<l.length;u++)if(u<e.length&&he(e[u])&&(h++,h===o)){for(d=u+1;d<e.length&&!he(e[d]);)d++;break}i.setSelectionRange(d,d)}if(i.addEventListener("input",r),i.value){let a=hr(i.value,s);i.value=lr(a,e),i.dataset.rawValue=a}}_(Go,Qo);var tc="input[data-accept]",ec={digits:{pattern:"[0-9]",inputmode:"numeric"},alpha:{pattern:"[a-zA-Z]",inputmode:"text"},alphanum:{pattern:"[a-zA-Z0-9]",inputmode:"text"},phone:{pattern:"[0-9+()\\- ]",inputmode:"tel"},date:{pattern:"[0-9/\\-.]",inputmode:"numeric"},hex:{pattern:"[0-9a-fA-F]",inputmode:"text"},currency:{pattern:"[0-9.,]",inputmode:"decimal"},cc:{pattern:"[0-9 \\-]",inputmode:"numeric"}};function ic(i){if(!i)return null;let t=ec[i];if(t)return{regex:new RegExp(t.pattern),inputmode:t.inputmode};if(i.startsWith("["))try{return{regex:new RegExp(i),inputmode:"text"}}catch{return console.warn(`[data-accept] Invalid character class: ${i}`),null}return console.warn(`[data-accept] Unknown preset: ${i}`),null}function sc(i){if(i.hasAttribute("data-accept-init"))return;if(i.setAttribute("data-accept-init",""),i.hasAttribute("data-mask")){console.warn("[data-accept] Conflict: data-mask is also present \u2014 deferring to mask.",i);return}let t=ic(i.dataset.accept);if(!t)return;let{regex:e,inputmode:s}=t;i.dataset.acceptPattern=e.source,i.getAttribute("inputmode")||i.setAttribute("inputmode",s);let n=!1;i.addEventListener("compositionstart",()=>{n=!0}),i.addEventListener("compositionend",()=>{n=!1,r()}),i.addEventListener("beforeinput",a=>{if(n)return;let o=a.data;if(o!=null){if(a.inputType==="insertFromPaste"){let c=o.split("").filter(l=>e.test(l)).join("");if(c===o||(a.preventDefault(),!c))return;document.execCommand("insertText",!1,c)||nc(i,c);return}if(a.inputType==="insertText"||a.inputType==="insertCompositionText"){for(let c of o)if(!e.test(c)){a.preventDefault();return}}}}),i.addEventListener("input",()=>{n||r()});function r(){let a=i.value,o=a.split("").filter(d=>e.test(d)).join("");if(o===a)return;let c=i.selectionStart??0,l=0;for(let d=0;d<c&&d<a.length;d++)e.test(a[d])&&l++;i.value=o;let h=Math.min(l,o.length);i.setSelectionRange(h,h)}if(i.value){let a=i.value.split("").filter(o=>e.test(o)).join("");a!==i.value&&(i.value=a)}}function nc(i,t){let e=i.selectionStart??0,s=i.selectionEnd??0,n=i.value.slice(0,e),r=i.value.slice(s);i.value=n+t+r;let a=e+t.length;i.setSelectionRange(a,a),i.dispatchEvent(new Event("input",{bubbles:!0}))}_(tc,sc);var Zi="fieldset[data-toggle-tags][data-max]";function Qi(i){if(i.hasAttribute("data-toggle-tags-init"))return;i.setAttribute("data-toggle-tags-init","");let t=parseInt(i.dataset.max,10);if(!t||t<1)return;function e(){let s=i.querySelectorAll('input[type="checkbox"]'),n=i.querySelectorAll('input[type="checkbox"]:checked').length;s.forEach(r=>{r.checked||(r.disabled=n>=t)})}i.addEventListener("change",e),e()}function dr(i=document){i.querySelectorAll(Zi).forEach(Qi)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>dr()):dr();var rc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(Zi)&&Qi(s),s.querySelectorAll(Zi).forEach(Qi)}});rc.observe(document.documentElement,{childList:!0,subtree:!0});var ac='input[type="number"][data-stepper]',oc='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="5" y1="12" x2="19" y2="12"/></svg>',cc='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function lc(i){if(i.hasAttribute("data-stepper-init"))return;i.setAttribute("data-stepper-init","");let t=document.createElement("div");t.className="number-wrapper",i.parentNode.insertBefore(t,i);let e=document.createElement("button");e.type="button",e.className="number-dec",e.innerHTML=oc,e.setAttribute("aria-label","Decrease"),e.tabIndex=-1;let s=document.createElement("button");s.type="button",s.className="number-inc",s.innerHTML=cc,s.setAttribute("aria-label","Increase"),s.tabIndex=-1,t.appendChild(e),t.appendChild(i),t.appendChild(s);function n(a){let o=i.min!==""?parseFloat(i.min):-1/0,c=i.max!==""?parseFloat(i.max):1/0,l=parseFloat(i.step)||1,h=parseFloat(i.value)||0,d=(l.toString().split(".")[1]||"").length,u=parseFloat((h+l*a).toFixed(d)),b=Math.min(Math.max(u,o),c);i.value=b,i.dispatchEvent(new Event("input",{bubbles:!0})),i.dispatchEvent(new Event("change",{bubbles:!0})),r()}function r(){let a=i.min!==""?parseFloat(i.min):-1/0,o=i.max!==""?parseFloat(i.max):1/0,c=parseFloat(i.value)||0;e.disabled=c<=a,s.disabled=c>=o}e.addEventListener("click",()=>n(-1)),s.addEventListener("click",()=>n(1)),i.addEventListener("input",r),r()}_(ac,lc);var ts='input[type="color"][data-color]';function es(i){if(i.hasAttribute("data-color-init")||i.closest("color-picker"))return;i.setAttribute("data-color-init","");let t=document.createElement("div");t.className="color-wrapper",i.parentNode.insertBefore(t,i),t.appendChild(i);let e=document.createElement("button");e.type="button",e.className="color-display";let s=document.createElement("span");s.className="color-swatch";let n=document.createElement("span");n.className="color-hex",e.appendChild(s),e.appendChild(n),t.appendChild(e);function r(){s.style.background=i.value,n.textContent=i.value}e.addEventListener("click",()=>i.click()),i.addEventListener("input",r),r()}function ur(i=document){i.querySelectorAll(ts).forEach(es)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ur()):ur();var hc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ts)&&es(s),s.querySelectorAll(ts).forEach(es)}});hc.observe(document.documentElement,{childList:!0,subtree:!0});var dc=window.matchMedia("(prefers-reduced-motion: reduce)");function pr(){return dc.matches||document.documentElement.hasAttribute("data-motion-reduced")}var fr=0,X={_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_transitionCleanups:new WeakMap,_observer:null,effect(i,t){this._effects.set(i,t),document.querySelectorAll("[data-effect]").forEach(e=>{(e.getAttribute("data-effect")||"").split(/\s+/).includes(i)&&this._initEffect(e,i)})},trigger(i,t){this._triggers.set(i,t)},transition(i,t){this._transitions.set(i,t)},uid(i){return i.id?i.id:(i._vbUid||(fr++,i._vbUid=`vb-${fr}`),i._vbUid)},theme(i,t){this._themes=this._themes||new Map,this._themes.set(i,t)},applyTheme(i,t=document.documentElement){let e=this._themes?.get(i);if(e)for(let[s,n]of Object.entries(e))t.style.setProperty(s,n)},swap(i){return document.startViewTransition?document.startViewTransition(i):i()},observe(i=document){if(i.querySelectorAll("[data-effect]").forEach(e=>this._processElement(e)),i.querySelectorAll("[data-stagger]").forEach(e=>this._processStagger(e)),i.querySelectorAll("[data-transition]").forEach(e=>this._processTransition(e)),this._observer)return;this._observer=new MutationObserver(e=>{for(let s of e){if(s.type==="childList"){for(let n of s.addedNodes)n.nodeType===Node.ELEMENT_NODE&&this._processTree(n);for(let n of s.removedNodes)n.nodeType===Node.ELEMENT_NODE&&this._cleanupTree(n)}if(s.type==="attributes"){let n=s.target;s.attributeName==="data-effect"&&this._reconcileEffects(n),s.attributeName==="data-trigger"&&this._reconcileTrigger(n),s.attributeName==="data-stagger"&&this._processStagger(n),s.attributeName==="data-transition"&&this._processTransition(n)}}});let t=i===document?document.body:i;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]})},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null)},params(i){let t=getComputedStyle(i);return{get(e){return t.getPropertyValue(`--vb-${e}`).trim()},getNumber(e,s=0){let n=t.getPropertyValue(`--vb-${e}`).trim();return n?parseFloat(n):s},getTime(e,s=0){let n=t.getPropertyValue(`--vb-${e}`).trim();if(!n)return s;let r=parseFloat(n);return Number.isFinite(r)?/s\s*$/.test(n)&&!/ms\s*$/.test(n)?r*1e3:r:s},hasClass(e){return i.classList.contains(e)}}},emit(i,t,e={}){i.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:e}))},prefersReducedMotion:pr,_processTree(i){i.hasAttribute?.("data-effect")&&this._processElement(i),i.hasAttribute?.("data-stagger")&&this._processStagger(i),i.hasAttribute?.("data-transition")&&this._processTransition(i),i.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),i.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),i.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(i){i.hasAttribute?.("data-effect")&&this._cleanupElement(i),i.hasAttribute?.("data-transition")&&this._cleanupTransition(i),i.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),i.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(i){if(i.hasAttribute("data-effect-processed"))return;i.setAttribute("data-effect-processed","");let t=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let e of t)this._initEffect(i,e);this._wireTrigger(i,t)},_initEffect(i,t){let e=this._effects.get(t);if(!e)return;let s=this._instances.get(i);if(s?.has(t))return;pr();let n=e(i);n&&(s||(s=new Map,this._instances.set(i,s)),typeof n=="function"?s.set(t,{cleanup:n}):s.set(t,n))},_wireTrigger(i,t){let e=i.getAttribute("data-trigger");if(!e){this._activateEffects(i);return}let s=e.split(/\s+/).filter(Boolean);for(let n of s){let r=n.indexOf(":"),a=r>-1?n.slice(0,r):n,o=r>-1?n.slice(r+1):null,c=this._triggers.get(a);if(!c)continue;let l=c(i,()=>this._activateEffects(i),o);if(l){let h=this._triggerCleanups.get(i);if(h){let d=h;this._triggerCleanups.set(i,()=>{d(),l()})}else this._triggerCleanups.set(i,l)}}},_activateEffects(i){i.setAttribute("data-effect-active","");let t=this._instances.get(i);if(t)for(let[,e]of t)e.activate&&e.activate()},_cleanupElement(i){let t=this._instances.get(i);if(t){for(let[,s]of t)s.cleanup&&s.cleanup();this._instances.delete(i)}let e=this._triggerCleanups.get(i);e&&(e(),this._triggerCleanups.delete(i))},_reconcileEffects(i){let t=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],e=this._instances.get(i);if(e)for(let[s,n]of e)t.includes(s)||(n.cleanup&&n.cleanup(),e.delete(s));for(let s of t)e?.has(s)||this._initEffect(i,s);i.hasAttribute("data-effect-processed")||(i.setAttribute("data-effect-processed",""),this._wireTrigger(i,t))},_reconcileTrigger(i){let t=this._triggerCleanups.get(i);t&&(t(),this._triggerCleanups.delete(i));let e=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(i,e)},_processStagger(i){let t=i.children;for(let e=0;e<t.length;e++)t[e].style.setProperty("--vb-stagger-index",String(e))},_processTransition(i){if(i.hasAttribute("data-transition-processed"))return;i.setAttribute("data-transition-processed","");let t=i.getAttribute("data-transition");if(!t)return;let e=this._transitions.get(t);if(e){let s=e(i);s&&this._transitionCleanups.set(i,s)}else i.style.viewTransitionName=`${t}-${this.uid(i)}`},_cleanupTransition(i){let t=this._transitionCleanups.get(i);t&&(t(),this._transitionCleanups.delete(i)),i.style.viewTransitionName=""}};typeof window<"u"&&(window.VB=X);function uc(i){let t=i.textContent;i.setAttribute("aria-label",t),i.innerHTML="",t.split(/(\s+)/).forEach((s,n)=>{if(/^\s+$/.test(s)){i.appendChild(document.createTextNode(s));return}let r=document.createElement("span");r.className="vb-reveal-chunk",r.textContent=s,r.style.setProperty("--i",String(Math.floor(n/2))),r.setAttribute("aria-hidden","true"),i.appendChild(r)})}function pc(i){let t=i.textContent;i.setAttribute("aria-label",t);let e=document.createElement("div");e.style.cssText=getComputedStyle(i).cssText,e.style.position="absolute",e.style.visibility="hidden",e.style.whiteSpace="normal",document.body.appendChild(e);let s=t.split(/\s+/).filter(Boolean),n=[],r="";s.forEach(a=>{let o=r?r+" "+a:a;e.textContent=o,e.style.width=getComputedStyle(i).width,e.scrollWidth>e.clientWidth&&r?(n.push(r),r=a):r=o}),r&&n.push(r),document.body.removeChild(e),n.length===0&&n.push(t),i.innerHTML="",n.forEach((a,o)=>{let c=document.createElement("span");c.className="vb-reveal-chunk",c.textContent=a,c.style.setProperty("--i",String(o)),c.setAttribute("aria-hidden","true"),i.appendChild(c),o<n.length-1&&i.appendChild(document.createTextNode(" "))})}X.effect("reveal",i=>{if(i.hasAttribute("data-effect-reveal-init")||(i.setAttribute("data-effect-reveal-init",""),X.prefersReducedMotion()))return;let t=i.classList.contains("line")?"line":"word",e=X.params(i),s=e.get("reveal-delay")||"80ms",n=e.get("reveal-duration")||"400ms";return i.style.setProperty("--reveal-delay",s),i.style.setProperty("--reveal-duration",n),t==="line"?pc(i):uc(i),{activate(){i.setAttribute("data-effect-active","")},cleanup(){}}});X.effect("highlight",i=>{if(i.hasAttribute("data-effect-highlight-init"))return;i.setAttribute("data-effect-highlight-init","");let e=getComputedStyle(i).getPropertyValue("--vb-highlight-color").trim();return e&&i.style.setProperty("--highlight-color",e),X.prefersReducedMotion()&&i.setAttribute("data-effect-active",""),{activate(){i.setAttribute("data-effect-active","")},cleanup(){}}});var is="[data-select-all]";function mr(i=document){i.querySelectorAll(is).forEach(ss)}function ss(i){if(i.hasAttribute("data-select-all-init"))return;i.setAttribute("data-select-all-init","");let t=i.dataset.selectAll??"";if(!t)return;function e(){return(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).querySelectorAll(t)}function s(){let a=e(),o=a.length,c=0;a.forEach(d=>{d.checked&&c++}),c===0?(i.checked=!1,i.indeterminate=!1):c===o?(i.checked=!0,i.indeterminate=!1):(i.checked=!1,i.indeterminate=!0);let h=(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).querySelector("[data-selected-count]");h&&(h.textContent=String(c)),i.dispatchEvent(new CustomEvent("select-all:change",{bubbles:!0,detail:{checked:c,total:o,selected:[...a].filter(d=>d.checked)}}))}let n=!1;i.addEventListener("change",()=>{n=!0;let a=i.checked;e().forEach(c=>{c.checked=a,c.dispatchEvent(new Event("change",{bubbles:!0}))}),n=!1,i.indeterminate=!1,s()}),(i.closest("[data-select-all-scope]")||i.closest("table, form, fieldset")||document).addEventListener("change",a=>{n||a.target!==i&&a.target.matches?.(t)&&s()}),s()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>mr()):mr();var fc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(is)&&ss(s),s.querySelectorAll(is).forEach(n=>ss(n))}});fc.observe(document.documentElement,{childList:!0,subtree:!0});var ns="[data-math], code.language-math";var br=0;window.VBMath=window.VBMath||{equations:[]};function gr(i=document){i.querySelectorAll(ns).forEach(rs)}function mc(i){let t=i.getAttribute("data-math")||"";return new Set(t.split(/\s+/).filter(Boolean))}function rs(i){if(i.hasAttribute("data-math-init"))return;i.setAttribute("data-math-init",""),!i.hasAttribute("data-math")&&i.classList.contains("language-math")&&i.setAttribute("data-math","");let t=mc(i),e=i.getAttribute("data-mathml"),s=i.textContent.trim(),n=t.has("inline");if(!e){i.setAttribute("data-math-state","source");return}let r=n?document.createElement("span"):document.createElement("div");r.setAttribute("data-math-rendered",""),r.innerHTML=e;let a=i.id||null;a&&(r.id=a,i.removeAttribute("id"));let o=r.querySelector("math");o&&!n&&o.setAttribute("display","block");let c=null;t.has("numbered")&&(br++,c=br,r.setAttribute("data-math-numbered",""),r.setAttribute("data-equation-number",String(c)),a&&window.VBMath?.equations.push({id:a,number:c,latex:s})),t.has("copyable")&&(r.setAttribute("data-math-copyable",""),r.style.cursor="copy",r.addEventListener("click",async()=>{try{await navigator.clipboard.writeText(s),gc("Copied to clipboard",r)}catch{}})),i.setAttribute("data-math-state","rendered"),i.insertAdjacentElement("afterend",r);let l=i.closest("pre");l?(l.setAttribute("data-math-state","rendered"),l.hidden=!0):i.hidden=!0,bc(),i.dispatchEvent(new CustomEvent("math:rendered",{bubbles:!0,detail:{latex:s,inline:n,number:c}}))}function bc(){if(document.querySelector("[data-vb-math-font]"))return;let i=document.createElement("link");i.rel="stylesheet",i.href="/fonts/math-fonts.css",i.setAttribute("data-vb-math-font",""),document.head.appendChild(i)}function gc(i,t){let e=document.createElement("div");e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.className="sr-only",e.textContent=i,t.appendChild(e),setTimeout(()=>e.remove(),1e3)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>gr()):gr();var yc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(ns)&&rs(s),s.querySelectorAll(ns).forEach(rs)}});yc.observe(document.documentElement,{childList:!0,subtree:!0});var vc=CSS.supports("anchor-name","--test"),wc=new Set(["BUTTON","A","AREA"]);function Ec(i){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?wc.has(i.tagName):!1}function as(i,t){if(Ec(i)){i.setAttribute("interestfor",t.id),t.addEventListener("toggle",l=>{l.newState==="open"&&de(i,t)});return}let e=null,s=null,n=t,r=()=>{clearTimeout(s),e=setTimeout(()=>{n.showPopover(),de(i,t)},200)},a=()=>{clearTimeout(e),s=setTimeout(()=>{n.hidePopover()},100)},o=()=>{clearTimeout(s),n.showPopover(),de(i,t)},c=()=>{clearTimeout(e),n.hidePopover()};i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",a),i.addEventListener("focus",o),i.addEventListener("blur",c),t.addEventListener("mouseenter",()=>clearTimeout(s)),t.addEventListener("mouseleave",a)}function os(i,t){if(!vc)return;let e=`--tooltip-anchor-${t.id}`;i.style.anchorName=e,t.style.positionAnchor=e,t.setAttribute("data-anchor","")}function Ac(i){let t=i.getAttribute("title");if(!t)return;i.removeAttribute("title");let e=document.createElement("div");e.setAttribute("role","tooltip"),e.setAttribute("popover","hint"),e.id=`tooltip-${crypto.randomUUID().slice(0,8)}`,e.textContent=t;let s=i.dataset.tooltipPosition||"top";e.dataset.tooltipPosition=s;let n=document.createElement("span");n.className="tooltip-arrow",n.setAttribute("aria-hidden","true"),e.appendChild(n),i.after(e),i.setAttribute("aria-describedby",e.id),os(i,e),as(i,e)}function Sc(i,t){let e=document.getElementById(t);e?.hasAttribute("popover")&&(i.hasAttribute("title")&&i.removeAttribute("title"),i.hasAttribute("aria-describedby")||i.setAttribute("aria-describedby",t),os(i,e),as(i,e))}function yr(i=document){i.querySelectorAll("[data-tooltip]").forEach(t=>{if(t.closest("tool-tip")||t.hasAttribute("data-tooltip-init"))return;t.setAttribute("data-tooltip-init","");let e=t.dataset.tooltip;e?Sc(t,e):Ac(t)}),i.querySelectorAll("[aria-describedby]").forEach(t=>{let e=t.getAttribute("aria-describedby")??"",s=document.getElementById(e);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||t.closest("tool-tip")||t.hasAttribute("data-tooltip-init")||(t.setAttribute("data-tooltip-init",""),os(t,s),as(t,s))}),i.querySelectorAll("[popovertarget]").forEach(t=>{let e=t.getAttribute("popovertarget")??"",s=document.getElementById(e);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||s.hasAttribute("data-tooltip-click-init")||(s.setAttribute("data-tooltip-click-init",""),s.addEventListener("toggle",n=>{n.newState==="open"&&de(t,s)}))})}function de(i,t){if(t.hasAttribute("data-anchor"))return;let e=i.getBoundingClientRect(),s=t.dataset.tooltipPosition||"top",n=8,r=t.getBoundingClientRect(),a,o;switch(s){case"bottom":a=e.bottom+n,o=e.left+(e.width-r.width)/2;break;case"left":a=e.top+(e.height-r.height)/2,o=e.left-r.width-n;break;case"right":a=e.top+(e.height-r.height)/2,o=e.right+n;break;default:a=e.top-r.height-n,o=e.left+(e.width-r.width)/2;break}let c=8;o=Math.max(c,Math.min(o,window.innerWidth-r.width-c)),a=Math.max(c,Math.min(a,window.innerHeight-r.height-c)),t.style.top=`${a}px`,t.style.left=`${o}px`}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>yr()):yr();var cs="[data-vt-name]";function ls(i){i.hasAttribute("data-vt-name-init")||(i.setAttribute("data-vt-name-init",""),i.style.viewTransitionName=i.dataset.vtName)}function vr(i=document){i.querySelectorAll(cs).forEach(ls)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>vr()):vr();var Cc=new MutationObserver(i=>{for(let t of i)for(let e of t.addedNodes){if(e.nodeType!==Node.ELEMENT_NODE)continue;let s=e;s.matches(cs)&&ls(s),s.querySelectorAll(cs).forEach(ls)}});Cc.observe(document.documentElement,{childList:!0,subtree:!0});function wr(i){document.querySelectorAll("browser-window").forEach(t=>{t.setAttribute("mode",i)}),document.querySelectorAll("code-block").forEach(t=>{t.setAttribute("theme",i)})}function Er(){let{effectiveMode:i}=S.getState();wr(i),window.addEventListener("vb:theme-change",e=>{wr(e.detail.effectiveMode)}),new MutationObserver(e=>{let{effectiveMode:s}=S.getState();for(let n of e)for(let r of n.addedNodes){if(r.nodeType!==Node.ELEMENT_NODE)continue;let a=r;a.tagName==="BROWSER-WINDOW"?a.setAttribute("mode",s):a.tagName==="CODE-BLOCK"&&a.setAttribute("theme",s),a.querySelectorAll("browser-window").forEach(o=>{o.setAttribute("mode",s)}),a.querySelectorAll("code-block").forEach(o=>{o.setAttribute("theme",s)})}}).observe(document.body,{childList:!0,subtree:!0})}kt();function It(i){return[...i.querySelectorAll("input, select, textarea")].filter(t=>t.type!=="submit"&&t.type!=="button"&&t.type!=="hidden"&&!("honeypot"in t.dataset))}function Cr(i){return[...i.querySelectorAll("form-field[data-upgraded]")]}function kc(i){return i.labels?.[0]?.textContent?.trim()??i.getAttribute("aria-label")??i.name??i.id}function $t(i,t){let e=i.dataset.match;if(!e)return;let s=t.querySelector(`#${CSS.escape(e)}`)??t.querySelector(`[name="${CSS.escape(e)}"]`);if(s){if(i.setCustomValidity(""),i.value&&s.value&&i.value!==s.value){let n=i.dataset.messageMatch??"Values do not match";i.setCustomValidity(n);let r=Ar(i);r&&(r.textContent=n)}else if(i.validity.valid){let n=Ar(i);n&&(n.textContent="")}}}function Ar(i){let t=i.getAttribute("aria-describedby")?.split(/\s+/)??[];for(let s of t){let n=document.getElementById(s);if(n?.tagName==="OUTPUT"&&n.classList.contains("error"))return n}return i.closest("form-field")?.querySelector("output.error")??null}function Sr(i){let e=[...i.querySelectorAll('input[type="checkbox"]')].filter(o=>o.checked).length,s=parseInt(i.dataset.minChecked??"0",10),n=parseInt(i.dataset.maxChecked??"999",10),r=i.querySelector(":scope > output"),a=null;return e<s&&(a=i.dataset.messageMinChecked??`Select at least ${s}`),e>n&&(a=i.dataset.messageMaxChecked??`Select no more than ${n}`),r&&(r.textContent=a??""),a?i.dataset.invalid="":delete i.dataset.invalid,!a}function kr(i){let t=i.querySelector("[data-form-summary]");if(t)return{el:t,type:"authored"};let e=i.querySelector("output.error-summary");return e?{el:e,type:"legacy"}:null}function ue(i,t,{focus:e=!1}={}){if(!t)return;let s=[];for(let n of It(i))n.validity.valid||s.push({id:n.id||n.name,label:kc(n),message:n.validationMessage});for(let n of i.querySelectorAll("fieldset[data-invalid]")){let r=n.querySelector(":scope > output");s.push({id:n.id||"",label:n.querySelector("legend")?.textContent?.trim()??"Group",message:r?.textContent||"Invalid selection"})}if(s.length===0){xr(t);return}if(t.type==="authored"){let n=t.el.querySelector("[data-summary-list]");if(n){n.innerHTML="";for(let r of s){let a=document.createElement("li"),o=document.createElement("a");o.href=r.id?`#${r.id}`:"#",o.textContent=`${r.label}: ${r.message}`,a.appendChild(o),n.appendChild(a)}}t.el.removeAttribute("hidden"),t.el.dataset.visible=""}else{let n=s.length,r=s.map(a=>`<li><a href="${a.id?`#${a.id}`:"#"}">${a.label}: ${a.message}</a></li>`).join(`
322
394
  `);t.el.innerHTML=`<p>Please fix ${n} error${n===1?"":"s"}:</p>
323
395
  <ul>
324
396
  ${r}
325
- </ul>`}e&&t.el.focus()}function rn(s){if(s)if(s.type==="authored"){delete s.el.dataset.visible;let t=s.el.querySelector("[data-summary-list]");t&&s.el.addEventListener("transitionend",()=>{s.el.dataset.visible||(t.innerHTML="")},{once:!0})}else s.el.innerHTML=""}function ma(s){s&&s.el.addEventListener("click",t=>{let e=t.target.closest('a[href^="#"]');if(!e)return;t.preventDefault();let i=e.getAttribute("href").slice(1),n=document.getElementById(i);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus())})}function ba(s){for(let t of ct(s))t.focus({preventScroll:!0}),t.blur()}async function ga(s){let t=s.querySelector('[type="submit"]');s.dataset.submitting="",delete s.dataset.error,t&&t.setAttribute("aria-disabled","true");try{let e=new FormData(s),i=await fetch(s.action,{method:s.method||"post",body:e});if(delete s.dataset.submitting,t&&t.removeAttribute("aria-disabled"),!i.ok){if((i.headers.get("content-type")??"").includes("application/json")){let a=await i.json();if(a.errors){va(s,a.errors);return}}throw new Error(`Server error: ${i.status}`)}s.dataset.success="";let n=s.querySelector("[data-form-success]");n&&(n.hidden=!1,n.focus())}catch{delete s.dataset.submitting,t&&t.removeAttribute("aria-disabled"),s.dataset.error="network"}}function va(s,t){s.dataset.error="";let e=sn(s),i=[];for(let n of e){let r=n.querySelector("input, textarea, select");if(!r)continue;let a=t[r.name];a&&(n.setError(a),i.push(n))}if(i.length>0){let n=nn(s);Bt(s,n,{focus:!0})}for(let n of e)n.querySelector("input, textarea, select")?.addEventListener("input",()=>n.clearError(),{once:!0})}function hs(s){if(s.hasAttribute("data-vb-enhanced"))return;s.setAttribute("novalidate",""),s.setAttribute("data-vb-enhanced","");let t=nn(s);t&&ma(t);for(let e of ct(s))if(e.dataset.match){e.addEventListener("input",()=>ot(e,s)),e.addEventListener("blur",()=>ot(e,s));let i=e.dataset.match,n=s.querySelector(`#${CSS.escape(i)}`)??s.querySelector(`[name="${CSS.escape(i)}"]`);n&&n.addEventListener("input",()=>ot(e,s))}for(let e of s.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))e.addEventListener("change",()=>{en(e),t&&Bt(s,t)});s.addEventListener("submit",e=>{e.preventDefault();let i=sn(s);for(let o of i)o.validate();for(let o of ct(s))o.dataset.match&&ot(o,s);for(let o of s.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))en(o);if(ba(s),!(s.checkValidity()&&![...s.querySelectorAll("fieldset[data-invalid]")].length)){if(t)Bt(s,t,{focus:!0});else{let o=s.querySelector(":invalid");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),o.focus())}return}rn(t);let r=new CustomEvent("vb:beforesubmit",{bubbles:!0,cancelable:!0,detail:{form:s}});if(s.dispatchEvent(r),r.defaultPrevented)return;let a=s.dataset.submit??"native";if(a==="fetch")ga(s);else if(a==="event"){let o=new CustomEvent("vb:submit",{bubbles:!0,cancelable:!0,detail:new FormData(s)});s.dispatchEvent(o)}else s.submit()}),t&&s.addEventListener("input",()=>{requestAnimationFrame(()=>{for(let e of ct(s))e.dataset.match&&ot(e,s);Bt(s,t)})})}function an(){for(let t of document.querySelectorAll("form[data-validate]"))hs(t);new MutationObserver(t=>{for(let e of t)for(let i of e.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let n=i;n.matches?.("form[data-validate]")&&hs(n),n.querySelectorAll?.("form[data-validate]").forEach(r=>hs(r))}}).observe(document.body,{childList:!0,subtree:!0})}var on='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>',ya='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>';function ds(s){let t=s.querySelector('input[type="password"]');if(!t||s.dataset.enhanced==="password")return;s.dataset.enhanced="password";let e=document.createElement("div");e.className="password-wrapper",t.parentNode.insertBefore(e,t),e.appendChild(t);let i=document.createElement("button");i.type="button",i.className="password-toggle",i.setAttribute("aria-label","Show password"),i.setAttribute("aria-pressed","false"),i.innerHTML=on,e.appendChild(i),i.addEventListener("click",()=>{let n=t.type==="password";t.type=n?"text":"password",i.setAttribute("aria-pressed",String(n)),i.setAttribute("aria-label",n?"Hide password":"Show password"),i.innerHTML=n?ya:on})}function us(s){let t=s.querySelector('input[data-type="otp"], input[data-type="pin"]');if(!t||s.dataset.enhanced==="otp")return;s.dataset.enhanced="otp";let e=parseInt(t.dataset.length||"6",10);t.type="hidden",t.removeAttribute("inputmode"),t.removeAttribute("pattern");let i=document.createElement("div");i.className="otp-wrapper",t.parentNode.insertBefore(i,t.nextSibling);let n=[];for(let a=0;a<e;a++){let o=document.createElement("input");o.type="text",o.inputMode="numeric",o.maxLength=1,o.pattern="[0-9]",o.className="otp-digit",o.setAttribute("aria-label",`Digit ${a+1} of ${e}`),n.push(o),i.appendChild(o)}function r(){t.value=n.map(a=>a.value).join(""),t.dispatchEvent(new Event("input",{bubbles:!0}))}n.forEach((a,o)=>{a.addEventListener("input",c=>{let l=c.target.value;if(l&&!/^\d$/.test(l)){c.target.value="";return}l&&o<n.length-1&&n[o+1].focus(),r()}),a.addEventListener("keydown",c=>{c.key==="Backspace"&&!c.target.value&&o>0&&n[o-1].focus(),c.key==="ArrowLeft"&&o>0&&(c.preventDefault(),n[o-1].focus()),c.key==="ArrowRight"&&o<n.length-1&&(c.preventDefault(),n[o+1].focus())}),a.addEventListener("paste",c=>{c.preventDefault();let h=((c.clipboardData||window.clipboardData)?.getData("text")??"").replace(/\D/g,"").slice(0,e).split("");h.forEach((u,m)=>{n[m]&&(n[m].value=u)});let d=n.findIndex(u=>!u.value);d!==-1?n[d].focus():h.length>0&&n[Math.min(h.length-1,e-1)].focus(),r()}),a.addEventListener("focus",()=>{a.select()})}),s.addEventListener("click",a=>{a.target===s&&n[0].focus()})}function ps(s){let t=s.querySelector("input[data-strength]");if(!t||s.dataset.enhanced==="strength")return;s.dataset.enhanced="strength";let e=t.dataset.rules||"length:8",i=Ea(e),n=document.createElement("div");n.className="strength-meter";let r=document.createElement("meter");r.min=0,r.max=i.length,r.low=Math.ceil(i.length*.4),r.high=Math.ceil(i.length*.75),r.optimum=i.length,r.value=0,r.className="xs";let a=document.createElement("span");a.className="strength-label",a.textContent="",n.appendChild(r),n.appendChild(a);let o=document.createElement("ul");o.className="strength-rules",o.setAttribute("aria-label","Password requirements"),i.forEach(l=>{let h=document.createElement("li");h.dataset.rule=l.type,h.textContent=l.label,o.appendChild(h)}),(s.querySelector(".password-wrapper")||t).insertAdjacentElement("afterend",n),n.insertAdjacentElement("afterend",o),t.addEventListener("input",()=>{let l=t.value,h=0;i.forEach((u,m)=>{let y=wa(u,l),p=o.children[m];p.dataset.met=y?"":void 0,y?(p.setAttribute("data-met",""),h++):p.removeAttribute("data-met")}),r.value=h;let d=h/i.length;l.length===0?(a.textContent="",n.dataset.level=""):d<.4?(a.textContent="Weak",n.dataset.level="weak"):d<.75?(a.textContent="Fair",n.dataset.level="fair"):d<1?(a.textContent="Good",n.dataset.level="good"):(a.textContent="Strong",n.dataset.level="strong")})}function Ea(s){return s.split(",").map(t=>{let[e,i]=t.trim().split(":");switch(e){case"length":return{type:e,param:parseInt(i)||8,label:`At least ${i||8} characters`};case"uppercase":return{type:e,label:"One uppercase letter"};case"lowercase":return{type:e,label:"One lowercase letter"};case"number":return{type:e,label:"One number"};case"special":return{type:e,label:"One special character"};default:return{type:e,label:e}}})}function wa(s,t){switch(s.type){case"length":return t.length>=(s.param||8);case"uppercase":return/[A-Z]/.test(t);case"lowercase":return/[a-z]/.test(t);case"number":return/\d/.test(t);case"special":return/[^A-Za-z0-9]/.test(t);default:return!1}}function Aa(){document.querySelectorAll('form-field:has(input[type="password"])').forEach(ds)}function Sa(){document.querySelectorAll('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])').forEach(us)}function xa(){document.querySelectorAll("form-field:has(input[data-strength])").forEach(ps)}function cn(){Aa(),Sa(),xa(),new MutationObserver(t=>{for(let e of t)for(let i of e.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let n=i;n.matches?.('form-field:has(input[type="password"])')&&ds(n),(n.matches?.('form-field:has(input[data-type="otp"])')||n.matches?.('form-field:has(input[data-type="pin"])'))&&us(n),n.matches?.("form-field:has(input[data-strength])")&&ps(n),n.querySelectorAll?.('form-field:has(input[type="password"])')?.forEach(ds),n.querySelectorAll?.('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])')?.forEach(us),n.querySelectorAll?.("form-field:has(input[data-strength])")?.forEach(ps)}}).observe(document.body,{childList:!0,subtree:!0})}function Ca(s){let t=Date.now(),e=s*7+t%9973&65535;return btoa(JSON.stringify({s,t,c:e}))}function ka(s,t,e){let i=0,n=s.submitAt-(s.firstInteractionAt??s.submitAt),r=t.querySelector("[data-honeypot]");return r&&r.value.trim()&&(i+=80),[...t.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], textarea')].filter(o=>o.value.trim()&&!("honeypot"in o.dataset)).length>0&&s.keyboardEventCount===0&&(i+=30),s.fieldFocusCount===0&&(i+=40),!e&&!s.mouseMovedInForm&&(i+=20),n<1e3?i+=80:n<3e3&&(i+=50),Math.min(i,100)}function Ta(s){return new Promise((t,e)=>{let i=document.createElement("script");i.src=s,i.async=!0,i.onload=t,i.onerror=e,document.head.appendChild(i)})}async function La(s,t){if(!document.querySelector("[data-cf-turnstile-loaded]"))try{await Ta("https://challenges.cloudflare.com/turnstile/v0/api.js"),document.head.dataset.cfTurnstileLoaded="";let e=document.createElement("div");e.className="cf-turnstile",e.dataset.sitekey=t,e.dataset.size="invisible",s.appendChild(e)}catch{}}function fs(s){if(s.hasAttribute("data-bot-enhanced"))return;s.setAttribute("data-bot-enhanced","");let t={fieldFocusCount:0,keyboardEventCount:0,mouseMovedInForm:!1,firstInteractionAt:null,submitAt:null},e=navigator.maxTouchPoints>0;s.addEventListener("focusin",i=>{i.target.matches("input, textarea, select")&&!("honeypot"in i.target.dataset)&&(t.fieldFocusCount++,t.firstInteractionAt??=Date.now())},{capture:!0}),s.addEventListener("keydown",i=>{i.target.matches("input, textarea")&&t.keyboardEventCount++},{capture:!0}),e||s.addEventListener("mousemove",()=>{t.mouseMovedInForm=!0},{once:!0}),s.addEventListener("vb:beforesubmit",i=>{t.submitAt=Date.now();let n=ka(t,s,e),r=s.querySelector("[data-bot-score-field]");if(r||(r=document.createElement("input"),r.type="hidden",r.name="_vb_score",r.dataset.botScoreField="",s.appendChild(r)),r.value=Ca(n),n>=80){i.preventDefault(),s.dispatchEvent(new CustomEvent("vb:botblocked",{bubbles:!0,detail:{score:n}}));return}n>=60&&s.dataset.turnstileSitekey&&La(s,s.dataset.turnstileSitekey)})}function ln(){for(let t of document.querySelectorAll("form[data-bot-protection]"))fs(t);new MutationObserver(t=>{for(let e of t)for(let i of e.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let n=i;n.matches?.("form[data-bot-protection]")&&fs(n),n.querySelectorAll?.("form[data-bot-protection]").forEach(r=>fs(r))}}).observe(document.body,{childList:!0,subtree:!0})}await E.init();document.documentElement.hasAttribute("data-sticky")&&Ee();Qi();an();cn();ln();document.querySelector("[data-wizard]")&&Promise.resolve().then(()=>(un(),dn));
397
+ </ul>`}e&&t.el.focus()}function xr(i){if(i)if(i.type==="authored"){delete i.el.dataset.visible;let t=i.el.querySelector("[data-summary-list]");t&&i.el.addEventListener("transitionend",()=>{i.el.dataset.visible||(t.innerHTML="")},{once:!0})}else i.el.innerHTML=""}function xc(i){i&&i.el.addEventListener("click",t=>{let e=t.target.closest('a[href^="#"]');if(!e)return;t.preventDefault();let s=e.getAttribute("href").slice(1),n=document.getElementById(s);n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),n.focus())})}function Tc(i){for(let t of It(i))t.focus({preventScroll:!0}),t.blur()}async function Lc(i){let t=i.querySelector('[type="submit"]');i.dataset.submitting="",delete i.dataset.error,t&&t.setAttribute("aria-disabled","true");try{let e=new FormData(i),s=await fetch(i.action,{method:i.method||"post",body:e});if(delete i.dataset.submitting,t&&t.removeAttribute("aria-disabled"),!s.ok){if((s.headers.get("content-type")??"").includes("application/json")){let a=await s.json();if(a.errors){Mc(i,a.errors);return}}throw new Error(`Server error: ${s.status}`)}i.dataset.success="";let n=i.querySelector("[data-form-success]");n&&(n.hidden=!1,n.focus())}catch{delete i.dataset.submitting,t&&t.removeAttribute("aria-disabled"),i.dataset.error="network"}}function Mc(i,t){i.dataset.error="";let e=Cr(i),s=[];for(let n of e){let r=n.querySelector("input, textarea, select");if(!r)continue;let a=t[r.name];a&&(n.setError(a),s.push(n))}if(s.length>0){let n=kr(i);ue(i,n,{focus:!0})}for(let n of e)n.querySelector("input, textarea, select")?.addEventListener("input",()=>n.clearError(),{once:!0})}function hs(i){if(i.hasAttribute("data-vb-enhanced"))return;i.setAttribute("novalidate",""),i.setAttribute("data-vb-enhanced","");let t=kr(i);t&&xc(t);for(let e of It(i))if(e.dataset.match){e.addEventListener("input",()=>$t(e,i)),e.addEventListener("blur",()=>$t(e,i));let s=e.dataset.match,n=i.querySelector(`#${CSS.escape(s)}`)??i.querySelector(`[name="${CSS.escape(s)}"]`);n&&n.addEventListener("input",()=>$t(e,i))}for(let e of i.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))e.addEventListener("change",()=>{Sr(e),t&&ue(i,t)});i.addEventListener("submit",e=>{e.preventDefault();let s=Cr(i);for(let o of s)o.validate();for(let o of It(i))o.dataset.match&&$t(o,i);for(let o of i.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]"))Sr(o);if(Tc(i),!(i.checkValidity()&&![...i.querySelectorAll("fieldset[data-invalid]")].length)){if(t)ue(i,t,{focus:!0});else{let o=i.querySelector(":invalid");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),o.focus())}return}xr(t);let r=new CustomEvent("vb:beforesubmit",{bubbles:!0,cancelable:!0,detail:{form:i}});if(i.dispatchEvent(r),r.defaultPrevented)return;let a=i.dataset.submit??"native";if(a==="fetch")Lc(i);else if(a==="event"){let o=new CustomEvent("vb:submit",{bubbles:!0,cancelable:!0,detail:new FormData(i)});i.dispatchEvent(o)}else i.submit()}),t&&i.addEventListener("input",()=>{requestAnimationFrame(()=>{for(let e of It(i))e.dataset.match&&$t(e,i);ue(i,t)})})}function Tr(){for(let t of document.querySelectorAll("form[data-validate]"))hs(t);new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-validate]")&&hs(n),n.querySelectorAll?.("form[data-validate]").forEach(r=>hs(r))}}).observe(document.body,{childList:!0,subtree:!0})}var Lr='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/></svg>',Nc='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/></svg>';function ds(i){let t=i.querySelector('input[type="password"]');if(!t||i.dataset.enhanced==="password")return;i.dataset.enhanced="password";let e=document.createElement("div");e.className="password-wrapper",t.parentNode.insertBefore(e,t),e.appendChild(t);let s=document.createElement("button");s.type="button",s.className="password-toggle",s.setAttribute("aria-label","Show password"),s.setAttribute("aria-pressed","false"),s.innerHTML=Lr,e.appendChild(s),s.addEventListener("click",()=>{let n=t.type==="password";t.type=n?"text":"password",s.setAttribute("aria-pressed",String(n)),s.setAttribute("aria-label",n?"Hide password":"Show password"),s.innerHTML=n?Nc:Lr})}function us(i){let t=i.querySelector('input[data-type="otp"], input[data-type="pin"]');if(!t||i.dataset.enhanced==="otp")return;i.dataset.enhanced="otp";let e=parseInt(t.dataset.length||"6",10);t.type="hidden",t.removeAttribute("inputmode"),t.removeAttribute("pattern");let s=document.createElement("div");s.className="otp-wrapper",t.parentNode.insertBefore(s,t.nextSibling);let n=[];for(let a=0;a<e;a++){let o=document.createElement("input");o.type="text",o.inputMode="numeric",o.maxLength=1,o.pattern="[0-9]",o.className="otp-digit",o.setAttribute("aria-label",`Digit ${a+1} of ${e}`),n.push(o),s.appendChild(o)}function r(){t.value=n.map(a=>a.value).join(""),t.dispatchEvent(new Event("input",{bubbles:!0}))}n.forEach((a,o)=>{a.addEventListener("input",c=>{let l=c.target.value;if(l&&!/^\d$/.test(l)){c.target.value="";return}l&&o<n.length-1&&n[o+1].focus(),r()}),a.addEventListener("keydown",c=>{c.key==="Backspace"&&!c.target.value&&o>0&&n[o-1].focus(),c.key==="ArrowLeft"&&o>0&&(c.preventDefault(),n[o-1].focus()),c.key==="ArrowRight"&&o<n.length-1&&(c.preventDefault(),n[o+1].focus())}),a.addEventListener("paste",c=>{c.preventDefault();let h=((c.clipboardData||window.clipboardData)?.getData("text")??"").replace(/\D/g,"").slice(0,e).split("");h.forEach((u,b)=>{n[b]&&(n[b].value=u)});let d=n.findIndex(u=>!u.value);d!==-1?n[d].focus():h.length>0&&n[Math.min(h.length-1,e-1)].focus(),r()}),a.addEventListener("focus",()=>{a.select()})}),i.addEventListener("click",a=>{a.target===i&&n[0].focus()})}function ps(i){let t=i.querySelector("input[data-strength]");if(!t||i.dataset.enhanced==="strength")return;i.dataset.enhanced="strength";let e=t.dataset.rules||"length:8",s=Dc(e),n=document.createElement("div");n.className="strength-meter";let r=document.createElement("meter");r.min=0,r.max=s.length,r.low=Math.ceil(s.length*.4),r.high=Math.ceil(s.length*.75),r.optimum=s.length,r.value=0,r.className="xs";let a=document.createElement("span");a.className="strength-label",a.textContent="",n.appendChild(r),n.appendChild(a);let o=document.createElement("ul");o.className="strength-rules",o.setAttribute("aria-label","Password requirements"),s.forEach(l=>{let h=document.createElement("li");h.dataset.rule=l.type,h.textContent=l.label,o.appendChild(h)}),(i.querySelector(".password-wrapper")||t).insertAdjacentElement("afterend",n),n.insertAdjacentElement("afterend",o),t.addEventListener("input",()=>{let l=t.value,h=0;s.forEach((u,b)=>{let y=_c(u,l),p=o.children[b];p.dataset.met=y?"":void 0,y?(p.setAttribute("data-met",""),h++):p.removeAttribute("data-met")}),r.value=h;let d=h/s.length;l.length===0?(a.textContent="",n.dataset.level=""):d<.4?(a.textContent="Weak",n.dataset.level="weak"):d<.75?(a.textContent="Fair",n.dataset.level="fair"):d<1?(a.textContent="Good",n.dataset.level="good"):(a.textContent="Strong",n.dataset.level="strong")})}function Dc(i){return i.split(",").map(t=>{let[e,s]=t.trim().split(":");switch(e){case"length":return{type:e,param:parseInt(s)||8,label:`At least ${s||8} characters`};case"uppercase":return{type:e,label:"One uppercase letter"};case"lowercase":return{type:e,label:"One lowercase letter"};case"number":return{type:e,label:"One number"};case"special":return{type:e,label:"One special character"};default:return{type:e,label:e}}})}function _c(i,t){switch(i.type){case"length":return t.length>=(i.param||8);case"uppercase":return/[A-Z]/.test(t);case"lowercase":return/[a-z]/.test(t);case"number":return/\d/.test(t);case"special":return/[^A-Za-z0-9]/.test(t);default:return!1}}function qc(){document.querySelectorAll('form-field:has(input[type="password"])').forEach(ds)}function $c(){document.querySelectorAll('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])').forEach(us)}function Ic(){document.querySelectorAll("form-field:has(input[data-strength])").forEach(ps)}function Mr(){qc(),$c(),Ic(),new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.('form-field:has(input[type="password"])')&&ds(n),(n.matches?.('form-field:has(input[data-type="otp"])')||n.matches?.('form-field:has(input[data-type="pin"])'))&&us(n),n.matches?.("form-field:has(input[data-strength])")&&ps(n),n.querySelectorAll?.('form-field:has(input[type="password"])')?.forEach(ds),n.querySelectorAll?.('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])')?.forEach(us),n.querySelectorAll?.("form-field:has(input[data-strength])")?.forEach(ps)}}).observe(document.body,{childList:!0,subtree:!0})}function Oc(i){let t=Date.now(),e=i*7+t%9973&65535;return btoa(JSON.stringify({s:i,t,c:e}))}function Bc(i,t,e){let s=0,n=i.submitAt-(i.firstInteractionAt??i.submitAt),r=t.querySelector("[data-honeypot]");return r&&r.value.trim()&&(s+=80),[...t.querySelectorAll('input[type="text"], input[type="email"], input[type="tel"], textarea')].filter(o=>o.value.trim()&&!("honeypot"in o.dataset)).length>0&&i.keyboardEventCount===0&&(s+=30),i.fieldFocusCount===0&&(s+=40),!e&&!i.mouseMovedInForm&&(s+=20),n<1e3?s+=80:n<3e3&&(s+=50),Math.min(s,100)}function Pc(i){return new Promise((t,e)=>{let s=document.createElement("script");s.src=i,s.async=!0,s.onload=t,s.onerror=e,document.head.appendChild(s)})}async function Fc(i,t){if(!document.querySelector("[data-cf-turnstile-loaded]"))try{await Pc("https://challenges.cloudflare.com/turnstile/v0/api.js"),document.head.dataset.cfTurnstileLoaded="";let e=document.createElement("div");e.className="cf-turnstile",e.dataset.sitekey=t,e.dataset.size="invisible",i.appendChild(e)}catch{}}function fs(i){if(i.hasAttribute("data-bot-enhanced"))return;i.setAttribute("data-bot-enhanced","");let t={fieldFocusCount:0,keyboardEventCount:0,mouseMovedInForm:!1,firstInteractionAt:null,submitAt:null},e=navigator.maxTouchPoints>0;i.addEventListener("focusin",s=>{s.target.matches("input, textarea, select")&&!("honeypot"in s.target.dataset)&&(t.fieldFocusCount++,t.firstInteractionAt??=Date.now())},{capture:!0}),i.addEventListener("keydown",s=>{s.target.matches("input, textarea")&&t.keyboardEventCount++},{capture:!0}),e||i.addEventListener("mousemove",()=>{t.mouseMovedInForm=!0},{once:!0}),i.addEventListener("vb:beforesubmit",s=>{t.submitAt=Date.now();let n=Bc(t,i,e),r=i.querySelector("[data-bot-score-field]");if(r||(r=document.createElement("input"),r.type="hidden",r.name="_vb_score",r.dataset.botScoreField="",i.appendChild(r)),r.value=Oc(n),n>=80){s.preventDefault(),i.dispatchEvent(new CustomEvent("vb:botblocked",{bubbles:!0,detail:{score:n}}));return}n>=60&&i.dataset.turnstileSitekey&&Fc(i,i.dataset.turnstileSitekey)})}function Nr(){for(let t of document.querySelectorAll("form[data-bot-protection]"))fs(t);new MutationObserver(t=>{for(let e of t)for(let s of e.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-bot-protection]")&&fs(n),n.querySelectorAll?.("form[data-bot-protection]").forEach(r=>fs(r))}}).observe(document.body,{childList:!0,subtree:!0})}ot();ot();var Xc=1e3,Br=new Map;function gs(i,t){return e=>{let s=JSON.stringify(e.detail??null),n=Br.get(i),r=Date.now();n&&n.key===s&&r-n.at<Xc||(Br.set(i,{key:s,at:r}),t(e))}}var Jc={"vb:submit":i=>g.track("form.submit_valid",{formId:i.detail?.formId}),"wizard:step-change":i=>g.track("form.wizard_step",{from:i.detail?.from,to:i.detail?.to,direction:i.detail?.direction}),"wizard:complete":i=>g.track("form.wizard_complete",{steps:i.detail?.steps}),"wizard:reset":()=>g.track("form.wizard_reset"),"data-table:sort":i=>g.track("table.sort",{column:i.detail?.column,direction:i.detail?.direction,columnName:i.detail?.columnName}),"data-table:filter":i=>g.track("table.filter",{column:i.detail?.column,hasValue:!!i.detail?.value,length:i.detail?.value?.length??0}),"data-table:page":i=>g.track("table.paginate",{page:i.detail?.page}),"vb:theme-change":gs("vb:theme-change",i=>g.track("ui.theme_change",{theme:i.detail?.brand??i.detail?.theme,mode:i.detail?.mode})),"vb:a11y-themes-change":gs("vb:a11y-themes-change",i=>g.track("ui.a11y_theme",{themes:i.detail})),"vb:extensions-change":gs("vb:extensions-change",i=>g.track("ui.extension_toggle",{extensions:i.detail})),"heading-links:navigate":i=>g.track("docs.anchor_navigate",{id:i.detail?.id}),"page-toc:navigate":i=>g.track("docs.toc_navigate",{id:i.detail?.id}),"site-search:open":()=>g.track("search.open"),"site-search:close":i=>g.track("search.close",{hasQuery:i.detail?.hasQuery}),"theme-composer:change":i=>g.track("theme.compose",{dimension:i.detail?.dimension,source:i.detail?.source,token:i.detail?.token})},Zc={"accordion-wc:toggle":i=>g.track("ui.accordion_toggle",{open:i.detail?.open,index:i.detail?.index}),"tab-set:change":i=>g.track("ui.tab_change",{tab:i.detail?.tab}),"carousel-wc:change":i=>g.track("ui.carousel_slide",{index:i.detail?.index}),"carousel-wc:play":()=>g.track("ui.carousel_play"),"carousel-wc:pause":()=>g.track("ui.carousel_pause"),"data-table:expand":i=>g.track("table.row_expand",{row:i.detail?.row}),"data-table:selection":i=>g.track("table.row_select",{count:i.detail?.count??i.detail?.rows?.length??0}),"theme-picker:open":()=>g.track("ui.theme_picker_open"),"theme-picker:close":()=>g.track("ui.theme_picker_close"),"color-palette:select":i=>g.track("palette.color_select",{name:i.detail?.name,index:i.detail?.index}),"color-palette:change":i=>g.track("palette.color_edit",{name:i.detail?.name,index:i.detail?.index}),"semantic-palette:change":i=>g.track("palette.semantic_change",{role:i.detail?.role}),"token-specimen:change":i=>g.track("tokens.edit",{token:i.detail?.token}),"spacing-specimen:change":i=>g.track("tokens.spacing_edit",{token:i.detail?.token}),"type-specimen:change":i=>g.track("tokens.type_edit",{token:i.detail?.token}),"theme-export:change":i=>g.track("theme.export_format",{format:i.detail?.format})};function Pr(i){for(let[t,e]of Object.entries(i))(t.startsWith("vb:theme-change")||t==="vb:a11y-themes-change"||t==="vb:extensions-change"?window:document).addEventListener(t,e)}function Fr({tiers:i=["tier1","tier2"]}={}){i.includes("tier1")&&Pr(Jc),i.includes("tier2")&&Pr(Zc)}ot();await S.init();document.documentElement.hasAttribute("data-sticky")&&ti();Er();Tr();Mr();Nr();g.init({siteId:globalThis.vbAnalyticsConfig?.siteId??"vb-docs",transport:globalThis.vbAnalyticsConfig?.transport??"console",endpoint:globalThis.vbAnalyticsConfig?.endpoint??"/api/analytics"});Fr();Promise.resolve().then(()=>Hr());Promise.resolve().then(()=>zr());Promise.resolve().then(()=>Xr());document.querySelector("[data-wizard]")&&Promise.resolve().then(()=>(Qr(),Zr));document.querySelector("[data-watch-page], watch-wc")&&Promise.resolve().then(()=>(vi(),yi));export{g as Analytics};
326
398
  //# sourceMappingURL=vanilla-breeze-core.js.map