vanilla-breeze 0.7.1 → 0.7.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.
- package/custom-elements.json +422 -7
- package/dist/cdn/components/activity-feed.js +1 -1
- package/dist/cdn/components/data-table.js +1 -1
- package/dist/cdn/components/manifest.json +8 -4
- package/dist/cdn/components/settings-panel.js +1 -1
- package/dist/cdn/components/site-map.js +1 -1
- package/dist/cdn/components/social-feed.js +5 -0
- package/dist/cdn/components/theme-picker.js +14 -7
- package/dist/cdn/packs/manifest.json +2 -2
- package/dist/cdn/packs/ui.full.css +1 -1
- package/dist/cdn/packs/ui.full.js +15 -8
- package/dist/cdn/themes/8bit.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999.tokens.json +1 -1
- package/dist/cdn/themes/art-deco-dark.tokens.json +1 -1
- package/dist/cdn/themes/art-deco.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus-dark.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus.tokens.json +1 -1
- package/dist/cdn/themes/brutalist-dark.tokens.json +1 -1
- package/dist/cdn/themes/brutalist.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
- package/dist/cdn/themes/classic-dark.tokens.json +1 -1
- package/dist/cdn/themes/classic.tokens.json +1 -1
- package/dist/cdn/themes/claymorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/claymorphism.tokens.json +1 -1
- package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
- package/dist/cdn/themes/clinical.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore.tokens.json +1 -1
- package/dist/cdn/themes/cyber.tokens.json +1 -1
- package/dist/cdn/themes/dawn-dark.tokens.json +1 -1
- package/dist/cdn/themes/dawn.tokens.json +1 -1
- package/dist/cdn/themes/dracula.tokens.json +1 -1
- package/dist/cdn/themes/dusk.tokens.json +1 -1
- package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
- package/dist/cdn/themes/editorial.tokens.json +1 -1
- package/dist/cdn/themes/financial-dark.tokens.json +1 -1
- package/dist/cdn/themes/financial.tokens.json +1 -1
- package/dist/cdn/themes/genai.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism.tokens.json +1 -1
- package/dist/cdn/themes/government-dark.tokens.json +1 -1
- package/dist/cdn/themes/government.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox.tokens.json +1 -1
- package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
- package/dist/cdn/themes/high-noon.tokens.json +1 -1
- package/dist/cdn/themes/journal-dark.tokens.json +1 -1
- package/dist/cdn/themes/journal.tokens.json +1 -1
- package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
- package/dist/cdn/themes/kawaii.tokens.json +1 -1
- package/dist/cdn/themes/magna-dark.tokens.json +1 -1
- package/dist/cdn/themes/magna.tokens.json +1 -1
- package/dist/cdn/themes/midnight.tokens.json +1 -1
- package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
- package/dist/cdn/themes/minimal.tokens.json +1 -1
- package/dist/cdn/themes/modern-dark.tokens.json +1 -1
- package/dist/cdn/themes/modern.tokens.json +1 -1
- package/dist/cdn/themes/nes-dark.tokens.json +1 -1
- package/dist/cdn/themes/nes.tokens.json +1 -1
- package/dist/cdn/themes/neumorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/neumorphism.tokens.json +1 -1
- package/dist/cdn/themes/nord-dark.tokens.json +1 -1
- package/dist/cdn/themes/nord.tokens.json +1 -1
- package/dist/cdn/themes/organic-dark.tokens.json +1 -1
- package/dist/cdn/themes/organic.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine.tokens.json +1 -1
- package/dist/cdn/themes/rough-dark.tokens.json +1 -1
- package/dist/cdn/themes/rough.tokens.json +1 -1
- package/dist/cdn/themes/solarized-dark.tokens.json +1 -1
- package/dist/cdn/themes/solarized.tokens.json +1 -1
- package/dist/cdn/themes/startup-dark.tokens.json +1 -1
- package/dist/cdn/themes/startup.tokens.json +1 -1
- package/dist/cdn/themes/super2026-dark.tokens.json +1 -1
- package/dist/cdn/themes/super2026.tokens.json +1 -1
- package/dist/cdn/themes/swiss-dark.tokens.json +1 -1
- package/dist/cdn/themes/swiss.tokens.json +1 -1
- package/dist/cdn/themes/terminal.tokens.json +1 -1
- package/dist/cdn/themes/tokyo-night-dark.tokens.json +1 -1
- package/dist/cdn/themes/tokyo-night.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave-dark.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave.tokens.json +1 -1
- package/dist/cdn/themes/win9x-dark.tokens.json +1 -1
- package/dist/cdn/themes/win9x.tokens.json +1 -1
- package/dist/cdn/vanilla-breeze-autoload.js +52 -52
- package/dist/cdn/vanilla-breeze-core.css +1 -1
- package/dist/cdn/vanilla-breeze-core.js +44 -44
- package/dist/cdn/vanilla-breeze-extras.js +36 -33
- package/dist/cdn/vanilla-breeze.css +1 -1
- package/dist/cdn/vanilla-breeze.js +168 -158
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var tm=Object.defineProperty;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var T=(e,t)=>{for(var i in t)tm(e,i,{get:t[i],enumerable:!0})};function be(){return Ns()}function Ns(){if(typeof window<"u"&&window.__VB_THEME_BASE)return String(window.__VB_THEME_BASE).replace(/\/$/,"");if(Fo)return Fo;if(typeof document<"u"){let e=document.querySelectorAll('script[src*="vanilla-breeze"]');for(let t of e){let i=t.getAttribute("src");if(i){let s=i.lastIndexOf("/");if(s!==-1)return i.slice(0,s)}}}return"/cdn"}function Bo(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):String(e).replace(/["\\]/g,"\\$&")}function Ho(e){document.querySelectorAll(`link[data-vb-theme-preload="${Bo(e)}"]`).forEach(t=>t.remove())}function Ms(e){return im.has(e)}function sm(e,t){return`${t}/themes/${e}.css`}function Vo(e,t){if(!Ms(e))return Promise.resolve();if(Ls.has(e))return Ls.get(e);let i=import(`${t}/packs/${e}.full.js`).catch(()=>{});return Ls.set(e,i),i}function nm(e,t){let i=Ns(),s=()=>{(Ms(t)||e.hasAttribute("data-vb-pack"))&&Vo(t,i)};return e.getAttribute("data-vb-theme-state")==="error"?Promise.reject(new Error(`Failed to load theme: ${t}`)):e.getAttribute("data-vb-theme-state")==="ready"||e.sheet?(s(),Promise.resolve()):new Promise((n,r)=>{let a=()=>{e.setAttribute("data-vb-theme-state","ready"),c(),s(),n(void 0)},o=()=>{e.setAttribute("data-vb-theme-state","error"),Et.delete(t),c(),r(new Error(`Failed to load theme: ${t}`))},c=()=>{e.removeEventListener("load",a),e.removeEventListener("error",o)};e.addEventListener("load",a,{once:!0}),e.addEventListener("error",o,{once:!0})})}async function ge(e){if(!e||em.has(e))return;if(Et.has(e))return Et.get(e);if(typeof document<"u"){let s=document.querySelector(`link[data-vb-theme="${Bo(e)}"]`);if(s){let n=nm(s,e);return Et.set(e,n),n}}let t=Ns(),i=Ms(e)?am(e,t):rm(e,t);return Et.set(e,i),i}async function rm(e,t){let i=sm(e,t);return new Promise((s,n)=>{Ho(e);let r=document.createElement("link");r.rel="stylesheet",r.href=i,r.setAttribute("data-vb-theme",e),r.setAttribute("data-vb-theme-state","loading"),r.onload=()=>{r.setAttribute("data-vb-theme-state","ready"),s()},r.onerror=()=>{r.setAttribute("data-vb-theme-state","error"),r.remove(),Et.delete(e),n(new Error(`Failed to load theme: ${e}`))},document.head.appendChild(r)})}function am(e,t){let i=`${t}/packs/${e}.theme.css`,s=`${t}/packs/${e}.effects.css`;return new Promise((n,r)=>{Ho(e);let a=document.createElement("link");a.rel="stylesheet",a.href=i,a.setAttribute("data-vb-theme",e),a.setAttribute("data-vb-pack",e),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready");let o=document.createElement("link");o.rel="stylesheet",o.href=s,o.setAttribute("data-vb-pack-effects",e),document.head.appendChild(o),Vo(e,t),n()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),Et.delete(e),r(new Error(`Failed to load pack: ${e}`))},document.head.appendChild(a)})}var Et,Ls,Fo,em,im,ve=v(()=>{Et=new Map,Ls=new Map,Fo=null;em=new Set(["default","a11y-high-contrast","a11y-large-text","a11y-dyslexia","modern","minimal","classic"]),im=new Set(["kawaii","memphis"])});function om(){let e=globalThis.localStorage;if(!e)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return e.getItem(t)},async setRaw(t,i){e.setItem(t,i)},async removeRaw(t){e.removeItem(t)},async keys(t){let i=[];for(let s=0;s<e.length;s++){let n=e.key(s);n&&n.startsWith(t)&&i.push(n)}return i}}}function ct(){return ni[si]||(ni[si]=om()),ni[si]}function Is(e,t){if(typeof e!="string"||!e)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:${e}:${t}`}function Ko(e){if(typeof e!="string"||!e)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${e}:`}function Yo(e){try{let t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var si,ni,S,it=v(()=>{si="__vbStoreBackend",ni=globalThis;S={configure(e={}){ni[si]=e.backend??null},async set(e,t,i){let s={data:i,timestamp:Date.now()};await ct().setRaw(Is(e,t),JSON.stringify(s))},async get(e,t,i){let s=await ct().getRaw(Is(e,t));if(s==null)return null;let n=Yo(s);return!n||i?.maxAge!=null&&Date.now()-n.timestamp>i.maxAge?null:n.data},async remove(e,t){await ct().removeRaw(Is(e,t))},async list(e){let t=Ko(e),i=await ct().keys(t),s=[];for(let n of i){let r=await ct().getRaw(n);if(r==null)continue;let a=Yo(r);a&&s.push({key:n.slice(t.length),data:a.data,timestamp:a.timestamp})}return s},async clear(e){let t=Ko(e),i=await ct().keys(t);for(let s of i)await ct().removeRaw(s)},async clearAll(){let e=await ct().keys("vb:");for(let t of e)await ct().removeRaw(t)},async setMany(e,t){for(let[i,s]of t)await S.set(e,i,s)}};if(typeof window<"u"){let e=window.VB??(window.VB={});e.store??=S}});function eb(e){return String(e).replace(/[\u0000- \u007f-\u009f]/g,"").toLowerCase()}function hc(e,t=!1){let i=eb(e);return t?/(^|,)(javascript|vbscript|livescript):/.test(i)?!0:/(^|,)data:/.test(i)?i.split(/(?=data:)/).filter(n=>n.startsWith("data:")).some(n=>!/^data:(image|audio|video|font)\//.test(n)):!1:/^(javascript|vbscript|livescript|data):/.test(i)}function mc(e){let t=String(e).replace(/\/\*[\s\S]*?\*\//g,"").replace(/\\/g,"").replace(/\s+/g,"").toLowerCase();return/expression\(|javascript:|vbscript:|-moz-binding|behavior:|@import|position:fixed/.test(t)}function sb(e,t){if(fc.has(t))return!0;let i=e.namespaceURI;return!!(i&&!Um.has(i)||t==="title"&&i!==Qs||pc.has(t)&&i===Qs&&e.children?.length||Wm.has(t)&&(e.getAttribute("attributeName")||e.getAttribute("attributename")||"").toLowerCase().includes("href"))}function nb(e,t){for(let i of[...e.attributes]){let s=i.name.toLowerCase();if(s.startsWith("on")||Ym.has(s)||!t.keepIds&&Gm.has(s)){e.removeAttribute(i.name);continue}if(s==="style"){(!t.keepStyle||mc(i.value))&&e.removeAttribute(i.name);continue}if((s==="id"||s==="name")&&!t.keepIds){let n=ib(i.value);s==="id"?t.ids.set(i.value,n):t.ids.set(`name:${i.value}`,n),e.setAttribute(i.name,n);continue}if(jm.has(s)||s.endsWith(":href")){hc(i.value,!1)&&e.removeAttribute(i.name);continue}Km.has(s)&&hc(i.value,!0)&&e.removeAttribute(i.name)}}function rb(e,t){let i=(e.getAttribute("type")||"").toLowerCase();t==="button"&&i!=="button"&&e.setAttribute("type","button"),t==="input"&&/^(submit|reset|image)$/.test(i)&&e.setAttribute("type","button")}function ab(e,t){for(let i of e)for(let s of[...i.attributes]){let n=s.name.toLowerCase(),r=s.value;if((n==="href"||n.endsWith(":href"))&&r.startsWith("#")){let a=ob(r.slice(1));t.has(a)&&i.setAttribute(s.name,`#${t.get(a)}`)}else if(n==="usemap"&&r.startsWith("#")){let a=t.get(`name:${r.slice(1)}`);a?i.setAttribute(s.name,`#${a}`):i.removeAttribute(s.name)}else if(Xm.has(n)){let a=r.split(/\s+/).filter(Boolean).map(o=>t.get(o)||(o.startsWith(en)?o:null)).filter(Boolean);a.length?i.setAttribute(s.name,a.join(" ")):i.removeAttribute(s.name)}else r.includes("url(#")&&i.setAttribute(s.name,r.replace(/url\(#([^)]+)\)/g,(a,o)=>t.has(o)?`url(#${t.get(o)})`:a))}}function ob(e){try{return decodeURIComponent(e)}catch{return e}}function sn(e){let t=e.childNodes;if(t)for(let i of[...t])i.nodeType===8?i.remove():(i.nodeType===1||i.nodeType===11)&&sn(i)}function nn(e,t){sn(e);let i=[...e.querySelectorAll("*")];t.includeRoot&&i.unshift(e);let s=new Map,n=[],r={...t,ids:s};for(let a of i){if(!lb(a,e))continue;let o=bc(a);if(t.svgOnly&&(pc.has(o)||o==="style")){if(o==="style"&&mc(a.textContent||"")){a.remove();continue}}else if(sb(a,o)){a.remove();continue}if(!t.keepIds&&!t.svgOnly&&Zm.has(o)){cb(a);continue}if(o==="template"){let l=a.content;l&&nn(l,{...t,includeRoot:!1})}nb(a,r),t.keepIds||rb(a,o);let c=Jm[o];if(c)for(let l of c)a.removeAttribute(l);if(o==="include-file"&&!t.allowIncludeFile&&a.removeAttribute("src"),!t.keepIds&&!t.svgOnly&&o.includes("-")&&o!=="include-file"&&!tb.has(o))for(let l of Qm)a.removeAttribute(l);n.push(a)}!t.keepIds&&s.size&&ab(n,s)}function cb(e){let t=e.parentNode;if(t){for(let i of[...e.childNodes])t.insertBefore(i,e);e.remove()}}function lb(e,t){let i=e;for(;i;){if(i===t)return!0;i=i.parentNode??i.parent??null}return!1}function pi(e,t={}){let i=document.createElement("template");return e&&typeof e=="string"&&(i.innerHTML=e,nn(i.content,{allowIncludeFile:!!t.allowIncludeFile,keepIds:!!t.keepIds,keepStyle:!!t.keepStyle})),i.content}function gc(e){return!e||typeof e!="object"||!("attributes"in e)||nn(e,{includeRoot:!0,keepIds:!0,keepStyle:!0,svgOnly:!0}),e}function vc(e){let t=document.createElement("template");if(!e||typeof e!="string")return t.content;t.innerHTML=e,t.content.querySelector("math")||(t.innerHTML=`<math>${e}</math>`);let i=t.content;sn(i);for(let s of[...i.childNodes])s.nodeType===3&&!s.textContent?.trim()||(s.nodeType!==1||s.namespaceURI!==tn)&&s.remove();for(let s of[...i.querySelectorAll("*")]){if(!i.contains(s))continue;let n=bc(s);if(s.namespaceURI!==tn||fc.has(n)){s.remove();continue}for(let r of[...s.attributes])ub.test(r.name.toLowerCase())&&s.removeAttribute(r.name)}return i}var zm,Qs,tn,Um,en,fc,pc,Wm,jm,Km,Ym,Gm,Xm,Jm,Zm,Qm,tb,bc,ib,ub,Ht=v(()=>{zm="http://www.w3.org/1999/xhtml",Qs="http://www.w3.org/2000/svg",tn="http://www.w3.org/1998/Math/MathML",Um=new Set([zm,Qs,tn]),en="user-content-",fc=new Set(["script","iframe","frame","frameset","object","embed","applet","portal","fencedframe","form","base","link","meta","noscript","foreignobject","style","xmp","noembed","noframes","plaintext","mglyph","malignmark","annotation-xml"]),pc=new Set(["title","desc"]),Wm=new Set(["animate","set","animatemotion","animatetransform"]),jm=new Set(["href","xlink:href","action","formaction","data","codebase","cite","background","longdesc","manifest","to","from","values","by"]),Km=new Set(["src","poster","srcset"]),Ym=new Set(["srcdoc","form","formaction","formmethod","formtarget","formenctype","formnovalidate","action","method","ping"]),Gm=new Set(["popovertarget","popovertargetaction","commandfor","command","interestfor","autofocus"]),Xm=new Set(["for","headers","list","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-flowto","aria-details","aria-errormessage","aria-activedescendant"]),Jm={"include-file":["trusted","allow-scripts","allow-cross-origin"],"markdown-viewer":["src","sanitize","ping","allow-cross-origin"]},Zm=new Set(["social-embed","youtube-player","geo-map"]),Qm=["src","src-dark","data-src","url","endpoint","tile-url","data-versions"],tb=new Set(["audio-player","video-player","image-map","brand-mark"]);bc=e=>String(e.localName||e.tagName||"").toLowerCase(),ib=e=>e.startsWith(en)?e:en+e;ub=/^(on|href$|src$|style$|id$|name$|xlink|xml:|form[a-z])/});function bb(e,t){let i=Ec.get(t);i||Ec.set(t,i=new Map);let s=i.get(e);if(!s||!s.region.isConnected){let r=(t.ownerDocument||document).createElement("span");r.setAttribute("data-vb-announcer",e),r.setAttribute("role",e==="assertive"?"alert":"status"),r.setAttribute("aria-live",e),r.setAttribute("aria-atomic","true"),r.style.cssText=mb,t.appendChild(r),s={region:r},i.set(e,s)}return s}function W(e,{politeness:t="polite",root:i}={}){let s=String(e??"").trim();if(!s||typeof document>"u")return null;let n=i||document.body;if(!n)return null;let a=bb(t==="assertive"?"assertive":"polite",n);return clearTimeout(a.write),clearTimeout(a.clear),a.region.textContent="",a.write=setTimeout(()=>{a.region.textContent=s,a.clear=setTimeout(()=>{a.region.textContent=""},7e3)},50),a.region}function R(e,t,i,s){let n=`data-label-${t}`,a=e?.closest?.(`[${n}]`)?.getAttribute(n)||i;return s?a.replace(/\{(\w+)\}/g,(o,c)=>c in s?String(s[c]):o):a}var mb,Ec,lt=v(()=>{mb=["position:absolute","inline-size:1px","block-size:1px","padding:0","margin:-1px","overflow:hidden","clip-path:inset(50%)","white-space:nowrap","border:0"].join(";"),Ec=new WeakMap});var kc={};T(kc,{copyRich:()=>wb,copyText:()=>ut,initCopyButtons:()=>Sb,pasteFromClipboard:()=>Sc});function vb(e){if(typeof document.execCommand!="function"||!document.body)return!1;let t=document.activeElement,i=document.createElement("textarea");i.value=e,i.setAttribute("readonly",""),i.setAttribute("aria-hidden","true"),i.style.cssText="position:fixed;inset-block-start:0;inset-inline-start:0;opacity:0;pointer-events:none",document.body.appendChild(i),i.select();let s=!1;try{s=document.execCommand("copy")}catch{s=!1}return i.remove(),t?.focus?.({preventScroll:!0}),s}function yb(e){if(!e)return!1;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e.focus(),e.select(),!0;let t=window.getSelection?.();if(!t)return!1;let i=document.createRange();return i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i),!t.isCollapsed}async function ut(e,t={}){if(e==null||e==="")return!1;let{button:i,duration:s=un}=t,n=!1,r=null;try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(e),n=!0}catch(o){r=o,n=vb(e)}if(n)return Vt({button:i,duration:s,state:"copied",eventName:"copy:done",eventDetail:{text:e},message:t.announceMessage??R(i,"copied",kt.copied)}),!0;let a=yb(t.source);return Vt({button:i,duration:s,state:"failed",eventName:"copy:error",eventDetail:{text:e,error:r},message:t.failureMessage??R(i,"copy-failed",a?kt["copy-failed-selected"]:kt["copy-failed"])}),!1}async function wb(e,t={}){let{text:i,html:s,blob:n}=e??{};if(!i&&!s&&!n)return!1;let{button:r,duration:a=un}=t;if(typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"){let c={};i&&(c["text/plain"]=new Blob([i],{type:"text/plain"})),s&&(c["text/html"]=new Blob([s],{type:"text/html"})),n&&(c[n.type]=n);try{return await navigator.clipboard.write([new ClipboardItem(c)]),Vt({button:r,duration:a,state:"copied",eventName:"copy:done",eventDetail:{payload:e},message:t.announceMessage??R(r,"copied",kt.copied)}),!0}catch{}}return i?ut(i,t):(Vt({button:r,duration:a,state:"failed",eventName:"copy:error",eventDetail:{payload:e,error:null},message:t.failureMessage??R(r,"copy-failed",kt["copy-failed"])}),!1)}function Vt({button:e,duration:t,message:i,eventDetail:s,state:n,eventName:r}){if(e){e.dataset.state=n;let a=ln.get(e);a&&clearTimeout(a),ln.set(e,setTimeout(()=>{e.dataset.state===n&&delete e.dataset.state,ln.delete(e)},t)),e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:s}))}W(i,{politeness:n==="failed"?"assertive":"polite"})}async function Sc(e,t={}){let{button:i,duration:s=un}=t,n;try{if(!navigator.clipboard?.readText)throw new Error("Clipboard API unavailable");n=await navigator.clipboard.readText()}catch(r){return Vt({button:i,duration:s,state:"failed",eventName:"paste:error",eventDetail:{target:e,error:r},message:t.failureMessage??R(i,"paste-failed",kt["paste-failed"])}),null}return e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?e.value=n:e.textContent=n,e.dispatchEvent(new Event("input",{bubbles:!0}))),Vt({button:i,duration:s,state:"pasted",eventName:"paste:done",eventDetail:{text:n,target:e},message:t.announceMessage??R(i,"pasted",kt.pasted)}),n}function xc(e){let t=e.dataset.copyTarget;if(!t)return null;try{return document.querySelector(t)}catch{return null}}function Ab(e){if(e.dataset.copy)return e.dataset.copy;let t=xc(e);if(!t)return"";let i=e.dataset.copyAttr;return i?t.getAttribute(i)??"":t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t.value:t.textContent??""}function Eb(e){let t=e.target?.closest?.(gb);if(!t||t.matches(':disabled, [aria-disabled="true"]'))return;if(t.dataset.pasteTarget){let s=null;try{s=document.querySelector(t.dataset.pasteTarget)}catch{}if(!s)return;Sc(s,{button:t});return}let i=Ab(t);i&&ut(i,{button:t,source:xc(t)??void 0})}function Sb(e=document){e.querySelectorAll("[data-copy-init]").forEach(t=>t.removeAttribute("data-copy-init"))}var un,gb,kt,ln,zt=v(()=>{lt();un=1500,gb="[data-copy], [data-copy-target], [data-paste-target]",kt={copied:"Copied to clipboard",pasted:"Pasted from clipboard","copy-failed":"Copy failed","copy-failed-selected":"Copy failed. Text selected, press Ctrl+C to copy","paste-failed":"Paste failed"},ln=new WeakMap;typeof document<"u"&&!document.__vbCopyDelegated&&(document.__vbCopyDelegated=!0,document.addEventListener("click",Eb))});function gi(e){return[...String(e??"").trim().toLowerCase().matchAll(/([^+]+|\+)(?:\+|$)/g)].map(i=>i[1].trim()).filter(Boolean).map(i=>i==="plus"?"+":i)}function bn(e,t=G){let i=t?Tc.mac:Tc.other;if(e in i)return{label:i[e],spoken:(t?Lc.mac:Lc.other)[e],modifier:!0};let s=_b[e];if(s)return{...s,modifier:!1};let n=e.toUpperCase();return{label:n,spoken:n,modifier:!1}}function Nc(e){return gi(e).map(t=>bn(t).label).join(G?"":"+")}function Ib(e){let t=String(e??"").toLowerCase();return Db[t]??t}function Ut(e){let t=gi(e);return{key:Ib(t.pop()??""),meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl")||t.includes("control"),shift:t.includes("shift"),alt:t.includes("alt")||t.includes("option")}}function Mc(e){return e.length===1&&!/[a-z0-9 ]/.test(e)}function _c(e,t){let s=(e.key==="Spacebar"?" ":String(e.key??"").toLowerCase())===t.key;if(!s&&(e.altKey||e.shiftKey)&&/^[a-z0-9]$/.test(t.key)){let a=/\d/.test(t.key)?`Digit${t.key}`:`Key${t.key.toUpperCase()}`;s=e.code===a}if(!s)return!1;let n,r;return G?(n=t.meta,r=t.ctrl):(n=!1,r=t.meta||t.ctrl),!(n!==e.metaKey||r!==e.ctrlKey||!Mc(t.key)&&t.shift!==e.shiftKey||t.alt!==e.altKey)}function vi(e){let t=typeof e=="string"?Ut(e):e;return!t.meta&&!t.ctrl&&!t.alt&&t.key.length===1}function Dc(e,t){let i=Ut(e),s=Ut(t),n=G?i.ctrl:i.ctrl||i.meta,r=G?s.ctrl:s.ctrl||s.meta,a=G&&i.meta,o=G&&s.meta,c=!Mc(i.key);return i.key===s.key&&n===r&&a===o&&i.alt===s.alt&&(!c||i.shift===s.shift)}function yi(e,t=G){let i=Ut(e),s=[];i.alt&&s.push("Alt"),(i.ctrl||i.meta&&!t)&&s.push("Control"),i.meta&&t&&s.push("Meta"),i.shift&&s.push("Shift");let n=$b[i.key];return n||(n=/^f\d{1,2}$/.test(i.key)||i.key.length===1?i.key.toUpperCase():i.key[0].toUpperCase()+i.key.slice(1)),[...s,n].join("+")}var G,Tc,Lc,_b,Db,$b,Ee=v(()=>{G=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),Tc={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",option:"\u2325",shift:"\u21E7",ctrl:"\u2303",control:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift",ctrl:"Ctrl",control:"Ctrl"}},Lc={mac:{meta:"Command",cmd:"Command",alt:"Option",option:"Option",shift:"Shift",ctrl:"Control",control:"Control"},other:{meta:"Control",cmd:"Control",alt:"Alt",option:"Alt",shift:"Shift",ctrl:"Control",control:"Control"}},_b={escape:{label:"Esc",spoken:"Escape"},esc:{label:"Esc",spoken:"Escape"},enter:{label:"Enter",spoken:"Enter"},return:{label:"Enter",spoken:"Enter"},tab:{label:"Tab",spoken:"Tab"},space:{label:"Space",spoken:"Space"},backspace:{label:"Backspace",spoken:"Backspace"},delete:{label:"Del",spoken:"Delete"},del:{label:"Del",spoken:"Delete"},insert:{label:"Ins",spoken:"Insert"},home:{label:"Home",spoken:"Home"},end:{label:"End",spoken:"End"},pageup:{label:"PgUp",spoken:"Page up"},pagedown:{label:"PgDn",spoken:"Page down"},arrowup:{label:"\u2191",spoken:"Up arrow"},up:{label:"\u2191",spoken:"Up arrow"},arrowdown:{label:"\u2193",spoken:"Down arrow"},down:{label:"\u2193",spoken:"Down arrow"},arrowleft:{label:"\u2190",spoken:"Left arrow"},left:{label:"\u2190",spoken:"Left arrow"},arrowright:{label:"\u2192",spoken:"Right arrow"},right:{label:"\u2192",spoken:"Right arrow"},"+":{label:"+",spoken:"Plus"},plus:{label:"+",spoken:"Plus"}};Db={esc:"escape",return:"enter",del:"delete",ins:"insert",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",space:" ",spacebar:" ",plus:"+",pgup:"pageup",pgdn:"pagedown"};$b={" ":"Space","+":"Plus",escape:"Escape",enter:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight"}});function Ct(){return typeof document>"u"?!0:document.documentElement.getAttribute(Se)!=="off"}function Ic(e){let t=document.documentElement,i=Ct();e?t.removeAttribute(Se):t.setAttribute(Se,"off"),i!==!!e&&window.dispatchEvent(new CustomEvent(Ob,{detail:{enabled:!!e}}))}function Rb(){try{let e=globalThis.localStorage?.getItem(Pb);if(!e)return null;let t=JSON.parse(e)?.data?.charShortcuts;return typeof t=="boolean"?t:null}catch{return null}}function Oc(){return $c}var Se,Ob,Pb,$c,gn=v(()=>{Se="data-char-shortcuts",Ob="vb:char-shortcuts-change",Pb="vb:settings:extensions";$c=!0;if(typeof document<"u"){let e=Rb();e===null&&($c=Ct()),e===!1?document.documentElement.setAttribute(Se,"off"):e===!0&&document.documentElement.removeAttribute(Se)}});function Fb(e){let t=e;return!t||!t.tagName?!1:qb.has(t.tagName)||t.isContentEditable}function Bb(e){if(e.repeat||e.isComposing||e.defaultPrevented)return;let t=Fb(e.target),i=!Ct(),s=document.activeElement;for(let n of Wt)if(!(t&&!n.global)&&!(n.scope&&!(n.scope.isConnected&&n.scope.contains(s)))&&!(i&&n.character&&!n.scope)&&!(n.enabled&&!n.enabled())&&_c(e,n.descriptor)){e.preventDefault(),n.callback(e);return}}function Hb(){Pc||(document.addEventListener("keydown",Bb),Pc=!0)}function jt(e,t,i={}){Hb();let s=Ut(e),n={combo:e,descriptor:s,callback:t,global:i.global===!0,scope:i.scope??null,enabled:typeof i.enabled=="function"?i.enabled:null,character:vi(s)},r=Wt.find(a=>!a.scope&&!n.scope&&Dc(a.combo,e));return r&&console.warn(`[hotkey-bind] Shortcut "${e}" is already bound as "${r.combo}". Last-bound wins.`),Wt.unshift(n),function(){let o=Wt.indexOf(n);o!==-1&&Wt.splice(o,1)}}function Rc(){return Wt.map(e=>e.combo)}var qb,Wt,Pc,wi=v(()=>{Ee();gn();qb=new Set(["INPUT","TEXTAREA","SELECT"]),Wt=[],Pc=!1});var xn={};T(xn,{addDialogDismiss:()=>Jc,addFlickListener:()=>Yc,addLongPress:()=>Xc,addPullToRefresh:()=>hg,addSwipeListener:()=>Kc,haptic:()=>Ci,initGestures:()=>Zc,makeSwipeable:()=>Gc});function Kc(e,t={}){let i=t.threshold??50,s=t.restraint??100,n=t.timeout??300,r=t.velocity??.5,a=t.minFlickDistance??10,o,c,l;function u(h){h.isPrimary&&(o=h.clientX,c=h.clientY,l=Date.now())}function d(h){if(!h.isPrimary)return;let f=h.clientX-o,p=h.clientY-c,m=Date.now()-l;if(m>n)return;let b=Math.abs(f),g=Math.abs(p),A=Math.max(b,g),y=m>0?A/m:0,$=y>=r&&A>=a,M;if((b>=i||$&&b>g)&&g<=s?M=f<0?"left":"right":(g>=i||$&&g>b)&&b<=s&&(M=p<0?"up":"down"),M){let X=M==="left"||M==="right"?b:g;e.dispatchEvent(new CustomEvent(`swipe-${M}`,{bubbles:!0,detail:{distance:X,duration:m,velocity:y,flick:$}}))}}return e.addEventListener("pointerdown",u,{passive:!0}),e.addEventListener("pointerup",d,{passive:!0}),()=>{e.removeEventListener("pointerdown",u),e.removeEventListener("pointerup",d)}}function Yc(e,t={}){let i=t.minDistance??10,s=t.velocity??.6,n=t.timeout??250,r=t.restraint??80,a,o,c;function l(d){d.isPrimary&&(a=d.clientX,o=d.clientY,c=Date.now())}function u(d){if(!d.isPrimary)return;let h=d.clientX-a,f=d.clientY-o,p=Date.now()-c;if(p===0||p>n)return;let m=Math.abs(h),b=Math.abs(f),g=Math.max(m,b);if(g<i)return;let A=g/p;if(A<s)return;let y;if(m>b&&b<=r?y=h<0?"left":"right":b>m&&m<=r&&(y=f<0?"up":"down"),y){let $=y==="left"||y==="right"?m:b;e.dispatchEvent(new CustomEvent(`swipe-${y}`,{bubbles:!0,detail:{distance:$,duration:p,velocity:A,flick:!0}}))}}return e.addEventListener("pointerdown",l,{passive:!0}),e.addEventListener("pointerup",u,{passive:!0}),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointerup",u)}}function Gc(e,t={}){let i=t.threshold??100,s=t.direction??"horizontal",n=t.removeOnDismiss??!0,r=s==="horizontal",a=0,o=0,c=!1;function l(m){!m.isPrimary||e.hasAttribute("data-dismissed")||(m.preventDefault(),c=!0,a=r?m.clientX:m.clientY,o=0,e.setPointerCapture(m.pointerId),e.setAttribute("data-swiping",""))}function u(m){if(!c||!m.isPrimary)return;o=(r?m.clientX:m.clientY)-a;let g=1-Math.min(Math.abs(o)/i,1)*.5;r?e.style.transform=`translateX(${o}px)`:e.style.transform=`translateY(${o}px)`,e.style.opacity=String(g)}function d(m){!c||!m.isPrimary||(c=!1,e.releasePointerCapture(m.pointerId),e.removeAttribute("data-swiping"),Math.abs(o)>=i?f(o>0?"right":"left"):p())}function h(m){!c||!m.isPrimary||(c=!1,e.releasePointerCapture(m.pointerId),e.removeAttribute("data-swiping"),p())}function f(m){let b=m==="right"?"100%":"-100%";e.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",e.style.transform=r?`translateX(${b})`:`translateY(${b})`,e.style.opacity="0",e.setAttribute("data-dismissed",""),Ci.dismiss(),e.dispatchEvent(new CustomEvent("swipe-dismiss",{bubbles:!0,detail:{direction:m,distance:Math.abs(o)}})),n&&e.addEventListener("transitionend",()=>e.remove(),{once:!0})}function p(){e.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",e.style.transform="",e.style.opacity="",e.addEventListener("transitionend",()=>{e.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",l),e.addEventListener("pointermove",u),e.addEventListener("pointerup",d),e.addEventListener("pointercancel",h),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointermove",u),e.removeEventListener("pointerup",d),e.removeEventListener("pointercancel",h)}}function hg(e,t,i={}){let s=i.threshold??70,n=i.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),e.prepend(r);let o=0,c=!1,l=!1;function u(b){!b.isPrimary||l||e.scrollTop<=0&&(o=b.clientY,c=!0)}function d(b){if(!c||!b.isPrimary||l)return;let g=b.clientY-o;if(g<=0){r.style.transform="",r.style.opacity="";return}let A=Math.min(g,n),y=A/s;r.style.transform=`translateY(${A}px)`,r.style.opacity=String(Math.min(y,1)),y>=1?r.setAttribute("data-pull-ready",""):r.removeAttribute("data-pull-ready")}function h(b){!c||!b.isPrimary||(c=!1,r.hasAttribute("data-pull-ready")&&!l?p():m())}function f(b){!c||!b.isPrimary||(c=!1,m())}async function p(){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"),m()}}function m(){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 e.addEventListener("pointerdown",u,{passive:!0}),e.addEventListener("pointermove",d,{passive:!0}),e.addEventListener("pointerup",h,{passive:!0}),e.addEventListener("pointercancel",f,{passive:!0}),()=>{e.removeEventListener("pointerdown",u),e.removeEventListener("pointermove",d),e.removeEventListener("pointerup",h),e.removeEventListener("pointercancel",f),r.remove()}}function Xc(e,t,i={}){let s=i.duration??500,n=i.hapticFeedback??!0,r=i.blockContextMenu??!0,a=null;function o(u){u.isPrimary&&(a=setTimeout(()=>{n&&Ci.tap(),t(u),a=null},s))}function c(){a&&(clearTimeout(a),a=null)}function l(u){r&&u.preventDefault()}return e.addEventListener("pointerdown",o,{passive:!0}),e.addEventListener("pointermove",c,{passive:!0}),e.addEventListener("pointerup",c,{passive:!0}),e.addEventListener("pointercancel",c,{passive:!0}),e.addEventListener("contextmenu",l),()=>{c(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointermove",c),e.removeEventListener("pointerup",c),e.removeEventListener("pointercancel",c),e.removeEventListener("contextmenu",l)}}function Jc(e,t={}){let i=t.threshold??80,s=0,n=0,r=!1;function a(h){if(!h.isPrimary||!e.open)return;let f=h.target;f.closest("a, button, input, select, textarea, [contenteditable]")&&!f.closest("header")||(r=!0,s=h.clientY,n=0,e.setPointerCapture(h.pointerId),e.style.transition="none")}function o(h){if(!r||!h.isPrimary)return;if(n=h.clientY-s,n<=0){e.style.transform="",e.style.opacity="";return}let p=1-Math.min(n/i,1)*.4;e.style.transform=`translateY(${n}px)`,e.style.opacity=String(p)}function c(h){!r||!h.isPrimary||(r=!1,e.releasePointerCapture(h.pointerId),n>=i?u():d())}function l(h){!r||!h.isPrimary||(r=!1,e.releasePointerCapture(h.pointerId),d())}function u(){e.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",e.style.transform="translateY(100%)",e.style.opacity="0",Ci.dismiss(),e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform="",e.style.opacity="",e.close("dismiss")},{once:!0})}function d(){e.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",e.style.transform="",e.style.opacity="",e.addEventListener("transitionend",()=>{e.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",a),e.addEventListener("pointermove",o),e.addEventListener("pointerup",c),e.addEventListener("pointercancel",l),()=>{e.removeEventListener("pointerdown",a),e.removeEventListener("pointermove",o),e.removeEventListener("pointerup",c),e.removeEventListener("pointercancel",l)}}function Zc(e=document){let t=[];for(let i of e.querySelectorAll('[data-gesture="swipe"]'))t.push(Kc(i));for(let i of e.querySelectorAll('[data-gesture="flick"]'))t.push(Yc(i));for(let i of e.querySelectorAll('[data-gesture="dismiss"]'))t.push(Gc(i));for(let i of e.querySelectorAll('[data-gesture="long-press"]'))t.push(Xc(i,()=>{i.dispatchEvent(new CustomEvent("long-press",{bubbles:!0}))}));for(let i of e.querySelectorAll('dialog[data-gesture="dismiss-down"]'))t.push(Jc(i));return()=>t.forEach(i=>i())}var Ci,Sn,kn=v(()=>{Ci={tap:()=>navigator.vibrate?.(8),confirm:()=>navigator.vibrate?.([8,40,8]),error:()=>navigator.vibrate?.([30,60,30]),dismiss:()=>navigator.vibrate?.(15)};Sn=typeof document<"u"?document.documentElement:null;(!Sn||!Sn.hasAttribute("data-vb-gestures-init"))&&(Sn?.setAttribute("data-vb-gestures-init",""),Zc())});function Ni(e){return e.split("-")[0].toLowerCase()}function Eg(e){return Ag.has(Ni(e??H()))}function H(e){return ft(e&&e.closest("[lang]")?.lang||document.documentElement.lang||navigator.language||"en")}function ft(e,t="en-US"){try{if(e)return Intl.getCanonicalLocales(e),e}catch{}try{return Intl.getCanonicalLocales(t),t}catch{return"en-US"}}var Ag,Nn,Z=v(()=>{Ag=new Set(["ar","arc","dv","fa","ha","he","khw","ks","ku","ps","sd","ug","ur","uz","yi"]);Nn=class{constructor({locale:t,messages:i={},fallbackLocale:s="en",root:n=document}={}){this.locale=t??H(),this.messages=i,this.fallbackLocale=s,this.root=n}t(t,i={}){let s=Ni(this.locale),r=(this.messages[s]??this.messages[this.locale]??this.messages[this.fallbackLocale]??{})[t]??this.messages[this.fallbackLocale]?.[t]??t;for(let[a,o]of Object.entries(i))r=r.replaceAll(`{{${a}}}`,o);return r}apply(t=this.root){let i=t.querySelectorAll("[data-i18n]");for(let s of i){let n=s,r=n.dataset.i18n??"",a=n.dataset.i18nAttr,o=n.dataset.i18nVars?JSON.parse(n.dataset.i18nVars):{},c=this.t(r,o);if(a)n.setAttribute(a,c);else if(n.children.length===0)n.textContent=c;else{let l=[...n.childNodes].find(u=>u.nodeType===Node.TEXT_NODE);l?l.textContent=c:n.prepend(document.createTextNode(c))}}}async load(t,i){let s=await fetch(i);if(!s.ok)throw new Error(`VbI18n: failed to load messages from ${i}`);let n=await s.json();this.messages[t]={...this.messages[t]??{},...n}}setLocale(t){this.locale=t,this.apply(),document.dispatchEvent(new CustomEvent("vb:locale-change",{bubbles:!0,detail:{locale:t}}))}watch(){let t=i=>{this.locale=i.detail.locale,this.apply()};return document.addEventListener("vb:locale-change",t),()=>document.removeEventListener("vb:locale-change",t)}}});var El={};T(El,{destroyStickyManager:()=>iv,findBannerHeader:()=>wl,initStickyManager:()=>Jn});function wl(){for(let e of document.querySelectorAll("header"))if(!e.parentElement?.closest(ev))return e;return null}function gt(){let e=document.documentElement;if(!e.hasAttribute("data-sticky"))return;let t=wl();t&&!t.hasAttribute("data-sticky")&&(t.dataset.sticky="",Gn.add(t)),t&&$i&&!Xn.has(t)&&($i.observe(t),Xn.add(t));let i=t?.hasAttribute("data-sticky")&&getComputedStyle(t).position!=="static",s=t&&i?t.getBoundingClientRect().height:0;e.style.setProperty("--sticky-offset",`${s}px`)}function Al(){gt()}function Jn(){if(Ii){gt();return}Ii=!0,$i=new ResizeObserver(gt),Xn=new WeakSet,gt(),requestAnimationFrame(gt),document.fonts?.ready?.then(gt),window.addEventListener("resize",gt,{passive:!0}),document.addEventListener("toggle",Al,!0)}function iv(){if(Ii){Ii=!1,window.removeEventListener("resize",gt),document.removeEventListener("toggle",Al,!0),$i?.disconnect();for(let e of Gn)delete e.dataset.sticky;Gn.clear(),document.documentElement.style.removeProperty("--sticky-offset")}}var Ii,$i,Gn,Xn,ev,Zn=v(()=>{Ii=!1,Gn=new Set,Xn=new WeakSet,ev='article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]'});var xl={};T(xl,{SoundManager:()=>sv});var Sl,Qn,sv,kl=v(()=>{Sl="vb-sound",Qn={enabled:!1,volume:.5},sv={_ctx:null,_enabled:!1,_volume:.5,_initialized:!1,init(){if(this._initialized)return this;let e=this._load();return this._enabled=e.enabled,this._volume=e.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 e=localStorage.getItem(Sl);return e?{...Qn,...JSON.parse(e)}:{...Qn}}catch{return{...Qn}}},_save(e){try{let t=this._load();localStorage.setItem(Sl,JSON.stringify({...t,...e}))}catch{}},_playTone(e,t,i="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=e,n.type=i,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(e){this._volume=Math.max(0,Math.min(1,e)),this._save({volume:this._volume})},getVolume(){return this._volume},play(e){if(this._enabled)switch(e){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 ov(e,t){if(!t)return e;let i=e??new URLSearchParams;for(let[s,n]of Object.entries(t))n!=null&&i.set(s,String(n));return i}async function cv(e){if((e.headers.get("content-type")??"").includes("application/json"))try{return await e.json()}catch{return null}try{return await e.text()}catch{return null}}function Cl(e){return e.endsWith("/")?e.slice(0,-1):e}var Le,Ne,Tl,nr,j,Y,te=v(()=>{Le="__vbServiceConfig",Ne=globalThis,Tl=()=>({baseUrl:"/go",headers:{},services:{}});Ne[Le]||(Ne[Le]=Tl());nr=()=>Ne[Le],j=class extends Error{constructor(t,i,s,n){super(`VBService(${s}): ${t} ${n}`),this.name="VBServiceError",this.status=t,this.body=i,this.role=s,this.path=n}};Y=class e{static configure(t={}){let i=nr();Ne[Le]={baseUrl:t.baseUrl??i.baseUrl,headers:{...i.headers,...t.headers??{}},services:{...i.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");let i=nr();return i.services[t]?Cl(i.services[t]):i.baseUrl?`${Cl(i.baseUrl)}/${t}`:`/go/${t}`}static _reset(){Ne[Le]=Tl()}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,i){return this.#t("GET",t,{params:i})}async post(t,i){return this.#t("POST",t,{body:i})}async patch(t,i){return this.#t("PATCH",t,{body:i})}async delete(t){return this.#t("DELETE",t,{})}async#t(t,i,s){let n=e.resolve(this.role),r=i?i.startsWith("/")?i:`/${i}`:"",a=new URL(`${n}${r}`,globalThis.location?.origin??"http://localhost"),o=ov(a.searchParams,s.params);o&&(a.search=o.toString());let c={method:t,headers:{...nr().headers}};s.body!==void 0&&(c.body=JSON.stringify(s.body),c.headers["content-type"]="application/json");let l=a.toString(),u=await fetch(l,c),d=await cv(u);if(!u.ok)throw new j(u.status,d,this.role,`${r||"/"}`);return d}};if(typeof window<"u"){let e=window.VB??(window.VB={});e.service??=Y,e.ServiceError??=j}});function fv(e,t){let i=0;for(;i<e.length&&i<t.length&&e[e.length-1-i]===t[t.length-1-i];)i++;return i}function pv(e,t){let i=0;for(;i<e.length&&i<t.length&&e[i]===t[i];)i++;return i}function Pi(e,t,i){return{prefix:e.slice(Math.max(0,t-32),t),suffix:e.slice(i,i+32)}}function _l(e,t){let i=Ml(t.text??"");if(!i)return null;if(t.endOffset<=e.length&&Ml(e.slice(t.startOffset,t.endOffset))===i)return{start:t.startOffset,end:t.endOffset};let s=new RegExp(t.text.trim().split(/\s+/).map(hv).join("\\s*"),"g"),n=t.prefix??"",r=t.suffix??"",a=null,o=-1,c=1/0;for(let l of e.matchAll(s)){let u=l.index,d=u+l[0].length,h=Pi(e,u,d),f=fv(h.prefix,n)+pv(h.suffix,r),p=Math.abs(u-t.startOffset);(f>o||f===o&&p<c)&&(a={start:u,end:d},o=f,c=p)}return a}var Ml,hv,Dl=v(()=>{Ml=e=>e.replace(/\s+/g,""),hv=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});function Bi(e){let t=2166136261;for(let i=0;i<e.length;i++)t^=e.charCodeAt(i),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Fl(){return"hn-"+crypto.randomUUID().slice(0,8)}function Ri(e,t){let i="highlightsLabel"+t[0].toUpperCase()+t.slice(1);return e.dataset[i]||vv[t]}function yv(e,{textLength:t,colors:i}){if(!e||typeof e!="object")return null;let s=e,{startOffset:n,endOffset:r,color:a}=s;if(!Number.isInteger(n)||!Number.isInteger(r))return null;let o=n,c=r;return o<0||c<=o||c>t||!cr(a)||!i.includes(a)||s.id!=null&&(typeof s.id!="string"||!/^[\w-]{1,64}$/.test(s.id))||s.text!=null&&typeof s.text!="string"||s.note!=null&&typeof s.note!="string"||s.prefix!=null&&typeof s.prefix!="string"||s.suffix!=null&&typeof s.suffix!="string"?null:{id:s.id||Fl(),startOffset:o,endOffset:c,text:s.text??"",prefix:(s.prefix??"").slice(-32),suffix:(s.suffix??"").slice(0,32),color:a,note:s.note??"",created:Number.isFinite(s.created)?s.created:Date.now()}}function cr(e){return typeof e=="string"&&gv.test(e)}function Bl(){if(_t.size===0){Mt&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(s=>s!==Mt),Mt=null);return}Mt||(Mt=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,Mt]);let e=[..._t.keys()],t=e.map(s=>`::highlight(hn-${s}) { background-color: var(--highlight-${s}); color: var(--highlight-${s}-ink, var(--highlight-ink, CanvasText)); text-decoration-line: underline; text-decoration-color: var(--highlight-${s}); text-underline-offset: 2px; }`),i=e.map((s,n)=>`::highlight(hn-${s}) { background-color: Mark; color: MarkText; text-decoration-line: underline; text-decoration-color: MarkText; text-decoration-style: ${Ol[n%Ol.length]}; text-decoration-thickness: 2px; }`);Mt.replaceSync(`${t.join(`
|
|
1
|
+
var em=Object.defineProperty;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var T=(e,t)=>{for(var i in t)em(e,i,{get:t[i],enumerable:!0})};function ge(){return Ns()}function Ns(){if(typeof window<"u"&&window.__VB_THEME_BASE)return String(window.__VB_THEME_BASE).replace(/\/$/,"");if(Ho)return Ho;if(typeof document<"u"){let e=document.querySelectorAll('script[src*="vanilla-breeze"]');for(let t of e){let i=t.getAttribute("src");if(i){let s=i.lastIndexOf("/");if(s!==-1)return i.slice(0,s)}}}return"/cdn"}function Vo(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):String(e).replace(/["\\]/g,"\\$&")}function zo(e){document.querySelectorAll(`link[data-vb-theme-preload="${Vo(e)}"]`).forEach(t=>t.remove())}function Ms(e){return sm.has(e)}function nm(e,t){return`${t}/themes/${e}.css`}function Uo(e,t){if(!Ms(e))return Promise.resolve();if(Ls.has(e))return Ls.get(e);let i=import(`${t}/packs/${e}.full.js`).catch(()=>{});return Ls.set(e,i),i}function rm(e,t){let i=Ns(),s=()=>{(Ms(t)||e.hasAttribute("data-vb-pack"))&&Uo(t,i)};return e.getAttribute("data-vb-theme-state")==="error"?Promise.reject(new Error(`Failed to load theme: ${t}`)):e.getAttribute("data-vb-theme-state")==="ready"||e.sheet?(s(),Promise.resolve()):new Promise((n,r)=>{let a=()=>{e.setAttribute("data-vb-theme-state","ready"),c(),s(),n(void 0)},o=()=>{e.setAttribute("data-vb-theme-state","error"),Et.delete(t),c(),r(new Error(`Failed to load theme: ${t}`))},c=()=>{e.removeEventListener("load",a),e.removeEventListener("error",o)};e.addEventListener("load",a,{once:!0}),e.addEventListener("error",o,{once:!0})})}async function ve(e){if(!e||im.has(e))return;if(Et.has(e))return Et.get(e);if(typeof document<"u"){let s=document.querySelector(`link[data-vb-theme="${Vo(e)}"]`);if(s){let n=rm(s,e);return Et.set(e,n),n}}let t=Ns(),i=Ms(e)?om(e,t):am(e,t);return Et.set(e,i),i}async function am(e,t){let i=nm(e,t);return new Promise((s,n)=>{zo(e);let r=document.createElement("link");r.rel="stylesheet",r.href=i,r.setAttribute("data-vb-theme",e),r.setAttribute("data-vb-theme-state","loading"),r.onload=()=>{r.setAttribute("data-vb-theme-state","ready"),s()},r.onerror=()=>{r.setAttribute("data-vb-theme-state","error"),r.remove(),Et.delete(e),n(new Error(`Failed to load theme: ${e}`))},document.head.appendChild(r)})}function om(e,t){let i=`${t}/packs/${e}.theme.css`,s=`${t}/packs/${e}.effects.css`;return new Promise((n,r)=>{zo(e);let a=document.createElement("link");a.rel="stylesheet",a.href=i,a.setAttribute("data-vb-theme",e),a.setAttribute("data-vb-pack",e),a.setAttribute("data-vb-theme-state","loading"),a.onload=()=>{a.setAttribute("data-vb-theme-state","ready");let o=document.createElement("link");o.rel="stylesheet",o.href=s,o.setAttribute("data-vb-pack-effects",e),document.head.appendChild(o),Uo(e,t),n()},a.onerror=()=>{a.setAttribute("data-vb-theme-state","error"),a.remove(),Et.delete(e),r(new Error(`Failed to load pack: ${e}`))},document.head.appendChild(a)})}var Et,Ls,Ho,im,sm,ye=v(()=>{Et=new Map,Ls=new Map,Ho=null;im=new Set(["default","a11y-high-contrast","a11y-large-text","a11y-dyslexia","modern","minimal","classic"]),sm=new Set(["kawaii","memphis"])});function cm(){let e=globalThis.localStorage;if(!e)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return e.getItem(t)},async setRaw(t,i){e.setItem(t,i)},async removeRaw(t){e.removeItem(t)},async keys(t){let i=[];for(let s=0;s<e.length;s++){let n=e.key(s);n&&n.startsWith(t)&&i.push(n)}return i}}}function ct(){return ri[ni]||(ri[ni]=cm()),ri[ni]}function Is(e,t){if(typeof e!="string"||!e)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:${e}:${t}`}function Go(e){if(typeof e!="string"||!e)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${e}:`}function Xo(e){try{let t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var ni,ri,S,it=v(()=>{ni="__vbStoreBackend",ri=globalThis;S={configure(e={}){ri[ni]=e.backend??null},async set(e,t,i){let s={data:i,timestamp:Date.now()};await ct().setRaw(Is(e,t),JSON.stringify(s))},async get(e,t,i){let s=await ct().getRaw(Is(e,t));if(s==null)return null;let n=Xo(s);return!n||i?.maxAge!=null&&Date.now()-n.timestamp>i.maxAge?null:n.data},async remove(e,t){await ct().removeRaw(Is(e,t))},async list(e){let t=Go(e),i=await ct().keys(t),s=[];for(let n of i){let r=await ct().getRaw(n);if(r==null)continue;let a=Xo(r);a&&s.push({key:n.slice(t.length),data:a.data,timestamp:a.timestamp})}return s},async clear(e){let t=Go(e),i=await ct().keys(t);for(let s of i)await ct().removeRaw(s)},async clearAll(){let e=await ct().keys("vb:");for(let t of e)await ct().removeRaw(t)},async setMany(e,t){for(let[i,s]of t)await S.set(e,i,s)}};if(typeof window<"u"){let e=window.VB??(window.VB={});e.store??=S}});function ib(e){return String(e).replace(/[\u0000- \u007f-\u009f]/g,"").toLowerCase()}function pc(e,t=!1){let i=ib(e);return t?/(^|,)(javascript|vbscript|livescript):/.test(i)?!0:/(^|,)data:/.test(i)?i.split(/(?=data:)/).filter(n=>n.startsWith("data:")).some(n=>!/^data:(image|audio|video|font)\//.test(n)):!1:/^(javascript|vbscript|livescript|data):/.test(i)}function gc(e){let t=String(e).replace(/\/\*[\s\S]*?\*\//g,"").replace(/\\/g,"").replace(/\s+/g,"").toLowerCase();return/expression\(|javascript:|vbscript:|-moz-binding|behavior:|@import|position:fixed/.test(t)}function nb(e,t){if(mc.has(t))return!0;let i=e.namespaceURI;return!!(i&&!Wm.has(i)||t==="title"&&i!==Qs||bc.has(t)&&i===Qs&&e.children?.length||jm.has(t)&&(e.getAttribute("attributeName")||e.getAttribute("attributename")||"").toLowerCase().includes("href"))}function rb(e,t){for(let i of[...e.attributes]){let s=i.name.toLowerCase();if(s.startsWith("on")||Gm.has(s)||!t.keepIds&&Xm.has(s)){e.removeAttribute(i.name);continue}if(s==="style"){(!t.keepStyle||gc(i.value))&&e.removeAttribute(i.name);continue}if((s==="id"||s==="name")&&!t.keepIds){let n=sb(i.value);s==="id"?t.ids.set(i.value,n):t.ids.set(`name:${i.value}`,n),e.setAttribute(i.name,n);continue}if(Km.has(s)||s.endsWith(":href")){pc(i.value,!1)&&e.removeAttribute(i.name);continue}Ym.has(s)&&pc(i.value,!0)&&e.removeAttribute(i.name)}}function ab(e,t){let i=(e.getAttribute("type")||"").toLowerCase();t==="button"&&i!=="button"&&e.setAttribute("type","button"),t==="input"&&/^(submit|reset|image)$/.test(i)&&e.setAttribute("type","button")}function ob(e,t){for(let i of e)for(let s of[...i.attributes]){let n=s.name.toLowerCase(),r=s.value;if((n==="href"||n.endsWith(":href"))&&r.startsWith("#")){let a=cb(r.slice(1));t.has(a)&&i.setAttribute(s.name,`#${t.get(a)}`)}else if(n==="usemap"&&r.startsWith("#")){let a=t.get(`name:${r.slice(1)}`);a?i.setAttribute(s.name,`#${a}`):i.removeAttribute(s.name)}else if(Jm.has(n)){let a=r.split(/\s+/).filter(Boolean).map(o=>t.get(o)||(o.startsWith(en)?o:null)).filter(Boolean);a.length?i.setAttribute(s.name,a.join(" ")):i.removeAttribute(s.name)}else r.includes("url(#")&&i.setAttribute(s.name,r.replace(/url\(#([^)]+)\)/g,(a,o)=>t.has(o)?`url(#${t.get(o)})`:a))}}function cb(e){try{return decodeURIComponent(e)}catch{return e}}function sn(e){let t=e.childNodes;if(t)for(let i of[...t])i.nodeType===8?i.remove():(i.nodeType===1||i.nodeType===11)&&sn(i)}function nn(e,t){sn(e);let i=[...e.querySelectorAll("*")];t.includeRoot&&i.unshift(e);let s=new Map,n=[],r={...t,ids:s};for(let a of i){if(!ub(a,e))continue;let o=vc(a);if(t.svgOnly&&(bc.has(o)||o==="style")){if(o==="style"&&gc(a.textContent||"")){a.remove();continue}}else if(nb(a,o)){a.remove();continue}if(!t.keepIds&&!t.svgOnly&&Qm.has(o)){lb(a);continue}if(o==="template"){let l=a.content;l&&nn(l,{...t,includeRoot:!1})}rb(a,r),t.keepIds||ab(a,o);let c=Zm[o];if(c)for(let l of c)a.removeAttribute(l);if(o==="include-file"&&!t.allowIncludeFile&&a.removeAttribute("src"),!t.keepIds&&!t.svgOnly&&o.includes("-")&&o!=="include-file"&&!eb.has(o))for(let l of tb)a.removeAttribute(l);n.push(a)}!t.keepIds&&s.size&&ob(n,s)}function lb(e){let t=e.parentNode;if(t){for(let i of[...e.childNodes])t.insertBefore(i,e);e.remove()}}function ub(e,t){let i=e;for(;i;){if(i===t)return!0;i=i.parentNode??i.parent??null}return!1}function mi(e,t={}){let i=document.createElement("template");return e&&typeof e=="string"&&(i.innerHTML=e,nn(i.content,{allowIncludeFile:!!t.allowIncludeFile,keepIds:!!t.keepIds,keepStyle:!!t.keepStyle})),i.content}function yc(e){return!e||typeof e!="object"||!("attributes"in e)||nn(e,{includeRoot:!0,keepIds:!0,keepStyle:!0,svgOnly:!0}),e}function wc(e){let t=document.createElement("template");if(!e||typeof e!="string")return t.content;t.innerHTML=e,t.content.querySelector("math")||(t.innerHTML=`<math>${e}</math>`);let i=t.content;sn(i);for(let s of[...i.childNodes])s.nodeType===3&&!s.textContent?.trim()||(s.nodeType!==1||s.namespaceURI!==tn)&&s.remove();for(let s of[...i.querySelectorAll("*")]){if(!i.contains(s))continue;let n=vc(s);if(s.namespaceURI!==tn||mc.has(n)){s.remove();continue}for(let r of[...s.attributes])db.test(r.name.toLowerCase())&&s.removeAttribute(r.name)}return i}var Um,Qs,tn,Wm,en,mc,bc,jm,Km,Ym,Gm,Xm,Jm,Zm,Qm,tb,eb,vc,sb,db,Vt=v(()=>{Um="http://www.w3.org/1999/xhtml",Qs="http://www.w3.org/2000/svg",tn="http://www.w3.org/1998/Math/MathML",Wm=new Set([Um,Qs,tn]),en="user-content-",mc=new Set(["script","iframe","frame","frameset","object","embed","applet","portal","fencedframe","form","base","link","meta","noscript","foreignobject","style","xmp","noembed","noframes","plaintext","mglyph","malignmark","annotation-xml"]),bc=new Set(["title","desc"]),jm=new Set(["animate","set","animatemotion","animatetransform"]),Km=new Set(["href","xlink:href","action","formaction","data","codebase","cite","background","longdesc","manifest","to","from","values","by"]),Ym=new Set(["src","poster","srcset"]),Gm=new Set(["srcdoc","form","formaction","formmethod","formtarget","formenctype","formnovalidate","action","method","ping"]),Xm=new Set(["popovertarget","popovertargetaction","commandfor","command","interestfor","autofocus"]),Jm=new Set(["for","headers","list","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-flowto","aria-details","aria-errormessage","aria-activedescendant"]),Zm={"include-file":["trusted","allow-scripts","allow-cross-origin"],"markdown-viewer":["src","sanitize","ping","allow-cross-origin"]},Qm=new Set(["social-embed","youtube-player","geo-map"]),tb=["src","src-dark","data-src","url","endpoint","tile-url","data-versions"],eb=new Set(["audio-player","video-player","image-map","brand-mark"]);vc=e=>String(e.localName||e.tagName||"").toLowerCase(),sb=e=>e.startsWith(en)?e:en+e;db=/^(on|href$|src$|style$|id$|name$|xlink|xml:|form[a-z])/});function gb(e,t){let i=xc.get(t);i||xc.set(t,i=new Map);let s=i.get(e);if(!s||!s.region.isConnected){let r=(t.ownerDocument||document).createElement("span");r.setAttribute("data-vb-announcer",e),r.setAttribute("role",e==="assertive"?"alert":"status"),r.setAttribute("aria-live",e),r.setAttribute("aria-atomic","true"),r.style.cssText=bb,t.appendChild(r),s={region:r},i.set(e,s)}return s}function W(e,{politeness:t="polite",root:i}={}){let s=String(e??"").trim();if(!s||typeof document>"u")return null;let n=i||document.body;if(!n)return null;let a=gb(t==="assertive"?"assertive":"polite",n);return clearTimeout(a.write),clearTimeout(a.clear),a.region.textContent="",a.write=setTimeout(()=>{a.region.textContent=s,a.clear=setTimeout(()=>{a.region.textContent=""},7e3)},50),a.region}function q(e,t,i,s){let n=`data-label-${t}`,a=e?.closest?.(`[${n}]`)?.getAttribute(n)||i;return s?a.replace(/\{(\w+)\}/g,(o,c)=>c in s?String(s[c]):o):a}var bb,xc,lt=v(()=>{bb=["position:absolute","inline-size:1px","block-size:1px","padding:0","margin:-1px","overflow:hidden","clip-path:inset(50%)","white-space:nowrap","border:0"].join(";"),xc=new WeakMap});var Tc={};T(Tc,{copyRich:()=>Ab,copyText:()=>ut,initCopyButtons:()=>xb,pasteFromClipboard:()=>kc});function yb(e){if(typeof document.execCommand!="function"||!document.body)return!1;let t=document.activeElement,i=document.createElement("textarea");i.value=e,i.setAttribute("readonly",""),i.setAttribute("aria-hidden","true"),i.style.cssText="position:fixed;inset-block-start:0;inset-inline-start:0;opacity:0;pointer-events:none",document.body.appendChild(i),i.select();let s=!1;try{s=document.execCommand("copy")}catch{s=!1}return i.remove(),t?.focus?.({preventScroll:!0}),s}function wb(e){if(!e)return!1;if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e.focus(),e.select(),!0;let t=window.getSelection?.();if(!t)return!1;let i=document.createRange();return i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i),!t.isCollapsed}async function ut(e,t={}){if(e==null||e==="")return!1;let{button:i,duration:s=un}=t,n=!1,r=null;try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(e),n=!0}catch(o){r=o,n=yb(e)}if(n)return zt({button:i,duration:s,state:"copied",eventName:"copy:done",eventDetail:{text:e},message:t.announceMessage??q(i,"copied",kt.copied)}),!0;let a=wb(t.source);return zt({button:i,duration:s,state:"failed",eventName:"copy:error",eventDetail:{text:e,error:r},message:t.failureMessage??q(i,"copy-failed",a?kt["copy-failed-selected"]:kt["copy-failed"])}),!1}async function Ab(e,t={}){let{text:i,html:s,blob:n}=e??{};if(!i&&!s&&!n)return!1;let{button:r,duration:a=un}=t;if(typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"){let c={};i&&(c["text/plain"]=new Blob([i],{type:"text/plain"})),s&&(c["text/html"]=new Blob([s],{type:"text/html"})),n&&(c[n.type]=n);try{return await navigator.clipboard.write([new ClipboardItem(c)]),zt({button:r,duration:a,state:"copied",eventName:"copy:done",eventDetail:{payload:e},message:t.announceMessage??q(r,"copied",kt.copied)}),!0}catch{}}return i?ut(i,t):(zt({button:r,duration:a,state:"failed",eventName:"copy:error",eventDetail:{payload:e,error:null},message:t.failureMessage??q(r,"copy-failed",kt["copy-failed"])}),!1)}function zt({button:e,duration:t,message:i,eventDetail:s,state:n,eventName:r}){if(e){e.dataset.state=n;let a=ln.get(e);a&&clearTimeout(a),ln.set(e,setTimeout(()=>{e.dataset.state===n&&delete e.dataset.state,ln.delete(e)},t)),e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:s}))}W(i,{politeness:n==="failed"?"assertive":"polite"})}async function kc(e,t={}){let{button:i,duration:s=un}=t,n;try{if(!navigator.clipboard?.readText)throw new Error("Clipboard API unavailable");n=await navigator.clipboard.readText()}catch(r){return zt({button:i,duration:s,state:"failed",eventName:"paste:error",eventDetail:{target:e,error:r},message:t.failureMessage??q(i,"paste-failed",kt["paste-failed"])}),null}return e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?e.value=n:e.textContent=n,e.dispatchEvent(new Event("input",{bubbles:!0}))),zt({button:i,duration:s,state:"pasted",eventName:"paste:done",eventDetail:{text:n,target:e},message:t.announceMessage??q(i,"pasted",kt.pasted)}),n}function Cc(e){let t=e.dataset.copyTarget;if(!t)return null;try{return document.querySelector(t)}catch{return null}}function Eb(e){if(e.dataset.copy)return e.dataset.copy;let t=Cc(e);if(!t)return"";let i=e.dataset.copyAttr;return i?t.getAttribute(i)??"":t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t.value:t.textContent??""}function Sb(e){let t=e.target?.closest?.(vb);if(!t||t.matches(':disabled, [aria-disabled="true"]'))return;if(t.dataset.pasteTarget){let s=null;try{s=document.querySelector(t.dataset.pasteTarget)}catch{}if(!s)return;kc(s,{button:t});return}let i=Eb(t);i&&ut(i,{button:t,source:Cc(t)??void 0})}function xb(e=document){e.querySelectorAll("[data-copy-init]").forEach(t=>t.removeAttribute("data-copy-init"))}var un,vb,kt,ln,Ut=v(()=>{lt();un=1500,vb="[data-copy], [data-copy-target], [data-paste-target]",kt={copied:"Copied to clipboard",pasted:"Pasted from clipboard","copy-failed":"Copy failed","copy-failed-selected":"Copy failed. Text selected, press Ctrl+C to copy","paste-failed":"Paste failed"},ln=new WeakMap;typeof document<"u"&&!document.__vbCopyDelegated&&(document.__vbCopyDelegated=!0,document.addEventListener("click",Sb))});function Ct(e,t){return e.replace(/\{(\w+)\}/g,(i,s)=>s in t?String(t[s]):i)}function pn(e){switch(e.style){case"load-more":return $b(e);case"prev-next":return Ib(e);default:return Db(e)}}function mn(e="Pagination"){let t=document.createElement("nav");return t.setAttribute("data-paged-nav",""),t.setAttribute("aria-label",e),t}function Db({page:e,totalPages:t,pageNumbers:i,navLabel:s,prevLabel:n="Previous",nextLabel:r="Next",pageLabel:a=o=>`Page ${o}`}){let o=mn(s),c=document.createElement("ol");c.setAttribute("role","list"),c.appendChild(Se(n,e-1,e===1,!1,"prev"));for(let l of i)if(l==="\u2026"){let u=document.createElement("li");u.textContent="\u2026",u.setAttribute("aria-hidden","true"),u.setAttribute("data-paged-ellipsis",""),c.appendChild(u)}else{let u=Se(String(l),l,!1,l===e,"page");u.firstElementChild?.setAttribute("aria-label",a(l)),c.appendChild(u)}return c.appendChild(Se(r,e+1,e===t,!1,"next")),o.appendChild(c),o}function Ib({page:e,totalPages:t,navLabel:i,prevLabel:s="Previous",nextLabel:n="Next",statusLabel:r=(a,o)=>`Page ${a} of ${o}`}){let a=mn(i),o=document.createElement("ol");o.setAttribute("role","list"),o.appendChild(Se(s,e-1,e===1,!1,"prev"));let c=document.createElement("li");return c.setAttribute("data-paged-status",""),c.setAttribute("aria-live","polite"),c.textContent=r(e,t),o.appendChild(c),o.appendChild(Se(n,e+1,e===t,!1,"next")),a.appendChild(o),a}function $b({total:e,visible:t,navLabel:i,loadMoreLabel:s=r=>`Load more (${r})`,noMoreLabel:n="No more"}){let r=mn(i),a=document.createElement("button");a.type="button",a.setAttribute("data-paged-loadmore","");let o=Math.max(0,e-t);return a.textContent=o>0?s(o):n,a.disabled=o<=0,r.appendChild(a),r}function Se(e,t,i,s,n){let r=document.createElement("li"),a=document.createElement("button");return a.type="button",a.setAttribute("data-paged-action",n),a.dataset.pagedTarget=String(t),a.textContent=e,s&&a.setAttribute("aria-current","page"),i&&(a.disabled=!0),r.appendChild(a),r}function bn(e,{onNavigate:t,onLoadMore:i}){t&&e.querySelectorAll("button[data-paged-target]").forEach(s=>{s.addEventListener("click",()=>t(parseInt(s.dataset.pagedTarget||"1",10)))}),i&&e.querySelectorAll("button[data-paged-loadmore]").forEach(s=>{s.addEventListener("click",()=>i())})}function Nc(e,t){if(!e||!e.parentNode)return;let i=document.activeElement,n=!!i&&e.contains(i)&&i?{action:i.getAttribute("data-paged-action"),target:i.getAttribute("data-paged-target"),loadMore:i.hasAttribute("data-paged-loadmore")}:null,r=e.querySelector("[data-paged-status]"),a=t.querySelector("[data-paged-status]");r&&a&&(r.textContent!==a.textContent&&(r.textContent=a.textContent),a.hasAttribute("aria-live")?r.setAttribute("aria-live",a.getAttribute("aria-live")||"polite"):r.removeAttribute("aria-live"),a.replaceWith(r)),e.replaceWith(t),n&&Ob(t,n)}function Ob(e,t){let i=n=>e.querySelector(`${n}:not([disabled])`),s=[];t.loadMore&&s.push("button[data-paged-loadmore]"),t.action&&(s.push(`button[data-paged-action="${t.action}"][data-paged-target="${t.target}"]`),t.action!=="page"&&s.push(`button[data-paged-action="${t.action}"]`)),s.push('button[aria-current="page"]',"button");for(let n of s){let r=i(n);if(r){r.focus();return}}e.tabIndex=-1,e.focus()}var gn=v(()=>{});function vi(e){return e.split("-")[0].toLowerCase()}function Rb(e){return Pb.has(vi(e??I()))}function I(e){return ft(e&&e.closest("[lang]")?.lang||document.documentElement.lang||navigator.language||"en")}function ft(e,t="en-US"){try{if(e)return Intl.getCanonicalLocales(e),e}catch{}try{return Intl.getCanonicalLocales(t),t}catch{return"en-US"}}var Pb,vn,G=v(()=>{Pb=new Set(["ar","arc","dv","fa","ha","he","khw","ks","ku","ps","sd","ug","ur","uz","yi"]);vn=class{constructor({locale:t,messages:i={},fallbackLocale:s="en",root:n=document}={}){this.locale=t??I(),this.messages=i,this.fallbackLocale=s,this.root=n}t(t,i={}){let s=vi(this.locale),r=(this.messages[s]??this.messages[this.locale]??this.messages[this.fallbackLocale]??{})[t]??this.messages[this.fallbackLocale]?.[t]??t;for(let[a,o]of Object.entries(i))r=r.replaceAll(`{{${a}}}`,o);return r}apply(t=this.root){let i=t.querySelectorAll("[data-i18n]");for(let s of i){let n=s,r=n.dataset.i18n??"",a=n.dataset.i18nAttr,o=n.dataset.i18nVars?JSON.parse(n.dataset.i18nVars):{},c=this.t(r,o);if(a)n.setAttribute(a,c);else if(n.children.length===0)n.textContent=c;else{let l=[...n.childNodes].find(u=>u.nodeType===Node.TEXT_NODE);l?l.textContent=c:n.prepend(document.createTextNode(c))}}}async load(t,i){let s=await fetch(i);if(!s.ok)throw new Error(`VbI18n: failed to load messages from ${i}`);let n=await s.json();this.messages[t]={...this.messages[t]??{},...n}}setLocale(t){this.locale=t,this.apply(),document.dispatchEvent(new CustomEvent("vb:locale-change",{bubbles:!0,detail:{locale:t}}))}watch(){let t=i=>{this.locale=i.detail.locale,this.apply()};return document.addEventListener("vb:locale-change",t),()=>document.removeEventListener("vb:locale-change",t)}}});function yi(e){return[...String(e??"").trim().toLowerCase().matchAll(/([^+]+|\+)(?:\+|$)/g)].map(i=>i[1].trim()).filter(Boolean).map(i=>i==="plus"?"+":i)}function En(e,t=X){let i=t?Mc.mac:Mc.other;if(e in i)return{label:i[e],spoken:(t?_c.mac:_c.other)[e],modifier:!0};let s=qb[e];if(s)return{...s,modifier:!1};let n=e.toUpperCase();return{label:n,spoken:n,modifier:!1}}function Dc(e){return yi(e).map(t=>En(t).label).join(X?"":"+")}function Bb(e){let t=String(e??"").toLowerCase();return Fb[t]??t}function Wt(e){let t=yi(e);return{key:Bb(t.pop()??""),meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl")||t.includes("control"),shift:t.includes("shift"),alt:t.includes("alt")||t.includes("option")}}function Ic(e){return e.length===1&&!/[a-z0-9 ]/.test(e)}function $c(e,t){let s=(e.key==="Spacebar"?" ":String(e.key??"").toLowerCase())===t.key;if(!s&&(e.altKey||e.shiftKey)&&/^[a-z0-9]$/.test(t.key)){let a=/\d/.test(t.key)?`Digit${t.key}`:`Key${t.key.toUpperCase()}`;s=e.code===a}if(!s)return!1;let n,r;return X?(n=t.meta,r=t.ctrl):(n=!1,r=t.meta||t.ctrl),!(n!==e.metaKey||r!==e.ctrlKey||!Ic(t.key)&&t.shift!==e.shiftKey||t.alt!==e.altKey)}function wi(e){let t=typeof e=="string"?Wt(e):e;return!t.meta&&!t.ctrl&&!t.alt&&t.key.length===1}function Oc(e,t){let i=Wt(e),s=Wt(t),n=X?i.ctrl:i.ctrl||i.meta,r=X?s.ctrl:s.ctrl||s.meta,a=X&&i.meta,o=X&&s.meta,c=!Ic(i.key);return i.key===s.key&&n===r&&a===o&&i.alt===s.alt&&(!c||i.shift===s.shift)}function Ai(e,t=X){let i=Wt(e),s=[];i.alt&&s.push("Alt"),(i.ctrl||i.meta&&!t)&&s.push("Control"),i.meta&&t&&s.push("Meta"),i.shift&&s.push("Shift");let n=Hb[i.key];return n||(n=/^f\d{1,2}$/.test(i.key)||i.key.length===1?i.key.toUpperCase():i.key[0].toUpperCase()+i.key.slice(1)),[...s,n].join("+")}var X,Mc,_c,qb,Fb,Hb,xe=v(()=>{X=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),Mc={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",option:"\u2325",shift:"\u21E7",ctrl:"\u2303",control:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift",ctrl:"Ctrl",control:"Ctrl"}},_c={mac:{meta:"Command",cmd:"Command",alt:"Option",option:"Option",shift:"Shift",ctrl:"Control",control:"Control"},other:{meta:"Control",cmd:"Control",alt:"Alt",option:"Alt",shift:"Shift",ctrl:"Control",control:"Control"}},qb={escape:{label:"Esc",spoken:"Escape"},esc:{label:"Esc",spoken:"Escape"},enter:{label:"Enter",spoken:"Enter"},return:{label:"Enter",spoken:"Enter"},tab:{label:"Tab",spoken:"Tab"},space:{label:"Space",spoken:"Space"},backspace:{label:"Backspace",spoken:"Backspace"},delete:{label:"Del",spoken:"Delete"},del:{label:"Del",spoken:"Delete"},insert:{label:"Ins",spoken:"Insert"},home:{label:"Home",spoken:"Home"},end:{label:"End",spoken:"End"},pageup:{label:"PgUp",spoken:"Page up"},pagedown:{label:"PgDn",spoken:"Page down"},arrowup:{label:"\u2191",spoken:"Up arrow"},up:{label:"\u2191",spoken:"Up arrow"},arrowdown:{label:"\u2193",spoken:"Down arrow"},down:{label:"\u2193",spoken:"Down arrow"},arrowleft:{label:"\u2190",spoken:"Left arrow"},left:{label:"\u2190",spoken:"Left arrow"},arrowright:{label:"\u2192",spoken:"Right arrow"},right:{label:"\u2192",spoken:"Right arrow"},"+":{label:"+",spoken:"Plus"},plus:{label:"+",spoken:"Plus"}};Fb={esc:"escape",return:"enter",del:"delete",ins:"insert",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",space:" ",spacebar:" ",plus:"+",pgup:"pageup",pgdn:"pagedown"};Hb={" ":"Space","+":"Plus",escape:"Escape",enter:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight"}});function Tt(){return typeof document>"u"?!0:document.documentElement.getAttribute(ke)!=="off"}function Pc(e){let t=document.documentElement,i=Tt();e?t.removeAttribute(ke):t.setAttribute(ke,"off"),i!==!!e&&window.dispatchEvent(new CustomEvent(Vb,{detail:{enabled:!!e}}))}function Ub(){try{let e=globalThis.localStorage?.getItem(zb);if(!e)return null;let t=JSON.parse(e)?.data?.charShortcuts;return typeof t=="boolean"?t:null}catch{return null}}function qc(){return Rc}var ke,Vb,zb,Rc,Sn=v(()=>{ke="data-char-shortcuts",Vb="vb:char-shortcuts-change",zb="vb:settings:extensions";Rc=!0;if(typeof document<"u"){let e=Ub();e===null&&(Rc=Tt()),e===!1?document.documentElement.setAttribute(ke,"off"):e===!0&&document.documentElement.removeAttribute(ke)}});function jb(e){let t=e;return!t||!t.tagName?!1:Wb.has(t.tagName)||t.isContentEditable}function Kb(e){if(e.repeat||e.isComposing||e.defaultPrevented)return;let t=jb(e.target),i=!Tt(),s=document.activeElement;for(let n of jt)if(!(t&&!n.global)&&!(n.scope&&!(n.scope.isConnected&&n.scope.contains(s)))&&!(i&&n.character&&!n.scope)&&!(n.enabled&&!n.enabled())&&$c(e,n.descriptor)){e.preventDefault(),n.callback(e);return}}function Yb(){Fc||(document.addEventListener("keydown",Kb),Fc=!0)}function Kt(e,t,i={}){Yb();let s=Wt(e),n={combo:e,descriptor:s,callback:t,global:i.global===!0,scope:i.scope??null,enabled:typeof i.enabled=="function"?i.enabled:null,character:wi(s)},r=jt.find(a=>!a.scope&&!n.scope&&Oc(a.combo,e));return r&&console.warn(`[hotkey-bind] Shortcut "${e}" is already bound as "${r.combo}". Last-bound wins.`),jt.unshift(n),function(){let o=jt.indexOf(n);o!==-1&&jt.splice(o,1)}}function Bc(){return jt.map(e=>e.combo)}var Wb,jt,Fc,Ei=v(()=>{xe();Sn();Wb=new Set(["INPUT","TEXTAREA","SELECT"]),jt=[],Fc=!1});var Mn={};T(Mn,{addDialogDismiss:()=>tl,addFlickListener:()=>Jc,addLongPress:()=>Qc,addPullToRefresh:()=>yg,addSwipeListener:()=>Xc,haptic:()=>Li,initGestures:()=>el,makeSwipeable:()=>Zc});function Xc(e,t={}){let i=t.threshold??50,s=t.restraint??100,n=t.timeout??300,r=t.velocity??.5,a=t.minFlickDistance??10,o,c,l;function u(h){h.isPrimary&&(o=h.clientX,c=h.clientY,l=Date.now())}function d(h){if(!h.isPrimary)return;let f=h.clientX-o,p=h.clientY-c,m=Date.now()-l;if(m>n)return;let b=Math.abs(f),g=Math.abs(p),A=Math.max(b,g),y=m>0?A/m:0,O=y>=r&&A>=a,M;if((b>=i||O&&b>g)&&g<=s?M=f<0?"left":"right":(g>=i||O&&g>b)&&b<=s&&(M=p<0?"up":"down"),M){let J=M==="left"||M==="right"?b:g;e.dispatchEvent(new CustomEvent(`swipe-${M}`,{bubbles:!0,detail:{distance:J,duration:m,velocity:y,flick:O}}))}}return e.addEventListener("pointerdown",u,{passive:!0}),e.addEventListener("pointerup",d,{passive:!0}),()=>{e.removeEventListener("pointerdown",u),e.removeEventListener("pointerup",d)}}function Jc(e,t={}){let i=t.minDistance??10,s=t.velocity??.6,n=t.timeout??250,r=t.restraint??80,a,o,c;function l(d){d.isPrimary&&(a=d.clientX,o=d.clientY,c=Date.now())}function u(d){if(!d.isPrimary)return;let h=d.clientX-a,f=d.clientY-o,p=Date.now()-c;if(p===0||p>n)return;let m=Math.abs(h),b=Math.abs(f),g=Math.max(m,b);if(g<i)return;let A=g/p;if(A<s)return;let y;if(m>b&&b<=r?y=h<0?"left":"right":b>m&&m<=r&&(y=f<0?"up":"down"),y){let O=y==="left"||y==="right"?m:b;e.dispatchEvent(new CustomEvent(`swipe-${y}`,{bubbles:!0,detail:{distance:O,duration:p,velocity:A,flick:!0}}))}}return e.addEventListener("pointerdown",l,{passive:!0}),e.addEventListener("pointerup",u,{passive:!0}),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointerup",u)}}function Zc(e,t={}){let i=t.threshold??100,s=t.direction??"horizontal",n=t.removeOnDismiss??!0,r=s==="horizontal",a=0,o=0,c=!1;function l(m){!m.isPrimary||e.hasAttribute("data-dismissed")||(m.preventDefault(),c=!0,a=r?m.clientX:m.clientY,o=0,e.setPointerCapture(m.pointerId),e.setAttribute("data-swiping",""))}function u(m){if(!c||!m.isPrimary)return;o=(r?m.clientX:m.clientY)-a;let g=1-Math.min(Math.abs(o)/i,1)*.5;r?e.style.transform=`translateX(${o}px)`:e.style.transform=`translateY(${o}px)`,e.style.opacity=String(g)}function d(m){!c||!m.isPrimary||(c=!1,e.releasePointerCapture(m.pointerId),e.removeAttribute("data-swiping"),Math.abs(o)>=i?f(o>0?"right":"left"):p())}function h(m){!c||!m.isPrimary||(c=!1,e.releasePointerCapture(m.pointerId),e.removeAttribute("data-swiping"),p())}function f(m){let b=m==="right"?"100%":"-100%";e.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",e.style.transform=r?`translateX(${b})`:`translateY(${b})`,e.style.opacity="0",e.setAttribute("data-dismissed",""),Li.dismiss(),e.dispatchEvent(new CustomEvent("swipe-dismiss",{bubbles:!0,detail:{direction:m,distance:Math.abs(o)}})),n&&e.addEventListener("transitionend",()=>e.remove(),{once:!0})}function p(){e.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",e.style.transform="",e.style.opacity="",e.addEventListener("transitionend",()=>{e.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",l),e.addEventListener("pointermove",u),e.addEventListener("pointerup",d),e.addEventListener("pointercancel",h),()=>{e.removeEventListener("pointerdown",l),e.removeEventListener("pointermove",u),e.removeEventListener("pointerup",d),e.removeEventListener("pointercancel",h)}}function yg(e,t,i={}){let s=i.threshold??70,n=i.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),e.prepend(r);let o=0,c=!1,l=!1;function u(b){!b.isPrimary||l||e.scrollTop<=0&&(o=b.clientY,c=!0)}function d(b){if(!c||!b.isPrimary||l)return;let g=b.clientY-o;if(g<=0){r.style.transform="",r.style.opacity="";return}let A=Math.min(g,n),y=A/s;r.style.transform=`translateY(${A}px)`,r.style.opacity=String(Math.min(y,1)),y>=1?r.setAttribute("data-pull-ready",""):r.removeAttribute("data-pull-ready")}function h(b){!c||!b.isPrimary||(c=!1,r.hasAttribute("data-pull-ready")&&!l?p():m())}function f(b){!c||!b.isPrimary||(c=!1,m())}async function p(){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"),m()}}function m(){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 e.addEventListener("pointerdown",u,{passive:!0}),e.addEventListener("pointermove",d,{passive:!0}),e.addEventListener("pointerup",h,{passive:!0}),e.addEventListener("pointercancel",f,{passive:!0}),()=>{e.removeEventListener("pointerdown",u),e.removeEventListener("pointermove",d),e.removeEventListener("pointerup",h),e.removeEventListener("pointercancel",f),r.remove()}}function Qc(e,t,i={}){let s=i.duration??500,n=i.hapticFeedback??!0,r=i.blockContextMenu??!0,a=null;function o(u){u.isPrimary&&(a=setTimeout(()=>{n&&Li.tap(),t(u),a=null},s))}function c(){a&&(clearTimeout(a),a=null)}function l(u){r&&u.preventDefault()}return e.addEventListener("pointerdown",o,{passive:!0}),e.addEventListener("pointermove",c,{passive:!0}),e.addEventListener("pointerup",c,{passive:!0}),e.addEventListener("pointercancel",c,{passive:!0}),e.addEventListener("contextmenu",l),()=>{c(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointermove",c),e.removeEventListener("pointerup",c),e.removeEventListener("pointercancel",c),e.removeEventListener("contextmenu",l)}}function tl(e,t={}){let i=t.threshold??80,s=0,n=0,r=!1;function a(h){if(!h.isPrimary||!e.open)return;let f=h.target;f.closest("a, button, input, select, textarea, [contenteditable]")&&!f.closest("header")||(r=!0,s=h.clientY,n=0,e.setPointerCapture(h.pointerId),e.style.transition="none")}function o(h){if(!r||!h.isPrimary)return;if(n=h.clientY-s,n<=0){e.style.transform="",e.style.opacity="";return}let p=1-Math.min(n/i,1)*.4;e.style.transform=`translateY(${n}px)`,e.style.opacity=String(p)}function c(h){!r||!h.isPrimary||(r=!1,e.releasePointerCapture(h.pointerId),n>=i?u():d())}function l(h){!r||!h.isPrimary||(r=!1,e.releasePointerCapture(h.pointerId),d())}function u(){e.style.transition="transform 0.2s ease-out, opacity 0.2s ease-out",e.style.transform="translateY(100%)",e.style.opacity="0",Li.dismiss(),e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform="",e.style.opacity="",e.close("dismiss")},{once:!0})}function d(){e.style.transition="transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease",e.style.transform="",e.style.opacity="",e.addEventListener("transitionend",()=>{e.style.transition=""},{once:!0})}return e.addEventListener("pointerdown",a),e.addEventListener("pointermove",o),e.addEventListener("pointerup",c),e.addEventListener("pointercancel",l),()=>{e.removeEventListener("pointerdown",a),e.removeEventListener("pointermove",o),e.removeEventListener("pointerup",c),e.removeEventListener("pointercancel",l)}}function el(e=document){let t=[];for(let i of e.querySelectorAll('[data-gesture="swipe"]'))t.push(Xc(i));for(let i of e.querySelectorAll('[data-gesture="flick"]'))t.push(Jc(i));for(let i of e.querySelectorAll('[data-gesture="dismiss"]'))t.push(Zc(i));for(let i of e.querySelectorAll('[data-gesture="long-press"]'))t.push(Qc(i,()=>{i.dispatchEvent(new CustomEvent("long-press",{bubbles:!0}))}));for(let i of e.querySelectorAll('dialog[data-gesture="dismiss-down"]'))t.push(tl(i));return()=>t.forEach(i=>i())}var Li,Nn,_n=v(()=>{Li={tap:()=>navigator.vibrate?.(8),confirm:()=>navigator.vibrate?.([8,40,8]),error:()=>navigator.vibrate?.([30,60,30]),dismiss:()=>navigator.vibrate?.(15)};Nn=typeof document<"u"?document.documentElement:null;(!Nn||!Nn.hasAttribute("data-vb-gestures-init"))&&(Nn?.setAttribute("data-vb-gestures-init",""),el())});var kl={};T(kl,{destroyStickyManager:()=>ov,findBannerHeader:()=>Sl,initStickyManager:()=>ir});function Sl(){for(let e of document.querySelectorAll("header"))if(!e.parentElement?.closest(av))return e;return null}function gt(){let e=document.documentElement;if(!e.hasAttribute("data-sticky"))return;let t=Sl();t&&!t.hasAttribute("data-sticky")&&(t.dataset.sticky="",tr.add(t)),t&&Oi&&!er.has(t)&&(Oi.observe(t),er.add(t));let i=t?.hasAttribute("data-sticky")&&getComputedStyle(t).position!=="static",s=t&&i?t.getBoundingClientRect().height:0;e.style.setProperty("--sticky-offset",`${s}px`)}function xl(){gt()}function ir(){if($i){gt();return}$i=!0,Oi=new ResizeObserver(gt),er=new WeakSet,gt(),requestAnimationFrame(gt),document.fonts?.ready?.then(gt),window.addEventListener("resize",gt,{passive:!0}),document.addEventListener("toggle",xl,!0)}function ov(){if($i){$i=!1,window.removeEventListener("resize",gt),document.removeEventListener("toggle",xl,!0),Oi?.disconnect();for(let e of tr)delete e.dataset.sticky;tr.clear(),document.documentElement.style.removeProperty("--sticky-offset")}}var $i,Oi,tr,er,av,sr=v(()=>{$i=!1,tr=new Set,er=new WeakSet,av='article, aside, main, nav, section, [role="article"], [role="complementary"], [role="main"], [role="navigation"], [role="region"]'});var Tl={};T(Tl,{SoundManager:()=>cv});var Cl,nr,cv,Ll=v(()=>{Cl="vb-sound",nr={enabled:!1,volume:.5},cv={_ctx:null,_enabled:!1,_volume:.5,_initialized:!1,init(){if(this._initialized)return this;let e=this._load();return this._enabled=e.enabled,this._volume=e.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 e=localStorage.getItem(Cl);return e?{...nr,...JSON.parse(e)}:{...nr}}catch{return{...nr}}},_save(e){try{let t=this._load();localStorage.setItem(Cl,JSON.stringify({...t,...e}))}catch{}},_playTone(e,t,i="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=e,n.type=i,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(e){this._volume=Math.max(0,Math.min(1,e)),this._save({volume:this._volume})},getVolume(){return this._volume},play(e){if(this._enabled)switch(e){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 hv(e,t){if(!t)return e;let i=e??new URLSearchParams;for(let[s,n]of Object.entries(t))n!=null&&i.set(s,String(n));return i}async function fv(e){if((e.headers.get("content-type")??"").includes("application/json"))try{return await e.json()}catch{return null}try{return await e.text()}catch{return null}}function Nl(e){return e.endsWith("/")?e.slice(0,-1):e}var Me,_e,Ml,lr,j,Y,ee=v(()=>{Me="__vbServiceConfig",_e=globalThis,Ml=()=>({baseUrl:"/go",headers:{},services:{}});_e[Me]||(_e[Me]=Ml());lr=()=>_e[Me],j=class extends Error{constructor(t,i,s,n){super(`VBService(${s}): ${t} ${n}`),this.name="VBServiceError",this.status=t,this.body=i,this.role=s,this.path=n}};Y=class e{static configure(t={}){let i=lr();_e[Me]={baseUrl:t.baseUrl??i.baseUrl,headers:{...i.headers,...t.headers??{}},services:{...i.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");let i=lr();return i.services[t]?Nl(i.services[t]):i.baseUrl?`${Nl(i.baseUrl)}/${t}`:`/go/${t}`}static _reset(){_e[Me]=Ml()}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,i){return this.#t("GET",t,{params:i})}async post(t,i){return this.#t("POST",t,{body:i})}async patch(t,i){return this.#t("PATCH",t,{body:i})}async delete(t){return this.#t("DELETE",t,{})}async#t(t,i,s){let n=e.resolve(this.role),r=i?i.startsWith("/")?i:`/${i}`:"",a=new URL(`${n}${r}`,globalThis.location?.origin??"http://localhost"),o=hv(a.searchParams,s.params);o&&(a.search=o.toString());let c={method:t,headers:{...lr().headers}};s.body!==void 0&&(c.body=JSON.stringify(s.body),c.headers["content-type"]="application/json");let l=a.toString(),u=await fetch(l,c),d=await fv(u);if(!u.ok)throw new j(u.status,d,this.role,`${r||"/"}`);return d}};if(typeof window<"u"){let e=window.VB??(window.VB={});e.service??=Y,e.ServiceError??=j}});function vv(e,t){let i=0;for(;i<e.length&&i<t.length&&e[e.length-1-i]===t[t.length-1-i];)i++;return i}function yv(e,t){let i=0;for(;i<e.length&&i<t.length&&e[i]===t[i];)i++;return i}function Ri(e,t,i){return{prefix:e.slice(Math.max(0,t-32),t),suffix:e.slice(i,i+32)}}function $l(e,t){let i=Il(t.text??"");if(!i)return null;if(t.endOffset<=e.length&&Il(e.slice(t.startOffset,t.endOffset))===i)return{start:t.startOffset,end:t.endOffset};let s=new RegExp(t.text.trim().split(/\s+/).map(gv).join("\\s*"),"g"),n=t.prefix??"",r=t.suffix??"",a=null,o=-1,c=1/0;for(let l of e.matchAll(s)){let u=l.index,d=u+l[0].length,h=Ri(e,u,d),f=vv(h.prefix,n)+yv(h.suffix,r),p=Math.abs(u-t.startOffset);(f>o||f===o&&p<c)&&(a={start:u,end:d},o=f,c=p)}return a}var Il,gv,Ol=v(()=>{Il=e=>e.replace(/\s+/g,""),gv=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});function Hi(e){let t=2166136261;for(let i=0;i<e.length;i++)t^=e.charCodeAt(i),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Vl(){return"hn-"+crypto.randomUUID().slice(0,8)}function qi(e,t){let i="highlightsLabel"+t[0].toUpperCase()+t.slice(1);return e.dataset[i]||Sv[t]}function xv(e,{textLength:t,colors:i}){if(!e||typeof e!="object")return null;let s=e,{startOffset:n,endOffset:r,color:a}=s;if(!Number.isInteger(n)||!Number.isInteger(r))return null;let o=n,c=r;return o<0||c<=o||c>t||!fr(a)||!i.includes(a)||s.id!=null&&(typeof s.id!="string"||!/^[\w-]{1,64}$/.test(s.id))||s.text!=null&&typeof s.text!="string"||s.note!=null&&typeof s.note!="string"||s.prefix!=null&&typeof s.prefix!="string"||s.suffix!=null&&typeof s.suffix!="string"?null:{id:s.id||Vl(),startOffset:o,endOffset:c,text:s.text??"",prefix:(s.prefix??"").slice(-32),suffix:(s.suffix??"").slice(0,32),color:a,note:s.note??"",created:Number.isFinite(s.created)?s.created:Date.now()}}function fr(e){return typeof e=="string"&&Ev.test(e)}function zl(){if(Dt.size===0){_t&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(s=>s!==_t),_t=null);return}_t||(_t=new CSSStyleSheet,document.adoptedStyleSheets=[...document.adoptedStyleSheets,_t]);let e=[...Dt.keys()],t=e.map(s=>`::highlight(hn-${s}) { background-color: var(--highlight-${s}); color: var(--highlight-${s}-ink, var(--highlight-ink, CanvasText)); text-decoration-line: underline; text-decoration-color: var(--highlight-${s}); text-underline-offset: 2px; }`),i=e.map((s,n)=>`::highlight(hn-${s}) { background-color: Mark; color: MarkText; text-decoration-line: underline; text-decoration-color: MarkText; text-decoration-style: ${ql[n%ql.length]}; text-decoration-thickness: 2px; }`);_t.replaceSync(`${t.join(`
|
|
2
2
|
`)}
|
|
3
3
|
@media (forced-colors: active) {
|
|
4
4
|
${i.join(`
|
|
5
5
|
`)}
|
|
6
|
-
}`)}function wv(e){for(let t of e)_t.set(t,(_t.get(t)??0)+1);Bl()}function Av(e){for(let t of e){let i=(_t.get(t)??0)-1;i>0?_t.set(t,i):_t.delete(t)}Bl()}function Ev(e){let t=Me.get(e),i=t?[...t.values()].flat():[];i.length===0?(CSS.highlights.delete(`hn-${e}`),Me.delete(e)):CSS.highlights.set(`hn-${e}`,new Highlight(...i))}function Pl(e,t){let i=new Set(t.keys());for(let[s,n]of Me)n.has(e)&&i.add(s);for(let s of i){let n=t.get(s)??[],r=Me.get(s);n.length?(r||Me.set(s,r=new Map),r.set(e,n)):r?.delete(e),Ev(s)}}function dr(e){return document.createTreeWalker(e,NodeFilter.SHOW_TEXT,t=>t.parentElement?.closest(".hn-margin-annotation")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT)}function qi(e){let t=dr(e),i="";for(;t.nextNode();)i+=t.currentNode.textContent??"";return i}function Rl(e,t,i){let s=dr(e),n=0;for(;s.nextNode();){if(s.currentNode===t)return n+i;n+=(s.currentNode.textContent??"").length}return-1}function ar(e,t,i){let s=dr(e),n=0,r=null,a=0,o=null,c=0;for(;s.nextNode();){let l=s.currentNode,u=(l.textContent??"").length;if(!r&&n+u>t&&(r=l,a=t-n),n+u>=i){o=l,c=i-n;break}n+=u}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 ur(e){let t=Fi.get(e);if(t&&!t.destroyed)return t;let i=new lr(e);return Fi.set(e,i),i}function ql(e=document){e.querySelectorAll(or).forEach(t=>{t.hasAttribute("data-highlights-init")||ur(t)})}var or,$l,mv,bv,Fi,gv,Ol,vv,Mt,_t,Me,lr,Sv,Hl=v(()=>{it();lt();Dl();or="[data-highlights]",$l="highlights",mv=["yellow","green","blue","pink"],bv=typeof CSS<"u"&&"highlights"in CSS,Fi=new WeakMap;gv=/^[a-z0-9_-]+$/i,Ol=["solid","double","dotted","dashed","wavy"],vv={annotation:"You highlighted",added:"Highlight added",removed:"Highlight removed",noteSaved:"Note saved"};Mt=null,_t=new Map,Me=new Map;lr=class{#t;#e;#i;#n;#s=[];#o=[];#r=!bv;#a;#l;#c=!1;#b=[];#f=new Map;constructor(t){this.#t=t,this.#n=t.hasAttribute("data-highlights-readonly");let i=t.dataset.highlights;this.#e=i&&i!==""?i:location.pathname;let s=t.dataset.highlightsColors,n=s?s.split(",").map(r=>r.trim()).filter(cr):[...mv];this.#i=[...new Set(n)],this.#r||wv(this.#i),this.#g(),this.#n||(this.#a=this.#p.bind(this),this.#l=this.#v.bind(this),t.addEventListener("pointerup",this.#a),t.addEventListener("click",this.#l)),t.setAttribute("data-highlights-init",""),this.#E().then(()=>{this.#c||(this.#g(),this.#y())})}get colors(){return[...this.#i]}get destroyed(){return this.#c}get element(){return this.#t}getHighlights(){return this.#s.map(t=>({...t}))}getUnplaced(){return this.#o.map(t=>({...t}))}removeHighlight(t){let i=this.#s.findIndex(n=>n.id===t),s=this.#o.findIndex(n=>n.id===t);i<0&&s<0||(i>=0?this.#s.splice(i,1):this.#o.splice(s,1),this.#x(),this.#g(),this.#k("highlights:removed",{id:t}),W(Ri(this.#t,"removed")))}clearAll(){this.#s=[],this.#o=[],this.#x(),this.#g()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#s})}importHighlights(t){let i;try{i=typeof t=="string"?JSON.parse(t):t}catch{return{imported:0,rejected:0}}if(!i||!Array.isArray(i.highlights))return{imported:0,rejected:0};let s=this.#u(i.highlights);return this.#s=s,this.#o=[],this.#x(),this.#g(),{imported:s.length,rejected:i.highlights.length-s.length}}#u(t,i=qi(this.#t).length){let s={textLength:i,colors:this.#i},n=new Set,r=[];for(let a of t){let o=yv(a,s);!o||n.has(o.id)||(n.add(o.id),r.push(o))}return r}destroy(){this.#c||(this.#c=!0,this.#a&&this.#t.removeEventListener("pointerup",this.#a),this.#l&&this.#t.removeEventListener("click",this.#l),this.#r?this.#t.querySelectorAll("mark[data-hn-id]").forEach(t=>{let i=t.parentNode;for(;t.firstChild;)i.insertBefore(t.firstChild,t);i.removeChild(t),i.normalize()}):(Pl(this,new Map),Av(this.#i)),this.#A(),this.#f.clear(),this.#t.removeAttribute("data-highlights-init"),Fi.get(this.#t)===this&&Fi.delete(this.#t))}#p(){requestAnimationFrame(()=>{if(this.#c)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let i=t.getRangeAt(0);this.#t.contains(i.commonAncestorContainer)&&this.#k("highlights:selected",{text:t.toString().trim(),rect:i.getBoundingClientRect()})})}#v(t){let i=t.target.closest?.(".hn-margin-annotation");if(i){let n=i.dataset.hnId,r=this.#s.find(a=>a.id===n);if(r){this.#k("highlights:clicked",{id:n,highlight:{...r}}),this.#k("highlights:request-note",{id:n,highlight:{...r},controller:this});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.#k("highlights:clicked",{id:n,highlight:{...r}});return}}if(!this.#r){let n=this.#h(t.clientX,t.clientY);n&&this.#k("highlights:clicked",{id:n.id,highlight:{...n}})}}findHighlightRect(t){let i=this.#s.find(r=>r.id===t);if(!i)return null;let s=this.#d(i);if(!s)return null;let n=s.getClientRects();return n.length?n[0]:null}#d(t){return this.#f.get(t.id)??ar(this.#t,t.startOffset,t.endOffset)}#m(){this.#f.clear();for(let t of this.#s){let i=ar(this.#t,t.startOffset,t.endOffset);i&&this.#f.set(t.id,i)}}#h(t,i){for(let s of this.#s){let n=this.#f.get(s.id);if(!n)continue;let r=n.getClientRects();for(let a of r)if(t>=a.left&&t<=a.right&&i>=a.top&&i<=a.bottom)return s}return null}_createFromSelection(t){let i=window.getSelection();if(!i||i.isCollapsed)return;let s=i.getRangeAt(0);if(!this.#t.contains(s.commonAncestorContainer))return;let n=Rl(this.#t,s.startContainer,s.startOffset),r=Rl(this.#t,s.endContainer,s.endOffset);if(n<0||r<0||n>=r)return;let a=i.toString().trim(),o={id:Fl(),startOffset:n,endOffset:r,text:a,...Pi(qi(this.#t),n,r),color:t,note:"",created:Date.now()};this.#s.push(o),this.#x(),this.#g(),i.removeAllRanges(),this.#k("highlights:added",{id:o.id,text:a,color:t,note:""}),W(Ri(this.#t,"added"))}_changeColor(t,i){let s=this.#s.find(n=>n.id===t);s&&(s.color=i,this.#x(),this.#g())}_updateNote(t,i){let s=this.#s.find(n=>n.id===t);s&&(s.note=i,this.#x(),this.#L(),this.#k("highlights:note-changed",{id:t,note:i}),W(Ri(this.#t,"noteSaved")))}async#E(){let t=await S.get($l,this.#e);if(!t||!Array.isArray(t.highlights)||this.#c)return;let i=Array.isArray(t.unplaced)?t.unplaced:[],s=this.#u([...t.highlights,...i],1/0),n=qi(this.#t);if(i.length===0&&t.contentHash===Bi(n)){this.#s=s;return}this.#s=[],this.#o=[];for(let r of s){let a=_l(n,r);a?this.#s.push({...r,startOffset:a.start,endOffset:a.end,...Pi(n,a.start,a.end)}):this.#o.push(r)}this.#x()}#y(){this.#o.length!==0&&(console.warn(`[highlights] ${this.#o.length} stored highlight(s) could not be found in the current text. They are kept in storage.`,this.#t),this.#k("highlights:unplaced",{highlights:this.getUnplaced()}))}#x(){let t={version:1,contentHash:Bi(qi(this.#t)),highlights:this.#s,...this.#o.length?{unplaced:this.#o}:{}};S.set($l,this.#e,t).catch(()=>{})}#g(){this.#r?(this.#w(),this.#m()):(this.#m(),this.#S()),this.#L()}#S(){let t=new Map;for(let i of this.#i)t.set(i,[]);for(let i of this.#s){let s=this.#f.get(i.id);s&&t.has(i.color)&&t.get(i.color).push(s)}Pl(this,t)}#w(){this.#t.querySelectorAll("mark[data-hn-id]").forEach(i=>{let s=i.parentNode;for(;i.firstChild;)s.insertBefore(i.firstChild,i);s.removeChild(i)}),this.#t.normalize();let t=[...this.#s].sort((i,s)=>s.startOffset-i.startOffset);for(let i of t){let s=ar(this.#t,i.startOffset,i.endOffset);if(!s)continue;let n=document.createElement("mark");n.dataset.hnId=i.id,cr(i.color)&&(n.dataset.hnColor=i.color,n.style.setProperty("--_hn-color",`var(--highlight-${i.color})`),n.style.setProperty("--_hn-ink",`var(--highlight-${i.color}-ink, var(--highlight-ink))`));try{s.surroundContents(n)}catch{let r=s.extractContents();n.appendChild(r),s.insertNode(n)}}}#A(){for(let t of this.#b)t.remove();this.#b=[]}#L(){if(this.#A(),this.#s.length===0)return;getComputedStyle(this.#t).position==="static"&&(this.#t.style.position="relative");let i=this.#t.getBoundingClientRect(),s=Ri(this.#t,"annotation");for(let n of this.#s){let r=this.#f.get(n.id);if(!r)continue;let a=r.getClientRects();if(a.length===0)continue;let o=a[0].top-i.top,c=document.createElement("span");if(c.className="hn-margin-annotation",c.dataset.hnId=n.id,c.setAttribute("aria-hidden","true"),c.style.insetBlockStart=`${o}px`,n.note){let l=document.createElement("span");l.className="hn-note-indicator",l.textContent="*",c.append(l,` ${s}`),c.classList.add("hn-has-note")}else c.textContent=s;this.#t.appendChild(c),this.#b.push(c)}}#k(t,i={}){this.#t.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0}))}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ql()):ql();Sv=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(or)&&ur(s),s.querySelectorAll(or).forEach(n=>{n.hasAttribute("data-highlights-init")||ur(n)})}});Sv.observe(document.documentElement,{childList:!0,subtree:!0})});var mr={};T(mr,{currentHash:()=>pr,initPageWatch:()=>fr,normalisePath:()=>Yl,pageKey:()=>ee,readWatch:()=>De,removeWatch:()=>Gl,writeWatch:()=>Ie});function jl(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function xv(e){if(!jl())return null;try{let t=new Y("notify"),i={url:e.url,type:"page-watch",notify:["panel"]},s=await t.post("/subscribe",i);return typeof s?.id=="string"?s.id:null}catch(t){let i=t instanceof j?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",i),null}}async function Kl(e){if(!(!e||!jl()))try{await new Y("notify").delete(`/subscribe/${encodeURIComponent(e)}`)}catch(t){let i=t instanceof j?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",i)}}function kv(){return document.querySelector("main")||document.querySelector("article")||document.body}function Yl(e){let t=(e||"/").replace(/\/index\.html?$/i,"/");return t.length>1&&(t=t.replace(/\/+$/,"")),t||"/"}function ee(){return Yl(location.pathname)}async function Cv(){let e=ee(),t=location.pathname||"/",i=e==="/"?"":e,s=new Set([t,`${i}/`,`${i}/index.html`]);if(s.delete(e),await S.get(yt,e)){for(let n of s)await S.remove(yt,n);return}for(let n of s){let r=await S.get(yt,n);if(r){await S.set(yt,e,r),await S.remove(yt,n);return}}}function pr(){let e=kv();return e?Bi(e.textContent||""):""}function Tv(){return document.title||ee()}async function De(){return Vl??=Cv().catch(()=>{}),await Vl,await S.get(yt,ee())}async function Ie(e){await S.set(yt,ee(),e)}async function Gl(){await S.remove(yt,ee())}function Hi(e,t,i){return e.getAttribute(`data-label-${t}`)??i}function Vi(e,t){e.setAttribute("aria-pressed",t?"true":"false"),e.dataset.watching="",t||delete e.dataset.watching;let i=e.querySelector("icon-wc");if(i&&i.setAttribute("name",t?"bookmark-check":"bookmark"),e.hasAttribute("data-watch-label-locked"))return;let s=[...e.childNodes].find(n=>n.nodeType===Node.TEXT_NODE&&(n.textContent||"").trim());s&&(s.textContent=t?Hi(e,"watching","Watching"):Hi(e,"watch","Watch for updates")),e.setAttribute("title",t?Hi(e,"stop","Stop watching this page"):Hi(e,"action","Watch this page for content updates"))}async function Lv(){let e=!!await De();for(let t of document.querySelectorAll(`${_e}[data-watch-page-init]`))Vi(t,e)}async function hr(e){if(e.hasAttribute("data-watch-page-init"))return;e.setAttribute("data-watch-page-init",""),e.setAttribute("type",e.getAttribute("type")||"button");let t=await De();Vi(e,!!t),e.addEventListener("click",async i=>{i.preventDefault();let s=await De();if(s)await Gl(),Vi(e,!1),e.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:s.url,subscriptionId:s.subscriptionId}})),Kl(s.subscriptionId);else{let n={url:location.pathname||"/",title:Tv(),contentHash:pr(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await Ie(n),Vi(e,!0),e.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:n}}));let r=await xv(n);r&&await Ie({...n,subscriptionId:r})}})}async function Nv(){let e=await De();if(!e)return;let t=pr(),i=new Date().toISOString(),s=e.contentHash,n={...e,lastChecked:i};if(t&&t!==s){n.contentHash=t,n.lastChanged=i,await Ie(n);let r={id:`page-watch:${e.url}:${t}`,type:"watch",title:`Updated: ${e.title}`,body:"Content changed since your last visit.",url:e.url,date:i,read:!1,dismissed:!1,priority:"normal"};document.querySelector("notification-wc")&&!customElements.get("notification-wc")&&await customElements.whenDefined("notification-wc"),document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:r}}))}else await Ie(n)}function fr(e=document){for(let t of e.querySelectorAll(_e))hr(t);Nv()}function zl(e){if(Lv(),e.type!=="page-watch:remove")return;if(!(e.target instanceof Element&&e.target.matches(_e))){let i=e.detail;Kl(i?.subscriptionId??null)}}var _e,yt,Vl,Ul,Wl,br=v(()=>{it();te();Hl();_e="[data-watch-page]",yt="watches";Vl=null;Ul=Symbol.for("vb.page-watch-init"),Wl=globalThis;Wl[Ul]||(Wl[Ul]=!0,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>fr()):fr(),document.addEventListener("page-watch:add",zl),document.addEventListener("page-watch:remove",zl),new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.(_e)&&hr(n),n.querySelectorAll?.(_e).forEach(r=>hr(r))}}).observe(document.documentElement,{childList:!0,subtree:!0}))});function Zl(e){let t=!1;try{t=sessionStorage.getItem("vb_optout")==="1"}catch{}let i=!1;if(typeof e?.consent=="function")try{i=e.consent()===!1}catch{i=!0}return{user:t,gpc:navigator.globalPrivacyControl===!0,dnt:navigator.doNotTrack==="1",consent:i}}function Ql(e){let t=Zl(e);return t.user?"user":t.gpc?"gpc":t.dnt?"dnt":t.consent?"consent":null}function $e(e){return Ql(e)!==null}function tu(e){return e?.closest?.("[data-vb-no-track]")!=null}function _v(){let{dataset:e}=document.documentElement,t={};for(let i of Object.keys(e)){let s=e[i];s!=null&&s!==""&&(t[i]=s)}return t}function Iv(){let e={};for(let i of document.querySelectorAll('meta[name^="vb:"]')){let s=i.getAttribute("name")?.slice(3),n=i.getAttribute("content")?.trim();s&&Dv.has(s)||s&&n&&(e[s]=n)}let t=[];for(let i of document.querySelectorAll('meta[name="concept"]')){let s=i.getAttribute("content")?.trim();s&&t.push(s)}return t.length&&(e.concepts=t),e}function $v(e,t){if(!t?.length)return e;for(let{pattern:i,replace:s}of t)if(i.test(e))return e.replace(i,s);return e}function Ov(e,t){let i=JSON.stringify(t);if(typeof navigator.sendBeacon=="function"){let s=new Blob([i],{type:"application/json"});if(navigator.sendBeacon(e,s))return!0}try{return fetch(e,{method:"POST",body:i,keepalive:!0,headers:{"content-type":"application/json"}}),!0}catch{return!1}}function zi(){try{document.dispatchEvent(new CustomEvent(wr))}catch{}}function Ar(e){return`${(B.config?.endpoint??"/api/analytics").replace(/\/+$/,"")}/${e}`}function Ui(e,t){let i=B.config;if(!i)throw new Error("analytics: buildEnvelope called before init");let s=$v(location.pathname+location.search,i.urlMasks),n=typeof i.context=="function"?i.context()??{}:{};return{name:e,ts:Date.now(),site:i.siteId,path:s,referrer:document.referrer||"",context:{..._v(),...Iv(),...n},props:t??{}}}function Wi(e,t){let i=B.config;if(!i||i.transport==="disabled")return!1;if(i.transport==="console")return console.log("%c[vb:analytics]","color:#0aa;font-weight:600",e,t),ie.logged++,zi(),!0;let s=Ov(Ar(e),t);return s&&(ie.sent++,zi()),s}function eu(){let e=B.config?.sampleRate??1;return e>=1?!0:Math.random()<e}function iu(){if(!B.config||$e(B.config)||document.documentElement.hasAttribute("data-vb-no-track")||!eu())return;let e=location.pathname+location.search;e!==Xl&&(Xl=e,Wi("hit",Ui("page.view",{})))}function Pv(){let e,t=()=>{clearTimeout(e),e=setTimeout(iu,100)},i=history.pushState.bind(history);history.pushState=function(...n){i(...n),t()};let s=history.replaceState.bind(history);history.replaceState=function(...n){s(...n),t()},window.addEventListener("popstate",t)}function Rv(e){let t={};for(let[i,s]of Object.entries(e.dataset)){if(i==="vbEvent"||!i.startsWith("vbEvent"))continue;let n=i.slice(7).replace(/^./,r=>r.toLowerCase());t[n]=s}return t}function qv(e){if(!B.config||$e(B.config))return;let i=e.target?.closest?.("[data-vb-event]");if(!i||tu(i))return;let s=i.dataset.vbEvent;s&&k.track(s,Rv(i))}function Jl(){let e=document.querySelectorAll('a[href^="http"]');for(let t of e){if(t.hostname===location.hostname||tu(t)||t.hasAttribute("data-vb-analytics-wired"))continue;let i=encodeURIComponent(B.config?.siteId??"default"),s=`${Ar("click")}?site=${i}&from=${encodeURIComponent(location.pathname)}`,n=!t.hasAttribute("ping"),r=()=>{n&&($e(B.config)?t.removeAttribute("ping"):t.setAttribute("ping",s))};t.addEventListener("click",r,{capture:!0}),t.addEventListener("auxclick",r,{capture:!0}),t.addEventListener("click",()=>{if($e(B.config))return;let a=navigator.userAgent;/Firefox|Brave/.test(a)&&Wi("click",Ui("link.outbound",{to:t.hostname,href:t.href}))}),t.setAttribute("data-vb-analytics-wired","")}}function yr(){if(!B.queue.length)return;let e=B.queue.splice(0);Wi("events",{site:B.config?.siteId,events:e})}function Fv(){document.visibilityState==="hidden"&&yr()}function Hv(){try{return window.top!==window.self}catch{return!0}}function Er(){return globalThis[vr]??k}var Dv,B,ie,vr,wr,Xl,Bv,k,wt=v(()=>{Dv=new Set(["track-history","track-history-params","no-track-history"]);B={config:null,queue:[]},ie={sent:0,logged:0,iframeDisabled:!1},vr=Symbol.for("vanilla-breeze.analytics"),wr="vb:analytics-status";Xl=null;Bv={endpoint:"/api/analytics",siteId:"default",transport:"disabled",sampleRate:1,consent:null,context:null,urlMasks:null,autoPageView:!0,autoOutboundLinks:!0,autoDeclarative:!0,allowInIframe:!1};k={init(e={}){if(B.config)return;let t={...Bv,...e};if(B.config=t,globalThis[vr]||(globalThis[vr]=k),queueMicrotask(zi),Hv()&&!t.allowInIframe){ie.iframeDisabled=!0,t.transport="disabled",t.autoPageView=!1,t.autoOutboundLinks=!1,t.autoDeclarative=!1;return}t.transport==="disabled"&&(t.autoOutboundLinks=!1),t.autoDeclarative&&document.addEventListener("click",qv,{capture:!0}),t.autoOutboundLinks&&(Jl(),new MutationObserver(()=>Jl()).observe(document.body,{childList:!0,subtree:!0})),t.autoPageView&&(iu(),Pv()),document.addEventListener("visibilitychange",Fv),window.addEventListener("pagehide",yr)},track(e,t={}){B.config&&($e(B.config)||eu()&&Wi("hit",Ui(e,t)))},flush:yr,setConsent(e){try{e?sessionStorage.removeItem("vb_optout"):sessionStorage.setItem("vb_optout","1")}catch{}zi()},getStatus(){let e=B.config,t=Zl(e),i=Ql(e),s=null;if(e)try{s=Ui("page.view",{})}catch{s=null}let n=e?.transport??null;return{initialized:e!=null,active:e!=null&&n!=="disabled"&&i===null,optedOut:i!==null,reason:i,signals:t,transport:n,inIframe:ie.iframeDisabled,endpoint:e?Ar("hit"):null,siteId:e?.siteId??null,sampleRate:e?.sampleRate??null,outboundLinks:e?.autoOutboundLinks??!1,queued:B.queue.length,sent:ie.sent,logged:ie.logged,collects:s?Object.keys(s):[],contextKeys:s?Object.keys(s.context):[],preview:s}},get config(){return B.config?{...B.config}:null}}});var bu={};T(bu,{initAll:()=>$r});function Ir(e){e.hasAttribute("data-back-to-top-init")||(e.setAttribute("data-back-to-top-init",""),e.toggleAttribute("data-state-visible",!1),e.addEventListener("click",pu),Gi.add(e),sy(),mu())}function hu(e){e.hasAttribute("data-back-to-top-init")&&(e.removeAttribute("data-back-to-top-init"),e.removeEventListener("click",pu),Gi.delete(e),Gi.size===0&&Dt&&(window.removeEventListener("scroll",Dt),Dt=null))}function fu(){if(ne&&ne.isConnected)return ne;let e=document.documentElement,t=document.body;if(t&&t.scrollHeight>e.clientHeight+1&&t){let s=getComputedStyle(t);if(/auto|scroll/.test(s.overflowY))return ne=t,t}return ne=document.scrollingElement||e,ne}function pu(e){let t=e.currentTarget.getAttribute("href")||"";if(t===""||t==="#"||t==="#top")e.preventDefault();else return;fu().scrollTo({top:0,left:0,behavior:iy.matches?"auto":"smooth"})}function sy(){Dt||(Dt=()=>{Dr||(Dr=!0,requestAnimationFrame(()=>{mu(),Dr=!1}))},window.addEventListener("scroll",Dt,{passive:!0}),document.addEventListener("scroll",Dt,{capture:!0,passive:!0}))}function mu(){let t=fu().scrollTop||window.scrollY,s=window.innerHeight*1,n=t>s,r=t<200;for(let a of Gi)a.toggleAttribute("data-state-visible",n&&!r)}function $r(e=document){e.querySelectorAll(qe).forEach(Ir)}var qe,iy,Gi,Dt,Dr,ne,ny,Or=v(()=>{qe="[data-back-to-top]",iy=matchMedia("(prefers-reduced-motion: reduce)"),Gi=new Set,Dt=null,Dr=!1;ne=null;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>$r(),{once:!0}):$r();ny=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(qe)&&Ir(s),s.querySelectorAll(qe).forEach(n=>Ir(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(qe)&&hu(s),s.querySelectorAll?.(qe).forEach(n=>hu(n))}}});ny.observe(document.documentElement,{childList:!0,subtree:!0})});function qr(e){return ft(e.getAttribute("data-locale")||H(e))}function oy(e){let t={};switch(e.getAttribute("data-format-number")){case"currency":t.style="currency",t.currency=e.getAttribute("data-currency")||"USD";break;case"percent":t.style="percent";break;case"compact":t.notation="compact";break;default:break}let i=parseInt(e.getAttribute("data-fraction-digits")??"",10);return Number.isInteger(i)&&i>=0&&i<=20&&(t.minimumFractionDigits=i,t.maximumFractionDigits=i),t}function vu(e,t={}){try{return new Intl.NumberFormat(qr(e),{...oy(e),...t})}catch{return null}}var Fr=v(()=>{Z()});var yu={};T(yu,{initFormatNumber:()=>Br});function Br(e=document){e.querySelectorAll(re).forEach(Xi)}function Xi(e){Fe.has(e)||(Fe.add(e),e.setAttribute("data-format-number-init",""),Ji(e))}function Ji(e){let t=e.getAttribute("value");if(t==null||t.trim()==="")return;let i=Number(t);if(isNaN(i))return;let s=vu(e);s&&(e.textContent=s.format(i))}var re,cy,Fe,ly,Hr=v(()=>{Fr();re="data[data-format-number]",cy=["value","data-format-number","data-currency","data-fraction-digits","data-locale","lang"],Fe=new WeakSet;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Br()):Br();ly=new MutationObserver(e=>{for(let t of e){if(t.type==="attributes"){let i=t.target;t.attributeName==="lang"?(i.matches(re)&&Fe.has(i)&&Ji(i),i.querySelectorAll(re).forEach(s=>{Fe.has(s)&&Ji(s)})):i.matches(re)&&(Fe.has(i)?Ji(i):i.isConnected&&Xi(i));continue}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(re)&&Xi(s),s.querySelectorAll(re).forEach(Xi)}}});ly.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:cy})});var ku={};T(ku,{initFormatDate:()=>Wr});function vy(e){return/^\d{4}$/.test(e)?"year":/^\d{4}-\d{2}$/.test(e)?"month":/^\d{4}-\d{2}-\d{2}$/.test(e)?"day":null}function Wr(e=document){e.querySelectorAll(At).forEach(Qi)}function yy(e){let t=e.trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return new Date(e);let[i,s,n]=[Number(t[1]),Number(t[2])-1,Number(t[3])],r=new Date(Date.UTC(i,s,n));return r.getUTCMonth()===s&&r.getUTCDate()===n?r:new Date(NaN)}function Qi(e){He.has(e)||(He.add(e),Ur.has(e)||Ur.set(e,{text:e.textContent.trim(),authoredTitle:e.hasAttribute("title")&&!e.hasAttribute(wu)}),e.setAttribute(wu,""),Eu(e))}function Eu(e){jr(e);let t=e.getAttribute("datetime")?.trim();if(!t||!/^\d{4}/.test(t))return;let i=yy(t);if(isNaN(i.getTime()))return;let s=vy(t),n=e.getAttribute("data-format-date")||"medium",r=ft(e.getAttribute("data-locale")||H(e)),a=Ur.get(e);n==="relative"?(e.textContent=Su(i,r),a?.authoredTitle||e.setAttribute("title",Au(i,"medium",s?null:"short",e,r,s)),xu(e,i,r)):(!a?.authoredTitle&&a?.text&&e.setAttribute("title",a.text),e.textContent=Au(i,n,e.getAttribute("data-format-time"),e,r,s))}function Au(e,t,i,s,n,r=null){let a=t||"medium",o;r==="year"?o={year:"numeric"}:r==="month"?o={year:"numeric",month:dy[a]??"short"}:(o={dateStyle:a},i&&!r&&(o.timeStyle=i));let c=r?"UTC":s.getAttribute("data-time-zone")||void 0;try{return new Intl.DateTimeFormat(n,{...o,timeZone:c}).format(e)}catch{try{return new Intl.DateTimeFormat(n,o).format(e)}catch{return s.textContent??""}}}function Su(e,t){let i=Math.round((e.getTime()-Date.now())/1e3),s=Math.abs(i);for(let n=0;n<Be.length;n++){let{seconds:r,max:a}=Be[n];if(s<r)continue;let{unit:o}=Be[n],c=Math.round(i/r);Math.abs(c)>=a&&n>0&&(o=Be[n-1].unit,c=Math.sign(i)*Math.max(1,Math.round(s/Be[n-1].seconds)));try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(c,o)}catch{let l=Math.abs(c),u=l===1?o:`${o}s`;return c<0?`${l} ${u} ago`:`in ${l} ${u}`}}try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second")}catch{return"just now"}}function xu(e,t,i){jr(e);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=setTimeout(()=>{Zi.delete(e),e.textContent=Su(t,i),xu(e,t,i)},a);Zi.set(e,o)}function jr(e){let t=Zi.get(e);t!==void 0&&(clearTimeout(t),Zi.delete(e))}function Vr(e){jr(e),He.delete(e)}function zr(e){He.has(e)?Eu(e):e.isConnected&&Qi(e)}var At,uy,wu,Zi,He,Ur,dy,hy,fy,py,my,by,gy,Be,wy,Kr=v(()=>{Z();At="time[data-format-date]",uy=["datetime","data-format-date","data-format-time","data-time-zone","data-locale","lang"],wu="data-format-date-init",Zi=new Map,He=new WeakSet,Ur=new WeakMap,dy={short:"numeric",medium:"short",long:"long",full:"long"},hy=60,fy=3600,py=86400,my=604800,by=2592e3,gy=31536e3,Be=[{unit:"year",seconds:gy,max:1/0},{unit:"month",seconds:by,max:12},{unit:"week",seconds:my,max:5},{unit:"day",seconds:py,max:7},{unit:"hour",seconds:fy,max:24},{unit:"minute",seconds:hy,max:60},{unit:"second",seconds:1,max:60}];document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Wr()):Wr();wy=new MutationObserver(e=>{for(let t of e){if(t.type==="attributes"){let i=t.target;t.attributeName==="lang"?(i.matches(At)&&zr(i),i.querySelectorAll(At).forEach(zr)):i.matches(At)?zr(i):t.attributeName==="data-format-date"&&He.has(i)&&Vr(i);continue}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.isConnected||(s.matches(At)&&Vr(s),s.querySelectorAll(At).forEach(Vr))}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.isConnected&&(s.matches(At)&&Qi(s),s.querySelectorAll(At).forEach(Qi))}}});wy.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:uy})});var Lu={};T(Lu,{formatByteSize:()=>Tu,initFormatBytes:()=>Yr});function Yr(e=document){e.querySelectorAll(ae).forEach(ts)}function ts(e){Ve.has(e)||(Ve.add(e),e.setAttribute("data-format-bytes-init",""),es(e))}function Sy(e){let t=parseInt(e??"0",10);return Number.isFinite(t)?Math.min(20,Math.max(0,t)):0}function Tu(e,{precision:t=0,decimal:i=!1,locale:s}={}){let n=i?1e3:1024,r=Math.abs(e),a=r<1?0:Math.min(Math.floor(Math.log(r)/Math.log(n)),Cu.length-1),o=e/Math.pow(n,a);try{return new Intl.NumberFormat(s,{style:"unit",unit:Cu[a],unitDisplay:a===0?"long":"short",minimumFractionDigits:t,maximumFractionDigits:t}).format(o)}catch{return`${o.toFixed(t)} ${Ey[a]}`}}function es(e){let t=e.getAttribute("value");if(t==null||t.trim()==="")return;let i=Number(t);Number.isFinite(i)&&(e.textContent=Tu(i,{precision:Sy(e.getAttribute("data-format-bytes")),decimal:e.getAttribute("data-unit")==="decimal",locale:qr(e)}))}var ae,Ay,Cu,Ey,Ve,xy,Gr=v(()=>{Fr();ae="data[data-format-bytes]",Ay=["value","data-format-bytes","data-unit","data-locale","lang"],Cu=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Ey=["B","kB","MB","GB","TB","PB"],Ve=new WeakSet;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Yr()):Yr();xy=new MutationObserver(e=>{for(let t of e){if(t.type==="attributes"){let i=t.target;t.attributeName==="lang"?(i.matches(ae)&&Ve.has(i)&&es(i),i.querySelectorAll(ae).forEach(s=>{Ve.has(s)&&es(s)})):i.matches(ae)&&(Ve.has(i)?es(i):i.isConnected&&ts(i));continue}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(ae)&&ts(s),s.querySelectorAll(ae).forEach(ts)}}});xy.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:Ay})});function ky(e){for(let[t,i]of is)e.querySelectorAll(t).forEach(i)}function Cy(e){if(e.nodeType!==Node.ELEMENT_NODE)return;let t=e;for(let[i,s]of is)t.matches(i)&&s(t),t.querySelectorAll(i).forEach(s)}function Ty(){Xr||(Xr=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes)Cy(i)}),Xr.observe(document.documentElement,{childList:!0,subtree:!0}))}function Ly(){ss||(ss=!0,ky(document))}function x(e,t){is.set(e,t),Ty(),ss||document.readyState!=="loading"?(ss=!0,document.querySelectorAll(e).forEach(t)):is.size===1&&document.addEventListener("DOMContentLoaded",Ly)}function I(e,t){let i=Jr.get(e);i||Jr.set(e,i=new Set),i.add(t),!Nu&&(Nu=!0,document.addEventListener("reset",s=>{let n=s.target;n instanceof HTMLFormElement&&setTimeout(()=>{if(s.defaultPrevented)return;let r=new Set,a=[...n.querySelectorAll("*"),...Array.from(n.elements)];for(let o of a){if(r.has(o))continue;r.add(o);let c=Jr.get(o);if(c)for(let l of c)l(o)}},0)},!0))}var is,Xr,ss,Jr,Nu,D=v(()=>{is=new Map,Xr=null,ss=!1;Jr=new WeakMap,Nu=!1});var Du={};T(Du,{concealSpoiler:()=>ns,initSpoilers:()=>_y,revealSpoiler:()=>_u});function My(e){return Ny.has(e.tagName)||e.localName.includes("-")}function _y(e=document){e.querySelectorAll(Zr).forEach(Qr)}function Dy(e){return e.getAttribute("data-spoiler-label")||R(e,"spoiler-reveal","Reveal spoiler")}function Qr(e){if(Mu.has(e))return;if(Mu.add(e),e.getAttribute("data-spoiler")||e.setAttribute("data-spoiler","blur"),e.querySelector(":scope > [data-spoiler-content]")){e.setAttribute("data-spoiler-init","");return}(e.tagName==="DIV"||e.tagName==="SPAN")&&!e.hasAttribute("role")&&!e.hasAttribute("aria-label")&&!e.hasAttribute("aria-labelledby")&&(e.setAttribute("role","group"),e.setAttribute("aria-label",R(e,"spoiler","Spoiler")));let t=document.createElement(My(e)?"div":"span");for(t.setAttribute("data-spoiler-content",""),t.setAttribute("inert",""),t.tabIndex=-1;e.firstChild;)t.appendChild(e.firstChild);e.appendChild(t);let i=document.createElement("button");i.type="button",i.setAttribute("data-spoiler-trigger",""),i.setAttribute("aria-expanded","false");let s=document.createElement("span");s.setAttribute("data-spoiler-label",""),s.textContent=Dy(e),i.appendChild(s),e.appendChild(i),e.setAttribute("data-spoiler-init","")}function _u(e){if(e.hasAttribute("data-spoiler-visible"))return;let t=e.getAttribute("data-spoiler-group");t&&document.querySelectorAll(`[data-spoiler-group="${CSS.escape(t)}"][data-spoiler-visible]`).forEach(r=>{r!==e&&ns(r,{restoreFocus:!1})});let i=e.querySelector(":scope > [data-spoiler-content]"),s=e.querySelector(":scope > [data-spoiler-trigger]"),n=!!s&&(document.activeElement===s||s.contains(document.activeElement));if(i&&i.removeAttribute("inert"),s&&(s.setAttribute("aria-expanded","true"),s.hidden=!0),e.setAttribute("data-spoiler-visible",""),!e.hasAttribute("data-spoiler-persist")&&!e.querySelector(":scope > [data-spoiler-hide]")){let r=document.createElement("button");r.type="button",r.setAttribute("data-spoiler-hide",""),r.textContent=R(e,"spoiler-hide","Hide spoiler"),e.appendChild(r)}n&&i&&i.focus({preventScroll:!0}),W(R(e,"spoiler-revealed","Spoiler revealed")),e.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!0}}))}function ns(e,{restoreFocus:t=!0}={}){if(e.hasAttribute("data-spoiler-persist")||!e.hasAttribute("data-spoiler-visible"))return;let i=e.querySelector(":scope > [data-spoiler-content]"),s=e.querySelector(":scope > [data-spoiler-trigger]"),n=e.querySelector(":scope > [data-spoiler-hide]"),r=e.contains(document.activeElement);i&&i.setAttribute("inert",""),s&&(s.setAttribute("aria-expanded","false"),s.hidden=!1,t&&r&&s.focus()),n&&n.remove(),e.removeAttribute("data-spoiler-visible"),e.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!1}}))}function Iy(e){let i=e.target?.closest?.("[data-spoiler-trigger], [data-spoiler-hide]");if(!i)return;let s=i.parentElement;s?.matches(Zr)&&(Qr(s),i.hasAttribute("data-spoiler-trigger")?_u(s):ns(s))}function $y(e){if(e.key!=="Escape")return;let t=e.target?.closest?.("[data-spoiler][data-spoiler-visible]");!t||t.hasAttribute("data-spoiler-persist")||(e.stopPropagation(),ns(t))}var Zr,Mu,Ny,ta=v(()=>{D();lt();Zr="[data-spoiler]",Mu=new WeakSet,Ny=new Set(["DIV","SECTION","ARTICLE","ASIDE","MAIN","HEADER","FOOTER","NAV","LI","DD","TD","TH","BLOCKQUOTE","FIGURE","FIGCAPTION","DETAILS","DIALOG","FORM","FIELDSET","ADDRESS"]);typeof document<"u"&&!document.__vbSpoilerDelegated&&(document.__vbSpoilerDelegated=!0,document.addEventListener("click",Iy),document.addEventListener("keydown",$y));x(Zr,Qr)});var Pu={};T(Pu,{initSplitters:()=>ia,keyToDirection:()=>Ou,pointerToPercent:()=>$u});function ia(e=document){e.querySelectorAll(ea).forEach(sa)}function Ry(e,t,i){return Math.min(i,Math.max(t,e))}function $u(e,t,{vertical:i,rtl:s}){return i?(e.clientY-t.top)/t.height*100:(s?t.right-e.clientX:e.clientX-t.left)/t.width*100}function Ou(e,{vertical:t,rtl:i}){return t?e==="ArrowUp"?-1:e==="ArrowDown"?1:0:e==="ArrowLeft"?i?1:-1:e==="ArrowRight"?i?-1:1:0}function sa(e){if(Iu.has(e))return;for(let f of e.querySelectorAll(":scope > .split-divider"))f.remove();let t=[...e.children];if(t.length<2)return;Iu.add(e),e.setAttribute("data-splitter-init","");let i=t[0],s=t[1],n=e.getAttribute("data-splitter")==="vertical",r=Number(i.dataset.min)||10,a=Number(i.dataset.max)||90,o=()=>getComputedStyle(e).direction==="rtl";i.id||(i.id=`vb-splitter-panel-${++Py}`);let c=document.createElement("div");c.className="split-divider",c.setAttribute("role","separator"),c.setAttribute("aria-orientation",n?"horizontal":"vertical"),c.setAttribute("aria-valuemin",String(r)),c.setAttribute("aria-valuemax",String(a)),c.setAttribute("aria-label",e.getAttribute("data-label-resize")||Oy),c.setAttribute("aria-controls",i.id),c.setAttribute("tabindex","0"),e.insertBefore(c,s),i.style.flexGrow="0",i.style.flexShrink="0",i.style.overflow="auto",s.style.flexGrow="1",s.style.overflow="auto";let l=!1,u=50;function d(f,{silent:p=!1}={}){u=Ry(f,r,a),i.style.flexBasis=`${u}%`,c.setAttribute("aria-valuenow",String(Math.round(u))),!p&&e.dispatchEvent(new CustomEvent("splitter:resize",{detail:{position:u},bubbles:!0}))}d(50,{silent:!0});function h(){l&&(l=!1,e.style.userSelect="")}c.addEventListener("pointerdown",f=>{f.preventDefault(),l=!0,c.setPointerCapture(f.pointerId),e.style.userSelect="none"}),c.addEventListener("pointermove",f=>{if(!l)return;let p=e.getBoundingClientRect();d($u(f,p,{vertical:n,rtl:o()}))}),c.addEventListener("pointerup",f=>{c.hasPointerCapture(f.pointerId)&&c.releasePointerCapture(f.pointerId),h()}),c.addEventListener("pointercancel",h),c.addEventListener("lostpointercapture",h),c.addEventListener("keydown",f=>{let p=f.shiftKey?10:1,m=Ou(f.key,{vertical:n,rtl:o()});m!==0?(f.preventDefault(),d(u+m*p)):f.key==="Home"?(f.preventDefault(),d(r)):f.key==="End"&&(f.preventDefault(),d(a))})}var ea,Oy,Iu,Py,qy,na=v(()=>{ea="[data-splitter]",Oy="Resize panels",Iu=new WeakSet,Py=0;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>ia()):ia();qy=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(ea)&&sa(s),s.querySelectorAll(ea).forEach(sa)}});qy.observe(document.documentElement,{childList:!0,subtree:!0})});var Fu={};T(Fu,{initSwitches:()=>Fy});function qu(e){e.hasAttribute("role")||e.setAttribute("role","switch"),e.setAttribute("data-switch-init","")}function Fy(e=document){e.querySelectorAll(Ru).forEach(t=>qu(t))}var Ru,ra=v(()=>{D();Ru='input[type="checkbox"][data-switch]';x(Ru,qu)});var Ku={};T(Ku,{initTextareaCounts:()=>Wy});function Uu(e){return e.closest("[lang]")?.getAttribute("lang")||navigator.language}function Wu(e,t){try{return new Intl.PluralRules(e).select(t)}catch{return"other"}}function aa(e,t){try{return new Intl.NumberFormat(e).format(t)}catch{return String(t)}}function zy(e,t,i,s){let n=t?"words":"characters",r=Uu(e),a=Wu(r,s);return(e.getAttribute(`data-label-limit-${a}`)??e.getAttribute("data-label-limit")??Vy[n][a==="one"?"one":"other"]).replaceAll("{count}",aa(r,i)).replaceAll("{max}",aa(r,s))}function Uy(e,t,i){let s=t?"words":"characters",n=Uu(e),r=Wu(n,i);return(e.getAttribute(`data-label-${s}-${r}`)??e.getAttribute(`data-label-${s}`)??Hy[s][r==="one"?"one":"other"]).replaceAll("{count}",aa(n,i))}function ju(e){if(Hu.has(e))return;let t=e.hasAttribute("data-count-init");e.setAttribute("data-count-init","");let i=e.dataset.count==="words",s=i?parseInt(e.dataset.maxwords??"0",10)||0:e.maxLength>0?e.maxLength:0,n=e.closest("form-field"),r=null,a=null;if(t){let h=n?n.querySelector(":scope > output.textarea-counter"):e.nextElementSibling;if(h?.matches("output.textarea-counter")&&!Vu.has(h)){r=h;let f=r.nextElementSibling;f?.matches('span.visually-hidden[aria-live="polite"]')&&(a=f);let p=r.id,m=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(b=>b&&b!==p);m.length?e.setAttribute("aria-describedby",m.join(" ")):e.removeAttribute("aria-describedby")}}r||(r=document.createElement("output"),r.className="textarea-counter",r.setAttribute("aria-live","off"),n?n.append(r):e.insertAdjacentElement("afterend",r)),r.id=`${e.id||`textarea-${++Bu}`}-count`,document.getElementById(r.id)!==r&&(r.id=`textarea-${++Bu}-count`),Vu.add(r),a||(a=document.createElement("span"),a.className="visually-hidden",a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),r.insertAdjacentElement("afterend",a));let o=a,c=r,l=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean);l.includes(r.id)||e.setAttribute("aria-describedby",[...l,r.id].join(" "));let u;function d(){let h=e.value,f=i?h.trim()?h.trim().split(/\s+/).length:0:h.length;if(s>0){c.textContent=zy(e,i,f,s);let p=f/s;c.dataset.state=p>=1?"error":p>=.8?"warning":""}else c.textContent=Uy(e,i,f),c.dataset.state="";if(clearTimeout(u),c.dataset.state){let p=c.textContent;u=setTimeout(()=>{o.textContent=p},By)}else o.textContent=""}Hu.set(e,d),e.addEventListener("input",d),I(e,d),d()}function Wy(e=document){e.querySelectorAll(zu).forEach(ju)}var zu,By,Bu,Hy,Vy,Hu,Vu,oa=v(()=>{D();zu="textarea[data-count]",By=700,Bu=0,Hy={characters:{one:"{count} character",other:"{count} characters"},words:{one:"{count} word",other:"{count} words"}},Vy={characters:{one:"{count} of {max} character",other:"{count} of {max} characters"},words:{one:"{count} of {max} word",other:"{count} of {max} words"}};Hu=new WeakMap,Vu=new WeakSet;x(zu,ju)});var Ju={};T(Ju,{initTextareaGrow:()=>Ky});function Xu(e){if(Yu.has(e))return;Yu.add(e);let t=parseInt(e.dataset.maxRows??"0",10)||0;if(e.hasAttribute("rows")&&e.style.setProperty("--grow-rows",String(e.rows)),t>0&&e.style.setProperty("--grow-max-rows",String(t)),jy){e.setAttribute("data-grow-init","");return}e.setAttribute("data-grow-init","fallback");function i(){e.style.blockSize="auto";let s=getComputedStyle(e),n=parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),r=e.scrollHeight+n;if(t>0){let a=parseFloat(s.lineHeight)||parseFloat(s.fontSize)*1.2,o=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),c=a*t+o+n;r>c?(r=c,e.style.overflowY="auto"):e.style.overflowY="hidden"}e.style.blockSize=r+"px"}e.addEventListener("input",i),e.addEventListener("change",i),I(e,i),i()}function Ky(e=document){e.querySelectorAll(Gu).forEach(Xu)}var Gu,jy,Yu,ca=v(()=>{D();Gu="textarea[data-grow]",jy=CSS.supports("field-sizing","content"),Yu=new WeakSet;x(Gu,Xu)});function Jy(e){return e.localName.includes("-")?!!customElements.get(e.localName)?.formAssociated:!1}function It(e){let t=e.name;return typeof t=="string"&&t||e.getAttribute("name")||""}function rs(e){if(e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLOutputElement)return[];if(e instanceof HTMLInputElement)return Yy.has(e.type)?[]:e.type==="radio"||e.type==="checkbox"?e.checked?[e.value||"on"]:[]:e.type==="file"?e.files?[...e.files].map(i=>i.name):[]:e.value===""?[]:[e.value];if(e instanceof HTMLSelectElement)return e.multiple?[...e.selectedOptions].map(i=>i.value):e.value===""?[]:[e.value];let t=e.value;return Array.isArray(t)?t.map(String).filter(i=>i!==""):t==null||t===""?[]:[String(t)]}function la(e,t){return e instanceof HTMLFormElement?Array.from(e.elements).filter(i=>It(i)===t):[...e.querySelectorAll(`[name="${CSS.escape(t)}"]`)]}function Zy(e,t){return la(e,t).flatMap(rs)}function Qy(e){let t=e.trim(),i=t.search(/[=:]/);if(i===-1){let a=t.startsWith("!");return{name:(a?t.slice(1):t).trim(),value:null,negate:a}}let s=t.slice(0,i),n=t.slice(i+1),r=!1;return s.startsWith("!")&&(r=!0,s=s.slice(1)),s.endsWith("!")?(r=!r,s=s.slice(0,-1)):n.startsWith("!")&&(r=!r,n=n.slice(1)),{name:s.trim(),value:n.trim(),negate:r}}function Zu(e){return String(e||"").split("||").map(t=>t.split("&&").map(Qy).filter(i=>i.name)).filter(t=>t.length)}function Qu(e){return new Set(Zu(e).flat().map(t=>t.name))}function tw(e,t){let i=Zy(t,e.name),s=e.value===null?i.length>0:i.includes(e.value);return e.negate?!s:s}function as(e,t){return Zu(e).some(i=>i.every(s=>tw(s,t)))}function ew(e){return[e,...e.querySelectorAll("*")].filter(i=>i.matches(Xy)||Jy(i))}function os(e,t){for(let i of ew(e))if(t){if(!i.hasAttribute(ze)||i.closest(Gy))continue;i.removeAttribute("disabled"),i.removeAttribute(ze)}else{if(i.hasAttribute("disabled"))continue;i.setAttribute("disabled",""),i.setAttribute(ze,"")}}var Yy,ze,Gy,Xy,ua=v(()=>{Yy=new Set(["button","submit","reset","image"]),ze="data-conditional-disabled",Gy="[data-show-when][hidden], [data-hide-when][hidden], [data-wizard-step][data-wizard-hidden]",Xy="input, select, textarea, button, fieldset"});var rd={};T(rd,{initConditionalFields:()=>sw});function id(e){return e.closest("form")||document}function sd(e){return e.hasAttribute("data-show-when")?{condition:e.dataset.showWhen||"",invert:!1}:{condition:e.dataset.hideWhen||"",invert:!0}}function ha(e){let{condition:t,invert:i}=sd(e),s=as(t,id(e)),n=i?!s:s;n?(e.removeAttribute("hidden"),e.removeAttribute("inert")):(e.setAttribute("hidden",""),e.setAttribute("inert","")),os(e,n)}function fa(e,t){for(let i of document.querySelectorAll(pa)){let s=i;!da.has(s)||id(s)!==e||t&&!Qu(sd(s).condition).has(t)||ha(s)}}function ed(e){let t=e.target;if(!(t instanceof Element))return;let i=It(t);if(!i)return;let s=t.form||t.closest("form");fa(s||document,i),s&&fa(document,i)}function iw(){td||(td=!0,document.addEventListener("input",ed,!0),document.addEventListener("change",ed,!0),document.addEventListener("reset",e=>{setTimeout(()=>{e.defaultPrevented||fa(document)},0)},!0))}function nd(e){let t=e;da.has(t)||(da.add(t),t.setAttribute("data-conditional-init",""),iw(),ha(t),I(t,ha))}function sw(e=document){e.querySelectorAll(pa).forEach(nd)}var pa,da,td,ma=v(()=>{D();ua();pa="[data-show-when], [data-hide-when]",da=new WeakSet,td=!1;x(pa,nd)});var dd={};T(dd,{initRangeSliders:()=>rw});function ga(e,t){if(e===""||e==null)return t;let i=parseFloat(e);return Number.isFinite(i)?i:t}function ba(e){let t=ga(e.min,0),i=ga(e.max,100);return i<t&&(i=t),{min:t,max:i}}function od(e,t,i){return i===t?0:Math.min(1,Math.max(0,(e-t)/(i-t)))}function cd(e){let t=String(e),i=t.indexOf(".");return i===-1?0:t.length-i-1}function ud(e){if(ad.has(e)||!e.parentNode)return;ad.add(e),e.setAttribute("data-range-init","");let t=e.hasAttribute("data-bubble"),i=e.parentElement;i?.classList.contains("range-wrapper")?i.querySelectorAll(":scope > .range-bubble, :scope > .range-markers, :scope > .range-labels").forEach(l=>l.remove()):(i=document.createElement("div"),i.className="range-wrapper",e.parentNode.insertBefore(i,e),i.appendChild(e));let s=!e.hasAttribute("aria-valuetext"),n;if(t&&(n=document.createElement("output"),n.className="range-bubble",n.setAttribute("aria-hidden","true"),e.id&&n.htmlFor.add(e.id),i.appendChild(n)),e.hasAttribute("data-markers")){let{min:l,max:u}=ba(e),d=ga(e.step,1)||1,h=Math.round((u-l)/d);if(h>0&&h<=nw){let f=document.createElement("div");f.className="range-markers",f.setAttribute("aria-hidden","true");for(let p=0;p<=h;p++)f.appendChild(document.createElement("span"));i.appendChild(f)}}let r=e.getAttribute("list"),a=r?document.getElementById(r):null;if(a instanceof HTMLDataListElement){let l=document.createElement("div");l.className="range-labels",l.setAttribute("aria-hidden","true");let{min:u,max:d}=ba(e);Array.from(a.options).forEach(h=>{let f=document.createElement("span");f.textContent=h.label||h.value,f.style.setProperty("--range-frac",String(od(parseFloat(h.value),u,d))),l.appendChild(f)}),i.appendChild(l)}function o(){let l=e.value;if(a instanceof HTMLDataListElement){let p=Array.from(a.options).find(m=>m.label&&parseFloat(m.value)===parseFloat(l));if(p)return p.label}let u=e.dataset.prefix||"",d=e.dataset.suffix||"",h=Math.max(cd(e.step==="any"?"":e.step),cd(l)),f=l;try{f=new Intl.NumberFormat(H(e),{minimumFractionDigits:h,maximumFractionDigits:h}).format(parseFloat(l))}catch{}return`${u}${f}${d}`}function c(){let{min:l,max:u}=ba(e),d=od(parseFloat(e.value),l,u);i.style.setProperty("--range-pct",`${d*100}%`),i.style.setProperty("--range-frac",String(d));let h=o();n&&(n.textContent=h),s&&(h!==e.value?e.setAttribute("aria-valuetext",h):e.removeAttribute("aria-valuetext"))}e.addEventListener("input",c),e.addEventListener("change",c),I(e,c),c()}function rw(e=document){e.querySelectorAll(ld).forEach(t=>ud(t))}var ld,nw,ad,va=v(()=>{D();Z();ld='input[type="range"][data-range]',nw=100,ad=new WeakSet;x(ld,ud)});var vd={};T(vd,{formatBytes:()=>pd,initUploadZones:()=>uw,matchesAccept:()=>bd});function oe(e,t,i){return e.getAttribute(`data-label-${t}`)??i}function pd(e,t="en"){let i=["byte","kilobyte","megabyte","gigabyte"],s=0,n=e;for(;n>=1e3&&s<i.length-1;)n/=1e3,s++;try{return new Intl.NumberFormat(t,{style:"unit",unit:i[s],unitDisplay:"short",maximumFractionDigits:s>0?1:0}).format(n)}catch{return`${n.toFixed(s>0?1:0)} ${["B","kB","MB","GB"][s]}`}}function md(e){return e.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean)}function bd(e,t){if(!t.length)return!0;let i=e.name.toLowerCase(),s=(e.type||"").toLowerCase();return t.some(n=>n.startsWith(".")?i.endsWith(n):n.endsWith("/*")?s.startsWith(n.slice(0,-1)):s===n)}function lw(e,t){let i=md(t).map(s=>{if(s.startsWith("."))return s.slice(1).toUpperCase();let[n,r=""]=s.split("/");if(r==="*"){let a=cw[n];return a?oe(e,a,a):s}return/^[a-z0-9]+$/.test(r)?r.toUpperCase():s});return[...new Set(i)].join(", ")}function gd(e){if(hd.has(e)||!e.parentNode)return;hd.add(e);let t=e.parentElement?.classList.contains("upload-zone")?e.parentElement:null,i=t?.querySelector(":scope > .upload-prompt"),s=t?.querySelector(":scope > .upload-file-list"),n=t?.querySelector(":scope > .upload-status");if(!t||!i||!s||!n){t?.querySelectorAll(":scope > :not(input)").forEach(b=>b.remove()),t||(t=document.createElement("div"),t.className="upload-zone",e.parentNode.insertBefore(t,e),t.appendChild(e));let u=`upload-${++ow}`;i=document.createElement("p"),i.className="upload-prompt",i.id=`${u}-prompt`,i.insertAdjacentHTML("afterbegin",aw);let d=document.createElement("span"),h=e.multiple?"Drag files here or":"Drag a file here or";d.append(`${oe(e,"prompt",h)} `);let f=document.createElement("span");f.className="upload-browse",f.textContent=oe(e,"browse","browse"),d.append(f),i.append(d);let p=e.getAttribute("accept")||"";if(p){let b=document.createElement("small");b.textContent=lw(e,p),i.append(b)}s=document.createElement("ul"),s.className="upload-file-list",s.hidden=!0,s.setAttribute("aria-label",oe(e,"files","Selected files")),n=document.createElement("p"),n.className="upload-status",n.setAttribute("role","status"),t.append(i,s,n);let m=new Set((e.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));m.add(i.id),e.setAttribute("aria-describedby",[...m].join(" "))}let r=s,a=n,o=t;function c(){r.replaceChildren();let u=Array.from(e.files??[]);r.hidden=u.length===0;let d=H(e);for(let h of u){let f=document.createElement("li"),p=document.createElement("span");p.className="upload-file-name",p.textContent=h.name;let m=document.createElement("span");m.className="upload-file-size",m.textContent=pd(h.size,d),f.append(p,m),r.append(f)}}let l=0;o.addEventListener("dragenter",u=>{u.preventDefault(),l++,o.dataset.dragover=""}),o.addEventListener("dragleave",()=>{l=Math.max(0,l-1),l===0&&delete o.dataset.dragover}),o.addEventListener("dragover",u=>{u.preventDefault()}),o.addEventListener("drop",u=>{if(u.preventDefault(),l=0,delete o.dataset.dragover,e.disabled)return;let d=Array.from(u.dataTransfer?.files??[]);if(!d.length)return;let h=md(e.getAttribute("accept")||""),f=d.filter(g=>bd(g,h)),p=d.filter(g=>!f.includes(g)),m=[];if(p.length&&m.push(oe(e,"rejected","Not accepted: {files}").replace("{files}",p.map(g=>g.name).join(", "))),!e.multiple&&f.length>1&&(f.length=1,m.push(oe(e,"single","Only one file allowed. Kept {file}.").replace("{file}",f[0].name))),a.textContent=m.join(" "),!f.length)return;let b=new DataTransfer;f.forEach(g=>b.items.add(g)),e.files=b.files,e.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}),e.addEventListener("click",()=>{a.textContent=""}),e.addEventListener("change",c),I(e,()=>{a.textContent="",c()}),c()}function uw(e=document){e.querySelectorAll(fd).forEach(t=>gd(t))}var fd,aw,hd,ow,cw,ya=v(()=>{D();Z();fd='input[type="file"][data-upload]',aw='<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"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>',hd=new WeakSet,ow=0;cw={image:"images",audio:"audio",video:"video"};x(fd,gd)});function Ue(e){if(!e)return!1;let t=e,i=String(t.localName??t.tagName??"").toLowerCase();if(hw.has(i))return!1;let s=i==="input"?String(t.type??t.getAttribute?.("type")??"text").toLowerCase():"";if(dw.has(s))return!1;let n=String(t.getAttribute?.("autocomplete")??"").trim().toLowerCase();return!(n==="off"||n&&n.split(/\s+/).some(r=>fw.has(r))||t.hasAttribute?.("data-autosave-ignore")||t.closest?.("[data-autosave-ignore]"))}var dw,hw,fw,wa=v(()=>{dw=new Set(["password","hidden","file","submit","button","reset","image"]),hw=new Set(["button","fieldset","output","object"]),fw=new Set(["cc-number","cc-csc","cc-exp","cc-exp-month","cc-exp-year","one-time-code","new-password","current-password"])});var Ed={};T(Ed,{initAutosave:()=>vw});function bw(e){let t=e.dataset.autosave;if(typeof t=="string"&&t.trim()!=="")return t.trim();let i=(e.method||"get").toLowerCase(),s=e.action||(typeof location<"u"?location.href:"");return`${i} ${s}`}function gw(e){let t=e.dataset.autosaveRetain;if(typeof t!="string")return null;let i=t.trim();return i===""?null:new Set(i.split(/\s+/))}function Ad(e){if(yd.has(e))return;yd.add(e),e.setAttribute("data-autosave-init","");let t=bw(e),i=gw(e),s;function n(){return Array.from(e.elements).filter(h=>{let f=h.name;return f&&(i===null||i.has(f))&&Ue(h)})}function r(){let h={};for(let f of n()){if(f.disabled)continue;let{name:p}=f;if(f.type==="checkbox"){let m=Array.isArray(h[p])?h[p]:h[p]=[];f.checked&&m.push(f.value)}else f.type==="radio"?f.checked&&(h[p]=f.value):f instanceof HTMLSelectElement&&f.multiple?h[p]=Array.from(f.selectedOptions).map(m=>m.value):typeof f.value=="string"&&(h[p]=f.value)}return h}function a(){s=void 0,S.set(cs,t,r()).catch(()=>{})}function o(){clearTimeout(s),s=setTimeout(a,pw)}function c(){clearTimeout(s),s=void 0}async function l(){let h=await S.get(cs,t,{maxAge:mw});if(!h||typeof h!="object")return S.remove(cs,t).catch(()=>{}),[];let f=[];for(let p of n()){if(!Object.hasOwn(h,p.name)||p.disabled||p.readOnly)continue;let m=h[p.name],b=Array.isArray(m)?m:[m];if(p.type==="checkbox")p.checked=b.includes(p.value);else if(p.type==="radio")p.checked=p.value===m;else if(p instanceof HTMLSelectElement&&p.multiple)for(let g of p.options)g.selected=b.includes(g.value);else if(typeof m=="string")p.value=m;else continue;f.push(p)}return f}function u(){c(),S.remove(cs,t).catch(()=>{})}function d(){let h=e.dataset.labelRestored||"Draft restored";if(customElements.get("toast-msg")){let m=document.querySelector("toast-msg");if(m||(m=document.createElement("toast-msg"),document.body.appendChild(m)),typeof m.show=="function"){m.show({message:h,variant:"info",duration:3e3,source:"autosave"});return}}let f=e.querySelector(":scope > [data-autosave-status]");f||(f=document.createElement("span"),f.className="visually-hidden",f.setAttribute("role","status"),f.setAttribute("data-autosave-status",""),e.append(f)),f.textContent="";let p=f;requestAnimationFrame(()=>{p.textContent=h})}l().then(h=>{if(h.length){d();for(let f of h)f.dispatchEvent(new Event("input",{bubbles:!0})),f.dispatchEvent(new Event("change",{bubbles:!0}));c(),e.dispatchEvent(new CustomEvent("autosave:restore",{bubbles:!0,detail:{key:t,fields:[...new Set(h.map(f=>f.name))]}}))}}),e.addEventListener("input",o),e.addEventListener("change",o),e.addEventListener("submit",u),e.addEventListener("reset",h=>{c(),setTimeout(()=>{h.defaultPrevented||u()},0)})}function vw(e=document){e.querySelectorAll(wd).forEach(t=>Ad(t))}var wd,cs,pw,mw,yd,Aa=v(()=>{it();D();wa();wd="form[data-autosave]",cs="autosave",pw=500,mw=1440*60*1e3,yd=new WeakSet;x(wd,Ad)});var Nd={};T(Nd,{initMaskInputs:()=>xw});function kd(e){let t=e.dataset.mask;if(Sd[t])return Sd[t];if(t==="custom"&&e.dataset.pattern){let i=e.dataset.pattern,s=new Set;for(let r of i)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:i,accept:n}}return null}function $t(e){return e==="#"||e==="A"||e==="*"}function Ld(e,t){let i=ww[e];return i?i.test(t):!1}function Aw(e){let t=0;for(let i of e)$t(i)&&t++;return t}function Cd(e,t){let i="",s=0;for(let n=0;n<t.length&&s<e.length;n++){let r=t[n];if($t(r)){for(;s<e.length&&!Ld(r,e[s]);)s++;s<e.length&&(i+=e[s],s++)}else i+=r}return i}function ls(e,t,i){let s="",n=0;for(let r of e){if(n<t.length&&!$t(t[n])){if(r===t[n]){n++;continue}for(;n<t.length&&!$t(t[n]);)n++}n<t.length?Ld(t[n],r)&&(s+=r,n++):i.test(r)&&(s+=r)}return s}function Ew(e,t,i){let s=0,n=0;if(e>0){for(let r=0;r<t.length;r++)if($t(i[r])&&(s++,s===e)){n=r+1;break}s<e&&(n=t.length)}for(;n<i.length&&n<t.length&&!$t(i[n]);)n++;return n}function Sw(e){for(let t of e)if($t(t)&&t!=="#")return!1;return!0}function Sa(e){if(xd.has(e)||!yw.has(e.type))return;let t=kd(e);if(!t){if(e.removeAttribute("data-mask-init"),!Ea.has(e)){Ea.add(e);let h=new MutationObserver(()=>{kd(e)&&(h.disconnect(),Ea.delete(e),Sa(e))});h.observe(e,{attributes:!0,attributeFilter:["data-mask","data-pattern","type"]})}return}xd.add(e),e.setAttribute("data-mask-init","");let{pattern:i}=t,s=t.accept,n=Aw(i);Sw(i)&&!e.getAttribute("inputmode")&&e.setAttribute("inputmode","numeric"),e.getAttribute("maxlength")||e.setAttribute("maxlength",String(i.length));let r=!1,a=null,o="",c="";function l(){let h=e.dataset.rawValue||"";if(h.length>0&&h.length<n){let p=e.getAttribute("placeholder");c=e.dataset.maskMessage||(p?`Enter the complete value, like ${p}.`:"Enter the complete value."),e.setCustomValidity(c)}else c&&e.validationMessage===c&&(e.setCustomValidity(""),c="")}function u(){let h=ls(e.value,i,s).slice(0,n),f=Cd(h,i);e.value!==f&&(e.value=f),e.dataset.rawValue=h,l()}e.addEventListener("compositionstart",()=>{r=!0}),e.addEventListener("compositionend",()=>{r=!1,d()}),e.addEventListener("beforeinput",h=>{a=e.value,o=h.inputType||""});function d(){if(r)return;let h=e.selectionStart??e.value.length,f=ls(e.value.slice(0,h),i,s).length,p=ls(e.value,i,s),m=a!=null?ls(a,i,s):null;m!=null&&p===m&&a!==e.value&&(o==="deleteContentBackward"&&f>0?(p=p.slice(0,f-1)+p.slice(f),f--):o==="deleteContentForward"&&f<p.length&&(p=p.slice(0,f)+p.slice(f+1))),a=null,o="",p=p.slice(0,n);let b=Cd(p,i);e.value=b,e.dataset.rawValue=p,l();let g=Ew(Math.min(f,p.length),b,i);document.activeElement===e&&e.setSelectionRange(g,g)}e.addEventListener("input",d),I(e,u),u()}function xw(e=document){e.querySelectorAll(Td).forEach(t=>Sa(t))}var Td,yw,Sd,ww,xd,Ea,xa=v(()=>{D();Td="input[data-mask]",yw=new Set(["text","tel","search"]),Sd={phone:{pattern:"(###) ###-####",accept:/\d/},"credit-card":{pattern:"#### #### #### ####",accept:/\d/},date:{pattern:"##/##/####",accept:/\d/},ssn:{pattern:"###-##-####",accept:/\d/},zip:{pattern:"#####",accept:/\d/}},ww={"#":/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},xd=new WeakSet,Ea=new WeakSet;x(Td,Sa)});var $d={};T($d,{initAcceptInputs:()=>Tw});function kw(e){if(!e)return null;let t=Object.hasOwn(Md,e)?Md[e]:null;if(t)return{regex:new RegExp(t.pattern,"u"),inputmode:t.inputmode};if(e.startsWith("[")){for(let i of["u",""])try{return{regex:new RegExp(e,i),inputmode:"text"}}catch{}return console.warn(`[data-accept] Invalid character class: ${e}`),null}return console.warn(`[data-accept] Unknown preset: ${e}`),null}function us(e,t){return Array.from(e).filter(i=>t.test(i)).join("")}function Id(e){if(_d.has(e))return;if(_d.add(e),e.hasAttribute("data-mask")){console.warn("[data-accept] Conflict: data-mask is also present \u2014 deferring to mask.",e);return}let t=kw(e.dataset.accept||"");if(!t)return;let{regex:i,inputmode:s}=t;e.dataset.acceptPattern=i.source,e.getAttribute("inputmode")||e.setAttribute("inputmode",s);let n=!1;e.addEventListener("compositionstart",()=>{n=!0}),e.addEventListener("compositionend",()=>{n=!1,r()}),e.addEventListener("beforeinput",o=>{if(n)return;let c=o.data;if(c!=null){if(o.inputType==="insertFromPaste"){let l=us(c,i);if(l===c||(o.preventDefault(),!l))return;document.execCommand("insertText",!1,l)||Cw(e,l);return}if(o.inputType==="insertText"||o.inputType==="insertCompositionText"){for(let l of c)if(!i.test(l)){o.preventDefault();return}}}}),e.addEventListener("input",()=>{n||r()});function r(){let o=e.value,c=us(o,i);if(c===o)return;let l=e.selectionStart??0,u=us(o.slice(0,l),i);e.value=c;let d=Math.min(u.length,c.length);document.activeElement===e&&e.setSelectionRange(d,d)}function a(){if(!e.value)return;let o=us(e.value,i);o!==e.value&&(e.value=o)}a(),I(e,a)}function Cw(e,t){let i=e.selectionStart??0,s=e.selectionEnd??0,n=e.value.slice(0,i),r=e.value.slice(s);e.value=n+t+r;let a=i+t.length;e.setSelectionRange(a,a),e.dispatchEvent(new Event("input",{bubbles:!0}))}function Tw(e=document){e.querySelectorAll(Dd).forEach(Id)}var Dd,Md,_d,ka=v(()=>{D();Dd="input[data-accept]",Md={digits:{pattern:"[0-9]",inputmode:"numeric"},alpha:{pattern:"[a-zA-Z]",inputmode:"text"},letters:{pattern:"[\\p{L}\\p{M}]",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"}};_d=new WeakSet;x(Dd,Id)});var qd={};T(qd,{initToggleTags:()=>Lw});function Rd(e){if(Od.has(e))return;Od.add(e);let t=e.querySelector(":scope > .toggle-tags-status");t||(t=document.createElement("p"),t.className="toggle-tags-status",t.setAttribute("role","status"),e.append(t));let i=t,s=()=>Array.from(e.querySelectorAll('input[type="checkbox"]')),n=()=>{let o=parseInt(e.dataset.max??"",10);return o>=1?o:1/0},r=()=>(e.getAttribute("data-label-limit")??"Limit reached: {max} selected. Uncheck one to choose another.").replace("{max}",String(n()));function a(){let o=n(),c=s(),l=c.filter(d=>d.checked).length>=o;for(let d of c){let h=d.hasAttribute("data-max-blocked");if(l&&!d.checked&&!d.disabled){if(!h&&d.getAttribute("aria-disabled")==="true")continue;d.setAttribute("aria-disabled","true"),d.setAttribute("data-max-blocked","")}else h&&(d.removeAttribute("aria-disabled"),d.removeAttribute("data-max-blocked"))}let u=l?r():"";i.textContent!==u&&(i.textContent=u)}e.addEventListener("click",o=>{let c=o.target;!(c instanceof HTMLInputElement)||!c.hasAttribute("data-max-blocked")||(o.preventDefault(),i.textContent="",requestAnimationFrame(()=>{i.textContent=r()}))}),e.addEventListener("change",a),new MutationObserver(a).observe(e,{attributes:!0,attributeFilter:["data-max"]}),I(e,a),a()}function Lw(e=document){e.querySelectorAll(Pd).forEach(t=>Rd(t))}var Pd,Od,Ca=v(()=>{D();Pd="fieldset[data-toggle-tags][data-max]",Od=new WeakSet;x(Pd,Rd)});var zd={};T(zd,{initNumberSteppers:()=>Dw});function Bd(e,t){let i=document.createElement("button");return i.type="button",i.className=e,i.innerHTML=t,i.tabIndex=-1,i}function _w(e,t){let i=e.min!==""?parseFloat(e.min):-1/0,s=e.max!==""?parseFloat(e.max):1/0,n=parseFloat(e.value)||0;e.value=String(Math.min(Math.max(n+t,i),s))}function Vd(e){if(Fd.has(e)||!e.parentNode)return;Fd.add(e),e.setAttribute("data-stepper-init","");let t=e.parentElement;t?.classList.contains("number-wrapper")?t.querySelectorAll(":scope > .number-dec, :scope > .number-inc").forEach(c=>c.remove()):(t=document.createElement("div"),t.className="number-wrapper",e.parentNode.insertBefore(t,e));let i=Bd("number-dec",Nw),s=Bd("number-inc",Mw);t.appendChild(i),t.appendChild(e),t.appendChild(s);function n(){i.setAttribute("aria-label",e.dataset.labelDecrease||"Decrease"),s.setAttribute("aria-label",e.dataset.labelIncrease||"Increase")}function r(){return e.disabled||e.readOnly||e.matches(":disabled")}function a(c){if(r())return;let l=e.value;try{c>0?e.stepUp():e.stepDown()}catch{_w(e,c)}e.value!==l&&(e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))),o()}function o(){let c=e.min!==""?parseFloat(e.min):-1/0,l=e.max!==""?parseFloat(e.max):1/0,u=parseFloat(e.value),d=r();i.disabled=d||Number.isFinite(u)&&u<=c,s.disabled=d||Number.isFinite(u)&&u>=l}i.addEventListener("click",()=>a(-1)),s.addEventListener("click",()=>a(1)),e.addEventListener("input",o),e.addEventListener("change",o),I(e,o),new MutationObserver(()=>{n(),o()}).observe(e,{attributes:!0,attributeFilter:["disabled","readonly","min","max","step","data-label-decrease","data-label-increase"]}),n(),o()}function Dw(e=document){e.querySelectorAll(Hd).forEach(t=>Vd(t))}var Hd,Nw,Mw,Fd,Ta=v(()=>{D();Hd='input[type="number"][data-stepper]',Nw='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><line x1="5" y1="12" x2="19" y2="12"/></svg>',Mw='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>',Fd=new WeakSet;x(Hd,Vd)});var Kd={};T(Kd,{initColorInputs:()=>Iw});function jd(e){if(Ud.has(e)||!e.parentNode||e.closest("color-picker"))return;Ud.add(e),e.setAttribute("data-color-init","");let t=e.parentElement;t?.classList.contains("color-wrapper")?t.querySelectorAll(":scope > .color-display").forEach(a=>a.remove()):(t=document.createElement("span"),t.className="color-wrapper",e.parentNode.insertBefore(t,e),t.appendChild(e));let i=document.createElement("span");i.className="color-display",i.setAttribute("aria-hidden","true");let s=document.createElement("span");s.className="color-swatch";let n=document.createElement("span");n.className="color-hex",i.append(s,n),t.appendChild(i);function r(){s.style.setProperty("--color-swatch-value",e.value),n.textContent=e.value}e.addEventListener("input",r),e.addEventListener("change",r),I(e,r),r()}function Iw(e=document){e.querySelectorAll(Wd).forEach(t=>jd(t))}var Wd,Ud,La=v(()=>{D();Wd='input[type="color"][data-color]',Ud=new WeakSet;x(Wd,jd)});var nh={};T(nh,{initSelectAll:()=>Hw});function Hw(e=document){e.querySelectorAll(ih).forEach(t=>sh(t))}function Da(e){return e.closest(Bw)||document}function eh(e){let t=e.dataset.selectAll??"";if(!t)return[];let i;try{i=Da(e).querySelectorAll(t)}catch{return[]}return[...i].filter(s=>s!==e&&!s.disabled&&!s.matches(":disabled"))}function sh(e){if(_a.has(e)||!(e instanceof HTMLInputElement)||e.type!=="checkbox")return;e.removeAttribute("data-select-all-init");let t=!1,i="",s=new AbortController,{signal:n}=s;function r(){if(n.aborted)return;if(!e.isConnected){s.abort(),c.disconnect(),_a.delete(e);return}let u=eh(e),d=u.length,h=u.filter(b=>b.checked),f=h.length;e.checked=d>0&&f===d,e.indeterminate=f>0&&f<d;let p=Da(e).querySelector("[data-selected-count]");if(p){let b=new Intl.NumberFormat(H(p)).format(f);p instanceof HTMLOutputElement?p.value=b:p.textContent=b}let m=u.map(b=>b.checked?"1":"0").join("");m!==i&&(i=m,e.dispatchEvent(new CustomEvent("select-all:change",{bubbles:!0,detail:{checked:f,total:d,selected:h}})))}_a.set(e,{sync:r}),e.addEventListener("change",()=>{t=!0;let u=e.checked;for(let d of eh(e))d.checked!==u&&(d.checked=u,d.dispatchEvent(new Event("change",{bubbles:!0})));t=!1,r()},{signal:n});let a=Da(e);a.addEventListener("change",u=>{if(t||u.target===e)return;let d=e.dataset.selectAll;d&&u.target.matches?.(d)&&r()},{signal:n}),I(e,r);let o=!1,c=new MutationObserver(()=>{o||(o=!0,queueMicrotask(()=>{o=!1,r()}))}),l=a===document?document.body:a;l&&c.observe(l,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","hidden"]}),c.observe(e,{attributes:!0,attributeFilter:["data-select-all"]}),r()}var ih,Bw,_a,Ia=v(()=>{D();Z();ih="[data-select-all]",Bw="[data-select-all-scope], table, form, fieldset",_a=new WeakMap;x(ih,sh)});var uh={};T(uh,{initMath:()=>Oa});function Oa(e=document){e.querySelectorAll(We).forEach(Ra)}function Uw(e){let t=e.getAttribute("data-math")||"";return new Set(t.split(/\s+/).filter(Boolean))}function Ww(e){let t=(e.closest("pre")||e).nextElementSibling;return t?.hasAttribute("data-math-rendered")?t:null}function ch(e){let t=e.previousElementSibling;return t?t.matches(We)?t:t.matches("pre")?t.querySelector(We):null:null}function lh(){let e=[];document.querySelectorAll("[data-math-rendered][data-math-numbered]").forEach((i,s)=>{let n=s+1;i.getAttribute("data-equation-number")!==String(n)&&i.setAttribute("data-equation-number",String(n)),i.id&&e.push({id:i.id,number:n,latex:ch(i)?.textContent.trim()??""})});let t=(window.VBMath??={equations:[]}).equations;t.splice(0,t.length,...e)}function Pa(){$a||($a=!0,queueMicrotask(()=>{$a=!1,lh()}))}function Ra(e){if(rh.has(e))return;if(rh.add(e),e.setAttribute("data-math-init",""),e.getAttribute("data-math-state")==="rendered"&&Ww(e)){Pa();return}!e.hasAttribute("data-math")&&e.classList.contains("language-math")&&e.setAttribute("data-math","");let t=Uw(e),i=e.getAttribute("data-mathml"),s=e.textContent.trim(),n=t.has("inline");if(!i||!zw){e.setAttribute("data-math-state","source");return}let r=n?document.createElement("span"):document.createElement("div");r.setAttribute("data-math-rendered",""),r.replaceChildren(vc(i));let a=e.id||null;a&&(r.id=a,e.removeAttribute("id"));let o=r.querySelector("math");if(o&&(n||o.setAttribute("display","block"),!o.hasAttribute("alttext")&&s&&o.setAttribute("alttext",s)),t.has("numbered")&&r.setAttribute("data-math-numbered",""),t.has("copyable")){r.setAttribute("data-math-copyable","");let u=document.createElement("button");u.type="button",u.setAttribute("data-math-copy",""),u.textContent=R(e,"copy","Copy LaTeX"),r.append(u)}e.setAttribute("data-math-state","rendered");let c=e.closest("pre");(c||e).insertAdjacentElement("afterend",r),c?(c.setAttribute("data-math-state","rendered"),c.hidden=!0):e.hidden=!0;let l=null;t.has("numbered")&&(lh(),l=Number(r.getAttribute("data-equation-number"))),Kw(),e.dispatchEvent(new CustomEvent("math:rendered",{bubbles:!0,detail:{latex:s,inline:n,number:l}}))}async function jw(e){let t=e.closest("[data-math-rendered]"),i=t&&ch(t);if(!i)return;let s=i.textContent.trim(),n=R(i,"copy","Copy LaTeX"),r=R(i,"copied","Copied to clipboard"),a=R(i,"copy-failed","Copy failed"),o=await ut(s,{announceMessage:r,failureMessage:a}),c=o?r:a;e.setAttribute("data-state",o?"copied":"failed"),e.textContent=c,clearTimeout(ah.get(e)),ah.set(e,setTimeout(()=>{e.removeAttribute("data-state"),e.textContent=n},Vw))}function Kw(){if(document.querySelector("[data-vb-math-font]"))return;let e=document.createElement("link");e.rel="stylesheet",e.href=`${be()}/fonts/math-fonts.css`,e.setAttribute("data-vb-math-font",""),document.head.appendChild(e)}var We,Vw,zw,rh,$a,ah,oh,Yw,qa=v(()=>{ve();Ht();lt();zt();We="[data-math], code.language-math",Vw=2e3,zw=typeof MathMLElement<"u",rh=new WeakSet;window.VBMath=window.VBMath||{equations:[]};$a=!1;ah=new WeakMap;oh=Symbol.for("vb.math.copy");document[oh]||(document[oh]=!0,document.addEventListener("click",e=>{let i=(e.target instanceof Element?e.target:null)?.closest("button[data-math-copy]")??null;i&&jw(i)}));document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Oa()):Oa();Yw=new MutationObserver(e=>{for(let t of e){for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;(s.matches("[data-math-numbered]")||s.querySelector("[data-math-numbered]"))&&Pa()}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(We)&&Ra(s),s.querySelectorAll(We).forEach(Ra),(s.matches("[data-math-numbered]")||s.querySelector("[data-math-numbered]"))&&Pa()}}});Yw.observe(document.documentElement,{childList:!0,subtree:!0})});var _h={};T(_h,{WizardController:()=>je,initWizards:()=>EA});function Th(){try{let e=sessionStorage.getItem(Ch);return e||(e=globalThis.crypto?.randomUUID?.()??String(Math.random()).slice(2),sessionStorage.setItem(Ch,e)),e}catch{return""}}function Lh(e){let t=e;return typeof t.checkValidity=="function"?t.checkValidity():!e.matches(":invalid")}function Nh(e){let t=e;typeof t.reportValidity=="function"?t.reportValidity():t.focus?.()}function Mh(e){if(!(e instanceof HTMLFormElement))return;let t=e,i=t.wizardController;if(i instanceof je&&i.form===t)return;let s=new je(t);t.wizardController=s,t.wizardGoTo=n=>s.goTo(n),t.wizardNext=()=>s.next(),t.wizardPrev=()=>s.prev(),t.wizardReset=()=>s.reset()}function EA(){document.querySelectorAll("form[data-wizard]").forEach(Mh)}var bs,Ch,yA,wA,AA,je,Dh=v(()=>{it();Z();ua();wa();D();bs="wizard",Ch="vb:wizard-session",yA=24,wA={back:"Back",next:"Next",submit:"Submit",step:"Step {n}",status:"Now on step {current} of {total}: {name}",completed:"Go to {name} (completed)",yes:"Yes"},AA=new Set(["button","submit","reset","image","checkbox","radio","file","color","range"]);je=class{#t;#e=[];#i=0;#n=null;#s=null;#o=null;#r=!1;#a="step";#l="";#c=yA*36e5;#b=!1;#f=0;#u=0;#p=new AbortController;constructor(t){if(!t||!(t instanceof HTMLFormElement))throw new Error("WizardController requires a form element");this.#t=t,this.#v()}#v(){if(this.#e=Array.from(this.#t.querySelectorAll("fieldset[data-wizard-step]")),this.#e.length===0){console.warn("Wizard form has no steps");return}this.#r=this.#t.hasAttribute("data-wizard-history"),this.#a=this.#t.getAttribute("data-wizard-validate")||"step",this.#E(),this.#n=this.#t.querySelector("[data-wizard-progress]"),this.#M(),this.#et(),this.#K(),this.#t.setAttribute("data-wizard-enhanced",""),this.#t.setAttribute("data-wizard-total",String(this.#e.length)),this.#Z(),this.#G(),this.#q();let t=()=>{cancelAnimationFrame(this.#f),this.#f=requestAnimationFrame(()=>this.#j())};if(this.#t.addEventListener("change",t),this.#t.addEventListener("input",t),this.#l&&(this.#t.addEventListener("change",()=>this.#g()),this.#t.addEventListener("input",()=>this.#g())),this.#t.addEventListener("keydown",i=>this.#k(i)),this.#t.addEventListener("click",i=>this.#N(i)),this.#t.addEventListener("submit",i=>this.#O(i)),this.#t.addEventListener("vb:beforesubmit",i=>this.#V(i)),this.#t.addEventListener("reset",i=>{setTimeout(()=>{i.defaultPrevented||this.reset()},0)}),this.#r){let i=this.#F();i!==null&&i>=0&&i<this.#e.length&&(this.#i=i),window.addEventListener("hashchange",()=>{if(!this.#t.isConnected){this.#p.abort();return}let s=this.#F();s===null||s===this.#i||this.#ot(s,{push:!1})||this.#Y(!1)},{signal:this.#p.signal})}if(this.#j(),this.#l){let i=this.#r&&this.#F()!==null;this.#b=!0,this.#S(i).finally(()=>{this.#b=!1})}}#d(t,i={}){return(this.#t.getAttribute(`data-label-${t}`)??wA[t]).replace(/\{(\w+)\}/g,(n,r)=>r in i?i[r]:n)}#m(t){try{return new Intl.NumberFormat(H(this.#t)).format(t)}catch{return String(t)}}#h(t,i){return t?.querySelector(":scope > legend")?.textContent?.trim()||this.#d("step",{n:this.#m(i+1)})}#E(){let t=this.#t.getAttribute("data-wizard-persist");if(t===null)return;if(!this.#t.id){console.warn("Wizard persistence requires an id on the form element");return}this.#l=t==="local"?"local":"session";let i=Number(this.#t.getAttribute("data-wizard-persist-hours"));i>0&&(this.#c=i*36e5)}#y(){let t={};for(let i of this.#t.elements){let s=It(i);!s||!Ue(i)||(t[s]??=[]).push(...rs(i))}return t}#x(){if(!this.#l||this.#b)return;let t={step:this.#i,data:this.#y(),session:this.#l==="session"?Th():null};S.set(bs,this.#t.id,t).catch(()=>{})}#g(){this.#l&&(cancelAnimationFrame(this.#u),this.#u=requestAnimationFrame(()=>this.#x()))}async#S(t){let i;try{i=await S.get(bs,this.#t.id,{maxAge:this.#c})}catch{return}if(!i||typeof i!="object")return;let s=i;if(this.#l==="session"&&s.session!==Th()){S.remove(bs,this.#t.id).catch(()=>{});return}let n=this.#w(s.data&&typeof s.data=="object"?s.data:{});!t&&typeof s.step=="number"&&s.step>=0&&s.step<this.#e.length&&(this.#i=s.step),this.#j(),this.#at("wizard:restore",{step:this.#i,fields:n})}#w(t){let i=new Set,s=new Map,n=[];for(let r of this.#t.elements){let a=It(r);if(!a||!Object.hasOwn(t,a)||!Ue(r)||r.hasAttribute("readonly")||r.hasAttribute("disabled")&&!r.hasAttribute(ze))continue;let o=t[a],c=(Array.isArray(o)?o:[o]).map(String),l=r;if(r instanceof HTMLInputElement&&(r.type==="checkbox"||r.type==="radio"))r.checked=c.includes(r.value||"on");else if(r instanceof HTMLSelectElement&&r.multiple)for(let u of r.options)u.selected=c.includes(u.value);else if(Array.isArray(l.value))l.value=c;else if("value"in l){let u=s.get(a)??0;s.set(a,u+1),l.value=c[u]??""}else continue;i.add(a),n.push(r)}for(let r of n)r.dispatchEvent(new Event("input",{bubbles:!0}));return[...i]}#A(){this.#l&&(cancelAnimationFrame(this.#u),S.remove(bs,this.#t.id).catch(()=>{}))}#L(){return this.#i>=this.#D().length-1}#k(t){if(t.key!=="Enter"||t.defaultPrevented||t.isComposing||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey)return;let i=t.target;if(!(!(i instanceof HTMLInputElement)||AA.has(i.type))){if(!this.#L()){t.preventDefault(),this.next();return}!this.#_()&&this.#P()&&t.preventDefault()}}#N(t){let i=t.target?.closest?.("button, input");!i||i.type!=="submit"||i.form===this.#t&&(this.#_()||i.hasAttribute("formnovalidate")||this.#P()&&t.preventDefault())}#_(){return this.#t.noValidate&&!this.#t.hasAttribute("data-validate")}#P(){let t=this.#D();for(let i of this.#t.elements){if(i.matches(":disabled"))continue;let s=i.closest("fieldset[data-wizard-step]");if(!(!s||!t.includes(s))&&!Lh(i))return s.hasAttribute("data-wizard-active")?!1:(this.#ot(t.indexOf(s),{validate:!1,focus:!1}),Nh(i),!0)}return!1}#O(t){if(!this.#L()){t.preventDefault(),this.next();return}this.#t.hasAttribute("data-validate")||this.#$()}#V(t){this.#t.hasAttribute("data-validate")&&queueMicrotask(()=>{!t.defaultPrevented&&this.#L()&&this.#$()})}#$(){cancelAnimationFrame(this.#u),this.#at("wizard:complete"),this.#A()}#K(){this.#t.querySelectorAll(":scope > [data-wizard-status]").forEach(i=>i.remove());let t=document.createElement("p");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.setAttribute("data-wizard-status",""),this.#s=t,this.#t.prepend(t)}#M(){let t=this.#t.getAttribute("data-wizard-steps");if(t){this.#o=document.querySelector(t);return}this.#o=this.#t.querySelector("nav.steps")}#T(){return this.#o?.localName==="progress-tracker"}#B(){return this.#o?[...this.#o.querySelectorAll(":scope ol > li")]:[]}#et(){if(!this.#o)return;let t=this.#o.querySelector("ol");!t||t.children.length>0||this.#e.forEach((i,s)=>{let n=document.createElement("li");n.textContent=this.#h(i,s),t.appendChild(n)})}#I(){if(!this.#o)return;let t=this.#B(),i=this.#D();if(this.#T()){let s=this.#o;this.#e.forEach((a,o)=>{t[o]?.toggleAttribute("hidden",a.hasAttribute("data-wizard-hidden"))});let n=this.#e.indexOf(this.#U()),r=t[n];if(r){let a=r.dataset.step||String(n+1);s.getAttribute("data-current")!==a&&s.setAttribute("data-current",a)}return}this.#e.forEach((s,n)=>{let r=t[n];if(!r)return;if(r.removeAttribute("data-completed"),r.removeAttribute("aria-current"),r.removeAttribute("aria-disabled"),s.hasAttribute("data-wizard-hidden")){r.setAttribute("hidden","");return}r.removeAttribute("hidden");let a=i.indexOf(s),o=r.querySelector("a, button"),c=!o;a<this.#i?(r.setAttribute("data-completed",""),c&&r.setAttribute("role","button"),(o||r).setAttribute("aria-label",this.#d("completed",{name:this.#h(s,a)}))):(c&&r.removeAttribute("role"),(o||r).removeAttribute("aria-label"),a===this.#i?r.setAttribute("aria-current","step"):r.setAttribute("aria-disabled","true"))});for(let s of t){if(s.hasAttribute("hidden"))continue;(s.querySelector("a, button")||s).setAttribute("tabindex",s.hasAttribute("aria-current")?"0":"-1")}}#C(t){if(!t)return-1;let i=this.#B().indexOf(t),s=this.#e[i];return s?this.#D().indexOf(s):-1}#q(){let t=this.#o;if(!t)return;let i=this.#p.signal;if(this.#T()){t.addEventListener("progress-tracker:step",s=>{let n=s.detail;if(n?.source!=="click")return;let r=this.#B().find((o,c)=>(o.dataset.step||String(c+1))===String(n.step)),a=this.#C(r??null);a>=0&&this.goTo(a)},{signal:i});return}t.addEventListener("click",s=>{let n=s.target.closest("li");if(!n||!n.hasAttribute("data-completed")){n&&s.target.closest("a")&&s.preventDefault();return}s.preventDefault();let r=this.#C(n);r>=0&&this.goTo(r)},{signal:i}),t.addEventListener("keydown",s=>{let n=this.#B().filter(u=>!u.hasAttribute("hidden")),r=s.target.closest("li"),a=r?n.indexOf(r):-1;if(a===-1)return;if((s.key==="Enter"||s.key===" ")&&r?.getAttribute("role")==="button"){s.preventDefault();let u=this.#C(r);u>=0&&this.goTo(u);return}let o;switch(s.key){case"ArrowRight":case"ArrowDown":o=Math.min(a+1,n.length-1);break;case"ArrowLeft":case"ArrowUp":o=Math.max(a-1,0);break;case"Home":o=0;break;case"End":o=n.length-1;break;default:return}s.preventDefault();let c=n[a].querySelector("a, button")||n[a],l=n[o].querySelector("a, button")||n[o];c.setAttribute("tabindex","-1"),l.setAttribute("tabindex","0"),l.focus()},{signal:i})}#G(){this.#t.addEventListener("click",t=>{let i=t.target?.closest?.("[data-wizard-prev], [data-wizard-next]");!i||!this.#t.contains(i)||(t.preventDefault(),i.hasAttribute("data-wizard-prev")?this.prev():this.next())})}#Z(){if(this.#t.querySelector("[data-wizard-nav]"))return;let t=document.createElement("nav");t.setAttribute("data-wizard-nav","");let i=document.createElement("button");i.type="button",i.setAttribute("data-wizard-prev",""),i.textContent=this.#d("back");let s=document.createElement("button");s.type="button",s.setAttribute("data-wizard-next",""),s.textContent=this.#d("next");let n=document.createElement("button");n.type="submit",n.textContent=this.#d("submit"),t.append(i,s,n),this.#t.appendChild(t)}#D(){return this.#e.filter(t=>!t.hasAttribute("data-wizard-hidden"))}#U(){return this.#D()[this.#i]}#H({push:t=!1}={}){let i=this.#D(),s=i[this.#i];this.#e.forEach(n=>{n.toggleAttribute("data-wizard-active",n===s)}),this.#t.setAttribute("data-wizard-current",String(this.#i+1)),this.#t.setAttribute("data-wizard-total",String(i.length)),this.#t.toggleAttribute("data-wizard-last",this.#i===i.length-1),this.#Q(),this.#I(),this.#r&&this.#Y(t),this.#it(),this.#nt()}#Q(){if(!this.#n)return;let t=this.#D();this.#n.max=t.length,this.#n.value=this.#i+1}#Y(t){let i=`#step=${this.#i+1}`;window.location.hash!==i&&(t?history.pushState(null,"",i):history.replaceState(null,"",i))}#F(){let t=window.location.hash.match(/step=(\d+)/);return t?parseInt(t[1],10)-1:null}#it(){if(!this.#s)return;let t=this.#D().length,i=this.#d("status",{current:this.#m(this.#i+1),total:this.#m(t),name:this.#h(this.#U(),this.#i)});this.#s.textContent!==i&&(this.#s.textContent=i)}#z(){let t=this.#U();if(!t)return;let i=t.querySelector(":scope > legend")||t;i.hasAttribute("tabindex")||i.setAttribute("tabindex","-1"),i.focus({preventScroll:!1})}#W(){let t=document.activeElement;return!t||t===document.body?!0:this.#t.contains(t)||!!this.#o?.contains(t)}#X(){if(this.#a==="none")return!0;let t=this.#U();if(!t||t.hasAttribute("data-wizard-optional"))return!0;for(let i of this.#t.elements)if(!(!t.contains(i)||i.matches(":disabled"))&&!Lh(i))return Nh(i),!1;return!0}#j(){for(let i of this.#e){let s=i.getAttribute("data-wizard-if");if(!s)continue;let n=as(s,this.#t);i.toggleAttribute("data-wizard-hidden",!n),os(i,n)}let t=this.#D();this.#i>=t.length&&(this.#i=Math.max(0,t.length-1)),this.#H()}#J(t){return la(this.#t,t).flatMap(i=>this.#st(i)).join(", ")}#st(t){let i=rs(t);return i.length?t instanceof HTMLSelectElement?[...t.selectedOptions].filter(s=>s.value!=="").map(s=>s.label.trim()||s.value):t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")?t.type==="checkbox"&&!this.#R(t)?[this.#d("yes")]:[this.#tt(t)||i[0]]:i:[]}#R(t){return t.closest("fieldset:not([data-wizard-step])")?.querySelector(":scope > legend")?.textContent.trim()||""}#tt(t){let i=t.labels;if(!i?.length)return"";let s=i[0].cloneNode(!0);return s.querySelectorAll("input, select, textarea").forEach(n=>n.remove()),s.textContent.replace(/\s+/g," ").trim()}#nt(){let t=this.#U();if(!t||!t.hasAttribute("data-wizard-summary"))return;let i=t.querySelectorAll("[data-wizard-field]");if(i.length>0){for(let r of i)r.textContent=this.#J(r.getAttribute("data-wizard-field")||"")||"\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.replaceChildren();let n=new Set;for(let r of this.#t.elements){let a=r.closest("fieldset[data-wizard-step]");if(!a||a===t||a.hasAttribute("data-wizard-hidden")||r instanceof HTMLInputElement&&(r.type==="hidden"||r.type==="password")||r instanceof HTMLButtonElement||r instanceof HTMLFieldSetElement||r instanceof HTMLOutputElement)continue;let o=It(r);if(!o||n.has(o))continue;n.add(o);let c=this.#J(o);if(!c)continue;let l=document.createElement("dt");l.textContent=this.#rt(r)||o;let u=document.createElement("dd");u.textContent=c,s.append(l,u)}}#rt(t){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){let r=this.#R(t);if(r)return r}let i=this.#tt(t);if(i)return i;let n=t.closest("form-field")?.querySelector("label");return n?n.textContent.trim():t.getAttribute("aria-label")||""}#at(t,i={}){this.#t.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}#ot(t,{validate:i=!0,focus:s=!0,push:n=!0}={}){let r=this.#D();if(t<0||t>=r.length||i&&t>this.#i&&!this.#X())return!1;let a=s&&this.#W(),o=this.#i;return this.#i=t,this.#H({push:n}),a&&t!==o&&this.#z(),this.#at("wizard:step-change",{from:o,to:t}),this.#g(),!0}goTo(t){return this.#ot(t)}next(){return this.#L()?!1:this.#ot(this.#i+1)}prev(){return this.#i<=0?!1:this.#ot(this.#i-1)}reset(){this.#i=0,this.#j(),this.#A(),this.#at("wizard:reset")}get currentStep(){return this.#i}get totalSteps(){return this.#D().length}get form(){return this.#t}};typeof document<"u"&&x("form[data-wizard]",Mh)});var $h={};T($h,{initMobileForms:()=>Ih});function Ih(e=document){return()=>{}}var Oh=v(()=>{typeof document<"u"&&Ih()});var Rh={};T(Rh,{activateTrap:()=>Ke,deactivateTrap:()=>vs,initFocusTraps:()=>Ga});function Ga(e=document){e.querySelectorAll(gs).forEach(t=>Ke(t))}function Ke(e){if(le.has(e))return;let t=document.activeElement,i=e.getAttribute("data-focus-trap")==="no-autofocus";function s(r){if(r.key!=="Tab")return;let a=Ph(e);if(!a.length)return;let o=a[0],c=a[a.length-1],l=document.activeElement;r.shiftKey&&l===o?(r.preventDefault(),c.focus()):!r.shiftKey&&l===c&&(r.preventDefault(),o.focus())}e.addEventListener("keydown",s);let n=()=>{e.removeEventListener("keydown",s)};le.set(e,{cleanup:n,previousFocus:t}),i||requestAnimationFrame(()=>{let r=e.querySelector("[autofocus]");if(r)r.focus();else{let a=Ph(e);a.length&&a[0].focus()}})}function vs(e){let t=le.get(e);t&&(t.cleanup(),le.delete(e),t.previousFocus&&t.previousFocus.isConnected&&t.previousFocus.focus())}function Ph(e){return[...e.querySelectorAll(SA)].filter(t=>t.offsetParent!==null)}var gs,SA,le,xA,qh=v(()=>{gs="[data-focus-trap]",SA='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])',le=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ga()):Ga();xA=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(gs)&&Ke(s),s.querySelectorAll(gs).forEach(n=>Ke(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;le.has(s)&&vs(s),s.querySelectorAll(gs).forEach(n=>{le.has(n)&&vs(n)})}if(t.type==="attributes"&&t.attributeName==="data-focus-trap"){let i=t.target;i.hasAttribute("data-focus-trap")?Ke(i):vs(i)}}});xA.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-focus-trap"]})});var CA={};var Fh,kA,Bh=v(()=>{Fh=80,kA=40;document.querySelectorAll("header[data-scroll-hide]").forEach(e=>{let t=e.closest("main")??window,i=()=>t===window?window.scrollY:t.scrollTop,s=i(),n=0,r=e.hasAttribute("data-hidden"),a=()=>{e.removeAttribute("data-hidden"),r=!1},o=()=>{let c=i(),l=c-s;if(s=c,l!==0){if(l>0){n=0,!r&&c>Fh&&!e.matches(":focus-within")&&(e.setAttribute("data-hidden",""),r=!0);return}n-=l,r&&(n>=kA||c<=Fh)&&a()}};t.addEventListener("scroll",o,{passive:!0}),e.addEventListener("focusin",()=>{r&&a()})})});var Vh={};T(Vh,{initSpotlights:()=>Hh});function TA(e){if(e.__vbSpotlight)return;e.__vbSpotlight=!0;let t=s=>{let n=e.getBoundingClientRect();e.style.setProperty("--spotlight-x",((s.clientX-n.left)/n.width*100).toFixed(1)+"%"),e.style.setProperty("--spotlight-y",((s.clientY-n.top)/n.height*100).toFixed(1)+"%")},i=()=>{e.style.setProperty("--spotlight-x","50%"),e.style.setProperty("--spotlight-y","50%")};e.addEventListener("mousemove",t,{passive:!0}),e.addEventListener("mouseleave",i,{passive:!0})}function Hh(e=document){e.querySelectorAll?.("[data-spotlight]").forEach(TA)}var zh=v(()=>{Hh()});var Yh={};T(Yh,{getHotkeyActions:()=>Kh});function Xa(e){let t=e.cloneNode(!0);return t.querySelectorAll('kbd, [aria-hidden="true"], .visually-hidden').forEach(i=>i.remove()),(t.textContent||"").replace(/\s+/g," ").trim()}function MA(e){let t=e.getAttribute("data-hotkey-label")||e.getAttribute("aria-label");if(t)return t.trim();let i=e.getAttribute("aria-labelledby");if(i){let n=i.split(/\s+/).map(r=>document.getElementById(r)?.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}let s=e.labels;if(s?.length)return Xa(s[0]);if(e.tagName==="DETAILS"){let n=e.querySelector(":scope > summary");if(n)return Xa(n)}return Xa(e)||e.getAttribute("placeholder")||e.getAttribute("title")||""}function Wh(e){return!(!e.isConnected||(e.getAttribute("data-hotkey-action")==="toggle"?e.parentElement:e)?.closest("[hidden], [inert]")||e.disabled===!0||e.matches(":disabled"))}function _A(e){if(!e.hasAttribute("data-hotkey-scope"))return null;let t=e.getAttribute("data-hotkey-scope")?.trim();if(!t)return e;try{return e.closest(t)||document.querySelector(t)||e}catch{return e}}function Ja(e,t){document.dispatchEvent(new CustomEvent("vb:command-registry-change",{detail:{action:e,element:t}}))}function ys(e,{notify:t=!0}={}){let i=ue.get(e);i&&(i.unbind(),ue.delete(e),i.ownsAria&&e.removeAttribute("aria-keyshortcuts"),t&&Ja("remove",e))}function jh(e){if(ue.has(e)||e.tagName==="KBD"||!e.isConnected)return;let t=e.getAttribute("data-hotkey")?.trim();if(!t)return;let i=e.getAttribute("data-hotkey-action")||"click",s=Uh[i]||Uh.click,n=e.hasAttribute("data-hotkey-global"),r=_A(e),a=e.getAttribute("data-hotkey-group")||"Page Actions",o=jt(t,()=>{if(!e.isConnected){ys(e);return}s(e)},{global:n,scope:r,enabled:()=>e.isConnected?Wh(e):(queueMicrotask(()=>ys(e)),!1)}),c=yi(t),l=!e.hasAttribute("aria-keyshortcuts")||e.getAttribute("aria-keyshortcuts")===c;l&&e.setAttribute("aria-keyshortcuts",c),ue.set(e,{combo:t,label:MA(e)||t,group:a,scoped:!!r,character:vi(t),unbind:o,ownsAria:l}),Ja("add",e)}function DA(){for(let e of[...ue.keys()])e.isConnected||ys(e)}function Kh(){let e=new Map;for(let[t,i]of ue){if(!Wh(t))continue;let s=e.get(i.group)||[];s.push({label:i.label,shortcut:i.combo,element:t,scoped:i.scoped,character:i.character}),e.set(i.group,s)}return e}var LA,NA,ue,Uh,Gh=v(()=>{D();wi();Ee();LA="[data-hotkey]:not(kbd)",NA=["data-hotkey","data-hotkey-action","data-hotkey-label","data-hotkey-group","data-hotkey-global","data-hotkey-scope"],ue=new Map,Uh={click(e){e.click()},focus(e){e.focus()},submit(e){let t=e.closest("form")||(e.tagName==="FORM"?e:null);t&&t.requestSubmit()},toggle(e){"open"in e?e.open=!e.open:e.hasAttribute("hidden")?e.removeAttribute("hidden"):e.setAttribute("hidden","")}};typeof window<"u"&&(window.__hotkeyActionRegistry={getHotkeyActions:Kh});x(LA,jh);typeof document<"u"&&new MutationObserver(e=>{let t=!1,i=new Set;for(let s of e)s.type==="childList"&&s.removedNodes.length&&(t=!0),s.type==="attributes"&&i.add(s.target);t&&DA();for(let s of i)s.tagName!=="KBD"&&(ys(s,{notify:!1}),s.hasAttribute("data-hotkey")?jh(s):Ja("remove",s))}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:NA})});var tf={};T(tf,{upgradeBlankTargets:()=>Zh});function $A(e){return new Set((e.getAttribute("rel")||"").split(/\s+/).filter(Boolean))}function OA(e,t){e.setAttribute("rel",[...t].join(" "))}function Jh(e){let t=document.documentElement?.dataset?.linkPrivacy==="strict",i=$A(e),s=[...i].some(r=>IA.has(r)),n=!1;s||(i.add("noopener"),n=!0),t&&!i.has("noreferrer")&&(i.add("noreferrer"),n=!0),n&&OA(e,i)}function Zh(e=document){for(let t of e.querySelectorAll(Xh))Jh(t)}function Qh(e){let t=e.composedPath?.()[0]??e.target,i=t instanceof Element?t.closest(Xh):null;i&&Jh(i)}var IA,Xh,ef=v(()=>{IA=new Set(["opener","noopener","noreferrer"]),Xh='a[href][target="_blank"]';Zh(document);document.addEventListener("click",Qh,!0);document.addEventListener("auxclick",Qh,!0)});var of={};T(of,{buildSrcset:()=>nf,initResponsiveImages:()=>af});function nf(e,t,i=document.baseURI){let s;try{s=new URL(e,i)}catch{return""}let n=s.pathname.lastIndexOf("/"),r=s.pathname.slice(n+1),a=r.lastIndexOf(".");if(a<=0)return"";let o=s.pathname.slice(0,n+1),c=r.slice(0,a),l=r.slice(a);return t.map(u=>{let d=new URL(s.href);return d.pathname=`${o}${c}-${u}${l}`,`${d.href} ${u}w`}).join(", ")}function FA(e){return e.split(",").map(t=>parseInt(t.trim(),10)).filter(t=>t>0)}function BA(e){rf?.unobserve(e)}function HA(e){if(!RA.test(e.getAttribute("srcset")||""))return!1;let t=(e.getAttribute("sizes")||"").trim();return!t||qA.test(t)?!0:/^auto\b/i.test(t)?e.loading!=="lazy":!1}function VA(e){let t=document.createElement("span");t.setAttribute("data-responsive-badge",""),t.setAttribute("aria-hidden","true");let i=()=>{let n=e.currentSrc||e.src;t.textContent=`${n.split("/").pop()} (${e.naturalWidth}px)`};e.addEventListener("load",i),e.complete&&i(),(e.parentElement instanceof HTMLPictureElement?e.parentElement:e).before(t)}function af(e){if(sf.has(e))return;sf.add(e);let t=e.getAttribute("data-responsive")||"",i=e.getAttribute("src");if(t&&i){let n=FA(t),r=n.length?nf(i,n):"",a=e.getAttribute("srcset");r?a||(e.srcset=r):n.length&&console.warn("[data-responsive] No file extension to insert widths before:",i)}e.hasAttribute("decoding")||(e.decoding="async"),e.addEventListener("error",()=>BA(e)),!(e.complete&&e.naturalWidth===0&&e.currentSrc)&&HA(e)&&(Za.delete(e),rf?.observe(e)),e.hasAttribute("data-responsive-debug")&&VA(e)}var PA,sf,Za,RA,qA,rf,cf=v(()=>{D();PA="img[data-responsive]",sf=new WeakSet,Za=new WeakMap,RA=/\s\d+w\s*(?:,|$)/,qA=/^\d+px$/;rf=typeof ResizeObserver=="function"?new ResizeObserver(e=>{for(let t of e){let i=t.target,s=Math.round(t.contentBoxSize?.[0]?.inlineSize??t.contentRect.width);s>(Za.get(i)??0)&&(Za.set(i,s),i.sizes=`${s}px`)}}):null;x(PA,af)});var df={};T(df,{initFloatingLabels:()=>uf});function uf(e){if(lf.has(e))return;lf.add(e);let t=e.querySelector("input, textarea, select");t&&(t.hasAttribute("placeholder")||t.setAttribute("placeholder"," "),e.setAttribute("data-floating-label-ready",""))}var zA,lf,hf=v(()=>{D();zA="form-field[data-floating-label]",lf=new WeakSet;x(zA,uf)});var gf={};T(gf,{activate:()=>Qa,deactivate:()=>ws});function Qa(e){if(e.getAttribute("aria-busy")==="true")return;e._vbLoadingOriginal=e.innerHTML,e._vbLoadingWidth=e.offsetWidth,e.style.minInlineSize=`${e._vbLoadingWidth}px`;let t=e.getAttribute("data-loading"),i=document.createElement("span");i.className="vb-btn-spinner",i.setAttribute("aria-hidden","true");let s=document.createElement("span");t?s.textContent=t:(s.className="visually-hidden",s.textContent=e.textContent.trim()),e.replaceChildren(i," ",s),e.setAttribute("aria-busy","true"),e.setAttribute("aria-disabled","true"),e.dataset.loadingActive="";let n=parseInt(e.getAttribute("data-loading-timeout"),10)||UA;e._vbLoadingTimer=setTimeout(()=>ws(e),n)}function ws(e){e.getAttribute("aria-busy")==="true"&&(clearTimeout(e._vbLoadingTimer),e._vbLoadingOriginal!=null&&(e.innerHTML=e._vbLoadingOriginal,delete e._vbLoadingOriginal),e.style.minInlineSize="",e.removeAttribute("aria-busy"),e.removeAttribute("aria-disabled"),delete e.dataset.loadingActive)}function mf(e){if(ff.has(e))return;ff.add(e),e.addEventListener("click",s=>{e.getAttribute("aria-busy")==="true"&&(s.preventDefault(),s.stopImmediatePropagation())},!0);let t=e.form;t&&e.type==="submit"&&new MutationObserver(()=>{!t.hasAttribute("data-submitting")&&e.getAttribute("aria-busy")==="true"&&ws(e)}).observe(t,{attributes:!0,attributeFilter:["data-submitting"]}),new MutationObserver(()=>{e.hasAttribute("data-loading-active")?Qa(e):e.getAttribute("aria-busy")==="true"&&ws(e)}).observe(e,{attributes:!0,attributeFilter:["data-loading-active"]})}function WA(e,t){return t||([...e.elements].find(i=>i instanceof HTMLButtonElement&&i.type==="submit"||i instanceof HTMLInputElement&&i.type==="submit")??null)}function bf(e,t){let i=WA(e,t);i instanceof HTMLButtonElement&&i.matches(pf)&&(mf(i),Qa(i))}var pf,ff,UA,vf=v(()=>{D();pf="button[data-loading]",ff=new WeakSet,UA=1e4;document.addEventListener("submit",e=>{let t=e.target;t.matches("[data-validate]")||bf(t,e.submitter)});document.addEventListener("vb:beforesubmit",e=>{if(e.defaultPrevented)return;let{form:t,submitter:i}=e.detail??{};t instanceof HTMLFormElement&&bf(t,i)});x(pf,mf)});var wf={};T(wf,{initEmailForm:()=>so});function jA(e){let t={};for(let i of e.elements){let s=i;s.name&&(s.type==="password"||s.type==="file"||(s.type==="checkbox"?t[s.name]=s.checked:s.type==="radio"?s.checked&&(t[s.name]=s.value):t[s.name]=s.value))}return t}async function KA(e){let t=e.currentTarget,i=t.getAttribute("data-vb-email-form"),s=t.getAttribute("data-vb-email-to");if(!i||(e.preventDefault(),t.hasAttribute(to)))return;t.setAttribute(to,"");let n=t.querySelector('button[type="submit"], button:not([type])'),r=n?.textContent;n&&(n.disabled=!0,t.dataset.vbEmailLoadingLabel&&(n.textContent=t.dataset.vbEmailLoadingLabel)),t.dispatchEvent(new CustomEvent("vb-email-form:submitting",{bubbles:!0,composed:!0,detail:{template:i}}));let a=jA(t);try{let c=await new Y("email").post("/",{to:s||a.to||a.email,template:i,data:a});t.dispatchEvent(new CustomEvent("vb-email-form:success",{bubbles:!0,composed:!0,detail:{id:c?.id}})),t.hasAttribute("data-vb-email-no-reset")||t.reset(),yf(t,"success")}catch(o){let c={error:o};o instanceof j&&(c.status=o.status,c.body=o.body),t.dispatchEvent(new CustomEvent("vb-email-form:error",{bubbles:!0,composed:!0,detail:c})),yf(t,"error")}finally{t.removeAttribute(to),n&&(n.disabled=!1,r&&(n.textContent=r))}}function yf(e,t){let i=e.querySelector("[data-vb-email-status]");if(!i)return;let s=e.dataset.vbEmailSuccess||"Sent. Thank you.",n=e.dataset.vbEmailError||"Sorry, the message could not be sent. Try again.";i.dataset.state=t,i.textContent=t==="success"?s:n}function io(e){e.hasAttribute("data-vb-email-form-init")||(e.setAttribute("data-vb-email-form-init",""),e.addEventListener("submit",KA))}function so(e=document){for(let t of e.querySelectorAll(eo))io(t)}var eo,to,YA,Af=v(()=>{te();eo="form[data-vb-email-form]",to="data-vb-email-submitting";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>so()):so();YA=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(eo)&&io(s),s.querySelectorAll?.(eo).forEach(n=>io(n))}});YA.observe(document.documentElement,{childList:!0,subtree:!0})});var Tf={};T(Tf,{initNewsletterForm:()=>lo});function kf(e){let t=(e.getAttribute("data-vb-newsletter-form")||"subscribe").trim();return GA.includes(t)?t:"subscribe"}function Ef(e){let t=[...e.querySelectorAll('input[type="checkbox"][name="lists"]')].filter(s=>s.checked).map(s=>s.value);return t.length?t:(e.getAttribute("data-vb-newsletter-lists")||"").split(",").map(s=>s.trim()).filter(Boolean)}function Cf(e){return e.querySelector('input[name="email"]')}function ro(e,t,i){let s=e.querySelector("[data-vb-newsletter-status]");s&&(s.dataset.state=t,s.textContent=i)}function Sf(e,t,i){return i==="error"?e.dataset.vbNewsletterError||"Sorry, that did not work. Try again.":t==="unsubscribe"?e.dataset.vbNewsletterUnsubscribed||"Unsubscribed.":t==="preferences"?e.dataset.vbNewsletterSaved||"Preferences saved.":e.dataset.vbNewsletterSubscribed||"Subscribed. Check your inbox."}function xf(e,t){let i=e.querySelector('button[type="submit"], button:not([type])');i&&(t?(i.dataset.vbNewsletterPrevLabel=i.textContent||"",i.disabled=!0,e.dataset.vbNewsletterLoadingLabel&&(i.textContent=e.dataset.vbNewsletterLoadingLabel)):(i.disabled=!1,i.dataset.vbNewsletterPrevLabel!=null&&(i.textContent=i.dataset.vbNewsletterPrevLabel,delete i.dataset.vbNewsletterPrevLabel)))}async function As(e,t,i){let s=new Y("newsletter");if(e==="POST")return s.post(t,i);if(e==="GET")return s.get(t,i);throw new Error(`unsupported method ${e}`)}async function XA(e,t,i,s){if(!s.length&&t!=="preferences")throw new Error("No lists selected.");return As("POST",t==="unsubscribe"?"/unsubscribe":"/subscribe",{email:i,lists:s})}async function JA(e,t){if(t)try{let i=await As("GET","/preferences",{email:t});if(!i)return;let s=new Set(i.subscriptions||[]);for(let n of e.querySelectorAll('input[type="checkbox"][name="lists"]')){let r=n;r.checked=s.has(r.value)}e.dispatchEvent(new CustomEvent("vb-newsletter-form:preferences",{bubbles:!0,composed:!0,detail:{email:t,subscriptions:i.subscriptions,available:i.available}}))}catch(i){if(i instanceof j&&i.status===404)return;console.warn("[newsletter-form] preferences fetch failed",i)}}function oo(e){return new Set([...e.querySelectorAll('input[type="checkbox"][name="lists"]')].filter(t=>t.checked).map(t=>t.value))}async function ZA(e,t){let i=e.__vbNewsletterSnapshot??new Set,s=oo(e),n=[...s].filter(o=>!i.has(o)),r=[...i].filter(o=>!s.has(o)),a={};return n.length&&(a.subscribe=await As("POST","/subscribe",{email:t,lists:n})),r.length&&(a.unsubscribe=await As("POST","/unsubscribe",{email:t,lists:r})),e.__vbNewsletterSnapshot=oo(e),a}async function QA(e){let t=e.currentTarget,i=kf(t),s=Cf(t)?.value?.trim();if(e.preventDefault(),!s){ro(t,"error","Email is required.");return}if(!t.hasAttribute(no)){t.setAttribute(no,""),xf(t,!0),t.dispatchEvent(new CustomEvent("vb-newsletter-form:submitting",{bubbles:!0,composed:!0,detail:{mode:i}}));try{let n;if(i==="preferences")n=await ZA(t,s);else{let r=Ef(t);n=await XA(t,i,s,r)}t.dispatchEvent(new CustomEvent("vb-newsletter-form:success",{bubbles:!0,composed:!0,detail:{mode:i,lists:Ef(t),response:n}})),ro(t,"success",Sf(t,i,"success")),i==="subscribe"&&!t.hasAttribute("data-vb-newsletter-no-reset")&&t.reset()}catch(n){let r={mode:i,error:n};n instanceof j&&(r.status=n.status,r.body=n.body),t.dispatchEvent(new CustomEvent("vb-newsletter-form:error",{bubbles:!0,composed:!0,detail:r}));let a=n instanceof Error&&n.message==="No lists selected."?"Pick at least one list.":Sf(t,i,"error");ro(t,"error",a)}finally{t.removeAttribute(no),xf(t,!1)}}}function co(e){if(!e.hasAttribute("data-vb-newsletter-form-init")&&(e.setAttribute("data-vb-newsletter-form-init",""),e.addEventListener("submit",QA),kf(e)==="preferences")){let t=Cf(e);if(t){let i=async()=>{let s=t.value.trim();s&&(await JA(e,s),e.__vbNewsletterSnapshot=oo(e))};t.addEventListener("change",i),t.addEventListener("blur",i)}}}function lo(e=document){for(let t of e.querySelectorAll(ao))co(t)}var ao,no,GA,tE,Lf=v(()=>{te();ao="form[data-vb-newsletter-form]",no="data-vb-newsletter-submitting",GA=["subscribe","unsubscribe","preferences"];document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>lo()):lo();tE=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(ao)&&co(s),s.querySelectorAll?.(ao).forEach(n=>co(n))}});tE.observe(document.documentElement,{childList:!0,subtree:!0})});function eE(e){return[...e.querySelectorAll("li")].filter(t=>t.querySelector("a[href]"))}function Nf(e){return e.querySelector("li[data-audio-active]")}function uo(e,t,i){let s=i.querySelector("a[href]");return s?(t.querySelectorAll("li[data-audio-active]").forEach(n=>{n!==i&&n.removeAttribute("data-audio-active")}),i.setAttribute("data-audio-active",""),e.src=s.href,e.play()?.catch(()=>{}),{src:s.href,title:s.textContent?.trim()??""}):null}function Mf(e){let t=Nf(e);return t?.setAttribute("data-audio-played",""),t}function _f(e,{loop:t=!1}={}){let i=eE(e);if(!i.length)return null;let s=Nf(e),n=s?i.indexOf(s):-1;return n+1<i.length?i[n+1]:t?i[0]:null}var Df=v(()=>{});var If={};T(If,{initAllPlaylists:()=>po});function fo(e){if(e.hasAttribute("data-audio-playlist-init"))return;let t=e.querySelector("audio");if(!t)return;let i=e.querySelector(".track-list");i&&(e.setAttribute("data-audio-playlist-init",""),t.addEventListener("ended",()=>{Mf(i);let s=_f(i);s&&uo(t,i,s)}),i.addEventListener("click",s=>{let n=s.target.closest("a[href]"),r=n?.closest("li");!n||!r||(s.preventDefault(),uo(t,i,r))}))}function po(e=document){e.querySelectorAll(ho).forEach(t=>fo(t))}var ho,iE,$f=v(()=>{Df();ho="[data-audio-playlist]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>po()):po();iE=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(ho)&&fo(s),s.querySelectorAll(ho).forEach(n=>fo(n))}});iE.observe(document.documentElement,{childList:!0,subtree:!0})});function sE(e,t){let i=Number(e);return!Number.isFinite(i)||t<=0?1:Math.min(Math.max(1,Math.floor(i)),t)}function nE({page:e,size:t}){let i=(e-1)*t;return{start:i,end:i+t}}function rE(e,t,i=2){if(t<=0)return[];if(t===1)return[1];let s=Math.max(2,e-i),n=Math.min(t-1,e+i),r=[1];s>2&&r.push("\u2026");for(let a=s;a<=n;a++)r.push(a);return n<t-1&&r.push("\u2026"),r.push(t),r}function mo({total:e,size:t,page:i,window:s=2}){if(t<=0)return{page:(e>0,1),totalPages:e>0?1:0,start:0,end:e,pageNumbers:e>0?[1]:[]};let n=e>0?Math.ceil(e/t):0,r=sE(i,n),a=nE({page:r,size:t}),o=Math.min(a.end,e);return{page:r,totalPages:n,start:a.start,end:o,pageNumbers:rE(r,n,s)}}var Of=v(()=>{});function Es(e,t){return e.replace(/\{(\w+)\}/g,(i,s)=>s in t?String(t[s]):i)}function bo(e){switch(e.style){case"load-more":return cE(e);case"prev-next":return oE(e);default:return aE(e)}}function go(e="Pagination"){let t=document.createElement("nav");return t.setAttribute("data-paged-nav",""),t.setAttribute("aria-label",e),t}function aE({page:e,totalPages:t,pageNumbers:i,navLabel:s,prevLabel:n="Previous",nextLabel:r="Next",pageLabel:a=o=>`Page ${o}`}){let o=go(s),c=document.createElement("ol");c.setAttribute("role","list"),c.appendChild(Ye(n,e-1,e===1,!1,"prev"));for(let l of i)if(l==="\u2026"){let u=document.createElement("li");u.textContent="\u2026",u.setAttribute("aria-hidden","true"),u.setAttribute("data-paged-ellipsis",""),c.appendChild(u)}else{let u=Ye(String(l),l,!1,l===e,"page");u.firstElementChild?.setAttribute("aria-label",a(l)),c.appendChild(u)}return c.appendChild(Ye(r,e+1,e===t,!1,"next")),o.appendChild(c),o}function oE({page:e,totalPages:t,navLabel:i,prevLabel:s="Previous",nextLabel:n="Next",statusLabel:r=(a,o)=>`Page ${a} of ${o}`}){let a=go(i),o=document.createElement("ol");o.setAttribute("role","list"),o.appendChild(Ye(s,e-1,e===1,!1,"prev"));let c=document.createElement("li");return c.setAttribute("data-paged-status",""),c.setAttribute("aria-live","polite"),c.textContent=r(e,t),o.appendChild(c),o.appendChild(Ye(n,e+1,e===t,!1,"next")),a.appendChild(o),a}function cE({total:e,visible:t,navLabel:i,loadMoreLabel:s=r=>`Load more (${r})`,noMoreLabel:n="No more"}){let r=go(i),a=document.createElement("button");a.type="button",a.setAttribute("data-paged-loadmore","");let o=Math.max(0,e-t);return a.textContent=o>0?s(o):n,a.disabled=o<=0,r.appendChild(a),r}function Ye(e,t,i,s,n){let r=document.createElement("li"),a=document.createElement("button");return a.type="button",a.setAttribute("data-paged-action",n),a.dataset.pagedTarget=String(t),a.textContent=e,s&&a.setAttribute("aria-current","page"),i&&(a.disabled=!0),r.appendChild(a),r}function vo(e,{onNavigate:t,onLoadMore:i}){t&&e.querySelectorAll("button[data-paged-target]").forEach(s=>{s.addEventListener("click",()=>t(parseInt(s.dataset.pagedTarget||"1",10)))}),i&&e.querySelectorAll("button[data-paged-loadmore]").forEach(s=>{s.addEventListener("click",()=>i())})}function Pf(e,t){if(!e||!e.parentNode)return;let i=document.activeElement,n=!!i&&e.contains(i)&&i?{action:i.getAttribute("data-paged-action"),target:i.getAttribute("data-paged-target"),loadMore:i.hasAttribute("data-paged-loadmore")}:null,r=e.querySelector("[data-paged-status]"),a=t.querySelector("[data-paged-status]");r&&a&&(r.textContent!==a.textContent&&(r.textContent=a.textContent),a.hasAttribute("aria-live")?r.setAttribute("aria-live",a.getAttribute("aria-live")||"polite"):r.removeAttribute("aria-live"),a.replaceWith(r)),e.replaceWith(t),n&&lE(t,n)}function lE(e,t){let i=n=>e.querySelector(`${n}:not([disabled])`),s=[];t.loadMore&&s.push("button[data-paged-loadmore]"),t.action&&(s.push(`button[data-paged-action="${t.action}"][data-paged-target="${t.target}"]`),t.action!=="page"&&s.push(`button[data-paged-action="${t.action}"]`)),s.push('button[aria-current="page"]',"button");for(let n of s){let r=i(n);if(r){r.focus();return}}e.tabIndex=-1,e.focus()}var Rf=v(()=>{});var zf={};T(zf,{initDataPaged:()=>Bf});function Bf(e){if(qf.has(e))return;let t={host:e,nav:{before:null,after:null},sentinel:null,intersect:null,children:[],childObserver:null,visible:0};qf.set(e,t);let i=e.dataset.pagedUrl;if(i){let n=new URL(window.location.href).searchParams.get(i);n&&!e.hasAttribute("data-paged-page")&&e.setAttribute("data-paged-page",n),window.addEventListener("popstate",()=>{if(!e.isConnected)return;let r=new URL(window.location.href);e.setAttribute("data-paged-page",r.searchParams.get(i)||"1"),Ge(t)})}t.childObserver=new MutationObserver(()=>Ge(t)),t.childObserver.observe(e,{childList:!0}),e.addEventListener("paged:goto",s=>Vf(t,s.detail?.page??1)),e.addEventListener("paged:loadmore",()=>Ao(t)),Ge(t)}function wo(e){return{size:parseInt(e.dataset.pagedSize||"10",10)||0,page:parseInt(e.dataset.pagedPage||"1",10)||1,style:e.dataset.pagedStyle||"numbered",window:parseInt(e.dataset.pagedWindow||"2",10)||2,controls:e.dataset.pagedControls||"after",urlParam:e.dataset.pagedUrl||""}}function Hf(e){if(e.tagName==="TABLE"){let t=e.querySelector(":scope > tbody");if(t)return Array.from(t.children)}return Array.from(e.children).filter(t=>!t.matches("nav[data-paged-nav], div[data-paged-sentinel]"))}function Ge(e){let{host:t}=e,i=wo(t),s=Hf(t);e.children=s;let n=mo({total:s.length,size:i.size,page:i.page,window:i.window}),r=i.style==="load-more"||i.style==="infinite",a;if(r){e.visible===0&&(e.visible=i.size||s.length);let o=Math.min(e.visible,s.length);s.forEach((c,l)=>{c.hidden=l>=o}),a=o}else s.forEach((o,c)=>{o.hidden=c<n.start||c>=n.end}),a=Math.max(0,n.end-n.start);dE(e,n,i,r),t.dispatchEvent(new CustomEvent("paged:change",{bubbles:!0,detail:{page:n.page,size:i.size,total:s.length,totalPages:n.totalPages,visible:a,style:i.style}}))}function yo(e){let t=new Intl.NumberFormat(H(e)),i=(s,n)=>R(e,s,n);return{navLabel:i("nav","Pagination"),prevLabel:i("prev","Previous"),nextLabel:i("next","Next"),pageLabel:s=>Es(i("page","Page {page}"),{page:t.format(s)}),statusLabel:(s,n)=>Es(i("status","Page {page} of {total}"),{page:t.format(s),total:t.format(n)}),loadMoreLabel:s=>Es(i("load-more","Load more ({n})"),{n:t.format(s)}),noMoreLabel:i("no-more","No more")}}function dE(e,t,i,s){e.sentinel?.remove(),e.sentinel=null,e.intersect?.disconnect(),e.intersect=null;let n=null;if(i.controls!=="none"&&(i.style==="load-more"?n=bo({style:"load-more",page:t.page,totalPages:t.totalPages,pageNumbers:t.pageNumbers,total:e.children.length,visible:e.visible,...yo(e.host)}):!s&&t.totalPages>1&&(n=bo({style:i.style,page:t.page,totalPages:t.totalPages,pageNumbers:t.pageNumbers,total:e.children.length,visible:e.visible,...yo(e.host)}))),i.style==="infinite"){let r=document.createElement("div");r.setAttribute("data-paged-sentinel",""),r.setAttribute("aria-hidden","true"),r.style.cssText="block-size:1px;inline-size:100%",e.host.parentNode?.insertBefore(r,e.host.nextSibling),e.sentinel=r,e.intersect=new IntersectionObserver(a=>{for(let o of a)o.isIntersecting&&Ao(e)},{rootMargin:"200px"}),e.intersect.observe(r)}hE(e,n,i)}function hE(e,t,i){let{host:s}=e,n={onNavigate:l=>Vf(e,l),onLoadMore:()=>Ao(e)},r=!!t&&(i.controls==="before"||i.controls==="both"),a=!!t&&(i.controls==="after"||i.controls==="both"),o=null;r&&(o=a?t.cloneNode(!0):t,a&&o.querySelector("[data-paged-status]")?.removeAttribute("aria-live"),vo(o,n));let c=a?t:null;c&&vo(c,n),e.nav.before=Ff(e.nav.before,o,l=>s.parentNode?.insertBefore(l,s)),e.nav.after=Ff(e.nav.after,c,l=>s.parentNode?.insertBefore(l,s.nextSibling))}function Ff(e,t,i){return e?.isConnected&&t?(Pf(e,t),t):(e?.remove(),t&&i(t),t)}function Vf(e,t){let{host:i}=e,s=wo(i),n=Hf(i),r=mo({total:n.length,size:s.size,page:t,window:s.window});if(r.page!==s.page){if(i.setAttribute("data-paged-page",String(r.page)),s.urlParam){let a=new URL(window.location.href);a.searchParams.set(s.urlParam,String(r.page)),window.history.pushState({},"",a)}Ge(e),s.style!=="prev-next"&&W(yo(i).statusLabel(r.page,r.totalPages))}}function Ao(e){let i=wo(e.host).size||10,s=e.visible;if(e.visible=Math.min(e.visible+i,e.children.length),Ge(e),e.visible>s){let n=new Intl.NumberFormat(H(e.host));W(R(e.host,"showing","Showing {visible} of {total}",{visible:n.format(e.visible),total:n.format(e.children.length)}))}}var uE,qf,Uf=v(()=>{D();Of();Rf();lt();Z();uE="[data-paged]",qf=new WeakMap;x(uE,Bf)});function de(e){if(!e)return null;let t=String(e);return t.startsWith("-")?{key:t.slice(1),direction:"desc"}:t.startsWith("+")?{key:t.slice(1),direction:"asc"}:{key:t,direction:"asc"}}function fE(e,t,i){let s=t==="desc"?-1:1,n=e==="text"||!Kf[e]?pE(i):Kf[e];return(r,a)=>{let o=Gf(r),c=Gf(a);return o&&c?0:o?1:c?-1:s*n(r,a)}}function Xf(e,t,i,s,n){let r=fE(i,s,n),a=Array.from({length:e.length},(o,c)=>c);return a.sort((o,c)=>{let l=r(t(e[o]),t(e[c]));return l===0?o-c:l}),a}function Jf(e){return e==="asc"?"desc":e==="desc"?"none":"asc"}function pE(e){let t=e||"",i=Wf.get(t);if(!i){try{i=new Intl.Collator(e||void 0,{sensitivity:"base",numeric:!0})}catch{i=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0})}Wf.set(t,i)}return(s,n)=>i.compare(String(s),String(n))}function jf(e){if(typeof e=="number")return e;let t=String(e??"").trim().replace(/[\u2212\u2012\u2013]/g,"-"),i=/^\(.*\)$/.test(t)||/^-|-$/.test(t.replace(/[^\d.,-]/g,""));if(t=t.replace(/[^\d.,]/g,""),!t)return NaN;let s=t.lastIndexOf(","),n=t.lastIndexOf(".");if(s>-1&&n>-1){let a=s>n?",":".",o=a===","?".":",";t=t.split(o).join("").replace(a,".")}else if(s>-1){let a=t.split(",");t=a.length>2||a.length===2&&a[1].length===3?a.join(""):a.join(".")}else(t.match(/\./g)||[]).length>1&&(t=t.split(".").join(""));let r=Number(t);return i?-r:r}function Yf(e){return e instanceof Date?e.getTime():Date.parse(String(e))}function Gf(e){return e==null||e===""}var Wf,Kf,Zf=v(()=>{Wf=new Map;Kf={number(e,t){let i=jf(e),s=jf(t);return Number.isNaN(i)&&Number.isNaN(s)?0:Number.isNaN(i)?1:Number.isNaN(s)||i<s?-1:i>s?1:0},date(e,t){let i=Yf(e),s=Yf(t);return Number.isNaN(i)&&Number.isNaN(s)?0:Number.isNaN(i)?1:Number.isNaN(s)||i<s?-1:i>s?1:0}}});var sp={};T(sp,{initDataSortable:()=>ep});function ep(e){if(Ss.has(e))return;Ss.add(e),e.tagName==="TABLE"&&bE(e);let i=e.dataset.sortableDefault;if(i&&!e.dataset.sortBy){let s=de(i);s&&Pt(e,s.key,s.direction)}if(!e.dataset.sortBy)for(let s of So()){if(s.tagName!=="SELECT"||Xe(s)!==e)continue;let n=de(s.value);if(n){Pt(e,n.key,n.direction);break}}xs(e)}function bE(e){e.querySelectorAll(":scope > thead th[data-sort]").forEach(i=>{i.hasAttribute("aria-sort")||i.setAttribute("aria-sort","none"),gE(i),i.addEventListener("click",s=>{let r=s.target.closest?.("a, input, select, textarea, button:not([data-sort-button])");if(r&&i.contains(r))return;let a=i.dataset.sort;if(!a)return;let o=e.dataset.sortBy===a?e.dataset.sortDirection:"none",c=Jf(o||"none");c==="none"?Pt(e,"","none"):Pt(e,a,c,i.dataset.sortType)})})}function gE(e){let t=e.querySelector(":scope > button[data-sort-button]");if(t)return t;let i=document.createElement("button");return i.type="button",i.setAttribute("data-sort-button",""),i.append(...e.childNodes),e.appendChild(i),i}function So(){return document.querySelectorAll("[data-sort-target]")}function Xe(e){let t=e.getAttribute("data-sort-target");if(!t)return null;let i=null;try{i=document.querySelector(t)}catch{return null}return i?.matches("[data-sortable]")?i:null}function Qf(e,t){let i=Xe(e);if(!i)return;let s=de(t);if(!s){Pt(i,"","none");return}if(Pt(i,s.key,s.direction),i.tagName==="TABLE")return;let n=e,r=e.tagName==="SELECT"?n.selectedOptions[0]?.textContent||t:e.getAttribute("aria-label")||e.textContent||t,a=new Intl.NumberFormat(H(i)).format(ip(i).length);W(R(i,"sorted","Sorted: {sort}. {count} items",{sort:r.trim(),count:a}))}function xs(e){let t=e.dataset.sortBy?(e.dataset.sortDirection==="desc"?"-":"")+e.dataset.sortBy:"";for(let i of So()){if(i.tagName!=="BUTTON"||Xe(i)!==e)continue;let s=de(i.getAttribute("data-sort-by")||""),n=s?(s.direction==="desc"?"-":"")+s.key:"";i.setAttribute("aria-pressed",String(!!n&&n===t))}}function Eo(){for(let e of So())if(!Ss.has(e)&&e.getAttribute("data-sort-target"))if(Ss.add(e),e.tagName==="SELECT"){e.addEventListener("change",()=>Qf(e,e.value));let t=Xe(e),i=de(e.value);t&&i&&!t.dataset.sortBy&&Pt(t,i.key,i.direction)}else{e.addEventListener("click",()=>Qf(e,e.getAttribute("data-sort-by")||""));let t=Xe(e);t&&xs(t)}}function vE(e,t,i,s={}){if(s.isTable){let r=s.colIndex,a=e.children[r];if(!a)return"";let o=a.dataset.sortValue??a.dataset.value;if(o!=null)return o;if(i==="date"){let c=a.querySelector("time[datetime]");if(c)return c.getAttribute("datetime")||""}return(a.textContent||"").trim()}let n=e.dataset[`sort${yE(t)}`];return n??(e.dataset.value!=null?e.dataset.value:(e.textContent||"").trim())}function yE(e){return e?e[0].toUpperCase()+e.slice(1):""}function ip(e){if(e.tagName==="TABLE"){let t=e.querySelector(":scope > tbody");return t?Array.from(t.children):[]}return Array.from(e.children)}function wE(e,t){return Array.from(e.querySelectorAll(":scope > thead th")).findIndex(s=>s.dataset.sort===t)}function Pt(e,t,i,s){let n=e.tagName==="TABLE",r=ip(e);if(i==="none"||!t){e.removeAttribute("data-sort-by"),e.dataset.sortDirection="none",n?tp(e,"","none"):xs(e),e.dispatchEvent(new CustomEvent("sort:change",{bubbles:!0,detail:{key:"",direction:"none",total:r.length}}));return}let a=AE(e,t,s),o=n?wE(e,t):-1,c=Xf(r,u=>vE(u,t,a,{isTable:n,colIndex:o}),a,i,H(e)),l=n?e.querySelector(":scope > tbody"):e;if(l){for(let u of c)l.appendChild(r[u]);e.dataset.sortBy=t,e.dataset.sortDirection=i,n?tp(e,t,i):xs(e),e.hasAttribute("data-paged")&&e.dispatchEvent(new CustomEvent("paged:goto",{detail:{page:1}})),e.dispatchEvent(new CustomEvent("sort:change",{bubbles:!0,detail:{key:t,direction:i,total:r.length}}))}}function AE(e,t,i){if(i==="text"||i==="number"||i==="date")return i;if(e.tagName==="TABLE"){let r=e.querySelector(`:scope > thead th[data-sort="${EE(t)}"]`)?.dataset.sortType;if(r==="text"||r==="number"||r==="date")return r}let s=e.dataset.sortType;return s==="text"||s==="number"||s==="date"?s:"text"}function EE(e){return String(e).replace(/["\\]/g,"\\$&")}function tp(e,t,i){e.querySelectorAll(":scope > thead th[data-sort]").forEach(n=>{n.dataset.sort===t&&i!=="none"?n.setAttribute("aria-sort",i==="asc"?"ascending":"descending"):n.setAttribute("aria-sort","none")})}var mE,Ss,np=v(()=>{D();Zf();Z();lt();mE="[data-sortable]",Ss=new WeakSet;x(mE,ep);typeof document<"u"&&(document.readyState!=="loading"?Eo():document.addEventListener("DOMContentLoaded",Eo),x("[data-sort-target]",()=>Eo()))});function rp(e){if(!e)return null;let t=String(e).trim();if(!t)return null;if(t.startsWith("class:")){let i=t.slice(6).trim();return i?{kind:"class",name:i}:null}return{kind:"attr",name:t}}function Je(e){return SE.has(String(e).toLowerCase())}function xo(e){return xE.has(String(e).toLowerCase())}function ap(e,t,i){if(e.kind==="class")return t?{present:!1}:{present:!0};if(Je(e.name))return t?{present:!1}:{present:!0,value:""};if(xo(e.name))return{present:!0,value:t==="true"||t===!0?"false":"true"};let s=i.on??"true",n=i.off??"false";return{present:!0,value:t===s?n:s}}var SE,xE,op=v(()=>{SE=new Set(["hidden","disabled","open","checked","readonly","required","multiple","selected","autofocus","autoplay","controls","defer","inert","loop","muted","nomodule","novalidate","playsinline","reversed"]),xE=new Set(["aria-pressed","aria-expanded","aria-selected","aria-checked"])});var dp={};T(dp,{initDataToggle:()=>up});function up(e){if(cp.has(e))return;cp.add(e);let t=rp(e.dataset.toggle);if(!t)return;let i=e.dataset.toggleTarget,s=i?document.querySelector(i):e;if(!s)return;let n=s!==e;n&&s.id&&e.setAttribute("aria-controls",s.id),t.kind==="attr"&&Je(t.name)&&!n&&e.setAttribute("aria-pressed",String(s.hasAttribute(t.name))),lp(e,s,t),e.addEventListener("click",r=>{r.preventDefault();let a={on:e.dataset.toggleOn,off:e.dataset.toggleOff},o;t.kind==="class"?o=s.classList.contains(t.name):Je(t.name)?o=s.hasAttribute(t.name):o=s.getAttribute(t.name);let c=ap(t,o,a);t.kind==="class"?c.present?s.classList.add(t.name):s.classList.remove(t.name):c.present?s.setAttribute(t.name,c.value??""):s.removeAttribute(t.name),!n&&Je(t.name)&&e.setAttribute("aria-pressed",String(c.present)),!n&&xo(t.name),lp(e,s,t,c),e.dispatchEvent(new CustomEvent("toggle:change",{bubbles:!0,detail:{spec:t.kind==="class"?`class:${t.name}`:t.name,value:c.value,present:c.present,target:s}}))})}function lp(e,t,i,s){if(t===e)return;let n=t.hasAttribute("popover"),r=i.kind==="attr"&&i.name.startsWith("data-")&&(e.dataset.toggleOn||"").toLowerCase()==="open";if(!n&&!r)return;let a;s?a=n?s.present:s.value==="open":a=n?t.matches(":popover-open"):t.getAttribute(i.name)==="open",e.setAttribute("aria-expanded",String(a))}var kE,cp,hp=v(()=>{D();op();kE="[data-toggle]",cp=new WeakSet;x(kE,up)});var mp={};T(mp,{decorateCardTable:()=>ko,initTableCard:()=>pp});function Ze(e,t){e.hasAttribute("role")||e.setAttribute("role",t)}function TE(e){let t=e.tHead?.rows;if(!t?.length)return[];let i=[];for(let s of t[t.length-1].cells){let n=(s.textContent||"").replace(/\s+/g," ").trim();for(let r=0;r<s.colSpan;r++)i.push(n)}return i}function ko(e){Ze(e,"table");let t=TE(e);for(let i of[e.tHead,...e.tBodies,e.tFoot]){if(!i)continue;Ze(i,"rowgroup");let s=i===e.tHead;for(let n of i.rows){Ze(n,"row");let r=0;for(let a of n.cells){if(a.tagName==="TH"){let o=a.getAttribute("scope");Ze(a,s||o==="col"||o==="colgroup"?"columnheader":"rowheader")}else Ze(a,"cell");!s&&!a.hasAttribute("data-label")&&t[r]&&a.setAttribute("data-label",t[r]),r+=a.colSpan}}}}function pp(e){let t=e;fp.has(t)||(fp.add(t),ko(t),new MutationObserver(()=>ko(t)).observe(t,{childList:!0,subtree:!0}))}var CE,fp,bp=v(()=>{D();CE='table[data-responsive="card"]',fp=new WeakSet;x(CE,pp)});var yS={};function mS(e,t,i){return e<=t?"good":e<=i?"needs-improvement":"poor"}function Cs(e,t,i,s,n={}){k.track(e,{value:Math.round(t*1e3)/1e3,rating:mS(t,i,s),...n})}function bS(){let e=null,t=new PerformanceObserver(s=>{let n=s.getEntries();e=n[n.length-1]});try{t.observe({type:"largest-contentful-paint",buffered:!0})}catch{return}let i=()=>{e&&(Cs("perf.lcp",e.startTime,2500,4e3),e=null)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function gS(){let e=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries()){let r=n;r.hadRecentInput||(e+=r.value)}});try{t.observe({type:"layout-shift",buffered:!0})}catch{return}let i=()=>{Cs("perf.cls",e,.1,.25),e=0};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function vS(){let e=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries())n.duration>e&&(e=n.duration)});try{t.observe({type:"event",durationThreshold:40,buffered:!0})}catch{return}let i=()=>{e!==0&&(Cs("perf.inp",e,200,500),e=0)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function Bp(){try{let[e]=performance.getEntriesByType("navigation");if(!e||!e.responseStart)return;Cs("perf.ttfb",e.responseStart,800,1800,{navigationType:e.type})}catch{}}var Hp=v(()=>{wt();typeof window<"u"&&"PerformanceObserver"in window&&(bS(),gS(),vS(),document.readyState==="complete"?Bp():window.addEventListener("load",Bp,{once:!0}))});var AS={};function wS(e){if(typeof e!="string"||!e)return"";try{let t=new URL(e,location.origin);return t.pathname.split("/").pop()||t.pathname}catch{return e.split("/").pop()??e}}function Vp(e){return typeof e!="string"?String(e??"").slice(0,Po):e.length>Po?e.slice(0,Po):e}var Po,zp=v(()=>{wt();Po=200;typeof window<"u"&&(window.addEventListener("error",e=>{e.target&&e.target!==window||k.track("error.js_runtime",{message:Vp(e.message),source:wS(e.filename),line:e.lineno??0,col:e.colno??0})}),window.addEventListener("unhandledrejection",e=>{let t=e.reason,i=t instanceof Error?t.message:typeof t=="string"?t:JSON.stringify(t??null);k.track("error.unhandled_promise",{message:Vp(i)})}))});var SS={};function Yp(){let e=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(e/t*100)))}function ES(){clearTimeout(Wp),Wp=setTimeout(()=>{let e=Yp();e>Ro&&(Ro=e)},500)}function jp(){ii==null&&(ii=Date.now())}function Gp(){ii!=null&&(qo+=Date.now()-ii,ii=null)}function Kp(){if(Up)return;Up=!0,Gp();let e=Math.max(Ro,Yp());e>0&&k.track("__scroll",{depth:e}),qo>0&&k.track("__attention",{ms:qo})}var Ro,ii,qo,Up,Wp,Xp=v(()=>{wt();Ro=0,ii=null,qo=0,Up=!1,Wp=null;typeof window<"u"&&(window.addEventListener("scroll",ES,{passive:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?jp():(Gp(),Kp())}),window.addEventListener("pagehide",Kp),document.visibilityState==="visible"&&jp())});ve();var zo=[{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":"58%","--chroma-primary":.12}},{id:"sunset",name:"Sunset",swatchBg:"#ea580c",seeds:{"--hue-primary":25,"--hue-secondary":0,"--hue-accent":280,"--lightness-primary":"57%","--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":"57%","--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":"56%","--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}}],Uo=[{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"}],_s=[{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:"journal",name:"Journal",icon:"notebook-pen",character:"Dot-grid bullet journal",swatchBg:"#f3ecdc",swatchFg:"#27313f",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"}],Ds=[{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"}],Wo=[{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 CS=[..._s,...Ds],TS=[...Uo,..._s,...Ds,...Wo],St=e=>_s.filter(t=>t.category===e),jo=[{label:"Style",themes:Uo,tier:"core"},{label:"Design",themes:St("Design"),tier:"showcase"},{label:"Content",themes:St("Content"),tier:"showcase"},{label:"Modern",themes:St("Modern"),tier:"showcase"},{label:"Creative",themes:St("Creative"),tier:"showcase"},{label:"Aesthetic",themes:St("Aesthetic"),tier:"showcase"},{label:"Signature",themes:St("Signature"),tier:"showcase"},{label:"OS Styles",themes:St("OS Styles"),tier:"showcase"},{label:"Packs",themes:Wo,tier:"showcase"},{label:"More Themes",themes:Ds,tier:"community"}];it();var ri="theme",ai="current",tc=2,ci={accent:"data-accent",borderStyle:"data-border-style",iconSet:"data-icon-set",fluid:"data-fluid",backdrop:"data-backdrop",backdropChrome:"data-backdrop-chrome"},J={mode:"auto",brand:"default",accent:null,borderStyle:null,iconSet:null,fluid:null,backdrop:null,backdropChrome:null,pageBgType:"",pageBgColor:"",pageBgGradStart:"",pageBgGradEnd:"",pageBgGradDir:""};function Go(e){if(!e||typeof e!="object")return null;let t={...e};if(!(Number(t.v)>=tc))for(let i of Object.keys(ci))(t[i]===""||i==="accent"&&t[i]==="default")&&(t[i]=null);return t}function ht(e,t){return e??t??""}var $s=null;function st(){if($s)return $s;let e=document.documentElement,t=window.__vbAuthoredRoot,i=n=>{if(t&&typeof t=="object"){if(n in t)return t[n]??null;if(n==="data-mode")return null}return e.getAttribute(n)},s={theme:i("data-theme"),mode:i("data-mode"),themeSource:i("data-theme-source")};for(let[n,r]of Object.entries(ci))s[n]=i(r);return $s=s,s}function cm(e){try{let t=document.createElement("canvas");t.width=t.height=1;let i=t.getContext("2d",{willReadFrequently:!0});if(!i)return e;i.fillStyle=e,i.fillRect(0,0,1,1);let[s,n,r]=i.getImageData(0,0,1,1).data;return"#"+[s,n,r].map(a=>a.toString(16).padStart(2,"0")).join("")}catch{return e}}function oi(e,t){let i=(e||"").split(/\s+/).filter(Boolean);return t==="site"?i[0]&&!i[0].startsWith("a11y-")?i[0]:"":i.find(s=>!s.startsWith("a11y-"))||""}function lm(e,t,i,s=!1){let n=(e||"").split(/\s+/).filter(r=>r&&r!==t&&r!==i);return i!=="default"?[i,...n].join(" "):(s&&n.length?["default",...n]:n).join(" ")}function Xo(e){return e==="light"||e==="dark"?e:null}function Jo(e,t,i){return t||(e==="light"||e==="dark"?e:i?"dark":"light")}function Zo(e,t,i){let s=oi(t,i);return i==="site"&&s?s:e?.brand&&e.brand!==J.brand?e.brand:s||J.brand}var Qo=["--hue-primary","--hue-secondary","--hue-accent","--lightness-primary","--chroma-primary","--lightness-secondary","--chroma-secondary","--lightness-accent","--chroma-accent"],P=null,ye="",Os="",Ft=null,xt=null,_={_initPromise:null,async init(){return this._initPromise?this._initPromise:(this._initPromise=(async()=>{let e=Go(await S.get(ri,ai));P=e?{...J,...e}:{...J},xt=st().themeSource??null,ye=oi(st().theme??"",xt),Os=oi(document.documentElement.dataset.theme||"",xt),Ft=Xo(st().mode),P.brand=Zo(e,st().theme??"",xt);try{await ge(P.brand)}catch{P.brand!==ye&&(P.brand=ye||J.brand)}return this.apply(P),this._watchSystemPreference(),this._watchRootAttributes(),this._watchCrossDocumentStorage(),P})(),this._initPromise)},_watchCrossDocumentStorage(){typeof window>"u"||window.addEventListener("storage",async e=>{if(e.key!==`vb:${ri}:${ai}`||!e.newValue)return;let t;try{let s=JSON.parse(e.newValue);t=Go(s?.data)}catch{return}if(!t)return;let i={...J,...P,...t};if(i.brand=Zo(t,st().theme??"",xt),i.brand&&i.brand!==P?.brand)try{await ge(i.brand)}catch{i.brand=ye||J.brand}P=i,this.apply(P||{})})},load(){return P?{...P}:{...J}},save(e){let t={...P??J,...e,v:tc};return P=t,S.set(ri,ai,t).catch(()=>{}),t},apply({mode:e="auto",brand:t="default",borderStyle:i=null,iconSet:s=null,fluid:n=null,backdrop:r=null,backdropChrome:a=null,pageBgType:o="",pageBgColor:c="",pageBgGradStart:l="",pageBgGradEnd:u="",pageBgGradDir:d=""}={}){let h=document.documentElement,f=st(),p=Jo(e,Ft,window.matchMedia("(prefers-color-scheme: dark)").matches);h.dataset.mode=p;let m=xt==="site",b=lm(h.dataset.theme||"",Os,t,m);b?h.dataset.theme=b:delete h.dataset.theme,Os=t==="default"&&!b.startsWith("default")?"":t;let g=i||f.borderStyle||this._readCSSHint("--theme-border-style");this._setRootAttr("data-border-style",g&&g!=="clean"?g:"");let A=s||f.iconSet||this._readCSSHint("--theme-icon-set");this._setRootAttr("data-icon-set",A&&A!=="lucide"?A:"");let y=ht(n,f.fluid);this._setRootAttr("data-fluid",y,!0);let $=ht(r,f.backdrop);this._setRootAttr("data-backdrop",$,!0);let M=ht(a,f.backdropChrome);if(this._setRootAttr("data-backdrop-chrome",M&&M!=="card"?M:""),o==="color"&&c)h.style.setProperty("--page-bg-color",c),h.style.removeProperty("--page-bg-gradient");else if(o==="gradient"&&l&&u){let L=d||"to bottom";h.style.setProperty("--page-bg-gradient",`linear-gradient(${L}, ${l}, ${u})`),h.style.removeProperty("--page-bg-color")}else h.style.removeProperty("--page-bg-color"),h.style.removeProperty("--page-bg-gradient");this._applyAccent(this.load().accent);let X=this.getState().accent;this._syncThemeColor(),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{mode:e,brand:t,accent:X,borderStyle:g,iconSet:A,fluid:y,backdrop:$,backdropChrome:M,pageBgType:o,effectiveMode:p}}))},_setRootAttr(e,t,i=!1){let s=document.documentElement;t?s.setAttribute(e,t):i&&this._authoredHas(e)?s.setAttribute(e,""):s.removeAttribute(e)},_authoredHas(e){let t=Object.keys(ci).find(s=>ci[s]===e);return t?this.load()[t]==null&&st()[t]!=null:!1},_syncThemeColor(){let e=document.querySelectorAll('meta[name="theme-color"]');if(!e.length)return;let t=n=>!n||n==="transparent"||/^rgba\(.*,\s*0\)$/.test(n),i=getComputedStyle(document.documentElement).backgroundColor;if(t(i)){let n=document.createElement("span");n.style.setProperty("position","absolute"),n.style.setProperty("background-color","var(--color-background)"),(document.body||document.documentElement).append(n),i=getComputedStyle(n).backgroundColor,n.remove()}if(t(i))return;let s=cm(i);e.forEach(n=>{n.removeAttribute("media"),n.setAttribute("content",s)})},setMode(e){Ft=null;let t=this.save({mode:e});this.apply(t)},async setBrand(e){try{await ge(e)}catch(i){console.warn(`[VB] Theme "${e}" failed to load, using default`,i),e="default"}let t=this.save({brand:e});this.apply(t)},setAccent(e){this.save({accent:e}),this._applyAccent(e),this._syncThemeColor(),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}}))},setBorderStyle(e){let t=this.save({borderStyle:e});this.apply(t)},setIconSet(e){let t=this.save({iconSet:e});this.apply(t)},setFluid(e){let t=this.save({fluid:e});this.apply(t)},setBackdrop(e){let t=this.save({backdrop:e});this.apply(t)},setBackdropChrome(e){let t=this.save({backdropChrome:e});this.apply(t)},setPageBg({type:e="",color:t="",gradStart:i="",gradEnd:s="",gradDir:n=""}={}){let r=this.save({pageBgType:e,pageBgColor:t,pageBgGradStart:i,pageBgGradEnd:s,pageBgGradDir:n});this.apply(r)},getEffectiveMode(){let{mode:e}=this.load();return Jo(e,Ft,window.matchMedia("(prefers-color-scheme: dark)").matches)},getState(){let{mode:e,brand:t,accent:i,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:l,pageBgGradStart:u,pageBgGradEnd:d,pageBgGradDir:h}=this.load(),f=typeof document>"u"?{}:st(),p=(m,b)=>b==null&&f[m]===""?"default":ht(b,f[m]);return{mode:e,brand:t,accent:ht(i,f.accent)||"default",borderStyle:ht(s,f.borderStyle),iconSet:ht(n,f.iconSet),fluid:p("fluid",r),backdrop:p("backdrop",a),backdropChrome:ht(o,f.backdropChrome),pageBgType:c,pageBgColor:l,pageBgGradStart:u,pageBgGradEnd:d,pageBgGradDir:h,effectiveMode:this.getEffectiveMode()}},toggleMode(){let t=this.getEffectiveMode()==="dark"?"light":"dark";this.setMode(t)},reset(){P={...J,brand:ye||J.brand},Ft=Xo(st().mode),S.remove(ri,ai).catch(()=>{});let e=document.documentElement;e.style.removeProperty("--page-bg-color"),e.style.removeProperty("--page-bg-gradient");for(let t of Qo)e.style.removeProperty(t);this.apply(P)},_readCSSHint(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()},_applyAccent(e){let t=document.documentElement;for(let s of Qo)t.style.removeProperty(s);if(e==null){let s=st().accent;s?t.dataset.accent=s:delete t.dataset.accent;return}let i=zo.find(s=>s.id===e);if(!i||!i.seeds||Object.keys(i.seeds).length===0){delete t.dataset.accent;return}t.dataset.accent=i.id},_watchRootAttributes(){this._rootObserver||(this._rootObserver=new MutationObserver(e=>{for(let t of e)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(!P)return;let e=document.documentElement.dataset.theme||"",t=e.split(/\s+/).filter(Boolean),i=oi(e,xt)||"default";i!==P.brand&&(P.brand=i,ge(i).catch(()=>{}),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_syncFromDataMode(){if(!P)return;let e=document.documentElement.dataset.mode||"auto",t=this.getEffectiveMode();e!==t&&(Ft=null,P.mode=e,this._syncThemeColor(),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)})}};if(typeof window<"u"){let e=window.VB??(window.VB={});e.themeManager??=_}var um=["calendar-event","chat-bubble","chat-message","chat-thread","dl-item","fab-stack","hour-view","layout-badge","layout-canvas","layout-card","layout-center","layout-cluster","layout-columns","layout-cover","layout-grid","layout-imposter","layout-reel","layout-sidebar","layout-stack","layout-switcher","layout-text","loading-spinner","semantic-card","site-legal","site-tools","status-message","text-divider","token-swatch","user-avatar"];for(let e of um)customElements.get(e)||customElements.define(e,class extends HTMLElement{});ve();var RS=window.matchMedia("(prefers-reduced-motion: reduce)");var ec=new Map;function w(e,t,i={}){let s=i.priority??10,n={impl:t,bundle:i.bundle,contract:i.contract,priority:s},r=ec.get(e);if(customElements.get(e)){if(!r||r.priority>=s){r&&r.priority===s&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${e}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${e}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${i.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=s){r.priority===s&&console.warn(`[VB Bundle] Tag <${e}> already registered by "${r.bundle}". Skipping "${i.bundle}" (first wins at equal priority).`);return}ec.set(e,n),customElements.define(e,t)}var E=class extends HTMLElement{#t=[];#e;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,i,s,n){t.addEventListener(i,s,n),this.#t.push(()=>t.removeEventListener(i,s,n))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,i){this.#e||(this.#e=this.attachInternals());let s=this.#e.states;try{i?s.add(t):s.delete(t)}catch{let n=`--${t}`;i?s.add(n):s.delete(n)}}_adoptInternals(t){this.#e||(this.#e=t)}#i(){return this.constructor.formAssociated&&this.#e?this.#e:null}get validity(){return this.#i()?.validity}get validationMessage(){return this.#i()?.validationMessage??""}get willValidate(){return this.#i()?.willValidate??!1}get form(){return this.#i()?.form??null}checkValidity(){return this.#i()?.checkValidity()??!0}reportValidity(){return this.#i()?.reportValidity()??!0}};var dm=["valueMissing","badInput","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],hm='input:not([type="hidden"]):not(.otp-digit), textarea, select',fm="output.hint, output.textarea-counter",pm="Please check this field.",mm=0;function ic(e){return e.localName.includes("-")?!!customElements.get(e.localName)?.formAssociated:!1}function we(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement}var Ps=class extends E{#t=null;#e=[];#i=null;#n=!1;#s="";#o;#r=`ff-${++mm}`;setup(){if(this.#f(),this.#t=this.#b(),this.#i=this.querySelector("output.error")??this.querySelector("output:not(.hint):not(.textarea-counter)"),!this.#t)return!1;this.#i&&this.#o===void 0&&(this.#o=this.#i.textContent?.trim()??"",this.hasAttribute("data-invalid")||(this.#i.textContent=""));let t=this.#t;this.#e=[],t instanceof HTMLInputElement&&t.type==="radio"&&(this.#e=this.#u(t));let i=this.#e.length?this.#e:[t];for(let n of i)this.listen(n,"input",this.#a),this.listen(n,"change",this.#a),this.listen(n,"invalid",this.#c);we(t)||this.listen(t,`${t.localName}:change`,this.#a),this.listen(this,"focusout",n=>{let r=n.relatedTarget;r instanceof Node&&this.contains(r)||this.validate()});let s=t.form??this.closest("form");return s instanceof HTMLFormElement&&this.listen(s,"reset",n=>{setTimeout(()=>{!n.defaultPrevented&&this.isConnected&&this.clearError()})}),this.#y(this.hasAttribute("data-invalid")),!0}teardown(){this.#t=null,this.#e=[],this.#i=null}validate({show:t=!0}={}){if(!this.#t)return!0;let{valid:i,message:s}=this.#d();return t&&(i?(this.#x(this.#h()?"valid":null),this.#g("")):(this.#n=!0,this.#x("invalid"),this.#g(s)),this.#y(!i)),i}setError(t){if(!this.#t)return;this.#s=t;let i=this.#p();i&&i.setCustomValidity(t),this.validate()}clearError(){this.#t&&(this.#v(),this.#n=!1,this.#x(null),this.#g(""),this.#y(!1))}get fieldName(){return this.querySelector("label, legend")?.textContent?.trim()||this.#t?.getAttribute?.("aria-label")||this.#t?.getAttribute?.("name")||this.#t?.id||"Field"}get input(){return this.#t}#a=()=>{this.#s&&this.#v(),this.#n&&this.validate()};#l=!1;#c=()=>{if(!this.#l){this.#l=!0;try{this.validate()}finally{this.#l=!1}}};#b(){for(let t of this.querySelectorAll("*"))if(ic(t))return t;return this.querySelector(hm)}#f(){for(let t of this.querySelectorAll(":not(:defined)"))t.localName.includes("-")&&customElements.whenDefined(t.localName).then(()=>{!this.isConnected||!this.contains(t)||this.#t===t||ic(t)&&this._reinit()})}#u(t){return t.name?(t.form?[...t.form.elements]:[...t.getRootNode().querySelectorAll('input[type="radio"]')].filter(s=>!s.form)).filter(s=>s instanceof HTMLInputElement&&s.type==="radio"&&s.name===t.name):[t]}#p(){let t=this.#t;return t&&we(t)?t:null}#v(){let t=this.#p();t&&t.validity.customError&&t.validationMessage===this.#s&&t.setCustomValidity(""),this.#s=""}#d(){let t=this.#t;if(this.#s)return{valid:!1,message:this.#s};let i=t.validity;if(i)return i.valid?{valid:!0,message:""}:{valid:!1,message:this.#m(i)};let s=t.matches(":invalid");return{valid:!s,message:s?this.#m(null):""}}#m(t){let i=this.#t,s=we(i),n=r=>i.getAttribute(`data-message-${r.toLowerCase()}`)??(s?null:this.getAttribute(`data-message-${r.toLowerCase()}`));if(t)for(let r of dm){if(!t[r])continue;let a=n(r);if(a)return a;if((r==="customError"||!s)&&i.validationMessage)return i.validationMessage;break}else if(!this.#h()){let r=n("valueMissing");if(r)return r}return this.#o||i.validationMessage||this.getAttribute("data-message-invalid")||pm}#h(){let t=this.#t;if(this.#e.length)return this.#e.some(s=>s.checked);if(t instanceof HTMLInputElement&&t.type==="checkbox")return t.checked;let i=t.value;return Array.isArray(i)?i.length>0:!we(t)&&i===0?!1:i!=null&&String(i)!==""}#E(){let t=this.#t,i=this.querySelector('.otp-wrapper[role="group"]');return i?[i]:this.#e.length?this.#e.filter(s=>this.contains(s)):we(t)?[t]:[t.querySelector('[role="combobox"], fieldset, input:not([type="hidden"]):not([aria-hidden="true"]), textarea, select')??t]}#y(t){let i=[...this.querySelectorAll(fm)];i.forEach((a,o)=>{a.id||(a.id=`${this.#r}-hint${o?`-${o}`:""}`)});let s=this.#i;s&&!s.id&&(s.id=`${this.#r}-error`);let n=new Set([...i.map(a=>a.id),...s?[s.id]:[]]),r=[...i.map(a=>a.id),...t&&s?[s.id]:[]];for(let a of this.#E()){let o=(a.getAttribute("aria-describedby")??"").split(/\s+/).filter(l=>l&&!n.has(l)),c=[...new Set([...o,...r])];c.length?a.setAttribute("aria-describedby",c.join(" ")):a.removeAttribute("aria-describedby"),t?a.setAttribute("aria-invalid","true"):a.removeAttribute("aria-invalid")}}#x(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#g(t){this.#i&&(this.#i.textContent=t)}};w("form-field",Ps);function nt(e){return document.startViewTransition?document.startViewTransition(e):e()}var bm=0,gm=0,Rs=class extends E{#t=[];#e=[];#i=!1;#n=0;#s=!1;setup(){return this.#t=[...this.querySelectorAll(":scope > details")],this.#e=this.#t.map(t=>t.querySelector(":scope > summary")),this.#t.length===0?!1:(this.style.setProperty("--_tab-count",String(this.#t.length)),!this.hasAttribute("role")&&(this.hasAttribute("aria-label")||this.hasAttribute("aria-labelledby"))&&(this.setAttribute("role","group"),this.#s=!0),this.#o(),this.#l(),this.#c(),this.#n=Math.max(0,this.#t.findIndex(t=>t.open)),this.#f(),this.#r(),!0)}teardown(){this.style.removeProperty("--_tab-count"),this.#s&&this.removeAttribute("role"),this.#s=!1,this.#t=[],this.#e=[],this.#i=!1}get tabs(){return this.#t.map((t,i)=>({id:t.id||void 0,label:t.querySelector(":scope > summary")?.textContent?.trim()||`Tab ${i+1}`,content:t.querySelector(":scope > :not(summary)")?.innerHTML||"",active:t.hasAttribute("open")}))}set tabs(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();let s=!1;for(let n of i){let r=document.createElement("details");n.id&&(r.id=n.id),n.active&&!s&&(r.setAttribute("open",""),s=!0);let a=document.createElement("summary");a.textContent=n.label||"",r.appendChild(a);let o=document.createElement("section");o.innerHTML=n.content||"",r.appendChild(o),this.appendChild(r)}!s&&this.firstElementChild&&this.firstElementChild.setAttribute("open",""),this._reinit(),this.dispatchEvent(new CustomEvent("tab-set:tabs-changed",{detail:{tabs:i,source:"property"},bubbles:!0}))}#o(){let t=new Set(this.#t.map(s=>s.getAttribute("name")||"")),i=t.size===1?[...t][0]:"";if(i){let n=this.getRootNode().querySelectorAll?.(`details[name="${CSS.escape(i)}"]`)??[];for(let r of n)if(!this.#t.includes(r)){i="";break}}if(!i){i=`tab-set-${++gm}`;for(let s of this.#t)s.setAttribute("name",i)}}#r(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#i=!0;let t=++bm,i=this.getAttribute("transition")||"fade",s=i==="slide"?"vt-tabs-slide":i==="scale"?"vt-tabs-scale":"vt-tabs";this.#t.forEach(n=>{let r=n.querySelector(":scope > :not(summary)");r&&(r.style.viewTransitionName=`tabs-${t}`,r.style.viewTransitionClass=s)})}#a(t){if(t===this.#n)return;let i=t>this.#n?"forward":"backward";document.documentElement.dataset.vtDirection=i,nt(()=>{this.#t[t].open=!0}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}#l(){this.#t.forEach((t,i)=>{let s=this.#e[i],n=t.querySelector(":scope > :not(summary)");if(this.listen(t,"toggle",()=>this.#b(i)),!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),n.id=a,n.setAttribute("aria-labelledby",r),this.listen(s,"click",o=>{if(t.open){o.preventDefault();return}this.#i&&(o.preventDefault(),this.#a(i))}),this.listen(s,"keydown",o=>this.#u(o,i))})}#c(){this.#t.some(t=>t.open)||(this.#t[0].open=!0)}#b(t){let i=this.#t[t];if(this.#f(),!i?.open)return;let s=this.#n;s!==t&&(this.#n=t,this.dispatchEvent(new CustomEvent("tab-set:change",{detail:{index:t,previousIndex:s,tab:i,panel:i.querySelector(":scope > :not(summary)")},bubbles:!0})))}#f(){this.#t.forEach((t,i)=>{let s=this.#e[i];s&&s.setAttribute("aria-expanded",t.open?"true":"false")})}#u(t,i){let s=this.#t.length,n=(i+1)%s,r=(i-1+s)%s,a=getComputedStyle(this).direction==="rtl",o=this.getAttribute("data-orientation")==="vertical",c;switch(t.key){case"ArrowRight":if(o)return;c=a?r:n;break;case"ArrowLeft":if(o)return;c=a?n:r;break;case"ArrowDown":if(!o)return;c=n;break;case"ArrowUp":if(!o)return;c=r;break;case"Home":c=0;break;case"End":c=s-1;break;default:return}t.preventDefault(),this.#i?this.#a(c):this.#t[c].open=!0,this.#e[c]?.focus()}};w("tab-set",Rs);var vm=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function qs(e,t){let s=(()=>{try{return decodeURIComponent(location.hash.slice(1))}catch{return location.hash.slice(1)}})()===t;s||(location.hash=t);let n=e;typeof n.focus=="function"&&(n.tabIndex<0&&!n.hasAttribute("tabindex")&&n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0})),(s||!n.matches?.(":target"))&&n.scrollIntoView({behavior:vm()?"auto":"smooth",block:"start"})}function Fs(e){let t=e;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return!1;let s=(t.target instanceof Element?t.target:null)?.closest('a[href^="#"]');if(!s)return!1;let n=s.getAttribute("target");if(n&&n!=="_self"||s.hasAttribute("download"))return!1;let r=(s.getAttribute("href")??"").slice(1);if(!r)return!1;let a=r;try{a=decodeURIComponent(r)}catch{}let o=s.ownerDocument.getElementById(a);return o?(t.preventDefault(),qs(o,a),!0):!1}var ym="Back to content",wm="Footnote {n}",Am="Notes",sc="\u21A9\uFE0E",Em=120,Sm=150,Bs=e=>String.fromCharCode(97+e%26)+(e>=26?String(Math.floor(e/26)):""),Hs=class e extends E{static observedAttributes=["data-mode","data-label-back","data-label-ref","data-label-heading","data-preview"];static#t=0;#e=0;#i=[];#n=[];#s=null;#o=!1;#r=null;#a=null;#l;#c;attributeChangedCallback(t,i,s){i===s||!this.hasAttribute("data-upgraded")||this._reinit()}setup(){this.#e||(this.#e=++e.#t),this.listen(this,"click",Fs),this.listen(document,"keydown",n=>{n.key==="Escape"&&this.#r?.matches(":popover-open")&&this.#S()});let t=this.#f(this.#b());if(t.length===0)return;let i=this.getAttribute("data-mode")==="sidenotes";for(let n of t)n.side=i&&n.source.getAttribute("data-side")!=="false",this.#u(n);let s=t.filter(n=>!n.side);for(let n of t)n.side&&this.#m(n),n.refs.forEach((r,a)=>this.#v(r,n,a));s.length?this.#h(s):this.hidden||(this.hidden=!0,this.#o=!0)}teardown(){clearTimeout(this.#l),clearTimeout(this.#c),this.#S();for(let{ref:t,original:i}of this.#i)t.replaceChildren(...i),t.removeAttribute("data-enhanced");this.#i=[];for(let t of this.#n)t.remove();this.#n=[],this.#r=null,this.#a=null,this.#s&&(this.#s.el.removeAttribute("id"),this.#s=null),this.#o&&(this.hidden=!1,this.#o=!1)}#b(){return[...document.querySelectorAll("foot-note:not([data-enhanced])")].filter(t=>this.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}#f(t){let i=new Set(t),s=new Map,n=[];for(let r of t){let a=r,o=r.getAttribute("data-ref");if(o){let l=document.getElementById(o);l&&i.has(l)&&!l.hasAttribute("data-ref")?a=l:console.warn(`[foot-notes] data-ref="${o}" does not name a <foot-note> collected by this <foot-notes>; rendering it as its own note.`)}let c=s.get(a);if(!c){let l=n.length+1;c={source:a,num:l,noteId:`fn-${this.#e}-${l}`,refs:[],content:[],side:!1},s.set(a,c),n.push(c)}c.refs.push(r)}return n}#u(t){let i=new Set([t.source,...t.refs]);for(let s of i){let n=[...s.childNodes];this.#i.push({ref:s,original:n}),s===t.source&&(t.content=n),s.replaceChildren()}}#p(t,i){return this.getAttribute(t)||i}#v(t,i,s){let n=document.createElement("a");n.id=this.#d(i,s),n.href=`#${i.noteId}`,n.setAttribute("role","doc-noteref"),n.setAttribute("aria-label",this.#p("data-label-ref",wm).replaceAll("{n}",String(i.num))),n.textContent=String(i.num),t.setAttribute("data-enhanced",""),i.side&&t===i.source?t.prepend(n):t.append(n),this.listen(n,"click",r=>{this.#S(),Fs(r)}),!i.side&&this.getAttribute("data-preview")!=="false"&&this.#y(n,i)}#d(t,i){let s=`fnref-${this.#e}-${t.num}`;return i===0?s:`${s}-${Bs(i)}`}#m(t){let i=document.createElement("aside");i.className="sidenote",i.id=t.noteId,i.setAttribute("role","note");let s=document.createElement("span");s.className="sidenote-number",s.textContent=`${t.num}.`,i.append(s," ",...t.content),t.source.append(i)}#h(t){let i=document.createElement("section");i.setAttribute("role","doc-endnotes");let s=this.querySelector(":scope > :is(h1, h2, h3, h4, h5, h6)");if(s)s.id||(s.id=`fnh-${this.#e}`,this.#s={el:s,id:s.id}),i.setAttribute("aria-labelledby",s.id);else{let r=document.createElement("h2");r.id=`fnh-${this.#e}`,r.className="visually-hidden",r.textContent=this.#p("data-label-heading",Am),i.setAttribute("aria-labelledby",r.id),i.append(r)}let n=document.createElement("ol");for(let r of t)n.append(this.#E(r));i.append(n),this.append(i),this.#n.push(i)}#E(t){let i=document.createElement("li");i.id=t.noteId,i.append(...t.content," ");let s=this.#p("data-label-back",ym),n=t.refs.length>1;return t.refs.forEach((r,a)=>{let o=document.createElement("a");o.href=`#${this.#d(t,a)}`,o.setAttribute("data-backref",""),o.setAttribute("role","doc-backlink"),n?(o.setAttribute("aria-label",`${s} (${Bs(a)})`),o.textContent=`${sc}${Bs(a)}`):(o.setAttribute("aria-label",s),o.textContent=sc),a>0&&i.append(" "),i.append(o)}),i}#y(t,i){typeof HTMLElement.prototype.showPopover=="function"&&(this.listen(t,"pointerenter",s=>{s.pointerType!=="touch"&&(clearTimeout(this.#c),clearTimeout(this.#l),this.#l=setTimeout(()=>this.#g(t,i),Em))}),this.listen(t,"pointerleave",()=>{clearTimeout(this.#l),!(t===document.activeElement&&t.matches(":focus-visible"))&&(this.#c=setTimeout(()=>this.#S(),Sm))}),this.listen(t,"focus",()=>{t.matches(":focus-visible")&&this.#g(t,i)}),this.listen(t,"blur",()=>this.#S()))}#x(){if(this.#r)return this.#r;let t=document.createElement("aside");return t.className="fn-preview",t.setAttribute("popover","manual"),t.setAttribute("aria-hidden","true"),t.inert=!0,this.append(t),this.#n.push(t),this.#r=t,t}#g(t,i){if(clearTimeout(this.#c),!t.isConnected||this.hidden)return;let s=this.#x(),n=document.createElement("span");n.className="fn-preview-number",n.textContent=`${i.num}.`;let r=i.content.map(a=>a.cloneNode(!0));s.replaceChildren(n," ",...r);for(let a of s.querySelectorAll("[id]"))a.removeAttribute("id");this.#a?.removeAttribute("data-preview-anchor"),t.setAttribute("data-preview-anchor",""),this.#a=t,s.matches(":popover-open")||s.showPopover(),this.#w(s,t)}#S(){clearTimeout(this.#l);let t=this.#r;t?.matches(":popover-open")&&t.hidePopover(),this.#a?.removeAttribute("data-preview-anchor"),this.#a=null}#w(t,i){if(typeof CSS<"u"&&CSS.supports?.("position-area: top"))return;let s=i.getBoundingClientRect(),n=6,r=t.offsetWidth,a=t.offsetHeight,o=s.top-a-n;o<n&&(o=s.bottom+n);let c=Math.max(n,Math.min(s.left+s.width/2-r/2,innerWidth-r-n));t.style.inset="auto",t.style.top=`${o}px`,t.style.left=`${c}px`}},Vs=class extends HTMLElement{};w("foot-notes",Hs);w("foot-note",Vs);var nc=0,xm=6,zs=class extends E{#t=[];#e=[];#i=[];#n=!1;#s=new WeakSet;setup(){return this.#t=[...this.querySelectorAll(":scope > details")],this.#e=this.#t.map(t=>t.querySelector("summary")),this.#t.length===0?!1:(this.#o(),this.#l(),this.#r(),!0)}teardown(){this.#t=[],this.#e=[],this.#i=[],this.#n=!1}get panels(){return this.#t.map((t,i)=>({id:t.id||void 0,summary:t.querySelector("summary")?.textContent?.trim()||`Panel ${i+1}`,content:this.#i[i]?.innerHTML||"",open:t.hasAttribute("open")}))}set panels(t){let i=Array.isArray(t)?t:[],n=this.hasAttribute("single")?`acc-${++nc}`:null;for(;this.firstChild;)this.firstChild.remove();for(let r of i){let a=document.createElement("details");r.id&&(a.id=r.id),r.open&&a.setAttribute("open",""),n&&a.setAttribute("name",n);let o=document.createElement("summary");o.textContent=r.summary||"",a.appendChild(o);let c=document.createElement("div");c.innerHTML=r.content||"",a.appendChild(c),this.appendChild(a)}this._reinit(),this.dispatchEvent(new CustomEvent("accordion-wc:panels-changed",{detail:{panels:i,source:"property"},bubbles:!0}))}#o(){this.#i=this.#t.map(t=>{let i=t.querySelector("summary");if(!i)return null;let s=[...t.children].filter(n=>n!==i);if(s.length===1&&s[0].localName==="div")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=++nc,i=this.getAttribute("transition")||"fade",s=i==="slide"?"vt-accordion-slide":i==="scale"?"vt-accordion-scale":"vt-accordion";this.#i.forEach((n,r)=>{n&&(n.style.viewTransitionName=`accordion-${t}-${r}`,n.style.viewTransitionClass=s)})}#a(t){nt(()=>{t.open=!t.open})}#l(){let t=this.#t.length<=xm;this.#t.forEach((i,s)=>{let n=this.#e[s],r=this.#i[s];if(n){if(r){let a=n.id||`accordion-heading-${crypto.randomUUID().slice(0,8)}`,o=r.id||`accordion-panel-${crypto.randomUUID().slice(0,8)}`;n.id=a,r.id=o,n.setAttribute("aria-expanded",i.open?"true":"false"),n.setAttribute("aria-controls",o),t?(r.setAttribute("aria-labelledby",a),r.setAttribute("role","region"),this.#s.add(r)):this.#s.has(r)&&(r.removeAttribute("role"),r.removeAttribute("aria-labelledby"),this.#s.delete(r))}else n.setAttribute("aria-expanded",i.open?"true":"false");this.listen(n,"click",a=>{this.#n&&(a.preventDefault(),this.#a(i))}),this.listen(n,"keydown",a=>this.#b(a,s)),this.listen(i,"toggle",()=>this.#c(i,s))}})}#c(t,i){this.#e[i].setAttribute("aria-expanded",t.open?"true":"false"),this.hasAttribute("single")&&t.open&&this.#t.forEach((n,r)=>{r!==i&&n.open&&(n.open=!1,this.#e[r].setAttribute("aria-expanded","false"))}),this.dispatchEvent(new CustomEvent("accordion-wc:toggle",{detail:{index:i,open:t.open},bubbles:!0}))}#b(t,i){let{key:s}=t,n;switch(s){case"ArrowDown":n=(i+1)%this.#t.length;break;case"ArrowUp":n=(i-1+this.#t.length)%this.#t.length;break;case"Home":n=0;break;case"End":n=this.#t.length-1;break;default:return}t.preventDefault(),this.#e[n].focus()}open(t){t<0||t>=this.#t.length||(this.#n&&!this.#t[t].open?nt(()=>{this.#t[t].open=!0}):this.#t[t].open=!0)}close(t){t<0||t>=this.#t.length||(this.#n&&this.#t[t].open?nt(()=>{this.#t[t].open=!1}):this.#t[t].open=!1)}toggle(t){t<0||t>=this.#t.length||(this.#n?this.#a(this.#t[t]):this.#t[t].open=!this.#t[t].open)}openAll(){this.hasAttribute("single")||this.#t.forEach(t=>{t.open=!0})}closeAll(){this.#t.forEach(t=>{t.open=!1})}};w("accordion-wc",zs);var km={region:"Notifications",dismiss:"Dismiss",info:"Info",success:"Success",warning:"Warning",error:"Error"},Cm=["info","success","warning","error"],Tm={info:"ⓘ",success:"✓",warning:"⚠",error:"✗"},Lm=300,Us=class extends E{#t=[];#e=[];#i=new WeakMap;#n=!1;#s=!1;#o=new Set;setup(){this.#r("role","log"),this.#r("aria-live","polite"),this.#r("aria-relevant","additions"),this.#r("aria-label",this.#a("region")),this.listen(this,"pointerover",()=>{this.#n||(this.#n=!0,this.#u())}),this.listen(this,"pointerout",t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#n=!1,this.#u())}),this.listen(this,"focusin",()=>{this.#s=!0,this.#u()}),this.listen(this,"focusout",t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#s=!1,this.#u())}),this.listen(this,"keydown",t=>{if(t.key!=="Escape")return;let i=t.target.closest?.(".toast");i&&this.#e.includes(i)&&(t.preventDefault(),this.dismiss(i))}),this.listen(document,"visibilitychange",()=>this.#u()),this.#e=this.#e.filter(t=>t.parentNode===this),this.#n=!!this.querySelector(".toast:hover"),this.#s=this.contains(document.activeElement),this.#b(),this.#u()}teardown(){for(let t of[...this.#e]){let i=this.#i.get(t);i&&(i.hiding?this.#m(t):this.#v(i))}for(let t of this.#o)this.removeAttribute(t);this.#o.clear()}show(t){let{message:i,variant:s="info",duration:n=this.#E(),dismissible:r=!0,action:a,onAction:o,source:c="api"}=t,l=Cm.includes(s)?s:"info",u=this.#l({message:i,variant:l,dismissible:r,action:a,onAction:o}),d=document.activeElement;this.#i.set(u,{message:String(i??""),duration:Math.max(0,Number(n)||0),remaining:Math.max(0,Number(n)||0),startedAt:0,timer:void 0,returnFocus:d&&!this.contains(d)?d:null,hiding:!1});let h=!this.isConnected||this.#e.length>=this.#y();return h?this.#t.push({toast:u,duration:n}):this.#c(u),this.dispatchEvent(new CustomEvent("toast-msg:enqueued",{detail:{message:i,variant:l,duration:n,source:c,toast:u,queued:h},bubbles:!0})),u}dismiss(t){let i=this.#t.findIndex(s=>s.toast===t);if(i>-1){this.#t.splice(i,1);return}this.#d(t)}dismissAll(){this.#t=[],[...this.#e].forEach(t=>this.#d(t))}get queue(){let t=(i,s)=>({message:this.#i.get(i)?.message??"",variant:i.getAttribute("data-variant")||"info",state:s});return[...this.#e.map(i=>t(i,"visible")),...this.#t.map(({toast:i})=>t(i,"queued"))]}#r(t,i){this.hasAttribute(t)&&!this.#o.has(t)||(this.setAttribute(t,i),this.#o.add(t))}#a(t){return this.getAttribute(`data-label-${t}`)??km[t]??t}#l({message:t,variant:i,dismissible:s,action:n,onAction:r}){let a=document.createElement("div");a.className="toast",a.setAttribute("data-variant",i);let o=c=>this.#x(c);return a.innerHTML=`
|
|
7
|
-
<span class="icon" aria-hidden="true">${
|
|
6
|
+
}`)}function kv(e){for(let t of e)Dt.set(t,(Dt.get(t)??0)+1);zl()}function Cv(e){for(let t of e){let i=(Dt.get(t)??0)-1;i>0?Dt.set(t,i):Dt.delete(t)}zl()}function Tv(e){let t=De.get(e),i=t?[...t.values()].flat():[];i.length===0?(CSS.highlights.delete(`hn-${e}`),De.delete(e)):CSS.highlights.set(`hn-${e}`,new Highlight(...i))}function Fl(e,t){let i=new Set(t.keys());for(let[s,n]of De)n.has(e)&&i.add(s);for(let s of i){let n=t.get(s)??[],r=De.get(s);n.length?(r||De.set(s,r=new Map),r.set(e,n)):r?.delete(e),Tv(s)}}function br(e){return document.createTreeWalker(e,NodeFilter.SHOW_TEXT,t=>t.parentElement?.closest(".hn-margin-annotation")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT)}function Fi(e){let t=br(e),i="";for(;t.nextNode();)i+=t.currentNode.textContent??"";return i}function Bl(e,t,i){let s=br(e),n=0;for(;s.nextNode();){if(s.currentNode===t)return n+i;n+=(s.currentNode.textContent??"").length}return-1}function dr(e,t,i){let s=br(e),n=0,r=null,a=0,o=null,c=0;for(;s.nextNode();){let l=s.currentNode,u=(l.textContent??"").length;if(!r&&n+u>t&&(r=l,a=t-n),n+u>=i){o=l,c=i-n;break}n+=u}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 mr(e){let t=Bi.get(e);if(t&&!t.destroyed)return t;let i=new pr(e);return Bi.set(e,i),i}function Hl(e=document){e.querySelectorAll(hr).forEach(t=>{t.hasAttribute("data-highlights-init")||mr(t)})}var hr,Rl,wv,Av,Bi,Ev,ql,Sv,_t,Dt,De,pr,Lv,Ul=v(()=>{it();lt();Ol();hr="[data-highlights]",Rl="highlights",wv=["yellow","green","blue","pink"],Av=typeof CSS<"u"&&"highlights"in CSS,Bi=new WeakMap;Ev=/^[a-z0-9_-]+$/i,ql=["solid","double","dotted","dashed","wavy"],Sv={annotation:"You highlighted",added:"Highlight added",removed:"Highlight removed",noteSaved:"Note saved"};_t=null,Dt=new Map,De=new Map;pr=class{#t;#e;#i;#n;#s=[];#o=[];#r=!Av;#a;#l;#c=!1;#b=[];#f=new Map;constructor(t){this.#t=t,this.#n=t.hasAttribute("data-highlights-readonly");let i=t.dataset.highlights;this.#e=i&&i!==""?i:location.pathname;let s=t.dataset.highlightsColors,n=s?s.split(",").map(r=>r.trim()).filter(fr):[...wv];this.#i=[...new Set(n)],this.#r||kv(this.#i),this.#g(),this.#n||(this.#a=this.#p.bind(this),this.#l=this.#v.bind(this),t.addEventListener("pointerup",this.#a),t.addEventListener("click",this.#l)),t.setAttribute("data-highlights-init",""),this.#E().then(()=>{this.#c||(this.#g(),this.#y())})}get colors(){return[...this.#i]}get destroyed(){return this.#c}get element(){return this.#t}getHighlights(){return this.#s.map(t=>({...t}))}getUnplaced(){return this.#o.map(t=>({...t}))}removeHighlight(t){let i=this.#s.findIndex(n=>n.id===t),s=this.#o.findIndex(n=>n.id===t);i<0&&s<0||(i>=0?this.#s.splice(i,1):this.#o.splice(s,1),this.#x(),this.#g(),this.#k("highlights:removed",{id:t}),W(qi(this.#t,"removed")))}clearAll(){this.#s=[],this.#o=[],this.#x(),this.#g()}exportHighlights(){return JSON.stringify({version:1,highlights:this.#s})}importHighlights(t){let i;try{i=typeof t=="string"?JSON.parse(t):t}catch{return{imported:0,rejected:0}}if(!i||!Array.isArray(i.highlights))return{imported:0,rejected:0};let s=this.#u(i.highlights);return this.#s=s,this.#o=[],this.#x(),this.#g(),{imported:s.length,rejected:i.highlights.length-s.length}}#u(t,i=Fi(this.#t).length){let s={textLength:i,colors:this.#i},n=new Set,r=[];for(let a of t){let o=xv(a,s);!o||n.has(o.id)||(n.add(o.id),r.push(o))}return r}destroy(){this.#c||(this.#c=!0,this.#a&&this.#t.removeEventListener("pointerup",this.#a),this.#l&&this.#t.removeEventListener("click",this.#l),this.#r?this.#t.querySelectorAll("mark[data-hn-id]").forEach(t=>{let i=t.parentNode;for(;t.firstChild;)i.insertBefore(t.firstChild,t);i.removeChild(t),i.normalize()}):(Fl(this,new Map),Cv(this.#i)),this.#A(),this.#f.clear(),this.#t.removeAttribute("data-highlights-init"),Bi.get(this.#t)===this&&Bi.delete(this.#t))}#p(){requestAnimationFrame(()=>{if(this.#c)return;let t=window.getSelection();if(!t||t.isCollapsed||!t.toString().trim())return;let i=t.getRangeAt(0);this.#t.contains(i.commonAncestorContainer)&&this.#k("highlights:selected",{text:t.toString().trim(),rect:i.getBoundingClientRect()})})}#v(t){let i=t.target.closest?.(".hn-margin-annotation");if(i){let n=i.dataset.hnId,r=this.#s.find(a=>a.id===n);if(r){this.#k("highlights:clicked",{id:n,highlight:{...r}}),this.#k("highlights:request-note",{id:n,highlight:{...r},controller:this});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.#k("highlights:clicked",{id:n,highlight:{...r}});return}}if(!this.#r){let n=this.#h(t.clientX,t.clientY);n&&this.#k("highlights:clicked",{id:n.id,highlight:{...n}})}}findHighlightRect(t){let i=this.#s.find(r=>r.id===t);if(!i)return null;let s=this.#d(i);if(!s)return null;let n=s.getClientRects();return n.length?n[0]:null}#d(t){return this.#f.get(t.id)??dr(this.#t,t.startOffset,t.endOffset)}#m(){this.#f.clear();for(let t of this.#s){let i=dr(this.#t,t.startOffset,t.endOffset);i&&this.#f.set(t.id,i)}}#h(t,i){for(let s of this.#s){let n=this.#f.get(s.id);if(!n)continue;let r=n.getClientRects();for(let a of r)if(t>=a.left&&t<=a.right&&i>=a.top&&i<=a.bottom)return s}return null}_createFromSelection(t){let i=window.getSelection();if(!i||i.isCollapsed)return;let s=i.getRangeAt(0);if(!this.#t.contains(s.commonAncestorContainer))return;let n=Bl(this.#t,s.startContainer,s.startOffset),r=Bl(this.#t,s.endContainer,s.endOffset);if(n<0||r<0||n>=r)return;let a=i.toString().trim(),o={id:Vl(),startOffset:n,endOffset:r,text:a,...Ri(Fi(this.#t),n,r),color:t,note:"",created:Date.now()};this.#s.push(o),this.#x(),this.#g(),i.removeAllRanges(),this.#k("highlights:added",{id:o.id,text:a,color:t,note:""}),W(qi(this.#t,"added"))}_changeColor(t,i){let s=this.#s.find(n=>n.id===t);s&&(s.color=i,this.#x(),this.#g())}_updateNote(t,i){let s=this.#s.find(n=>n.id===t);s&&(s.note=i,this.#x(),this.#M(),this.#k("highlights:note-changed",{id:t,note:i}),W(qi(this.#t,"noteSaved")))}async#E(){let t=await S.get(Rl,this.#e);if(!t||!Array.isArray(t.highlights)||this.#c)return;let i=Array.isArray(t.unplaced)?t.unplaced:[],s=this.#u([...t.highlights,...i],1/0),n=Fi(this.#t);if(i.length===0&&t.contentHash===Hi(n)){this.#s=s;return}this.#s=[],this.#o=[];for(let r of s){let a=$l(n,r);a?this.#s.push({...r,startOffset:a.start,endOffset:a.end,...Ri(n,a.start,a.end)}):this.#o.push(r)}this.#x()}#y(){this.#o.length!==0&&(console.warn(`[highlights] ${this.#o.length} stored highlight(s) could not be found in the current text. They are kept in storage.`,this.#t),this.#k("highlights:unplaced",{highlights:this.getUnplaced()}))}#x(){let t={version:1,contentHash:Hi(Fi(this.#t)),highlights:this.#s,...this.#o.length?{unplaced:this.#o}:{}};S.set(Rl,this.#e,t).catch(()=>{})}#g(){this.#r?(this.#w(),this.#m()):(this.#m(),this.#S()),this.#M()}#S(){let t=new Map;for(let i of this.#i)t.set(i,[]);for(let i of this.#s){let s=this.#f.get(i.id);s&&t.has(i.color)&&t.get(i.color).push(s)}Fl(this,t)}#w(){this.#t.querySelectorAll("mark[data-hn-id]").forEach(i=>{let s=i.parentNode;for(;i.firstChild;)s.insertBefore(i.firstChild,i);s.removeChild(i)}),this.#t.normalize();let t=[...this.#s].sort((i,s)=>s.startOffset-i.startOffset);for(let i of t){let s=dr(this.#t,i.startOffset,i.endOffset);if(!s)continue;let n=document.createElement("mark");n.dataset.hnId=i.id,fr(i.color)&&(n.dataset.hnColor=i.color,n.style.setProperty("--_hn-color",`var(--highlight-${i.color})`),n.style.setProperty("--_hn-ink",`var(--highlight-${i.color}-ink, var(--highlight-ink))`));try{s.surroundContents(n)}catch{let r=s.extractContents();n.appendChild(r),s.insertNode(n)}}}#A(){for(let t of this.#b)t.remove();this.#b=[]}#M(){if(this.#A(),this.#s.length===0)return;getComputedStyle(this.#t).position==="static"&&(this.#t.style.position="relative");let i=this.#t.getBoundingClientRect(),s=qi(this.#t,"annotation");for(let n of this.#s){let r=this.#f.get(n.id);if(!r)continue;let a=r.getClientRects();if(a.length===0)continue;let o=a[0].top-i.top,c=document.createElement("span");if(c.className="hn-margin-annotation",c.dataset.hnId=n.id,c.setAttribute("aria-hidden","true"),c.style.insetBlockStart=`${o}px`,n.note){let l=document.createElement("span");l.className="hn-note-indicator",l.textContent="*",c.append(l,` ${s}`),c.classList.add("hn-has-note")}else c.textContent=s;this.#t.appendChild(c),this.#b.push(c)}}#k(t,i={}){this.#t.dispatchEvent(new CustomEvent(t,{detail:i,bubbles:!0}))}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Hl()):Hl();Lv=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(hr)&&mr(s),s.querySelectorAll(hr).forEach(n=>{n.hasAttribute("data-highlights-init")||mr(n)})}});Lv.observe(document.documentElement,{childList:!0,subtree:!0})});var wr={};T(wr,{currentHash:()=>yr,initPageWatch:()=>vr,normalisePath:()=>Jl,pageKey:()=>ie,readWatch:()=>$e,removeWatch:()=>Zl,writeWatch:()=>Oe});function Gl(){return typeof window<"u"&&window.vbPageWatch?.serverSync===!0?!0:document.querySelector('meta[name="vb-page-watch-server"]')?.getAttribute("content")==="true"}async function Nv(e){if(!Gl())return null;try{let t=new Y("notify"),i={url:e.url,type:"page-watch",notify:["panel"]},s=await t.post("/subscribe",i);return typeof s?.id=="string"?s.id:null}catch(t){let i=t instanceof j?`${t.status}`:String(t);return console.warn("[page-watch] server subscribe failed; client-only watch in effect.",i),null}}async function Xl(e){if(!(!e||!Gl()))try{await new Y("notify").delete(`/subscribe/${encodeURIComponent(e)}`)}catch(t){let i=t instanceof j?`${t.status}`:String(t);console.warn("[page-watch] server unsubscribe failed; local state already cleared.",i)}}function Mv(){return document.querySelector("main")||document.querySelector("article")||document.body}function Jl(e){let t=(e||"/").replace(/\/index\.html?$/i,"/");return t.length>1&&(t=t.replace(/\/+$/,"")),t||"/"}function ie(){return Jl(location.pathname)}async function _v(){let e=ie(),t=location.pathname||"/",i=e==="/"?"":e,s=new Set([t,`${i}/`,`${i}/index.html`]);if(s.delete(e),await S.get(yt,e)){for(let n of s)await S.remove(yt,n);return}for(let n of s){let r=await S.get(yt,n);if(r){await S.set(yt,e,r),await S.remove(yt,n);return}}}function yr(){let e=Mv();return e?Hi(e.textContent||""):""}function Dv(){return document.title||ie()}async function $e(){return Wl??=_v().catch(()=>{}),await Wl,await S.get(yt,ie())}async function Oe(e){await S.set(yt,ie(),e)}async function Zl(){await S.remove(yt,ie())}function Vi(e,t,i){return e.getAttribute(`data-label-${t}`)??i}function zi(e,t){e.setAttribute("aria-pressed",t?"true":"false"),e.dataset.watching="",t||delete e.dataset.watching;let i=e.querySelector("icon-wc");if(i&&i.setAttribute("name",t?"bookmark-check":"bookmark"),e.hasAttribute("data-watch-label-locked"))return;let s=[...e.childNodes].find(n=>n.nodeType===Node.TEXT_NODE&&(n.textContent||"").trim());s&&(s.textContent=t?Vi(e,"watching","Watching"):Vi(e,"watch","Watch for updates")),e.setAttribute("title",t?Vi(e,"stop","Stop watching this page"):Vi(e,"action","Watch this page for content updates"))}async function Iv(){let e=!!await $e();for(let t of document.querySelectorAll(`${Ie}[data-watch-page-init]`))zi(t,e)}async function gr(e){if(e.hasAttribute("data-watch-page-init"))return;e.setAttribute("data-watch-page-init",""),e.setAttribute("type",e.getAttribute("type")||"button");let t=await $e();zi(e,!!t),e.addEventListener("click",async i=>{i.preventDefault();let s=await $e();if(s)await Zl(),zi(e,!1),e.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:s.url,subscriptionId:s.subscriptionId}})),Xl(s.subscriptionId);else{let n={url:location.pathname||"/",title:Dv(),contentHash:yr(),watchedAt:new Date().toISOString(),lastChecked:new Date().toISOString(),lastChanged:null,subscriptionId:null};await Oe(n),zi(e,!0),e.dispatchEvent(new CustomEvent("page-watch:add",{bubbles:!0,composed:!0,detail:{entry:n}}));let r=await Nv(n);r&&await Oe({...n,subscriptionId:r})}})}async function $v(){let e=await $e();if(!e)return;let t=yr(),i=new Date().toISOString(),s=e.contentHash,n={...e,lastChecked:i};if(t&&t!==s){n.contentHash=t,n.lastChanged=i,await Oe(n);let r={id:`page-watch:${e.url}:${t}`,type:"watch",title:`Updated: ${e.title}`,body:"Content changed since your last visit.",url:e.url,date:i,read:!1,dismissed:!1,priority:"normal"};document.querySelector("notification-wc")&&!customElements.get("notification-wc")&&await customElements.whenDefined("notification-wc"),document.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:r}}))}else await Oe(n)}function vr(e=document){for(let t of e.querySelectorAll(Ie))gr(t);$v()}function jl(e){if(Iv(),e.type!=="page-watch:remove")return;if(!(e.target instanceof Element&&e.target.matches(Ie))){let i=e.detail;Xl(i?.subscriptionId??null)}}var Ie,yt,Wl,Kl,Yl,Ar=v(()=>{it();ee();Ul();Ie="[data-watch-page]",yt="watches";Wl=null;Kl=Symbol.for("vb.page-watch-init"),Yl=globalThis;Yl[Kl]||(Yl[Kl]=!0,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>vr()):vr(),document.addEventListener("page-watch:add",jl),document.addEventListener("page-watch:remove",jl),new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.(Ie)&&gr(n),n.querySelectorAll?.(Ie).forEach(r=>gr(r))}}).observe(document.documentElement,{childList:!0,subtree:!0}))});function eu(e){let t=!1;try{t=sessionStorage.getItem("vb_optout")==="1"}catch{}let i=!1;if(typeof e?.consent=="function")try{i=e.consent()===!1}catch{i=!0}return{user:t,gpc:navigator.globalPrivacyControl===!0,dnt:navigator.doNotTrack==="1",consent:i}}function iu(e){let t=eu(e);return t.user?"user":t.gpc?"gpc":t.dnt?"dnt":t.consent?"consent":null}function Pe(e){return iu(e)!==null}function su(e){return e?.closest?.("[data-vb-no-track]")!=null}function Pv(){let{dataset:e}=document.documentElement,t={};for(let i of Object.keys(e)){let s=e[i];s!=null&&s!==""&&(t[i]=s)}return t}function qv(){let e={};for(let i of document.querySelectorAll('meta[name^="vb:"]')){let s=i.getAttribute("name")?.slice(3),n=i.getAttribute("content")?.trim();s&&Rv.has(s)||s&&n&&(e[s]=n)}let t=[];for(let i of document.querySelectorAll('meta[name="concept"]')){let s=i.getAttribute("content")?.trim();s&&t.push(s)}return t.length&&(e.concepts=t),e}function Fv(e,t){if(!t?.length)return e;for(let{pattern:i,replace:s}of t)if(i.test(e))return e.replace(i,s);return e}function Bv(e,t){let i=JSON.stringify(t);if(typeof navigator.sendBeacon=="function"){let s=new Blob([i],{type:"application/json"});if(navigator.sendBeacon(e,s))return!0}try{return fetch(e,{method:"POST",body:i,keepalive:!0,headers:{"content-type":"application/json"}}),!0}catch{return!1}}function Ui(){try{document.dispatchEvent(new CustomEvent(kr))}catch{}}function Cr(e){return`${(H.config?.endpoint??"/api/analytics").replace(/\/+$/,"")}/${e}`}function Wi(e,t){let i=H.config;if(!i)throw new Error("analytics: buildEnvelope called before init");let s=Fv(location.pathname+location.search,i.urlMasks),n=typeof i.context=="function"?i.context()??{}:{};return{name:e,ts:Date.now(),site:i.siteId,path:s,referrer:document.referrer||"",context:{...Pv(),...qv(),...n},props:t??{}}}function ji(e,t){let i=H.config;if(!i||i.transport==="disabled")return!1;if(i.transport==="console")return console.log("%c[vb:analytics]","color:#0aa;font-weight:600",e,t),se.logged++,Ui(),!0;let s=Bv(Cr(e),t);return s&&(se.sent++,Ui()),s}function nu(){let e=H.config?.sampleRate??1;return e>=1?!0:Math.random()<e}function ru(){if(!H.config||Pe(H.config)||document.documentElement.hasAttribute("data-vb-no-track")||!nu())return;let e=location.pathname+location.search;e!==Ql&&(Ql=e,ji("hit",Wi("page.view",{})))}function Hv(){let e,t=()=>{clearTimeout(e),e=setTimeout(ru,100)},i=history.pushState.bind(history);history.pushState=function(...n){i(...n),t()};let s=history.replaceState.bind(history);history.replaceState=function(...n){s(...n),t()},window.addEventListener("popstate",t)}function Vv(e){let t={};for(let[i,s]of Object.entries(e.dataset)){if(i==="vbEvent"||!i.startsWith("vbEvent"))continue;let n=i.slice(7).replace(/^./,r=>r.toLowerCase());t[n]=s}return t}function zv(e){if(!H.config||Pe(H.config))return;let i=e.target?.closest?.("[data-vb-event]");if(!i||su(i))return;let s=i.dataset.vbEvent;s&&k.track(s,Vv(i))}function tu(){let e=document.querySelectorAll('a[href^="http"]');for(let t of e){if(t.hostname===location.hostname||su(t)||t.hasAttribute("data-vb-analytics-wired"))continue;let i=encodeURIComponent(H.config?.siteId??"default"),s=`${Cr("click")}?site=${i}&from=${encodeURIComponent(location.pathname)}`,n=!t.hasAttribute("ping"),r=()=>{n&&(Pe(H.config)?t.removeAttribute("ping"):t.setAttribute("ping",s))};t.addEventListener("click",r,{capture:!0}),t.addEventListener("auxclick",r,{capture:!0}),t.addEventListener("click",()=>{if(Pe(H.config))return;let a=navigator.userAgent;/Firefox|Brave/.test(a)&&ji("click",Wi("link.outbound",{to:t.hostname,href:t.href}))}),t.setAttribute("data-vb-analytics-wired","")}}function xr(){if(!H.queue.length)return;let e=H.queue.splice(0);ji("events",{site:H.config?.siteId,events:e})}function Uv(){document.visibilityState==="hidden"&&xr()}function jv(){try{return window.top!==window.self}catch{return!0}}function Tr(){return globalThis[Sr]??k}var Rv,H,se,Sr,kr,Ql,Wv,k,wt=v(()=>{Rv=new Set(["track-history","track-history-params","no-track-history"]);H={config:null,queue:[]},se={sent:0,logged:0,iframeDisabled:!1},Sr=Symbol.for("vanilla-breeze.analytics"),kr="vb:analytics-status";Ql=null;Wv={endpoint:"/api/analytics",siteId:"default",transport:"disabled",sampleRate:1,consent:null,context:null,urlMasks:null,autoPageView:!0,autoOutboundLinks:!0,autoDeclarative:!0,allowInIframe:!1};k={init(e={}){if(H.config)return;let t={...Wv,...e};if(H.config=t,globalThis[Sr]||(globalThis[Sr]=k),queueMicrotask(Ui),jv()&&!t.allowInIframe){se.iframeDisabled=!0,t.transport="disabled",t.autoPageView=!1,t.autoOutboundLinks=!1,t.autoDeclarative=!1;return}t.transport==="disabled"&&(t.autoOutboundLinks=!1),t.autoDeclarative&&document.addEventListener("click",zv,{capture:!0}),t.autoOutboundLinks&&(tu(),new MutationObserver(()=>tu()).observe(document.body,{childList:!0,subtree:!0})),t.autoPageView&&(ru(),Hv()),document.addEventListener("visibilitychange",Uv),window.addEventListener("pagehide",xr)},track(e,t={}){H.config&&(Pe(H.config)||nu()&&ji("hit",Wi(e,t)))},flush:xr,setConsent(e){try{e?sessionStorage.removeItem("vb_optout"):sessionStorage.setItem("vb_optout","1")}catch{}Ui()},getStatus(){let e=H.config,t=eu(e),i=iu(e),s=null;if(e)try{s=Wi("page.view",{})}catch{s=null}let n=e?.transport??null;return{initialized:e!=null,active:e!=null&&n!=="disabled"&&i===null,optedOut:i!==null,reason:i,signals:t,transport:n,inIframe:se.iframeDisabled,endpoint:e?Cr("hit"):null,siteId:e?.siteId??null,sampleRate:e?.sampleRate??null,outboundLinks:e?.autoOutboundLinks??!1,queued:H.queue.length,sent:se.sent,logged:se.logged,collects:s?Object.keys(s):[],contextKeys:s?Object.keys(s.context):[],preview:s}},get config(){return H.config?{...H.config}:null}}});var yu={};T(yu,{initAll:()=>Fr});function qr(e){e.hasAttribute("data-back-to-top-init")||(e.setAttribute("data-back-to-top-init",""),e.toggleAttribute("data-state-visible",!1),e.addEventListener("click",gu),Xi.add(e),cy(),vu())}function mu(e){e.hasAttribute("data-back-to-top-init")&&(e.removeAttribute("data-back-to-top-init"),e.removeEventListener("click",gu),Xi.delete(e),Xi.size===0&&It&&(window.removeEventListener("scroll",It),It=null))}function bu(){if(re&&re.isConnected)return re;let e=document.documentElement,t=document.body;if(t&&t.scrollHeight>e.clientHeight+1&&t){let s=getComputedStyle(t);if(/auto|scroll/.test(s.overflowY))return re=t,t}return re=document.scrollingElement||e,re}function gu(e){let t=e.currentTarget.getAttribute("href")||"";if(t===""||t==="#"||t==="#top")e.preventDefault();else return;bu().scrollTo({top:0,left:0,behavior:oy.matches?"auto":"smooth"})}function cy(){It||(It=()=>{Rr||(Rr=!0,requestAnimationFrame(()=>{vu(),Rr=!1}))},window.addEventListener("scroll",It,{passive:!0}),document.addEventListener("scroll",It,{capture:!0,passive:!0}))}function vu(){let t=bu().scrollTop||window.scrollY,s=window.innerHeight*1,n=t>s,r=t<200;for(let a of Xi)a.toggleAttribute("data-state-visible",n&&!r)}function Fr(e=document){e.querySelectorAll(Be).forEach(qr)}var Be,oy,Xi,It,Rr,re,ly,Br=v(()=>{Be="[data-back-to-top]",oy=matchMedia("(prefers-reduced-motion: reduce)"),Xi=new Set,It=null,Rr=!1;re=null;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Fr(),{once:!0}):Fr();ly=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Be)&&qr(s),s.querySelectorAll(Be).forEach(n=>qr(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(Be)&&mu(s),s.querySelectorAll?.(Be).forEach(n=>mu(n))}}});ly.observe(document.documentElement,{childList:!0,subtree:!0})});function zr(e){return ft(e.getAttribute("data-locale")||I(e))}function hy(e){let t={};switch(e.getAttribute("data-format-number")){case"currency":t.style="currency",t.currency=e.getAttribute("data-currency")||"USD";break;case"percent":t.style="percent";break;case"compact":t.notation="compact";break;default:break}let i=parseInt(e.getAttribute("data-fraction-digits")??"",10);return Number.isInteger(i)&&i>=0&&i<=20&&(t.minimumFractionDigits=i,t.maximumFractionDigits=i),t}function Au(e,t={}){try{return new Intl.NumberFormat(zr(e),{...hy(e),...t})}catch{return null}}var Ur=v(()=>{G()});var Eu={};T(Eu,{initFormatNumber:()=>Wr});function Wr(e=document){e.querySelectorAll(ae).forEach(Ji)}function Ji(e){He.has(e)||(He.add(e),e.setAttribute("data-format-number-init",""),Zi(e))}function Zi(e){let t=e.getAttribute("value");if(t==null||t.trim()==="")return;let i=Number(t);if(isNaN(i))return;let s=Au(e);s&&(e.textContent=s.format(i))}var ae,fy,He,py,jr=v(()=>{Ur();ae="data[data-format-number]",fy=["value","data-format-number","data-currency","data-fraction-digits","data-locale","lang"],He=new WeakSet;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Wr()):Wr();py=new MutationObserver(e=>{for(let t of e){if(t.type==="attributes"){let i=t.target;t.attributeName==="lang"?(i.matches(ae)&&He.has(i)&&Zi(i),i.querySelectorAll(ae).forEach(s=>{He.has(s)&&Zi(s)})):i.matches(ae)&&(He.has(i)?Zi(i):i.isConnected&&Ji(i));continue}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(ae)&&Ji(s),s.querySelectorAll(ae).forEach(Ji)}}});py.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:fy})});var Lu={};T(Lu,{initFormatDate:()=>Xr});function Sy(e){return/^\d{4}$/.test(e)?"year":/^\d{4}-\d{2}$/.test(e)?"month":/^\d{4}-\d{2}-\d{2}$/.test(e)?"day":null}function Xr(e=document){e.querySelectorAll(At).forEach(ts)}function xy(e){let t=e.trim().match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return new Date(e);let[i,s,n]=[Number(t[1]),Number(t[2])-1,Number(t[3])],r=new Date(Date.UTC(i,s,n));return r.getUTCMonth()===s&&r.getUTCDate()===n?r:new Date(NaN)}function ts(e){ze.has(e)||(ze.add(e),Gr.has(e)||Gr.set(e,{text:e.textContent.trim(),authoredTitle:e.hasAttribute("title")&&!e.hasAttribute(Su)}),e.setAttribute(Su,""),ku(e))}function ku(e){Jr(e);let t=e.getAttribute("datetime")?.trim();if(!t||!/^\d{4}/.test(t))return;let i=xy(t);if(isNaN(i.getTime()))return;let s=Sy(t),n=e.getAttribute("data-format-date")||"medium",r=ft(e.getAttribute("data-locale")||I(e)),a=Gr.get(e);n==="relative"?(e.textContent=Cu(i,r),a?.authoredTitle||e.setAttribute("title",xu(i,"medium",s?null:"short",e,r,s)),Tu(e,i,r)):(!a?.authoredTitle&&a?.text&&e.setAttribute("title",a.text),e.textContent=xu(i,n,e.getAttribute("data-format-time"),e,r,s))}function xu(e,t,i,s,n,r=null){let a=t||"medium",o;r==="year"?o={year:"numeric"}:r==="month"?o={year:"numeric",month:by[a]??"short"}:(o={dateStyle:a},i&&!r&&(o.timeStyle=i));let c=r?"UTC":s.getAttribute("data-time-zone")||void 0;try{return new Intl.DateTimeFormat(n,{...o,timeZone:c}).format(e)}catch{try{return new Intl.DateTimeFormat(n,o).format(e)}catch{return s.textContent??""}}}function Cu(e,t){let i=Math.round((e.getTime()-Date.now())/1e3),s=Math.abs(i);for(let n=0;n<Ve.length;n++){let{seconds:r,max:a}=Ve[n];if(s<r)continue;let{unit:o}=Ve[n],c=Math.round(i/r);Math.abs(c)>=a&&n>0&&(o=Ve[n-1].unit,c=Math.sign(i)*Math.max(1,Math.round(s/Ve[n-1].seconds)));try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(c,o)}catch{let l=Math.abs(c),u=l===1?o:`${o}s`;return c<0?`${l} ${u} ago`:`in ${l} ${u}`}}try{return new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(0,"second")}catch{return"just now"}}function Tu(e,t,i){Jr(e);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=setTimeout(()=>{Qi.delete(e),e.textContent=Cu(t,i),Tu(e,t,i)},a);Qi.set(e,o)}function Jr(e){let t=Qi.get(e);t!==void 0&&(clearTimeout(t),Qi.delete(e))}function Kr(e){Jr(e),ze.delete(e)}function Yr(e){ze.has(e)?ku(e):e.isConnected&&ts(e)}var At,my,Su,Qi,ze,Gr,by,gy,vy,yy,wy,Ay,Ey,Ve,ky,Zr=v(()=>{G();At="time[data-format-date]",my=["datetime","data-format-date","data-format-time","data-time-zone","data-locale","lang"],Su="data-format-date-init",Qi=new Map,ze=new WeakSet,Gr=new WeakMap,by={short:"numeric",medium:"short",long:"long",full:"long"},gy=60,vy=3600,yy=86400,wy=604800,Ay=2592e3,Ey=31536e3,Ve=[{unit:"year",seconds:Ey,max:1/0},{unit:"month",seconds:Ay,max:12},{unit:"week",seconds:wy,max:5},{unit:"day",seconds:yy,max:7},{unit:"hour",seconds:vy,max:24},{unit:"minute",seconds:gy,max:60},{unit:"second",seconds:1,max:60}];document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Xr()):Xr();ky=new MutationObserver(e=>{for(let t of e){if(t.type==="attributes"){let i=t.target;t.attributeName==="lang"?(i.matches(At)&&Yr(i),i.querySelectorAll(At).forEach(Yr)):i.matches(At)?Yr(i):t.attributeName==="data-format-date"&&ze.has(i)&&Kr(i);continue}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.isConnected||(s.matches(At)&&Kr(s),s.querySelectorAll(At).forEach(Kr))}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.isConnected&&(s.matches(At)&&ts(s),s.querySelectorAll(At).forEach(ts))}}});ky.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:my})});var _u={};T(_u,{formatByteSize:()=>Mu,initFormatBytes:()=>Qr});function Qr(e=document){e.querySelectorAll(oe).forEach(es)}function es(e){Ue.has(e)||(Ue.add(e),e.setAttribute("data-format-bytes-init",""),is(e))}function Ly(e){let t=parseInt(e??"0",10);return Number.isFinite(t)?Math.min(20,Math.max(0,t)):0}function Mu(e,{precision:t=0,decimal:i=!1,locale:s}={}){let n=i?1e3:1024,r=Math.abs(e),a=r<1?0:Math.min(Math.floor(Math.log(r)/Math.log(n)),Nu.length-1),o=e/Math.pow(n,a);try{return new Intl.NumberFormat(s,{style:"unit",unit:Nu[a],unitDisplay:a===0?"long":"short",minimumFractionDigits:t,maximumFractionDigits:t}).format(o)}catch{return`${o.toFixed(t)} ${Ty[a]}`}}function is(e){let t=e.getAttribute("value");if(t==null||t.trim()==="")return;let i=Number(t);Number.isFinite(i)&&(e.textContent=Mu(i,{precision:Ly(e.getAttribute("data-format-bytes")),decimal:e.getAttribute("data-unit")==="decimal",locale:zr(e)}))}var oe,Cy,Nu,Ty,Ue,Ny,ta=v(()=>{Ur();oe="data[data-format-bytes]",Cy=["value","data-format-bytes","data-unit","data-locale","lang"],Nu=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Ty=["B","kB","MB","GB","TB","PB"],Ue=new WeakSet;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Qr()):Qr();Ny=new MutationObserver(e=>{for(let t of e){if(t.type==="attributes"){let i=t.target;t.attributeName==="lang"?(i.matches(oe)&&Ue.has(i)&&is(i),i.querySelectorAll(oe).forEach(s=>{Ue.has(s)&&is(s)})):i.matches(oe)&&(Ue.has(i)?is(i):i.isConnected&&es(i));continue}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(oe)&&es(s),s.querySelectorAll(oe).forEach(es)}}});Ny.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:Cy})});function My(e){for(let[t,i]of ss)e.querySelectorAll(t).forEach(i)}function _y(e){if(e.nodeType!==Node.ELEMENT_NODE)return;let t=e;for(let[i,s]of ss)t.matches(i)&&s(t),t.querySelectorAll(i).forEach(s)}function Dy(){ea||(ea=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes)_y(i)}),ea.observe(document.documentElement,{childList:!0,subtree:!0}))}function Iy(){ns||(ns=!0,My(document))}function x(e,t){ss.set(e,t),Dy(),ns||document.readyState!=="loading"?(ns=!0,document.querySelectorAll(e).forEach(t)):ss.size===1&&document.addEventListener("DOMContentLoaded",Iy)}function $(e,t){let i=ia.get(e);i||ia.set(e,i=new Set),i.add(t),!Du&&(Du=!0,document.addEventListener("reset",s=>{let n=s.target;n instanceof HTMLFormElement&&setTimeout(()=>{if(s.defaultPrevented)return;let r=new Set,a=[...n.querySelectorAll("*"),...Array.from(n.elements)];for(let o of a){if(r.has(o))continue;r.add(o);let c=ia.get(o);if(c)for(let l of c)l(o)}},0)},!0))}var ss,ea,ns,ia,Du,D=v(()=>{ss=new Map,ea=null,ns=!1;ia=new WeakMap,Du=!1});var Ou={};T(Ou,{concealSpoiler:()=>rs,initSpoilers:()=>Py,revealSpoiler:()=>$u});function Oy(e){return $y.has(e.tagName)||e.localName.includes("-")}function Py(e=document){e.querySelectorAll(sa).forEach(na)}function Ry(e){return e.getAttribute("data-spoiler-label")||q(e,"spoiler-reveal","Reveal spoiler")}function na(e){if(Iu.has(e))return;if(Iu.add(e),e.getAttribute("data-spoiler")||e.setAttribute("data-spoiler","blur"),e.querySelector(":scope > [data-spoiler-content]")){e.setAttribute("data-spoiler-init","");return}(e.tagName==="DIV"||e.tagName==="SPAN")&&!e.hasAttribute("role")&&!e.hasAttribute("aria-label")&&!e.hasAttribute("aria-labelledby")&&(e.setAttribute("role","group"),e.setAttribute("aria-label",q(e,"spoiler","Spoiler")));let t=document.createElement(Oy(e)?"div":"span");for(t.setAttribute("data-spoiler-content",""),t.setAttribute("inert",""),t.tabIndex=-1;e.firstChild;)t.appendChild(e.firstChild);e.appendChild(t);let i=document.createElement("button");i.type="button",i.setAttribute("data-spoiler-trigger",""),i.setAttribute("aria-expanded","false");let s=document.createElement("span");s.setAttribute("data-spoiler-label",""),s.textContent=Ry(e),i.appendChild(s),e.appendChild(i),e.setAttribute("data-spoiler-init","")}function $u(e){if(e.hasAttribute("data-spoiler-visible"))return;let t=e.getAttribute("data-spoiler-group");t&&document.querySelectorAll(`[data-spoiler-group="${CSS.escape(t)}"][data-spoiler-visible]`).forEach(r=>{r!==e&&rs(r,{restoreFocus:!1})});let i=e.querySelector(":scope > [data-spoiler-content]"),s=e.querySelector(":scope > [data-spoiler-trigger]"),n=!!s&&(document.activeElement===s||s.contains(document.activeElement));if(i&&i.removeAttribute("inert"),s&&(s.setAttribute("aria-expanded","true"),s.hidden=!0),e.setAttribute("data-spoiler-visible",""),!e.hasAttribute("data-spoiler-persist")&&!e.querySelector(":scope > [data-spoiler-hide]")){let r=document.createElement("button");r.type="button",r.setAttribute("data-spoiler-hide",""),r.textContent=q(e,"spoiler-hide","Hide spoiler"),e.appendChild(r)}n&&i&&i.focus({preventScroll:!0}),W(q(e,"spoiler-revealed","Spoiler revealed")),e.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!0}}))}function rs(e,{restoreFocus:t=!0}={}){if(e.hasAttribute("data-spoiler-persist")||!e.hasAttribute("data-spoiler-visible"))return;let i=e.querySelector(":scope > [data-spoiler-content]"),s=e.querySelector(":scope > [data-spoiler-trigger]"),n=e.querySelector(":scope > [data-spoiler-hide]"),r=e.contains(document.activeElement);i&&i.setAttribute("inert",""),s&&(s.setAttribute("aria-expanded","false"),s.hidden=!1,t&&r&&s.focus()),n&&n.remove(),e.removeAttribute("data-spoiler-visible"),e.dispatchEvent(new CustomEvent("spoiler:toggle",{bubbles:!0,detail:{visible:!1}}))}function qy(e){let i=e.target?.closest?.("[data-spoiler-trigger], [data-spoiler-hide]");if(!i)return;let s=i.parentElement;s?.matches(sa)&&(na(s),i.hasAttribute("data-spoiler-trigger")?$u(s):rs(s))}function Fy(e){if(e.key!=="Escape")return;let t=e.target?.closest?.("[data-spoiler][data-spoiler-visible]");!t||t.hasAttribute("data-spoiler-persist")||(e.stopPropagation(),rs(t))}var sa,Iu,$y,ra=v(()=>{D();lt();sa="[data-spoiler]",Iu=new WeakSet,$y=new Set(["DIV","SECTION","ARTICLE","ASIDE","MAIN","HEADER","FOOTER","NAV","LI","DD","TD","TH","BLOCKQUOTE","FIGURE","FIGCAPTION","DETAILS","DIALOG","FORM","FIELDSET","ADDRESS"]);typeof document<"u"&&!document.__vbSpoilerDelegated&&(document.__vbSpoilerDelegated=!0,document.addEventListener("click",qy),document.addEventListener("keydown",Fy));x(sa,na)});var Fu={};T(Fu,{initSplitters:()=>oa,keyToDirection:()=>qu,pointerToPercent:()=>Ru});function oa(e=document){e.querySelectorAll(aa).forEach(ca)}function Vy(e,t,i){return Math.min(i,Math.max(t,e))}function Ru(e,t,{vertical:i,rtl:s}){return i?(e.clientY-t.top)/t.height*100:(s?t.right-e.clientX:e.clientX-t.left)/t.width*100}function qu(e,{vertical:t,rtl:i}){return t?e==="ArrowUp"?-1:e==="ArrowDown"?1:0:e==="ArrowLeft"?i?1:-1:e==="ArrowRight"?i?-1:1:0}function ca(e){if(Pu.has(e))return;for(let f of e.querySelectorAll(":scope > .split-divider"))f.remove();let t=[...e.children];if(t.length<2)return;Pu.add(e),e.setAttribute("data-splitter-init","");let i=t[0],s=t[1],n=e.getAttribute("data-splitter")==="vertical",r=Number(i.dataset.min)||10,a=Number(i.dataset.max)||90,o=()=>getComputedStyle(e).direction==="rtl";i.id||(i.id=`vb-splitter-panel-${++Hy}`);let c=document.createElement("div");c.className="split-divider",c.setAttribute("role","separator"),c.setAttribute("aria-orientation",n?"horizontal":"vertical"),c.setAttribute("aria-valuemin",String(r)),c.setAttribute("aria-valuemax",String(a)),c.setAttribute("aria-label",e.getAttribute("data-label-resize")||By),c.setAttribute("aria-controls",i.id),c.setAttribute("tabindex","0"),e.insertBefore(c,s),i.style.flexGrow="0",i.style.flexShrink="0",i.style.overflow="auto",s.style.flexGrow="1",s.style.overflow="auto";let l=!1,u=50;function d(f,{silent:p=!1}={}){u=Vy(f,r,a),i.style.flexBasis=`${u}%`,c.setAttribute("aria-valuenow",String(Math.round(u))),!p&&e.dispatchEvent(new CustomEvent("splitter:resize",{detail:{position:u},bubbles:!0}))}d(50,{silent:!0});function h(){l&&(l=!1,e.style.userSelect="")}c.addEventListener("pointerdown",f=>{f.preventDefault(),l=!0,c.setPointerCapture(f.pointerId),e.style.userSelect="none"}),c.addEventListener("pointermove",f=>{if(!l)return;let p=e.getBoundingClientRect();d(Ru(f,p,{vertical:n,rtl:o()}))}),c.addEventListener("pointerup",f=>{c.hasPointerCapture(f.pointerId)&&c.releasePointerCapture(f.pointerId),h()}),c.addEventListener("pointercancel",h),c.addEventListener("lostpointercapture",h),c.addEventListener("keydown",f=>{let p=f.shiftKey?10:1,m=qu(f.key,{vertical:n,rtl:o()});m!==0?(f.preventDefault(),d(u+m*p)):f.key==="Home"?(f.preventDefault(),d(r)):f.key==="End"&&(f.preventDefault(),d(a))})}var aa,By,Pu,Hy,zy,la=v(()=>{aa="[data-splitter]",By="Resize panels",Pu=new WeakSet,Hy=0;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>oa()):oa();zy=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(aa)&&ca(s),s.querySelectorAll(aa).forEach(ca)}});zy.observe(document.documentElement,{childList:!0,subtree:!0})});var Vu={};T(Vu,{initSwitches:()=>Uy});function Hu(e){e.hasAttribute("role")||e.setAttribute("role","switch"),e.setAttribute("data-switch-init","")}function Uy(e=document){e.querySelectorAll(Bu).forEach(t=>Hu(t))}var Bu,ua=v(()=>{D();Bu='input[type="checkbox"][data-switch]';x(Bu,Hu)});var Xu={};T(Xu,{initTextareaCounts:()=>Xy});function Ku(e){return e.closest("[lang]")?.getAttribute("lang")||navigator.language}function Yu(e,t){try{return new Intl.PluralRules(e).select(t)}catch{return"other"}}function da(e,t){try{return new Intl.NumberFormat(e).format(t)}catch{return String(t)}}function Yy(e,t,i,s){let n=t?"words":"characters",r=Ku(e),a=Yu(r,s);return(e.getAttribute(`data-label-limit-${a}`)??e.getAttribute("data-label-limit")??Ky[n][a==="one"?"one":"other"]).replaceAll("{count}",da(r,i)).replaceAll("{max}",da(r,s))}function Gy(e,t,i){let s=t?"words":"characters",n=Ku(e),r=Yu(n,i);return(e.getAttribute(`data-label-${s}-${r}`)??e.getAttribute(`data-label-${s}`)??jy[s][r==="one"?"one":"other"]).replaceAll("{count}",da(n,i))}function Gu(e){if(Uu.has(e))return;let t=e.hasAttribute("data-count-init");e.setAttribute("data-count-init","");let i=e.dataset.count==="words",s=i?parseInt(e.dataset.maxwords??"0",10)||0:e.maxLength>0?e.maxLength:0,n=e.closest("form-field"),r=null,a=null;if(t){let h=n?n.querySelector(":scope > output.textarea-counter"):e.nextElementSibling;if(h?.matches("output.textarea-counter")&&!Wu.has(h)){r=h;let f=r.nextElementSibling;f?.matches('span.visually-hidden[aria-live="polite"]')&&(a=f);let p=r.id,m=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(b=>b&&b!==p);m.length?e.setAttribute("aria-describedby",m.join(" ")):e.removeAttribute("aria-describedby")}}r||(r=document.createElement("output"),r.className="textarea-counter",r.setAttribute("aria-live","off"),n?n.append(r):e.insertAdjacentElement("afterend",r)),r.id=`${e.id||`textarea-${++zu}`}-count`,document.getElementById(r.id)!==r&&(r.id=`textarea-${++zu}-count`),Wu.add(r),a||(a=document.createElement("span"),a.className="visually-hidden",a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),r.insertAdjacentElement("afterend",a));let o=a,c=r,l=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean);l.includes(r.id)||e.setAttribute("aria-describedby",[...l,r.id].join(" "));let u;function d(){let h=e.value,f=i?h.trim()?h.trim().split(/\s+/).length:0:h.length;if(s>0){c.textContent=Yy(e,i,f,s);let p=f/s;c.dataset.state=p>=1?"error":p>=.8?"warning":""}else c.textContent=Gy(e,i,f),c.dataset.state="";if(clearTimeout(u),c.dataset.state){let p=c.textContent;u=setTimeout(()=>{o.textContent=p},Wy)}else o.textContent=""}Uu.set(e,d),e.addEventListener("input",d),$(e,d),d()}function Xy(e=document){e.querySelectorAll(ju).forEach(Gu)}var ju,Wy,zu,jy,Ky,Uu,Wu,ha=v(()=>{D();ju="textarea[data-count]",Wy=700,zu=0,jy={characters:{one:"{count} character",other:"{count} characters"},words:{one:"{count} word",other:"{count} words"}},Ky={characters:{one:"{count} of {max} character",other:"{count} of {max} characters"},words:{one:"{count} of {max} word",other:"{count} of {max} words"}};Uu=new WeakMap,Wu=new WeakSet;x(ju,Gu)});var td={};T(td,{initTextareaGrow:()=>Zy});function Qu(e){if(Ju.has(e))return;Ju.add(e);let t=parseInt(e.dataset.maxRows??"0",10)||0;if(e.hasAttribute("rows")&&e.style.setProperty("--grow-rows",String(e.rows)),t>0&&e.style.setProperty("--grow-max-rows",String(t)),Jy){e.setAttribute("data-grow-init","");return}e.setAttribute("data-grow-init","fallback");function i(){e.style.blockSize="auto";let s=getComputedStyle(e),n=parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),r=e.scrollHeight+n;if(t>0){let a=parseFloat(s.lineHeight)||parseFloat(s.fontSize)*1.2,o=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),c=a*t+o+n;r>c?(r=c,e.style.overflowY="auto"):e.style.overflowY="hidden"}e.style.blockSize=r+"px"}e.addEventListener("input",i),e.addEventListener("change",i),$(e,i),i()}function Zy(e=document){e.querySelectorAll(Zu).forEach(Qu)}var Zu,Jy,Ju,fa=v(()=>{D();Zu="textarea[data-grow]",Jy=CSS.supports("field-sizing","content"),Ju=new WeakSet;x(Zu,Qu)});function iw(e){return e.localName.includes("-")?!!customElements.get(e.localName)?.formAssociated:!1}function $t(e){let t=e.name;return typeof t=="string"&&t||e.getAttribute("name")||""}function as(e){if(e instanceof HTMLButtonElement||e instanceof HTMLFieldSetElement||e instanceof HTMLOutputElement)return[];if(e instanceof HTMLInputElement)return Qy.has(e.type)?[]:e.type==="radio"||e.type==="checkbox"?e.checked?[e.value||"on"]:[]:e.type==="file"?e.files?[...e.files].map(i=>i.name):[]:e.value===""?[]:[e.value];if(e instanceof HTMLSelectElement)return e.multiple?[...e.selectedOptions].map(i=>i.value):e.value===""?[]:[e.value];let t=e.value;return Array.isArray(t)?t.map(String).filter(i=>i!==""):t==null||t===""?[]:[String(t)]}function pa(e,t){return e instanceof HTMLFormElement?Array.from(e.elements).filter(i=>$t(i)===t):[...e.querySelectorAll(`[name="${CSS.escape(t)}"]`)]}function sw(e,t){return pa(e,t).flatMap(as)}function nw(e){let t=e.trim(),i=t.search(/[=:]/);if(i===-1){let a=t.startsWith("!");return{name:(a?t.slice(1):t).trim(),value:null,negate:a}}let s=t.slice(0,i),n=t.slice(i+1),r=!1;return s.startsWith("!")&&(r=!0,s=s.slice(1)),s.endsWith("!")?(r=!r,s=s.slice(0,-1)):n.startsWith("!")&&(r=!r,n=n.slice(1)),{name:s.trim(),value:n.trim(),negate:r}}function ed(e){return String(e||"").split("||").map(t=>t.split("&&").map(nw).filter(i=>i.name)).filter(t=>t.length)}function id(e){return new Set(ed(e).flat().map(t=>t.name))}function rw(e,t){let i=sw(t,e.name),s=e.value===null?i.length>0:i.includes(e.value);return e.negate?!s:s}function os(e,t){return ed(e).some(i=>i.every(s=>rw(s,t)))}function aw(e){return[e,...e.querySelectorAll("*")].filter(i=>i.matches(ew)||iw(i))}function cs(e,t){for(let i of aw(e))if(t){if(!i.hasAttribute(We)||i.closest(tw))continue;i.removeAttribute("disabled"),i.removeAttribute(We)}else{if(i.hasAttribute("disabled"))continue;i.setAttribute("disabled",""),i.setAttribute(We,"")}}var Qy,We,tw,ew,ma=v(()=>{Qy=new Set(["button","submit","reset","image"]),We="data-conditional-disabled",tw="[data-show-when][hidden], [data-hide-when][hidden], [data-wizard-step][data-wizard-hidden]",ew="input, select, textarea, button, fieldset"});var cd={};T(cd,{initConditionalFields:()=>cw});function rd(e){return e.closest("form")||document}function ad(e){return e.hasAttribute("data-show-when")?{condition:e.dataset.showWhen||"",invert:!1}:{condition:e.dataset.hideWhen||"",invert:!0}}function ga(e){let{condition:t,invert:i}=ad(e),s=os(t,rd(e)),n=i?!s:s;n?(e.removeAttribute("hidden"),e.removeAttribute("inert")):(e.setAttribute("hidden",""),e.setAttribute("inert","")),cs(e,n)}function va(e,t){for(let i of document.querySelectorAll(ya)){let s=i;!ba.has(s)||rd(s)!==e||t&&!id(ad(s).condition).has(t)||ga(s)}}function nd(e){let t=e.target;if(!(t instanceof Element))return;let i=$t(t);if(!i)return;let s=t.form||t.closest("form");va(s||document,i),s&&va(document,i)}function ow(){sd||(sd=!0,document.addEventListener("input",nd,!0),document.addEventListener("change",nd,!0),document.addEventListener("reset",e=>{setTimeout(()=>{e.defaultPrevented||va(document)},0)},!0))}function od(e){let t=e;ba.has(t)||(ba.add(t),t.setAttribute("data-conditional-init",""),ow(),ga(t),$(t,ga))}function cw(e=document){e.querySelectorAll(ya).forEach(od)}var ya,ba,sd,wa=v(()=>{D();ma();ya="[data-show-when], [data-hide-when]",ba=new WeakSet,sd=!1;x(ya,od)});var pd={};T(pd,{initRangeSliders:()=>uw});function Ea(e,t){if(e===""||e==null)return t;let i=parseFloat(e);return Number.isFinite(i)?i:t}function Aa(e){let t=Ea(e.min,0),i=Ea(e.max,100);return i<t&&(i=t),{min:t,max:i}}function ud(e,t,i){return i===t?0:Math.min(1,Math.max(0,(e-t)/(i-t)))}function dd(e){let t=String(e),i=t.indexOf(".");return i===-1?0:t.length-i-1}function fd(e){if(ld.has(e)||!e.parentNode)return;ld.add(e),e.setAttribute("data-range-init","");let t=e.hasAttribute("data-bubble"),i=e.parentElement;i?.classList.contains("range-wrapper")?i.querySelectorAll(":scope > .range-bubble, :scope > .range-markers, :scope > .range-labels").forEach(l=>l.remove()):(i=document.createElement("div"),i.className="range-wrapper",e.parentNode.insertBefore(i,e),i.appendChild(e));let s=!e.hasAttribute("aria-valuetext"),n;if(t&&(n=document.createElement("output"),n.className="range-bubble",n.setAttribute("aria-hidden","true"),e.id&&n.htmlFor.add(e.id),i.appendChild(n)),e.hasAttribute("data-markers")){let{min:l,max:u}=Aa(e),d=Ea(e.step,1)||1,h=Math.round((u-l)/d);if(h>0&&h<=lw){let f=document.createElement("div");f.className="range-markers",f.setAttribute("aria-hidden","true");for(let p=0;p<=h;p++)f.appendChild(document.createElement("span"));i.appendChild(f)}}let r=e.getAttribute("list"),a=r?document.getElementById(r):null;if(a instanceof HTMLDataListElement){let l=document.createElement("div");l.className="range-labels",l.setAttribute("aria-hidden","true");let{min:u,max:d}=Aa(e);Array.from(a.options).forEach(h=>{let f=document.createElement("span");f.textContent=h.label||h.value,f.style.setProperty("--range-frac",String(ud(parseFloat(h.value),u,d))),l.appendChild(f)}),i.appendChild(l)}function o(){let l=e.value;if(a instanceof HTMLDataListElement){let p=Array.from(a.options).find(m=>m.label&&parseFloat(m.value)===parseFloat(l));if(p)return p.label}let u=e.dataset.prefix||"",d=e.dataset.suffix||"",h=Math.max(dd(e.step==="any"?"":e.step),dd(l)),f=l;try{f=new Intl.NumberFormat(I(e),{minimumFractionDigits:h,maximumFractionDigits:h}).format(parseFloat(l))}catch{}return`${u}${f}${d}`}function c(){let{min:l,max:u}=Aa(e),d=ud(parseFloat(e.value),l,u);i.style.setProperty("--range-pct",`${d*100}%`),i.style.setProperty("--range-frac",String(d));let h=o();n&&(n.textContent=h),s&&(h!==e.value?e.setAttribute("aria-valuetext",h):e.removeAttribute("aria-valuetext"))}e.addEventListener("input",c),e.addEventListener("change",c),$(e,c),c()}function uw(e=document){e.querySelectorAll(hd).forEach(t=>fd(t))}var hd,lw,ld,Sa=v(()=>{D();G();hd='input[type="range"][data-range]',lw=100,ld=new WeakSet;x(hd,fd)});var Ad={};T(Ad,{formatBytes:()=>gd,initUploadZones:()=>mw,matchesAccept:()=>yd});function ce(e,t,i){return e.getAttribute(`data-label-${t}`)??i}function gd(e,t="en"){let i=["byte","kilobyte","megabyte","gigabyte"],s=0,n=e;for(;n>=1e3&&s<i.length-1;)n/=1e3,s++;try{return new Intl.NumberFormat(t,{style:"unit",unit:i[s],unitDisplay:"short",maximumFractionDigits:s>0?1:0}).format(n)}catch{return`${n.toFixed(s>0?1:0)} ${["B","kB","MB","GB"][s]}`}}function vd(e){return e.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean)}function yd(e,t){if(!t.length)return!0;let i=e.name.toLowerCase(),s=(e.type||"").toLowerCase();return t.some(n=>n.startsWith(".")?i.endsWith(n):n.endsWith("/*")?s.startsWith(n.slice(0,-1)):s===n)}function pw(e,t){let i=vd(t).map(s=>{if(s.startsWith("."))return s.slice(1).toUpperCase();let[n,r=""]=s.split("/");if(r==="*"){let a=fw[n];return a?ce(e,a,a):s}return/^[a-z0-9]+$/.test(r)?r.toUpperCase():s});return[...new Set(i)].join(", ")}function wd(e){if(md.has(e)||!e.parentNode)return;md.add(e);let t=e.parentElement?.classList.contains("upload-zone")?e.parentElement:null,i=t?.querySelector(":scope > .upload-prompt"),s=t?.querySelector(":scope > .upload-file-list"),n=t?.querySelector(":scope > .upload-status");if(!t||!i||!s||!n){t?.querySelectorAll(":scope > :not(input)").forEach(b=>b.remove()),t||(t=document.createElement("div"),t.className="upload-zone",e.parentNode.insertBefore(t,e),t.appendChild(e));let u=`upload-${++hw}`;i=document.createElement("p"),i.className="upload-prompt",i.id=`${u}-prompt`,i.insertAdjacentHTML("afterbegin",dw);let d=document.createElement("span"),h=e.multiple?"Drag files here or":"Drag a file here or";d.append(`${ce(e,"prompt",h)} `);let f=document.createElement("span");f.className="upload-browse",f.textContent=ce(e,"browse","browse"),d.append(f),i.append(d);let p=e.getAttribute("accept")||"";if(p){let b=document.createElement("small");b.textContent=pw(e,p),i.append(b)}s=document.createElement("ul"),s.className="upload-file-list",s.hidden=!0,s.setAttribute("aria-label",ce(e,"files","Selected files")),n=document.createElement("p"),n.className="upload-status",n.setAttribute("role","status"),t.append(i,s,n);let m=new Set((e.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));m.add(i.id),e.setAttribute("aria-describedby",[...m].join(" "))}let r=s,a=n,o=t;function c(){r.replaceChildren();let u=Array.from(e.files??[]);r.hidden=u.length===0;let d=I(e);for(let h of u){let f=document.createElement("li"),p=document.createElement("span");p.className="upload-file-name",p.textContent=h.name;let m=document.createElement("span");m.className="upload-file-size",m.textContent=gd(h.size,d),f.append(p,m),r.append(f)}}let l=0;o.addEventListener("dragenter",u=>{u.preventDefault(),l++,o.dataset.dragover=""}),o.addEventListener("dragleave",()=>{l=Math.max(0,l-1),l===0&&delete o.dataset.dragover}),o.addEventListener("dragover",u=>{u.preventDefault()}),o.addEventListener("drop",u=>{if(u.preventDefault(),l=0,delete o.dataset.dragover,e.disabled)return;let d=Array.from(u.dataTransfer?.files??[]);if(!d.length)return;let h=vd(e.getAttribute("accept")||""),f=d.filter(g=>yd(g,h)),p=d.filter(g=>!f.includes(g)),m=[];if(p.length&&m.push(ce(e,"rejected","Not accepted: {files}").replace("{files}",p.map(g=>g.name).join(", "))),!e.multiple&&f.length>1&&(f.length=1,m.push(ce(e,"single","Only one file allowed. Kept {file}.").replace("{file}",f[0].name))),a.textContent=m.join(" "),!f.length)return;let b=new DataTransfer;f.forEach(g=>b.items.add(g)),e.files=b.files,e.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}),e.addEventListener("click",()=>{a.textContent=""}),e.addEventListener("change",c),$(e,()=>{a.textContent="",c()}),c()}function mw(e=document){e.querySelectorAll(bd).forEach(t=>wd(t))}var bd,dw,md,hw,fw,xa=v(()=>{D();G();bd='input[type="file"][data-upload]',dw='<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"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>',md=new WeakSet,hw=0;fw={image:"images",audio:"audio",video:"video"};x(bd,wd)});function je(e){if(!e)return!1;let t=e,i=String(t.localName??t.tagName??"").toLowerCase();if(gw.has(i))return!1;let s=i==="input"?String(t.type??t.getAttribute?.("type")??"text").toLowerCase():"";if(bw.has(s))return!1;let n=String(t.getAttribute?.("autocomplete")??"").trim().toLowerCase();return!(n==="off"||n&&n.split(/\s+/).some(r=>vw.has(r))||t.hasAttribute?.("data-autosave-ignore")||t.closest?.("[data-autosave-ignore]"))}var bw,gw,vw,ka=v(()=>{bw=new Set(["password","hidden","file","submit","button","reset","image"]),gw=new Set(["button","fieldset","output","object"]),vw=new Set(["cc-number","cc-csc","cc-exp","cc-exp-month","cc-exp-year","one-time-code","new-password","current-password"])});var kd={};T(kd,{initAutosave:()=>Sw});function Aw(e){let t=e.dataset.autosave;if(typeof t=="string"&&t.trim()!=="")return t.trim();let i=(e.method||"get").toLowerCase(),s=e.action||(typeof location<"u"?location.href:"");return`${i} ${s}`}function Ew(e){let t=e.dataset.autosaveRetain;if(typeof t!="string")return null;let i=t.trim();return i===""?null:new Set(i.split(/\s+/))}function xd(e){if(Ed.has(e))return;Ed.add(e),e.setAttribute("data-autosave-init","");let t=Aw(e),i=Ew(e),s;function n(){return Array.from(e.elements).filter(h=>{let f=h.name;return f&&(i===null||i.has(f))&&je(h)})}function r(){let h={};for(let f of n()){if(f.disabled)continue;let{name:p}=f;if(f.type==="checkbox"){let m=Array.isArray(h[p])?h[p]:h[p]=[];f.checked&&m.push(f.value)}else f.type==="radio"?f.checked&&(h[p]=f.value):f instanceof HTMLSelectElement&&f.multiple?h[p]=Array.from(f.selectedOptions).map(m=>m.value):typeof f.value=="string"&&(h[p]=f.value)}return h}function a(){s=void 0,S.set(ls,t,r()).catch(()=>{})}function o(){clearTimeout(s),s=setTimeout(a,yw)}function c(){clearTimeout(s),s=void 0}async function l(){let h=await S.get(ls,t,{maxAge:ww});if(!h||typeof h!="object")return S.remove(ls,t).catch(()=>{}),[];let f=[];for(let p of n()){if(!Object.hasOwn(h,p.name)||p.disabled||p.readOnly)continue;let m=h[p.name],b=Array.isArray(m)?m:[m];if(p.type==="checkbox")p.checked=b.includes(p.value);else if(p.type==="radio")p.checked=p.value===m;else if(p instanceof HTMLSelectElement&&p.multiple)for(let g of p.options)g.selected=b.includes(g.value);else if(typeof m=="string")p.value=m;else continue;f.push(p)}return f}function u(){c(),S.remove(ls,t).catch(()=>{})}function d(){let h=e.dataset.labelRestored||"Draft restored";if(customElements.get("toast-msg")){let m=document.querySelector("toast-msg");if(m||(m=document.createElement("toast-msg"),document.body.appendChild(m)),typeof m.show=="function"){m.show({message:h,variant:"info",duration:3e3,source:"autosave"});return}}let f=e.querySelector(":scope > [data-autosave-status]");f||(f=document.createElement("span"),f.className="visually-hidden",f.setAttribute("role","status"),f.setAttribute("data-autosave-status",""),e.append(f)),f.textContent="";let p=f;requestAnimationFrame(()=>{p.textContent=h})}l().then(h=>{if(h.length){d();for(let f of h)f.dispatchEvent(new Event("input",{bubbles:!0})),f.dispatchEvent(new Event("change",{bubbles:!0}));c(),e.dispatchEvent(new CustomEvent("autosave:restore",{bubbles:!0,detail:{key:t,fields:[...new Set(h.map(f=>f.name))]}}))}}),e.addEventListener("input",o),e.addEventListener("change",o),e.addEventListener("submit",u),e.addEventListener("reset",h=>{c(),setTimeout(()=>{h.defaultPrevented||u()},0)})}function Sw(e=document){e.querySelectorAll(Sd).forEach(t=>xd(t))}var Sd,ls,yw,ww,Ed,Ca=v(()=>{it();D();ka();Sd="form[data-autosave]",ls="autosave",yw=500,ww=1440*60*1e3,Ed=new WeakSet;x(Sd,xd)});var Dd={};T(Dd,{initMaskInputs:()=>Nw});function Ld(e){let t=e.dataset.mask;if(Cd[t])return Cd[t];if(t==="custom"&&e.dataset.pattern){let i=e.dataset.pattern,s=new Set;for(let r of i)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:i,accept:n}}return null}function Ot(e){return e==="#"||e==="A"||e==="*"}function _d(e,t){let i=kw[e];return i?i.test(t):!1}function Cw(e){let t=0;for(let i of e)Ot(i)&&t++;return t}function Nd(e,t){let i="",s=0;for(let n=0;n<t.length&&s<e.length;n++){let r=t[n];if(Ot(r)){for(;s<e.length&&!_d(r,e[s]);)s++;s<e.length&&(i+=e[s],s++)}else i+=r}return i}function us(e,t,i){let s="",n=0;for(let r of e){if(n<t.length&&!Ot(t[n])){if(r===t[n]){n++;continue}for(;n<t.length&&!Ot(t[n]);)n++}n<t.length?_d(t[n],r)&&(s+=r,n++):i.test(r)&&(s+=r)}return s}function Tw(e,t,i){let s=0,n=0;if(e>0){for(let r=0;r<t.length;r++)if(Ot(i[r])&&(s++,s===e)){n=r+1;break}s<e&&(n=t.length)}for(;n<i.length&&n<t.length&&!Ot(i[n]);)n++;return n}function Lw(e){for(let t of e)if(Ot(t)&&t!=="#")return!1;return!0}function La(e){if(Td.has(e)||!xw.has(e.type))return;let t=Ld(e);if(!t){if(e.removeAttribute("data-mask-init"),!Ta.has(e)){Ta.add(e);let h=new MutationObserver(()=>{Ld(e)&&(h.disconnect(),Ta.delete(e),La(e))});h.observe(e,{attributes:!0,attributeFilter:["data-mask","data-pattern","type"]})}return}Td.add(e),e.setAttribute("data-mask-init","");let{pattern:i}=t,s=t.accept,n=Cw(i);Lw(i)&&!e.getAttribute("inputmode")&&e.setAttribute("inputmode","numeric"),e.getAttribute("maxlength")||e.setAttribute("maxlength",String(i.length));let r=!1,a=null,o="",c="";function l(){let h=e.dataset.rawValue||"";if(h.length>0&&h.length<n){let p=e.getAttribute("placeholder");c=e.dataset.maskMessage||(p?`Enter the complete value, like ${p}.`:"Enter the complete value."),e.setCustomValidity(c)}else c&&e.validationMessage===c&&(e.setCustomValidity(""),c="")}function u(){let h=us(e.value,i,s).slice(0,n),f=Nd(h,i);e.value!==f&&(e.value=f),e.dataset.rawValue=h,l()}e.addEventListener("compositionstart",()=>{r=!0}),e.addEventListener("compositionend",()=>{r=!1,d()}),e.addEventListener("beforeinput",h=>{a=e.value,o=h.inputType||""});function d(){if(r)return;let h=e.selectionStart??e.value.length,f=us(e.value.slice(0,h),i,s).length,p=us(e.value,i,s),m=a!=null?us(a,i,s):null;m!=null&&p===m&&a!==e.value&&(o==="deleteContentBackward"&&f>0?(p=p.slice(0,f-1)+p.slice(f),f--):o==="deleteContentForward"&&f<p.length&&(p=p.slice(0,f)+p.slice(f+1))),a=null,o="",p=p.slice(0,n);let b=Nd(p,i);e.value=b,e.dataset.rawValue=p,l();let g=Tw(Math.min(f,p.length),b,i);document.activeElement===e&&e.setSelectionRange(g,g)}e.addEventListener("input",d),$(e,u),u()}function Nw(e=document){e.querySelectorAll(Md).forEach(t=>La(t))}var Md,xw,Cd,kw,Td,Ta,Na=v(()=>{D();Md="input[data-mask]",xw=new Set(["text","tel","search"]),Cd={phone:{pattern:"(###) ###-####",accept:/\d/},"credit-card":{pattern:"#### #### #### ####",accept:/\d/},date:{pattern:"##/##/####",accept:/\d/},ssn:{pattern:"###-##-####",accept:/\d/},zip:{pattern:"#####",accept:/\d/}},kw={"#":/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},Td=new WeakSet,Ta=new WeakSet;x(Md,La)});var Rd={};T(Rd,{initAcceptInputs:()=>Dw});function Mw(e){if(!e)return null;let t=Object.hasOwn(Id,e)?Id[e]:null;if(t)return{regex:new RegExp(t.pattern,"u"),inputmode:t.inputmode};if(e.startsWith("[")){for(let i of["u",""])try{return{regex:new RegExp(e,i),inputmode:"text"}}catch{}return console.warn(`[data-accept] Invalid character class: ${e}`),null}return console.warn(`[data-accept] Unknown preset: ${e}`),null}function ds(e,t){return Array.from(e).filter(i=>t.test(i)).join("")}function Pd(e){if($d.has(e))return;if($d.add(e),e.hasAttribute("data-mask")){console.warn("[data-accept] Conflict: data-mask is also present \u2014 deferring to mask.",e);return}let t=Mw(e.dataset.accept||"");if(!t)return;let{regex:i,inputmode:s}=t;e.dataset.acceptPattern=i.source,e.getAttribute("inputmode")||e.setAttribute("inputmode",s);let n=!1;e.addEventListener("compositionstart",()=>{n=!0}),e.addEventListener("compositionend",()=>{n=!1,r()}),e.addEventListener("beforeinput",o=>{if(n)return;let c=o.data;if(c!=null){if(o.inputType==="insertFromPaste"){let l=ds(c,i);if(l===c||(o.preventDefault(),!l))return;document.execCommand("insertText",!1,l)||_w(e,l);return}if(o.inputType==="insertText"||o.inputType==="insertCompositionText"){for(let l of c)if(!i.test(l)){o.preventDefault();return}}}}),e.addEventListener("input",()=>{n||r()});function r(){let o=e.value,c=ds(o,i);if(c===o)return;let l=e.selectionStart??0,u=ds(o.slice(0,l),i);e.value=c;let d=Math.min(u.length,c.length);document.activeElement===e&&e.setSelectionRange(d,d)}function a(){if(!e.value)return;let o=ds(e.value,i);o!==e.value&&(e.value=o)}a(),$(e,a)}function _w(e,t){let i=e.selectionStart??0,s=e.selectionEnd??0,n=e.value.slice(0,i),r=e.value.slice(s);e.value=n+t+r;let a=i+t.length;e.setSelectionRange(a,a),e.dispatchEvent(new Event("input",{bubbles:!0}))}function Dw(e=document){e.querySelectorAll(Od).forEach(Pd)}var Od,Id,$d,Ma=v(()=>{D();Od="input[data-accept]",Id={digits:{pattern:"[0-9]",inputmode:"numeric"},alpha:{pattern:"[a-zA-Z]",inputmode:"text"},letters:{pattern:"[\\p{L}\\p{M}]",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"}};$d=new WeakSet;x(Od,Pd)});var Hd={};T(Hd,{initToggleTags:()=>Iw});function Bd(e){if(qd.has(e))return;qd.add(e);let t=e.querySelector(":scope > .toggle-tags-status");t||(t=document.createElement("p"),t.className="toggle-tags-status",t.setAttribute("role","status"),e.append(t));let i=t,s=()=>Array.from(e.querySelectorAll('input[type="checkbox"]')),n=()=>{let o=parseInt(e.dataset.max??"",10);return o>=1?o:1/0},r=()=>(e.getAttribute("data-label-limit")??"Limit reached: {max} selected. Uncheck one to choose another.").replace("{max}",String(n()));function a(){let o=n(),c=s(),l=c.filter(d=>d.checked).length>=o;for(let d of c){let h=d.hasAttribute("data-max-blocked");if(l&&!d.checked&&!d.disabled){if(!h&&d.getAttribute("aria-disabled")==="true")continue;d.setAttribute("aria-disabled","true"),d.setAttribute("data-max-blocked","")}else h&&(d.removeAttribute("aria-disabled"),d.removeAttribute("data-max-blocked"))}let u=l?r():"";i.textContent!==u&&(i.textContent=u)}e.addEventListener("click",o=>{let c=o.target;!(c instanceof HTMLInputElement)||!c.hasAttribute("data-max-blocked")||(o.preventDefault(),i.textContent="",requestAnimationFrame(()=>{i.textContent=r()}))}),e.addEventListener("change",a),new MutationObserver(a).observe(e,{attributes:!0,attributeFilter:["data-max"]}),$(e,a),a()}function Iw(e=document){e.querySelectorAll(Fd).forEach(t=>Bd(t))}var Fd,qd,_a=v(()=>{D();Fd="fieldset[data-toggle-tags][data-max]",qd=new WeakSet;x(Fd,Bd)});var jd={};T(jd,{initNumberSteppers:()=>Rw});function zd(e,t){let i=document.createElement("button");return i.type="button",i.className=e,i.innerHTML=t,i.tabIndex=-1,i}function Pw(e,t){let i=e.min!==""?parseFloat(e.min):-1/0,s=e.max!==""?parseFloat(e.max):1/0,n=parseFloat(e.value)||0;e.value=String(Math.min(Math.max(n+t,i),s))}function Wd(e){if(Vd.has(e)||!e.parentNode)return;Vd.add(e),e.setAttribute("data-stepper-init","");let t=e.parentElement;t?.classList.contains("number-wrapper")?t.querySelectorAll(":scope > .number-dec, :scope > .number-inc").forEach(c=>c.remove()):(t=document.createElement("div"),t.className="number-wrapper",e.parentNode.insertBefore(t,e));let i=zd("number-dec",$w),s=zd("number-inc",Ow);t.appendChild(i),t.appendChild(e),t.appendChild(s);function n(){i.setAttribute("aria-label",e.dataset.labelDecrease||"Decrease"),s.setAttribute("aria-label",e.dataset.labelIncrease||"Increase")}function r(){return e.disabled||e.readOnly||e.matches(":disabled")}function a(c){if(r())return;let l=e.value;try{c>0?e.stepUp():e.stepDown()}catch{Pw(e,c)}e.value!==l&&(e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))),o()}function o(){let c=e.min!==""?parseFloat(e.min):-1/0,l=e.max!==""?parseFloat(e.max):1/0,u=parseFloat(e.value),d=r();i.disabled=d||Number.isFinite(u)&&u<=c,s.disabled=d||Number.isFinite(u)&&u>=l}i.addEventListener("click",()=>a(-1)),s.addEventListener("click",()=>a(1)),e.addEventListener("input",o),e.addEventListener("change",o),$(e,o),new MutationObserver(()=>{n(),o()}).observe(e,{attributes:!0,attributeFilter:["disabled","readonly","min","max","step","data-label-decrease","data-label-increase"]}),n(),o()}function Rw(e=document){e.querySelectorAll(Ud).forEach(t=>Wd(t))}var Ud,$w,Ow,Vd,Da=v(()=>{D();Ud='input[type="number"][data-stepper]',$w='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><line x1="5" y1="12" x2="19" y2="12"/></svg>',Ow='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>',Vd=new WeakSet;x(Ud,Wd)});var Xd={};T(Xd,{initColorInputs:()=>qw});function Gd(e){if(Kd.has(e)||!e.parentNode||e.closest("color-picker"))return;Kd.add(e),e.setAttribute("data-color-init","");let t=e.parentElement;t?.classList.contains("color-wrapper")?t.querySelectorAll(":scope > .color-display").forEach(a=>a.remove()):(t=document.createElement("span"),t.className="color-wrapper",e.parentNode.insertBefore(t,e),t.appendChild(e));let i=document.createElement("span");i.className="color-display",i.setAttribute("aria-hidden","true");let s=document.createElement("span");s.className="color-swatch";let n=document.createElement("span");n.className="color-hex",i.append(s,n),t.appendChild(i);function r(){s.style.setProperty("--color-swatch-value",e.value),n.textContent=e.value}e.addEventListener("input",r),e.addEventListener("change",r),$(e,r),r()}function qw(e=document){e.querySelectorAll(Yd).forEach(t=>Gd(t))}var Yd,Kd,Ia=v(()=>{D();Yd='input[type="color"][data-color]',Kd=new WeakSet;x(Yd,Gd)});var oh={};T(oh,{initSelectAll:()=>jw});function jw(e=document){e.querySelectorAll(rh).forEach(t=>ah(t))}function Ra(e){return e.closest(Ww)||document}function nh(e){let t=e.dataset.selectAll??"";if(!t)return[];let i;try{i=Ra(e).querySelectorAll(t)}catch{return[]}return[...i].filter(s=>s!==e&&!s.disabled&&!s.matches(":disabled"))}function ah(e){if(Pa.has(e)||!(e instanceof HTMLInputElement)||e.type!=="checkbox")return;e.removeAttribute("data-select-all-init");let t=!1,i="",s=new AbortController,{signal:n}=s;function r(){if(n.aborted)return;if(!e.isConnected){s.abort(),c.disconnect(),Pa.delete(e);return}let u=nh(e),d=u.length,h=u.filter(b=>b.checked),f=h.length;e.checked=d>0&&f===d,e.indeterminate=f>0&&f<d;let p=Ra(e).querySelector("[data-selected-count]");if(p){let b=new Intl.NumberFormat(I(p)).format(f);p instanceof HTMLOutputElement?p.value=b:p.textContent=b}let m=u.map(b=>b.checked?"1":"0").join("");m!==i&&(i=m,e.dispatchEvent(new CustomEvent("select-all:change",{bubbles:!0,detail:{checked:f,total:d,selected:h}})))}Pa.set(e,{sync:r}),e.addEventListener("change",()=>{t=!0;let u=e.checked;for(let d of nh(e))d.checked!==u&&(d.checked=u,d.dispatchEvent(new Event("change",{bubbles:!0})));t=!1,r()},{signal:n});let a=Ra(e);a.addEventListener("change",u=>{if(t||u.target===e)return;let d=e.dataset.selectAll;d&&u.target.matches?.(d)&&r()},{signal:n}),$(e,r);let o=!1,c=new MutationObserver(()=>{o||(o=!0,queueMicrotask(()=>{o=!1,r()}))}),l=a===document?document.body:a;l&&c.observe(l,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","hidden"]}),c.observe(e,{attributes:!0,attributeFilter:["data-select-all"]}),r()}var rh,Ww,Pa,qa=v(()=>{D();G();rh="[data-select-all]",Ww="[data-select-all-scope], table, form, fieldset",Pa=new WeakMap;x(rh,ah)});var fh={};T(fh,{initMath:()=>Ba});function Ba(e=document){e.querySelectorAll(Ke).forEach(Va)}function Gw(e){let t=e.getAttribute("data-math")||"";return new Set(t.split(/\s+/).filter(Boolean))}function Xw(e){let t=(e.closest("pre")||e).nextElementSibling;return t?.hasAttribute("data-math-rendered")?t:null}function dh(e){let t=e.previousElementSibling;return t?t.matches(Ke)?t:t.matches("pre")?t.querySelector(Ke):null:null}function hh(){let e=[];document.querySelectorAll("[data-math-rendered][data-math-numbered]").forEach((i,s)=>{let n=s+1;i.getAttribute("data-equation-number")!==String(n)&&i.setAttribute("data-equation-number",String(n)),i.id&&e.push({id:i.id,number:n,latex:dh(i)?.textContent.trim()??""})});let t=(window.VBMath??={equations:[]}).equations;t.splice(0,t.length,...e)}function Ha(){Fa||(Fa=!0,queueMicrotask(()=>{Fa=!1,hh()}))}function Va(e){if(ch.has(e))return;if(ch.add(e),e.setAttribute("data-math-init",""),e.getAttribute("data-math-state")==="rendered"&&Xw(e)){Ha();return}!e.hasAttribute("data-math")&&e.classList.contains("language-math")&&e.setAttribute("data-math","");let t=Gw(e),i=e.getAttribute("data-mathml"),s=e.textContent.trim(),n=t.has("inline");if(!i||!Yw){e.setAttribute("data-math-state","source");return}let r=n?document.createElement("span"):document.createElement("div");r.setAttribute("data-math-rendered",""),r.replaceChildren(wc(i));let a=e.id||null;a&&(r.id=a,e.removeAttribute("id"));let o=r.querySelector("math");if(o&&(n||o.setAttribute("display","block"),!o.hasAttribute("alttext")&&s&&o.setAttribute("alttext",s)),t.has("numbered")&&r.setAttribute("data-math-numbered",""),t.has("copyable")){r.setAttribute("data-math-copyable","");let u=document.createElement("button");u.type="button",u.setAttribute("data-math-copy",""),u.textContent=q(e,"copy","Copy LaTeX"),r.append(u)}e.setAttribute("data-math-state","rendered");let c=e.closest("pre");(c||e).insertAdjacentElement("afterend",r),c?(c.setAttribute("data-math-state","rendered"),c.hidden=!0):e.hidden=!0;let l=null;t.has("numbered")&&(hh(),l=Number(r.getAttribute("data-equation-number"))),Zw(),e.dispatchEvent(new CustomEvent("math:rendered",{bubbles:!0,detail:{latex:s,inline:n,number:l}}))}async function Jw(e){let t=e.closest("[data-math-rendered]"),i=t&&dh(t);if(!i)return;let s=i.textContent.trim(),n=q(i,"copy","Copy LaTeX"),r=q(i,"copied","Copied to clipboard"),a=q(i,"copy-failed","Copy failed"),o=await ut(s,{announceMessage:r,failureMessage:a}),c=o?r:a;e.setAttribute("data-state",o?"copied":"failed"),e.textContent=c,clearTimeout(lh.get(e)),lh.set(e,setTimeout(()=>{e.removeAttribute("data-state"),e.textContent=n},Kw))}function Zw(){if(document.querySelector("[data-vb-math-font]"))return;let e=document.createElement("link");e.rel="stylesheet",e.href=`${ge()}/fonts/math-fonts.css`,e.setAttribute("data-vb-math-font",""),document.head.appendChild(e)}var Ke,Kw,Yw,ch,Fa,lh,uh,Qw,za=v(()=>{ye();Vt();lt();Ut();Ke="[data-math], code.language-math",Kw=2e3,Yw=typeof MathMLElement<"u",ch=new WeakSet;window.VBMath=window.VBMath||{equations:[]};Fa=!1;lh=new WeakMap;uh=Symbol.for("vb.math.copy");document[uh]||(document[uh]=!0,document.addEventListener("click",e=>{let i=(e.target instanceof Element?e.target:null)?.closest("button[data-math-copy]")??null;i&&Jw(i)}));document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Ba()):Ba();Qw=new MutationObserver(e=>{for(let t of e){for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;(s.matches("[data-math-numbered]")||s.querySelector("[data-math-numbered]"))&&Ha()}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Ke)&&Va(s),s.querySelectorAll(Ke).forEach(Va),(s.matches("[data-math-numbered]")||s.querySelector("[data-math-numbered]"))&&Ha()}}});Qw.observe(document.documentElement,{childList:!0,subtree:!0})});var $h={};T($h,{WizardController:()=>Ye,initWizards:()=>TA});function Mh(){try{let e=sessionStorage.getItem(Nh);return e||(e=globalThis.crypto?.randomUUID?.()??String(Math.random()).slice(2),sessionStorage.setItem(Nh,e)),e}catch{return""}}function _h(e){let t=e;return typeof t.checkValidity=="function"?t.checkValidity():!e.matches(":invalid")}function Dh(e){let t=e;typeof t.reportValidity=="function"?t.reportValidity():t.focus?.()}function Ih(e){if(!(e instanceof HTMLFormElement))return;let t=e,i=t.wizardController;if(i instanceof Ye&&i.form===t)return;let s=new Ye(t);t.wizardController=s,t.wizardGoTo=n=>s.goTo(n),t.wizardNext=()=>s.next(),t.wizardPrev=()=>s.prev(),t.wizardReset=()=>s.reset()}function TA(){document.querySelectorAll("form[data-wizard]").forEach(Ih)}var gs,Nh,xA,kA,CA,Ye,Oh=v(()=>{it();G();ma();ka();D();gs="wizard",Nh="vb:wizard-session",xA=24,kA={back:"Back",next:"Next",submit:"Submit",step:"Step {n}",status:"Now on step {current} of {total}: {name}",completed:"Go to {name} (completed)",yes:"Yes"},CA=new Set(["button","submit","reset","image","checkbox","radio","file","color","range"]);Ye=class{#t;#e=[];#i=0;#n=null;#s=null;#o=null;#r=!1;#a="step";#l="";#c=xA*36e5;#b=!1;#f=0;#u=0;#p=new AbortController;constructor(t){if(!t||!(t instanceof HTMLFormElement))throw new Error("WizardController requires a form element");this.#t=t,this.#v()}#v(){if(this.#e=Array.from(this.#t.querySelectorAll("fieldset[data-wizard-step]")),this.#e.length===0){console.warn("Wizard form has no steps");return}this.#r=this.#t.hasAttribute("data-wizard-history"),this.#a=this.#t.getAttribute("data-wizard-validate")||"step",this.#E(),this.#n=this.#t.querySelector("[data-wizard-progress]"),this.#C(),this.#tt(),this.#j(),this.#t.setAttribute("data-wizard-enhanced",""),this.#t.setAttribute("data-wizard-total",String(this.#e.length)),this.#X(),this.#G(),this.#V();let t=()=>{cancelAnimationFrame(this.#f),this.#f=requestAnimationFrame(()=>this.#W())};if(this.#t.addEventListener("change",t),this.#t.addEventListener("input",t),this.#l&&(this.#t.addEventListener("change",()=>this.#g()),this.#t.addEventListener("input",()=>this.#g())),this.#t.addEventListener("keydown",i=>this.#k(i)),this.#t.addEventListener("click",i=>this.#_(i)),this.#t.addEventListener("submit",i=>this.#N(i)),this.#t.addEventListener("vb:beforesubmit",i=>this.#F(i)),this.#t.addEventListener("reset",i=>{setTimeout(()=>{i.defaultPrevented||this.reset()},0)}),this.#r){let i=this.#q();i!==null&&i>=0&&i<this.#e.length&&(this.#i=i),window.addEventListener("hashchange",()=>{if(!this.#t.isConnected){this.#p.abort();return}let s=this.#q();s===null||s===this.#i||this.#ot(s,{push:!1})||this.#K(!1)},{signal:this.#p.signal})}if(this.#W(),this.#l){let i=this.#r&&this.#q()!==null;this.#b=!0,this.#S(i).finally(()=>{this.#b=!1})}}#d(t,i={}){return(this.#t.getAttribute(`data-label-${t}`)??kA[t]).replace(/\{(\w+)\}/g,(n,r)=>r in i?i[r]:n)}#m(t){try{return new Intl.NumberFormat(I(this.#t)).format(t)}catch{return String(t)}}#h(t,i){return t?.querySelector(":scope > legend")?.textContent?.trim()||this.#d("step",{n:this.#m(i+1)})}#E(){let t=this.#t.getAttribute("data-wizard-persist");if(t===null)return;if(!this.#t.id){console.warn("Wizard persistence requires an id on the form element");return}this.#l=t==="local"?"local":"session";let i=Number(this.#t.getAttribute("data-wizard-persist-hours"));i>0&&(this.#c=i*36e5)}#y(){let t={};for(let i of this.#t.elements){let s=$t(i);!s||!je(i)||(t[s]??=[]).push(...as(i))}return t}#x(){if(!this.#l||this.#b)return;let t={step:this.#i,data:this.#y(),session:this.#l==="session"?Mh():null};S.set(gs,this.#t.id,t).catch(()=>{})}#g(){this.#l&&(cancelAnimationFrame(this.#u),this.#u=requestAnimationFrame(()=>this.#x()))}async#S(t){let i;try{i=await S.get(gs,this.#t.id,{maxAge:this.#c})}catch{return}if(!i||typeof i!="object")return;let s=i;if(this.#l==="session"&&s.session!==Mh()){S.remove(gs,this.#t.id).catch(()=>{});return}let n=this.#w(s.data&&typeof s.data=="object"?s.data:{});!t&&typeof s.step=="number"&&s.step>=0&&s.step<this.#e.length&&(this.#i=s.step),this.#W(),this.#at("wizard:restore",{step:this.#i,fields:n})}#w(t){let i=new Set,s=new Map,n=[];for(let r of this.#t.elements){let a=$t(r);if(!a||!Object.hasOwn(t,a)||!je(r)||r.hasAttribute("readonly")||r.hasAttribute("disabled")&&!r.hasAttribute(We))continue;let o=t[a],c=(Array.isArray(o)?o:[o]).map(String),l=r;if(r instanceof HTMLInputElement&&(r.type==="checkbox"||r.type==="radio"))r.checked=c.includes(r.value||"on");else if(r instanceof HTMLSelectElement&&r.multiple)for(let u of r.options)u.selected=c.includes(u.value);else if(Array.isArray(l.value))l.value=c;else if("value"in l){let u=s.get(a)??0;s.set(a,u+1),l.value=c[u]??""}else continue;i.add(a),n.push(r)}for(let r of n)r.dispatchEvent(new Event("input",{bubbles:!0}));return[...i]}#A(){this.#l&&(cancelAnimationFrame(this.#u),S.remove(gs,this.#t.id).catch(()=>{}))}#M(){return this.#i>=this.#O().length-1}#k(t){if(t.key!=="Enter"||t.defaultPrevented||t.isComposing||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey)return;let i=t.target;if(!(!(i instanceof HTMLInputElement)||CA.has(i.type))){if(!this.#M()){t.preventDefault(),this.next();return}!this.#D()&&this.#R()&&t.preventDefault()}}#_(t){let i=t.target?.closest?.("button, input");!i||i.type!=="submit"||i.form===this.#t&&(this.#D()||i.hasAttribute("formnovalidate")||this.#R()&&t.preventDefault())}#D(){return this.#t.noValidate&&!this.#t.hasAttribute("data-validate")}#R(){let t=this.#O();for(let i of this.#t.elements){if(i.matches(":disabled"))continue;let s=i.closest("fieldset[data-wizard-step]");if(!(!s||!t.includes(s))&&!_h(i))return s.hasAttribute("data-wizard-active")?!1:(this.#ot(t.indexOf(s),{validate:!1,focus:!1}),Dh(i),!0)}return!1}#N(t){if(!this.#M()){t.preventDefault(),this.next();return}this.#t.hasAttribute("data-validate")||this.#I()}#F(t){this.#t.hasAttribute("data-validate")&&queueMicrotask(()=>{!t.defaultPrevented&&this.#M()&&this.#I()})}#I(){cancelAnimationFrame(this.#u),this.#at("wizard:complete"),this.#A()}#j(){this.#t.querySelectorAll(":scope > [data-wizard-status]").forEach(i=>i.remove());let t=document.createElement("p");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.setAttribute("data-wizard-status",""),this.#s=t,this.#t.prepend(t)}#C(){let t=this.#t.getAttribute("data-wizard-steps");if(t){this.#o=document.querySelector(t);return}this.#o=this.#t.querySelector("nav.steps")}#T(){return this.#o?.localName==="progress-tracker"}#B(){return this.#o?[...this.#o.querySelectorAll(":scope ol > li")]:[]}#tt(){if(!this.#o)return;let t=this.#o.querySelector("ol");!t||t.children.length>0||this.#e.forEach((i,s)=>{let n=document.createElement("li");n.textContent=this.#h(i,s),t.appendChild(n)})}#$(){if(!this.#o)return;let t=this.#B(),i=this.#O();if(this.#T()){let s=this.#o;this.#e.forEach((a,o)=>{t[o]?.toggleAttribute("hidden",a.hasAttribute("data-wizard-hidden"))});let n=this.#e.indexOf(this.#z()),r=t[n];if(r){let a=r.dataset.step||String(n+1);s.getAttribute("data-current")!==a&&s.setAttribute("data-current",a)}return}this.#e.forEach((s,n)=>{let r=t[n];if(!r)return;if(r.removeAttribute("data-completed"),r.removeAttribute("aria-current"),r.removeAttribute("aria-disabled"),s.hasAttribute("data-wizard-hidden")){r.setAttribute("hidden","");return}r.removeAttribute("hidden");let a=i.indexOf(s),o=r.querySelector("a, button"),c=!o;a<this.#i?(r.setAttribute("data-completed",""),c&&r.setAttribute("role","button"),(o||r).setAttribute("aria-label",this.#d("completed",{name:this.#h(s,a)}))):(c&&r.removeAttribute("role"),(o||r).removeAttribute("aria-label"),a===this.#i?r.setAttribute("aria-current","step"):r.setAttribute("aria-disabled","true"))});for(let s of t){if(s.hasAttribute("hidden"))continue;(s.querySelector("a, button")||s).setAttribute("tabindex",s.hasAttribute("aria-current")?"0":"-1")}}#L(t){if(!t)return-1;let i=this.#B().indexOf(t),s=this.#e[i];return s?this.#O().indexOf(s):-1}#V(){let t=this.#o;if(!t)return;let i=this.#p.signal;if(this.#T()){t.addEventListener("progress-tracker:step",s=>{let n=s.detail;if(n?.source!=="click")return;let r=this.#B().find((o,c)=>(o.dataset.step||String(c+1))===String(n.step)),a=this.#L(r??null);a>=0&&this.goTo(a)},{signal:i});return}t.addEventListener("click",s=>{let n=s.target.closest("li");if(!n||!n.hasAttribute("data-completed")){n&&s.target.closest("a")&&s.preventDefault();return}s.preventDefault();let r=this.#L(n);r>=0&&this.goTo(r)},{signal:i}),t.addEventListener("keydown",s=>{let n=this.#B().filter(u=>!u.hasAttribute("hidden")),r=s.target.closest("li"),a=r?n.indexOf(r):-1;if(a===-1)return;if((s.key==="Enter"||s.key===" ")&&r?.getAttribute("role")==="button"){s.preventDefault();let u=this.#L(r);u>=0&&this.goTo(u);return}let o;switch(s.key){case"ArrowRight":case"ArrowDown":o=Math.min(a+1,n.length-1);break;case"ArrowLeft":case"ArrowUp":o=Math.max(a-1,0);break;case"Home":o=0;break;case"End":o=n.length-1;break;default:return}s.preventDefault();let c=n[a].querySelector("a, button")||n[a],l=n[o].querySelector("a, button")||n[o];c.setAttribute("tabindex","-1"),l.setAttribute("tabindex","0"),l.focus()},{signal:i})}#G(){this.#t.addEventListener("click",t=>{let i=t.target?.closest?.("[data-wizard-prev], [data-wizard-next]");!i||!this.#t.contains(i)||(t.preventDefault(),i.hasAttribute("data-wizard-prev")?this.prev():this.next())})}#X(){if(this.#t.querySelector("[data-wizard-nav]"))return;let t=document.createElement("nav");t.setAttribute("data-wizard-nav","");let i=document.createElement("button");i.type="button",i.setAttribute("data-wizard-prev",""),i.textContent=this.#d("back");let s=document.createElement("button");s.type="button",s.setAttribute("data-wizard-next",""),s.textContent=this.#d("next");let n=document.createElement("button");n.type="submit",n.textContent=this.#d("submit"),t.append(i,s,n),this.#t.appendChild(t)}#O(){return this.#e.filter(t=>!t.hasAttribute("data-wizard-hidden"))}#z(){return this.#O()[this.#i]}#P({push:t=!1}={}){let i=this.#O(),s=i[this.#i];this.#e.forEach(n=>{n.toggleAttribute("data-wizard-active",n===s)}),this.#t.setAttribute("data-wizard-current",String(this.#i+1)),this.#t.setAttribute("data-wizard-total",String(i.length)),this.#t.toggleAttribute("data-wizard-last",this.#i===i.length-1),this.#Q(),this.#$(),this.#r&&this.#K(t),this.#st(),this.#it()}#Q(){if(!this.#n)return;let t=this.#O();this.#n.max=t.length,this.#n.value=this.#i+1}#K(t){let i=`#step=${this.#i+1}`;window.location.hash!==i&&(t?history.pushState(null,"",i):history.replaceState(null,"",i))}#q(){let t=window.location.hash.match(/step=(\d+)/);return t?parseInt(t[1],10)-1:null}#st(){if(!this.#s)return;let t=this.#O().length,i=this.#d("status",{current:this.#m(this.#i+1),total:this.#m(t),name:this.#h(this.#z(),this.#i)});this.#s.textContent!==i&&(this.#s.textContent=i)}#U(){let t=this.#z();if(!t)return;let i=t.querySelector(":scope > legend")||t;i.hasAttribute("tabindex")||i.setAttribute("tabindex","-1"),i.focus({preventScroll:!1})}#J(){let t=document.activeElement;return!t||t===document.body?!0:this.#t.contains(t)||!!this.#o?.contains(t)}#Z(){if(this.#a==="none")return!0;let t=this.#z();if(!t||t.hasAttribute("data-wizard-optional"))return!0;for(let i of this.#t.elements)if(!(!t.contains(i)||i.matches(":disabled"))&&!_h(i))return Dh(i),!1;return!0}#W(){for(let i of this.#e){let s=i.getAttribute("data-wizard-if");if(!s)continue;let n=os(s,this.#t);i.toggleAttribute("data-wizard-hidden",!n),cs(i,n)}let t=this.#O();this.#i>=t.length&&(this.#i=Math.max(0,t.length-1)),this.#P()}#Y(t){return pa(this.#t,t).flatMap(i=>this.#et(i)).join(", ")}#et(t){let i=as(t);return i.length?t instanceof HTMLSelectElement?[...t.selectedOptions].filter(s=>s.value!=="").map(s=>s.label.trim()||s.value):t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")?t.type==="checkbox"&&!this.#H(t)?[this.#d("yes")]:[this.#nt(t)||i[0]]:i:[]}#H(t){return t.closest("fieldset:not([data-wizard-step])")?.querySelector(":scope > legend")?.textContent.trim()||""}#nt(t){let i=t.labels;if(!i?.length)return"";let s=i[0].cloneNode(!0);return s.querySelectorAll("input, select, textarea").forEach(n=>n.remove()),s.textContent.replace(/\s+/g," ").trim()}#it(){let t=this.#z();if(!t||!t.hasAttribute("data-wizard-summary"))return;let i=t.querySelectorAll("[data-wizard-field]");if(i.length>0){for(let r of i)r.textContent=this.#Y(r.getAttribute("data-wizard-field")||"")||"\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.replaceChildren();let n=new Set;for(let r of this.#t.elements){let a=r.closest("fieldset[data-wizard-step]");if(!a||a===t||a.hasAttribute("data-wizard-hidden")||r instanceof HTMLInputElement&&(r.type==="hidden"||r.type==="password")||r instanceof HTMLButtonElement||r instanceof HTMLFieldSetElement||r instanceof HTMLOutputElement)continue;let o=$t(r);if(!o||n.has(o))continue;n.add(o);let c=this.#Y(o);if(!c)continue;let l=document.createElement("dt");l.textContent=this.#rt(r)||o;let u=document.createElement("dd");u.textContent=c,s.append(l,u)}}#rt(t){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){let r=this.#H(t);if(r)return r}let i=this.#nt(t);if(i)return i;let n=t.closest("form-field")?.querySelector("label");return n?n.textContent.trim():t.getAttribute("aria-label")||""}#at(t,i={}){this.#t.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}#ot(t,{validate:i=!0,focus:s=!0,push:n=!0}={}){let r=this.#O();if(t<0||t>=r.length||i&&t>this.#i&&!this.#Z())return!1;let a=s&&this.#J(),o=this.#i;return this.#i=t,this.#P({push:n}),a&&t!==o&&this.#U(),this.#at("wizard:step-change",{from:o,to:t}),this.#g(),!0}goTo(t){return this.#ot(t)}next(){return this.#M()?!1:this.#ot(this.#i+1)}prev(){return this.#i<=0?!1:this.#ot(this.#i-1)}reset(){this.#i=0,this.#W(),this.#A(),this.#at("wizard:reset")}get currentStep(){return this.#i}get totalSteps(){return this.#O().length}get form(){return this.#t}};typeof document<"u"&&x("form[data-wizard]",Ih)});var Rh={};T(Rh,{initMobileForms:()=>Ph});function Ph(e=document){return()=>{}}var qh=v(()=>{typeof document<"u"&&Ph()});var Bh={};T(Bh,{activateTrap:()=>Ge,deactivateTrap:()=>ys,initFocusTraps:()=>to});function to(e=document){e.querySelectorAll(vs).forEach(t=>Ge(t))}function Ge(e){if(ue.has(e))return;let t=document.activeElement,i=e.getAttribute("data-focus-trap")==="no-autofocus";function s(r){if(r.key!=="Tab")return;let a=Fh(e);if(!a.length)return;let o=a[0],c=a[a.length-1],l=document.activeElement;r.shiftKey&&l===o?(r.preventDefault(),c.focus()):!r.shiftKey&&l===c&&(r.preventDefault(),o.focus())}e.addEventListener("keydown",s);let n=()=>{e.removeEventListener("keydown",s)};ue.set(e,{cleanup:n,previousFocus:t}),i||requestAnimationFrame(()=>{let r=e.querySelector("[autofocus]");if(r)r.focus();else{let a=Fh(e);a.length&&a[0].focus()}})}function ys(e){let t=ue.get(e);t&&(t.cleanup(),ue.delete(e),t.previousFocus&&t.previousFocus.isConnected&&t.previousFocus.focus())}function Fh(e){return[...e.querySelectorAll(LA)].filter(t=>t.offsetParent!==null)}var vs,LA,ue,NA,Hh=v(()=>{vs="[data-focus-trap]",LA='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled])',ue=new WeakMap;document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>to()):to();NA=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(vs)&&Ge(s),s.querySelectorAll(vs).forEach(n=>Ge(n))}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;ue.has(s)&&ys(s),s.querySelectorAll(vs).forEach(n=>{ue.has(n)&&ys(n)})}if(t.type==="attributes"&&t.attributeName==="data-focus-trap"){let i=t.target;i.hasAttribute("data-focus-trap")?Ge(i):ys(i)}}});NA.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-focus-trap"]})});var _A={};var Vh,MA,zh=v(()=>{Vh=80,MA=40;document.querySelectorAll("header[data-scroll-hide]").forEach(e=>{let t=e.closest("main")??window,i=()=>t===window?window.scrollY:t.scrollTop,s=i(),n=0,r=e.hasAttribute("data-hidden"),a=()=>{e.removeAttribute("data-hidden"),r=!1},o=()=>{let c=i(),l=c-s;if(s=c,l!==0){if(l>0){n=0,!r&&c>Vh&&!e.matches(":focus-within")&&(e.setAttribute("data-hidden",""),r=!0);return}n-=l,r&&(n>=MA||c<=Vh)&&a()}};t.addEventListener("scroll",o,{passive:!0}),e.addEventListener("focusin",()=>{r&&a()})})});var Wh={};T(Wh,{initSpotlights:()=>Uh});function DA(e){if(e.__vbSpotlight)return;e.__vbSpotlight=!0;let t=s=>{let n=e.getBoundingClientRect();e.style.setProperty("--spotlight-x",((s.clientX-n.left)/n.width*100).toFixed(1)+"%"),e.style.setProperty("--spotlight-y",((s.clientY-n.top)/n.height*100).toFixed(1)+"%")},i=()=>{e.style.setProperty("--spotlight-x","50%"),e.style.setProperty("--spotlight-y","50%")};e.addEventListener("mousemove",t,{passive:!0}),e.addEventListener("mouseleave",i,{passive:!0})}function Uh(e=document){e.querySelectorAll?.("[data-spotlight]").forEach(DA)}var jh=v(()=>{Uh()});var Jh={};T(Jh,{getHotkeyActions:()=>Xh});function eo(e){let t=e.cloneNode(!0);return t.querySelectorAll('kbd, [aria-hidden="true"], .visually-hidden').forEach(i=>i.remove()),(t.textContent||"").replace(/\s+/g," ").trim()}function OA(e){let t=e.getAttribute("data-hotkey-label")||e.getAttribute("aria-label");if(t)return t.trim();let i=e.getAttribute("aria-labelledby");if(i){let n=i.split(/\s+/).map(r=>document.getElementById(r)?.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}let s=e.labels;if(s?.length)return eo(s[0]);if(e.tagName==="DETAILS"){let n=e.querySelector(":scope > summary");if(n)return eo(n)}return eo(e)||e.getAttribute("placeholder")||e.getAttribute("title")||""}function Yh(e){return!(!e.isConnected||(e.getAttribute("data-hotkey-action")==="toggle"?e.parentElement:e)?.closest("[hidden], [inert]")||e.disabled===!0||e.matches(":disabled"))}function PA(e){if(!e.hasAttribute("data-hotkey-scope"))return null;let t=e.getAttribute("data-hotkey-scope")?.trim();if(!t)return e;try{return e.closest(t)||document.querySelector(t)||e}catch{return e}}function io(e,t){document.dispatchEvent(new CustomEvent("vb:command-registry-change",{detail:{action:e,element:t}}))}function ws(e,{notify:t=!0}={}){let i=de.get(e);i&&(i.unbind(),de.delete(e),i.ownsAria&&e.removeAttribute("aria-keyshortcuts"),t&&io("remove",e))}function Gh(e){if(de.has(e)||e.tagName==="KBD"||!e.isConnected)return;let t=e.getAttribute("data-hotkey")?.trim();if(!t)return;let i=e.getAttribute("data-hotkey-action")||"click",s=Kh[i]||Kh.click,n=e.hasAttribute("data-hotkey-global"),r=PA(e),a=e.getAttribute("data-hotkey-group")||"Page Actions",o=Kt(t,()=>{if(!e.isConnected){ws(e);return}s(e)},{global:n,scope:r,enabled:()=>e.isConnected?Yh(e):(queueMicrotask(()=>ws(e)),!1)}),c=Ai(t),l=!e.hasAttribute("aria-keyshortcuts")||e.getAttribute("aria-keyshortcuts")===c;l&&e.setAttribute("aria-keyshortcuts",c),de.set(e,{combo:t,label:OA(e)||t,group:a,scoped:!!r,character:wi(t),unbind:o,ownsAria:l}),io("add",e)}function RA(){for(let e of[...de.keys()])e.isConnected||ws(e)}function Xh(){let e=new Map;for(let[t,i]of de){if(!Yh(t))continue;let s=e.get(i.group)||[];s.push({label:i.label,shortcut:i.combo,element:t,scoped:i.scoped,character:i.character}),e.set(i.group,s)}return e}var IA,$A,de,Kh,Zh=v(()=>{D();Ei();xe();IA="[data-hotkey]:not(kbd)",$A=["data-hotkey","data-hotkey-action","data-hotkey-label","data-hotkey-group","data-hotkey-global","data-hotkey-scope"],de=new Map,Kh={click(e){e.click()},focus(e){e.focus()},submit(e){let t=e.closest("form")||(e.tagName==="FORM"?e:null);t&&t.requestSubmit()},toggle(e){"open"in e?e.open=!e.open:e.hasAttribute("hidden")?e.removeAttribute("hidden"):e.setAttribute("hidden","")}};typeof window<"u"&&(window.__hotkeyActionRegistry={getHotkeyActions:Xh});x(IA,Gh);typeof document<"u"&&new MutationObserver(e=>{let t=!1,i=new Set;for(let s of e)s.type==="childList"&&s.removedNodes.length&&(t=!0),s.type==="attributes"&&i.add(s.target);t&&RA();for(let s of i)s.tagName!=="KBD"&&(ws(s,{notify:!1}),s.hasAttribute("data-hotkey")?Gh(s):io("remove",s))}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:$A})});var nf={};T(nf,{upgradeBlankTargets:()=>ef});function FA(e){return new Set((e.getAttribute("rel")||"").split(/\s+/).filter(Boolean))}function BA(e,t){e.setAttribute("rel",[...t].join(" "))}function tf(e){let t=document.documentElement?.dataset?.linkPrivacy==="strict",i=FA(e),s=[...i].some(r=>qA.has(r)),n=!1;s||(i.add("noopener"),n=!0),t&&!i.has("noreferrer")&&(i.add("noreferrer"),n=!0),n&&BA(e,i)}function ef(e=document){for(let t of e.querySelectorAll(Qh))tf(t)}function sf(e){let t=e.composedPath?.()[0]??e.target,i=t instanceof Element?t.closest(Qh):null;i&&tf(i)}var qA,Qh,rf=v(()=>{qA=new Set(["opener","noopener","noreferrer"]),Qh='a[href][target="_blank"]';ef(document);document.addEventListener("click",sf,!0);document.addEventListener("auxclick",sf,!0)});var uf={};T(uf,{buildSrcset:()=>of,initResponsiveImages:()=>lf});function of(e,t,i=document.baseURI){let s;try{s=new URL(e,i)}catch{return""}let n=s.pathname.lastIndexOf("/"),r=s.pathname.slice(n+1),a=r.lastIndexOf(".");if(a<=0)return"";let o=s.pathname.slice(0,n+1),c=r.slice(0,a),l=r.slice(a);return t.map(u=>{let d=new URL(s.href);return d.pathname=`${o}${c}-${u}${l}`,`${d.href} ${u}w`}).join(", ")}function UA(e){return e.split(",").map(t=>parseInt(t.trim(),10)).filter(t=>t>0)}function WA(e){cf?.unobserve(e)}function jA(e){if(!VA.test(e.getAttribute("srcset")||""))return!1;let t=(e.getAttribute("sizes")||"").trim();return!t||zA.test(t)?!0:/^auto\b/i.test(t)?e.loading!=="lazy":!1}function KA(e){let t=document.createElement("span");t.setAttribute("data-responsive-badge",""),t.setAttribute("aria-hidden","true");let i=()=>{let n=e.currentSrc||e.src;t.textContent=`${n.split("/").pop()} (${e.naturalWidth}px)`};e.addEventListener("load",i),e.complete&&i(),(e.parentElement instanceof HTMLPictureElement?e.parentElement:e).before(t)}function lf(e){if(af.has(e))return;af.add(e);let t=e.getAttribute("data-responsive")||"",i=e.getAttribute("src");if(t&&i){let n=UA(t),r=n.length?of(i,n):"",a=e.getAttribute("srcset");r?a||(e.srcset=r):n.length&&console.warn("[data-responsive] No file extension to insert widths before:",i)}e.hasAttribute("decoding")||(e.decoding="async"),e.addEventListener("error",()=>WA(e)),!(e.complete&&e.naturalWidth===0&&e.currentSrc)&&jA(e)&&(so.delete(e),cf?.observe(e)),e.hasAttribute("data-responsive-debug")&&KA(e)}var HA,af,so,VA,zA,cf,df=v(()=>{D();HA="img[data-responsive]",af=new WeakSet,so=new WeakMap,VA=/\s\d+w\s*(?:,|$)/,zA=/^\d+px$/;cf=typeof ResizeObserver=="function"?new ResizeObserver(e=>{for(let t of e){let i=t.target,s=Math.round(t.contentBoxSize?.[0]?.inlineSize??t.contentRect.width);s>(so.get(i)??0)&&(so.set(i,s),i.sizes=`${s}px`)}}):null;x(HA,lf)});var pf={};T(pf,{initFloatingLabels:()=>ff});function ff(e){if(hf.has(e))return;hf.add(e);let t=e.querySelector("input, textarea, select");t&&(t.hasAttribute("placeholder")||t.setAttribute("placeholder"," "),e.setAttribute("data-floating-label-ready",""))}var YA,hf,mf=v(()=>{D();YA="form-field[data-floating-label]",hf=new WeakSet;x(YA,ff)});var wf={};T(wf,{activate:()=>no,deactivate:()=>As});function no(e){if(e.getAttribute("aria-busy")==="true")return;e._vbLoadingOriginal=e.innerHTML,e._vbLoadingWidth=e.offsetWidth,e.style.minInlineSize=`${e._vbLoadingWidth}px`;let t=e.getAttribute("data-loading"),i=document.createElement("span");i.className="vb-btn-spinner",i.setAttribute("aria-hidden","true");let s=document.createElement("span");t?s.textContent=t:(s.className="visually-hidden",s.textContent=e.textContent.trim()),e.replaceChildren(i," ",s),e.setAttribute("aria-busy","true"),e.setAttribute("aria-disabled","true"),e.dataset.loadingActive="";let n=parseInt(e.getAttribute("data-loading-timeout"),10)||GA;e._vbLoadingTimer=setTimeout(()=>As(e),n)}function As(e){e.getAttribute("aria-busy")==="true"&&(clearTimeout(e._vbLoadingTimer),e._vbLoadingOriginal!=null&&(e.innerHTML=e._vbLoadingOriginal,delete e._vbLoadingOriginal),e.style.minInlineSize="",e.removeAttribute("aria-busy"),e.removeAttribute("aria-disabled"),delete e.dataset.loadingActive)}function vf(e){if(bf.has(e))return;bf.add(e),e.addEventListener("click",s=>{e.getAttribute("aria-busy")==="true"&&(s.preventDefault(),s.stopImmediatePropagation())},!0);let t=e.form;t&&e.type==="submit"&&new MutationObserver(()=>{!t.hasAttribute("data-submitting")&&e.getAttribute("aria-busy")==="true"&&As(e)}).observe(t,{attributes:!0,attributeFilter:["data-submitting"]}),new MutationObserver(()=>{e.hasAttribute("data-loading-active")?no(e):e.getAttribute("aria-busy")==="true"&&As(e)}).observe(e,{attributes:!0,attributeFilter:["data-loading-active"]})}function XA(e,t){return t||([...e.elements].find(i=>i instanceof HTMLButtonElement&&i.type==="submit"||i instanceof HTMLInputElement&&i.type==="submit")??null)}function yf(e,t){let i=XA(e,t);i instanceof HTMLButtonElement&&i.matches(gf)&&(vf(i),no(i))}var gf,bf,GA,Af=v(()=>{D();gf="button[data-loading]",bf=new WeakSet,GA=1e4;document.addEventListener("submit",e=>{let t=e.target;t.matches("[data-validate]")||yf(t,e.submitter)});document.addEventListener("vb:beforesubmit",e=>{if(e.defaultPrevented)return;let{form:t,submitter:i}=e.detail??{};t instanceof HTMLFormElement&&yf(t,i)});x(gf,vf)});var Sf={};T(Sf,{initEmailForm:()=>co});function JA(e){let t={};for(let i of e.elements){let s=i;s.name&&(s.type==="password"||s.type==="file"||(s.type==="checkbox"?t[s.name]=s.checked:s.type==="radio"?s.checked&&(t[s.name]=s.value):t[s.name]=s.value))}return t}async function ZA(e){let t=e.currentTarget,i=t.getAttribute("data-vb-email-form"),s=t.getAttribute("data-vb-email-to");if(!i||(e.preventDefault(),t.hasAttribute(ro)))return;t.setAttribute(ro,"");let n=t.querySelector('button[type="submit"], button:not([type])'),r=n?.textContent;n&&(n.disabled=!0,t.dataset.vbEmailLoadingLabel&&(n.textContent=t.dataset.vbEmailLoadingLabel)),t.dispatchEvent(new CustomEvent("vb-email-form:submitting",{bubbles:!0,composed:!0,detail:{template:i}}));let a=JA(t);try{let c=await new Y("email").post("/",{to:s||a.to||a.email,template:i,data:a});t.dispatchEvent(new CustomEvent("vb-email-form:success",{bubbles:!0,composed:!0,detail:{id:c?.id}})),t.hasAttribute("data-vb-email-no-reset")||t.reset(),Ef(t,"success")}catch(o){let c={error:o};o instanceof j&&(c.status=o.status,c.body=o.body),t.dispatchEvent(new CustomEvent("vb-email-form:error",{bubbles:!0,composed:!0,detail:c})),Ef(t,"error")}finally{t.removeAttribute(ro),n&&(n.disabled=!1,r&&(n.textContent=r))}}function Ef(e,t){let i=e.querySelector("[data-vb-email-status]");if(!i)return;let s=e.dataset.vbEmailSuccess||"Sent. Thank you.",n=e.dataset.vbEmailError||"Sorry, the message could not be sent. Try again.";i.dataset.state=t,i.textContent=t==="success"?s:n}function oo(e){e.hasAttribute("data-vb-email-form-init")||(e.setAttribute("data-vb-email-form-init",""),e.addEventListener("submit",ZA))}function co(e=document){for(let t of e.querySelectorAll(ao))oo(t)}var ao,ro,QA,xf=v(()=>{ee();ao="form[data-vb-email-form]",ro="data-vb-email-submitting";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>co()):co();QA=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(ao)&&oo(s),s.querySelectorAll?.(ao).forEach(n=>oo(n))}});QA.observe(document.documentElement,{childList:!0,subtree:!0})});var Mf={};T(Mf,{initNewsletterForm:()=>mo});function Lf(e){let t=(e.getAttribute("data-vb-newsletter-form")||"subscribe").trim();return tE.includes(t)?t:"subscribe"}function kf(e){let t=[...e.querySelectorAll('input[type="checkbox"][name="lists"]')].filter(s=>s.checked).map(s=>s.value);return t.length?t:(e.getAttribute("data-vb-newsletter-lists")||"").split(",").map(s=>s.trim()).filter(Boolean)}function Nf(e){return e.querySelector('input[name="email"]')}function uo(e,t,i){let s=e.querySelector("[data-vb-newsletter-status]");s&&(s.dataset.state=t,s.textContent=i)}function Cf(e,t,i){return i==="error"?e.dataset.vbNewsletterError||"Sorry, that did not work. Try again.":t==="unsubscribe"?e.dataset.vbNewsletterUnsubscribed||"Unsubscribed.":t==="preferences"?e.dataset.vbNewsletterSaved||"Preferences saved.":e.dataset.vbNewsletterSubscribed||"Subscribed. Check your inbox."}function Tf(e,t){let i=e.querySelector('button[type="submit"], button:not([type])');i&&(t?(i.dataset.vbNewsletterPrevLabel=i.textContent||"",i.disabled=!0,e.dataset.vbNewsletterLoadingLabel&&(i.textContent=e.dataset.vbNewsletterLoadingLabel)):(i.disabled=!1,i.dataset.vbNewsletterPrevLabel!=null&&(i.textContent=i.dataset.vbNewsletterPrevLabel,delete i.dataset.vbNewsletterPrevLabel)))}async function Es(e,t,i){let s=new Y("newsletter");if(e==="POST")return s.post(t,i);if(e==="GET")return s.get(t,i);throw new Error(`unsupported method ${e}`)}async function eE(e,t,i,s){if(!s.length&&t!=="preferences")throw new Error("No lists selected.");return Es("POST",t==="unsubscribe"?"/unsubscribe":"/subscribe",{email:i,lists:s})}async function iE(e,t){if(t)try{let i=await Es("GET","/preferences",{email:t});if(!i)return;let s=new Set(i.subscriptions||[]);for(let n of e.querySelectorAll('input[type="checkbox"][name="lists"]')){let r=n;r.checked=s.has(r.value)}e.dispatchEvent(new CustomEvent("vb-newsletter-form:preferences",{bubbles:!0,composed:!0,detail:{email:t,subscriptions:i.subscriptions,available:i.available}}))}catch(i){if(i instanceof j&&i.status===404)return;console.warn("[newsletter-form] preferences fetch failed",i)}}function fo(e){return new Set([...e.querySelectorAll('input[type="checkbox"][name="lists"]')].filter(t=>t.checked).map(t=>t.value))}async function sE(e,t){let i=e.__vbNewsletterSnapshot??new Set,s=fo(e),n=[...s].filter(o=>!i.has(o)),r=[...i].filter(o=>!s.has(o)),a={};return n.length&&(a.subscribe=await Es("POST","/subscribe",{email:t,lists:n})),r.length&&(a.unsubscribe=await Es("POST","/unsubscribe",{email:t,lists:r})),e.__vbNewsletterSnapshot=fo(e),a}async function nE(e){let t=e.currentTarget,i=Lf(t),s=Nf(t)?.value?.trim();if(e.preventDefault(),!s){uo(t,"error","Email is required.");return}if(!t.hasAttribute(lo)){t.setAttribute(lo,""),Tf(t,!0),t.dispatchEvent(new CustomEvent("vb-newsletter-form:submitting",{bubbles:!0,composed:!0,detail:{mode:i}}));try{let n;if(i==="preferences")n=await sE(t,s);else{let r=kf(t);n=await eE(t,i,s,r)}t.dispatchEvent(new CustomEvent("vb-newsletter-form:success",{bubbles:!0,composed:!0,detail:{mode:i,lists:kf(t),response:n}})),uo(t,"success",Cf(t,i,"success")),i==="subscribe"&&!t.hasAttribute("data-vb-newsletter-no-reset")&&t.reset()}catch(n){let r={mode:i,error:n};n instanceof j&&(r.status=n.status,r.body=n.body),t.dispatchEvent(new CustomEvent("vb-newsletter-form:error",{bubbles:!0,composed:!0,detail:r}));let a=n instanceof Error&&n.message==="No lists selected."?"Pick at least one list.":Cf(t,i,"error");uo(t,"error",a)}finally{t.removeAttribute(lo),Tf(t,!1)}}}function po(e){if(!e.hasAttribute("data-vb-newsletter-form-init")&&(e.setAttribute("data-vb-newsletter-form-init",""),e.addEventListener("submit",nE),Lf(e)==="preferences")){let t=Nf(e);if(t){let i=async()=>{let s=t.value.trim();s&&(await iE(e,s),e.__vbNewsletterSnapshot=fo(e))};t.addEventListener("change",i),t.addEventListener("blur",i)}}}function mo(e=document){for(let t of e.querySelectorAll(ho))po(t)}var ho,lo,tE,rE,_f=v(()=>{ee();ho="form[data-vb-newsletter-form]",lo="data-vb-newsletter-submitting",tE=["subscribe","unsubscribe","preferences"];document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>mo()):mo();rE=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches?.(ho)&&po(s),s.querySelectorAll?.(ho).forEach(n=>po(n))}});rE.observe(document.documentElement,{childList:!0,subtree:!0})});function aE(e){return[...e.querySelectorAll("li")].filter(t=>t.querySelector("a[href]"))}function Df(e){return e.querySelector("li[data-audio-active]")}function bo(e,t,i){let s=i.querySelector("a[href]");return s?(t.querySelectorAll("li[data-audio-active]").forEach(n=>{n!==i&&n.removeAttribute("data-audio-active")}),i.setAttribute("data-audio-active",""),e.src=s.href,e.play()?.catch(()=>{}),{src:s.href,title:s.textContent?.trim()??""}):null}function If(e){let t=Df(e);return t?.setAttribute("data-audio-played",""),t}function $f(e,{loop:t=!1}={}){let i=aE(e);if(!i.length)return null;let s=Df(e),n=s?i.indexOf(s):-1;return n+1<i.length?i[n+1]:t?i[0]:null}var Of=v(()=>{});var Pf={};T(Pf,{initAllPlaylists:()=>yo});function vo(e){if(e.hasAttribute("data-audio-playlist-init"))return;let t=e.querySelector("audio");if(!t)return;let i=e.querySelector(".track-list");i&&(e.setAttribute("data-audio-playlist-init",""),t.addEventListener("ended",()=>{If(i);let s=$f(i);s&&bo(t,i,s)}),i.addEventListener("click",s=>{let n=s.target.closest("a[href]"),r=n?.closest("li");!n||!r||(s.preventDefault(),bo(t,i,r))}))}function yo(e=document){e.querySelectorAll(go).forEach(t=>vo(t))}var go,oE,Rf=v(()=>{Of();go="[data-audio-playlist]";document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>yo()):yo();oE=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(go)&&vo(s),s.querySelectorAll(go).forEach(n=>vo(n))}});oE.observe(document.documentElement,{childList:!0,subtree:!0})});function cE(e,t){let i=Number(e);return!Number.isFinite(i)||t<=0?1:Math.min(Math.max(1,Math.floor(i)),t)}function lE({page:e,size:t}){let i=(e-1)*t;return{start:i,end:i+t}}function uE(e,t,i=2){if(t<=0)return[];if(t===1)return[1];let s=Math.max(2,e-i),n=Math.min(t-1,e+i),r=[1];s>2&&r.push("\u2026");for(let a=s;a<=n;a++)r.push(a);return n<t-1&&r.push("\u2026"),r.push(t),r}function wo({total:e,size:t,page:i,window:s=2}){if(t<=0)return{page:(e>0,1),totalPages:e>0?1:0,start:0,end:e,pageNumbers:e>0?[1]:[]};let n=e>0?Math.ceil(e/t):0,r=cE(i,n),a=lE({page:r,size:t}),o=Math.min(a.end,e);return{page:r,totalPages:n,start:a.start,end:o,pageNumbers:uE(r,n,s)}}var qf=v(()=>{});var Uf={};T(Uf,{initDataPaged:()=>Hf});function Hf(e){if(Ff.has(e))return;let t={host:e,nav:{before:null,after:null},sentinel:null,intersect:null,children:[],childObserver:null,visible:0};Ff.set(e,t);let i=e.dataset.pagedUrl;if(i){let n=new URL(window.location.href).searchParams.get(i);n&&!e.hasAttribute("data-paged-page")&&e.setAttribute("data-paged-page",n),window.addEventListener("popstate",()=>{if(!e.isConnected)return;let r=new URL(window.location.href);e.setAttribute("data-paged-page",r.searchParams.get(i)||"1"),Xe(t)})}t.childObserver=new MutationObserver(()=>Xe(t)),t.childObserver.observe(e,{childList:!0}),e.addEventListener("paged:goto",s=>zf(t,s.detail?.page??1)),e.addEventListener("paged:loadmore",()=>So(t)),Xe(t)}function Eo(e){return{size:parseInt(e.dataset.pagedSize||"10",10)||0,page:parseInt(e.dataset.pagedPage||"1",10)||1,style:e.dataset.pagedStyle||"numbered",window:parseInt(e.dataset.pagedWindow||"2",10)||2,controls:e.dataset.pagedControls||"after",urlParam:e.dataset.pagedUrl||""}}function Vf(e){if(e.tagName==="TABLE"){let t=e.querySelector(":scope > tbody");if(t)return Array.from(t.children)}return Array.from(e.children).filter(t=>!t.matches("nav[data-paged-nav], div[data-paged-sentinel]"))}function Xe(e){let{host:t}=e,i=Eo(t),s=Vf(t);e.children=s;let n=wo({total:s.length,size:i.size,page:i.page,window:i.window}),r=i.style==="load-more"||i.style==="infinite",a;if(r){e.visible===0&&(e.visible=i.size||s.length);let o=Math.min(e.visible,s.length);s.forEach((c,l)=>{c.hidden=l>=o}),a=o}else s.forEach((o,c)=>{o.hidden=c<n.start||c>=n.end}),a=Math.max(0,n.end-n.start);hE(e,n,i,r),t.dispatchEvent(new CustomEvent("paged:change",{bubbles:!0,detail:{page:n.page,size:i.size,total:s.length,totalPages:n.totalPages,visible:a,style:i.style}}))}function Ao(e){let t=new Intl.NumberFormat(I(e)),i=(s,n)=>q(e,s,n);return{navLabel:i("nav","Pagination"),prevLabel:i("prev","Previous"),nextLabel:i("next","Next"),pageLabel:s=>Ct(i("page","Page {page}"),{page:t.format(s)}),statusLabel:(s,n)=>Ct(i("status","Page {page} of {total}"),{page:t.format(s),total:t.format(n)}),loadMoreLabel:s=>Ct(i("load-more","Load more ({n})"),{n:t.format(s)}),noMoreLabel:i("no-more","No more")}}function hE(e,t,i,s){e.sentinel?.remove(),e.sentinel=null,e.intersect?.disconnect(),e.intersect=null;let n=null;if(i.controls!=="none"&&(i.style==="load-more"?n=pn({style:"load-more",page:t.page,totalPages:t.totalPages,pageNumbers:t.pageNumbers,total:e.children.length,visible:e.visible,...Ao(e.host)}):!s&&t.totalPages>1&&(n=pn({style:i.style,page:t.page,totalPages:t.totalPages,pageNumbers:t.pageNumbers,total:e.children.length,visible:e.visible,...Ao(e.host)}))),i.style==="infinite"){let r=document.createElement("div");r.setAttribute("data-paged-sentinel",""),r.setAttribute("aria-hidden","true"),r.style.cssText="block-size:1px;inline-size:100%",e.host.parentNode?.insertBefore(r,e.host.nextSibling),e.sentinel=r,e.intersect=new IntersectionObserver(a=>{for(let o of a)o.isIntersecting&&So(e)},{rootMargin:"200px"}),e.intersect.observe(r)}fE(e,n,i)}function fE(e,t,i){let{host:s}=e,n={onNavigate:l=>zf(e,l),onLoadMore:()=>So(e)},r=!!t&&(i.controls==="before"||i.controls==="both"),a=!!t&&(i.controls==="after"||i.controls==="both"),o=null;r&&(o=a?t.cloneNode(!0):t,a&&o.querySelector("[data-paged-status]")?.removeAttribute("aria-live"),bn(o,n));let c=a?t:null;c&&bn(c,n),e.nav.before=Bf(e.nav.before,o,l=>s.parentNode?.insertBefore(l,s)),e.nav.after=Bf(e.nav.after,c,l=>s.parentNode?.insertBefore(l,s.nextSibling))}function Bf(e,t,i){return e?.isConnected&&t?(Nc(e,t),t):(e?.remove(),t&&i(t),t)}function zf(e,t){let{host:i}=e,s=Eo(i),n=Vf(i),r=wo({total:n.length,size:s.size,page:t,window:s.window});if(r.page!==s.page){if(i.setAttribute("data-paged-page",String(r.page)),s.urlParam){let a=new URL(window.location.href);a.searchParams.set(s.urlParam,String(r.page)),window.history.pushState({},"",a)}Xe(e),s.style!=="prev-next"&&W(Ao(i).statusLabel(r.page,r.totalPages))}}function So(e){let i=Eo(e.host).size||10,s=e.visible;if(e.visible=Math.min(e.visible+i,e.children.length),Xe(e),e.visible>s){let n=new Intl.NumberFormat(I(e.host));W(q(e.host,"showing","Showing {visible} of {total}",{visible:n.format(e.visible),total:n.format(e.children.length)}))}}var dE,Ff,Wf=v(()=>{D();qf();gn();lt();G();dE="[data-paged]",Ff=new WeakMap;x(dE,Hf)});function he(e){if(!e)return null;let t=String(e);return t.startsWith("-")?{key:t.slice(1),direction:"desc"}:t.startsWith("+")?{key:t.slice(1),direction:"asc"}:{key:t,direction:"asc"}}function pE(e,t,i){let s=t==="desc"?-1:1,n=e==="text"||!Yf[e]?mE(i):Yf[e];return(r,a)=>{let o=Xf(r),c=Xf(a);return o&&c?0:o?1:c?-1:s*n(r,a)}}function Jf(e,t,i,s,n){let r=pE(i,s,n),a=Array.from({length:e.length},(o,c)=>c);return a.sort((o,c)=>{let l=r(t(e[o]),t(e[c]));return l===0?o-c:l}),a}function Zf(e){return e==="asc"?"desc":e==="desc"?"none":"asc"}function mE(e){let t=e||"",i=jf.get(t);if(!i){try{i=new Intl.Collator(e||void 0,{sensitivity:"base",numeric:!0})}catch{i=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0})}jf.set(t,i)}return(s,n)=>i.compare(String(s),String(n))}function Kf(e){if(typeof e=="number")return e;let t=String(e??"").trim().replace(/[\u2212\u2012\u2013]/g,"-"),i=/^\(.*\)$/.test(t)||/^-|-$/.test(t.replace(/[^\d.,-]/g,""));if(t=t.replace(/[^\d.,]/g,""),!t)return NaN;let s=t.lastIndexOf(","),n=t.lastIndexOf(".");if(s>-1&&n>-1){let a=s>n?",":".",o=a===","?".":",";t=t.split(o).join("").replace(a,".")}else if(s>-1){let a=t.split(",");t=a.length>2||a.length===2&&a[1].length===3?a.join(""):a.join(".")}else(t.match(/\./g)||[]).length>1&&(t=t.split(".").join(""));let r=Number(t);return i?-r:r}function Gf(e){return e instanceof Date?e.getTime():Date.parse(String(e))}function Xf(e){return e==null||e===""}var jf,Yf,Qf=v(()=>{jf=new Map;Yf={number(e,t){let i=Kf(e),s=Kf(t);return Number.isNaN(i)&&Number.isNaN(s)?0:Number.isNaN(i)?1:Number.isNaN(s)||i<s?-1:i>s?1:0},date(e,t){let i=Gf(e),s=Gf(t);return Number.isNaN(i)&&Number.isNaN(s)?0:Number.isNaN(i)?1:Number.isNaN(s)||i<s?-1:i>s?1:0}}});var np={};T(np,{initDataSortable:()=>ip});function ip(e){if(Ss.has(e))return;Ss.add(e),e.tagName==="TABLE"&&gE(e);let i=e.dataset.sortableDefault;if(i&&!e.dataset.sortBy){let s=he(i);s&&Rt(e,s.key,s.direction)}if(!e.dataset.sortBy)for(let s of ko()){if(s.tagName!=="SELECT"||Je(s)!==e)continue;let n=he(s.value);if(n){Rt(e,n.key,n.direction);break}}xs(e)}function gE(e){e.querySelectorAll(":scope > thead th[data-sort]").forEach(i=>{i.hasAttribute("aria-sort")||i.setAttribute("aria-sort","none"),vE(i),i.addEventListener("click",s=>{let r=s.target.closest?.("a, input, select, textarea, button:not([data-sort-button])");if(r&&i.contains(r))return;let a=i.dataset.sort;if(!a)return;let o=e.dataset.sortBy===a?e.dataset.sortDirection:"none",c=Zf(o||"none");c==="none"?Rt(e,"","none"):Rt(e,a,c,i.dataset.sortType)})})}function vE(e){let t=e.querySelector(":scope > button[data-sort-button]");if(t)return t;let i=document.createElement("button");return i.type="button",i.setAttribute("data-sort-button",""),i.append(...e.childNodes),e.appendChild(i),i}function ko(){return document.querySelectorAll("[data-sort-target]")}function Je(e){let t=e.getAttribute("data-sort-target");if(!t)return null;let i=null;try{i=document.querySelector(t)}catch{return null}return i?.matches("[data-sortable]")?i:null}function tp(e,t){let i=Je(e);if(!i)return;let s=he(t);if(!s){Rt(i,"","none");return}if(Rt(i,s.key,s.direction),i.tagName==="TABLE")return;let n=e,r=e.tagName==="SELECT"?n.selectedOptions[0]?.textContent||t:e.getAttribute("aria-label")||e.textContent||t,a=new Intl.NumberFormat(I(i)).format(sp(i).length);W(q(i,"sorted","Sorted: {sort}. {count} items",{sort:r.trim(),count:a}))}function xs(e){let t=e.dataset.sortBy?(e.dataset.sortDirection==="desc"?"-":"")+e.dataset.sortBy:"";for(let i of ko()){if(i.tagName!=="BUTTON"||Je(i)!==e)continue;let s=he(i.getAttribute("data-sort-by")||""),n=s?(s.direction==="desc"?"-":"")+s.key:"";i.setAttribute("aria-pressed",String(!!n&&n===t))}}function xo(){for(let e of ko())if(!Ss.has(e)&&e.getAttribute("data-sort-target"))if(Ss.add(e),e.tagName==="SELECT"){e.addEventListener("change",()=>tp(e,e.value));let t=Je(e),i=he(e.value);t&&i&&!t.dataset.sortBy&&Rt(t,i.key,i.direction)}else{e.addEventListener("click",()=>tp(e,e.getAttribute("data-sort-by")||""));let t=Je(e);t&&xs(t)}}function yE(e,t,i,s={}){if(s.isTable){let r=s.colIndex,a=e.children[r];if(!a)return"";let o=a.dataset.sortValue??a.dataset.value;if(o!=null)return o;if(i==="date"){let c=a.querySelector("time[datetime]");if(c)return c.getAttribute("datetime")||""}return(a.textContent||"").trim()}let n=e.dataset[`sort${wE(t)}`];return n??(e.dataset.value!=null?e.dataset.value:(e.textContent||"").trim())}function wE(e){return e?e[0].toUpperCase()+e.slice(1):""}function sp(e){if(e.tagName==="TABLE"){let t=e.querySelector(":scope > tbody");return t?Array.from(t.children):[]}return Array.from(e.children)}function AE(e,t){return Array.from(e.querySelectorAll(":scope > thead th")).findIndex(s=>s.dataset.sort===t)}function Rt(e,t,i,s){let n=e.tagName==="TABLE",r=sp(e);if(i==="none"||!t){e.removeAttribute("data-sort-by"),e.dataset.sortDirection="none",n?ep(e,"","none"):xs(e),e.dispatchEvent(new CustomEvent("sort:change",{bubbles:!0,detail:{key:"",direction:"none",total:r.length}}));return}let a=EE(e,t,s),o=n?AE(e,t):-1,c=Jf(r,u=>yE(u,t,a,{isTable:n,colIndex:o}),a,i,I(e)),l=n?e.querySelector(":scope > tbody"):e;if(l){for(let u of c)l.appendChild(r[u]);e.dataset.sortBy=t,e.dataset.sortDirection=i,n?ep(e,t,i):xs(e),e.hasAttribute("data-paged")&&e.dispatchEvent(new CustomEvent("paged:goto",{detail:{page:1}})),e.dispatchEvent(new CustomEvent("sort:change",{bubbles:!0,detail:{key:t,direction:i,total:r.length}}))}}function EE(e,t,i){if(i==="text"||i==="number"||i==="date")return i;if(e.tagName==="TABLE"){let r=e.querySelector(`:scope > thead th[data-sort="${SE(t)}"]`)?.dataset.sortType;if(r==="text"||r==="number"||r==="date")return r}let s=e.dataset.sortType;return s==="text"||s==="number"||s==="date"?s:"text"}function SE(e){return String(e).replace(/["\\]/g,"\\$&")}function ep(e,t,i){e.querySelectorAll(":scope > thead th[data-sort]").forEach(n=>{n.dataset.sort===t&&i!=="none"?n.setAttribute("aria-sort",i==="asc"?"ascending":"descending"):n.setAttribute("aria-sort","none")})}var bE,Ss,rp=v(()=>{D();Qf();G();lt();bE="[data-sortable]",Ss=new WeakSet;x(bE,ip);typeof document<"u"&&(document.readyState!=="loading"?xo():document.addEventListener("DOMContentLoaded",xo),x("[data-sort-target]",()=>xo()))});function ap(e){if(!e)return null;let t=String(e).trim();if(!t)return null;if(t.startsWith("class:")){let i=t.slice(6).trim();return i?{kind:"class",name:i}:null}return{kind:"attr",name:t}}function Ze(e){return xE.has(String(e).toLowerCase())}function Co(e){return kE.has(String(e).toLowerCase())}function op(e,t,i){if(e.kind==="class")return t?{present:!1}:{present:!0};if(Ze(e.name))return t?{present:!1}:{present:!0,value:""};if(Co(e.name))return{present:!0,value:t==="true"||t===!0?"false":"true"};let s=i.on??"true",n=i.off??"false";return{present:!0,value:t===s?n:s}}var xE,kE,cp=v(()=>{xE=new Set(["hidden","disabled","open","checked","readonly","required","multiple","selected","autofocus","autoplay","controls","defer","inert","loop","muted","nomodule","novalidate","playsinline","reversed"]),kE=new Set(["aria-pressed","aria-expanded","aria-selected","aria-checked"])});var hp={};T(hp,{initDataToggle:()=>dp});function dp(e){if(lp.has(e))return;lp.add(e);let t=ap(e.dataset.toggle);if(!t)return;let i=e.dataset.toggleTarget,s=i?document.querySelector(i):e;if(!s)return;let n=s!==e;n&&s.id&&e.setAttribute("aria-controls",s.id),t.kind==="attr"&&Ze(t.name)&&!n&&e.setAttribute("aria-pressed",String(s.hasAttribute(t.name))),up(e,s,t),e.addEventListener("click",r=>{r.preventDefault();let a={on:e.dataset.toggleOn,off:e.dataset.toggleOff},o;t.kind==="class"?o=s.classList.contains(t.name):Ze(t.name)?o=s.hasAttribute(t.name):o=s.getAttribute(t.name);let c=op(t,o,a);t.kind==="class"?c.present?s.classList.add(t.name):s.classList.remove(t.name):c.present?s.setAttribute(t.name,c.value??""):s.removeAttribute(t.name),!n&&Ze(t.name)&&e.setAttribute("aria-pressed",String(c.present)),!n&&Co(t.name),up(e,s,t,c),e.dispatchEvent(new CustomEvent("toggle:change",{bubbles:!0,detail:{spec:t.kind==="class"?`class:${t.name}`:t.name,value:c.value,present:c.present,target:s}}))})}function up(e,t,i,s){if(t===e)return;let n=t.hasAttribute("popover"),r=i.kind==="attr"&&i.name.startsWith("data-")&&(e.dataset.toggleOn||"").toLowerCase()==="open";if(!n&&!r)return;let a;s?a=n?s.present:s.value==="open":a=n?t.matches(":popover-open"):t.getAttribute(i.name)==="open",e.setAttribute("aria-expanded",String(a))}var CE,lp,fp=v(()=>{D();cp();CE="[data-toggle]",lp=new WeakSet;x(CE,dp)});var bp={};T(bp,{decorateCardTable:()=>To,initTableCard:()=>mp});function Qe(e,t){e.hasAttribute("role")||e.setAttribute("role",t)}function LE(e){let t=e.tHead?.rows;if(!t?.length)return[];let i=[];for(let s of t[t.length-1].cells){let n=(s.textContent||"").replace(/\s+/g," ").trim();for(let r=0;r<s.colSpan;r++)i.push(n)}return i}function To(e){Qe(e,"table");let t=LE(e);for(let i of[e.tHead,...e.tBodies,e.tFoot]){if(!i)continue;Qe(i,"rowgroup");let s=i===e.tHead;for(let n of i.rows){Qe(n,"row");let r=0;for(let a of n.cells){if(a.tagName==="TH"){let o=a.getAttribute("scope");Qe(a,s||o==="col"||o==="colgroup"?"columnheader":"rowheader")}else Qe(a,"cell");!s&&!a.hasAttribute("data-label")&&t[r]&&a.setAttribute("data-label",t[r]),r+=a.colSpan}}}}function mp(e){let t=e;pp.has(t)||(pp.add(t),To(t),new MutationObserver(()=>To(t)).observe(t,{childList:!0,subtree:!0}))}var TE,pp,gp=v(()=>{D();TE='table[data-responsive="card"]',pp=new WeakSet;x(TE,mp)});var wS={};function bS(e,t,i){return e<=t?"good":e<=i?"needs-improvement":"poor"}function Cs(e,t,i,s,n={}){k.track(e,{value:Math.round(t*1e3)/1e3,rating:bS(t,i,s),...n})}function gS(){let e=null,t=new PerformanceObserver(s=>{let n=s.getEntries();e=n[n.length-1]});try{t.observe({type:"largest-contentful-paint",buffered:!0})}catch{return}let i=()=>{e&&(Cs("perf.lcp",e.startTime,2500,4e3),e=null)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function vS(){let e=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries()){let r=n;r.hadRecentInput||(e+=r.value)}});try{t.observe({type:"layout-shift",buffered:!0})}catch{return}let i=()=>{Cs("perf.cls",e,.1,.25),e=0};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function yS(){let e=0,t=new PerformanceObserver(s=>{for(let n of s.getEntries())n.duration>e&&(e=n.duration)});try{t.observe({type:"event",durationThreshold:40,buffered:!0})}catch{return}let i=()=>{e!==0&&(Cs("perf.inp",e,200,500),e=0)};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&i()}),window.addEventListener("pagehide",i)}function Hp(){try{let[e]=performance.getEntriesByType("navigation");if(!e||!e.responseStart)return;Cs("perf.ttfb",e.responseStart,800,1800,{navigationType:e.type})}catch{}}var Vp=v(()=>{wt();typeof window<"u"&&"PerformanceObserver"in window&&(gS(),vS(),yS(),document.readyState==="complete"?Hp():window.addEventListener("load",Hp,{once:!0}))});var ES={};function AS(e){if(typeof e!="string"||!e)return"";try{let t=new URL(e,location.origin);return t.pathname.split("/").pop()||t.pathname}catch{return e.split("/").pop()??e}}function zp(e){return typeof e!="string"?String(e??"").slice(0,qo):e.length>qo?e.slice(0,qo):e}var qo,Up=v(()=>{wt();qo=200;typeof window<"u"&&(window.addEventListener("error",e=>{e.target&&e.target!==window||k.track("error.js_runtime",{message:zp(e.message),source:AS(e.filename),line:e.lineno??0,col:e.colno??0})}),window.addEventListener("unhandledrejection",e=>{let t=e.reason,i=t instanceof Error?t.message:typeof t=="string"?t:JSON.stringify(t??null);k.track("error.unhandled_promise",{message:zp(i)})}))});var xS={};function Gp(){let e=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(e/t*100)))}function SS(){clearTimeout(jp),jp=setTimeout(()=>{let e=Gp();e>Fo&&(Fo=e)},500)}function Kp(){si==null&&(si=Date.now())}function Xp(){si!=null&&(Bo+=Date.now()-si,si=null)}function Yp(){if(Wp)return;Wp=!0,Xp();let e=Math.max(Fo,Gp());e>0&&k.track("__scroll",{depth:e}),Bo>0&&k.track("__attention",{ms:Bo})}var Fo,si,Bo,Wp,jp,Jp=v(()=>{wt();Fo=0,si=null,Bo=0,Wp=!1,jp=null;typeof window<"u"&&(window.addEventListener("scroll",SS,{passive:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?Kp():(Xp(),Yp())}),window.addEventListener("pagehide",Yp),document.visibilityState==="visible"&&Kp())});ye();var Wo=[{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":"58%","--chroma-primary":.12}},{id:"sunset",name:"Sunset",swatchBg:"#ea580c",seeds:{"--hue-primary":25,"--hue-secondary":0,"--hue-accent":280,"--lightness-primary":"57%","--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":"57%","--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":"56%","--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}}],jo=[{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"}],_s=[{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:"journal",name:"Journal",icon:"notebook-pen",character:"Dot-grid bullet journal",swatchBg:"#f3ecdc",swatchFg:"#27313f",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"}],Ds=[{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"}],Ko=[{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 TS=[..._s,...Ds],LS=[...jo,..._s,...Ds,...Ko],St=e=>_s.filter(t=>t.category===e),Yo=[{label:"Style",themes:jo,tier:"core"},{label:"Design",themes:St("Design"),tier:"showcase"},{label:"Content",themes:St("Content"),tier:"showcase"},{label:"Modern",themes:St("Modern"),tier:"showcase"},{label:"Creative",themes:St("Creative"),tier:"showcase"},{label:"Aesthetic",themes:St("Aesthetic"),tier:"showcase"},{label:"Signature",themes:St("Signature"),tier:"showcase"},{label:"OS Styles",themes:St("OS Styles"),tier:"showcase"},{label:"Packs",themes:Ko,tier:"showcase"},{label:"More Themes",themes:Ds,tier:"community"}];it();var ai="theme",oi="current",ic=2,li={accent:"data-accent",borderStyle:"data-border-style",iconSet:"data-icon-set",fluid:"data-fluid",backdrop:"data-backdrop",backdropChrome:"data-backdrop-chrome"},Z={mode:"auto",brand:"default",accent:null,borderStyle:null,iconSet:null,fluid:null,backdrop:null,backdropChrome:null,pageBgType:"",pageBgColor:"",pageBgGradStart:"",pageBgGradEnd:"",pageBgGradDir:""};function Jo(e){if(!e||typeof e!="object")return null;let t={...e};if(!(Number(t.v)>=ic))for(let i of Object.keys(li))(t[i]===""||i==="accent"&&t[i]==="default")&&(t[i]=null);return t}function ht(e,t){return e??t??""}var $s=null;function st(){if($s)return $s;let e=document.documentElement,t=window.__vbAuthoredRoot,i=n=>{if(t&&typeof t=="object"){if(n in t)return t[n]??null;if(n==="data-mode")return null}return e.getAttribute(n)},s={theme:i("data-theme"),mode:i("data-mode"),themeSource:i("data-theme-source")};for(let[n,r]of Object.entries(li))s[n]=i(r);return $s=s,s}function lm(e){try{let t=document.createElement("canvas");t.width=t.height=1;let i=t.getContext("2d",{willReadFrequently:!0});if(!i)return e;i.fillStyle=e,i.fillRect(0,0,1,1);let[s,n,r]=i.getImageData(0,0,1,1).data;return"#"+[s,n,r].map(a=>a.toString(16).padStart(2,"0")).join("")}catch{return e}}function ci(e,t){let i=(e||"").split(/\s+/).filter(Boolean);return t==="site"?i[0]&&!i[0].startsWith("a11y-")?i[0]:"":i.find(s=>!s.startsWith("a11y-"))||""}function um(e,t,i,s=!1){let n=(e||"").split(/\s+/).filter(r=>r&&r!==t&&r!==i);return i!=="default"?[i,...n].join(" "):(s&&n.length?["default",...n]:n).join(" ")}function Zo(e){return e==="light"||e==="dark"?e:null}function Qo(e,t,i){return t||(e==="light"||e==="dark"?e:i?"dark":"light")}function tc(e,t,i){let s=ci(t,i);return i==="site"&&s?s:e?.brand&&e.brand!==Z.brand?e.brand:s||Z.brand}var ec=["--hue-primary","--hue-secondary","--hue-accent","--lightness-primary","--chroma-primary","--lightness-secondary","--chroma-secondary","--lightness-accent","--chroma-accent"],R=null,we="",Os="",Bt=null,xt=null,_={_initPromise:null,async init(){return this._initPromise?this._initPromise:(this._initPromise=(async()=>{let e=Jo(await S.get(ai,oi));R=e?{...Z,...e}:{...Z},xt=st().themeSource??null,we=ci(st().theme??"",xt),Os=ci(document.documentElement.dataset.theme||"",xt),Bt=Zo(st().mode),R.brand=tc(e,st().theme??"",xt);try{await ve(R.brand)}catch{R.brand!==we&&(R.brand=we||Z.brand)}return this.apply(R),this._watchSystemPreference(),this._watchRootAttributes(),this._watchCrossDocumentStorage(),R})(),this._initPromise)},_watchCrossDocumentStorage(){typeof window>"u"||window.addEventListener("storage",async e=>{if(e.key!==`vb:${ai}:${oi}`||!e.newValue)return;let t;try{let s=JSON.parse(e.newValue);t=Jo(s?.data)}catch{return}if(!t)return;let i={...Z,...R,...t};if(i.brand=tc(t,st().theme??"",xt),i.brand&&i.brand!==R?.brand)try{await ve(i.brand)}catch{i.brand=we||Z.brand}R=i,this.apply(R||{})})},load(){return R?{...R}:{...Z}},save(e){let t={...R??Z,...e,v:ic};return R=t,S.set(ai,oi,t).catch(()=>{}),t},apply({mode:e="auto",brand:t="default",borderStyle:i=null,iconSet:s=null,fluid:n=null,backdrop:r=null,backdropChrome:a=null,pageBgType:o="",pageBgColor:c="",pageBgGradStart:l="",pageBgGradEnd:u="",pageBgGradDir:d=""}={}){let h=document.documentElement,f=st(),p=Qo(e,Bt,window.matchMedia("(prefers-color-scheme: dark)").matches);h.dataset.mode=p;let m=xt==="site",b=um(h.dataset.theme||"",Os,t,m);b?h.dataset.theme=b:delete h.dataset.theme,Os=t==="default"&&!b.startsWith("default")?"":t;let g=i||f.borderStyle||this._readCSSHint("--theme-border-style");this._setRootAttr("data-border-style",g&&g!=="clean"?g:"");let A=s||f.iconSet||this._readCSSHint("--theme-icon-set");this._setRootAttr("data-icon-set",A&&A!=="lucide"?A:"");let y=ht(n,f.fluid);this._setRootAttr("data-fluid",y,!0);let O=ht(r,f.backdrop);this._setRootAttr("data-backdrop",O,!0);let M=ht(a,f.backdropChrome);if(this._setRootAttr("data-backdrop-chrome",M&&M!=="card"?M:""),o==="color"&&c)h.style.setProperty("--page-bg-color",c),h.style.removeProperty("--page-bg-gradient");else if(o==="gradient"&&l&&u){let L=d||"to bottom";h.style.setProperty("--page-bg-gradient",`linear-gradient(${L}, ${l}, ${u})`),h.style.removeProperty("--page-bg-color")}else h.style.removeProperty("--page-bg-color"),h.style.removeProperty("--page-bg-gradient");this._applyAccent(this.load().accent);let J=this.getState().accent;this._syncThemeColor(),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{mode:e,brand:t,accent:J,borderStyle:g,iconSet:A,fluid:y,backdrop:O,backdropChrome:M,pageBgType:o,effectiveMode:p}}))},_setRootAttr(e,t,i=!1){let s=document.documentElement;t?s.setAttribute(e,t):i&&this._authoredHas(e)?s.setAttribute(e,""):s.removeAttribute(e)},_authoredHas(e){let t=Object.keys(li).find(s=>li[s]===e);return t?this.load()[t]==null&&st()[t]!=null:!1},_syncThemeColor(){let e=document.querySelectorAll('meta[name="theme-color"]');if(!e.length)return;let t=n=>!n||n==="transparent"||/^rgba\(.*,\s*0\)$/.test(n),i=getComputedStyle(document.documentElement).backgroundColor;if(t(i)){let n=document.createElement("span");n.style.setProperty("position","absolute"),n.style.setProperty("background-color","var(--color-background)"),(document.body||document.documentElement).append(n),i=getComputedStyle(n).backgroundColor,n.remove()}if(t(i))return;let s=lm(i);e.forEach(n=>{n.removeAttribute("media"),n.setAttribute("content",s)})},setMode(e){Bt=null;let t=this.save({mode:e});this.apply(t)},async setBrand(e){try{await ve(e)}catch(i){console.warn(`[VB] Theme "${e}" failed to load, using default`,i),e="default"}let t=this.save({brand:e});this.apply(t)},setAccent(e){this.save({accent:e}),this._applyAccent(e),this._syncThemeColor(),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}}))},setBorderStyle(e){let t=this.save({borderStyle:e});this.apply(t)},setIconSet(e){let t=this.save({iconSet:e});this.apply(t)},setFluid(e){let t=this.save({fluid:e});this.apply(t)},setBackdrop(e){let t=this.save({backdrop:e});this.apply(t)},setBackdropChrome(e){let t=this.save({backdropChrome:e});this.apply(t)},setPageBg({type:e="",color:t="",gradStart:i="",gradEnd:s="",gradDir:n=""}={}){let r=this.save({pageBgType:e,pageBgColor:t,pageBgGradStart:i,pageBgGradEnd:s,pageBgGradDir:n});this.apply(r)},getEffectiveMode(){let{mode:e}=this.load();return Qo(e,Bt,window.matchMedia("(prefers-color-scheme: dark)").matches)},getState(){let{mode:e,brand:t,accent:i,borderStyle:s,iconSet:n,fluid:r,backdrop:a,backdropChrome:o,pageBgType:c,pageBgColor:l,pageBgGradStart:u,pageBgGradEnd:d,pageBgGradDir:h}=this.load(),f=typeof document>"u"?{}:st(),p=(m,b)=>b==null&&f[m]===""?"default":ht(b,f[m]);return{mode:e,brand:t,accent:ht(i,f.accent)||"default",borderStyle:ht(s,f.borderStyle),iconSet:ht(n,f.iconSet),fluid:p("fluid",r),backdrop:p("backdrop",a),backdropChrome:ht(o,f.backdropChrome),pageBgType:c,pageBgColor:l,pageBgGradStart:u,pageBgGradEnd:d,pageBgGradDir:h,effectiveMode:this.getEffectiveMode()}},toggleMode(){let t=this.getEffectiveMode()==="dark"?"light":"dark";this.setMode(t)},reset(){R={...Z,brand:we||Z.brand},Bt=Zo(st().mode),S.remove(ai,oi).catch(()=>{});let e=document.documentElement;e.style.removeProperty("--page-bg-color"),e.style.removeProperty("--page-bg-gradient");for(let t of ec)e.style.removeProperty(t);this.apply(R)},_readCSSHint(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()},_applyAccent(e){let t=document.documentElement;for(let s of ec)t.style.removeProperty(s);if(e==null){let s=st().accent;s?t.dataset.accent=s:delete t.dataset.accent;return}let i=Wo.find(s=>s.id===e);if(!i||!i.seeds||Object.keys(i.seeds).length===0){delete t.dataset.accent;return}t.dataset.accent=i.id},_watchRootAttributes(){this._rootObserver||(this._rootObserver=new MutationObserver(e=>{for(let t of e)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(!R)return;let e=document.documentElement.dataset.theme||"",t=e.split(/\s+/).filter(Boolean),i=ci(e,xt)||"default";i!==R.brand&&(R.brand=i,ve(i).catch(()=>{}),window.dispatchEvent(new CustomEvent("vb:theme-change",{detail:{...this.getState()}})))},_syncFromDataMode(){if(!R)return;let e=document.documentElement.dataset.mode||"auto",t=this.getEffectiveMode();e!==t&&(Bt=null,R.mode=e,this._syncThemeColor(),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)})}};if(typeof window<"u"){let e=window.VB??(window.VB={});e.themeManager??=_}var dm=["calendar-event","chat-bubble","chat-message","chat-thread","dl-item","fab-stack","hour-view","layout-badge","layout-canvas","layout-card","layout-center","layout-cluster","layout-columns","layout-cover","layout-grid","layout-imposter","layout-reel","layout-sidebar","layout-stack","layout-switcher","layout-text","loading-spinner","semantic-card","site-legal","site-tools","status-message","text-divider","token-swatch","user-avatar"];for(let e of dm)customElements.get(e)||customElements.define(e,class extends HTMLElement{});ye();var qS=window.matchMedia("(prefers-reduced-motion: reduce)");var sc=new Map;function w(e,t,i={}){let s=i.priority??10,n={impl:t,bundle:i.bundle,contract:i.contract,priority:s},r=sc.get(e);if(customElements.get(e)){if(!r||r.priority>=s){r&&r.priority===s&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${e}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${e}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${i.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=s){r.priority===s&&console.warn(`[VB Bundle] Tag <${e}> already registered by "${r.bundle}". Skipping "${i.bundle}" (first wins at equal priority).`);return}sc.set(e,n),customElements.define(e,t)}var E=class extends HTMLElement{#t=[];#e;constructor(){super(),this.hasAttribute("data-upgraded")&&this.removeAttribute("data-upgraded")}connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,i,s,n){t.addEventListener(i,s,n),this.#t.push(()=>t.removeEventListener(i,s,n))}_reinit(){for(let t of this.#t)t();this.#t=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,i){this.#e||(this.#e=this.attachInternals());let s=this.#e.states;try{i?s.add(t):s.delete(t)}catch{let n=`--${t}`;i?s.add(n):s.delete(n)}}_adoptInternals(t){this.#e||(this.#e=t)}#i(){return this.constructor.formAssociated&&this.#e?this.#e:null}get validity(){return this.#i()?.validity}get validationMessage(){return this.#i()?.validationMessage??""}get willValidate(){return this.#i()?.willValidate??!1}get form(){return this.#i()?.form??null}checkValidity(){return this.#i()?.checkValidity()??!0}reportValidity(){return this.#i()?.reportValidity()??!0}};var hm=["valueMissing","badInput","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],fm='input:not([type="hidden"]):not(.otp-digit), textarea, select',pm="output.hint, output.textarea-counter",mm="Please check this field.",bm=0;function nc(e){return e.localName.includes("-")?!!customElements.get(e.localName)?.formAssociated:!1}function Ae(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement}var Ps=class extends E{#t=null;#e=[];#i=null;#n=!1;#s="";#o;#r=`ff-${++bm}`;setup(){if(this.#f(),this.#t=this.#b(),this.#i=this.querySelector("output.error")??this.querySelector("output:not(.hint):not(.textarea-counter)"),!this.#t)return!1;this.#i&&this.#o===void 0&&(this.#o=this.#i.textContent?.trim()??"",this.hasAttribute("data-invalid")||(this.#i.textContent=""));let t=this.#t;this.#e=[],t instanceof HTMLInputElement&&t.type==="radio"&&(this.#e=this.#u(t));let i=this.#e.length?this.#e:[t];for(let n of i)this.listen(n,"input",this.#a),this.listen(n,"change",this.#a),this.listen(n,"invalid",this.#c);Ae(t)||this.listen(t,`${t.localName}:change`,this.#a),this.listen(this,"focusout",n=>{let r=n.relatedTarget;r instanceof Node&&this.contains(r)||this.validate()});let s=t.form??this.closest("form");return s instanceof HTMLFormElement&&this.listen(s,"reset",n=>{setTimeout(()=>{!n.defaultPrevented&&this.isConnected&&this.clearError()})}),this.#y(this.hasAttribute("data-invalid")),!0}teardown(){this.#t=null,this.#e=[],this.#i=null}validate({show:t=!0}={}){if(!this.#t)return!0;let{valid:i,message:s}=this.#d();return t&&(i?(this.#x(this.#h()?"valid":null),this.#g("")):(this.#n=!0,this.#x("invalid"),this.#g(s)),this.#y(!i)),i}setError(t){if(!this.#t)return;this.#s=t;let i=this.#p();i&&i.setCustomValidity(t),this.validate()}clearError(){this.#t&&(this.#v(),this.#n=!1,this.#x(null),this.#g(""),this.#y(!1))}get fieldName(){return this.querySelector("label, legend")?.textContent?.trim()||this.#t?.getAttribute?.("aria-label")||this.#t?.getAttribute?.("name")||this.#t?.id||"Field"}get input(){return this.#t}#a=()=>{this.#s&&this.#v(),this.#n&&this.validate()};#l=!1;#c=()=>{if(!this.#l){this.#l=!0;try{this.validate()}finally{this.#l=!1}}};#b(){for(let t of this.querySelectorAll("*"))if(nc(t))return t;return this.querySelector(fm)}#f(){for(let t of this.querySelectorAll(":not(:defined)"))t.localName.includes("-")&&customElements.whenDefined(t.localName).then(()=>{!this.isConnected||!this.contains(t)||this.#t===t||nc(t)&&this._reinit()})}#u(t){return t.name?(t.form?[...t.form.elements]:[...t.getRootNode().querySelectorAll('input[type="radio"]')].filter(s=>!s.form)).filter(s=>s instanceof HTMLInputElement&&s.type==="radio"&&s.name===t.name):[t]}#p(){let t=this.#t;return t&&Ae(t)?t:null}#v(){let t=this.#p();t&&t.validity.customError&&t.validationMessage===this.#s&&t.setCustomValidity(""),this.#s=""}#d(){let t=this.#t;if(this.#s)return{valid:!1,message:this.#s};let i=t.validity;if(i)return i.valid?{valid:!0,message:""}:{valid:!1,message:this.#m(i)};let s=t.matches(":invalid");return{valid:!s,message:s?this.#m(null):""}}#m(t){let i=this.#t,s=Ae(i),n=r=>i.getAttribute(`data-message-${r.toLowerCase()}`)??(s?null:this.getAttribute(`data-message-${r.toLowerCase()}`));if(t)for(let r of hm){if(!t[r])continue;let a=n(r);if(a)return a;if((r==="customError"||!s)&&i.validationMessage)return i.validationMessage;break}else if(!this.#h()){let r=n("valueMissing");if(r)return r}return this.#o||i.validationMessage||this.getAttribute("data-message-invalid")||mm}#h(){let t=this.#t;if(this.#e.length)return this.#e.some(s=>s.checked);if(t instanceof HTMLInputElement&&t.type==="checkbox")return t.checked;let i=t.value;return Array.isArray(i)?i.length>0:!Ae(t)&&i===0?!1:i!=null&&String(i)!==""}#E(){let t=this.#t,i=this.querySelector('.otp-wrapper[role="group"]');return i?[i]:this.#e.length?this.#e.filter(s=>this.contains(s)):Ae(t)?[t]:[t.querySelector('[role="combobox"], fieldset, input:not([type="hidden"]):not([aria-hidden="true"]), textarea, select')??t]}#y(t){let i=[...this.querySelectorAll(pm)];i.forEach((a,o)=>{a.id||(a.id=`${this.#r}-hint${o?`-${o}`:""}`)});let s=this.#i;s&&!s.id&&(s.id=`${this.#r}-error`);let n=new Set([...i.map(a=>a.id),...s?[s.id]:[]]),r=[...i.map(a=>a.id),...t&&s?[s.id]:[]];for(let a of this.#E()){let o=(a.getAttribute("aria-describedby")??"").split(/\s+/).filter(l=>l&&!n.has(l)),c=[...new Set([...o,...r])];c.length?a.setAttribute("aria-describedby",c.join(" ")):a.removeAttribute("aria-describedby"),t?a.setAttribute("aria-invalid","true"):a.removeAttribute("aria-invalid")}}#x(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#g(t){this.#i&&(this.#i.textContent=t)}};w("form-field",Ps);function nt(e){return document.startViewTransition?document.startViewTransition(e):e()}var gm=0,vm=0,Rs=class extends E{#t=[];#e=[];#i=!1;#n=0;#s=!1;setup(){return this.#t=[...this.querySelectorAll(":scope > details")],this.#e=this.#t.map(t=>t.querySelector(":scope > summary")),this.#t.length===0?!1:(this.style.setProperty("--_tab-count",String(this.#t.length)),!this.hasAttribute("role")&&(this.hasAttribute("aria-label")||this.hasAttribute("aria-labelledby"))&&(this.setAttribute("role","group"),this.#s=!0),this.#o(),this.#l(),this.#c(),this.#n=Math.max(0,this.#t.findIndex(t=>t.open)),this.#f(),this.#r(),!0)}teardown(){this.style.removeProperty("--_tab-count"),this.#s&&this.removeAttribute("role"),this.#s=!1,this.#t=[],this.#e=[],this.#i=!1}get tabs(){return this.#t.map((t,i)=>({id:t.id||void 0,label:t.querySelector(":scope > summary")?.textContent?.trim()||`Tab ${i+1}`,content:t.querySelector(":scope > :not(summary)")?.innerHTML||"",active:t.hasAttribute("open")}))}set tabs(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();let s=!1;for(let n of i){let r=document.createElement("details");n.id&&(r.id=n.id),n.active&&!s&&(r.setAttribute("open",""),s=!0);let a=document.createElement("summary");a.textContent=n.label||"",r.appendChild(a);let o=document.createElement("section");o.innerHTML=n.content||"",r.appendChild(o),this.appendChild(r)}!s&&this.firstElementChild&&this.firstElementChild.setAttribute("open",""),this._reinit(),this.dispatchEvent(new CustomEvent("tab-set:tabs-changed",{detail:{tabs:i,source:"property"},bubbles:!0}))}#o(){let t=new Set(this.#t.map(s=>s.getAttribute("name")||"")),i=t.size===1?[...t][0]:"";if(i){let n=this.getRootNode().querySelectorAll?.(`details[name="${CSS.escape(i)}"]`)??[];for(let r of n)if(!this.#t.includes(r)){i="";break}}if(!i){i=`tab-set-${++vm}`;for(let s of this.#t)s.setAttribute("name",i)}}#r(){if(!this.hasAttribute("transition")||!document.startViewTransition)return;this.#i=!0;let t=++gm,i=this.getAttribute("transition")||"fade",s=i==="slide"?"vt-tabs-slide":i==="scale"?"vt-tabs-scale":"vt-tabs";this.#t.forEach(n=>{let r=n.querySelector(":scope > :not(summary)");r&&(r.style.viewTransitionName=`tabs-${t}`,r.style.viewTransitionClass=s)})}#a(t){if(t===this.#n)return;let i=t>this.#n?"forward":"backward";document.documentElement.dataset.vtDirection=i,nt(()=>{this.#t[t].open=!0}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}#l(){this.#t.forEach((t,i)=>{let s=this.#e[i],n=t.querySelector(":scope > :not(summary)");if(this.listen(t,"toggle",()=>this.#b(i)),!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),n.id=a,n.setAttribute("aria-labelledby",r),this.listen(s,"click",o=>{if(t.open){o.preventDefault();return}this.#i&&(o.preventDefault(),this.#a(i))}),this.listen(s,"keydown",o=>this.#u(o,i))})}#c(){this.#t.some(t=>t.open)||(this.#t[0].open=!0)}#b(t){let i=this.#t[t];if(this.#f(),!i?.open)return;let s=this.#n;s!==t&&(this.#n=t,this.dispatchEvent(new CustomEvent("tab-set:change",{detail:{index:t,previousIndex:s,tab:i,panel:i.querySelector(":scope > :not(summary)")},bubbles:!0})))}#f(){this.#t.forEach((t,i)=>{let s=this.#e[i];s&&s.setAttribute("aria-expanded",t.open?"true":"false")})}#u(t,i){let s=this.#t.length,n=(i+1)%s,r=(i-1+s)%s,a=getComputedStyle(this).direction==="rtl",o=this.getAttribute("data-orientation")==="vertical",c;switch(t.key){case"ArrowRight":if(o)return;c=a?r:n;break;case"ArrowLeft":if(o)return;c=a?n:r;break;case"ArrowDown":if(!o)return;c=n;break;case"ArrowUp":if(!o)return;c=r;break;case"Home":c=0;break;case"End":c=s-1;break;default:return}t.preventDefault(),this.#i?this.#a(c):this.#t[c].open=!0,this.#e[c]?.focus()}};w("tab-set",Rs);var ym=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function qs(e,t){let s=(()=>{try{return decodeURIComponent(location.hash.slice(1))}catch{return location.hash.slice(1)}})()===t;s||(location.hash=t);let n=e;typeof n.focus=="function"&&(n.tabIndex<0&&!n.hasAttribute("tabindex")&&n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0})),(s||!n.matches?.(":target"))&&n.scrollIntoView({behavior:ym()?"auto":"smooth",block:"start"})}function Fs(e){let t=e;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return!1;let s=(t.target instanceof Element?t.target:null)?.closest('a[href^="#"]');if(!s)return!1;let n=s.getAttribute("target");if(n&&n!=="_self"||s.hasAttribute("download"))return!1;let r=(s.getAttribute("href")??"").slice(1);if(!r)return!1;let a=r;try{a=decodeURIComponent(r)}catch{}let o=s.ownerDocument.getElementById(a);return o?(t.preventDefault(),qs(o,a),!0):!1}var wm="Back to content",Am="Footnote {n}",Em="Notes",rc="\u21A9\uFE0E",Sm=120,xm=150,Bs=e=>String.fromCharCode(97+e%26)+(e>=26?String(Math.floor(e/26)):""),Hs=class e extends E{static observedAttributes=["data-mode","data-label-back","data-label-ref","data-label-heading","data-preview"];static#t=0;#e=0;#i=[];#n=[];#s=null;#o=!1;#r=null;#a=null;#l;#c;attributeChangedCallback(t,i,s){i===s||!this.hasAttribute("data-upgraded")||this._reinit()}setup(){this.#e||(this.#e=++e.#t),this.listen(this,"click",Fs),this.listen(document,"keydown",n=>{n.key==="Escape"&&this.#r?.matches(":popover-open")&&this.#S()});let t=this.#f(this.#b());if(t.length===0)return;let i=this.getAttribute("data-mode")==="sidenotes";for(let n of t)n.side=i&&n.source.getAttribute("data-side")!=="false",this.#u(n);let s=t.filter(n=>!n.side);for(let n of t)n.side&&this.#m(n),n.refs.forEach((r,a)=>this.#v(r,n,a));s.length?this.#h(s):this.hidden||(this.hidden=!0,this.#o=!0)}teardown(){clearTimeout(this.#l),clearTimeout(this.#c),this.#S();for(let{ref:t,original:i}of this.#i)t.replaceChildren(...i),t.removeAttribute("data-enhanced");this.#i=[];for(let t of this.#n)t.remove();this.#n=[],this.#r=null,this.#a=null,this.#s&&(this.#s.el.removeAttribute("id"),this.#s=null),this.#o&&(this.hidden=!1,this.#o=!1)}#b(){return[...document.querySelectorAll("foot-note:not([data-enhanced])")].filter(t=>this.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}#f(t){let i=new Set(t),s=new Map,n=[];for(let r of t){let a=r,o=r.getAttribute("data-ref");if(o){let l=document.getElementById(o);l&&i.has(l)&&!l.hasAttribute("data-ref")?a=l:console.warn(`[foot-notes] data-ref="${o}" does not name a <foot-note> collected by this <foot-notes>; rendering it as its own note.`)}let c=s.get(a);if(!c){let l=n.length+1;c={source:a,num:l,noteId:`fn-${this.#e}-${l}`,refs:[],content:[],side:!1},s.set(a,c),n.push(c)}c.refs.push(r)}return n}#u(t){let i=new Set([t.source,...t.refs]);for(let s of i){let n=[...s.childNodes];this.#i.push({ref:s,original:n}),s===t.source&&(t.content=n),s.replaceChildren()}}#p(t,i){return this.getAttribute(t)||i}#v(t,i,s){let n=document.createElement("a");n.id=this.#d(i,s),n.href=`#${i.noteId}`,n.setAttribute("role","doc-noteref"),n.setAttribute("aria-label",this.#p("data-label-ref",Am).replaceAll("{n}",String(i.num))),n.textContent=String(i.num),t.setAttribute("data-enhanced",""),i.side&&t===i.source?t.prepend(n):t.append(n),this.listen(n,"click",r=>{this.#S(),Fs(r)}),!i.side&&this.getAttribute("data-preview")!=="false"&&this.#y(n,i)}#d(t,i){let s=`fnref-${this.#e}-${t.num}`;return i===0?s:`${s}-${Bs(i)}`}#m(t){let i=document.createElement("aside");i.className="sidenote",i.id=t.noteId,i.setAttribute("role","note");let s=document.createElement("span");s.className="sidenote-number",s.textContent=`${t.num}.`,i.append(s," ",...t.content),t.source.append(i)}#h(t){let i=document.createElement("section");i.setAttribute("role","doc-endnotes");let s=this.querySelector(":scope > :is(h1, h2, h3, h4, h5, h6)");if(s)s.id||(s.id=`fnh-${this.#e}`,this.#s={el:s,id:s.id}),i.setAttribute("aria-labelledby",s.id);else{let r=document.createElement("h2");r.id=`fnh-${this.#e}`,r.className="visually-hidden",r.textContent=this.#p("data-label-heading",Em),i.setAttribute("aria-labelledby",r.id),i.append(r)}let n=document.createElement("ol");for(let r of t)n.append(this.#E(r));i.append(n),this.append(i),this.#n.push(i)}#E(t){let i=document.createElement("li");i.id=t.noteId,i.append(...t.content," ");let s=this.#p("data-label-back",wm),n=t.refs.length>1;return t.refs.forEach((r,a)=>{let o=document.createElement("a");o.href=`#${this.#d(t,a)}`,o.setAttribute("data-backref",""),o.setAttribute("role","doc-backlink"),n?(o.setAttribute("aria-label",`${s} (${Bs(a)})`),o.textContent=`${rc}${Bs(a)}`):(o.setAttribute("aria-label",s),o.textContent=rc),a>0&&i.append(" "),i.append(o)}),i}#y(t,i){typeof HTMLElement.prototype.showPopover=="function"&&(this.listen(t,"pointerenter",s=>{s.pointerType!=="touch"&&(clearTimeout(this.#c),clearTimeout(this.#l),this.#l=setTimeout(()=>this.#g(t,i),Sm))}),this.listen(t,"pointerleave",()=>{clearTimeout(this.#l),!(t===document.activeElement&&t.matches(":focus-visible"))&&(this.#c=setTimeout(()=>this.#S(),xm))}),this.listen(t,"focus",()=>{t.matches(":focus-visible")&&this.#g(t,i)}),this.listen(t,"blur",()=>this.#S()))}#x(){if(this.#r)return this.#r;let t=document.createElement("aside");return t.className="fn-preview",t.setAttribute("popover","manual"),t.setAttribute("aria-hidden","true"),t.inert=!0,this.append(t),this.#n.push(t),this.#r=t,t}#g(t,i){if(clearTimeout(this.#c),!t.isConnected||this.hidden)return;let s=this.#x(),n=document.createElement("span");n.className="fn-preview-number",n.textContent=`${i.num}.`;let r=i.content.map(a=>a.cloneNode(!0));s.replaceChildren(n," ",...r);for(let a of s.querySelectorAll("[id]"))a.removeAttribute("id");this.#a?.removeAttribute("data-preview-anchor"),t.setAttribute("data-preview-anchor",""),this.#a=t,s.matches(":popover-open")||s.showPopover(),this.#w(s,t)}#S(){clearTimeout(this.#l);let t=this.#r;t?.matches(":popover-open")&&t.hidePopover(),this.#a?.removeAttribute("data-preview-anchor"),this.#a=null}#w(t,i){if(typeof CSS<"u"&&CSS.supports?.("position-area: top"))return;let s=i.getBoundingClientRect(),n=6,r=t.offsetWidth,a=t.offsetHeight,o=s.top-a-n;o<n&&(o=s.bottom+n);let c=Math.max(n,Math.min(s.left+s.width/2-r/2,innerWidth-r-n));t.style.inset="auto",t.style.top=`${o}px`,t.style.left=`${c}px`}},Vs=class extends HTMLElement{};w("foot-notes",Hs);w("foot-note",Vs);var ac=0,km=6,zs=class extends E{#t=[];#e=[];#i=[];#n=!1;#s=new WeakSet;setup(){return this.#t=[...this.querySelectorAll(":scope > details")],this.#e=this.#t.map(t=>t.querySelector("summary")),this.#t.length===0?!1:(this.#o(),this.#l(),this.#r(),!0)}teardown(){this.#t=[],this.#e=[],this.#i=[],this.#n=!1}get panels(){return this.#t.map((t,i)=>({id:t.id||void 0,summary:t.querySelector("summary")?.textContent?.trim()||`Panel ${i+1}`,content:this.#i[i]?.innerHTML||"",open:t.hasAttribute("open")}))}set panels(t){let i=Array.isArray(t)?t:[],n=this.hasAttribute("single")?`acc-${++ac}`:null;for(;this.firstChild;)this.firstChild.remove();for(let r of i){let a=document.createElement("details");r.id&&(a.id=r.id),r.open&&a.setAttribute("open",""),n&&a.setAttribute("name",n);let o=document.createElement("summary");o.textContent=r.summary||"",a.appendChild(o);let c=document.createElement("div");c.innerHTML=r.content||"",a.appendChild(c),this.appendChild(a)}this._reinit(),this.dispatchEvent(new CustomEvent("accordion-wc:panels-changed",{detail:{panels:i,source:"property"},bubbles:!0}))}#o(){this.#i=this.#t.map(t=>{let i=t.querySelector("summary");if(!i)return null;let s=[...t.children].filter(n=>n!==i);if(s.length===1&&s[0].localName==="div")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=++ac,i=this.getAttribute("transition")||"fade",s=i==="slide"?"vt-accordion-slide":i==="scale"?"vt-accordion-scale":"vt-accordion";this.#i.forEach((n,r)=>{n&&(n.style.viewTransitionName=`accordion-${t}-${r}`,n.style.viewTransitionClass=s)})}#a(t){nt(()=>{t.open=!t.open})}#l(){let t=this.#t.length<=km;this.#t.forEach((i,s)=>{let n=this.#e[s],r=this.#i[s];if(n){if(r){let a=n.id||`accordion-heading-${crypto.randomUUID().slice(0,8)}`,o=r.id||`accordion-panel-${crypto.randomUUID().slice(0,8)}`;n.id=a,r.id=o,n.setAttribute("aria-expanded",i.open?"true":"false"),n.setAttribute("aria-controls",o),t?(r.setAttribute("aria-labelledby",a),r.setAttribute("role","region"),this.#s.add(r)):this.#s.has(r)&&(r.removeAttribute("role"),r.removeAttribute("aria-labelledby"),this.#s.delete(r))}else n.setAttribute("aria-expanded",i.open?"true":"false");this.listen(n,"click",a=>{this.#n&&(a.preventDefault(),this.#a(i))}),this.listen(n,"keydown",a=>this.#b(a,s)),this.listen(i,"toggle",()=>this.#c(i,s))}})}#c(t,i){this.#e[i].setAttribute("aria-expanded",t.open?"true":"false"),this.hasAttribute("single")&&t.open&&this.#t.forEach((n,r)=>{r!==i&&n.open&&(n.open=!1,this.#e[r].setAttribute("aria-expanded","false"))}),this.dispatchEvent(new CustomEvent("accordion-wc:toggle",{detail:{index:i,open:t.open},bubbles:!0}))}#b(t,i){let{key:s}=t,n;switch(s){case"ArrowDown":n=(i+1)%this.#t.length;break;case"ArrowUp":n=(i-1+this.#t.length)%this.#t.length;break;case"Home":n=0;break;case"End":n=this.#t.length-1;break;default:return}t.preventDefault(),this.#e[n].focus()}open(t){t<0||t>=this.#t.length||(this.#n&&!this.#t[t].open?nt(()=>{this.#t[t].open=!0}):this.#t[t].open=!0)}close(t){t<0||t>=this.#t.length||(this.#n&&this.#t[t].open?nt(()=>{this.#t[t].open=!1}):this.#t[t].open=!1)}toggle(t){t<0||t>=this.#t.length||(this.#n?this.#a(this.#t[t]):this.#t[t].open=!this.#t[t].open)}openAll(){this.hasAttribute("single")||this.#t.forEach(t=>{t.open=!0})}closeAll(){this.#t.forEach(t=>{t.open=!1})}};w("accordion-wc",zs);var Cm={region:"Notifications",dismiss:"Dismiss",info:"Info",success:"Success",warning:"Warning",error:"Error"},Tm=["info","success","warning","error"],Lm={info:"ⓘ",success:"✓",warning:"⚠",error:"✗"},Nm=300,Us=class extends E{#t=[];#e=[];#i=new WeakMap;#n=!1;#s=!1;#o=new Set;setup(){this.#r("role","log"),this.#r("aria-live","polite"),this.#r("aria-relevant","additions"),this.#r("aria-label",this.#a("region")),this.listen(this,"pointerover",()=>{this.#n||(this.#n=!0,this.#u())}),this.listen(this,"pointerout",t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#n=!1,this.#u())}),this.listen(this,"focusin",()=>{this.#s=!0,this.#u()}),this.listen(this,"focusout",t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#s=!1,this.#u())}),this.listen(this,"keydown",t=>{if(t.key!=="Escape")return;let i=t.target.closest?.(".toast");i&&this.#e.includes(i)&&(t.preventDefault(),this.dismiss(i))}),this.listen(document,"visibilitychange",()=>this.#u()),this.#e=this.#e.filter(t=>t.parentNode===this),this.#n=!!this.querySelector(".toast:hover"),this.#s=this.contains(document.activeElement),this.#b(),this.#u()}teardown(){for(let t of[...this.#e]){let i=this.#i.get(t);i&&(i.hiding?this.#m(t):this.#v(i))}for(let t of this.#o)this.removeAttribute(t);this.#o.clear()}show(t){let{message:i,variant:s="info",duration:n=this.#E(),dismissible:r=!0,action:a,onAction:o,source:c="api"}=t,l=Tm.includes(s)?s:"info",u=this.#l({message:i,variant:l,dismissible:r,action:a,onAction:o}),d=document.activeElement;this.#i.set(u,{message:String(i??""),duration:Math.max(0,Number(n)||0),remaining:Math.max(0,Number(n)||0),startedAt:0,timer:void 0,returnFocus:d&&!this.contains(d)?d:null,hiding:!1});let h=!this.isConnected||this.#e.length>=this.#y();return h?this.#t.push({toast:u,duration:n}):this.#c(u),this.dispatchEvent(new CustomEvent("toast-msg:enqueued",{detail:{message:i,variant:l,duration:n,source:c,toast:u,queued:h},bubbles:!0})),u}dismiss(t){let i=this.#t.findIndex(s=>s.toast===t);if(i>-1){this.#t.splice(i,1);return}this.#d(t)}dismissAll(){this.#t=[],[...this.#e].forEach(t=>this.#d(t))}get queue(){let t=(i,s)=>({message:this.#i.get(i)?.message??"",variant:i.getAttribute("data-variant")||"info",state:s});return[...this.#e.map(i=>t(i,"visible")),...this.#t.map(({toast:i})=>t(i,"queued"))]}#r(t,i){this.hasAttribute(t)&&!this.#o.has(t)||(this.setAttribute(t,i),this.#o.add(t))}#a(t){return this.getAttribute(`data-label-${t}`)??Cm[t]??t}#l({message:t,variant:i,dismissible:s,action:n,onAction:r}){let a=document.createElement("div");a.className="toast",a.setAttribute("data-variant",i);let o=c=>this.#x(c);return a.innerHTML=`
|
|
7
|
+
<span class="icon" aria-hidden="true">${Lm[i]}</span>
|
|
8
8
|
<span class="message"><span class="variant-label">${o(this.#a(i))}: </span>${o(t)}</span>
|
|
9
9
|
${n?`<button type="button" class="action">${o(n)}</button>`:""}
|
|
10
10
|
${s?`<button type="button" class="close" aria-label="${o(this.#a("dismiss"))}">✕</button>`:""}
|
|
11
|
-
`,a.querySelector(".close")?.addEventListener("click",()=>this.#d(a)),n&&a.querySelector(".action")?.addEventListener("click",()=>{r?.(),this.#d(a)}),a}#c(t){this.appendChild(t),this.#e.push(t),requestAnimationFrame(()=>{t.getAttribute("data-state")!=="hiding"&&t.setAttribute("data-state","visible")}),this.#u(),this.dispatchEvent(new CustomEvent("toast-msg:show",{bubbles:!0,detail:{toast:t}}))}#b(){for(;this.isConnected&&this.#t.length&&this.#e.length<this.#y();){let{toast:t}=this.#t.shift();this.#c(t)}}get#f(){return this.#n||this.#s||document.visibilityState==="hidden"}#u(){let t=this.#f||!this.isConnected;for(let i of this.#e){let s=this.#i.get(i);!s||s.hiding||s.duration<=0||(t?this.#v(s):s.timer===void 0&&this.#p(i,s))}}#p(t,i){i.startedAt=performance.now(),i.timer=setTimeout(()=>{i.timer=void 0,this.#d(t)},i.remaining)}#v(t){t.timer!==void 0&&(clearTimeout(t.timer),t.timer=void 0,t.remaining=Math.max(0,t.remaining-(performance.now()-t.startedAt)))}#d(t){let i=this.#i.get(t);if(!i||i.hiding||t.parentNode!==this)return;i.hiding=!0,i.timer!==void 0&&clearTimeout(i.timer),i.timer=void 0,this.#h(t,i),t.setAttribute("data-state","hiding");let s=()=>this.#m(t);t.addEventListener("animationend",s,{once:!0}),setTimeout(s,Lm)}#m(t){if(t.parentNode!==this&&!this.#e.includes(t))return;t.remove();let i=this.#e.indexOf(t);i>-1&&this.#e.splice(i,1),this.#s=this.contains(document.activeElement),this.#e.length||(this.#n=!1),this.#b(),this.#u(),this.dispatchEvent(new CustomEvent("toast-msg:hide",{bubbles:!0,detail:{toast:t}}))}#h(t,i){if(!t.contains(document.activeElement))return;let s=this.#e.filter(c=>c!==t&&!this.#i.get(c)?.hiding),n=this.#e.indexOf(t),a=(s.find(c=>this.#e.indexOf(c)>n)??s[s.length-1])?.querySelector("button");if(a){a.focus();return}let o=i.returnFocus;o instanceof HTMLElement&&o.isConnected&&o.focus()}#E(){let t=this.getAttribute("duration"),i=t!==null?parseInt(t,10):NaN;return Number.isFinite(i)?i:5e3}#y(){let t=this.getAttribute("max"),i=t!==null?parseInt(t,10):NaN;return Number.isFinite(i)&&i>0?i:5}#x(t){let i=document.createElement("div");return i.textContent=t??"",i.innerHTML}};w("toast-msg",Us);var li=CSS.supports("anchor-name","--x"),Nm=CSS.supports("position-area","bottom"),Mm=(()=>{let e=document.createElement("span");return e.setAttribute("popover","hint"),e.popover==="hint"})(),_m=["auto","manual","hint"];function Dm(e){let t=_m.includes(e||"")?e:"auto";return t==="hint"&&!Mm?"auto":t}var Im=["top","bottom","left","right","inset-inline-start","inset-inline-end"],$m=["position","top","left","right","bottom","margin"],rc=8,Om=0,Pm=0;function ac(e){return!e||e==="none"?[]:e.split(",").map(t=>t.trim()).filter(Boolean)}var Ws=class extends E{static get observedAttributes(){return["data-mode","data-anchor","data-position"]}#t=null;#e=null;#i=`--pop-over-anchor-${++Pm}`;#n=!1;#s=!1;#o=!1;setup(){if(this.id||(this.id=`pop-over-${++Om}`),(!this.hasAttribute("popover")||this.#n)&&this.#r(),this.#a(),this.#l(),this.listen(this,"beforetoggle",t=>{let i=t.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${i}`,{detail:{state:t.newState},bubbles:!0,composed:!0})),!li&&t.newState==="open"&&this.#t&&queueMicrotask(()=>{this.matches(":popover-open")&&this.#f()})}),!li){let t=()=>{this.matches(":popover-open")&&this.#t&&this.#f()};this.listen(window,"resize",t),this.listen(window,"scroll",t,{capture:!0,passive:!0})}}teardown(){this.#c(),this.#s&&(Im.forEach(t=>this.style.removeProperty(t)),this.#s=!1),this.#o&&($m.forEach(t=>this.style.removeProperty(t)),this.#o=!1),this.#t=null}attributeChangedCallback(t,i,s){if(i!==s){if(!this.hasAttribute("data-upgraded")){t==="data-mode"&&this.hasAttribute("popover")&&!this.isConnected&&(this.#n=!0);return}if(t==="data-mode"){this.#r();return}this._reinit()}}#r(){let t=Dm(this.dataset.mode);this.getAttribute("popover")!==t&&this.setAttribute("popover",t),this.#n=!0}show(){this.matches(":popover-open")||(this.showPopover(),!li&&this.#t&&this.matches(":popover-open")&&this.#f())}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#a(){let t=this.dataset.anchor;if(t){let i=document.getElementById(t);if(!i)try{i=document.querySelector(t)}catch{i=null}this.#t=i}else this.#t=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#l(){if(!this.#t||!li)return;let t=this.#t,i=t.style.getPropertyValue("anchor-name"),s=ac(i||getComputedStyle(t).getPropertyValue("anchor-name"));s.includes(this.#i)||s.push(this.#i),t.style.setProperty("anchor-name",s.join(", ")),this.#e=this.#i,this.style.setProperty("position-anchor",this.#i),this.setAttribute("data-anchor-name",this.#i),Nm||this.#b(this.dataset.position||"bottom")}#c(){if(this.#t&&this.#e){let t=ac(this.#t.style.getPropertyValue("anchor-name")).filter(i=>i!==this.#e);t.length?this.#t.style.setProperty("anchor-name",t.join(", ")):this.#t.style.removeProperty("anchor-name")}this.#e=null,this.style.getPropertyValue("position-anchor")&&this.style.removeProperty("position-anchor"),this.hasAttribute("data-anchor-name")&&this.removeAttribute("data-anchor-name")}#b(t){let i="var(--_pop-over-offset, var(--size-xs))",s=t.endsWith("-end")?{"inset-inline-end":"anchor(end)"}:{"inset-inline-start":"anchor(start)"},n={top:{bottom:`calc(anchor(top) + ${i})`,...s},bottom:{top:`calc(anchor(bottom) + ${i})`,...s},left:{right:`calc(anchor(left) + ${i})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${i})`,top:"anchor(top)"}},r=t.split("-")[0],a=n[r]||n.bottom;Object.entries(a).forEach(([o,c])=>this.style.setProperty(o,c)),this.#s=!0}#f(){if(!this.#t)return;let t=this.#t.getBoundingClientRect(),i=this.dataset.position||"bottom",s=this.#u(),n=document.documentElement.clientWidth,r=document.documentElement.clientHeight;this.style.position="fixed",this.style.margin="0",this.style.right="auto",this.style.bottom="auto",this.#o=!0;let a=this.offsetWidth,o=this.offsetHeight,c=i.split("-")[0];["top","bottom","left","right"].includes(c)||(c="bottom");let l={top:t.top-s,bottom:r-t.bottom-s,left:t.left-s,right:n-t.right-s},u={top:"bottom",bottom:"top",left:"right",right:"left"},d=c==="top"||c==="bottom"?o:a;l[c]<d&&l[u[c]]>l[c]&&(c=u[c]);let h,f;switch(c){case"top":h=t.top-o-s,f=t.left;break;case"left":h=t.top,f=t.left-a-s;break;case"right":h=t.top,f=t.right+s;break;default:h=t.bottom+s,f=t.left;break}if(c==="top"||c==="bottom"){let m=getComputedStyle(this).direction==="rtl";f=i.endsWith("-end")!==m?t.right-a:t.left}else i.endsWith("-end")&&(h=t.bottom-o);let p=(m,b,g)=>Math.max(rc,Math.min(m,g-b-rc));f=p(f,a,n),h=p(h,o,r),this.style.top=`${Math.round(h)}px`,this.style.left=`${Math.round(f)}px`}#u(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset||""]??t.xs}};w("pop-over",Ws);var Rm=new Set(["BUTTON","A","AREA"]),js=CSS.supports("anchor-name","--x"),oc=(()=>{let e=document.createElement("span");return e.setAttribute("popover","hint"),e.popover==="hint"})(),cc=8;function lc(e){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?Rm.has(e.tagName):!1}function qm(e){return e.getAttribute("aria-label")?.trim()||e.hasAttribute("aria-labelledby")||e.labels?.length||e.textContent?.trim()||e instanceof HTMLInputElement&&["button","submit","reset"].includes(e.type)&&e.value?!0:!!e.querySelector('img[alt]:not([alt=""]), [aria-label]:not([aria-hidden="true"])')}function Fm(e,t,i){let s=(e.getAttribute(t)||"").split(/\s+/).filter(Boolean);return s.includes(i)?!1:(e.setAttribute(t,[...s,i].join(" ")),!0)}function Bm(e,t,i){let s=(e.getAttribute(t)||"").split(/\s+/).filter(n=>n&&n!==i);s.length?e.setAttribute(t,s.join(" ")):e.removeAttribute(t)}var ui=0,Ks=class extends E{#t=null;#e=null;#i;#n;#s=!1;#o=!1;#r;#a;#l=[];#c=null;#b=!1;#f=!1;setup(){return this.#s=this.getAttribute("variant")==="card",this.#s?this.#p():this.#u()}#u(){if(this.#t=this.querySelector(":scope > :not(template):not(pop-over.tooltip)"),!this.#t)return!1;this.#o=lc(this.#t);let t=this.querySelector(":scope > template[data-tooltip]"),i=this.getAttribute("content"),s=this.#t.getAttribute("title");if(!t&&!i&&!s)return!1;let n=!1;s&&(qm(this.#t)||(this.#t.setAttribute("aria-label",s),this.#a=s,n=!t&&!i),this.#r=s,this.#t.removeAttribute("title"));let r=this.getAttribute("position")||"top";this.#t.id||(this.#t.id=`tooltip-trigger-${++ui}`);let a=document.createElement("pop-over");a.className="tooltip",a.setAttribute("role","tooltip"),a.dataset.mode=oc?"hint":"manual",a.dataset.anchor=this.#t.id,a.dataset.tooltipPosition=r,js||(a.dataset.position=r),a.id=`tooltip-${++ui}`,t?a.innerHTML=t.innerHTML:a.textContent=i||s;let o=document.createElement("span");if(o.className="tooltip-arrow",o.setAttribute("aria-hidden","true"),a.appendChild(o),this.appendChild(a),this.#e=a,n||this.#v("aria-describedby",a.id),this.#o?(this.#t.setAttribute("interestfor",a.id),this.#y()):(this.listen(this.#t,"mouseenter",this.#x),this.listen(this.#t,"mouseleave",this.#g),this.listen(this.#t,"focus",this.#S),this.listen(this.#t,"blur",this.#w),this.listen(a,"mouseenter",this.#A),this.listen(a,"mouseleave",this.#g)),oc||this.#m(),!js){this.listen(a,"toggle",l=>{l.newState==="open"&&this.#h()});let c=()=>{this.isVisible&&this.#h()};this.listen(window,"resize",c),this.listen(window,"scroll",c,{capture:!0,passive:!0})}return this.#d(a),!0}#p(){this.#t=this.querySelector(":scope > [data-trigger]");let t=this.querySelector(":scope > [data-content]");if(!this.#t||!t)return!1;this.#o=lc(this.#t),this.#t.id||(this.#t.id=`tooltip-trigger-${++ui}`);let i=document.createElement("pop-over");return i.className="hover-card",i.dataset.mode="manual",i.dataset.anchor=this.#t.id,i.dataset.position=this.getAttribute("position")||"bottom",i.id=`hc-${++ui}`,this.#c={node:t,next:t.nextSibling,hidden:t.hidden},i.appendChild(t),t.removeAttribute("data-content"),t.hidden=!1,this.appendChild(i),this.#e=i,this.#v("aria-controls",i.id),this.#t.hasAttribute("aria-expanded")||(this.#t.setAttribute("aria-expanded","false"),this.#b=!0),this.#o?(this.#t.setAttribute("interestfor",i.id),this.#y()):(this.listen(this.#t,"mouseenter",this.#x),this.listen(this.#t,"mouseleave",this.#g),this.listen(this.#t,"focus",this.#S),this.listen(this.#t,"blur",this.#g),this.listen(i,"mouseenter",this.#A),this.listen(i,"mouseleave",this.#g),this.listen(i,"focusin",this.#A),this.listen(i,"focusout",s=>{s.relatedTarget instanceof Node&&this.contains(s.relatedTarget)||this.#g()})),this.#m(),this.listen(i,"pop-over:show",()=>{this.#b&&this.#t?.setAttribute("aria-expanded","true")}),this.listen(i,"pop-over:hide",()=>{this.#b&&this.#t?.setAttribute("aria-expanded","false")}),this.#d(i),!0}teardown(){clearTimeout(this.#i),clearTimeout(this.#n);let t=this.#t;if(t){this.#o&&(t.removeAttribute("interestfor"),this.#E&&(t.style.removeProperty("interest-delay-start"),t.style.removeProperty("--interest-delay-start"),this.#E=!1));for(let[i,s]of this.#l)Bm(t,i,s);this.#a!==void 0&&t.getAttribute("aria-label")===this.#a&&t.removeAttribute("aria-label"),this.#b&&t.removeAttribute("aria-expanded"),this.#r&&t.setAttribute("title",this.#r)}if(this.#l=[],this.#a=void 0,this.#r=void 0,this.#b=!1,this.#c){let{node:i,next:s,hidden:n}=this.#c;i.setAttribute("data-content",""),i.hidden=n,s&&s.parentNode===this?this.insertBefore(i,s):this.insertBefore(i,this.#e?.parentNode===this?this.#e:null),this.#c=null}this.#e&&(this.#e.remove(),this.#e=null),this.#t=null,this.setState("show-pending",!1)}#v(t,i){this.#t&&Fm(this.#t,t,i)&&this.#l.push([t,i])}#d(t){this.listen(t,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(t,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}#m(){this.listen(document,"keydown",this.#L),this.listen(document,"pointerdown",t=>{this.isVisible&&!(t.target instanceof Node&&this.contains(t.target))&&this.hide()})}#h(){let t=this.#e,i=this.#t;if(!t||!i||this.#s)return;let s=t.dataset.position||"top",n=i.getBoundingClientRect(),r=document.documentElement.clientWidth,a=document.documentElement.clientHeight,o=(c,l,u)=>Math.max(cc,Math.min(c,u-l-cc));t.style.translate="none",s==="left"||s==="right"?t.style.top=`${Math.round(o(n.top+(n.height-t.offsetHeight)/2,t.offsetHeight,a))}px`:t.style.left=`${Math.round(o(n.left+(n.width-t.offsetWidth)/2,t.offsetWidth,r))}px`}#E=!1;#y(){let t=this.getAttribute("delay"),i=this.#t;if(t===null||!i)return;let s=parseInt(t,10);!Number.isFinite(s)||s<0||(i.style.setProperty("interest-delay-start",`${s}ms`),i.style.setProperty("--interest-delay-start",`${s}ms`),this.#E=!0)}#x=()=>{clearTimeout(this.#n);let t=this.#s?300:200,i=parseInt(this.getAttribute("delay")||String(t),10);this.setState("show-pending",!0),this.#i=setTimeout(()=>{this.setState("show-pending",!1),this.show()},i)};#g=()=>{clearTimeout(this.#i),this.setState("show-pending",!1);let t=this.#s?200:100;this.#n=setTimeout(()=>this.hide(),t)};#S=()=>{this.#f||(clearTimeout(this.#n),this.show())};#w=()=>{clearTimeout(this.#i),this.setState("show-pending",!1),this.hide()};#A=()=>{clearTimeout(this.#n)};#L=t=>{if(t.key!=="Escape"||!this.isVisible)return;clearTimeout(this.#i);let i=this.#s&&this.#e?.contains(document.activeElement);this.hide(),i&&(this.#f=!0,this.#t?.focus({preventScroll:!0}),this.#f=!1)};show(){!this.#e||this.isVisible||(typeof this.#e.show=="function"?this.#e.show():this.#e.showPopover(),js||this.#h())}hide(){!this.#e||!this.isVisible||(typeof this.#e.hide=="function"?this.#e.hide():this.#e.hidePopover())}get isVisible(){return this.#e?.matches(":popover-open")??!1}};w("tool-tip",Ks);var Ys=0,Ae='button, a, [role="menuitem"]',di='menu, ul[role="menu"]',Hm=500;function Gs(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}var Xs=class extends E{#t;#e;#i;#n;#s=[];#o=-1;#r=!1;#a=!1;#l=null;#c="";#b=!1;#f=!1;#u=null;#p(){return this.querySelector(`:scope > :is(${di}), :scope > pop-over[data-dropdown-host] > :is(${di})`)}setup(){let t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button:not([data-dropdown-toggle])");if(!t)return!1;this.#t=t;let i=this.#p();if(!i)return!1;this.#i=i,this.#a=this.hasAttribute("hover"),this.#t.id||(this.#t.id=`dropdown-trigger-${++Ys}`);let s=this.querySelector(":scope > pop-over[data-dropdown-host]");return s?this.#n=s:(this.#n=document.createElement("pop-over"),this.#n.setAttribute("data-dropdown-host",""),this.#n.id=`dropdown-${++Ys}`,this.#n.dataset.mode=this.#a?"manual":"auto",this.#n.dataset.position=this.getAttribute("position")||"bottom-start",this.#n.dataset.anchor=this.#t.id,this.#n.appendChild(this.#i),this.appendChild(this.#n)),this.#n.dataset.mode=this.#a?"manual":"auto",this.#n.dataset.position=this.getAttribute("position")||"bottom-start",this.#n.dataset.anchor=this.#t.id,this.#i.parentElement!==this.#n&&this.#n.appendChild(this.#i),this.#i.id||(this.#i.id=`dropdown-menu-${++Ys}`),this.#a?this.#d():this.#v(),this.listen(this.#i,"click",this.#A,{capture:!0}),this.listen(this.#i,"click",this.#L),this.listen(this.#n,"pop-over:hide",this.#M),this.listen(this.#n,"pop-over:show",this.#K),!0}#v(){this.#e=this.#t,this.querySelector(":scope > button[data-dropdown-toggle]")?.remove(),this.#t.setAttribute("aria-haspopup","menu"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-controls",this.#i.id),this.#i.setAttribute("role","menu"),this.#E(),this.listen(this.#t,"pointerdown",this.#y),this.listen(this.#t,"click",this.#x),this.listen(this.#t,"keydown",this.#g),this.listen(this.#i,"keydown",this.#S)}#d(){let t=this.#t;if(this.#t.localName==="a"){if(t=this.querySelector(":scope > button[data-dropdown-toggle]"),t||(t=document.createElement("button"),t.setAttribute("type","button"),t.setAttribute("data-dropdown-toggle",""),this.#t.after(t)),!t.hasAttribute("aria-label")&&!t.textContent.trim()){let i=this.#t.textContent.trim().replace(/\s+/g," ");t.setAttribute("aria-label",`${i} submenu`)}this.#t.removeAttribute("aria-haspopup"),this.#t.removeAttribute("aria-expanded"),this.#t.removeAttribute("aria-controls")}t&&(this.#e=t,t.removeAttribute("aria-haspopup"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",this.#i.id),this.#i.removeAttribute("role"),this.#i.querySelectorAll(':scope > li[role="none"]').forEach(i=>i.removeAttribute("role")),this.#s=this.#m(),this.#s.forEach(i=>{i.getAttribute("role")==="menuitem"&&i.removeAttribute("role"),i.getAttribute("tabindex")==="-1"&&i.removeAttribute("tabindex"),i.hasAttribute("data-disabled")&&i.setAttribute("aria-disabled","true")}),this.#h(),this.listen(t,"click",this.#k),this.listen(this,"pointerenter",this.#_),this.listen(this,"pointerleave",this.#P),this.listen(this,"focusout",this.#O),this.listen(document,"keydown",this.#V),this.listen(document,"pointerdown",this.#$))}teardown(){this.#l&&clearTimeout(this.#l),this.#l=null,this.#u&&clearTimeout(this.#u),this.#u=null,this.#c="",this.#r&&this.#n?.hide?.(),this.#r=!1,this.#f=!1,this.#o=-1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false")}get items(){let t=this.#i||this.#p();if(!t)return[];let i=[];for(let s of t.querySelectorAll(":scope > li")){if(s.matches('[role="separator"]')||s.querySelector(":scope > hr")){i.push({separator:!0});continue}let n=s.querySelector(Ae);n&&i.push({label:n.textContent.trim().replace(/\s+/g," "),value:n.getAttribute("data-value")||void 0,href:n.tagName==="A"?n.getAttribute("href"):void 0,disabled:Gs(n)||void 0})}return i}set items(t){let i=Array.isArray(t)?t:[],s=this.#i||this.#p();for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else{let a=n.href?document.createElement("a"):document.createElement("button");n.href?a.setAttribute("href",n.href):a.setAttribute("type","button"),n.value&&a.setAttribute("data-value",n.value),n.disabled&&(a.setAttribute("data-disabled",""),a.setAttribute("aria-disabled","true")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this._reinit(),this.dispatchEvent(new CustomEvent("drop-down:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#m(){return Array.from(this.#i.querySelectorAll(Ae)).filter(t=>t.closest(di)===this.#i&&!t.closest('[role="separator"]'))}#h(){this.#i.querySelectorAll(':scope > li:empty, :scope > [role="separator"], :scope > hr').forEach(t=>{t.setAttribute("role","separator")})}#E(){let t=this.#m();t.forEach(i=>{i.setAttribute("role","menuitem"),i.setAttribute("tabindex","-1"),i.hasAttribute("data-disabled")&&i.setAttribute("aria-disabled","true")}),this.#s=t.filter(i=>!i.disabled),this.#i.querySelectorAll(":scope > li").forEach(i=>{i.querySelector(`:scope > :is(${Ae})`)&&i.setAttribute("role","none")}),this.#h()}#y=()=>{this.#b=this.#r};#x=t=>{let i=this.#b;if(this.#b=!1,!(t.detail!==0&&i&&!this.#r)){if(t.detail===0&&!this.#r){this.open(),this.#T(0);return}this.toggle()}};#g=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#T(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#T(this.#s.length-1);break}};#S=t=>{if(!(t.defaultPrevented||t.target.closest?.(di)!==this.#i))switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#T(this.#o+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#T(this.#o-1);break;case"Home":t.preventDefault(),this.#T(0);break;case"End":t.preventDefault(),this.#T(this.#s.length-1);break;case"Escape":t.preventDefault(),this.close(),this.#e?.focus();break;case"Tab":this.close();break;case"Enter":case" ":{t.preventDefault();let s=this.#s[this.#o];s&&!Gs(s)&&s.click();break}default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&this.#w(t.key)}};#w(t){this.#u&&clearTimeout(this.#u),this.#u=setTimeout(()=>{this.#c=""},Hm),this.#c+=t.toLowerCase();let i=this.#c,s=[...i].every(a=>a===i[0])?i[0]:i,n=this.#s.length,r=s.length>1?0:1;for(let a=0;a<n;a++){let o=(this.#o+r+a+n)%n;if(this.#s[o].textContent.trim().toLowerCase().startsWith(s)){this.#T(o);return}}}#A=t=>{let i=t.target.closest?.(Ae);i&&this.#s.includes(i)&&Gs(i)&&(t.preventDefault(),t.stopPropagation())};#L=t=>{let i=t.target.closest?.(Ae);!i||!this.#s.includes(i)||i.closest("drop-down")===this&&(t.defaultPrevented||(this.dispatchEvent(new CustomEvent("drop-down:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})),this.close(),this.#e?.focus()))};#k=t=>{if(this.#N(),t.detail!==0&&this.#f&&this.#r){this.#f=!1;return}this.toggle()};#N(){this.#l&&(clearTimeout(this.#l),this.#l=null,this.setState("hover-grace-pending",!1))}#_=t=>{t.pointerType==="mouse"&&(this.#N(),this.#r||(this.open(),this.#f=!0))};#P=t=>{t.pointerType!=="mouse"||!this.#r||this.contains(document.activeElement)&&document.activeElement!==this.#e&&document.activeElement!==this.#t||(this.setState("hover-grace-pending",!0),this.#l=setTimeout(()=>{this.#l=null,this.setState("hover-grace-pending",!1),this.close()},100))};#O=t=>{let i=t.relatedTarget;i&&this.contains(i)||!i&&this.matches(":hover")||this.close()};#V=t=>{if(t.key!=="Escape"||!this.#r)return;let i=this.contains(document.activeElement);t.preventDefault(),this.close(),i&&this.#e?.focus()};#$=t=>{if(!this.#r)return;t.composedPath().includes(this)||this.close()};#K=t=>{t.target!==this.#n||this.#r||(this.#r=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#o=-1,this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0})))};#M=t=>{t.target!==this.#n||!this.#r||(this.#r=!1,this.#f=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#o=-1,this.#i?.contains(document.activeElement)&&this.#e?.focus(),this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#T(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#o=t,this.#s[t].focus())}open(){this.#r||!this.#n||this.#n.show()}close(){!this.#r||!this.#n||this.#n.hide()}toggle(){this.#r?this.close():this.open()}get isOpen(){return this.#r}};w("drop-down",Xs);ve();function Bt({basePath:e,set:t,name:i}){return`${e}/${t}/${i}.svg`}function hi(e,t=document){let i=e.getAttribute("data-icon-set");if(i)return i;let s=e.closest("[data-icon-set]")?.getAttribute("data-icon-set");return s||t.documentElement.dataset.iconSet||"lucide"}function fi(e=document){let t=e.documentElement.dataset.iconPath;if(t)return t;let i=`${be()}/icons`;try{return new URL(i,e.baseURI).href}catch{return i}}function Zs(e){let t=e.getAttribute("data-icon");if(!t){e.style.removeProperty("--vb-icon");return}let i=Bt({basePath:fi(document),set:hi(e,document),name:t});e.style.setProperty("--vb-icon",`url("${i}")`)}function Js(e=document){for(let t of e.querySelectorAll("[data-icon]"))Zs(t)}var uc=!1;function Vm(){if(uc)return;uc=!0,Js(),new MutationObserver(t=>{for(let i of t)if(i.type==="attributes"){let s=i.target;s.hasAttribute&&s.hasAttribute("data-icon")&&Zs(s),i.attributeName==="data-icon-set"&&Js(s)}else for(let s of i.addedNodes){if(s.nodeType!==1)continue;let n=s;n.hasAttribute("data-icon")&&Zs(n),Js(n)}}).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-icon","data-icon-set"]})}typeof document<"u"&&Vm();var dc=`
|
|
11
|
+
`,a.querySelector(".close")?.addEventListener("click",()=>this.#d(a)),n&&a.querySelector(".action")?.addEventListener("click",()=>{r?.(),this.#d(a)}),a}#c(t){this.appendChild(t),this.#e.push(t),requestAnimationFrame(()=>{t.getAttribute("data-state")!=="hiding"&&t.setAttribute("data-state","visible")}),this.#u(),this.dispatchEvent(new CustomEvent("toast-msg:show",{bubbles:!0,detail:{toast:t}}))}#b(){for(;this.isConnected&&this.#t.length&&this.#e.length<this.#y();){let{toast:t}=this.#t.shift();this.#c(t)}}get#f(){return this.#n||this.#s||document.visibilityState==="hidden"}#u(){let t=this.#f||!this.isConnected;for(let i of this.#e){let s=this.#i.get(i);!s||s.hiding||s.duration<=0||(t?this.#v(s):s.timer===void 0&&this.#p(i,s))}}#p(t,i){i.startedAt=performance.now(),i.timer=setTimeout(()=>{i.timer=void 0,this.#d(t)},i.remaining)}#v(t){t.timer!==void 0&&(clearTimeout(t.timer),t.timer=void 0,t.remaining=Math.max(0,t.remaining-(performance.now()-t.startedAt)))}#d(t){let i=this.#i.get(t);if(!i||i.hiding||t.parentNode!==this)return;i.hiding=!0,i.timer!==void 0&&clearTimeout(i.timer),i.timer=void 0,this.#h(t,i),t.setAttribute("data-state","hiding");let s=()=>this.#m(t);t.addEventListener("animationend",s,{once:!0}),setTimeout(s,Nm)}#m(t){if(t.parentNode!==this&&!this.#e.includes(t))return;t.remove();let i=this.#e.indexOf(t);i>-1&&this.#e.splice(i,1),this.#s=this.contains(document.activeElement),this.#e.length||(this.#n=!1),this.#b(),this.#u(),this.dispatchEvent(new CustomEvent("toast-msg:hide",{bubbles:!0,detail:{toast:t}}))}#h(t,i){if(!t.contains(document.activeElement))return;let s=this.#e.filter(c=>c!==t&&!this.#i.get(c)?.hiding),n=this.#e.indexOf(t),a=(s.find(c=>this.#e.indexOf(c)>n)??s[s.length-1])?.querySelector("button");if(a){a.focus();return}let o=i.returnFocus;o instanceof HTMLElement&&o.isConnected&&o.focus()}#E(){let t=this.getAttribute("duration"),i=t!==null?parseInt(t,10):NaN;return Number.isFinite(i)?i:5e3}#y(){let t=this.getAttribute("max"),i=t!==null?parseInt(t,10):NaN;return Number.isFinite(i)&&i>0?i:5}#x(t){let i=document.createElement("div");return i.textContent=t??"",i.innerHTML}};w("toast-msg",Us);var ui=CSS.supports("anchor-name","--x"),Mm=CSS.supports("position-area","bottom"),_m=(()=>{let e=document.createElement("span");return e.setAttribute("popover","hint"),e.popover==="hint"})(),Dm=["auto","manual","hint"];function Im(e){let t=Dm.includes(e||"")?e:"auto";return t==="hint"&&!_m?"auto":t}var $m=["top","bottom","left","right","inset-inline-start","inset-inline-end"],Om=["position","top","left","right","bottom","margin"],oc=8,Pm=0,Rm=0;function cc(e){return!e||e==="none"?[]:e.split(",").map(t=>t.trim()).filter(Boolean)}var Ws=class extends E{static get observedAttributes(){return["data-mode","data-anchor","data-position"]}#t=null;#e=null;#i=`--pop-over-anchor-${++Rm}`;#n=!1;#s=!1;#o=!1;setup(){if(this.id||(this.id=`pop-over-${++Pm}`),(!this.hasAttribute("popover")||this.#n)&&this.#r(),this.#a(),this.#l(),this.listen(this,"beforetoggle",t=>{let i=t.newState==="open"?"show":"hide";this.dispatchEvent(new CustomEvent(`pop-over:${i}`,{detail:{state:t.newState},bubbles:!0,composed:!0})),!ui&&t.newState==="open"&&this.#t&&queueMicrotask(()=>{this.matches(":popover-open")&&this.#f()})}),!ui){let t=()=>{this.matches(":popover-open")&&this.#t&&this.#f()};this.listen(window,"resize",t),this.listen(window,"scroll",t,{capture:!0,passive:!0})}}teardown(){this.#c(),this.#s&&($m.forEach(t=>this.style.removeProperty(t)),this.#s=!1),this.#o&&(Om.forEach(t=>this.style.removeProperty(t)),this.#o=!1),this.#t=null}attributeChangedCallback(t,i,s){if(i!==s){if(!this.hasAttribute("data-upgraded")){t==="data-mode"&&this.hasAttribute("popover")&&!this.isConnected&&(this.#n=!0);return}if(t==="data-mode"){this.#r();return}this._reinit()}}#r(){let t=Im(this.dataset.mode);this.getAttribute("popover")!==t&&this.setAttribute("popover",t),this.#n=!0}show(){this.matches(":popover-open")||(this.showPopover(),!ui&&this.#t&&this.matches(":popover-open")&&this.#f())}hide(){this.matches(":popover-open")&&this.hidePopover()}toggle(){this.matches(":popover-open")?this.hide():this.show()}get open(){return this.matches(":popover-open")}#a(){let t=this.dataset.anchor;if(t){let i=document.getElementById(t);if(!i)try{i=document.querySelector(t)}catch{i=null}this.#t=i}else this.#t=document.querySelector(`[popovertarget="${CSS.escape(this.id)}"]`)}#l(){if(!this.#t||!ui)return;let t=this.#t,i=t.style.getPropertyValue("anchor-name"),s=cc(i||getComputedStyle(t).getPropertyValue("anchor-name"));s.includes(this.#i)||s.push(this.#i),t.style.setProperty("anchor-name",s.join(", ")),this.#e=this.#i,this.style.setProperty("position-anchor",this.#i),this.setAttribute("data-anchor-name",this.#i),Mm||this.#b(this.dataset.position||"bottom")}#c(){if(this.#t&&this.#e){let t=cc(this.#t.style.getPropertyValue("anchor-name")).filter(i=>i!==this.#e);t.length?this.#t.style.setProperty("anchor-name",t.join(", ")):this.#t.style.removeProperty("anchor-name")}this.#e=null,this.style.getPropertyValue("position-anchor")&&this.style.removeProperty("position-anchor"),this.hasAttribute("data-anchor-name")&&this.removeAttribute("data-anchor-name")}#b(t){let i="var(--_pop-over-offset, var(--size-xs))",s=t.endsWith("-end")?{"inset-inline-end":"anchor(end)"}:{"inset-inline-start":"anchor(start)"},n={top:{bottom:`calc(anchor(top) + ${i})`,...s},bottom:{top:`calc(anchor(bottom) + ${i})`,...s},left:{right:`calc(anchor(left) + ${i})`,top:"anchor(top)"},right:{left:`calc(anchor(right) + ${i})`,top:"anchor(top)"}},r=t.split("-")[0],a=n[r]||n.bottom;Object.entries(a).forEach(([o,c])=>this.style.setProperty(o,c)),this.#s=!0}#f(){if(!this.#t)return;let t=this.#t.getBoundingClientRect(),i=this.dataset.position||"bottom",s=this.#u(),n=document.documentElement.clientWidth,r=document.documentElement.clientHeight;this.style.position="fixed",this.style.margin="0",this.style.right="auto",this.style.bottom="auto",this.#o=!0;let a=this.offsetWidth,o=this.offsetHeight,c=i.split("-")[0];["top","bottom","left","right"].includes(c)||(c="bottom");let l={top:t.top-s,bottom:r-t.bottom-s,left:t.left-s,right:n-t.right-s},u={top:"bottom",bottom:"top",left:"right",right:"left"},d=c==="top"||c==="bottom"?o:a;l[c]<d&&l[u[c]]>l[c]&&(c=u[c]);let h,f;switch(c){case"top":h=t.top-o-s,f=t.left;break;case"left":h=t.top,f=t.left-a-s;break;case"right":h=t.top,f=t.right+s;break;default:h=t.bottom+s,f=t.left;break}if(c==="top"||c==="bottom"){let m=getComputedStyle(this).direction==="rtl";f=i.endsWith("-end")!==m?t.right-a:t.left}else i.endsWith("-end")&&(h=t.bottom-o);let p=(m,b,g)=>Math.max(oc,Math.min(m,g-b-oc));f=p(f,a,n),h=p(h,o,r),this.style.top=`${Math.round(h)}px`,this.style.left=`${Math.round(f)}px`}#u(){let t={none:0,xs:4,s:8,m:16,l:24};return t[this.dataset.offset||""]??t.xs}};w("pop-over",Ws);var qm=new Set(["BUTTON","A","AREA"]),js=CSS.supports("anchor-name","--x"),lc=(()=>{let e=document.createElement("span");return e.setAttribute("popover","hint"),e.popover==="hint"})(),uc=8;function dc(e){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?qm.has(e.tagName):!1}function Fm(e){return e.getAttribute("aria-label")?.trim()||e.hasAttribute("aria-labelledby")||e.labels?.length||e.textContent?.trim()||e instanceof HTMLInputElement&&["button","submit","reset"].includes(e.type)&&e.value?!0:!!e.querySelector('img[alt]:not([alt=""]), [aria-label]:not([aria-hidden="true"])')}function Bm(e,t,i){let s=(e.getAttribute(t)||"").split(/\s+/).filter(Boolean);return s.includes(i)?!1:(e.setAttribute(t,[...s,i].join(" ")),!0)}function Hm(e,t,i){let s=(e.getAttribute(t)||"").split(/\s+/).filter(n=>n&&n!==i);s.length?e.setAttribute(t,s.join(" ")):e.removeAttribute(t)}var di=0,Ks=class extends E{#t=null;#e=null;#i;#n;#s=!1;#o=!1;#r;#a;#l=[];#c=null;#b=!1;#f=!1;setup(){return this.#s=this.getAttribute("variant")==="card",this.#s?this.#p():this.#u()}#u(){if(this.#t=this.querySelector(":scope > :not(template):not(pop-over.tooltip)"),!this.#t)return!1;this.#o=dc(this.#t);let t=this.querySelector(":scope > template[data-tooltip]"),i=this.getAttribute("content"),s=this.#t.getAttribute("title");if(!t&&!i&&!s)return!1;let n=!1;s&&(Fm(this.#t)||(this.#t.setAttribute("aria-label",s),this.#a=s,n=!t&&!i),this.#r=s,this.#t.removeAttribute("title"));let r=this.getAttribute("position")||"top";this.#t.id||(this.#t.id=`tooltip-trigger-${++di}`);let a=document.createElement("pop-over");a.className="tooltip",a.setAttribute("role","tooltip"),a.dataset.mode=lc?"hint":"manual",a.dataset.anchor=this.#t.id,a.dataset.tooltipPosition=r,js||(a.dataset.position=r),a.id=`tooltip-${++di}`,t?a.innerHTML=t.innerHTML:a.textContent=i||s;let o=document.createElement("span");if(o.className="tooltip-arrow",o.setAttribute("aria-hidden","true"),a.appendChild(o),this.appendChild(a),this.#e=a,n||this.#v("aria-describedby",a.id),this.#o?(this.#t.setAttribute("interestfor",a.id),this.#y()):(this.listen(this.#t,"mouseenter",this.#x),this.listen(this.#t,"mouseleave",this.#g),this.listen(this.#t,"focus",this.#S),this.listen(this.#t,"blur",this.#w),this.listen(a,"mouseenter",this.#A),this.listen(a,"mouseleave",this.#g)),lc||this.#m(),!js){this.listen(a,"toggle",l=>{l.newState==="open"&&this.#h()});let c=()=>{this.isVisible&&this.#h()};this.listen(window,"resize",c),this.listen(window,"scroll",c,{capture:!0,passive:!0})}return this.#d(a),!0}#p(){this.#t=this.querySelector(":scope > [data-trigger]");let t=this.querySelector(":scope > [data-content]");if(!this.#t||!t)return!1;this.#o=dc(this.#t),this.#t.id||(this.#t.id=`tooltip-trigger-${++di}`);let i=document.createElement("pop-over");return i.className="hover-card",i.dataset.mode="manual",i.dataset.anchor=this.#t.id,i.dataset.position=this.getAttribute("position")||"bottom",i.id=`hc-${++di}`,this.#c={node:t,next:t.nextSibling,hidden:t.hidden},i.appendChild(t),t.removeAttribute("data-content"),t.hidden=!1,this.appendChild(i),this.#e=i,this.#v("aria-controls",i.id),this.#t.hasAttribute("aria-expanded")||(this.#t.setAttribute("aria-expanded","false"),this.#b=!0),this.#o?(this.#t.setAttribute("interestfor",i.id),this.#y()):(this.listen(this.#t,"mouseenter",this.#x),this.listen(this.#t,"mouseleave",this.#g),this.listen(this.#t,"focus",this.#S),this.listen(this.#t,"blur",this.#g),this.listen(i,"mouseenter",this.#A),this.listen(i,"mouseleave",this.#g),this.listen(i,"focusin",this.#A),this.listen(i,"focusout",s=>{s.relatedTarget instanceof Node&&this.contains(s.relatedTarget)||this.#g()})),this.#m(),this.listen(i,"pop-over:show",()=>{this.#b&&this.#t?.setAttribute("aria-expanded","true")}),this.listen(i,"pop-over:hide",()=>{this.#b&&this.#t?.setAttribute("aria-expanded","false")}),this.#d(i),!0}teardown(){clearTimeout(this.#i),clearTimeout(this.#n);let t=this.#t;if(t){this.#o&&(t.removeAttribute("interestfor"),this.#E&&(t.style.removeProperty("interest-delay-start"),t.style.removeProperty("--interest-delay-start"),this.#E=!1));for(let[i,s]of this.#l)Hm(t,i,s);this.#a!==void 0&&t.getAttribute("aria-label")===this.#a&&t.removeAttribute("aria-label"),this.#b&&t.removeAttribute("aria-expanded"),this.#r&&t.setAttribute("title",this.#r)}if(this.#l=[],this.#a=void 0,this.#r=void 0,this.#b=!1,this.#c){let{node:i,next:s,hidden:n}=this.#c;i.setAttribute("data-content",""),i.hidden=n,s&&s.parentNode===this?this.insertBefore(i,s):this.insertBefore(i,this.#e?.parentNode===this?this.#e:null),this.#c=null}this.#e&&(this.#e.remove(),this.#e=null),this.#t=null,this.setState("show-pending",!1)}#v(t,i){this.#t&&Bm(this.#t,t,i)&&this.#l.push([t,i])}#d(t){this.listen(t,"pop-over:show",()=>{this.dispatchEvent(new CustomEvent("tool-tip:show",{bubbles:!0}))}),this.listen(t,"pop-over:hide",()=>{this.dispatchEvent(new CustomEvent("tool-tip:hide",{bubbles:!0}))})}#m(){this.listen(document,"keydown",this.#M),this.listen(document,"pointerdown",t=>{this.isVisible&&!(t.target instanceof Node&&this.contains(t.target))&&this.hide()})}#h(){let t=this.#e,i=this.#t;if(!t||!i||this.#s)return;let s=t.dataset.position||"top",n=i.getBoundingClientRect(),r=document.documentElement.clientWidth,a=document.documentElement.clientHeight,o=(c,l,u)=>Math.max(uc,Math.min(c,u-l-uc));t.style.translate="none",s==="left"||s==="right"?t.style.top=`${Math.round(o(n.top+(n.height-t.offsetHeight)/2,t.offsetHeight,a))}px`:t.style.left=`${Math.round(o(n.left+(n.width-t.offsetWidth)/2,t.offsetWidth,r))}px`}#E=!1;#y(){let t=this.getAttribute("delay"),i=this.#t;if(t===null||!i)return;let s=parseInt(t,10);!Number.isFinite(s)||s<0||(i.style.setProperty("interest-delay-start",`${s}ms`),i.style.setProperty("--interest-delay-start",`${s}ms`),this.#E=!0)}#x=()=>{clearTimeout(this.#n);let t=this.#s?300:200,i=parseInt(this.getAttribute("delay")||String(t),10);this.setState("show-pending",!0),this.#i=setTimeout(()=>{this.setState("show-pending",!1),this.show()},i)};#g=()=>{clearTimeout(this.#i),this.setState("show-pending",!1);let t=this.#s?200:100;this.#n=setTimeout(()=>this.hide(),t)};#S=()=>{this.#f||(clearTimeout(this.#n),this.show())};#w=()=>{clearTimeout(this.#i),this.setState("show-pending",!1),this.hide()};#A=()=>{clearTimeout(this.#n)};#M=t=>{if(t.key!=="Escape"||!this.isVisible)return;clearTimeout(this.#i);let i=this.#s&&this.#e?.contains(document.activeElement);this.hide(),i&&(this.#f=!0,this.#t?.focus({preventScroll:!0}),this.#f=!1)};show(){!this.#e||this.isVisible||(typeof this.#e.show=="function"?this.#e.show():this.#e.showPopover(),js||this.#h())}hide(){!this.#e||!this.isVisible||(typeof this.#e.hide=="function"?this.#e.hide():this.#e.hidePopover())}get isVisible(){return this.#e?.matches(":popover-open")??!1}};w("tool-tip",Ks);var Ys=0,Ee='button, a, [role="menuitem"]',hi='menu, ul[role="menu"]',Vm=500;function Gs(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}var Xs=class extends E{#t;#e;#i;#n;#s=[];#o=-1;#r=!1;#a=!1;#l=null;#c="";#b=!1;#f=!1;#u=null;#p(){return this.querySelector(`:scope > :is(${hi}), :scope > pop-over[data-dropdown-host] > :is(${hi})`)}setup(){let t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button:not([data-dropdown-toggle])");if(!t)return!1;this.#t=t;let i=this.#p();if(!i)return!1;this.#i=i,this.#a=this.hasAttribute("hover"),this.#t.id||(this.#t.id=`dropdown-trigger-${++Ys}`);let s=this.querySelector(":scope > pop-over[data-dropdown-host]");return s?this.#n=s:(this.#n=document.createElement("pop-over"),this.#n.setAttribute("data-dropdown-host",""),this.#n.id=`dropdown-${++Ys}`,this.#n.dataset.mode=this.#a?"manual":"auto",this.#n.dataset.position=this.getAttribute("position")||"bottom-start",this.#n.dataset.anchor=this.#t.id,this.#n.appendChild(this.#i),this.appendChild(this.#n)),this.#n.dataset.mode=this.#a?"manual":"auto",this.#n.dataset.position=this.getAttribute("position")||"bottom-start",this.#n.dataset.anchor=this.#t.id,this.#i.parentElement!==this.#n&&this.#n.appendChild(this.#i),this.#i.id||(this.#i.id=`dropdown-menu-${++Ys}`),this.#a?this.#d():this.#v(),this.listen(this.#i,"click",this.#A,{capture:!0}),this.listen(this.#i,"click",this.#M),this.listen(this.#n,"pop-over:hide",this.#C),this.listen(this.#n,"pop-over:show",this.#j),!0}#v(){this.#e=this.#t,this.querySelector(":scope > button[data-dropdown-toggle]")?.remove(),this.#t.setAttribute("aria-haspopup","menu"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-controls",this.#i.id),this.#i.setAttribute("role","menu"),this.#E(),this.listen(this.#t,"pointerdown",this.#y),this.listen(this.#t,"click",this.#x),this.listen(this.#t,"keydown",this.#g),this.listen(this.#i,"keydown",this.#S)}#d(){let t=this.#t;if(this.#t.localName==="a"){if(t=this.querySelector(":scope > button[data-dropdown-toggle]"),t||(t=document.createElement("button"),t.setAttribute("type","button"),t.setAttribute("data-dropdown-toggle",""),this.#t.after(t)),!t.hasAttribute("aria-label")&&!t.textContent.trim()){let i=this.#t.textContent.trim().replace(/\s+/g," ");t.setAttribute("aria-label",`${i} submenu`)}this.#t.removeAttribute("aria-haspopup"),this.#t.removeAttribute("aria-expanded"),this.#t.removeAttribute("aria-controls")}t&&(this.#e=t,t.removeAttribute("aria-haspopup"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",this.#i.id),this.#i.removeAttribute("role"),this.#i.querySelectorAll(':scope > li[role="none"]').forEach(i=>i.removeAttribute("role")),this.#s=this.#m(),this.#s.forEach(i=>{i.getAttribute("role")==="menuitem"&&i.removeAttribute("role"),i.getAttribute("tabindex")==="-1"&&i.removeAttribute("tabindex"),i.hasAttribute("data-disabled")&&i.setAttribute("aria-disabled","true")}),this.#h(),this.listen(t,"click",this.#k),this.listen(this,"pointerenter",this.#D),this.listen(this,"pointerleave",this.#R),this.listen(this,"focusout",this.#N),this.listen(document,"keydown",this.#F),this.listen(document,"pointerdown",this.#I))}teardown(){this.#l&&clearTimeout(this.#l),this.#l=null,this.#u&&clearTimeout(this.#u),this.#u=null,this.#c="",this.#r&&this.#n?.hide?.(),this.#r=!1,this.#f=!1,this.#o=-1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false")}get items(){let t=this.#i||this.#p();if(!t)return[];let i=[];for(let s of t.querySelectorAll(":scope > li")){if(s.matches('[role="separator"]')||s.querySelector(":scope > hr")){i.push({separator:!0});continue}let n=s.querySelector(Ee);n&&i.push({label:n.textContent.trim().replace(/\s+/g," "),value:n.getAttribute("data-value")||void 0,href:n.tagName==="A"?n.getAttribute("href"):void 0,disabled:Gs(n)||void 0})}return i}set items(t){let i=Array.isArray(t)?t:[],s=this.#i||this.#p();for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else{let a=n.href?document.createElement("a"):document.createElement("button");n.href?a.setAttribute("href",n.href):a.setAttribute("type","button"),n.value&&a.setAttribute("data-value",n.value),n.disabled&&(a.setAttribute("data-disabled",""),a.setAttribute("aria-disabled","true")),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this._reinit(),this.dispatchEvent(new CustomEvent("drop-down:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#m(){return Array.from(this.#i.querySelectorAll(Ee)).filter(t=>t.closest(hi)===this.#i&&!t.closest('[role="separator"]'))}#h(){this.#i.querySelectorAll(':scope > li:empty, :scope > [role="separator"], :scope > hr').forEach(t=>{t.setAttribute("role","separator")})}#E(){let t=this.#m();t.forEach(i=>{i.setAttribute("role","menuitem"),i.setAttribute("tabindex","-1"),i.hasAttribute("data-disabled")&&i.setAttribute("aria-disabled","true")}),this.#s=t.filter(i=>!i.disabled),this.#i.querySelectorAll(":scope > li").forEach(i=>{i.querySelector(`:scope > :is(${Ee})`)&&i.setAttribute("role","none")}),this.#h()}#y=()=>{this.#b=this.#r};#x=t=>{let i=this.#b;if(this.#b=!1,!(t.detail!==0&&i&&!this.#r)){if(t.detail===0&&!this.#r){this.open(),this.#T(0);return}this.toggle()}};#g=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.open(),this.#T(0);break;case"ArrowUp":case"Up":t.preventDefault(),this.open(),this.#T(this.#s.length-1);break}};#S=t=>{if(!(t.defaultPrevented||t.target.closest?.(hi)!==this.#i))switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#T(this.#o+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#T(this.#o-1);break;case"Home":t.preventDefault(),this.#T(0);break;case"End":t.preventDefault(),this.#T(this.#s.length-1);break;case"Escape":t.preventDefault(),this.close(),this.#e?.focus();break;case"Tab":this.close();break;case"Enter":case" ":{t.preventDefault();let s=this.#s[this.#o];s&&!Gs(s)&&s.click();break}default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&this.#w(t.key)}};#w(t){this.#u&&clearTimeout(this.#u),this.#u=setTimeout(()=>{this.#c=""},Vm),this.#c+=t.toLowerCase();let i=this.#c,s=[...i].every(a=>a===i[0])?i[0]:i,n=this.#s.length,r=s.length>1?0:1;for(let a=0;a<n;a++){let o=(this.#o+r+a+n)%n;if(this.#s[o].textContent.trim().toLowerCase().startsWith(s)){this.#T(o);return}}}#A=t=>{let i=t.target.closest?.(Ee);i&&this.#s.includes(i)&&Gs(i)&&(t.preventDefault(),t.stopPropagation())};#M=t=>{let i=t.target.closest?.(Ee);!i||!this.#s.includes(i)||i.closest("drop-down")===this&&(t.defaultPrevented||(this.dispatchEvent(new CustomEvent("drop-down:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})),this.close(),this.#e?.focus()))};#k=t=>{if(this.#_(),t.detail!==0&&this.#f&&this.#r){this.#f=!1;return}this.toggle()};#_(){this.#l&&(clearTimeout(this.#l),this.#l=null,this.setState("hover-grace-pending",!1))}#D=t=>{t.pointerType==="mouse"&&(this.#_(),this.#r||(this.open(),this.#f=!0))};#R=t=>{t.pointerType!=="mouse"||!this.#r||this.contains(document.activeElement)&&document.activeElement!==this.#e&&document.activeElement!==this.#t||(this.setState("hover-grace-pending",!0),this.#l=setTimeout(()=>{this.#l=null,this.setState("hover-grace-pending",!1),this.close()},100))};#N=t=>{let i=t.relatedTarget;i&&this.contains(i)||!i&&this.matches(":hover")||this.close()};#F=t=>{if(t.key!=="Escape"||!this.#r)return;let i=this.contains(document.activeElement);t.preventDefault(),this.close(),i&&this.#e?.focus()};#I=t=>{if(!this.#r)return;t.composedPath().includes(this)||this.close()};#j=t=>{t.target!==this.#n||this.#r||(this.#r=!0,this.setAttribute("open",""),this.#e?.setAttribute("aria-expanded","true"),this.#o=-1,this.dispatchEvent(new CustomEvent("drop-down:open",{bubbles:!0})))};#C=t=>{t.target!==this.#n||!this.#r||(this.#r=!1,this.#f=!1,this.removeAttribute("open"),this.#e?.setAttribute("aria-expanded","false"),this.#o=-1,this.#i?.contains(document.activeElement)&&this.#e?.focus(),this.dispatchEvent(new CustomEvent("drop-down:close",{bubbles:!0})))};#T(t){this.#s.length!==0&&(t<0&&(t=this.#s.length-1),t>=this.#s.length&&(t=0),this.#o=t,this.#s[t].focus())}open(){this.#r||!this.#n||this.#n.show()}close(){!this.#r||!this.#n||this.#n.hide()}toggle(){this.#r?this.close():this.open()}get isOpen(){return this.#r}};w("drop-down",Xs);ye();function Ht({basePath:e,set:t,name:i}){return`${e}/${t}/${i}.svg`}function fi(e,t=document){let i=e.getAttribute("data-icon-set");if(i)return i;let s=e.closest("[data-icon-set]")?.getAttribute("data-icon-set");return s||t.documentElement.dataset.iconSet||"lucide"}function pi(e=document){let t=e.documentElement.dataset.iconPath;if(t)return t;let i=`${ge()}/icons`;try{return new URL(i,e.baseURI).href}catch{return i}}function Zs(e){let t=e.getAttribute("data-icon");if(!t){e.style.removeProperty("--vb-icon");return}let i=Ht({basePath:pi(document),set:fi(e,document),name:t});e.style.setProperty("--vb-icon",`url("${i}")`)}function Js(e=document){for(let t of e.querySelectorAll("[data-icon]"))Zs(t)}var hc=!1;function zm(){if(hc)return;hc=!0,Js(),new MutationObserver(t=>{for(let i of t)if(i.type==="attributes"){let s=i.target;s.hasAttribute&&s.hasAttribute("data-icon")&&Zs(s),i.attributeName==="data-icon-set"&&Js(s)}else for(let s of i.addedNodes){if(s.nodeType!==1)continue;let n=s;n.hasAttribute("data-icon")&&Zs(n),Js(n)}}).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-icon","data-icon-set"]})}typeof document<"u"&&zm();var fc=`
|
|
12
12
|
:host {
|
|
13
13
|
display: inline-flex;
|
|
14
14
|
align-items: center;
|
|
@@ -73,7 +73,7 @@ svg {
|
|
|
73
73
|
:host([hidden]) {
|
|
74
74
|
display: none;
|
|
75
75
|
}
|
|
76
|
-
`;Ht();var on="lucide",db=new Set([on,"custom"]),yc=new Map,rn=new Set,an=new Map,wc=new Map;function hb(e,t){let i=`${e}/${t}`,s=wc.get(i);return s||(s=fetch(`${i}.json`).then(n=>n.ok?n.json():null).then(n=>Array.isArray(n)?new Set(n.map(String)):null).catch(()=>null),wc.set(i,s)),s}function fb(e){if(!e.includes("<svg"))return null;let t=new DOMParser().parseFromString(e,"image/svg+xml"),i=t.documentElement;return!i||i.localName!=="svg"||t.querySelector("parsererror")?null:(gc(i),i.removeAttribute("width"),i.removeAttribute("height"),document.importNode(i,!0))}function Ac(e){let t=yc.get(e);if(t)return Promise.resolve(t);if(rn.has(e))return Promise.reject(new Error(`Icon not found: ${e}`));let i=an.get(e);return i||(i=fetch(e).then(async s=>{if(!s.ok)throw rn.add(e),new Error(`Icon not found: ${e}`);let n=fb(await s.text());if(!n)throw rn.add(e),new Error(`Invalid SVG: ${e}`);return yc.set(e,n),n}).finally(()=>an.delete(e)),an.set(e,i)),i}async function pb(e,t,i){if(t!==on){let s=db.has(t)?null:await hb(e,t);if(!s||s.has(i))try{return await Ac(Bt({basePath:e,set:t,name:i}))}catch{}}return Ac(Bt({basePath:e,set:on,name:i}))}var cn=class e extends HTMLElement{static#t=new Set;static#e=null;static#i(){e.#e||(e.#e=new MutationObserver(t=>{let i=document.documentElement;for(let s of t){let n=s.target;for(let r of e.#t)(n===i||n.contains(r))&&r.#c()}}),e.#e.observe(document.documentElement,{subtree:!0,attributes:!0,attributeFilter:["data-icon-set","data-icon-path"]}))}static get observedAttributes(){return["name","set","label","base-path"]}#n=0;#s="";#o="";#r="";#a=null;constructor(){super();let t=this.attachShadow({mode:"open"});t.innerHTML=`<style>${dc}</style><slot></slot>`}get name(){return this.getAttribute("name")||""}get set(){return this.getAttribute("set")||hi(this)}get size(){return this.getAttribute("size")||"md"}get label(){return this.getAttribute("label")}get basePath(){return this.getAttribute("base-path")||fi()}get iconPath(){return Bt({basePath:this.basePath,set:this.set,name:this.name})}connectedCallback(){e.#t.add(this),e.#i(),this.#c(),this.#a=()=>{let t=this.#l();t&&(t.style.stroke="none",requestAnimationFrame(()=>{t.style.stroke=""}))},window.addEventListener("vb:theme-change",this.#a),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded"),e.#t.delete(this),this.#a&&(window.removeEventListener("vb:theme-change",this.#a),this.#a=null)}attributeChangedCallback(t,i,s){i===s||!this.isConnected||(t==="label"?this.#f():this.#c())}#l(){return this.shadowRoot?.querySelector("svg")??null}#c(){let t=this.name,i=`${this.basePath}|${this.set}|${t}`;if(i===this.#s){this.#f();return}if(i===this.#o||i===this.#r)return;let s=++this.#n;if(this.#o=i,this.#r="",!t){this.#o="",this.#u("No icon name specified",i);return}let n=this.basePath,r=this.set;pb(n,r,t).then(a=>{s===this.#n&&(this.#o="",this.#b(a.cloneNode(!0),i))},a=>{s===this.#n&&(this.#o="",this.#u(a.message,i))})}#b(t,i){let s=this.shadowRoot,n=this.#l()||s.querySelector("slot");n?n.replaceWith(t):s.append(t),this.#s=i,this.removeAttribute("data-error"),this.#f()}#f(){let t=this.#l();if(!t)return;let i=this.label;i?(t.setAttribute("role","img"),t.setAttribute("aria-label",i),t.removeAttribute("aria-hidden")):(t.removeAttribute("role"),t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true"))}#u(t,i){this.#r=i,this.setAttribute("data-error","true"),console.warn(`icon-wc: ${t}`);let s=this.#l();s&&s.replaceWith(document.createElement("slot")),this.#s=""}};w("icon-wc",cn);zt();var xb="dialog, [data-toc-ignore], browser-window";function mi(e){return!!e.closest(xb)}function Cc(e){if(typeof e.checkVisibility!="function"||e.checkVisibility()||e.closest("details:not([open])")?.checkVisibility())return!0;let i=e.closest('[hidden="until-found"]');return!!i?.parentElement&&(i.parentElement.checkVisibility?.()??!0)}var kb=["h2","h3"],Cb=1500,Tb=0;function Lb(e){let t=String(e).normalize("NFC").toLowerCase().trim().replace(/[^\p{L}\p{M}\p{N}\s_-]/gu,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");return Array.from(t).slice(0,50).join("").replace(/-$/,"")||"section"}function Nb(e,t){let i=e,s=1;for(;t(i);)i=`${e}-${s++}`;return i}function Mb(e){let t=(e??"").split(",").map(i=>i.trim().toLowerCase()).filter(i=>/^h[1-6]$/.test(i));return t.length?[...new Set(t)]:kb}var dn=class extends E{static get observedAttributes(){return["levels","data-label-anchor"]}#t;#e=new WeakMap;setup(){this.#s(),this.listen(this,"click",this.#a),this.#t=new MutationObserver(t=>{t.some(i=>i.type==="childList")&&this.#s()}),this.#t.observe(this,{childList:!0,subtree:!0})}teardown(){this.#t?.disconnect(),this.#t=void 0}attributeChangedCallback(t,i,s){i===s||!this.hasAttribute("data-upgraded")||this.#s()}get#i(){return this.getAttribute("data-label-anchor")||"Copy link to"}#n(t){return t.closest("heading-links")!==this?!1:!mi(t)}#s(){let t=Mb(this.getAttribute("levels")).join(","),i=this.#i;for(let s of this.querySelectorAll(".heading-anchor[data-heading-links]")){if(s.closest("heading-links")!==this)continue;let n=s.parentElement;!n||!n.matches(t)||!this.#n(n)?this.#r(n,s):s.getAttribute("aria-label")!==i&&s.setAttribute("aria-label",i)}for(let s of this.querySelectorAll(t))this.#n(s)&&this.#o(s)}#o(t){if(t.id||(t.id=Nb(Lb(t.textContent??""),a=>!!document.getElementById(a))),t.querySelector(":scope > .heading-anchor"))return;let i=++Tb,s=document.createElement("span");s.className="heading-text",s.id=`heading-links-text-${i}`,s.append(...t.childNodes),t.append(s),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&(t.setAttribute("aria-labelledby",s.id),t.setAttribute("data-heading-links-labelled",""));let n=document.createElement("a");n.className="heading-anchor",n.id=`heading-links-anchor-${i}`,n.dataset.headingLinks="",n.href=`#${t.id}`,n.setAttribute("aria-label",this.#i),n.setAttribute("aria-labelledby",`${n.id} ${s.id}`);let r=document.createElement("icon-wc");r.setAttribute("name","link"),r.setAttribute("size","sm"),n.append(r),t.append(n),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1")}#r(t,i){if(i.remove(),!t)return;let s=t.querySelector(":scope > .heading-text");s&&s.replaceWith(...s.childNodes),t.hasAttribute("data-heading-links-labelled")&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("data-heading-links-labelled"))}#a=t=>{let i=t,n=(i.target instanceof Element?i.target:null)?.closest("a.heading-anchor[data-heading-links]");if(!n||n.closest("heading-links")!==this||i.defaultPrevented||i.button!==0||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey)return;let r=n.parentElement;r?.id&&(i.preventDefault(),this.#l(r,n))};async#l(t,i){qs(t,t.id);let s=new URL(document.URL);if(s.hash=t.id,this.dispatchEvent(new CustomEvent("heading-links:navigate",{bubbles:!0,detail:{id:t.id,url:s.href,heading:t}})),!await ut(s.href,{announceMessage:this.getAttribute("data-label-copied")||"Link copied to clipboard"}))return;let r=i.querySelector("icon-wc");i.dataset.state="copied",r?.setAttribute("name","check"),clearTimeout(this.#e.get(i)),this.#e.set(i,setTimeout(()=>{delete i.dataset.state,r?.setAttribute("name","link"),this.#e.delete(i)},Cb))}};w("heading-links",dn);var fn=class extends E{#t;#e=[];#i=new Map;#n;#s=null;#o=0;#r=0;#a;#l=0;#c=!1;setup(){this.#n=window.matchMedia("(min-width: 64rem)"),this.listen(this.#n,"change",this.#d),this.listen(window,"resize",this.#m),this.listen(window,"hashchange",this.#h),this.listen(this,"click",this.#E),this.#r=requestAnimationFrame(()=>{this.#r=0,this.#f()})}teardown(){cancelAnimationFrame(this.#r),this.#r=0,cancelAnimationFrame(this.#l),this.#l=0,clearTimeout(this.#o),this.#b()}get entries(){return this.#e.map(t=>({id:t.id||void 0,text:t.textContent?.trim()||"",level:parseInt(t.tagName.slice(1),10)||0}))}refresh(){this.isConnected&&(cancelAnimationFrame(this.#r),this.#r=0,this.#f())}#b(){this.#t?.disconnect(),this.#t=void 0,this.#a?.disconnect(),this.#a=void 0;for(let t of this.querySelectorAll(":scope > [data-page-toc-generated]"))t.remove();this.#e=[],this.#i.clear(),this.#s=null,this.#c=!1}#f(){this.#b(),this.#c=this.#u(),this.#c?this.#p():(this.#L(),this.#A()),this.#s&&this.#v()&&(this.#s.open=!0),this.#_(),this.#y()}#u(){return Array.from(this.querySelectorAll("nav, details")).some(t=>!t.closest("[data-page-toc-generated]"))}#p(){this.#s=this.querySelector("details");for(let t of this.querySelectorAll('a[href^="#"]')){let i=hn(t.getAttribute("href")?.slice(1)||"");if(!i)continue;let s=document.getElementById(i);!s||this.#i.has(i)||(this.#e.push(s),this.#i.set(i,t),t.classList.add("link"))}}#v(){return this.#n?.matches??!1}#d=t=>{t.matches&&this.#s&&(this.#s.open=!0)};#m=()=>{clearTimeout(this.#o),this.#o=window.setTimeout(()=>this.#y(),150)};#h=()=>{this.#y()};#E=t=>{let i=t.target instanceof Element?t.target:null;if(!i)return;let s=i.closest("summary");if(s&&this.#s&&s.parentElement===this.#s&&this.#v()){t.preventDefault();return}let n=i.closest('a[href^="#"]');if(!n||!this.contains(n)||t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let r=hn(n.getAttribute("href")?.slice(1)||"");if(this.#i.get(r)!==n)return;let a=document.getElementById(r);a&&(t.preventDefault(),this.#N(a))};#y(){let t=hn(window.location.hash.slice(1));t&&this.#i.has(t)&&this.#x(t)}#x(t){for(let s of this.#i.values())s.classList.remove("active"),s.removeAttribute("aria-current");let i=this.#i.get(t);i&&(i.classList.add("active"),i.setAttribute("aria-current","true"))}#g(){return(this.getAttribute("levels")||"h2,h3").split(",").map(t=>t.trim().toLowerCase())}#S(){return document.querySelector(this.getAttribute("scope")||"main")}#w(t){return Array.from(t.querySelectorAll(this.#g().join(","))).filter(i=>i.id&&!this.contains(i)&&!mi(i)&&Cc(i))}#A(){let t=this.#S();t&&(this.#a=new MutationObserver(i=>{i.every(s=>this.contains(s.target))||this.#l||(this.#l=requestAnimationFrame(()=>{this.#l=0;let s=this.#w(t);s.length===this.#e.length&&s.every((r,a)=>r===this.#e[a]&&this.#i.has(r.id))||this.#f()}))}),this.#a.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-toc-ignore","id","hidden"]}))}#L(){let t=this.#g(),i=this.dataset.title||"On this page",s=this.#S();if(!s||(this.#e=this.#w(s),this.#e.length===0))return;let n={depth:-1,children:[]},r=[n];for(let u of this.#e){let d=t.indexOf(u.tagName.toLowerCase());for(;r[r.length-1].depth>=d;)r.pop();let h={heading:u,depth:d,children:[]};r[r.length-1].children.push(h),r.push(h)}let a=u=>{let d=document.createElement("ul");d.className="list";for(let h of u){let f=document.createElement("li");f.className="item",f.dataset.level=String(h.depth);let p=document.createElement("a");p.href=`#${h.heading.id}`,p.className="link",p.textContent=this.#k(h.heading),f.appendChild(p),h.children.length&&f.appendChild(a(h.children)),d.appendChild(f),this.#i.set(h.heading.id,p)}return d},o=document.createElement("details");o.className="details",o.setAttribute("data-page-toc-generated",""),o.open=!0;let c=document.createElement("summary");c.className="summary",c.textContent=i,o.appendChild(c);let l=document.createElement("nav");l.className="nav",l.setAttribute("aria-label",i),l.appendChild(a(n.children)),o.appendChild(l),this.#s=o,this.appendChild(o)}#k(t){let i=t.cloneNode(!0);return i.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),i.textContent.trim()}#N(t){let i=new URL(window.location.href);i.hash=t.id,window.history.pushState(null,"",i);let s=window.matchMedia("(prefers-reduced-motion: reduce)").matches;t.scrollIntoView({behavior:s?"auto":"smooth",block:"start"}),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.focus({preventScroll:!0}),this.#x(t.id),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:t.id}}))}#_(){if(this.#e.length===0)return;let t=new Set;this.#t=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting?t.add(s.target.id):t.delete(s.target.id);this.#P(t)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let i of this.#e)this.#t.observe(i)}#P(t){for(let i of this.#e)if(t.has(i.id)){this.#x(i.id);return}this.#y()}};function hn(e){try{return decodeURIComponent(e)}catch{return e}}w("page-toc",fn);function bi({newItems:e,nodes:t,keyOf:i,renderItem:s,containerFor:n}){let r=[],a=[],o=[],c=new Set;for(let u of e)c.add(i(u));for(let[u,d]of[...t])c.has(u)||(d.remove(),t.delete(u),o.push(u));let l=new Map;for(let u of e){let d=i(u),h=t.get(d)||null,f=n(u,h);l.has(f)||l.set(f,[]),l.get(f)?.push({item:u,key:d,existing:h})}for(let[u,d]of l)for(let h=0;h<d.length;h++){let{item:f,key:p,existing:m}=d[h],b=m;b?(b.parentElement!==u||u.children[h]!==b)&&a.push(p):(b=s(f),t.set(p,b),r.push(p));let g=u.children[h];g!==b&&u.insertBefore(b,g||null)}return{added:r,moved:a,removed:o}}var pn=":scope > tr:not([data-expand-content])",mn=class e extends E{#t;#e;#i=[];#n=[];#s=[];#o=-1;#r=null;#a=1;#l=0;#c=null;#b=null;#f=null;#u="";#p=null;#v=null;#d=null;#m=null;#h=[];#E=new Map;#y=[];setup(){return this.#t=this.querySelector(":scope > table"),!this.#t||(this.#e=this.#t.querySelector("tbody"),!this.#e)?!1:(this.#x(),!0)}teardown(){this.#P(),this.#i=[],this.#n=[],this.#s=[]}#x(){this.#n=[...this.#e.querySelectorAll(pn)],this.#s=[...this.#n],this.#a=1,this.#o=-1,this.#r=null,this.#u="",this.#l=0,this.#y=[...this.#t.tHead?.rows[0]?.cells||[]].map(i=>({key:i.getAttribute("data-key")||i.textContent.trim().toLowerCase(),label:i.textContent.trim(),sort:i.getAttribute("data-sort")||void 0})),this.#E.clear(),this.#h=[];for(let i of this.#n){let s=i.getAttribute("data-id")||i.getAttribute("data-key");s&&(this.#E.set(s,i),this.#h.push({id:s}))}this.#A(),this.#L(),this.#_(),this.#V(),this.#K(),this.#t.hasAttribute("data-filterable")&&this.#G();let t=this.#t.getAttribute("data-paginate");t&&(this.#l=parseInt(t,10),this.#l>0&&this.#U()),this.#H(),this.#Y(),this.#R()}get rows(){return this.#h}set rows(t){let i=t||[],s=bi({newItems:i,nodes:this.#E,keyOf:n=>n.id,renderItem:n=>this._renderRow(n),containerFor:()=>this.#e});this.#h=i,this.#n=[...this.#e.querySelectorAll(pn)],this.#L(),this.#_(),this.#D(this.#u),this.dispatchEvent(new CustomEvent("data-table:rows-changed",{detail:{rows:i,added:s.added,moved:s.moved,removed:s.removed,source:"api"},bubbles:!0}))}get columns(){return this.#y}_renderRow(t){let i=this;if(typeof i.renderRow=="function"){let n=i.renderRow(t,this.#y);if(!(n instanceof Element))throw new Error("data-table: renderRow must return an Element");return n.hasAttribute("data-id")||n.setAttribute("data-id",String(t.id)),n}let s=document.createElement("tr");s.setAttribute("data-id",String(t.id));for(let n of this.#y){let r=document.createElement("td"),a=t[n.key];r.textContent=a==null?"":String(a),s.appendChild(r)}return s}#g=[];#S=[];#w=[];#A(){let t=[...this.#t.tHead?.rows[0]?.cells||[]];this.#g=t.map(i=>{let s=parseFloat(i.getAttribute("data-weight"));return Number.isFinite(s)?s:null}),this.#S=t.map(i=>i.getAttribute("data-rollup")||null),this.#w=t.map(i=>i.getAttribute("data-heatmap")||null)}#L(){if(this.#S.some(Boolean))for(let t=0;t<this.#S.length;t++){let i=this.#S[t];if(i)for(let s of this.#n){let n=s.children[t];if(!n)continue;let r=this.#k(s,t,i),a=e.#N(r);n.textContent=a,n.setAttribute("data-rollup-value",String(r)),n.hasAttribute("data-sort-value")||n.setAttribute("data-sort-value",String(r))}}}#k(t,i,s){let n=[...t.children],r=0,a=0,o=-1/0,c=0,l=1,u=!1;for(let d=0;d<n.length;d++){if(d===i||this.#S[d])continue;let h=n[d].getAttribute("data-sort-value")??n[d].textContent??"",f=parseFloat(h);if(!Number.isFinite(f))continue;r+=f,a++,f>o&&(o=f),l*=f,u=!0;let p=this.#g[d];p!==null&&(c+=f*p)}switch(s){case"sum":return r;case"avg":return a?r/a:0;case"max":return o===-1/0?0:o;case"weighted-sum":return c;case"product":return u?l:0;default:return r}}static#N(t){return Number.isFinite(t)?Number.isInteger(t)?String(t):(Math.round(t*100)/100).toString():""}#_(){if(this.#w.some(Boolean))for(let t=0;t<this.#w.length;t++){let i=this.#w[t];if(!i)continue;let s=this.#n.map(c=>{let l=c.children[t];if(!l)return null;let u=l.getAttribute("data-rollup-value")??l.getAttribute("data-sort-value")??l.textContent??"",d=parseFloat(u);return Number.isFinite(d)?d:null}),n=s.filter(c=>c!==null);if(!n.length)continue;let r=Math.min(...n),o=Math.max(...n)-r||1;for(let c=0;c<this.#n.length;c++){let l=this.#n[c].children[t];if(!l)continue;let u=s[c];if(u===null){l.removeAttribute("data-heat-level");continue}let d=(u-r)/o;i==="low-good"&&(d=1-d);let h=d<.34?"low":d<.67?"mid":"high";l.setAttribute("data-heat-level",h)}}}#P(){this.#f&&clearTimeout(this.#f),this.#c?.parentElement?.remove(),this.#b?.remove(),this.#d?.remove(),this.#m?.remove(),this.#c=null,this.#b=null,this.#d=null,this.#m=null}#O(t,i){return this.dataset[`label${t}`]||i}#V(){let t=document.createElement("span");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.setAttribute("data-table-status",""),t.className="visually-hidden",this.appendChild(t),this.#d=t}#$(t){let i=this.#d;i&&(i.textContent=i.textContent===t?`${t}\xA0`:t)}#K(){this.#t.querySelectorAll("thead th[data-sort]").forEach((i,s)=>{let n=i.getAttribute("data-sort"),r=this.#T(i);this.#i.push({th:i,sortType:n,columnIndex:r}),i.setAttribute("aria-sort","none"),e.#M(i),i.dataset.columnIndex=r,this.listen(i,"click",this.#B)})}static#M(t){if(t.querySelector(":scope > button[data-sort-button]"))return;let i=document.createElement("button");i.type="button",i.setAttribute("data-sort-button",""),i.append(...t.childNodes),t.appendChild(i)}#T(t){return[...t.parentElement.children].indexOf(t)}#B=t=>{let i=t.currentTarget,s=t.target.closest?.("a, input, select, textarea, button:not([data-sort-button])");if(s&&i.contains(s))return;let n=parseInt(i.dataset.columnIndex,10);this.#I(n)};#et(t,i,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.#q(n[a-1].children[t],i),c=this.#q(n[a].children[t],i);if((typeof o=="string"?o.localeCompare(c)*r:(o-c)*r)>0)return!1}return!0}#I(t){let i=this.#i.find(r=>r.columnIndex===t);if(!i)return;let s;this.#o===t?s=this.#r==="asc"?"desc":"asc":this.#et(t,i.sortType,"asc")?s="desc":s="asc",this.#i.forEach(({th:r})=>{r.setAttribute("aria-sort","none")}),i.th.setAttribute("aria-sort",s==="asc"?"ascending":"descending"),this.#o=t,this.#r=s,this.#C(t,s,i.sortType),this.#a=1,this.#R();let n=i.th.textContent.trim();this.#$(`Sorted by ${n}, ${s==="asc"?"ascending":"descending"}`),this.dispatchEvent(new CustomEvent("data-table:sort",{detail:{column:t,direction:s,columnName:n},bubbles:!0}))}#C(t,i,s){let n=i==="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.#q(o,s),u=this.#q(c,s),d=0;switch(s){case"number":d=l-u;break;case"date":d=l-u;break;default:d=l.localeCompare(u,void 0,{numeric:!0,sensitivity:"base"});break}return d*n})}#q(t,i){let n=t.getAttribute("data-sort-value")??t.textContent.trim();switch(i){case"number":return parseFloat(n)||0;case"date":return new Date(n).getTime()||0;default:return n.toLowerCase()}}#G(){let t=document.createElement("div");t.setAttribute("data-table-filter","");let i=document.createElement("input");i.type="search",i.setAttribute("data-filter-input",""),i.setAttribute("placeholder","Filter table..."),i.setAttribute("aria-label","Filter table rows"),t.appendChild(i),this.insertBefore(t,this.#t),this.#c=i;let s=document.createElement("p");s.setAttribute("data-table-empty",""),s.hidden=!0,s.textContent=this.#O("NoResults","No matching rows found"),this.#t.after(s),this.#m=s,this.listen(i,"input",this.#Z)}#Z=t=>{let i=t.target.value;this.#f&&clearTimeout(this.#f),this.#f=setTimeout(()=>{this.#D(i,{announce:!0})},150)};#D(t,{announce:i=!1,keepPage:s=!1}={}){if(this.#u=String(t??"").toLowerCase().trim(),this.#u===""?this.#s=[...this.#n]:this.#s=this.#n.filter(n=>[...n.children].some(a=>(a.getAttribute("data-filter-value")??a.textContent).toLowerCase().includes(this.#u))),this.#o>=0&&this.#r){let n=this.#i.find(r=>r.columnIndex===this.#o);n&&this.#C(this.#o,this.#r,n.sortType)}if(s?this.#a=Math.min(this.#a,this.totalPages):this.#a=1,this.#R(),i){let n=this.#s.length,r=this.#n.length;this.#$(n===0?this.#O("NoResults","No matching rows found"):this.#u?`${n} of ${r} ${r===1?"row":"rows"} shown`:`All ${r} ${r===1?"row":"rows"} shown`)}this.dispatchEvent(new CustomEvent("data-table:filter",{detail:{query:this.#u,count:this.#s.length},bubbles:!0}))}#U(){let t=document.createElement("nav");t.setAttribute("data-pagination",""),t.setAttribute("aria-label","Table pagination"),this.appendChild(t),this.#b=t}#H(){for(let t of this.#e.querySelectorAll(":scope > tr[data-expandable]")){let i=t.querySelector('[data-action="toggle-expand"]');i&&i.setAttribute("aria-expanded",String(t.hasAttribute("data-state-expanded")))}this.listen(this.#t,"click",this.#Q)}#Q=t=>{let i=t.target.closest('[data-action="toggle-expand"]');if(!i)return;let s=i.closest("tr[data-expandable]");if(!s)return;let n=s.hasAttribute("data-state-expanded"),r=s.nextElementSibling;n?(s.removeAttribute("data-state-expanded"),i.setAttribute("aria-expanded","false"),r?.hasAttribute("data-expand-content")&&(r.hidden=!0,r.setAttribute("aria-hidden","true"))):(s.setAttribute("data-state-expanded",""),i.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}))};#Y(){this.#p=this.#t.querySelector('thead [data-action="select-all"]'),this.#p&&this.listen(this.#p,"change",this.#F),this.listen(this.#e,"change",this.#it),this.#v=this.querySelector("[data-selected-count]"),this.#W()}#F=t=>{let i=t.target.checked;this.#e.querySelectorAll("tr[data-selectable]").forEach(n=>{let r=n.querySelector('[data-action="select-row"]');i?(n.setAttribute("data-state-selected",""),r&&(r.checked=!0)):(n.removeAttribute("data-state-selected"),r&&(r.checked=!1))}),t.target.indeterminate=!1,this.#X(),this.#z(),this.#j()};#it=t=>{let i=t.target.closest('[data-action="select-row"]');if(!i)return;let s=i.closest("tr[data-selectable]");s&&(i.checked?s.setAttribute("data-state-selected",""):s.removeAttribute("data-state-selected"),this.#W(),this.#z(),this.#j())};#z(){let t=this.getSelectedRows().length;this.#$(`${t} ${t===1?"row":"rows"} selected`)}#W(){if(!this.#p){this.#X();return}let t=this.#e.querySelectorAll("tr[data-selectable]"),i=this.#e.querySelectorAll("tr[data-selectable][data-state-selected]"),s=t.length,n=i.length;n===0?(this.#p.checked=!1,this.#p.indeterminate=!1):n===s?(this.#p.checked=!0,this.#p.indeterminate=!1):(this.#p.checked=!1,this.#p.indeterminate=!0),this.#X()}#X(){let i=this.#e.querySelectorAll("tr[data-selectable][data-state-selected]").length;this.#v&&(this.#v.textContent=i)}#j(){let t=[...this.#e.querySelectorAll("tr[data-selectable][data-state-selected]")];this.dispatchEvent(new CustomEvent("data-table:selection",{detail:{count:t.length,rows:t},bubbles:!0}))}#J(){if(!this.#b||this.#l<=0)return;let t=this.#b,i=Math.ceil(this.#s.length/this.#l),s=document.activeElement,n=null;if(s instanceof HTMLElement&&t.contains(s)&&(n=s.hasAttribute("data-pagination-prev")?"prev":s.hasAttribute("data-pagination-next")?"next":"page"),t.replaceChildren(),i<=1)return;let r=document.createElement("button");r.type="button",r.textContent="Previous",r.setAttribute("data-pagination-prev",""),r.disabled=this.#a===1,r.addEventListener("click",()=>this.goToPage(this.#a-1)),t.appendChild(r),this.#st(i).forEach(c=>{if(c==="..."){let l=document.createElement("span");l.textContent="...",l.setAttribute("data-pagination-ellipsis",""),t.appendChild(l)}else{let l=document.createElement("button");l.type="button",l.textContent=c,l.setAttribute("data-pagination-page",""),c===this.#a&&(l.setAttribute("aria-current","page"),l.setAttribute("data-current","")),l.addEventListener("click",()=>this.goToPage(c)),t.appendChild(l)}});let o=document.createElement("button");if(o.type="button",o.textContent="Next",o.setAttribute("data-pagination-next",""),o.disabled=this.#a===i,o.addEventListener("click",()=>this.goToPage(this.#a+1)),t.appendChild(o),n){let c=t.querySelector('[aria-current="page"]');(n==="prev"&&!r.disabled?r:n==="next"&&!o.disabled?o:c)?.focus()}}#st(t){let i=this.#a,s=[];if(t<=7)for(let n=1;n<=t;n++)s.push(n);else{s.push(1),i>3&&s.push("...");let n=Math.max(2,i-1),r=Math.min(t-1,i+1);for(let a=n;a<=r;a++)s.push(a);i<t-2&&s.push("..."),s.push(t)}return s}#R(){this.#n.forEach(s=>{s.setAttribute("data-state-hidden",""),this.#tt(s)?.setAttribute("data-state-hidden","")});let t;if(this.#l>0){let s=(this.#a-1)*this.#l,n=s+this.#l;t=this.#s.slice(s,n)}else t=this.#s;t.forEach(s=>{s.removeAttribute("data-state-hidden");let n=this.#tt(s);this.#e.appendChild(s),n&&(n.removeAttribute("data-state-hidden"),this.#e.appendChild(n))}),this.#s.forEach(s=>{if(s.hasAttribute("data-state-hidden")){let n=this.#tt(s);this.#e.appendChild(s),n&&this.#e.appendChild(n)}});let i=new Set(this.#s);this.#n.forEach(s=>{if(!i.has(s)){let n=this.#tt(s);this.#e.appendChild(s),n&&this.#e.appendChild(n)}}),this.#m&&(this.#m.hidden=!(this.#u&&this.#s.length===0&&this.#n.length>0)),this.#J()}#tt(t){if(!t.hasAttribute("data-expandable"))return null;let i=t.nextElementSibling;return i?.hasAttribute("data-expand-content")?i:null}goToPage(t){if(this.#l<=0)return;let i=Math.max(1,Math.ceil(this.#s.length/this.#l)),s=Math.max(1,Math.min(Math.trunc(Number(t))||1,i));s!==this.#a&&(this.#a=s,this.#R(),this.dispatchEvent(new CustomEvent("data-table:page",{detail:{page:this.#a},bubbles:!0})))}setFilter(t){this.#c&&(this.#c.value=t),this.#D(t,{announce:!0})}refresh(){this.#e&&(this.#n=[...this.#e.querySelectorAll(pn)],this.#L(),this.#_(),this.#D(this.#u,{keepPage:!0}),this.#W())}get currentPage(){return this.#a}get totalPages(){return this.#l<=0?1:Math.max(1,Math.ceil(this.#s.length/this.#l))}get filteredCount(){return this.#s.length}get totalCount(){return this.#n.length}getSelectedRows(){return this.#e?[...this.#e.querySelectorAll("tr[data-selectable][data-state-selected]")]:[]}};w("data-table",mn);wi();var Vb={trigger:"Search",dialog:"Site search",placeholder:"Search documentation...",input:"Search",results:"Search results",searching:"Searching...",empty:"No results found",count:"{count} results","count-one":"1 result","count-more":"{count} of {total} results",unavailable:"Search unavailable",error:"Search error. Please try again.",untitled:"Untitled",navigate:"to navigate",select:"to select",close:"to close",dismiss:"Close search",browse:"Browse instead",powered:"Powered by"},zb=0,Ai=new Set,xe=null;function Ub(e){return typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0}function Wb(){let e=[...Ai].filter(s=>s.isConnected),t=e.find(s=>s.isOpen);if(t){t.close();return}(e.find(s=>Ub(s))??e[0])?.open()}function jb(e){Ai.add(e),!xe&&!Rc().includes("meta+k")&&(xe=jt("meta+k",Wb,{global:!0}))}function Kb(e){Ai.delete(e),Ai.size===0&&xe&&(xe(),xe=null)}function q(e,t={},i=[]){let s=document.createElement(e);for(let[n,r]of Object.entries(t))s.setAttribute(n,r);return s.append(...i),s}function Yb(e){let t=document.createDocumentFragment();if(!e||typeof e!="string")return t;let i=document.createElement("template");i.innerHTML=e;let s=(n,r)=>{for(let a of n.childNodes)if(a.nodeType===Node.TEXT_NODE)r.appendChild(document.createTextNode(a.textContent??""));else if(a.nodeType===Node.ELEMENT_NODE)if(a.localName==="mark"){let o=document.createElement("mark");s(a,o),r.appendChild(o)}else s(a,r)};return s(i.content,t),t}function Gb(e){if(typeof e!="string"||!e)return null;try{let t=new URL(e,document.baseURI);return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==location.origin?null:t.href}catch{return null}}var vn=class e extends E{static#t=150;static#e=8;#i=null;#n=null;#s=null;#o=null;#r=null;#a=null;#l=[];#c=-1;#b=!1;#f=0;#u="";#p=null;#v=!1;#d=null;setup(){this.#u||(this.#u=`site-search-${++zb}`),this.#h(),this.#E(),jb(this)}teardown(){Kb(this),this.#b&&(document.body.style.overflow="",this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),this.#b=!1),this.#V(),this.#f++,this.#l=[],this.#c=-1,this.#r&&this.append(this.#r),this.#r=null,this.#n?.remove(),this.#n=null}#m(t){let i=`data-label-${t}`;return this.getAttribute(i)??Vb[t]}get value(){return this.#s?.value??""}set value(t){if(!this.#s)return;let i=t==null?"":String(t);this.#s.value!==i&&(this.#s.value=i,this.#s.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new CustomEvent("site-search:change",{detail:{value:i,source:"api"},bubbles:!0})))}get results(){return[...this.#l]}#h(){this.#i=this.querySelector(":scope > [data-trigger]"),this.#i||(this.#i=this.querySelector(":scope > button")),this.#i||(this.#i=q("button",{type:"button","data-trigger":""},[q("icon-wc",{name:"search",label:this.#m("trigger")})]),this.prepend(this.#i));let t=`${this.#u}-dialog`,i=`${this.#u}-results`;this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("aria-controls",t),this.#s=q("input",{type:"search",name:"search",class:"input",placeholder:this.#m("placeholder"),autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"combobox","aria-label":this.#m("input"),"aria-autocomplete":"list","aria-controls":i,"aria-expanded":"false"}),this.#o=q("div",{class:"results",id:i,role:"listbox","aria-label":this.#m("results")}),this.#a=q("p",{class:"search-status",role:"status"});let s=n=>q("kbd",{},[n]);if(this.#n=q("dialog",{class:"dialog",id:t,"aria-label":this.#m("dialog")},[q("search",{class:"search"},[q("div",{class:"input-wrapper"},[q("icon-wc",{name:"search",class:"icon"}),this.#s,q("button",{type:"button",class:"shortcut","aria-label":this.#m("dismiss")},[q("kbd",{},["Esc"]),q("icon-wc",{name:"x",size:"sm"})])]),this.#a,this.#o]),q("div",{class:"footer"},[q("span",{class:"hint"},[s("\u2191"),s("\u2193"),` ${this.#m("navigate")} `,s("\u21B5"),` ${this.#m("select")} `,s("esc"),` ${this.#m("close")}`]),q("span",{class:"powered"},[`${this.#m("powered")} `,q("a",{href:"https://pagefind.app",target:"_blank",rel:"noopener"},["Pagefind"])])])]),this.#r=this.querySelector(":scope > nav[data-browse]"),this.#r){let n=this.#r.getAttribute("aria-label")||this.#m("browse");this.#r.setAttribute("aria-label",n);let r=q("p",{class:"browse-title","aria-hidden":"true"},[n]);this.#n.querySelector(".search")?.after(q("div",{class:"browse"},[r,this.#r]))}this.appendChild(this.#n)}#E(){this.listen(this.#i,"click",this.#y),this.#n.addEventListener("close",this.#x),this.#n.addEventListener("click",this.#g),this.#s.addEventListener("input",this.#S),this.#s.addEventListener("keydown",this.#w),this.#o.addEventListener("click",this.#A)}#y=t=>{t.stopPropagation(),this.open()};#x=()=>{this.#b&&!this.#n?.open&&this.#$()};#g=t=>{if(t.target.closest?.(".shortcut")){this.close();return}if(t.target!==this.#n)return;let i=this.#n.getBoundingClientRect();t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom||this.close()};#S=()=>{this.#V(),this.setState("input-debounce-pending",!0),this.#d=setTimeout(()=>{this.#d=null,this.setState("input-debounce-pending",!1),this.#_(this.#s.value)},e.#t)};#w=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#O(this.#c+1);break;case"ArrowUp":t.preventDefault(),this.#O(this.#c-1);break;case"Escape":t.preventDefault(),this.close();break;case"Enter":{t.preventDefault();let i=this.#c>=0?this.#c:0,s=this.#o.querySelector(`[data-result-index="${i}"]`)?.getAttribute("href");s&&(this.close(),window.location.assign(s));break}}};#A=t=>{t.target.closest("[data-result-index]")&&(t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||setTimeout(()=>this.close(),0))};get#L(){let t=this.getAttribute("data-pagefind-path")||"/pagefind/";return t.endsWith("/")?t:`${t}/`}async#k(){if(this.#p||this.#v)return;let t=new URL(this.#L,document.baseURI),i=this.getAttribute("data-base-url")??new URL("..",t).pathname;try{let s=await import(new URL("pagefind.js",t).href);await s.options({excerptLength:20,baseUrl:i}),this.#p=s}catch{this.#v=!0,console.warn(`[site-search] Pagefind not found at ${t.pathname}pagefind.js. Run \`npm run search:index\` after building, or set data-pagefind-path.`)}}#N(t){this.#a&&(this.#a.textContent=t)}async#_(t){let i=++this.#f;if(!t.trim()){this.#P([]);return}if(this.#N(this.#m("searching")),await this.#k(),i===this.#f){if(!this.#p){this.#l=[],this.#P([]),this.#N(this.#m("unavailable"));return}try{let s=await this.#p.search(t),n=await Promise.all((s?.results??[]).slice(0,e.#e).map(r=>r.data()));if(i!==this.#f)return;this.#l=n,this.#P(n,s?.results?.length??n.length)}catch(s){if(i!==this.#f)return;console.error("[site-search] Search error:",s),this.#l=[],this.#P([]),this.#N(this.#m("error"))}}}#P(t,i=t.length){this.#c=-1,this.#s.removeAttribute("aria-activedescendant");let s=[];for(let n of t){let r=Gb(n?.url);if(!r)continue;let a=q("span",{class:"result-title"});a.textContent=String(n.meta?.title||this.#m("untitled"));let o=q("span",{class:"result-excerpt"});o.append(Yb(n.excerpt||"")),s.push(q("a",{id:`${this.#u}-result-${s.length}`,href:r,class:"result",role:"option","aria-selected":"false","data-result-index":String(s.length),tabindex:"-1"},[a,o]))}if(this.#o.replaceChildren(...s),this.#s.setAttribute("aria-expanded",s.length?"true":"false"),!this.#s.value.trim())this.#N("");else if(s.length===0)this.#N(this.#m("empty"));else{let r=i>e.#e&&i>s.length?this.#m("count-more"):s.length===1?this.#m("count-one"):this.#m("count");this.#N(r.replace("{count}",String(s.length)).replace("{total}",String(i)))}}#O(t){let i=this.#o.querySelectorAll("[data-result-index]");if(i.length===0)return;t<0&&(t=i.length-1),t>=i.length&&(t=0);for(let n of i)n.removeAttribute("data-active"),n.setAttribute("aria-selected","false");this.#c=t;let s=i[t];s.setAttribute("data-active",""),s.setAttribute("aria-selected","true"),this.#s.setAttribute("aria-activedescendant",s.id),s.scrollIntoView({block:"nearest"})}#V(){this.#d&&(clearTimeout(this.#d),this.#d=null),this.setState("input-debounce-pending",!1)}open(){if(!(this.#b||!this.#n)){if(this.#b=!0,this.setAttribute("open",""),this.#i?.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",!this.#n.open)try{this.#n.showModal()}catch{this.#n.setAttribute("open","")}this.#s.focus(),this.#s.select(),this.#k(),this.dispatchEvent(new CustomEvent("site-search:open",{bubbles:!0}))}}close(){this.#b&&(this.#n?.open&&this.#n.close(),this.#b&&this.#$())}#$(){this.#b=!1,this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),document.body.style.overflow="",this.#V(),this.#f++,this.#l=[],this.#c=-1,this.#s&&(this.#s.value="",this.#s.removeAttribute("aria-activedescendant"),this.#s.setAttribute("aria-expanded","false")),this.#o?.replaceChildren(),this.#N(""),this.#i?.focus(),this.dispatchEvent(new CustomEvent("site-search:close",{bubbles:!0}))}get isOpen(){return this.#b}};w("site-search",vn);Ht();Ht();var Xb=/^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*|\[\d+\])*$/;function Fc(e){return!e||typeof e!="string"?!1:Xb.test(e.trim())}function ke(e,t){if(!Fc(t)){console.warn(`[card-list] Unsafe property path rejected: "${t}"`);return}let s=String(t).replace(/\[(\d+)\]/g,".$1").split("."),n=e;for(let r of s){if(n==null)return;n=n[r]}return n}function Jb(e){return e?e.split(",").map(t=>{let[i,s]=t.split(":").map(n=>n.trim());return{attr:(i||"").toLowerCase(),path:s}}).filter(({attr:t,path:i})=>t&&i):[]}var Zb=new Set(["href","src","action","formaction","xlink:href","poster","cite","background","ping","data","manifest","longdesc","codebase"]),Bc=new Set(["srcdoc","style","is"]),Qb=new Set(["http:","https:","mailto:","tel:"]);function Hc(e){let t=String(e).replace(/[\u0000-\u0020\u007f]+/g,"");if(!t)return!0;let i=/^([a-z][a-z0-9+.-]*):/i.exec(t);return i?Qb.has(`${i[1].toLowerCase()}:`):!0}function tg(e){return String(e).split(",").every(t=>Hc(t.trim().split(/\s+/)[0]||""))}function eg(e,t){return e.startsWith("on")||Bc.has(e)||!/^[a-z_][a-z0-9_.:-]*$/.test(e)?!1:e==="srcset"||e==="imagesrcset"?tg(t):Zb.has(e)?Hc(t):!0}function ig(e,t){let i=new Set;return e.map((s,n)=>{let r=s!=null&&typeof s=="object"?s[t]:void 0,a=r==null?null:`k:${String(r)}`;return a==null||i.has(a)?`i:${n}`:(i.add(a),a)})}var qc=":scope > [data-card-list-status]",yn=class extends E{#t=null;#e=[];#i="id";#n=new Map;#s=!1;#o=null;#r=null;static get observedAttributes(){return["src","data-items","data-key"]}setup(){if(this.#t=this.querySelector(":scope > template")||this.querySelector("template"),!this.#t)return console.warn("[card-list] No template found"),!1;if(this.#i=this.getAttribute("data-key")||"id",this.#s)return this.#o&&this.#u(this.#o),this.#o=null,!0;let t=this.getAttribute("data-items");if(t)return this.#a(t),!0;let i=this.getAttribute("src");return i&&this.#f(i),!0}teardown(){this.#l()}attributeChangedCallback(t,i,s){i!==s&&this.hasAttribute("data-upgraded")&&(t==="data-items"?s&&this.#a(s):t==="src"?s?this.#f(s):this.#l():t==="data-key"&&(this.#i=s||"id",this.#u("attribute")))}#a(t){this.#l();try{let i=JSON.parse(t);this.#e=Array.isArray(i)?i:[],this.#s=!0,this.#u("attribute")}catch(i){console.error("[card-list] Invalid JSON in data-items:",i)}}#l(){this.#r&&(this.#r.abort(),this.#r=null,this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.#b(""))}#c(){let t=this.querySelector(qc);return t||(t=document.createElement("p"),t.setAttribute("role","status"),t.setAttribute("data-card-list-status",""),this.append(t)),t}#b(t){let i=this.querySelector(qc);!i&&!t||((i||this.#c()).textContent=t)}async#f(t){this.#l();let i=new AbortController;this.#r=i,this.removeAttribute("data-error"),this.setAttribute("data-loading",""),this.setAttribute("aria-busy","true"),this.#c().textContent="Loading\u2026";try{let s=await fetch(t,{signal:i.signal});if(!s.ok)throw new Error(`HTTP ${s.status}`);let n=await s.json();if(i.signal.aborted)return;this.#e=Array.isArray(n)?n:n?.items||n?.data||[],this.#s=!0,this.#b(""),this.#u("attribute")}catch(s){if(i.signal.aborted)return;let n=s instanceof Error?s.message:String(s);console.error("[card-list] Fetch error:",s),this.setAttribute("data-error",n),this.#b(`Error: ${n}`)}finally{this.#r===i&&(this.#r=null,this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"))}}#u(t){if(!this.#t)return;this.querySelectorAll(":scope > [data-fallback]").forEach(n=>n.remove());let i=this.#t;if([...i.content.children].length!==1){this.querySelectorAll(":scope > :not(template, [data-card-list-status])").forEach(r=>r.remove()),this.#n.clear();let n=document.createDocumentFragment();for(let r of this.#e){let a=i.content.cloneNode(!0);this.#p(a,r),n.appendChild(a)}this.prepend(n)}else{let n=ig(this.#e,this.#i),r=this.#e.map((c,l)=>({item:c,key:n[l]})),a=bi({newItems:r,nodes:this.#n,keyOf:c=>c.key,renderItem:c=>{let u=i.content.cloneNode(!0).firstElementChild;return this.#p(u,c.item),u},containerFor:()=>this}),o=new Set(a.added);for(let{item:c,key:l}of r){if(o.has(l))continue;let u=this.#n.get(l);u&&this.#p(u,c)}}this.dispatchEvent(new CustomEvent("card-list:rendered",{detail:{count:this.#e.length},bubbles:!0})),this.dispatchEvent(new CustomEvent("card-list:items-changed",{detail:{items:this.#e,source:t},bubbles:!0}))}#p(t,i){let s=n=>{let r=[...t.querySelectorAll(n)];return t instanceof Element&&t.matches(n)&&r.unshift(t),r};s("[data-field]").forEach(n=>{let r=ke(i,n.getAttribute("data-field"));n.textContent=r??""}),s("[data-field-attr]").forEach(n=>{for(let{attr:r,path:a}of Jb(n.getAttribute("data-field-attr"))){if(!Fc(a))continue;let o=ke(i,a);if(r.startsWith("on")||Bc.has(r)){console.warn(`[card-list] Refusing to bind "${r}" from data`);continue}let c=r.startsWith("aria-");o==null||o===!1&&!c?n.removeAttribute(r):eg(r,o)?n.setAttribute(r,o===!0&&!c?"":String(o)):(console.warn(`[card-list] Unsafe value refused for "${r}"`),n.removeAttribute(r))}}),s("[data-field-html]").forEach(n=>{n.replaceChildren(pi(ke(i,n.getAttribute("data-field-html"))))}),s("[data-field-if]").forEach(n=>{n.hidden=!ke(i,n.getAttribute("data-field-if"))}),s("[data-field-unless]").forEach(n=>{n.hidden=!!ke(i,n.getAttribute("data-field-unless"))})}get items(){return this.#e}set items(t){this.#l(),this.#e=Array.isArray(t)?t:[],this.#s=!0,this.#t&&this.hasAttribute("data-upgraded")?this.#u("api"):this.#o="api"}};w("card-list",yn);var Vc=`
|
|
76
|
+
`;Vt();var on="lucide",hb=new Set([on,"custom"]),Ac=new Map,rn=new Set,an=new Map,Ec=new Map;function fb(e,t){let i=`${e}/${t}`,s=Ec.get(i);return s||(s=fetch(`${i}.json`).then(n=>n.ok?n.json():null).then(n=>Array.isArray(n)?new Set(n.map(String)):null).catch(()=>null),Ec.set(i,s)),s}function pb(e){if(!e.includes("<svg"))return null;let t=new DOMParser().parseFromString(e,"image/svg+xml"),i=t.documentElement;return!i||i.localName!=="svg"||t.querySelector("parsererror")?null:(yc(i),i.removeAttribute("width"),i.removeAttribute("height"),document.importNode(i,!0))}function Sc(e){let t=Ac.get(e);if(t)return Promise.resolve(t);if(rn.has(e))return Promise.reject(new Error(`Icon not found: ${e}`));let i=an.get(e);return i||(i=fetch(e).then(async s=>{if(!s.ok)throw rn.add(e),new Error(`Icon not found: ${e}`);let n=pb(await s.text());if(!n)throw rn.add(e),new Error(`Invalid SVG: ${e}`);return Ac.set(e,n),n}).finally(()=>an.delete(e)),an.set(e,i)),i}async function mb(e,t,i){if(t!==on){let s=hb.has(t)?null:await fb(e,t);if(!s||s.has(i))try{return await Sc(Ht({basePath:e,set:t,name:i}))}catch{}}return Sc(Ht({basePath:e,set:on,name:i}))}var cn=class e extends HTMLElement{static#t=new Set;static#e=null;static#i(){e.#e||(e.#e=new MutationObserver(t=>{let i=document.documentElement;for(let s of t){let n=s.target;for(let r of e.#t)(n===i||n.contains(r))&&r.#c()}}),e.#e.observe(document.documentElement,{subtree:!0,attributes:!0,attributeFilter:["data-icon-set","data-icon-path"]}))}static get observedAttributes(){return["name","set","label","base-path"]}#n=0;#s="";#o="";#r="";#a=null;constructor(){super();let t=this.attachShadow({mode:"open"});t.innerHTML=`<style>${fc}</style><slot></slot>`}get name(){return this.getAttribute("name")||""}get set(){return this.getAttribute("set")||fi(this)}get size(){return this.getAttribute("size")||"md"}get label(){return this.getAttribute("label")}get basePath(){return this.getAttribute("base-path")||pi()}get iconPath(){return Ht({basePath:this.basePath,set:this.set,name:this.name})}connectedCallback(){e.#t.add(this),e.#i(),this.#c(),this.#a=()=>{let t=this.#l();t&&(t.style.stroke="none",requestAnimationFrame(()=>{t.style.stroke=""}))},window.addEventListener("vb:theme-change",this.#a),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded"),e.#t.delete(this),this.#a&&(window.removeEventListener("vb:theme-change",this.#a),this.#a=null)}attributeChangedCallback(t,i,s){i===s||!this.isConnected||(t==="label"?this.#f():this.#c())}#l(){return this.shadowRoot?.querySelector("svg")??null}#c(){let t=this.name,i=`${this.basePath}|${this.set}|${t}`;if(i===this.#s){this.#f();return}if(i===this.#o||i===this.#r)return;let s=++this.#n;if(this.#o=i,this.#r="",!t){this.#o="",this.#u("No icon name specified",i);return}let n=this.basePath,r=this.set;mb(n,r,t).then(a=>{s===this.#n&&(this.#o="",this.#b(a.cloneNode(!0),i))},a=>{s===this.#n&&(this.#o="",this.#u(a.message,i))})}#b(t,i){let s=this.shadowRoot,n=this.#l()||s.querySelector("slot");n?n.replaceWith(t):s.append(t),this.#s=i,this.removeAttribute("data-error"),this.#f()}#f(){let t=this.#l();if(!t)return;let i=this.label;i?(t.setAttribute("role","img"),t.setAttribute("aria-label",i),t.removeAttribute("aria-hidden")):(t.removeAttribute("role"),t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true"))}#u(t,i){this.#r=i,this.setAttribute("data-error","true"),console.warn(`icon-wc: ${t}`);let s=this.#l();s&&s.replaceWith(document.createElement("slot")),this.#s=""}};w("icon-wc",cn);Ut();var kb="dialog, [data-toc-ignore], browser-window";function bi(e){return!!e.closest(kb)}function Lc(e){if(typeof e.checkVisibility!="function"||e.checkVisibility()||e.closest("details:not([open])")?.checkVisibility())return!0;let i=e.closest('[hidden="until-found"]');return!!i?.parentElement&&(i.parentElement.checkVisibility?.()??!0)}var Cb=["h2","h3"],Tb=1500,Lb=0;function Nb(e){let t=String(e).normalize("NFC").toLowerCase().trim().replace(/[^\p{L}\p{M}\p{N}\s_-]/gu,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");return Array.from(t).slice(0,50).join("").replace(/-$/,"")||"section"}function Mb(e,t){let i=e,s=1;for(;t(i);)i=`${e}-${s++}`;return i}function _b(e){let t=(e??"").split(",").map(i=>i.trim().toLowerCase()).filter(i=>/^h[1-6]$/.test(i));return t.length?[...new Set(t)]:Cb}var dn=class extends E{static get observedAttributes(){return["levels","data-label-anchor"]}#t;#e=new WeakMap;setup(){this.#s(),this.listen(this,"click",this.#a),this.#t=new MutationObserver(t=>{t.some(i=>i.type==="childList")&&this.#s()}),this.#t.observe(this,{childList:!0,subtree:!0})}teardown(){this.#t?.disconnect(),this.#t=void 0}attributeChangedCallback(t,i,s){i===s||!this.hasAttribute("data-upgraded")||this.#s()}get#i(){return this.getAttribute("data-label-anchor")||"Copy link to"}#n(t){return t.closest("heading-links")!==this?!1:!bi(t)}#s(){let t=_b(this.getAttribute("levels")).join(","),i=this.#i;for(let s of this.querySelectorAll(".heading-anchor[data-heading-links]")){if(s.closest("heading-links")!==this)continue;let n=s.parentElement;!n||!n.matches(t)||!this.#n(n)?this.#r(n,s):s.getAttribute("aria-label")!==i&&s.setAttribute("aria-label",i)}for(let s of this.querySelectorAll(t))this.#n(s)&&this.#o(s)}#o(t){if(t.id||(t.id=Mb(Nb(t.textContent??""),a=>!!document.getElementById(a))),t.querySelector(":scope > .heading-anchor"))return;let i=++Lb,s=document.createElement("span");s.className="heading-text",s.id=`heading-links-text-${i}`,s.append(...t.childNodes),t.append(s),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&(t.setAttribute("aria-labelledby",s.id),t.setAttribute("data-heading-links-labelled",""));let n=document.createElement("a");n.className="heading-anchor",n.id=`heading-links-anchor-${i}`,n.dataset.headingLinks="",n.href=`#${t.id}`,n.setAttribute("aria-label",this.#i),n.setAttribute("aria-labelledby",`${n.id} ${s.id}`);let r=document.createElement("icon-wc");r.setAttribute("name","link"),r.setAttribute("size","sm"),n.append(r),t.append(n),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1")}#r(t,i){if(i.remove(),!t)return;let s=t.querySelector(":scope > .heading-text");s&&s.replaceWith(...s.childNodes),t.hasAttribute("data-heading-links-labelled")&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("data-heading-links-labelled"))}#a=t=>{let i=t,n=(i.target instanceof Element?i.target:null)?.closest("a.heading-anchor[data-heading-links]");if(!n||n.closest("heading-links")!==this||i.defaultPrevented||i.button!==0||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey)return;let r=n.parentElement;r?.id&&(i.preventDefault(),this.#l(r,n))};async#l(t,i){qs(t,t.id);let s=new URL(document.URL);if(s.hash=t.id,this.dispatchEvent(new CustomEvent("heading-links:navigate",{bubbles:!0,detail:{id:t.id,url:s.href,heading:t}})),!await ut(s.href,{announceMessage:this.getAttribute("data-label-copied")||"Link copied to clipboard"}))return;let r=i.querySelector("icon-wc");i.dataset.state="copied",r?.setAttribute("name","check"),clearTimeout(this.#e.get(i)),this.#e.set(i,setTimeout(()=>{delete i.dataset.state,r?.setAttribute("name","link"),this.#e.delete(i)},Tb))}};w("heading-links",dn);var fn=class extends E{#t;#e=[];#i=new Map;#n;#s=null;#o=0;#r=0;#a;#l=0;#c=!1;setup(){this.#n=window.matchMedia("(min-width: 64rem)"),this.listen(this.#n,"change",this.#d),this.listen(window,"resize",this.#m),this.listen(window,"hashchange",this.#h),this.listen(this,"click",this.#E),this.#r=requestAnimationFrame(()=>{this.#r=0,this.#f()})}teardown(){cancelAnimationFrame(this.#r),this.#r=0,cancelAnimationFrame(this.#l),this.#l=0,clearTimeout(this.#o),this.#b()}get entries(){return this.#e.map(t=>({id:t.id||void 0,text:t.textContent?.trim()||"",level:parseInt(t.tagName.slice(1),10)||0}))}refresh(){this.isConnected&&(cancelAnimationFrame(this.#r),this.#r=0,this.#f())}#b(){this.#t?.disconnect(),this.#t=void 0,this.#a?.disconnect(),this.#a=void 0;for(let t of this.querySelectorAll(":scope > [data-page-toc-generated]"))t.remove();this.#e=[],this.#i.clear(),this.#s=null,this.#c=!1}#f(){this.#b(),this.#c=this.#u(),this.#c?this.#p():(this.#M(),this.#A()),this.#s&&this.#v()&&(this.#s.open=!0),this.#D(),this.#y()}#u(){return Array.from(this.querySelectorAll("nav, details")).some(t=>!t.closest("[data-page-toc-generated]"))}#p(){this.#s=this.querySelector("details");for(let t of this.querySelectorAll('a[href^="#"]')){let i=hn(t.getAttribute("href")?.slice(1)||"");if(!i)continue;let s=document.getElementById(i);!s||this.#i.has(i)||(this.#e.push(s),this.#i.set(i,t),t.classList.add("link"))}}#v(){return this.#n?.matches??!1}#d=t=>{t.matches&&this.#s&&(this.#s.open=!0)};#m=()=>{clearTimeout(this.#o),this.#o=window.setTimeout(()=>this.#y(),150)};#h=()=>{this.#y()};#E=t=>{let i=t.target instanceof Element?t.target:null;if(!i)return;let s=i.closest("summary");if(s&&this.#s&&s.parentElement===this.#s&&this.#v()){t.preventDefault();return}let n=i.closest('a[href^="#"]');if(!n||!this.contains(n)||t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let r=hn(n.getAttribute("href")?.slice(1)||"");if(this.#i.get(r)!==n)return;let a=document.getElementById(r);a&&(t.preventDefault(),this.#_(a))};#y(){let t=hn(window.location.hash.slice(1));t&&this.#i.has(t)&&this.#x(t)}#x(t){for(let s of this.#i.values())s.classList.remove("active"),s.removeAttribute("aria-current");let i=this.#i.get(t);i&&(i.classList.add("active"),i.setAttribute("aria-current","true"))}#g(){return(this.getAttribute("levels")||"h2,h3").split(",").map(t=>t.trim().toLowerCase())}#S(){return document.querySelector(this.getAttribute("scope")||"main")}#w(t){return Array.from(t.querySelectorAll(this.#g().join(","))).filter(i=>i.id&&!this.contains(i)&&!bi(i)&&Lc(i))}#A(){let t=this.#S();t&&(this.#a=new MutationObserver(i=>{i.every(s=>this.contains(s.target))||this.#l||(this.#l=requestAnimationFrame(()=>{this.#l=0;let s=this.#w(t);s.length===this.#e.length&&s.every((r,a)=>r===this.#e[a]&&this.#i.has(r.id))||this.#f()}))}),this.#a.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-toc-ignore","id","hidden"]}))}#M(){let t=this.#g(),i=this.dataset.title||"On this page",s=this.#S();if(!s||(this.#e=this.#w(s),this.#e.length===0))return;let n={depth:-1,children:[]},r=[n];for(let u of this.#e){let d=t.indexOf(u.tagName.toLowerCase());for(;r[r.length-1].depth>=d;)r.pop();let h={heading:u,depth:d,children:[]};r[r.length-1].children.push(h),r.push(h)}let a=u=>{let d=document.createElement("ul");d.className="list";for(let h of u){let f=document.createElement("li");f.className="item",f.dataset.level=String(h.depth);let p=document.createElement("a");p.href=`#${h.heading.id}`,p.className="link",p.textContent=this.#k(h.heading),f.appendChild(p),h.children.length&&f.appendChild(a(h.children)),d.appendChild(f),this.#i.set(h.heading.id,p)}return d},o=document.createElement("details");o.className="details",o.setAttribute("data-page-toc-generated",""),o.open=!0;let c=document.createElement("summary");c.className="summary",c.textContent=i,o.appendChild(c);let l=document.createElement("nav");l.className="nav",l.setAttribute("aria-label",i),l.appendChild(a(n.children)),o.appendChild(l),this.#s=o,this.appendChild(o)}#k(t){let i=t.cloneNode(!0);return i.querySelectorAll(".heading-anchor").forEach(n=>n.remove()),i.textContent.trim()}#_(t){let i=new URL(window.location.href);i.hash=t.id,window.history.pushState(null,"",i);let s=window.matchMedia("(prefers-reduced-motion: reduce)").matches;t.scrollIntoView({behavior:s?"auto":"smooth",block:"start"}),t.hasAttribute("tabindex")||t.setAttribute("tabindex","-1"),t.focus({preventScroll:!0}),this.#x(t.id),this.dispatchEvent(new CustomEvent("page-toc:navigate",{bubbles:!0,detail:{id:t.id}}))}#D(){if(this.#e.length===0)return;let t=new Set;this.#t=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting?t.add(s.target.id):t.delete(s.target.id);this.#R(t)},{rootMargin:"-80px 0px -70% 0px",threshold:0});for(let i of this.#e)this.#t.observe(i)}#R(t){for(let i of this.#e)if(t.has(i.id)){this.#x(i.id);return}this.#y()}};function hn(e){try{return decodeURIComponent(e)}catch{return e}}w("page-toc",fn);function gi({newItems:e,nodes:t,keyOf:i,renderItem:s,containerFor:n}){let r=[],a=[],o=[],c=new Set;for(let u of e)c.add(i(u));for(let[u,d]of[...t])c.has(u)||(d.remove(),t.delete(u),o.push(u));let l=new Map;for(let u of e){let d=i(u),h=t.get(d)||null,f=n(u,h);l.has(f)||l.set(f,[]),l.get(f)?.push({item:u,key:d,existing:h})}for(let[u,d]of l)for(let h=0;h<d.length;h++){let{item:f,key:p,existing:m}=d[h],b=m;b?(b.parentElement!==u||u.children[h]!==b)&&a.push(p):(b=s(f),t.set(p,b),r.push(p));let g=u.children[h];g!==b&&u.insertBefore(b,g||null)}return{added:r,moved:a,removed:o}}gn();G();var yn={"no-results":"No matching rows found",filter:"Filter table rows",placeholder:"Filter table...",pagination:"Table pagination",prev:"Previous",next:"Next",sorted:"Sorted by {column}, {direction}",ascending:"ascending",descending:"descending","filtered-one":"{count} of {total} row shown","filtered-other":"{count} of {total} rows shown","all-one":"All {total} row shown","all-other":"All {total} rows shown","selected-one":"{count} row selected","selected-other":"{count} rows selected"},wn=":scope > tr:not([data-expand-content])",An=class e extends E{#t;#e;#i=[];#n=[];#s=[];#o=-1;#r=null;#a=1;#l=0;#c=null;#b=null;#f=null;#u="";#p=null;#v=null;#d=null;#m=null;#h=[];#E=new Map;#y=[];setup(){return this.#t=this.querySelector(":scope > table"),!this.#t||(this.#e=this.#t.querySelector("tbody"),!this.#e)?!1:(this.#x(),!0)}teardown(){this.#R(),this.#i=[],this.#n=[],this.#s=[]}#x(){this.#n=[...this.#e.querySelectorAll(wn)],this.#s=[...this.#n],this.#a=1,this.#o=-1,this.#r=null,this.#u="",this.#l=0,this.#y=[...this.#t.tHead?.rows[0]?.cells||[]].map(i=>({key:i.getAttribute("data-key")||i.textContent.trim().toLowerCase(),label:i.textContent.trim(),sort:i.getAttribute("data-sort")||void 0})),this.#E.clear(),this.#h=[];for(let i of this.#n){let s=i.getAttribute("data-id")||i.getAttribute("data-key");s&&(this.#E.set(s,i),this.#h.push({id:s}))}this.#A(),this.#M(),this.#D(),this.#j(),this.#T(),this.#t.hasAttribute("data-filterable")&&this.#O();let t=this.#t.getAttribute("data-paginate");t&&(this.#l=parseInt(t,10),this.#l>0&&this.#Q()),this.#K(),this.#st(),this.#it()}get rows(){return this.#h}set rows(t){let i=t||[],s=gi({newItems:i,nodes:this.#E,keyOf:n=>n.id,renderItem:n=>this._renderRow(n),containerFor:()=>this.#e});this.#h=i,this.#n=[...this.#e.querySelectorAll(wn)],this.#M(),this.#D(),this.#P(this.#u),this.dispatchEvent(new CustomEvent("data-table:rows-changed",{detail:{rows:i,added:s.added,moved:s.moved,removed:s.removed,source:"api"},bubbles:!0}))}get columns(){return this.#y}_renderRow(t){let i=this;if(typeof i.renderRow=="function"){let n=i.renderRow(t,this.#y);if(!(n instanceof Element))throw new Error("data-table: renderRow must return an Element");return n.hasAttribute("data-id")||n.setAttribute("data-id",String(t.id)),n}let s=document.createElement("tr");s.setAttribute("data-id",String(t.id));for(let n of this.#y){let r=document.createElement("td"),a=t[n.key];r.textContent=a==null?"":String(a),s.appendChild(r)}return s}#g=[];#S=[];#w=[];#A(){let t=[...this.#t.tHead?.rows[0]?.cells||[]];this.#g=t.map(i=>{let s=parseFloat(i.getAttribute("data-weight"));return Number.isFinite(s)?s:null}),this.#S=t.map(i=>i.getAttribute("data-rollup")||null),this.#w=t.map(i=>i.getAttribute("data-heatmap")||null)}#M(){if(this.#S.some(Boolean))for(let t=0;t<this.#S.length;t++){let i=this.#S[t];if(i)for(let s of this.#n){let n=s.children[t];if(!n)continue;let r=this.#k(s,t,i),a=e.#_(r);n.textContent=a,n.setAttribute("data-rollup-value",String(r)),n.hasAttribute("data-sort-value")||n.setAttribute("data-sort-value",String(r))}}}#k(t,i,s){let n=[...t.children],r=0,a=0,o=-1/0,c=0,l=1,u=!1;for(let d=0;d<n.length;d++){if(d===i||this.#S[d])continue;let h=n[d].getAttribute("data-sort-value")??n[d].textContent??"",f=parseFloat(h);if(!Number.isFinite(f))continue;r+=f,a++,f>o&&(o=f),l*=f,u=!0;let p=this.#g[d];p!==null&&(c+=f*p)}switch(s){case"sum":return r;case"avg":return a?r/a:0;case"max":return o===-1/0?0:o;case"weighted-sum":return c;case"product":return u?l:0;default:return r}}static#_(t){return Number.isFinite(t)?Number.isInteger(t)?String(t):(Math.round(t*100)/100).toString():""}#D(){if(this.#w.some(Boolean))for(let t=0;t<this.#w.length;t++){let i=this.#w[t];if(!i)continue;let s=this.#n.map(c=>{let l=c.children[t];if(!l)return null;let u=l.getAttribute("data-rollup-value")??l.getAttribute("data-sort-value")??l.textContent??"",d=parseFloat(u);return Number.isFinite(d)?d:null}),n=s.filter(c=>c!==null);if(!n.length)continue;let r=Math.min(...n),o=Math.max(...n)-r||1;for(let c=0;c<this.#n.length;c++){let l=this.#n[c].children[t];if(!l)continue;let u=s[c];if(u===null){l.removeAttribute("data-heat-level");continue}let d=(u-r)/o;i==="low-good"&&(d=1-d);let h=d<.34?"low":d<.67?"mid":"high";l.setAttribute("data-heat-level",h)}}}#R(){this.#f&&clearTimeout(this.#f),this.#c?.parentElement?.remove(),this.#b?.remove(),this.#d?.remove(),this.#m?.remove(),this.#c=null,this.#b=null,this.#d=null,this.#m=null}#N(t){return this.getAttribute(`data-label-${t}`)||yn[t]||""}#F(t,i,s){let n="other";try{n=new Intl.PluralRules(I(this)).select(i)}catch{}let r=this.getAttribute(`data-label-${t}-${n}`)||this.getAttribute(`data-label-${t}-other`)||yn[`${t}-${n}`]||yn[`${t}-other`];return Ct(r,s)}#I(t){return new Intl.NumberFormat(I(this)).format(t)}#j(){let t=document.createElement("span");t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.setAttribute("data-table-status",""),t.className="visually-hidden",this.appendChild(t),this.#d=t}#C(t){let i=this.#d;i&&(i.textContent=i.textContent===t?`${t}\xA0`:t)}#T(){this.#t.querySelectorAll("thead th[data-sort]").forEach((i,s)=>{let n=i.getAttribute("data-sort"),r=this.#tt(i);this.#i.push({th:i,sortType:n,columnIndex:r}),i.setAttribute("aria-sort","none"),e.#B(i),i.dataset.columnIndex=r,this.listen(i,"click",this.#$)})}static#B(t){if(t.querySelector(":scope > button[data-sort-button]"))return;let i=document.createElement("button");i.type="button",i.setAttribute("data-sort-button",""),i.append(...t.childNodes),t.appendChild(i)}#tt(t){return[...t.parentElement.children].indexOf(t)}#$=t=>{let i=t.currentTarget,s=t.target.closest?.("a, input, select, textarea, button:not([data-sort-button])");if(s&&i.contains(s))return;let n=parseInt(i.dataset.columnIndex,10);this.#V(n)};#L(t,i,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.#X(n[a-1].children[t],i),c=this.#X(n[a].children[t],i);if((typeof o=="string"?o.localeCompare(c)*r:(o-c)*r)>0)return!1}return!0}#V(t){let i=this.#i.find(r=>r.columnIndex===t);if(!i)return;let s;this.#o===t?s=this.#r==="asc"?"desc":"asc":this.#L(t,i.sortType,"asc")?s="desc":s="asc",this.#i.forEach(({th:r})=>{r.setAttribute("aria-sort","none")}),i.th.setAttribute("aria-sort",s==="asc"?"ascending":"descending"),this.#o=t,this.#r=s,this.#G(t,s,i.sortType),this.#a=1,this.#it();let n=i.th.textContent.trim();this.#C(Ct(this.#N("sorted"),{column:n,direction:this.#N(s==="asc"?"ascending":"descending")})),this.dispatchEvent(new CustomEvent("data-table:sort",{detail:{column:t,direction:s,columnName:n},bubbles:!0}))}#G(t,i,s){let n=i==="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.#X(o,s),u=this.#X(c,s),d=0;switch(s){case"number":d=l-u;break;case"date":d=l-u;break;default:d=l.localeCompare(u,void 0,{numeric:!0,sensitivity:"base"});break}return d*n})}#X(t,i){let n=t.getAttribute("data-sort-value")??t.textContent.trim();switch(i){case"number":return parseFloat(n)||0;case"date":return new Date(n).getTime()||0;default:return n.toLowerCase()}}#O(){let t=document.createElement("div");t.setAttribute("data-table-filter","");let i=document.createElement("input");i.type="search",i.setAttribute("data-filter-input",""),i.setAttribute("placeholder",this.#N("placeholder")),i.setAttribute("aria-label",this.#N("filter")),t.appendChild(i),this.insertBefore(t,this.#t),this.#c=i;let s=document.createElement("p");s.setAttribute("data-table-empty",""),s.hidden=!0,s.textContent=this.#N("no-results"),this.#t.after(s),this.#m=s,this.listen(i,"input",this.#z)}#z=t=>{let i=t.target.value;this.#f&&clearTimeout(this.#f),this.#f=setTimeout(()=>{this.#P(i,{announce:!0})},150)};#P(t,{announce:i=!1,keepPage:s=!1}={}){if(this.#u=String(t??"").toLowerCase().trim(),this.#u===""?this.#s=[...this.#n]:this.#s=this.#n.filter(n=>[...n.children].some(a=>(a.getAttribute("data-filter-value")??a.textContent).toLowerCase().includes(this.#u))),this.#o>=0&&this.#r){let n=this.#i.find(r=>r.columnIndex===this.#o);n&&this.#G(this.#o,this.#r,n.sortType)}if(s?this.#a=Math.min(this.#a,this.totalPages):this.#a=1,this.#it(),i){let n=this.#s.length,r=this.#n.length,a={count:this.#I(n),total:this.#I(r)};this.#C(n===0?this.#N("no-results"):this.#F(this.#u?"filtered":"all",r,a))}this.dispatchEvent(new CustomEvent("data-table:filter",{detail:{query:this.#u,count:this.#s.length},bubbles:!0}))}#Q(){let t=document.createElement("nav");t.setAttribute("data-pagination",""),t.setAttribute("aria-label",this.#N("pagination")),this.appendChild(t),this.#b=t}#K(){for(let t of this.#e.querySelectorAll(":scope > tr[data-expandable]")){let i=t.querySelector('[data-action="toggle-expand"]');i&&i.setAttribute("aria-expanded",String(t.hasAttribute("data-state-expanded")))}this.listen(this.#t,"click",this.#q)}#q=t=>{let i=t.target.closest('[data-action="toggle-expand"]');if(!i)return;let s=i.closest("tr[data-expandable]");if(!s)return;let n=s.hasAttribute("data-state-expanded"),r=s.nextElementSibling;n?(s.removeAttribute("data-state-expanded"),i.setAttribute("aria-expanded","false"),r?.hasAttribute("data-expand-content")&&(r.hidden=!0,r.setAttribute("aria-hidden","true"))):(s.setAttribute("data-state-expanded",""),i.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}))};#st(){this.#p=this.#t.querySelector('thead [data-action="select-all"]'),this.#p&&this.listen(this.#p,"change",this.#U),this.listen(this.#e,"change",this.#J),this.#v=this.querySelector("[data-selected-count]"),this.#W()}#U=t=>{let i=t.target.checked;this.#e.querySelectorAll("tr[data-selectable]").forEach(n=>{let r=n.querySelector('[data-action="select-row"]');i?(n.setAttribute("data-state-selected",""),r&&(r.checked=!0)):(n.removeAttribute("data-state-selected"),r&&(r.checked=!1))}),t.target.indeterminate=!1,this.#Y(),this.#Z(),this.#et()};#J=t=>{let i=t.target.closest('[data-action="select-row"]');if(!i)return;let s=i.closest("tr[data-selectable]");s&&(i.checked?s.setAttribute("data-state-selected",""):s.removeAttribute("data-state-selected"),this.#W(),this.#Z(),this.#et())};#Z(){let t=this.getSelectedRows().length;this.#C(this.#F("selected",t,{count:this.#I(t)}))}#W(){if(!this.#p){this.#Y();return}let t=this.#e.querySelectorAll("tr[data-selectable]"),i=this.#e.querySelectorAll("tr[data-selectable][data-state-selected]"),s=t.length,n=i.length;n===0?(this.#p.checked=!1,this.#p.indeterminate=!1):n===s?(this.#p.checked=!0,this.#p.indeterminate=!1):(this.#p.checked=!1,this.#p.indeterminate=!0),this.#Y()}#Y(){let i=this.#e.querySelectorAll("tr[data-selectable][data-state-selected]").length;this.#v&&(this.#v.textContent=i)}#et(){let t=[...this.#e.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.#b||this.#l<=0)return;let t=this.#b,i=Math.ceil(this.#s.length/this.#l),s=document.activeElement,n=null;if(s instanceof HTMLElement&&t.contains(s)&&(n=s.hasAttribute("data-pagination-prev")?"prev":s.hasAttribute("data-pagination-next")?"next":"page"),t.replaceChildren(),i<=1)return;let r=document.createElement("button");r.type="button",r.textContent=this.#N("prev"),r.setAttribute("data-pagination-prev",""),r.disabled=this.#a===1,r.addEventListener("click",()=>this.goToPage(this.#a-1)),t.appendChild(r),this.#nt(i).forEach(c=>{if(c==="..."){let l=document.createElement("span");l.textContent="...",l.setAttribute("data-pagination-ellipsis",""),t.appendChild(l)}else{let l=document.createElement("button");l.type="button",l.textContent=this.#I(c),l.setAttribute("data-pagination-page",""),c===this.#a&&(l.setAttribute("aria-current","page"),l.setAttribute("data-current","")),l.addEventListener("click",()=>this.goToPage(c)),t.appendChild(l)}});let o=document.createElement("button");if(o.type="button",o.textContent=this.#N("next"),o.setAttribute("data-pagination-next",""),o.disabled=this.#a===i,o.addEventListener("click",()=>this.goToPage(this.#a+1)),t.appendChild(o),n){let c=t.querySelector('[aria-current="page"]');(n==="prev"&&!r.disabled?r:n==="next"&&!o.disabled?o:c)?.focus()}}#nt(t){let i=this.#a,s=[];if(t<=7)for(let n=1;n<=t;n++)s.push(n);else{s.push(1),i>3&&s.push("...");let n=Math.max(2,i-1),r=Math.min(t-1,i+1);for(let a=n;a<=r;a++)s.push(a);i<t-2&&s.push("..."),s.push(t)}return s}#it(){this.#n.forEach(s=>{s.setAttribute("data-state-hidden",""),this.#rt(s)?.setAttribute("data-state-hidden","")});let t;if(this.#l>0){let s=(this.#a-1)*this.#l,n=s+this.#l;t=this.#s.slice(s,n)}else t=this.#s;t.forEach(s=>{s.removeAttribute("data-state-hidden");let n=this.#rt(s);this.#e.appendChild(s),n&&(n.removeAttribute("data-state-hidden"),this.#e.appendChild(n))}),this.#s.forEach(s=>{if(s.hasAttribute("data-state-hidden")){let n=this.#rt(s);this.#e.appendChild(s),n&&this.#e.appendChild(n)}});let i=new Set(this.#s);this.#n.forEach(s=>{if(!i.has(s)){let n=this.#rt(s);this.#e.appendChild(s),n&&this.#e.appendChild(n)}}),this.#m&&(this.#m.textContent=this.#N("no-results"),this.#m.hidden=!(this.#u&&this.#s.length===0&&this.#n.length>0)),this.#H()}#rt(t){if(!t.hasAttribute("data-expandable"))return null;let i=t.nextElementSibling;return i?.hasAttribute("data-expand-content")?i:null}goToPage(t){if(this.#l<=0)return;let i=Math.max(1,Math.ceil(this.#s.length/this.#l)),s=Math.max(1,Math.min(Math.trunc(Number(t))||1,i));s!==this.#a&&(this.#a=s,this.#it(),this.dispatchEvent(new CustomEvent("data-table:page",{detail:{page:this.#a},bubbles:!0})))}setFilter(t){this.#c&&(this.#c.value=t),this.#P(t,{announce:!0})}refresh(){this.#e&&(this.#n=[...this.#e.querySelectorAll(wn)],this.#M(),this.#D(),this.#P(this.#u,{keepPage:!0}),this.#W())}get currentPage(){return this.#a}get totalPages(){return this.#l<=0?1:Math.max(1,Math.ceil(this.#s.length/this.#l))}get filteredCount(){return this.#s.length}get totalCount(){return this.#n.length}getSelectedRows(){return this.#e?[...this.#e.querySelectorAll("tr[data-selectable][data-state-selected]")]:[]}};w("data-table",An);Ei();var Gb={trigger:"Search",dialog:"Site search",placeholder:"Search documentation...",input:"Search",results:"Search results",searching:"Searching...",empty:"No results found",count:"{count} results","count-one":"1 result","count-more":"{count} of {total} results",unavailable:"Search unavailable",error:"Search error. Please try again.",untitled:"Untitled",navigate:"to navigate",select:"to select",close:"to close",dismiss:"Close search",browse:"Browse instead",powered:"Powered by"},Xb=0,Si=new Set,Ce=null;function Jb(e){return typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0}function Zb(){let e=[...Si].filter(s=>s.isConnected),t=e.find(s=>s.isOpen);if(t){t.close();return}(e.find(s=>Jb(s))??e[0])?.open()}function Qb(e){Si.add(e),!Ce&&!Bc().includes("meta+k")&&(Ce=Kt("meta+k",Zb,{global:!0}))}function tg(e){Si.delete(e),Si.size===0&&Ce&&(Ce(),Ce=null)}function F(e,t={},i=[]){let s=document.createElement(e);for(let[n,r]of Object.entries(t))s.setAttribute(n,r);return s.append(...i),s}function eg(e){let t=document.createDocumentFragment();if(!e||typeof e!="string")return t;let i=document.createElement("template");i.innerHTML=e;let s=(n,r)=>{for(let a of n.childNodes)if(a.nodeType===Node.TEXT_NODE)r.appendChild(document.createTextNode(a.textContent??""));else if(a.nodeType===Node.ELEMENT_NODE)if(a.localName==="mark"){let o=document.createElement("mark");s(a,o),r.appendChild(o)}else s(a,r)};return s(i.content,t),t}function ig(e){if(typeof e!="string"||!e)return null;try{let t=new URL(e,document.baseURI);return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==location.origin?null:t.href}catch{return null}}var xn=class e extends E{static#t=150;static#e=8;#i=null;#n=null;#s=null;#o=null;#r=null;#a=null;#l=[];#c=-1;#b=!1;#f=0;#u="";#p=null;#v=!1;#d=null;setup(){this.#u||(this.#u=`site-search-${++Xb}`),this.#h(),this.#E(),Qb(this)}teardown(){tg(this),this.#b&&(document.body.style.overflow="",this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),this.#b=!1),this.#F(),this.#f++,this.#l=[],this.#c=-1,this.#r&&this.append(this.#r),this.#r=null,this.#n?.remove(),this.#n=null}#m(t){let i=`data-label-${t}`;return this.getAttribute(i)??Gb[t]}get value(){return this.#s?.value??""}set value(t){if(!this.#s)return;let i=t==null?"":String(t);this.#s.value!==i&&(this.#s.value=i,this.#s.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new CustomEvent("site-search:change",{detail:{value:i,source:"api"},bubbles:!0})))}get results(){return[...this.#l]}#h(){this.#i=this.querySelector(":scope > [data-trigger]"),this.#i||(this.#i=this.querySelector(":scope > button")),this.#i||(this.#i=F("button",{type:"button","data-trigger":""},[F("icon-wc",{name:"search",label:this.#m("trigger")})]),this.prepend(this.#i));let t=`${this.#u}-dialog`,i=`${this.#u}-results`;this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#i.setAttribute("aria-controls",t),this.#s=F("input",{type:"search",name:"search",class:"input",placeholder:this.#m("placeholder"),autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"combobox","aria-label":this.#m("input"),"aria-autocomplete":"list","aria-controls":i,"aria-expanded":"false"}),this.#o=F("div",{class:"results",id:i,role:"listbox","aria-label":this.#m("results")}),this.#a=F("p",{class:"search-status",role:"status"});let s=n=>F("kbd",{},[n]);if(this.#n=F("dialog",{class:"dialog",id:t,"aria-label":this.#m("dialog")},[F("search",{class:"search"},[F("div",{class:"input-wrapper"},[F("icon-wc",{name:"search",class:"icon"}),this.#s,F("button",{type:"button",class:"shortcut","aria-label":this.#m("dismiss")},[F("kbd",{},["Esc"]),F("icon-wc",{name:"x",size:"sm"})])]),this.#a,this.#o]),F("div",{class:"footer"},[F("span",{class:"hint"},[s("\u2191"),s("\u2193"),` ${this.#m("navigate")} `,s("\u21B5"),` ${this.#m("select")} `,s("esc"),` ${this.#m("close")}`]),F("span",{class:"powered"},[`${this.#m("powered")} `,F("a",{href:"https://pagefind.app",target:"_blank",rel:"noopener"},["Pagefind"])])])]),this.#r=this.querySelector(":scope > nav[data-browse]"),this.#r){let n=this.#r.getAttribute("aria-label")||this.#m("browse");this.#r.setAttribute("aria-label",n);let r=F("p",{class:"browse-title","aria-hidden":"true"},[n]);this.#n.querySelector(".search")?.after(F("div",{class:"browse"},[r,this.#r]))}this.appendChild(this.#n)}#E(){this.listen(this.#i,"click",this.#y),this.#n.addEventListener("close",this.#x),this.#n.addEventListener("click",this.#g),this.#s.addEventListener("input",this.#S),this.#s.addEventListener("keydown",this.#w),this.#o.addEventListener("click",this.#A)}#y=t=>{t.stopPropagation(),this.open()};#x=()=>{this.#b&&!this.#n?.open&&this.#I()};#g=t=>{if(t.target.closest?.(".shortcut")){this.close();return}if(t.target!==this.#n)return;let i=this.#n.getBoundingClientRect();t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom||this.close()};#S=()=>{this.#F(),this.setState("input-debounce-pending",!0),this.#d=setTimeout(()=>{this.#d=null,this.setState("input-debounce-pending",!1),this.#D(this.#s.value)},e.#t)};#w=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"Escape":t.preventDefault(),this.close();break;case"Enter":{t.preventDefault();let i=this.#c>=0?this.#c:0,s=this.#o.querySelector(`[data-result-index="${i}"]`)?.getAttribute("href");s&&(this.close(),window.location.assign(s));break}}};#A=t=>{t.target.closest("[data-result-index]")&&(t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||setTimeout(()=>this.close(),0))};get#M(){let t=this.getAttribute("data-pagefind-path")||"/pagefind/";return t.endsWith("/")?t:`${t}/`}async#k(){if(this.#p||this.#v)return;let t=new URL(this.#M,document.baseURI),i=this.getAttribute("data-base-url")??new URL("..",t).pathname;try{let s=await import(new URL("pagefind.js",t).href);await s.options({excerptLength:20,baseUrl:i}),this.#p=s}catch{this.#v=!0,console.warn(`[site-search] Pagefind not found at ${t.pathname}pagefind.js. Run \`npm run search:index\` after building, or set data-pagefind-path.`)}}#_(t){this.#a&&(this.#a.textContent=t)}async#D(t){let i=++this.#f;if(!t.trim()){this.#R([]);return}if(this.#_(this.#m("searching")),await this.#k(),i===this.#f){if(!this.#p){this.#l=[],this.#R([]),this.#_(this.#m("unavailable"));return}try{let s=await this.#p.search(t),n=await Promise.all((s?.results??[]).slice(0,e.#e).map(r=>r.data()));if(i!==this.#f)return;this.#l=n,this.#R(n,s?.results?.length??n.length)}catch(s){if(i!==this.#f)return;console.error("[site-search] Search error:",s),this.#l=[],this.#R([]),this.#_(this.#m("error"))}}}#R(t,i=t.length){this.#c=-1,this.#s.removeAttribute("aria-activedescendant");let s=[];for(let n of t){let r=ig(n?.url);if(!r)continue;let a=F("span",{class:"result-title"});a.textContent=String(n.meta?.title||this.#m("untitled"));let o=F("span",{class:"result-excerpt"});o.append(eg(n.excerpt||"")),s.push(F("a",{id:`${this.#u}-result-${s.length}`,href:r,class:"result",role:"option","aria-selected":"false","data-result-index":String(s.length),tabindex:"-1"},[a,o]))}if(this.#o.replaceChildren(...s),this.#s.setAttribute("aria-expanded",s.length?"true":"false"),!this.#s.value.trim())this.#_("");else if(s.length===0)this.#_(this.#m("empty"));else{let r=i>e.#e&&i>s.length?this.#m("count-more"):s.length===1?this.#m("count-one"):this.#m("count");this.#_(r.replace("{count}",String(s.length)).replace("{total}",String(i)))}}#N(t){let i=this.#o.querySelectorAll("[data-result-index]");if(i.length===0)return;t<0&&(t=i.length-1),t>=i.length&&(t=0);for(let n of i)n.removeAttribute("data-active"),n.setAttribute("aria-selected","false");this.#c=t;let s=i[t];s.setAttribute("data-active",""),s.setAttribute("aria-selected","true"),this.#s.setAttribute("aria-activedescendant",s.id),s.scrollIntoView({block:"nearest"})}#F(){this.#d&&(clearTimeout(this.#d),this.#d=null),this.setState("input-debounce-pending",!1)}open(){if(!(this.#b||!this.#n)){if(this.#b=!0,this.setAttribute("open",""),this.#i?.setAttribute("aria-expanded","true"),document.body.style.overflow="hidden",!this.#n.open)try{this.#n.showModal()}catch{this.#n.setAttribute("open","")}this.#s.focus(),this.#s.select(),this.#k(),this.dispatchEvent(new CustomEvent("site-search:open",{bubbles:!0}))}}close(){this.#b&&(this.#n?.open&&this.#n.close(),this.#b&&this.#I())}#I(){this.#b=!1,this.removeAttribute("open"),this.#i?.setAttribute("aria-expanded","false"),document.body.style.overflow="",this.#F(),this.#f++,this.#l=[],this.#c=-1,this.#s&&(this.#s.value="",this.#s.removeAttribute("aria-activedescendant"),this.#s.setAttribute("aria-expanded","false")),this.#o?.replaceChildren(),this.#_(""),this.#i?.focus(),this.dispatchEvent(new CustomEvent("site-search:close",{bubbles:!0}))}get isOpen(){return this.#b}};w("site-search",xn);Vt();Vt();var sg=/^[a-zA-Z_$][a-zA-Z0-9_$]*(\.[a-zA-Z_$][a-zA-Z0-9_$]*|\[\d+\])*$/;function Vc(e){return!e||typeof e!="string"?!1:sg.test(e.trim())}function Te(e,t){if(!Vc(t)){console.warn(`[card-list] Unsafe property path rejected: "${t}"`);return}let s=String(t).replace(/\[(\d+)\]/g,".$1").split("."),n=e;for(let r of s){if(n==null)return;n=n[r]}return n}function ng(e){return e?e.split(",").map(t=>{let[i,s]=t.split(":").map(n=>n.trim());return{attr:(i||"").toLowerCase(),path:s}}).filter(({attr:t,path:i})=>t&&i):[]}var rg=new Set(["href","src","action","formaction","xlink:href","poster","cite","background","ping","data","manifest","longdesc","codebase"]),zc=new Set(["srcdoc","style","is"]),ag=new Set(["http:","https:","mailto:","tel:"]);function Uc(e){let t=String(e).replace(/[\u0000-\u0020\u007f]+/g,"");if(!t)return!0;let i=/^([a-z][a-z0-9+.-]*):/i.exec(t);return i?ag.has(`${i[1].toLowerCase()}:`):!0}function og(e){return String(e).split(",").every(t=>Uc(t.trim().split(/\s+/)[0]||""))}function cg(e,t){return e.startsWith("on")||zc.has(e)||!/^[a-z_][a-z0-9_.:-]*$/.test(e)?!1:e==="srcset"||e==="imagesrcset"?og(t):rg.has(e)?Uc(t):!0}function lg(e,t){let i=new Set;return e.map((s,n)=>{let r=s!=null&&typeof s=="object"?s[t]:void 0,a=r==null?null:`k:${String(r)}`;return a==null||i.has(a)?`i:${n}`:(i.add(a),a)})}var Hc=":scope > [data-card-list-status]",kn=class extends E{#t=null;#e=[];#i="id";#n=new Map;#s=!1;#o=null;#r=null;static get observedAttributes(){return["src","data-items","data-key"]}setup(){if(this.#t=this.querySelector(":scope > template")||this.querySelector("template"),!this.#t)return console.warn("[card-list] No template found"),!1;if(this.#i=this.getAttribute("data-key")||"id",this.#s)return this.#o&&this.#u(this.#o),this.#o=null,!0;let t=this.getAttribute("data-items");if(t)return this.#a(t),!0;let i=this.getAttribute("src");return i&&this.#f(i),!0}teardown(){this.#l()}attributeChangedCallback(t,i,s){i!==s&&this.hasAttribute("data-upgraded")&&(t==="data-items"?s&&this.#a(s):t==="src"?s?this.#f(s):this.#l():t==="data-key"&&(this.#i=s||"id",this.#u("attribute")))}#a(t){this.#l();try{let i=JSON.parse(t);this.#e=Array.isArray(i)?i:[],this.#s=!0,this.#u("attribute")}catch(i){console.error("[card-list] Invalid JSON in data-items:",i)}}#l(){this.#r&&(this.#r.abort(),this.#r=null,this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.#b(""))}#c(){let t=this.querySelector(Hc);return t||(t=document.createElement("p"),t.setAttribute("role","status"),t.setAttribute("data-card-list-status",""),this.append(t)),t}#b(t){let i=this.querySelector(Hc);!i&&!t||((i||this.#c()).textContent=t)}async#f(t){this.#l();let i=new AbortController;this.#r=i,this.removeAttribute("data-error"),this.setAttribute("data-loading",""),this.setAttribute("aria-busy","true"),this.#c().textContent="Loading\u2026";try{let s=await fetch(t,{signal:i.signal});if(!s.ok)throw new Error(`HTTP ${s.status}`);let n=await s.json();if(i.signal.aborted)return;this.#e=Array.isArray(n)?n:n?.items||n?.data||[],this.#s=!0,this.#b(""),this.#u("attribute")}catch(s){if(i.signal.aborted)return;let n=s instanceof Error?s.message:String(s);console.error("[card-list] Fetch error:",s),this.setAttribute("data-error",n),this.#b(`Error: ${n}`)}finally{this.#r===i&&(this.#r=null,this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"))}}#u(t){if(!this.#t)return;this.querySelectorAll(":scope > [data-fallback]").forEach(n=>n.remove());let i=this.#t;if([...i.content.children].length!==1){this.querySelectorAll(":scope > :not(template, [data-card-list-status])").forEach(r=>r.remove()),this.#n.clear();let n=document.createDocumentFragment();for(let r of this.#e){let a=i.content.cloneNode(!0);this.#p(a,r),n.appendChild(a)}this.prepend(n)}else{let n=lg(this.#e,this.#i),r=this.#e.map((c,l)=>({item:c,key:n[l]})),a=gi({newItems:r,nodes:this.#n,keyOf:c=>c.key,renderItem:c=>{let u=i.content.cloneNode(!0).firstElementChild;return this.#p(u,c.item),u},containerFor:()=>this}),o=new Set(a.added);for(let{item:c,key:l}of r){if(o.has(l))continue;let u=this.#n.get(l);u&&this.#p(u,c)}}this.dispatchEvent(new CustomEvent("card-list:rendered",{detail:{count:this.#e.length},bubbles:!0})),this.dispatchEvent(new CustomEvent("card-list:items-changed",{detail:{items:this.#e,source:t},bubbles:!0}))}#p(t,i){let s=n=>{let r=[...t.querySelectorAll(n)];return t instanceof Element&&t.matches(n)&&r.unshift(t),r};s("[data-field]").forEach(n=>{let r=Te(i,n.getAttribute("data-field"));n.textContent=r??""}),s("[data-field-attr]").forEach(n=>{for(let{attr:r,path:a}of ng(n.getAttribute("data-field-attr"))){if(!Vc(a))continue;let o=Te(i,a);if(r.startsWith("on")||zc.has(r)){console.warn(`[card-list] Refusing to bind "${r}" from data`);continue}let c=r.startsWith("aria-");o==null||o===!1&&!c?n.removeAttribute(r):cg(r,o)?n.setAttribute(r,o===!0&&!c?"":String(o)):(console.warn(`[card-list] Unsafe value refused for "${r}"`),n.removeAttribute(r))}}),s("[data-field-html]").forEach(n=>{n.replaceChildren(mi(Te(i,n.getAttribute("data-field-html"))))}),s("[data-field-if]").forEach(n=>{n.hidden=!Te(i,n.getAttribute("data-field-if"))}),s("[data-field-unless]").forEach(n=>{n.hidden=!!Te(i,n.getAttribute("data-field-unless"))})}get items(){return this.#e}set items(t){this.#l(),this.#e=Array.isArray(t)?t:[],this.#s=!0,this.#t&&this.hasAttribute("data-upgraded")?this.#u("api"):this.#o="api"}};w("card-list",kn);var Wc=`
|
|
77
77
|
:host {
|
|
78
78
|
--_padding: var(--score-card-padding, var(--size-l, 1.5rem));
|
|
79
79
|
--_radius: var(--score-card-radius, var(--radius-m, 0.5rem));
|
|
@@ -274,8 +274,8 @@ svg {
|
|
|
274
274
|
background: color-mix(in oklch, var(--_muted) 18%, transparent);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
`;var
|
|
278
|
-
<style>${
|
|
277
|
+
`;var ug=new Set(["up","down","flat"]),jc=["change","sparkline","description","icon"],dg=`
|
|
278
|
+
<style>${Wc}</style>
|
|
279
279
|
<div class="card" part="card">
|
|
280
280
|
<span class="title" part="title"><slot name="title"></slot></span>
|
|
281
281
|
<span class="value" part="value"><slot name="value"><slot></slot></slot></span>
|
|
@@ -284,20 +284,20 @@ svg {
|
|
|
284
284
|
<span class="description" part="description"><slot name="description" data-slot="description"></slot></span>
|
|
285
285
|
<span class="icon" part="icon"><slot name="icon" data-slot="icon"></slot></span>
|
|
286
286
|
</div>
|
|
287
|
-
`,wn=class extends E{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of zc){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#t(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=ng;for(let i of zc){let s=t.querySelector(`slot[name="${i}"]`);s?.addEventListener("slotchange",()=>this.#t(i,s)),this.#t(i,s)}}this.#e(),this.#i(),this.#n()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#e():t==="loading"&&this.#i())}#t(t,i){let s=!!i&&i.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#e(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let i of sg)this.setState(`trend-${i}`,i===t)}#i(){let t=this.hasAttribute("loading");this.setState("loading",t),t?this.setAttribute("aria-busy","true"):this.getAttribute("aria-busy")==="true"&&this.removeAttribute("aria-busy")}#n(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};w("score-card",wn);var rg=0;function xi(e,t){return e.matches("content-swap")?t:`data-${t}`}function Ei(e){let t=e.querySelector(':scope > [data-face="front"]'),i=e.querySelector(':scope > [data-face="back"]');if(!t||!i)return;e.style.viewTransitionName||(e.style.viewTransitionName=`content-swap-${++rg}`);let s=e.matches("content-swap");s||e.setAttribute("data-swap-init","");let n=[];function r(l,u,d,h){l.addEventListener(u,d,h),n.push(()=>l.removeEventListener(u,d,h))}let a=[...e.querySelectorAll("[data-swap]")].filter(l=>l.parentElement?.closest("content-swap, [data-swap]")===e),o=a.length===0,c=e.querySelector(":scope > [data-swap-toggle]");if(o){if(!c){let l=document.createElement("button");l.type="button",l.setAttribute("data-swap-toggle",""),l.textContent="Show back",e.append(l),c=l}r(c,"click",l=>{l.stopPropagation(),Tt(e,l.detail===0?"keyboard":"pointer")}),r(e,"click",l=>{let d=l.target.closest?.(og);d&&d!==e&&e.contains(d)||Tt(e,"pointer")})}else c&&!c.hasAttribute("data-swap")&&c.remove(),c=null,a.forEach(l=>{let u=l.matches(ag);r(l,"click",d=>{d.stopPropagation();let h=u&&d.detail===0;Tt(e,h?"keyboard":"pointer")}),!u&&(l.hasAttribute("role")||(l.setAttribute("role","button"),n.push(()=>l.removeAttribute("role"))),l.hasAttribute("tabindex")||(l.setAttribute("tabindex","0"),n.push(()=>l.removeAttribute("tabindex"))),r(l,"keydown",d=>{d.target===l&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),Tt(e,"keyboard"))}))});if(e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(r(e,"swipe-left",()=>Tt(e,"pointer")),r(e,"swipe-right",()=>Tt(e,"pointer"))),!s){let l=new MutationObserver(()=>Si(e,t,i));l.observe(e,{attributes:!0,attributeFilter:["data-swapped"]}),n.push(()=>l.disconnect())}return Si(e,t,i),cg([t,i]),()=>{for(let l of n)l();n.length=0}}var ag='button, a[href], summary, input:is([type="button"], [type="submit"], [type="reset"])',og='a[href], button, input, select, textarea, label, summary, [contenteditable=""], [contenteditable="true"], [tabindex]';function cg(e){let t=e.map(i=>i.style.transition);for(let i of e)i.style.transition="none";for(let i of e)getComputedStyle(i).transform;e.forEach((i,s)=>{i.style.transition=t[s]})}function Si(e,t,i){let s=e.hasAttribute(xi(e,"swapped"));t.inert=s,i.inert=!s,e.querySelector(":scope > [data-swap-toggle]")?.setAttribute("aria-pressed",String(s))}function jc(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Ce(e,t,i="api"){let{front:s,back:n}=jc(e);if(!s||!n)return;let r=xi(e,"swapped");if(t&&e.hasAttribute(r)||!t&&!e.hasAttribute(r))return;let a=document.activeElement,o=()=>{t?e.setAttribute(r,""):e.removeAttribute(r),Si(e,s,n),lg(e,i);let u=t?n:s,d=t?s:n,h=u.querySelector("[autofocus]");h?h.focus():i==="keyboard"&&d.contains(a)&&ug(u)},c=u=>{let d=e;typeof d.setState=="function"&&d.setState("transition-running",u)};c(!0);let l=nt(o);l&&l.finished&&typeof l.finished.finally=="function"?l.finished.finally(()=>c(!1)):c(!1)}function Tt(e,t="api"){Ce(e,!e.hasAttribute(xi(e,"swapped")),t)}function lg(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(xi(e,"swapped")),source:t},bubbles:!0}))}function ug(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var An=class extends E{static observedAttributes=["swapped"];#t=null;attributeChangedCallback(){if(!this.isConnected)return;let{front:t,back:i}=jc(this);t&&i&&Si(this,t,i)}setup(){this.#t=Ei(this)??null}teardown(){this.#t?.(),this.#t=null}flip(){Ce(this,!0)}unflip(){Ce(this,!1)}toggle(){Tt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Ce(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Ce(this,!!t)}};w("content-swap",An);function Uc(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&Ei(e)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Uc):Uc();var Wc=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&Ei(s),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&Ei(n)})}});document.body?Wc.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{Wc.observe(document.body,{childList:!0,subtree:!0})});var En=class extends E{#t=null;#e=!1;#i=null;setup(){!this.hasAttribute("role")&&!this.querySelector("nav")&&this.setAttribute("role","navigation"),this.#r("pathname"),this.listen(window,"popstate",this.#s);let t=window.navigation;t&&typeof t.addEventListener=="function"&&this.listen(t,"currententrychange",this.#o)}get items(){return this.#t?this.#t.map(t=>({...t})):Array.from(this.#n()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let i=t.map(s=>({...s}));this.#t&&this.#u(this.#t,i)||(this.#t=i,this.#b(i),this.#e?this.#c(this.#i):this.#r("pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#e)return this.#i;for(let t of this.#n())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let i=this.current,s=t==null?null:String(t);this.#e=!0,this.#i=s,this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#e&&(this.#e=!1,this.#i=null,this.#r("pathname"))}refresh(){this.#e||this.#r("pathname")}#n(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#s=()=>{this.#e||this.#r("popstate")};#o=()=>{queueMicrotask(()=>{this.#e||!this.isConnected||this.#r("navigation")})};#r(t){let i=this.current,s=this.#a();this.#c(s),s==null&&this.#l(),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:t},bubbles:!0,composed:!0}))}#a(){let t=ki(window.location.pathname),i=window.location.origin,s=Array.from(this.#n());if(s.length===0)return null;let n=this.getAttribute("data-match")==="exact",r=null,a=null,o=-1;for(let l of s){let u=l.getAttribute("href");if(!u||u.startsWith("#"))continue;let d;try{d=new URL(u,document.baseURI)}catch{continue}if(!/^https?:$/.test(d.protocol)||d.origin!==i)continue;let h=ki(d.pathname);if(h===t){r==null&&(r=l);continue}!n&&h!=="/"&&t.startsWith(h+"/")&&h.length>o&&(a=l,o=h.length)}let c=r||a;return c?c.getAttribute("data-route")||c.getAttribute("href"):null}#l(){let t=ki(window.location.pathname),i=window.location.origin,s=this.getAttribute("data-match")==="exact",n=null,r=-1;for(let a of this.querySelectorAll("a[data-nav-link]")){let o=a.closest("drop-down, li");if(!(!o||!this.contains(o)))for(let c of o.querySelectorAll("a[href]:not([data-nav-link])")){let l=c.getAttribute("href");if(!l||l.startsWith("#"))continue;let u;try{u=new URL(l,document.baseURI)}catch{continue}if(!/^https?:$/.test(u.protocol)||u.origin!==i)continue;let d=ki(u.pathname),h=-1;d===t?h=Number.MAX_SAFE_INTEGER:!s&&d!=="/"&&t.startsWith(d+"/")&&(h=d.length),h>r&&(n=a,r=h)}}n&&n.setAttribute("aria-current","true")}#c(t){let i=this.#n();for(let s of i){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#b(t){this.querySelectorAll(":scope > a").forEach(n=>n.remove());let i=this.querySelector("a[data-nav-link]")!=null,s=document.createDocumentFragment();for(let n of t){let r=this.#f(n);i&&r.setAttribute("data-nav-link",""),s.appendChild(r)}this.appendChild(s)}#f(t){let i=document.createElement("a"),s=dg(t.href);if(s!=null&&i.setAttribute("href",s),t.route&&i.setAttribute("data-route",t.route),t.external&&(i.target="_blank",i.rel="noopener noreferrer"),t.icon){let n=document.createElement("icon-wc");n.setAttribute("name",String(t.icon)),n.setAttribute("size","sm"),i.appendChild(n)}if(i.appendChild(document.createTextNode(t.label||"")),t.external){let n=document.createElement("span");n.className="sr-only",n.textContent=` ${this.getAttribute("data-label-new-tab")??"(opens in new tab)"}`,i.appendChild(n)}if(t.badge!=null){let n=document.createElement("span");n.className="badge",n.textContent=String(t.badge),i.appendChild(n)}return i}#u(t,i){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(i[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==i[s][r[a]])return!1}return!0}};function ki(e){let t=e.replace(/\/+$/,"");return t===""?"/":t}function dg(e){if(e==null||e==="")return"#";let t=String(e),i;try{i=new URL(t,document.baseURI)}catch{return null}return/^https?:$/.test(i.protocol)?t:null}w("nav-bar",En);var fg=0,Cn=class extends E{#t;#e=[];#i;#n;#s;#o;#r;#a;#l=null;#c=0;#b=0;#f=!1;#u=!1;#p=!1;#v=null;#d=!1;#m=!1;#h=!1;#E=!1;#y=new WeakSet;get currentIndex(){return this.#c}get slideCount(){return this.#e.length}get playing(){return this.#l!==null}setup(){let t=[...this.children];if(t.length===0)return!1;this.#u=window.matchMedia("(prefers-reduced-motion: reduce)").matches||document.documentElement.hasAttribute("data-motion-reduced"),this.#p=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#p&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label","Carousel"),this.#t=document.createElement("div"),this.#t.className="carousel-track",this.#t.setAttribute("tabindex","0"),this.#t.setAttribute("role","group"),this.#t.setAttribute("aria-label",this.dataset.labelTrack||"Slides");let i=this.getAttribute("item-width");if(i&&i!=="auto"&&i!=="full"&&CSS.supports("inline-size",i)&&this.#t.style.setProperty("--_item-width",i),t.forEach((a,o)=>{a.setAttribute("role","group"),a.setAttribute("aria-roledescription","slide"),a.hasAttribute("aria-label")||(a.setAttribute("aria-label",`${o+1} of ${t.length}`),this.#y.add(a)),this.#t.appendChild(a)}),this.#e=[...this.#t.children],this.hasAttribute("autoplay")&&!this.#u&&this.#g(),this.#n=document.createElement("button"),this.#n.type="button",this.#n.className="carousel-prev",this.#n.setAttribute("aria-label","Previous slide"),this.#n.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#o=document.createElement("div"),this.#o.className="carousel-indicators",this.#o.setAttribute("role","group"),this.#o.setAttribute("aria-label","Slide indicators"),this.#e.forEach((a,o)=>{let c=document.createElement("button");c.type="button",c.className="carousel-dot",c.setAttribute("aria-label",`Go to slide ${o+1}`),o===0&&c.setAttribute("aria-current","true"),this.listen(c,"click",()=>this.goTo(o)),this.#o.appendChild(c)})),this.#r=document.createElement("div"),this.#r.className="carousel-live",this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.#i&&this.appendChild(this.#i),this.appendChild(this.#n),this.appendChild(this.#t),this.appendChild(this.#s),this.#o&&this.appendChild(this.#o),this.appendChild(this.#r),this.listen(this.#n,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#t,"keydown",this.#V),this.listen(this,"mouseenter",()=>{this.#h=!0,this.#w()}),this.listen(this,"mouseleave",()=>{this.#h=!1,this.#w()}),this.listen(this,"touchstart",()=>{this.#h=!0,this.#w()},{passive:!0}),this.listen(this,"focusin",()=>{this.#E=!0,this.#w()}),this.listen(this,"focusout",a=>{this.contains(a.relatedTarget)||(this.#E=!1,this.#w())}),this.#p){let a=++fg,o=this.getAttribute("transition")||"fade",c=o==="slide"?"vt-carousel-slide":o==="scale"?"vt-carousel-scale":"vt-carousel";this.#t.style.viewTransitionName=`carousel-${a}`,this.#t.style.viewTransitionClass=c}if(this.#p){let a=this.#t;Promise.resolve().then(()=>(kn(),xn)).then(({addSwipeListener:o})=>{!this.isConnected||this.#t!==a||(this.#v=o(a,{threshold:40}),this.listen(a,"swipe-left",()=>this.#k()?this.prev():this.next()),this.listen(a,"swipe-right",()=>this.#k()?this.next():this.prev()))})}this.#p||(this.#a=new IntersectionObserver(this.#O,{root:this.#t,threshold:.5}),this.#e.forEach(a=>this.#a.observe(a)),"onscrollend"in window&&this.listen(this.#t,"scrollend",()=>{this.#f=!1,this.#_()}));let r=this.#$()??(Number(this.getAttribute("start"))||0);if(this.#p){let a=r>0&&r<this.#e.length?r:0;this.#e.forEach((o,c)=>{o.hidden=c!==a}),this.#N(a)}else r>0&&r<this.#e.length&&this.goTo(r,!1);return this.#P(),this.#h=this.#E=!1,this.#d=this.hasAttribute("autoplay")&&!this.#u&&!this.#m,this.#w(),!0}teardown(){this.#d=!1,this.#L(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#v&&(this.#v(),this.#v=null),this.#t?.parentElement===this&&[...this.#t.children].forEach(t=>this.appendChild(t)),this.#e.forEach(t=>{this.#y.has(t)&&t.removeAttribute("aria-label")}),this.#t?.remove(),this.#i?.remove(),this.#n?.remove(),this.#s?.remove(),this.#o?.remove(),this.#r?.remove(),this.#t=this.#i=this.#n=this.#s=this.#o=this.#r=null,this.#e=[],this.#p=!1,this.#c=0,this.#b=0,this.#f=!1}get slides(){return this.#e.map((t,i)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${i+1} of ${this.#e.length}`}))}set slides(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of i){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this._reinit(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:i,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#e.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#e.length-1)}goTo(t,i=!0){if(!(t<0||t>=this.#e.length)){if(this.#p)if(i&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,nt(()=>{this.#x(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#x(t);else{let s=this.#e[t].getBoundingClientRect(),n=this.#t.getBoundingClientRect(),r=this.#k()?s.right-n.right:s.left-n.left,a=i&&!this.#u?"smooth":"instant";this.#t.scrollTo({left:this.#t.scrollLeft+r,behavior:a})}this.#N(t)}}#x(t){this.#e.forEach((i,s)=>{i.hidden=s!==t})}play(){this.#u||!this.#t||(this.#m=!1,this.#d=!0,this.#h=this.#E=!1,this.#i||(this.#g(),this.insertBefore(this.#i,this.firstChild)),this.#w())}pause(){this.#m=!0,this.#d=!1,this.#w()}#g(){let t=document.createElement("button");t.type="button",t.className="carousel-rotate",this.listen(t,"click",()=>{this.#d?this.pause():this.play()}),this.#i=t,this.#S()}#S(){let t=this.#i;if(!t)return;let i=this.#d?"Pause automatic slide show":"Start automatic slide show";t.getAttribute("aria-label")!==i&&(t.setAttribute("aria-label",i),t.innerHTML=`<icon-wc name="${this.#d?"pause":"play"}" size="sm"></icon-wc>`)}#w(){this.#d&&!this.#h&&!this.#E&&!this.#u&&this.isConnected&&!!this.#t?this.#A():this.#L(),this.#S()}#A(){if(this.#l)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#l=setInterval(()=>this.next(),t),this.#r?.setAttribute("aria-live","off"),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}#L(){this.#r?.setAttribute("aria-live","polite"),this.#l&&(clearInterval(this.#l),this.#l=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}#k(){return getComputedStyle(this).direction==="rtl"}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#M()}#N(t){this.#c=t,this.#P(),this.#K(),this.#r&&(this.#r.textContent=`Slide ${t+1} of ${this.#e.length}`),!this.#f&&(this.#_(),!this.#p&&"onscrollend"in window&&(this.#f=!0))}#_(){this.#c!==this.#b&&(this.#b=this.#c,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#c,slide:this.#e[this.#c]},bubbles:!0})))}#P(){let t=this.hasAttribute("loop"),i=this.#c===0,s=this.#c===this.#e.length-1;if(this.#n&&(this.#n.disabled=!t&&i),this.#s&&(this.#s.disabled=!t&&s),this.#o){let n=this.#o.children;for(let r=0;r<n.length;r++)r===this.#c?(n[r].setAttribute("aria-current","true"),n[r].setAttribute("data-active","")):(n[r].removeAttribute("aria-current"),n[r].removeAttribute("data-active"))}}#O=t=>{for(let i of t)if(i.isIntersecting){let s=this.#e.indexOf(i.target);s!==-1&&s!==this.#c&&this.#N(s)}};#V=t=>{let i=(t.key==="ArrowLeft"||t.key==="ArrowRight")&&this.#k();switch(t.key){case"ArrowLeft":t.preventDefault(),i?this.next():this.prev();break;case"ArrowRight":t.preventDefault(),i?this.prev():this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#e.length-1);break}};#$(){let t=this.getAttribute("persist");if(!t)return null;try{let i=localStorage.getItem(`carousel:${t}`);return i!==null?Number(i):null}catch{return null}}#K(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#M(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};w("carousel-wc",Cn);var pg=0,Tn=class extends E{static formAssociated=!0;#t;#e;#i;#n;#s=[];#o=[];#r=-1;#a=!1;#l="";#c="";#b;#f=!1;#u;#p;#v=[];constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}get#d(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#e=t;let i=this.#e.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#e.removeAttribute("name"));let s=this.querySelector("ul, ol");if(!s)return!1;if(this.#i=s,this.#d){let c=this.querySelector(":scope > .tags-input-area");if(!c){c=document.createElement("div"),c.className="tags-input-area";let u=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(c,u)}this.#u=c,this.#e.parentNode!==this.#u&&this.#u.appendChild(this.#e);let l=this.querySelector(":scope > [data-combobox-live]");l||(l=document.createElement("div"),l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),l.setAttribute("data-combobox-live",""),l.className="visually-hidden",this.appendChild(l)),this.#p=l}let n=this.getAttribute("placeholder");n&&!this.#e.getAttribute("placeholder")&&this.#e.setAttribute("placeholder",n);let r=`cb${++pg}`;this.#i.id||(this.#i.id=`combobox-listbox-${r}`),this.#e.setAttribute("role","combobox"),this.#e.setAttribute("aria-expanded","false"),this.#e.setAttribute("aria-autocomplete","list"),this.#e.setAttribute("aria-controls",this.#i.id),this.#e.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#d&&this.#i.setAttribute("aria-multiselectable","true");let a=this.#d?this.#u:this.#e;a.id||(a.id=`combobox-anchor-${r}`);let o=this.querySelector(":scope > pop-over[data-combobox-host]");if(o?this.#n=o:(this.#n=document.createElement("pop-over"),this.#n.setAttribute("data-combobox-host",""),this.#n.id=`combobox-pop-${r}`,this.#n.dataset.mode="manual",this.#n.dataset.position="bottom-start",this.#n.dataset.anchor=a.id,this.#n.appendChild(this.#i),this.appendChild(this.#n)),this.#n.dataset.anchor=a.id,this.#i.parentElement!==this.#n&&this.#n.appendChild(this.#i),this.#E(),!this.#d){let c=this.getAttribute("value");c&&this.#M(c,!1),this.#b===void 0&&(this.#b=this.#l)}return this.listen(this.#e,"input",this.#w),this.listen(this.#e,"keydown",this.#A),this.listen(this.#e,"focus",this.#L),this.listen(this.#e,"click",this.#k),this.listen(this.#i,"click",this.#N),this.listen(this.#i,"pointerdown",this.#_),this.listen(document,"click",this.#P),this.listen(this.#n,"pop-over:hide",this.#et),this.listen(this,"invalid",this.#m),this.#I(),this.#C(),this.#B(),this.#h(this.matches(":disabled")),!0}teardown(){}#m=()=>{this.#e.setAttribute("aria-invalid","true")};formDisabledCallback(t){this.#e&&this.#h(t)}#h(t){this.#f=t,t&&this.#B();let i=this.#g(),s=this.#d&&i>0&&this.#v.length>=i;if(this.#e.disabled=t||s,this.#u)for(let n of this.#u.querySelectorAll(".tag button"))n.disabled=t}#E(){this.#s=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#s.forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${i}`)}),this.#o=[...this.#s]}#y(t,i){if(this.#v.some(o=>o.value===t))return;let s=this.#g();if(s&&this.#v.length>=s)return;this.#v.push({value:t,label:i});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=i+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${i}`),r.innerHTML="×",r.disabled=this.#f,r.addEventListener("click",o=>{o.stopPropagation(),this.#x(t)}),n.appendChild(r),this.#u.insertBefore(n,this.#e);let a=this.#s.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#S(`${i} added`),this.#e.value="",this.#O(""),this.#I(),this.#C(),this.#q(),s&&this.#v.length>=s&&(this.#e.disabled=!0,this.#B())}#x(t){let i=this.#v.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#v.splice(i,1)[0],n=this.#u.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#s.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#S(`${s.label} removed`),this.#g()&&this.#e.disabled&&(this.#e.disabled=this.#f),this.#O(this.#e.value.trim()),this.#I(),this.#C(),this.#q(),this.#e.focus()}#g(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#S(t){this.#p&&(this.#p.textContent="",requestAnimationFrame(()=>{this.#p.textContent=t}))}#w=()=>{let t=this.#e.value.trim();if(!this.#d&&this.#l){let i=this.#i.querySelector('[aria-selected="true"]');i&&i.setAttribute("aria-selected","false"),this.#l="",this.#c="",this.removeAttribute("value"),this.#I(),this.#C()}this.#O(t),this.#T()};#A=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#a||this.#T(),this.#V(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#a||this.#T(),this.#V(this.#r-1);break;case"Home":this.#a&&(t.preventDefault(),this.#V(0));break;case"End":this.#a&&(t.preventDefault(),this.#V(this.#o.length-1));break;case"Enter":if(this.#a&&this.#r>=0&&this.#o[this.#r]){t.preventDefault();let i=this.#o[this.#r];this.#d?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#K(i)}else if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#y(i,i)}break;case"Backspace":if(this.#d&&!this.#e.value&&this.#v.length>0){let i=this.#v[this.#v.length-1];this.#x(i.value)}break;case",":if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#y(i,i)}break;case"Escape":this.#a&&(t.preventDefault(),t.stopPropagation(),this.#B(),this.#e.focus());break;case"Tab":this.#a&&this.#B();break}};#L=()=>{this.#d?(this.#O(this.#e.value.trim()),this.#T()):(this.#e.value||!this.#l)&&(this.#O(this.#e.value.trim()),this.#T())};#k=()=>{this.#a||(this.#O(this.#e.value.trim()),this.#T())};#N=t=>{let i=t.target.closest("li[data-value]");i&&this.#o.includes(i)&&(this.#d?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#K(i))};#_=t=>{t.preventDefault()};#P=t=>{this.#a&&!this.contains(t.target)&&this.#B()};#O(t){let i=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#d?new Set(this.#v.map(r=>r.value)):null;this.#o=[],this.#s.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?i==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#o.push(r)}),this.#r=-1,this.#$(),this.setState("no-matches",this.#o.length===0)}#V(t){if(this.#o.length===0)return;t<0&&(t=this.#o.length-1),t>=this.#o.length&&(t=0),this.#r>=0&&this.#o[this.#r]&&this.#o[this.#r].removeAttribute("data-active"),this.#r=t;let i=this.#o[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"}),this.#e.setAttribute("aria-activedescendant",i.id)}#$(){this.#s.forEach(t=>t.removeAttribute("data-active")),this.#e.removeAttribute("aria-activedescendant")}#K(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();if(this.#l===s){this.#e.value=n,this.#B(),this.#e.focus();return}this.#s.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#l=s,this.#c=n,this.#e.value=n,this.setAttribute("value",s),this.#I(),this.#C(),this.#B(),this.#e.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}}))}#M(t,i=!0,s="api"){let n=this.#s.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#K(n,s):(this.#s.forEach(r=>r.setAttribute("aria-selected","false")),n.setAttribute("aria-selected","true"),this.#l=t,this.#c=n.textContent.trim(),this.#e.value=this.#c,this.setAttribute("value",t)))}#T(){this.#a||this.#f||(this.#a=!0,this.setAttribute("open",""),this.#e.setAttribute("aria-expanded","true"),this.#n?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#B(){this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#$(),this.#n?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#et=()=>{this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#$(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#I(){if(this.#d)if(this.#v.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#v)t.append(i,s.value);this.#t.setFormValue(t)}else this.#t.setFormValue(null);else this.#l?this.#t.setFormValue(this.#l,this.#c):this.#t.setFormValue(null)}#C(){this.hasAttribute("required")?this.#d?this.#v.length===0?this.#t.setValidity({valueMissing:!0},"Please select at least one option",this.#e):this.#t.setValidity({}):this.#l?this.#t.setValidity({}):this.#t.setValidity({valueMissing:!0},"Please select an option",this.#e):this.#t.setValidity({}),this.#t.validity.valid&&this.#e.removeAttribute("aria-invalid")}#q(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#v.map(t=>t.value),labels:this.#v.map(t=>t.label),source:"internal"}}))}formResetCallback(){this.#d?(this.#u.querySelectorAll(".tag").forEach(t=>t.remove()),this.#v=[],this.#e.value="",this.#e.disabled=this.#f):(this.#l="",this.#c="",this.#e.value="",this.removeAttribute("value")),this.#s.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#o=[...this.#s],this.#r=-1,this.#$(),this.#B(),this.#e.removeAttribute("aria-invalid"),!this.#d&&this.#b&&this.#M(this.#b,!1),this.#I(),this.#C()}formStateRestoreCallback(t){t&&(this.#d||(this.#M(t,!1),this.#I(),this.#C()))}get value(){return this.#l}set value(t){t?this.#M(t):this.#G()}#G(){this.#s.forEach(t=>t.setAttribute("aria-selected","false")),this.#l="",this.#c="",this.#e&&(this.#e.value=""),this.removeAttribute("value"),this.#I(),this.#C()}get label(){return this.#c}get values(){return this.#v.map(t=>t.value)}get labels(){return this.#v.map(t=>t.label)}static get observedAttributes(){return["value","disabled"]}attributeChangedCallback(t,i,s){if(!this.#e)return;if(t==="disabled"){this.#h(this.matches(":disabled"));return}let n=s??"";t==="value"&&n!==this.#l&&(n?(this.#M(n,!1),this.#I(),this.#C()):this.#G())}};w("combo-box",Tn);var Ti=86400,mg=0;function Kt(e){return String(e).padStart(2,"0")}function Lt(e){if(!e)return null;let t=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?$/.exec(String(e).trim());if(!t)return null;let i=Number(t[1]),s=Number(t[2]),n=Number(t[3]||0);return i>23||s>59||n>59?null:i*3600+s*60+n}function Qc(e,t){let i=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60;return t?`${Kt(i)}:${Kt(s)}:${Kt(n)}`:`${Kt(i)}:${Kt(s)}`}function dt(e,t){return(e%t+t)%t}function bg(e){try{let{hourCycle:t}=new Intl.DateTimeFormat(e||void 0,{hour:"numeric"}).resolvedOptions();return t==="h12"||t==="h11"?"12h":"24h"}catch{return"24h"}}function gg(e){let t={am:"AM",pm:"PM",periodFirst:!1};try{let i=new Intl.DateTimeFormat(e||void 0,{hour:"numeric",minute:"2-digit",hourCycle:"h12"}),s=i.formatToParts(new Date(2e3,0,1,9,0)),n=i.formatToParts(new Date(2e3,0,1,21,0)),r=s.find(o=>o.type==="dayPeriod")?.value,a=n.find(o=>o.type==="dayPeriod")?.value;if(r&&a){t.am=r,t.pm=a;let o=s.map(c=>c.type);t.periodFirst=o.indexOf("dayPeriod")<o.indexOf("hour")}}catch{}return t}function vg(e,t){let i=e.trim().toLowerCase();if(!i)return null;let s=null,n=[[t.am.toLowerCase(),"AM"],[t.pm.toLowerCase(),"PM"],["a.m.","AM"],["p.m.","PM"],["am","AM"],["pm","PM"],["a","AM"],["p","PM"]].sort((l,u)=>u[0].length-l[0].length);for(let[l,u]of n)if(l){if(i.endsWith(l)){s=u,i=i.slice(0,-l.length).trim();break}if(i.startsWith(l)){s=u,i=i.slice(l.length).trim();break}}if(!/^\d{1,2}(?:[:.]\d{1,2}){0,2}$/.test(i))return null;let r=i.split(/[:.]/).map(Number),a=r[0],o=r[1]??0,c=r[2]??0;if(o>59||c>59)return null;if(s){if(a<1||a>12)return null;s==="AM"?a=a===12?0:a:a=a===12?12:a+12}else if(a>23)return null;return a*3600+o*60+c}var Ln=class extends E{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`tp${++mg}`;#i=!1;#n;#s;#o;#r;#a;#l=[];#c=null;#b=[];#f="24h";#u="";#p={am:"AM",pm:"PM",periodFirst:!1};#v=!1;#d=null;#m=null;#h=null;#E=60;#y;#x;#g=!1;#S="";#w=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){let t=this.querySelector(':scope > input[type="time"]');if(!t)return!1;this.#n=t,this.#u=this.closest("[lang]")?.lang||navigator.language||"en-US",this.#p=gg(this.#u);let i=this.getAttribute("data-format");this.#f=i==="12h"||i==="24h"?i:bg(this.#u),this.#L();let s=t.getAttribute("name");s&&(this.hasAttribute("name")||this.setAttribute("name",s),t.removeAttribute("name")),t.hasAttribute("disabled")&&(t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled",""));let n=`${this.#e}-no-form`,r=t.getAttribute("form");return r&&r!==n&&!this.hasAttribute("form")&&this.setAttribute("form",r),t.setAttribute("form",n),this.#y===void 0&&(this.#y=t.defaultValue),this.#x!==void 0&&(t.value=this.#x,this.#x=void 0),this.#d=Lt(t.value),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(t,"click",this.#_),this.listen(t,"focus",this.#N),this.#O(),this.#V(),this.#i=!0,this.#P(),this.#st(),this.#R(!1),this.#nt(),this.listen(document,"click",this.#B),this.listen(this,"focusout",this.#et),this.listen(this,"invalid",this.#Z),this.#A(this.matches(":disabled")),!0}teardown(){this.#g=!1,this.#o?.remove(),this.#a?.remove(),this.#l=[],this.#b=[],this.#c=null,this.#i=!1,clearTimeout(this.#Q),this.#H=""}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#A(this.matches(":disabled")),t==="required"&&this.#nt())}formDisabledCallback(t){this.#i&&this.#A(t)}#A(t){this.#s.disabled=t,this.#r.disabled=t,t&&this.#T()}#L(){let t=this.#n.getAttribute("step");if(t&&t.trim().toLowerCase()==="any")this.#E=null;else{let s=Number(t);this.#E=Number.isFinite(s)&&s>0?Math.max(1,Math.round(s)):60}this.#m=Lt(this.#n.getAttribute("min")),this.#h=Lt(this.#n.getAttribute("max"));let i=Lt(this.#n.value);this.#v=this.#E!==null&&this.#E%60!==0||i!==null&&i%60!==0}#k(t,i){return this.dataset[`label${t}`]||i}#N=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#_=t=>{t.preventDefault(),this.#N()};#P(){let t=new Set([...Array.from(this.#n.labels||[]),...Array.from(this.#t.labels||[])]),i=[];for(let a of t)a.id||(a.id=`${this.#e}-label-${i.length}`),i.push(a.id),this.listen(a,"click",this.#N);let s=this.#s,n=i.join(" ")||this.#n.getAttribute("aria-labelledby")||this.getAttribute("aria-labelledby");n?s.setAttribute("aria-labelledby",n):s.setAttribute("aria-label",this.#n.getAttribute("aria-label")||this.getAttribute("aria-label")||this.#k("Input","Time"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#O(){this.#o=document.createElement("div"),this.#o.className="time-trigger";let t=document.createElement("input");t.type="text",t.className="time-input",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),t.setAttribute("placeholder",this.#k("Placeholder","Type a time\u2026")),this.#s=t,this.#o.appendChild(t),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label",this.#k("Toggle","Toggle time spinners")),this.#r.setAttribute("tabindex","-1");let i=document.createElement("icon-wc");i.setAttribute("name","clock"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),this.#r.appendChild(i),this.#o.appendChild(this.#r),this.appendChild(this.#o),this.listen(this.#r,"click",s=>{s.stopPropagation(),this.#g?this.#T():this.#M(),this.#s.focus()}),this.listen(t,"focus",()=>t.select()),this.listen(t,"keydown",this.#C),this.listen(t,"blur",this.#G)}#V(){let t=`${this.#e}-panel`;this.#a=document.createElement("div"),this.#a.className="time-panel",this.#a.id=t,this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-modal","false"),this.#a.setAttribute("aria-label",this.#k("Dialog","Choose time")),this.#s.setAttribute("aria-controls",t);let i=this.#E??60,s=i>=3600&&i%3600===0?i/3600:1,n=i>=60&&i<3600&&i%60===0?i/60:1,r=i<60?i:1,a=i>=3600&&i%3600===0,o=this.#f==="12h",c=null;o&&(c=document.createElement("button"),c.type="button",c.className="period-toggle"),this.#c=c,c&&this.#p.periodFirst&&this.#a.appendChild(c);let l=!o&&this.#m!==null&&this.#h!==null&&this.#m<=this.#h;this.#l=[],this.#l.push(this.#$("hour",this.#k("Hours","Hours"),o?1:l?Math.floor(this.#m/3600):0,o?12:l?Math.floor(this.#h/3600):23,s,!1)),this.#a.appendChild(this.#K()),this.#l.push(this.#$("minute",this.#k("Minutes","Minutes"),0,59,n,a)),this.#v&&(this.#a.appendChild(this.#K()),this.#l.push(this.#$("second",this.#k("Seconds","Seconds"),0,59,r,!1))),c&&!this.#p.periodFirst&&this.#a.appendChild(c),this.#b=[...this.#a.querySelectorAll(".time-spinner, .period-toggle")],this.appendChild(this.#a);for(let u of this.#l)this.listen(u.incBtn,"click",()=>this.#z(u,u.delta,"pointer")),this.listen(u.decBtn,"click",()=>this.#z(u,-u.delta,"pointer")),this.listen(u.el,"keydown",d=>this.#U(d,u));if(this.#c){let u=this.#c;this.listen(u,"click",d=>{this.#X(d.detail===0?"keyboard":"pointer")}),this.listen(u,"keydown",d=>this.#D(d,u))}}#$(t,i,s,n,r,a){let o=document.createElement("div");o.className="time-spinner",o.dataset.unit=t,o.setAttribute("role","spinbutton"),o.setAttribute("aria-label",i),o.setAttribute("aria-valuemin",String(s)),o.setAttribute("aria-valuemax",String(n)),a&&o.setAttribute("aria-readonly","true"),o.setAttribute("tabindex","0");let c=document.createElement("button");c.type="button",c.className="time-inc",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.textContent="\u25B2",a&&(c.disabled=!0);let l=document.createElement("span");l.className="time-value";let u=document.createElement("button");return u.type="button",u.className="time-dec",u.setAttribute("aria-hidden","true"),u.setAttribute("tabindex","-1"),u.textContent="\u25BC",a&&(u.disabled=!0),o.append(c,l,u),this.#a.appendChild(o),{unit:t,el:o,valueEl:l,incBtn:c,decBtn:u,min:s,max:n,delta:r,readOnly:a}}#K(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#M(){this.#g||this.#s.disabled||(this.#g=!0,this.#a.setAttribute("data-open",""),this.#s.setAttribute("aria-expanded","true"))}#T(){this.#g&&(this.#g=!1,this.#a.removeAttribute("data-open"),this.#s.setAttribute("aria-expanded","false"))}#B=t=>{this.#g&&!this.contains(t.target)&&this.#T()};#et=t=>{let i=t.relatedTarget;i instanceof Node&&this.contains(i)||this.#T()};#I(t){try{let i=new Date(2e3,0,1,Math.floor(t/3600),Math.floor(t%3600/60),t%60),s={hour:this.#f==="12h"?"numeric":"2-digit",minute:"2-digit",hourCycle:this.#f==="12h"?"h12":"h23"};return this.#v&&(s.second="2-digit"),new Intl.DateTimeFormat(this.#u,s).format(i)}catch{return Qc(t,this.#v)}}#C=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation(),this.#q(),this.#g&&this.#T();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#g||this.#M(),this.#b[0]?.focus();return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#g&&this.#T(),this.#st();return}};#q(){let t=this.#s.value.trim();if(!t)this.#j(null,"keyboard");else{let i=vg(t,this.#p);i!==null&&this.#j(i,"keyboard")}this.#st()}#G=t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#q(),this.#Z())};#Z=()=>{this.#i&&(this.#w||(this.#w=!0,this.#nt()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#D(t,i){let s=this.#b.indexOf(i),n=getComputedStyle(this).direction==="rtl",r=n?"ArrowLeft":"ArrowRight",a=n?"ArrowRight":"ArrowLeft";return t.key===r||t.key===a?(t.preventDefault(),this.#b[s+(t.key===r?1:-1)]?.focus(),!0):t.key==="Escape"?(t.preventDefault(),t.stopPropagation(),this.#T(),this.#s.focus(),!0):!1}#U(t,i){if(this.#D(t,i.el))return;let s=i.unit==="hour"?i.delta:Math.ceil(10/i.delta)*i.delta;switch(t.key){case"ArrowUp":t.preventDefault(),this.#z(i,i.delta,"keyboard");break;case"ArrowDown":t.preventDefault(),this.#z(i,-i.delta,"keyboard");break;case"PageUp":t.preventDefault(),this.#z(i,s,"keyboard");break;case"PageDown":t.preventDefault(),this.#z(i,-s,"keyboard");break;case"Home":t.preventDefault(),this.#W(i,i.min,1,"keyboard");break;case"End":t.preventDefault(),this.#W(i,i.max,-1,"keyboard");break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#Y(t.key,i))}}#H="";#Q;#Y(t,i){clearTimeout(this.#Q),this.#H+=t;let s=()=>{let n=Math.min(Math.max(Number(this.#H),i.min),i.max);this.#H="",this.#W(i,n,0,"keyboard")};this.#H.length>=2||Number(this.#H)*10>i.max?s():this.#Q=setTimeout(s,800)}#F(){return this.#it(this.#m??0,1)}#it(t,i){let s=dt(t,Ti),n=this.#E;if(n){let o=this.#m??0,c=(s-o)/n,l=i>0?Math.floor(c):i<0?Math.ceil(c):Math.round(c);s=dt(o+l*n,Ti)}let r=this.#m,a=this.#h;return r!==null&&a!==null&&r<=a?(s<r&&(s=r),s>a&&(s=n?r+Math.floor((a-r)/n)*n:a)):r!==null&&a===null&&s<r?s=r:a!==null&&r===null&&s>a&&(s=n?Math.floor(a/n)*n:a),s}#z(t,i,s){if(t.readOnly)return;if(this.#d===null){this.#j(this.#F(),s);return}let n=this.#d,r=Math.floor(n/3600),a=Math.floor(n%3600/60),o=n%60,c;t.unit==="hour"?c=(this.#f==="12h"?dt(r%12+i,12)+(r>=12?12:0):dt(r+i,24))*3600+a*60+o:t.unit==="minute"?c=r*3600+dt(a+i,60)*60+o:c=r*3600+a*60+dt(o+i,60),this.#j(this.#it(c,i),s)}#W(t,i,s,n){if(t.readOnly)return;let r=this.#d??this.#F(),a=Math.floor(r/3600),o=Math.floor(r%3600/60),c=r%60,l;t.unit==="hour"?l=(this.#f==="12h"?i%12+(a>=12?12:0):i)*3600+o*60+c:t.unit==="minute"?l=a*3600+i*60+c:l=a*3600+o*60+i,this.#j(this.#it(l,s),n)}#X(t){let i=this.#d??this.#F();this.#j(this.#it(dt(i+12*3600,Ti),0),t)}#j(t,i){let s=this.value;return this.#d=t,t!==null&&t%60!==0&&!this.#v&&(this.#v=!0),this.#st(),this.value===s?!1:(this.#R(),this.#nt(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{...this.#J(),source:i}})),!0)}#J(){let t=this.#d;return t===null?{value:"",hours:null,minutes:null,seconds:null}:{value:this.value,hours:Math.floor(t/3600),minutes:Math.floor(t%3600/60),seconds:t%60}}#st(){if(!this.#i)return;let t=this.#d;this.#s.value=t===null?"":this.#I(t);let i=this.#k("Empty","Not set"),s=t===null?null:Math.floor(t/3600),n={hour:s===null?null:this.#f==="12h"?s%12||12:s,minute:t===null?null:Math.floor(t%3600/60),second:t===null?null:t%60},r=s===null?"":s>=12?this.#p.pm:this.#p.am;for(let a of this.#l){let o=n[a.unit];if(a.valueEl.textContent=o===null?"--":Kt(o),o===null){a.el.removeAttribute("aria-valuenow"),a.el.setAttribute("aria-valuetext",i);continue}a.el.setAttribute("aria-valuenow",String(o));let c;try{c=a.unit==="hour"&&this.#f==="12h"?new Intl.DateTimeFormat(this.#u,{hour:"numeric",hourCycle:"h12"}).format(new Date(2e3,0,1,s)):new Intl.NumberFormat(this.#u,{style:"unit",unit:a.unit,unitDisplay:"long"}).format(o)}catch{c=a.unit==="hour"&&r?`${o} ${r}`:String(o)}a.el.setAttribute("aria-valuetext",c)}this.#c&&(this.#c.textContent=r||"--",this.#c.setAttribute("aria-label",`${this.#k("Period","AM/PM")}: ${r||i}`))}#R(t=!0){let i=this.value;this.#t.setFormValue(i||null),this.#n.value=i,t&&this.#n.dispatchEvent(new Event("input",{bubbles:!0}))}#tt(t,i,s,n={}){let r=this.#n.getAttribute(`data-message-${t.toLowerCase()}`)??this.#k(i,s);for(let[a,o]of Object.entries(n))r=r.replaceAll(`{${a}}`,o);return r}#nt(){if(!this.#i)return!1;let t=this.hasAttribute("required")||this.#n.hasAttribute("required");t?this.#s.setAttribute("aria-required","true"):this.#s.removeAttribute("aria-required");let i=this.#d,s=this.#m,n=this.#h,r={},a="";if(i===null)t&&(r={valueMissing:!0},a=this.#tt("valueMissing","Required","Please select a time"));else{let l=s!==null&&n!==null&&s>n,u=s!==null&&i<s,d=n!==null&&i>n;if(l?u&&d:u)r=l?{rangeUnderflow:!0,rangeOverflow:!0}:{rangeUnderflow:!0},a=this.#tt("rangeUnderflow","RangeUnderflow","Choose a time at or after {time}",{time:this.#I(s)});else if(!l&&d)r={rangeOverflow:!0},a=this.#tt("rangeOverflow","RangeOverflow","Choose a time at or before {time}",{time:this.#I(n)});else if(this.#E&&dt(i-(s??0),this.#E)!==0){let h=this.#it(i,1),f=dt(h+this.#E,Ti);r={stepMismatch:!0},a=this.#tt("stepMismatch","StepMismatch","Choose a valid time. The nearest are {lower} and {upper}",{lower:this.#I(h),upper:this.#I(f)})}}let o=this.#t.validationMessage;return a?this.#t.setValidity(r,a,this.#s):this.#t.setValidity({}),a&&(i!==null||this.#w)?this.#s.setAttribute("aria-invalid","true"):this.#s.removeAttribute("aria-invalid"),(this.#n.validationMessage===this.#S||!this.#n.validity.customError)&&(this.#n.setCustomValidity(a),this.#S=a),o!==a}#rt(t){this.#d=t,this.#st(),this.#R(),this.#nt()}formResetCallback(){this.#i&&(this.#w=!1,this.#rt(Lt(this.#y)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#rt(Lt(t))}get form(){return this.#t.form}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}get willValidate(){return this.#t.willValidate}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#i?this.#d===null?"":Qc(this.#d,this.#v):this.#x??""}set value(t){let i=t==null?"":String(t).trim(),s=i?Lt(i):null;if(!(i&&s===null)){if(!this.#i){this.#x=i;return}this.#j(s,"api")}}};w("time-picker",Ln);var Li="popover"in HTMLElement.prototype;var Yt=[{ja:"\u4EE4\u548C",latin:"R",start:[2019,5,1]},{ja:"\u5E73\u6210",latin:"H",start:[1989,1,8]},{ja:"\u662D\u548C",latin:"S",start:[1926,12,25]},{ja:"\u5927\u6B63",latin:"T",start:[1912,7,30]},{ja:"\u660E\u6CBB",latin:"M",start:[1868,10,23]}],yg=new RegExp(`^(?:(${Yt.map(e=>e.ja).join("|")})|(${Yt.map(e=>e.latin).join("|")}))`+String.raw`\s*(元|\d{1,2})年?[/.\-]?\s*(\d{1,2})月?[/.\-]?\s*(\d{1,2})日?$`,"i"),wg=/^(\d{4})年(\d{1,2})月(\d{1,2})日?$/;function tl(e){return e.trim().replace(/[0-9]/g,t=>String(t.charCodeAt(0)-65296)).replace(/\s+/g,"")}function el(e,t,i){let s=new Date(2e3,t-1,i);return s.setFullYear(e),s.getMonth()===t-1&&s.getDate()===i?s:null}function il(e){let t=tl(e).match(yg);if(!t)return null;let i=t[1]?Yt.find(a=>a.ja===t[1]):Yt.find(a=>a.latin.toUpperCase()===t[2].toUpperCase());if(!i)return null;let s=t[3]==="\u5143"?1:Number(t[3]);if(s<1)return null;let n=el(i.start[0]+s-1,Number(t[4]),Number(t[5]));if(!n||n<new Date(i.start[0],i.start[1]-1,i.start[2]))return null;let r=Yt.indexOf(i);if(r>0){let a=Yt[r-1].start;if(n>=new Date(a[0],a[1]-1,a[2]))return null}return n}function sl(e){let t=tl(e).match(wg);return t?el(Number(t[1]),Number(t[2]),Number(t[3])):null}Z();var On=["january","february","march","april","may","june","july","august","september","october","november","december"],Sg=0;function Q(e){let t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Pn(e,t,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i))return null;let s=new Date(e,t,i);return s.getFullYear()!==e||s.getMonth()!==t||s.getDate()!==i?null:s}function rt(e){if(!e)return null;let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e).trim());return t?Pn(Number(t[1]),Number(t[2])-1,Number(t[3])):null}function Te(e,t){return new Date(e,t+1,0).getDate()}function Mn(e,t){let i=new Date(e.getFullYear(),e.getMonth()+t,1),s=i.getFullYear(),n=i.getMonth();return new Date(s,n,Math.min(e.getDate(),Te(s,n)))}function xg(e){try{let t=new Intl.Locale(e),i=t.getWeekInfo?.()??t.weekInfo;if(i)return i.firstDay%7}catch{}return 0}var _n=new Map;function nl(e,t){let i=`${e}:${t}`;if(_n.has(i))return _n.get(i);let s;try{let n=new Intl.DateTimeFormat(e,{weekday:t});s=Array.from({length:7},(r,a)=>n.format(new Date(2026,0,4+a)))}catch{s=t==="long"?["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}return _n.set(i,s),s}function rl(e,t){try{return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return Q(e)}}function Dn(e,t){return!!(e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}var In=new Map;function kg(e){if(In.has(e))return In.get(e);let t=new Map;On.forEach((i,s)=>{t.set(i,s),t.set(i.slice(0,3),s)});try{let i=new Intl.DateTimeFormat(e,{month:"long"}),s=new Intl.DateTimeFormat(e,{month:"short"});for(let n=0;n<12;n++){let r=new Date(2e3,n,1);t.set(i.format(r).toLowerCase(),n),t.set(s.format(r).toLowerCase().replace(".",""),n)}}catch{}return In.set(e,t),t}function $n(e,t){let i=e.trim(),s={date:null,partial:null};if(!i)return s;if(/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(i)){let o=rt(i.replace(/\//g,"-"));return o?{date:o,partial:null}:s}if(Ni(t)==="ja"){let o=il(i);if(o)return{date:o,partial:null}}let n=sl(i);if(n)return{date:n,partial:null};let r=kg(t),a=i.match(/^([a-zÀ-ɏ]+)\.?\s+(\d{1,2}),?\s+(\d{4})$/i);if(a){let o=r.get(a[1].toLowerCase());if(o===void 0)return s;let c=Pn(Number(a[3]),o,Number(a[2]));return c?{date:c,partial:null}:s}if(a=i.match(/^(\d{1,2})\.?\s+([a-zÀ-ɏ]+)\.?\s+(\d{4})$/i),a){let o=r.get(a[2].toLowerCase());if(o===void 0)return s;let c=Pn(Number(a[3]),o,Number(a[1]));return c?{date:c,partial:null}:s}if(a=i.match(/^([a-zÀ-ɏ]+)\.?\s+(\d{4})$/i),a){let o=r.get(a[1].toLowerCase());if(o!==void 0)return{date:null,partial:{year:Number(a[2]),month:o}}}return s}function al(e){let t=new Map;if(!e)return t;for(let i of e.split(",")){let[s,n]=i.trim().split(":");s&&t.set(s,n||"")}return t}var Rn=class extends E{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`dp${++Sg}`;#i=!1;#n;#s;#o;#r;#a;#l;#c;#b;#f=!1;#u=!1;#p="en-US";#v=null;#d=null;#m=new Date().getFullYear();#h=new Date().getMonth();#E=null;#y=null;#x=new Map;#g=new Map;#S;#w;#A=0;#L="";#k=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){let t=this.querySelector(':scope > input[type="date"]');if(!t)return!1;this.#n=t,this.#p=ft(this.closest("[lang]")?.lang||navigator.language),this.#A=xg(this.#p),this.#E=rt(t.getAttribute("min")),this.#y=rt(t.getAttribute("max")),this.#x=al(this.getAttribute("data-disabled-dates")),this.#g=al(this.getAttribute("data-highlight-dates"));let i=t.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),t.removeAttribute("name")),t.hasAttribute("disabled")&&(t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled",""));let s=`${this.#e}-no-form`,n=t.getAttribute("form");n&&n!==s&&!this.hasAttribute("form")&&this.setAttribute("form",n),t.setAttribute("form",s),this.#S===void 0&&(this.#S=t.defaultValue),this.#w!==void 0&&(t.value=this.#w,this.#w=void 0),this.#v=rt(t.value);let r=new Date;return this.#y&&r>this.#y&&(r=this.#y),this.#E&&r<this.#E&&(r=this.#E),this.#d=this.#v||r,this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(t,"click",this.#O),this.listen(t,"focus",this.#P),this.#$(),this.#K(),this.#i=!0,this.#V(),this.#Z(),this.#J(!1),this.#R(),this.#u=Li,this.#u&&this.#a.setAttribute("popover","manual"),this.listen(document,"click",this.#W),this.listen(this,"invalid",this.#z),this.#N(this.matches(":disabled")),!0}teardown(){this.#f=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#Q,{capture:!0}),window.removeEventListener("resize",this.#Q),this.#r?.remove(),this.#a?.remove(),this.#x=new Map,this.#g=new Map,this.#i=!1}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#N(this.matches(":disabled")),t==="required"&&this.#R())}formDisabledCallback(t){this.#i&&this.#N(t)}#N(t){this.#s.disabled=t,this.#o.disabled=t,t&&this.#U()}#_(t,i){return this.dataset[`label${t}`]||i}#P=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#O=t=>{t.preventDefault(),this.#P()};#V(){let t=new Set([...Array.from(this.#n.labels||[]),...Array.from(this.#t.labels||[])]),i=[];for(let a of t)a.id||(a.id=`${this.#e}-label-${i.length}`),i.push(a.id),this.listen(a,"click",this.#P);let s=this.#s,n=i.join(" ")||this.#n.getAttribute("aria-labelledby")||this.getAttribute("aria-labelledby");n?s.setAttribute("aria-labelledby",n):s.setAttribute("aria-label",this.#n.getAttribute("aria-label")||this.getAttribute("aria-label")||this.#_("Input","Date"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#$(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#s=document.createElement("input"),this.#s.type="text",this.#s.className="date-input",this.#s.setAttribute("role","combobox"),this.#s.setAttribute("aria-haspopup","dialog"),this.#s.setAttribute("aria-expanded","false"),this.#s.setAttribute("autocomplete","off"),this.#s.setAttribute("placeholder",this.#_("Placeholder","Type a date\u2026")),this.#r.appendChild(this.#s),this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="date-trigger-icon",this.#o.setAttribute("aria-label",this.#_("Toggle","Toggle calendar")),this.#o.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#o.appendChild(t),this.#r.appendChild(this.#o),this.appendChild(this.#r),this.listen(this.#o,"click",i=>{i.stopPropagation(),this.#f?this.#U():this.#D(),this.#s.focus()}),this.listen(this.#s,"focus",()=>this.#s.select()),this.listen(this.#s,"input",this.#Y),this.listen(this.#s,"keydown",this.#F),this.listen(this.#s,"blur",this.#it)}#K(){let t=`${this.#e}-calendar`;this.#a=document.createElement("div"),this.#a.className="calendar",this.#a.id=t,this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-modal","false"),this.#a.setAttribute("aria-label",this.#_("Dialog","Choose date")),this.#a.hidden=!0,this.#s.setAttribute("aria-controls",t);let i=document.createElement("div");i.className="calendar-header";let s=document.createElement("button");s.type="button",s.className="calendar-nav",s.setAttribute("aria-label",this.#_("Prev","Previous month"));let n=document.createElement("icon-wc");n.setAttribute("name","chevron-left"),n.setAttribute("size","sm"),n.setAttribute("aria-hidden","true"),s.appendChild(n);let r=document.createElement("span");r.className="calendar-title",this.#c=document.createElement("span"),this.#c.className="calendar-month",this.#c.id=`${t}-title`,this.#c.setAttribute("aria-live","polite"),this.#c.setAttribute("aria-atomic","true"),this.#b=document.createElement("select"),this.#b.className="calendar-year",this.#b.setAttribute("aria-label",this.#_("Year","Year")),this.#et(),r.appendChild(this.#c),r.appendChild(this.#b);let a=document.createElement("button");a.type="button",a.className="calendar-nav",a.setAttribute("aria-label",this.#_("Next","Next month"));let o=document.createElement("icon-wc");o.setAttribute("name","chevron-right"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),a.appendChild(o),i.appendChild(s),i.appendChild(r),i.appendChild(a),this.#a.appendChild(i);let c=document.createElement("table");c.setAttribute("role","grid"),c.setAttribute("aria-labelledby",`${t}-title`);let l=nl(this.#p,"short"),u=nl(this.#p,"long"),d=document.createElement("thead"),h=document.createElement("tr");for(let f=0;f<7;f++){let p=(this.#A+f)%7,m=document.createElement("th");m.setAttribute("abbr",u[p]),m.setAttribute("scope","col"),m.textContent=l[p],h.appendChild(m)}d.appendChild(h),c.appendChild(d),this.#l=document.createElement("tbody"),c.appendChild(this.#l),this.#a.appendChild(c),this.appendChild(this.#a),this.#M(),this.listen(s,"click",()=>this.#I(-1)),this.listen(a,"click",()=>this.#I(1)),this.listen(this.#b,"change",()=>{this.#m=Number(this.#b.value);let f=Te(this.#m,this.#h),p=Math.min(this.#d?.getDate()??1,f);this.#d=new Date(this.#m,this.#h,p),this.#M()}),this.listen(this.#l,"click",this.#X),this.listen(this.#a,"keydown",this.#j)}#M(){let t;try{t=new Intl.DateTimeFormat(this.#p,{month:"long"}).format(new Date(this.#m,this.#h,1))}catch{t=On[this.#h].charAt(0).toUpperCase()+On[this.#h].slice(1)}let i;try{i=new Intl.DateTimeFormat(this.#p,{month:"long",year:"numeric"}).format(new Date(this.#m,this.#h,1))}catch{i=`${t} ${this.#m}`}if(this.#c.lastElementChild?.textContent!==i){let l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.textContent=t;let u=document.createElement("span");u.className="visually-hidden",u.textContent=i,this.#c.replaceChildren(l,u)}this.#b.querySelector(`option[value="${this.#m}"]`)||this.#et(),this.#b.value=String(this.#m),this.#l.replaceChildren();let s=Te(this.#m,this.#h),r=(new Date(this.#m,this.#h,1).getDay()-this.#A+7)%7,a=new Date,o=document.createElement("tr");for(let l=0;l<r;l++)o.appendChild(document.createElement("td"));for(let l=1;l<=s;l++){let u=new Date(this.#m,this.#h,l),d=Q(u),h=document.createElement("td"),f=document.createElement("button");f.type="button",f.setAttribute("data-date",d),f.textContent=String(l),Dn(u,a)&&f.setAttribute("aria-current","date");let p=Dn(u,this.#v);h.setAttribute("aria-selected",String(p));let m=this.#B(u,d);m.disabled&&(f.setAttribute("aria-disabled","true"),m.reason&&f.setAttribute("data-disabled-reason",m.reason)),this.#g.has(d)&&f.setAttribute("data-highlight",this.#g.get(d)||""),Dn(u,this.#d)?(f.setAttribute("tabindex","0"),p||f.setAttribute("data-focused","")):f.setAttribute("tabindex","-1"),h.appendChild(f),o.appendChild(h),(r+l)%7===0&&(this.#l.appendChild(o),o=document.createElement("tr"))}let c=(r+s)%7;if(c>0){for(let l=c;l<7;l++)o.appendChild(document.createElement("td"));this.#l.appendChild(o)}}#T(t){return this.#B(t,Q(t)).disabled}#B(t,i){return this.#x.has(i)?{disabled:!0,reason:this.#x.get(i)}:this.#E&&t<this.#E?{disabled:!0,reason:null}:this.#y&&t>this.#y?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#et(){this.#b.replaceChildren();let t=new Date().getFullYear(),i=this.#E?this.#E.getFullYear():t-100,s=this.#y?this.#y.getFullYear():t+10;i=Math.min(i,this.#m),s=Math.max(s,this.#m);for(let n=i;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#b.appendChild(r)}}#I(t){let i=this.#d??new Date(this.#m,this.#h,1),s=new Date(this.#m,this.#h,Math.min(i.getDate(),Te(this.#m,this.#h)));this.#d=Mn(s,t),this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),this.#M();let n=document.activeElement;n?.matches(".calendar-nav:focus-visible")&&this.#a.contains(n)||this.#G(this.#d)}#C(t,i){if(t&&this.#T(t))return!1;let s=this.value,n=t?Q(t):"";return this.#v=t,t&&(this.#d=t),this.#Z(),n===s?!1:(this.#J(),this.#R(),t&&i==="api"&&(this.#m=t.getFullYear(),this.#h=t.getMonth()),(this.#f||i==="api")&&this.#M(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:n,date:t?new Date(t):null,source:i}})),!0)}#q(t,i){this.#T(t)||(this.#C(t,i),this.#U(),this.#s.focus())}#G(t){let i=this.#l.querySelector(`[data-date="${Q(t)}"]`);if(i){for(let s of this.#l.querySelectorAll("button[data-date]"))s.setAttribute("tabindex",s===i?"0":"-1"),s!==i&&s.removeAttribute("data-focused");i.closest("td")?.getAttribute("aria-selected")!=="true"&&i.setAttribute("data-focused",""),i.focus()}}#Z(){this.#s.value=this.#v?rl(this.#v,this.#p):""}#D(){if(!(this.#f||this.#s.disabled)){if(this.#f=!0,this.setAttribute("open",""),this.#s.setAttribute("aria-expanded","true"),this.#a.hidden=!1,this.#d&&(this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth()),this.#M(),this.#u){try{this.#a.showPopover()}catch{}this.#H(),window.addEventListener("scroll",this.#Q,{capture:!0,passive:!0}),window.addEventListener("resize",this.#Q,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#U(){if(this.#f){if(this.#f=!1,this.removeAttribute("open"),this.#s.setAttribute("aria-expanded","false"),this.#a.hidden=!0,this.#u){try{this.#a.hidePopover()}catch{}window.removeEventListener("scroll",this.#Q,{capture:!0}),window.removeEventListener("resize",this.#Q)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#H(){if(!this.#u)return;let t=this.#r.getBoundingClientRect(),i=this.#a.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,l;o<i.height&&c>o?(l=t.top-i.height-s,this.#a.dataset.placement="top"):(l=t.bottom+s,delete this.#a.dataset.placement);let u=t.left;u+i.width>a-n&&(u=a-i.width-n),u<n&&(u=n),this.#a.style.setProperty("--calendar-top",`${l}px`),this.#a.style.setProperty("--calendar-left",`${u}px`)}#Q=()=>{this.#f&&this.#H()};#Y=()=>{let t=this.#s.value,{date:i,partial:s}=$n(t,this.#p);if(i)this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#M();else if(s){this.#m=s.year,this.#h=s.month;let n=Te(s.year,s.month),r=Math.min(this.#d?.getDate()??1,n);this.#d=new Date(s.year,s.month,r),this.#M()}!this.#f&&t.length>0&&this.#D()};#F=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let i=this.#s.value.trim();if(!i){this.#C(null,"keyboard"),this.#U();return}let{date:s}=$n(i,this.#p);s&&!this.#T(s)&&this.#q(s,"keyboard");return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#f||this.#D(),requestAnimationFrame(()=>{this.#d&&this.#G(this.#d)});return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#f&&this.#U(),this.#Z();return;case"Tab":this.#f&&this.#U();return}};#it=t=>{if(t.relatedTarget instanceof Node&&this.contains(t.relatedTarget))return;let i=this.#s.value.trim();if(!i)this.#C(null,"keyboard");else{let{date:s}=$n(i,this.#p);s&&!this.#T(s)&&this.#C(s,"keyboard")}this.#Z(),this.#f&&this.#U(),this.#z()};#z=()=>{this.#i&&(this.#k||(this.#k=!0,this.#R()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#W=t=>{this.#f&&!this.contains(t.target)&&this.#U()};#X=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.getAttribute("aria-disabled")==="true")return;let n=rt(s.getAttribute("data-date"));n&&this.#q(n,"pointer")};#j=t=>{if(t.key==="Tab"){let o=[...this.#a.querySelectorAll('.calendar-header button, .calendar-header select, tbody button[tabindex="0"]')];if(!o.length)return;let c=o.indexOf(document.activeElement),l=c<0?0:(c+(t.shiftKey?-1:1)+o.length)%o.length;t.preventDefault(),o[l].focus();return}let i=t.target instanceof Element&&this.#l.contains(t.target),s=this.#d;if(!s)return;let n,r=(s.getDay()-this.#A+7)%7,a=getComputedStyle(this).direction==="rtl"?-1:1;switch(t.key){case"ArrowRight":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+a);break;case"ArrowLeft":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-a);break;case"ArrowDown":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+7);break;case"ArrowUp":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-7);break;case"PageDown":n=Mn(s,t.shiftKey?12:1);break;case"PageUp":n=Mn(s,t.shiftKey?-12:-1);break;case"Home":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-r);break;case"End":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+(6-r));break;case"Enter":case" ":if(!i)return;t.preventDefault(),t.stopPropagation(),this.#q(s,"keyboard");return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#U(),this.#s.focus();return;default:return}i&&(t.preventDefault(),t.stopPropagation(),this.#E&&n<this.#E&&(n=this.#E),this.#y&&n>this.#y&&(n=this.#y),this.#d=n,(n.getMonth()!==this.#h||n.getFullYear()!==this.#m)&&(this.#h=n.getMonth(),this.#m=n.getFullYear(),this.#M()),this.#G(n))};#J(t=!0){let i=this.#v?Q(this.#v):"";this.#t.setFormValue(i||null),this.#n.value=i,t&&this.#n.dispatchEvent(new Event("input",{bubbles:!0}))}#st(t,i,s,n=null){let r=this.#n.getAttribute(`data-message-${t.toLowerCase()}`)??this.#_(i,s);return n?r.replaceAll("{date}",rl(n,this.#p)):r}#R(){if(!this.#i)return!1;let t=this.hasAttribute("required")||this.#n.hasAttribute("required");t?this.#s.setAttribute("aria-required","true"):this.#s.removeAttribute("aria-required");let i=this.#v,s={},n="";t&&!i?(s={valueMissing:!0},n=this.#st("valueMissing","Required","Please select a date")):i&&this.#E&&i<this.#E?(s={rangeUnderflow:!0},n=this.#st("rangeUnderflow","RangeUnderflow","Choose a date on or after {date}",this.#E)):i&&this.#y&&i>this.#y&&(s={rangeOverflow:!0},n=this.#st("rangeOverflow","RangeOverflow","Choose a date on or before {date}",this.#y));let r=this.#t.validationMessage;return n?this.#t.setValidity(s,n,this.#s):this.#t.setValidity({}),n&&(i||this.#k)?this.#s.setAttribute("aria-invalid","true"):this.#s.removeAttribute("aria-invalid"),(this.#n.validationMessage===this.#L||!this.#n.validity.customError)&&(this.#n.setCustomValidity(n),this.#L=n),r!==n}#tt(){this.#i&&(this.#M(),this.#R()&&this.#n.dispatchEvent(new Event("input",{bubbles:!0})))}#nt(t){let i=t||new Date;this.#v=t,this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#Z(),this.#J(),this.#R(),this.#M()}formResetCallback(){this.#i&&(this.#k=!1,this.#nt(rt(this.#S)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#nt(rt(t))}get form(){return this.#t.form}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}get willValidate(){return this.#t.willValidate}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#i?this.#v?Q(this.#v):"":this.#w??""}set value(t){let i=t==null?"":String(t).trim(),s=i?rt(i):null;if(!(i&&!s)){if(!this.#i){this.#w=i;return}this.#C(s,"api")}}get min(){return this.#E?Q(this.#E):""}set min(t){this.#E=rt(t),this.#n&&(this.#E?this.#n.setAttribute("min",Q(this.#E)):this.#n.removeAttribute("min")),this.#tt()}get max(){return this.#y?Q(this.#y):""}set max(t){this.#y=rt(t),this.#n&&(this.#y?this.#n.setAttribute("max",Q(this.#y)):this.#n.removeAttribute("max")),this.#tt()}};w("date-picker",Rn);zt();function Gt(e,t,i){t/=100,i/=100;let s=a=>(a+e/30)%12,n=t*Math.min(i,1-i),r=a=>i-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function Mi(e,t,i,s=!1){e/=255,t/=255,i/=255;let n=Math.max(e,t,i),r=Math.min(e,t,i),a=(n+r)/2,o=0,c=0;if(n!==r){let l=n-r;switch(c=a>.5?l/(2-n-r):l/(n+r),n){case e:o=((t-i)/l+(t<i?6:0))/6;break;case t:o=((i-e)/l+2)/6;break;case i:o=((e-t)/l+4)/6;break}}return s?{h:o*360,s:c*100,l:a*100}:{h:Math.round(o*360),s:Math.round(c*100),l:Math.round(a*100)}}function Cg(e){e=e.replace(/^#/,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function Tg(e,t,i){return"#"+[e,t,i].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function pt(e,t=!1){let{r:i,g:s,b:n}=Cg(e);return Mi(i,s,n,t)}function mt(e,t,i){let{r:s,g:n,b:r}=Gt(e,t,i);return Tg(s,n,r)}function F(e,t,i){return Math.max(t,Math.min(i,e))}function qn(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Fn(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(F(t,0,1)*255)}function Lg(e,t,i){let s=qn(e),n=qn(t),r=qn(i),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,l=Math.cbrt(a),u=Math.cbrt(o),d=Math.cbrt(c),h=.2104542553*l+.793617785*u-.0040720468*d,f=1.9779984951*l-2.428592205*u+.4505937099*d,p=.0259040371*l+.7827717662*u-.808675766*d,m=Math.sqrt(f*f+p*p),b=Math.atan2(p,f)*180/Math.PI;return b<0&&(b+=360),m<1e-4&&(b=0),{L:h,C:m,H:b}}function Ng(e,t,i){let s=i*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=e+.3963377774*n+.2158037573*r,o=e-.1055613458*n-.0638541728*r,c=e-.0894841775*n-1.291485548*r,l=a**3,u=o**3,d=c**3,h=4.0767416621*l-3.3077115913*u+.2309699292*d,f=-1.2684380046*l+2.6097574011*u-.3413193965*d,p=-.0041960863*l-.7034186147*u+1.707614701*d;return{r:Fn(h),g:Fn(f),b:Fn(p)}}function Bn(e,t,i){let s=Gt(e,t,i);return Lg(s.r,s.g,s.b)}function ol(e,t,i,s=!1){let{r:n,g:r,b:a}=Ng(e,t,i);return Mi(n,r,a,s)}function Mg(e,t,i){return mt(e,t,i)}function _g(e,t,i){let{r:s,g:n,b:r}=Gt(e,t,i);return`rgb(${s} ${n} ${r})`}function Dg(e,t,i){return`hsl(${Math.round(e)}deg ${Math.round(t)}% ${Math.round(i)}%)`}function Ig(e,t,i){let{L:s,C:n,H:r}=Bn(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function cl(e,t,i,s){switch(e){case"rgb":return _g(t,i,s);case"hsl":return Dg(t,i,s);case"oklch":return Ig(t,i,s);default:return Mg(t,i,s)}}var Xt=["hex","rgb","hsl","oklch"],$g="hex",Og=/^#[0-9a-fA-F]{6}$/,Jt=8,Pg=0,Hn=class extends E{static formAssociated=!0;#t;#e;#i;#n;#s;#o;#r;#a;#l;#c;#b;#f;#u={};#p=$g;#v;#d;#m;#h=!1;#E=!1;#y=!1;#x=`cp${++Pg}`;#g=0;#S=100;#w=50;#A;static get observedAttributes(){return["disabled"]}constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){if(this.#e=this.querySelector(':scope > input[type="color"]'),!this.#e)return!1;if(!this.#y){let s=this.getAttribute("format");s&&Xt.includes(s)&&(this.#p=s),this.#y=!0}if(this.#A===void 0){let s=this.#e.defaultValue;this.#A=Og.test(s)?s.toLowerCase():this.#e.value||"#000000"}let t=pt(this.#e.value||this.#A,!0);this.#g=t.h,this.#S=t.s,this.#w=t.l;let i=this.#e.getAttribute("name");return i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#e.removeAttribute("name")),this.#e.hasAttribute("disabled")&&(this.#e.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled","")),this.#e.setAttribute("tabindex","-1"),this.#e.setAttribute("aria-hidden","true"),this.#e.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(this.#e,"click",this.#k),this.#_(),this.#P(),this.#F(),this.#J(),this.#E=Li,this.#E&&this.#r.setAttribute("popover","manual"),this.listen(document,"click",this.#j),this.listen(this,"keydown",this.#N),this.#L(this.matches(":disabled")),!0}teardown(){this.#h=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#X,{capture:!0}),window.removeEventListener("resize",this.#X),this.#i?.remove(),this.#r?.remove()}attributeChangedCallback(t){t==="disabled"&&this.#i&&this.#L(this.matches(":disabled"))}formDisabledCallback(t){this.#i&&this.#L(t)}#L(t){this.#i.disabled=t,t&&this.#z()}#k=t=>{t.preventDefault(),this.#i.disabled||this.#i.focus()};#N=t=>{t.key!=="Escape"||t.defaultPrevented||!this.#h||(t.preventDefault(),t.stopPropagation(),this.#z())};#_(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#n=document.createElement("span"),this.#n.className="color-swatch",this.#s=document.createElement("span"),this.#s.className="color-hex",this.#s.id=`${this.#x}-value`,this.#i.appendChild(this.#n),this.#i.appendChild(this.#s);let t=[];for(let i of Array.from(this.#e.labels||[]))i.id||(i.id=`${this.#x}-label-${t.length}`),t.push(i.id);t.length===0&&(this.#o=document.createElement("span"),this.#o.className="visually-hidden",this.#o.id=`${this.#x}-name`,this.#o.textContent=this.#e.getAttribute("aria-label")||this.getAttribute("aria-label")||"Color",this.#i.prepend(this.#o),t.push(this.#o.id)),this.#i.setAttribute("aria-labelledby",[...t,this.#s.id].join(" ")),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#h?this.#z():this.#it()})}#P(){this.#v=void 0,this.#d=void 0,this.#r=document.createElement("div"),this.#r.className="color-panel",this.#r.setAttribute("role","dialog"),this.#r.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("aria-valuemin","0"),this.#a.setAttribute("aria-valuemax","100"),this.#a.setAttribute("tabindex","0"),this.#l=document.createElement("div"),this.#l.className="color-area-thumb",this.#a.appendChild(this.#l),this.#r.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#b=document.createElement("div"),this.#b.className="color-hue-thumb",this.#c.appendChild(this.#b),t.appendChild(this.#c),this.#r.appendChild(t);let i=document.createElement("div");i.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#f=document.createElement("select"),this.#f.className="color-format-select";for(let o of Xt){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#f.appendChild(c)}this.#f.value=this.#p,s.appendChild(n),s.appendChild(this.#f),i.appendChild(s),this.#r.appendChild(i),this.listen(this.#f,"change",this.#$),this.#u.hex=this.#O("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#u.rgb=this.#O("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#u.hsl=this.#O("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#u.oklch=this.#O("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of Xt)this.#r.appendChild(this.#u[o].wrapper);this.#V();let r=this.querySelector(":scope > datalist");if(r){this.#v=document.createElement("div"),this.#v.className="color-swatches",this.#v.setAttribute("role","group"),this.#v.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("aria-pressed","false"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#v.appendChild(c)}this.#r.appendChild(this.#v),this.listen(this.#v,"click",this.#U)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-eyedropper",this.#d.setAttribute("aria-label","Pick color from screen"),this.#d.textContent="\u{1F4A7}",a.appendChild(this.#d),this.listen(this.#d,"click",this.#H)),this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-copy",this.#m.setAttribute("aria-label","Copy hex value"),this.#m.textContent="Copy",a.appendChild(this.#m),this.listen(this.#m,"click",this.#Q),this.#r.appendChild(a),this.appendChild(this.#r),this.listen(this.#a,"pointerdown",this.#K),this.listen(this.#a,"keydown",this.#T),this.listen(this.#c,"pointerdown",this.#B),this.listen(this.#c,"keydown",this.#I);for(let o of Xt){let c=o==="hex"?this.#q:o==="rgb"?this.#G:o==="hsl"?this.#Z:this.#D;for(let{el:l}of this.#u[o].inputs)this.listen(l,"change",c)}}#O(t,i){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of i){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#V(){for(let t of Xt)this.#u[t].wrapper.hidden=t!==this.#p;this.#m&&this.#m.setAttribute("aria-label",`Copy ${this.#p.toUpperCase()} value`)}#$=()=>{let t=this.#f.value;Xt.includes(t)&&(this.#p=t,this.#V(),this.#F())};#K=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#M(t);let i=n=>this.#M(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",i),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",i),this.#a.addEventListener("pointerup",s)};#M(t){let i=this.#a.getBoundingClientRect(),s=F((t.clientX-i.left)/i.width,0,1),n=F((t.clientY-i.top)/i.height,0,1);this.#S=Math.round(s*100),this.#w=Math.round((1-n)*100),this.#Y("pointer")}#T=t=>{let i=t.shiftKey?10:1;switch(this.#S=Math.round(this.#S),this.#w=Math.round(this.#w),t.key){case"ArrowRight":t.preventDefault(),this.#S=F(this.#S+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#S=F(this.#S-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#w=F(this.#w+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#w=F(this.#w-i,0,100);break;case"Home":t.preventDefault(),this.#S=0;break;case"End":t.preventDefault(),this.#S=100;break;case"PageUp":t.preventDefault(),this.#w=F(this.#w+10,0,100);break;case"PageDown":t.preventDefault(),this.#w=F(this.#w-10,0,100);break;default:return}this.#Y("keyboard")};#B=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#et(t);let i=n=>this.#et(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",i),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",i),this.#c.addEventListener("pointerup",s)};#et(t){let i=this.#c.getBoundingClientRect(),s=F((t.clientX-i.left)/i.width,0,1);this.#g=Math.round(s*360),this.#Y("pointer")}#I=t=>{let i=t.shiftKey?10:1;switch(this.#g=Math.round(this.#g),t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#g=(this.#g+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#g=(this.#g-i+361)%361;break;case"PageUp":t.preventDefault(),this.#g=F(this.#g+10,0,360);break;case"PageDown":t.preventDefault(),this.#g=F(this.#g-10,0,360);break;case"Home":t.preventDefault(),this.#g=0;break;case"End":t.preventDefault(),this.#g=360;break;default:return}this.#Y("keyboard")};#C(t,i){return this.#u[t].inputs.find(s=>s.channel===i)?.el}#q=()=>{let t=this.#C("hex","hex");if(!t)return;let i=t.value.trim();if(i.startsWith("#")||(i="#"+i),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(i)){let s=pt(i,!0);this.#g=s.h,this.#S=s.s,this.#w=s.l,this.#Y()}};#G=()=>{let t=F(Number(this.#C("rgb","r").value)||0,0,255),i=F(Number(this.#C("rgb","g").value)||0,0,255),s=F(Number(this.#C("rgb","b").value)||0,0,255),n=Mi(t,i,s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#Z=()=>{let t=F(Number(this.#C("hsl","h").value)||0,0,360)%361,i=F(Number(this.#C("hsl","s").value)||0,0,100),s=F(Number(this.#C("hsl","l").value)||0,0,100);this.#g=t,this.#S=i,this.#w=s,this.#Y()};#D=()=>{let t=F(Number(this.#C("oklch","oL").value)||0,0,100)/100,i=F(Number(this.#C("oklch","oC").value)||0,0,.4),s=F(Number(this.#C("oklch","oH").value)||0,0,360),n=ol(t,i,s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#U=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=pt(s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y()};#H=async()=>{try{let i=await new window.EyeDropper().open(),s=pt(i.sRGBHex,!0);this.#g=s.h,this.#S=s.s,this.#w=s.l,this.#Y()}catch{}};#Q=()=>{let t=cl(this.#p,this.#g,this.#S,this.#w);ut(t,{button:this.#m,announceMessage:"Color copied"})};#Y(t="internal"){this.#F(),this.#J();let i=mt(this.#g,this.#S,this.#w),s=Gt(this.#g,this.#S,this.#w);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:i,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:Math.round(this.#g),s:Math.round(this.#S),l:Math.round(this.#w)},source:t}}))}#F(){let t=mt(this.#g,this.#S,this.#w),i=Gt(this.#g,this.#S,this.#w),s=mt(this.#g,100,50);this.#n.style.background=t,this.#s.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#l.style.left=`${this.#S}%`,this.#l.style.top=`${100-this.#w}%`,this.#l.style.background=t;let n=Math.round(this.#g),r=Math.round(this.#S),a=Math.round(this.#w);this.#a.setAttribute("aria-valuenow",String(r)),this.#a.setAttribute("aria-valuetext",(this.getAttribute("data-label-area-value")||"Saturation {s}%, lightness {l}%").replaceAll("{s}",String(r)).replaceAll("{l}",String(a))),this.#b.style.left=`${this.#g/360*100}%`,this.#c.setAttribute("aria-valuenow",String(n)),this.#c.setAttribute("aria-valuetext",`Hue ${n}\xB0`);let o=(l,u,d)=>{let h=this.#C(l,u);h&&(h.value=String(d))};o("hex","hex",t),o("rgb","r",i.r),o("rgb","g",i.g),o("rgb","b",i.b),o("hsl","h",n),o("hsl","s",r),o("hsl","l",a);let c=Bn(this.#g,this.#S,this.#w);if(o("oklch","oL",(c.L*100).toFixed(1)),o("oklch","oC",c.C.toFixed(3)),o("oklch","oH",c.H.toFixed(1)),this.#v)for(let l of this.#v.querySelectorAll("button[data-color]")){let u=(l.getAttribute("data-color")||"").toLowerCase()===t.toLowerCase();l.setAttribute("aria-pressed",String(u))}}#it(){if(!(this.#h||this.#i.disabled)){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#E){try{this.#r.showPopover()}catch{}this.#W(),window.addEventListener("scroll",this.#X,{capture:!0,passive:!0}),window.addEventListener("resize",this.#X,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#z(){if(!this.#h)return;let t=this.#r.contains(document.activeElement);if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#E){try{this.#r.hidePopover()}catch{}window.removeEventListener("scroll",this.#X,{capture:!0}),window.removeEventListener("resize",this.#X)}t&&this.#i.isConnected&&!this.#i.disabled&&this.#i.focus(),this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}#W(){if(!this.#E)return;let t=this.#i.getBoundingClientRect(),i=this.#r.offsetWidth,s=this.#r.offsetHeight,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,o=getComputedStyle(this).direction==="rtl"?t.right-i:t.left;o=Math.min(o,n-i-Jt),o=Math.max(o,Jt);let c=t.bottom+4;c+s>r-Jt&&t.top-s-4>=Jt&&(c=t.top-s-4),c=Math.max(Jt,Math.min(c,r-s-Jt)),this.#r.style.setProperty("--panel-top",`${Math.round(c)}px`),this.#r.style.setProperty("--panel-left",`${Math.round(o)}px`)}#X=()=>{this.#h&&this.#W()};#j=t=>{this.#h&&!this.contains(t.target)&&this.#z()};#J(){let t=mt(this.#g,this.#S,this.#w);this.#t.setFormValue(t),this.#e.value=t,this.#e.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){if(!this.#i)return;let t=pt(this.#A,!0);this.#g=t.h,this.#S=t.s,this.#w=t.l,this.#F(),this.#J()}formStateRestoreCallback(t){if(!t||!this.#i)return;let i=pt(t,!0);this.#g=i.h,this.#S=i.s,this.#w=i.l,this.#F(),this.#J()}get value(){return mt(this.#g,this.#S,this.#w)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=mt(this.#g,this.#S,this.#w).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=pt(t,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#Y("api")}};w("color-picker",Hn);var Rg='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',qg='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function Fg(e){if(!e)return[];let t=e.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(i=>{let s=i.trim();return{value:s,label:s}})}function Bg(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function Hg(e){let t=Math.max(0,Math.round(e)),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return i>0?`${i}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Vg(e,t){let i=Number(e)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(i);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${i<0?"-":""}${a.format(r)} ${s[n]}`}function zg(){return document.documentElement.lang||void 0}function Vn(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var ll=!1,Ug=0,zn=class extends E{static formAssociated=!0;static observedAttributes=["value","disabled","readonly","aria-label","aria-labelledby","data-label-decrease","data-label-increase"];#t;#e;#i=-1/0;#n=1/0;#s=1;#o=[];#r=[];#a;#l;#c="";#b=!1;#f=!1;#u;#p;#v;#d=!1;#m=!1;#h;#E;#y;#x;#g;#S;#w=0;#A=0;#L=!1;#k=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){this.#P(),this.#O(),this.#K();let t=this.getAttribute("value");this.#d||(this.#v=t,this.#d=!0),this.#H(t??this.#$(),"init"),this.#N(),requestAnimationFrame(()=>{this.isConnected&&this.#N()}),this.listen(this.#h,"focus",()=>this.#N()),this.listen(this,"click",i=>{i.target===this&&!this.#et()&&this.#h.focus()})}teardown(){this.#T(),this.#k=!1}attributeChangedCallback(t,i,s){!this.isConnected||!this.#h||(t==="value"?this.#H(s??this.#$(),"attr"):t==="disabled"||t==="readonly"?this.#C():t==="aria-label"||t==="aria-labelledby"?this.#N():this.#_())}#N(){let t=[],i=[];try{i=[...this.#t.labels||[]]}catch{}for(let a of i)a.id||(a.id=`stepper-wc-label-${++Ug}`),t.push(a.id);let s=(this.getAttribute("aria-labelledby")||"").trim();s&&t.push(...s.split(/\s+/));let n=[...new Set(t)];n.length?this.#h.setAttribute("aria-labelledby",n.join(" ")):this.#h.removeAttribute("aria-labelledby");let r=this.getAttribute("aria-label");r?this.#h.setAttribute("aria-label",r):this.#h.removeAttribute("aria-label")}#_(){this.#x.setAttribute("aria-label",this.getAttribute("data-label-decrease")||"Decrease"),this.#g.setAttribute("aria-label",this.getAttribute("data-label-increase")||"Increase")}#P(){if(this.hasAttribute("data-options"))this.#e="enum";else if(this.hasAttribute("data-values"))this.#e="token";else if(this.hasAttribute("data-format")||this.hasAttribute("data-suffix"))this.#e="formatted";else{if(this.#e="numeric",ll)return;ll=!0,console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/interaction/numeric-inputs/')}}#O(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#n=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#s=Number(this.getAttribute("data-step"))||1,this.#o=Bg(this.getAttribute("data-values")),this.#r=Fg(this.getAttribute("data-options")),this.#a=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#l=this.getAttribute("data-currency")||"USD",this.#c=this.getAttribute("data-suffix")||"",this.#b=this.hasAttribute("data-show-label"),this.#f=this.hasAttribute("data-accelerate"),this.#u=zg(),this.#S=this.#V()}#V(){if(!this.#a)return null;let t=Vn(this.#s);return this.#a==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#a==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#l}):this.#a==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#$(){return this.#e==="enum"?this.#r[0]?.value??"":this.#e==="token"?this.#o[0]??"":"0"}#K(){this.replaceChildren(),this.#x=document.createElement("button"),this.#x.type="button",this.#x.className="stepper-dec",this.#x.setAttribute("tabindex","-1"),this.#x.innerHTML=Rg,this.#g=document.createElement("button"),this.#g.type="button",this.#g.className="stepper-inc",this.#g.setAttribute("tabindex","-1"),this.#g.innerHTML=qg,this.#h=document.createElement("span"),this.#h.className="stepper-value",this.#h.setAttribute("role","spinbutton"),this.#h.setAttribute("tabindex","0"),this.#E=document.createElement("span"),this.#E.className="stepper-value-display",this.#h.appendChild(this.#E),this.#y=new Set;for(let t of this.#it())this.#z(t);this.appendChild(this.#x),this.appendChild(this.#h),this.appendChild(this.#g),this.#M(this.#x,-1),this.#M(this.#g,1),this.listen(this.#h,"keydown",this.#B),this.#_(),this.#C()}#M(t,i){if(this.listen(t,"click",n=>{if(this.#k){this.#k=!1,n.preventDefault();return}this.#q(i,1)}),!this.#f)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#I()||(this.#L=!1,this.#w=window.setTimeout(()=>{this.#L=!0,this.#A=window.setInterval(()=>this.#q(i,1),100),this.#w=window.setTimeout(()=>{window.clearInterval(this.#A),this.#A=window.setInterval(()=>this.#q(i,5),50)},1e3)},500))});let s=()=>{this.#T(),this.#L&&(this.#k=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T(){window.clearTimeout(this.#w),window.clearInterval(this.#A),this.#w=0,this.#A=0}#B=t=>{if(this.#I())return;let i=getComputedStyle(this).direction==="rtl";switch(i&&t.key==="ArrowLeft"?"ArrowRight":i&&t.key==="ArrowRight"?"ArrowLeft":t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#q(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#q(-1,1);break;case"PageUp":t.preventDefault(),this.#q(1,10);break;case"PageDown":t.preventDefault(),this.#q(-1,10);break;case"Home":t.preventDefault(),this.#G("min");break;case"End":t.preventDefault(),this.#G("max");break;default:}};#et(){return this.hasAttribute("disabled")||this.#m}#I(){return this.#et()||this.hasAttribute("readonly")}#C(){let t=this.#et();this.#h.setAttribute("aria-disabled",String(t)),this.hasAttribute("readonly")?this.#h.setAttribute("aria-readonly","true"):this.#h.removeAttribute("aria-readonly"),t?(this.#h.removeAttribute("tabindex"),this.#T()):this.#h.setAttribute("tabindex","0"),this.#p!==void 0?this.#X():(this.#x.disabled=this.#I(),this.#g.disabled=this.#I())}#q(t,i){if(this.#I())return;let s=this.#Z(t,i);s===null||s===this.#p||this.#H(s,"step")}#G(t){if(this.#e==="enum"){let s=t==="min"?0:this.#r.length-1;this.#H(this.#r[s]?.value,"step");return}if(this.#e==="token"){let s=t==="min"?0:this.#o.length-1;this.#H(this.#o[s],"step");return}let i=t==="min"?this.#i===-1/0?this.#p:this.#i:this.#n===1/0?this.#p:this.#n;this.#H(String(i),"step")}#Z(t,i){if(this.#e==="enum"){let c=this.#r.findIndex(d=>d.value===this.#p),l=c===-1?0:c,u=Math.min(this.#r.length-1,Math.max(0,l+t*i));return this.#r[u]?.value}if(this.#e==="token"){let l=this.#D(this.#p);l===-1&&(l=this.#U(this.#p));let u=Math.min(this.#o.length-1,Math.max(0,l+t*i));return this.#o[u]}let s=Number(this.#p)||0,n=Vn(this.#s),r=s+t*this.#s*i,a=Number(r.toFixed(n)),o=Math.min(this.#n,Math.max(this.#i,a));return String(o)}#D(t){if(t==null)return-1;let i=this.#o.indexOf(String(t));if(i!==-1)return i;let s=Number(t);if(Number.isFinite(s)){let n=this.#o.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#U(t){let i=Number(t);if(!Number.isFinite(i))return 0;let s=0,n=1/0;return this.#o.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-i);c<n&&(n=c,s=a)}),s}#H(t,i){let s=this.#Q(t),n=s!==this.#p;this.#p=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#Y(),this.#W(),this.#X(),this.#st(),this.#R(),n&&i!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#Q(t){if(t==null)return this.#$();if(this.#e==="enum"){let n=String(t);return this.#r.find(a=>a.value===n)?n:this.#r[0]?.value??""}if(this.#e==="token")return String(t);let i=Number(t);if(!Number.isFinite(i))return String(this.#i===-1/0?0:this.#i);let s=Vn(this.#s);return String(Number(Math.min(this.#n,Math.max(this.#i,i)).toFixed(s)))}#Y(){let t=this.#F();this.#E.textContent=t,this.#z(t)}#F(t=this.#p){if(this.#e==="enum")return this.#r.find(s=>s.value===t)?.label??t??"";if(this.#e==="token"){let i=this.#b?String(t).replace(/^--/,""):String(t);return this.#c?`${i}${this.#c}`:i}if(this.#e==="formatted"){let i=Number(t)||0;if(this.#a==="duration")return Hg(i);if(this.#a==="bytes")return Vg(i,this.#u);if(this.#S){let s=this.#a==="percent"?i/100:i,n=this.#S.format(s);return this.#c&&this.#a==="number"?`${n}${this.#c}`:n}return this.#c?`${i}${this.#c}`:String(i)}return String(t??"")}#it(){if(this.#e==="enum")return this.#r.map(s=>this.#F(s.value));if(this.#e==="token")return this.#o.map(s=>this.#F(s));let t=new Set,i=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&i(this.#i),this.#n!==1/0&&i(this.#n),i(Number(this.getAttribute("value"))||0),this.#n===1/0){let s=[10,100,1e3,1e4];for(let n of s)i(n);if(this.#a==="bytes")for(let n of[999,999e3,999e6,999e9])i(n)}return[...t].map(s=>this.#F(String(s)))}#z(t){let i=String(t??"");if(!i||this.#y.has(i))return;this.#y.add(i);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=i,this.#h.appendChild(s)}recomputeWidth(){if(this.#h){this.#h.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#y=new Set;for(let t of this.#it())this.#z(t)}}#W(){if(this.#e==="enum"){let i=this.#r.findIndex(s=>s.value===this.#p);this.#h.setAttribute("aria-valuemin","1"),this.#h.setAttribute("aria-valuemax",String(this.#r.length)),this.#h.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#h.setAttribute("aria-valuetext",this.#F());return}if(this.#e==="token"){let i=this.#D(this.#p);this.#h.setAttribute("aria-valuemin","1"),this.#h.setAttribute("aria-valuemax",String(this.#o.length)),this.#h.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#h.setAttribute("aria-valuetext",this.#F());return}let t=Number(this.#p)||0;this.#i!==-1/0?this.#h.setAttribute("aria-valuemin",String(this.#i)):this.#h.removeAttribute("aria-valuemin"),this.#n!==1/0?this.#h.setAttribute("aria-valuemax",String(this.#n)):this.#h.removeAttribute("aria-valuemax"),this.#h.setAttribute("aria-valuenow",String(t)),this.#h.setAttribute("aria-valuetext",this.#F())}#X(){let t=this.#j(),i=this.#J(),s=this.#I();this.#x.disabled=t||s,this.#g.disabled=i||s}#j(){return this.#e==="enum"?this.#p===this.#r[0]?.value:this.#e==="token"?this.#D(this.#p)===0:this.#i!==-1/0&&Number(this.#p)<=this.#i}#J(){return this.#e==="enum"?this.#p===this.#r[this.#r.length-1]?.value:this.#e==="token"?this.#D(this.#p)===this.#o.length-1:this.#n!==1/0&&Number(this.#p)>=this.#n}#st(){this.#t.setFormValue(String(this.#p??""))}#R(){this.setState("at-min",this.#j()),this.setState("at-max",this.#J())}formResetCallback(){this.#H(this.#v??this.#$(),"reset")}formDisabledCallback(t){this.#m=t,this.#h&&this.#C()}formStateRestoreCallback(t){t!=null&&this.#H(t,"restore")}get displayText(){return this.#E?.textContent??""}get value(){return this.#p==null?"":String(this.#p)}set value(t){String(t)!==String(this.#p)&&this.#H(t,"api")}get form(){return this.#t.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}};w("stepper-wc",zn);var Wg={live:"Live",recording:"Recording",streaming:"Streaming",error:"Error",online:"Online",running:"Running",away:"Away",paused:"Paused",busy:"Busy",offline:"Offline",stopped:"Stopped"},Un=class extends E{static get observedAttributes(){return["data-variant","data-live","aria-label"]}#t=null;#e=null;#i=!1;setup(){let t=this.querySelector(":scope > .status-dot"),i=this.querySelector(":scope > .status-label"),s=this.querySelector(":scope > .status-default-label");t||(t=document.createElement("span"),t.className="status-dot",t.setAttribute("aria-hidden","true")),i||(i=document.createElement("span"),i.className="status-label"),s||(s=document.createElement("span"),s.className="status-default-label");for(let n of[...this.childNodes])n===t||n===i||n===s||i.appendChild(n);this.append(t,i,s),this.#t=i,this.#e=s,this.#n(),this.#s()}attributeChangedCallback(t,i,s){i!==s&&(!this.isConnected||!this.hasAttribute("data-upgraded")||(t==="data-variant"?(this.#s(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:i}}))):t==="data-live"?this.#n():t==="aria-label"&&this.#s()))}#n(){this.getAttribute("data-live")==="off"?this.#i&&(this.removeAttribute("role"),this.removeAttribute("aria-live"),this.#i=!1):!this.hasAttribute("role")&&!this.hasAttribute("aria-live")&&(this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.#i=!0)}#s(){let t=this.#e;if(!t)return;let i=!!this.#t?.textContent?.trim(),s="";if(!i){let n=this.getAttribute("data-variant")||"";s=this.getAttribute("aria-label")||n&&this.getAttribute(`data-label-${n}`)||Wg[n]||n}t.textContent!==s&&(t.textContent=s)}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};w("status-wc",Un);Ee();wi();var Wn=0,jg='a[href], button, input, select, textarea, summary, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])',Kg="a[href], button, input, select, textarea, summary",Yg=new Set(["button","link","checkbox","radio","switch","tab","option","treeitem","gridcell","menuitem","menuitemcheckbox","menuitemradio","combobox","textbox","searchbox","slider","spinbutton"]);function _i(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}function Gg(e){return e.pointerType===""||e.pointerId===-1||e.button===-1||e.clientX===0&&e.clientY===0&&e.buttons===0}var jn=class extends E{#t;#e;#i;#n=[];#s=-1;#o=!1;#r=[];#a=!1;#l=[];#c=null;setup(){let t=this.querySelector(":scope > [data-trigger]"),i=this.querySelector('menu, ul[role="menu"]');if(!t||!i)return!1;this.#t=t,this.#e=i;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++Wn}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#e),this.appendChild(this.#i)),this.#e.parentElement!==this.#i&&this.#i.appendChild(this.#e),this.#e.setAttribute("role","menu"),this.#e.id||(this.#e.id=`ctx-menu-list-${++Wn}`),this.#t.matches(jg)||this.#b("tabindex","0"),this.#a=this.#t.matches(Kg)||this.#t.hasAttribute("tabindex")&&Yg.has((this.#t.getAttribute("role")||"").trim().toLowerCase()),this.#a?(this.#b("aria-haspopup","menu"),this.#b("aria-expanded","false"),this.#b("aria-controls",this.#e.id)):!this.#t.hasAttribute("aria-description")&&!this.#t.hasAttribute("aria-describedby")&&this.#b("aria-description",this.getAttribute("data-label-available")||"Context menu available"),this.#e.querySelectorAll(':scope > li:empty:not([data-group]), :scope > [role="separator"], :scope > hr').forEach(r=>{r.setAttribute("role","separator")}),this.#f();let n=Array.from(this.#e.querySelectorAll('button, a, [role="menuitem"]'));return n.forEach(r=>{r.setAttribute("role","menuitem"),r.setAttribute("tabindex","-1")}),this.#n=n.filter(r=>!r.disabled),this.#e.querySelectorAll("li").forEach(r=>{r.querySelector(':scope > :is(button, a, [role="menuitem"])')&&r.setAttribute("role","none")}),this.#n.forEach(r=>{r.hasAttribute("data-disabled")&&r.setAttribute("aria-disabled","true"),this.listen(r,"click",this.#g);let a=r.getAttribute("data-shortcut");if(a){if(!r.querySelector(":scope > .ctx-kbd")){let c=document.createElement("kbd");c.className="ctx-kbd",c.setAttribute("aria-hidden","true"),c.textContent=Nc(a),r.appendChild(c)}r.setAttribute("aria-keyshortcuts",yi(a));let o=jt(a,()=>{_i(r)||r.click()});this.#r.push(o)}}),this.listen(this.#t,"contextmenu",this.#p),this.listen(this.#t,"keydown",this.#v),this.listen(this.#e,"keydown",this.#y),this.listen(this.#e,"click",this.#x,{capture:!0}),this.listen(window,"scroll",this.#w,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#S),!0}teardown(){this.#r.forEach(t=>t()),this.#r=[];for(let t of this.#l)this.#t?.removeAttribute(t);this.#l=[],this.#c=null,this.#o&&(this.#o=!1,this.removeAttribute("data-open"),this.#i?.hide?.()),this.#s=-1,this.#n=[],this.#e?.querySelectorAll(".ctx-kbd").forEach(t=>t.remove()),this.#u()}#b(t,i){this.#t.setAttribute(t,i),this.#l.push(t)}#f(){let t=this.#e;for(let i of Array.from(t.querySelectorAll(":scope > li[data-group]"))){i.id||(i.id=`ctx-group-${++Wn}`),i.classList.add("ctx-group-label"),i.setAttribute("aria-hidden","true");let s=document.createElement("li");s.setAttribute("role","group"),s.setAttribute("aria-labelledby",i.id),s.setAttribute("data-ctx-group","");let n=document.createElement("ul");n.setAttribute("role","none"),s.appendChild(n),t.insertBefore(s,i),n.appendChild(i);let r=s.nextElementSibling;for(;r&&!r.hasAttribute("data-group")&&r.getAttribute("role")!=="separator";){let a=r;r=r.nextElementSibling,n.appendChild(a)}}}#u(){let t=this.#e;if(t)for(let i of Array.from(t.querySelectorAll(":scope > li[data-ctx-group]"))){let s=i.querySelector(":scope > ul");if(s)for(let n of Array.from(s.children))t.insertBefore(n,i);i.remove()}}get items(){if(!this.#e)return[];let t=[],i=this.#e.querySelectorAll(":scope > li:not([data-ctx-group]), :scope > li[data-ctx-group] > ul > li");for(let s of i){if(s.hasAttribute("data-group")){t.push({group:s.textContent.trim()});continue}if(s.matches(':empty, [role="separator"]')||s.querySelector("hr")){t.push({separator:!0});continue}let n=s.querySelector('button, a, [role="menuitem"]');if(!n)continue;let r=Array.from(n.childNodes).filter(a=>!(a instanceof Element&&a.classList.contains("ctx-kbd"))).map(a=>a.textContent).join("");t.push({label:r.trim().replace(/\s+/g," "),value:n.getAttribute("data-value")||void 0,href:n.tagName==="A"?n.getAttribute("href"):void 0,shortcut:n.getAttribute("data-shortcut")||void 0,disabled:n.disabled||n.hasAttribute("data-disabled")||void 0})}return t}set items(t){let i=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&a.setAttribute("data-disabled",""),a.tagName==="BUTTON"&&a.setAttribute("type","button"),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this._reinit(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#p=t=>{if(t.preventDefault(),Gg(t)){this.#o||this.#d();return}t.buttons!==0?this.listen(window,"pointerup",()=>{setTimeout(()=>this.#m(t.clientX,t.clientY),0)},{once:!0,capture:!0}):this.#m(t.clientX,t.clientY)};#v=t=>{t.defaultPrevented||(t.key==="ContextMenu"||t.key==="F10"&&t.shiftKey)&&(t.preventDefault(),this.#o||this.#d())};#d(){let t=document.activeElement,s=(t&&this.#t.contains(t)?t:this.#t).getBoundingClientRect();this.#m(s.left,s.bottom)}#m(t,i){let s=document.activeElement;this.#c=s&&this.#t.contains(s)?s:this.#t,this.#o=!0,this.setAttribute("data-open",""),this.#a&&this.#t?.setAttribute("aria-expanded","true"),this.#i.style.top=`${i}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let n=this.#i.getBoundingClientRect(),r=t+n.width>window.innerWidth?t-n.width:t,a=i+n.height>window.innerHeight?i-n.height:i;this.#i.style.top=`${Math.max(0,a)}px`,this.#i.style.left=`${Math.max(0,r)}px`}),this.#s=-1,this.#A(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){if(!this.#o)return;let t=this.#h();this.#o=!1,this.removeAttribute("data-open"),this.#a&&this.#t?.setAttribute("aria-expanded","false"),this.#s=-1,this.#i?.hide(),t&&this.#E(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0}))}#h(){let t=document.activeElement;return!t||t===document.body||!!this.#i?.contains(t)}#E(){let t=this.#c?.isConnected?this.#c:this.#t;this.#c=null,t?.isConnected&&t.focus({preventScroll:!0})}#y=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#A(this.#s+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#A(this.#s-1);break;case"Home":t.preventDefault(),this.#A(0);break;case"End":t.preventDefault(),this.#A(this.#n.length-1);break;case"Enter":case" ":{t.preventDefault();let i=this.#n[this.#s];i&&!_i(i)&&i.click();break}case"Tab":this.close();break}};#x=t=>{let i=t.target.closest?.('button, a, [role="menuitem"]');i&&this.#e.contains(i)&&_i(i)&&(t.preventDefault(),t.stopPropagation())};#g=t=>{let i=t.currentTarget;_i(i)||(this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})))};#S=()=>{this.#o&&(this.#o=!1,this.removeAttribute("data-open"),this.#a&&this.#t?.setAttribute("aria-expanded","false"),this.#s=-1,this.#h()&&this.#E(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#w=()=>{this.#o&&this.close()};#A(t){this.#n.length!==0&&(t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#s=t,this.#n[t].focus())}get isOpen(){return this.#o}};w("context-menu",jn);Ht();var ul=10,Xg=new Set(["replace","append","prepend"]),Jg="Failed to load content",Kn=class extends E{#t;#e;#i=null;#n=!1;#s=null;#o="";#r=!1;#a=null;setup(){let t=this.getAttribute("src");return t?(this.#r=!0,this.#i===null&&(this.#i=this.innerHTML),this.#n&&this.#s===t||this.#l(t),!0):!1}teardown(){this.#r=!1,this.#t?.disconnect(),this.hasAttribute("data-loading")&&(this.#e?.abort(),this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"))}get src(){return this.getAttribute("src")||""}set src(t){let i=t==null?"":String(t);this.src!==i&&(i?this.setAttribute("src",i):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:i,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,i,s){if(!(t!=="src"||!s||i===s)){if(!this.#r){queueMicrotask(()=>{!this.#r&&this.isConnected&&this.getAttribute("src")&&this._reinit()});return}this.#l(s)}}#l(t){this.hasAttribute("lazy")&&!this.#c()?this.#b():this.#d(t)}#c(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#b(){this.#t?.disconnect(),this.#t=new IntersectionObserver(t=>{for(let i of t)if(i.isIntersecting){this.#t.disconnect();let s=this.getAttribute("src");s&&this.#d(s)}},{rootMargin:"200px"}),this.#t.observe(this)}#f(t){let i;try{i=new URL(t,document.baseURI)}catch{throw new Error(`Invalid URL: ${t}`)}if(i.protocol!=="http:"&&i.protocol!=="https:")throw new Error(`Refused ${i.protocol} URL: only http(s) is allowed`);return this.#u(i.href),i.href}#u(t){if(!this.hasAttribute("allow-cross-origin")&&new URL(t).origin!==location.origin)throw new Error(`Refused cross-origin URL ${t} (add allow-cross-origin to permit)`)}#p(t){let i=0,s=this.parentElement?.closest("include-file");for(;s;){if(#o in s&&(i++,s.#o===t))throw new Error(`Refused include cycle: ${t} is already included by an ancestor`);s=s.parentElement?.closest("include-file")}if(i>=ul)throw new Error(`Refused include: nesting deeper than ${ul}`)}#v(){let t=this.getAttribute("mode")||"replace";return Xg.has(t)?t:(console.warn(`<include-file>: unknown mode "${t}", using "replace"`),"replace")}async#d(t){this.#e?.abort();let i=new AbortController;this.#e=i,this.#h(),this.setAttribute("data-loading",""),this.setAttribute("aria-busy","true"),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let s=this.#f(t);this.#p(s),this.#o=s;let n=await fetch(s,{signal:i.signal});if(n.url&&this.#u(n.url),!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);let r=await n.text();if(i.signal.aborted)return;let a=this.hasAttribute("trusted");this.hasAttribute("allow-scripts")&&!a&&console.warn("<include-file>: allow-scripts is ignored without trusted");let o=a&&this.hasAttribute("allow-scripts"),c;if(a){let f=document.createElement("template");f.innerHTML=r,c=f.content}else c=pi(r,{allowIncludeFile:!0,keepIds:!0,keepStyle:!0});let l=document.createElement("template");l.content.append(c.cloneNode(!0));let u=l.innerHTML,d=[...c.querySelectorAll("script")];o||d.forEach(f=>f.remove());let h=this.#v();h==="replace"?this.replaceChildren(c):h==="append"?this.append(c):this.prepend(c);for(let f of o?d:[]){let p=document.createElement("script");for(let m of f.attributes)p.setAttribute(m.name,m.value);p.textContent=f.textContent,f.replaceWith(p)}this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.setAttribute("data-loaded",""),this.#n=!0,this.#s=t,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,url:s,html:u}}))}catch(s){if(s.name==="AbortError"||i.signal.aborted)return;this.#m(t,s)}}#m(t,i){if(this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.setAttribute("data-error",""),this.#v()==="replace"&&this.#i!==null&&!this.#n&&(this.innerHTML=this.#i),!this.textContent.trim()&&!this.children.length){let s=document.createElement("p");s.setAttribute("role","alert"),s.setAttribute("data-include-error",""),s.textContent=this.getAttribute("data-label-error")||Jg,this.append(s),this.#a=s}this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:i.message}}))}#h(){this.#a?.parentNode===this&&this.#a.remove(),this.#a=null}reload(){let t=this.getAttribute("src");t&&this.#d(t)}};w("include-file",Kn);it();var dl="environment",hl="preferences",Yn={timeOfDay:!1,seasonal:!1},Zg=900*1e3,bt={...Yn};function Nt(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var Zt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await S.get(dl,hl);bt=e?{...Yn,...e}:{...Yn},(bt.timeOfDay||bt.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...bt}},save(e){return bt={...bt,...e},S.set(dl,hl,bt).catch(()=>{}),{...bt}},setTimeOverride(e){this._timeOverride=e,this._hasActiveSource()&&this._update()},setMonthOverride(e){this._monthOverride=e,this._hasActiveSource()&&this._update()},setSource(e,t){let i=this.save({[e]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(i)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(e){let t=e||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent");let t=e.getAttribute("data-theme");if(t){let i=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(i)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let e=this.load(),t=0;e.timeOfDay&&(t+=this._getTimeOfDayOffset()),e.seasonal&&(t+=this._getSeasonalOffset());let i=document.documentElement;t!==0&&this._baseHues?(i.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),i.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),i.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let e=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return e<5?-20:e<7?Nt(-20,20,(e-5)/2):e<10?Nt(20,5,(e-7)/3):e<14?Nt(5,0,(e-10)/4):e<17?Nt(0,-5,(e-14)/3):e<19?Nt(-5,15,(e-17)/2):e<21?Nt(15,-10,(e-19)/2):Nt(-10,-20,(e-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let e=this._monthOverride??new Date().getMonth(),i=this._getHemisphere()==="south"?(e+6)%12:e;return i>=2&&i<=4?5:i>=5&&i<=7?10:i>=8&&i<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Zg))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var Di=null;function pl(){return"0.7.1-e131c0b54"}function Qg(){let e=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let i of e){let s=i.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function ml(){return Di||(Di=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),Di}function bl(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?fl(navigator.serviceWorker.controller,e,t,i):ml().then(s=>{let n=s.active||s.waiting||s.installing;n?fl(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function fl(e,t,i,s){let n=new MessageChannel;n.port1.onmessage=r=>i(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),e.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function gl(){return bl("GET_STATUS")}async function vl(){return bl("CLEAR_CACHE")}async function yl(){let e=await ml();return await e.update(),{updated:!!e.waiting}}function tv(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(tv()){let e=Qg();window.addEventListener("load",()=>{Di=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}it();gn();var Qt=null,tt="settings",Oi={motionFx:!0,sounds:!1,charShortcuts:!0},tr=()=>({...Oi,charShortcuts:Ct()}),nv=document.documentElement.hasAttribute("data-sticky"),er=null,rv={trigger:"Site settings",dialog:"Site settings",title:"Settings",close:"Close settings",appearance:"Appearance","color-mode":"Color mode","mode-auto":"Auto","mode-light":"Light","mode-dark":"Dark",theme:"Theme",accessibility:"Accessibility","high-contrast":"High Contrast","large-text":"Large Text",dyslexia:"Dyslexia-Friendly","char-shortcuts":"Single-Key Shortcuts",layout:"Layout",fluid:"Fluid Scaling",density:"Density","density-compact":"Compact","density-default":"Default","density-spacious":"Spacious",backdrop:"Canvas Backdrop","backdrop-style":"Style","backdrop-default":"Default","backdrop-flush":"Flush","backdrop-elevated":"Elevated",chrome:"Chrome","chrome-card":"Card","chrome-stretch":"Stretch","chrome-integrated":"Integrated","fixed-header":"Fixed Header","page-bg":"Page Background","page-bg-default":"Theme Default","page-bg-color":"Solid Color","page-bg-gradient":"Gradient","bg-color":"Color","grad-start":"Start","grad-end":"End","grad-direction":"Direction","dir-to-bottom":"Top \u2192 Bottom","dir-to-right":"Left \u2192 Right","dir-135deg":"Diagonal \u2198","dir-45deg":"Diagonal \u2197",sticky:"Sticky Navigation",effects:"Effects",motion:"Motion Effects",sounds:"Sound Effects",environment:"Environment","time-of-day":"Time-of-Day Shifts",seasonal:"Seasonal Tinting",system:"System","sw-label":"Service Worker:","sw-checking":"checking\u2026","sw-unsupported":"Not supported","sw-active":"Active ({n} cached files)","sw-unregistered":"Not registered","clear-cache":"Clear Cache",clearing:"Clearing\u2026",cleared:"Cache cleared","check-update":"Check for Updates",checking:"Checking\u2026","update-available":"Update available","up-to-date":"Up to date",failed:"Failed",reset:"Reset to Defaults","reset-confirm":"Reset all settings to defaults?","reset-yes":"Reset","reset-cancel":"Cancel","reset-done":"Settings reset to defaults"},av='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>';function vt(e){return String(e).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}async function ir(e){let t=document.documentElement;e?t.dataset.sticky="":delete t.dataset.sticky;try{let i=await Promise.resolve().then(()=>(Zn(),El));e?i.initStickyManager():i.destroyStickyManager()}catch{}}var sr=class extends E{#t=null;#e=null;#i=!1;#n=!1;#s=0;#o="";#r=new Set;#a=[];#l=[];#c={...Oi,charShortcuts:Ct()};#b=document.documentElement.hasAttribute("data-sticky");setup(){let t=++this.#s;return this.#o||=crypto.randomUUID().slice(0,8),this.#L(),this.#N(),this.#W(),this.listen(window,"vb:theme-change",this.#z),this.listen(window,"vb:extensions-change",this.#z),this.listen(window,"vb:a11y-themes-change",this.#z),this.#n&&(this.#n=!1,this.open()),this.#v().then(()=>{this.#f(t)&&this.#W()}),!0}teardown(){this.#s++;for(let i of this.#a)clearTimeout(i);this.#a=[],this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false");let t=!!this.#e?.contains(document.activeElement);this.#e?.remove(),t&&this.#t?.isConnected&&this.#t.focus(),this.#e=null}#f(t){return t===this.#s&&this.isConnected}#u(t,i={}){let s=this.getAttribute(`data-label-${t}`)??rv[t]??t;for(let[n,r]of Object.entries(i))s=s.replaceAll(`{${n}}`,String(r));return s}#p(t){return vt(this.#u(t))}get data(){return{a11yThemes:[...this.#l],extensions:{...this.#c},sticky:this.#b}}set data(t){if(!t||typeof t!="object")return;let i=[],s=[];Array.isArray(t.a11yThemes)&&(this.#l=t.a11yThemes.map(String),s.push("a11y"),i.push(S.set(tt,"a11y",this.#l)),this.#R(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[...this.#l]}))),t.extensions&&typeof t.extensions=="object"&&(this.#c={...tr(),...t.extensions},s.push("extensions"),i.push(S.set(tt,"extensions",this.#c)),this.#tt()),t.sticky!=null&&(this.#b=!!t.sticky,s.push("sticky"),i.push(S.set(tt,"sticky",this.#b?"on":"off")),ir(this.#b));for(let n of s)this.#r.add(n);this.#e&&this.#W(),Promise.allSettled(i).then(()=>{for(let n of s)this.#r.delete(n);this.#e&&this.#W(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#v(){let[t,i,s]=await Promise.all([S.get(tt,"a11y"),S.get(tt,"extensions"),S.get(tt,"sticky")]);er===null&&(er=nv&&s!=="on"),this.#r.has("a11y")||(this.#l=Array.isArray(t)?t:[]),this.#r.has("extensions")||(this.#c={...tr(),...i??{}}),this.#r.has("sticky")||(this.#b=document.documentElement.hasAttribute("data-sticky"))}#d(t){return t!==""&&t!==void 0}#m(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,i){return t?i==="compact"?"compact":i==="spacious"?"spacious":"default":""}#E(t){return t!==""&&t!==void 0}#y(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#x(t,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#g(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#S(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,i){let s=[];return t&&t!=="card"&&s.push(t),i&&s.push("fixed"),s.join(" ")||"card"}#A(t){return this.#e?.querySelector(t)??null}#L(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.setAttribute("type","button"),this.#t.setAttribute("data-trigger",""),this.#t.setAttribute("data-minted",""),this.#t.className="settings-trigger",this.#t.innerHTML=av,this.prepend(this.#t)),this.#t.hasAttribute("data-minted")&&this.#t.setAttribute("aria-label",this.#u("trigger")),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#e=document.createElement("div"),this.#e.className="settings-panel",this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label",this.#u("dialog")),this.#e.tabIndex=-1;let t=`settings-panel-${this.#o}`;this.#e.id=t,this.#t.setAttribute("aria-controls",t),this.#e.innerHTML=this.#k(),this.appendChild(this.#e)}#k(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:u}=_.getState(),d=[...this.#l],h={...this.#c},f=Zt.load(),p=this.#d(s),m=this.#m(s),b=this.#E(n),g=this.#y(n),A=this.#o,y=L=>this.#p(L),$=(L,N,V,me,et,qt={})=>`
|
|
287
|
+
`,Cn=class extends E{static get observedAttributes(){return["trend","loading"]}setup(){if(this.shadowRoot)for(let t of jc){let i=this.shadowRoot.querySelector(`slot[name="${t}"]`);this.#t(t,i)}else{let t=this.attachShadow({mode:"open"});t.innerHTML=dg;for(let i of jc){let s=t.querySelector(`slot[name="${i}"]`);s?.addEventListener("slotchange",()=>this.#t(i,s)),this.#t(i,s)}}this.#e(),this.#i(),this.#n()}attributeChangedCallback(t){this.isConnected&&(t==="trend"?this.#e():t==="loading"&&this.#i())}#t(t,i){let s=!!i&&i.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE&&n.textContent.trim().length>0);this.setState(`has-${t}`,s)}#e(){let t=(this.getAttribute("trend")||"").toLowerCase();for(let i of ug)this.setState(`trend-${i}`,i===t)}#i(){let t=this.hasAttribute("loading");this.setState("loading",t),t?this.setAttribute("aria-busy","true"):this.getAttribute("aria-busy")==="true"&&this.removeAttribute("aria-busy")}#n(){let t=this.closest("a[href]");this.setState("interactive",!!t)}};w("score-card",Cn);var hg=0;function Ci(e,t){return e.matches("content-swap")?t:`data-${t}`}function xi(e){let t=e.querySelector(':scope > [data-face="front"]'),i=e.querySelector(':scope > [data-face="back"]');if(!t||!i)return;e.style.viewTransitionName||(e.style.viewTransitionName=`content-swap-${++hg}`);let s=e.matches("content-swap");s||e.setAttribute("data-swap-init","");let n=[];function r(l,u,d,h){l.addEventListener(u,d,h),n.push(()=>l.removeEventListener(u,d,h))}let a=[...e.querySelectorAll("[data-swap]")].filter(l=>l.parentElement?.closest("content-swap, [data-swap]")===e),o=a.length===0,c=e.querySelector(":scope > [data-swap-toggle]");if(o){if(!c){let l=document.createElement("button");l.type="button",l.setAttribute("data-swap-toggle",""),l.textContent="Show back",e.append(l),c=l}r(c,"click",l=>{l.stopPropagation(),Lt(e,l.detail===0?"keyboard":"pointer")}),r(e,"click",l=>{let d=l.target.closest?.(pg);d&&d!==e&&e.contains(d)||Lt(e,"pointer")})}else c&&!c.hasAttribute("data-swap")&&c.remove(),c=null,a.forEach(l=>{let u=l.matches(fg);r(l,"click",d=>{d.stopPropagation();let h=u&&d.detail===0;Lt(e,h?"keyboard":"pointer")}),!u&&(l.hasAttribute("role")||(l.setAttribute("role","button"),n.push(()=>l.removeAttribute("role"))),l.hasAttribute("tabindex")||(l.setAttribute("tabindex","0"),n.push(()=>l.removeAttribute("tabindex"))),r(l,"keydown",d=>{d.target===l&&(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),Lt(e,"keyboard"))}))});if(e.matches('[data-gesture="flick"], [data-gesture="swipe"]')&&(r(e,"swipe-left",()=>Lt(e,"pointer")),r(e,"swipe-right",()=>Lt(e,"pointer"))),!s){let l=new MutationObserver(()=>ki(e,t,i));l.observe(e,{attributes:!0,attributeFilter:["data-swapped"]}),n.push(()=>l.disconnect())}return ki(e,t,i),mg([t,i]),()=>{for(let l of n)l();n.length=0}}var fg='button, a[href], summary, input:is([type="button"], [type="submit"], [type="reset"])',pg='a[href], button, input, select, textarea, label, summary, [contenteditable=""], [contenteditable="true"], [tabindex]';function mg(e){let t=e.map(i=>i.style.transition);for(let i of e)i.style.transition="none";for(let i of e)getComputedStyle(i).transform;e.forEach((i,s)=>{i.style.transition=t[s]})}function ki(e,t,i){let s=e.hasAttribute(Ci(e,"swapped"));t.inert=s,i.inert=!s,e.querySelector(":scope > [data-swap-toggle]")?.setAttribute("aria-pressed",String(s))}function Gc(e){return{front:e.querySelector(':scope > [data-face="front"]'),back:e.querySelector(':scope > [data-face="back"]')}}function Le(e,t,i="api"){let{front:s,back:n}=Gc(e);if(!s||!n)return;let r=Ci(e,"swapped");if(t&&e.hasAttribute(r)||!t&&!e.hasAttribute(r))return;let a=document.activeElement,o=()=>{t?e.setAttribute(r,""):e.removeAttribute(r),ki(e,s,n),bg(e,i);let u=t?n:s,d=t?s:n,h=u.querySelector("[autofocus]");h?h.focus():i==="keyboard"&&d.contains(a)&&gg(u)},c=u=>{let d=e;typeof d.setState=="function"&&d.setState("transition-running",u)};c(!0);let l=nt(o);l&&l.finished&&typeof l.finished.finally=="function"?l.finished.finally(()=>c(!1)):c(!1)}function Lt(e,t="api"){Le(e,!e.hasAttribute(Ci(e,"swapped")),t)}function bg(e,t="internal"){e.dispatchEvent(new CustomEvent("content-swap:swap",{detail:{swapped:e.hasAttribute(Ci(e,"swapped")),source:t},bubbles:!0}))}function gg(e){let t=e.querySelector("[data-swap], button, a, input, select, textarea");t&&t.focus()}var Tn=class extends E{static observedAttributes=["swapped"];#t=null;attributeChangedCallback(){if(!this.isConnected)return;let{front:t,back:i}=Gc(this);t&&i&&ki(this,t,i)}setup(){this.#t=xi(this)??null}teardown(){this.#t?.(),this.#t=null}flip(){Le(this,!0)}unflip(){Le(this,!1)}toggle(){Lt(this)}get flipped(){return this.hasAttribute("swapped")}set flipped(t){Le(this,!!t)}get swapped(){return this.hasAttribute("swapped")}set swapped(t){Le(this,!!t)}};w("content-swap",Tn);function Kc(){document.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(e=>{e.querySelector(":scope > [data-face]")&&xi(e)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Kc):Kc();var Yc=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute("data-swap")&&!s.matches("content-swap")&&!s.hasAttribute("data-swap-init")&&s.querySelector(":scope > [data-face]")&&xi(s),s.querySelectorAll("[data-swap]:not(content-swap):not([data-swap-init])").forEach(n=>{n.querySelector(":scope > [data-face]")&&xi(n)})}});document.body?Yc.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener("DOMContentLoaded",()=>{Yc.observe(document.body,{childList:!0,subtree:!0})});var Ln=class extends E{#t=null;#e=!1;#i=null;setup(){!this.hasAttribute("role")&&!this.querySelector("nav")&&this.setAttribute("role","navigation"),this.#r("pathname"),this.listen(window,"popstate",this.#s);let t=window.navigation;t&&typeof t.addEventListener=="function"&&this.listen(t,"currententrychange",this.#o)}get items(){return this.#t?this.#t.map(t=>({...t})):Array.from(this.#n()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let i=t.map(s=>({...s}));this.#t&&this.#u(this.#t,i)||(this.#t=i,this.#b(i),this.#e?this.#c(this.#i):this.#r("pathname"),this.dispatchEvent(new CustomEvent("nav-bar:items-changed",{detail:{items:this.items,source:"property"},bubbles:!0,composed:!0})))}get current(){if(this.#e)return this.#i;for(let t of this.#n())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let i=this.current,s=t==null?null:String(t);this.#e=!0,this.#i=s,this.#c(s),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#e&&(this.#e=!1,this.#i=null,this.#r("pathname"))}refresh(){this.#e||this.#r("pathname")}#n(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#s=()=>{this.#e||this.#r("popstate")};#o=()=>{queueMicrotask(()=>{this.#e||!this.isConnected||this.#r("navigation")})};#r(t){let i=this.current,s=this.#a();this.#c(s),s==null&&this.#l(),i!==s&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:s,previous:i,source:t},bubbles:!0,composed:!0}))}#a(){let t=Ti(window.location.pathname),i=window.location.origin,s=Array.from(this.#n());if(s.length===0)return null;let n=this.getAttribute("data-match")==="exact",r=null,a=null,o=-1;for(let l of s){let u=l.getAttribute("href");if(!u||u.startsWith("#"))continue;let d;try{d=new URL(u,document.baseURI)}catch{continue}if(!/^https?:$/.test(d.protocol)||d.origin!==i)continue;let h=Ti(d.pathname);if(h===t){r==null&&(r=l);continue}!n&&h!=="/"&&t.startsWith(h+"/")&&h.length>o&&(a=l,o=h.length)}let c=r||a;return c?c.getAttribute("data-route")||c.getAttribute("href"):null}#l(){let t=Ti(window.location.pathname),i=window.location.origin,s=this.getAttribute("data-match")==="exact",n=null,r=-1;for(let a of this.querySelectorAll("a[data-nav-link]")){let o=a.closest("drop-down, li");if(!(!o||!this.contains(o)))for(let c of o.querySelectorAll("a[href]:not([data-nav-link])")){let l=c.getAttribute("href");if(!l||l.startsWith("#"))continue;let u;try{u=new URL(l,document.baseURI)}catch{continue}if(!/^https?:$/.test(u.protocol)||u.origin!==i)continue;let d=Ti(u.pathname),h=-1;d===t?h=Number.MAX_SAFE_INTEGER:!s&&d!=="/"&&t.startsWith(d+"/")&&(h=d.length),h>r&&(n=a,r=h)}}n&&n.setAttribute("aria-current","true")}#c(t){let i=this.#n();for(let s of i){let n=s.getAttribute("data-route")||s.getAttribute("href");t!=null&&n===t?s.setAttribute("aria-current","page"):s.removeAttribute("aria-current")}}#b(t){this.querySelectorAll(":scope > a").forEach(n=>n.remove());let i=this.querySelector("a[data-nav-link]")!=null,s=document.createDocumentFragment();for(let n of t){let r=this.#f(n);i&&r.setAttribute("data-nav-link",""),s.appendChild(r)}this.appendChild(s)}#f(t){let i=document.createElement("a"),s=vg(t.href);if(s!=null&&i.setAttribute("href",s),t.route&&i.setAttribute("data-route",t.route),t.external&&(i.target="_blank",i.rel="noopener noreferrer"),t.icon){let n=document.createElement("icon-wc");n.setAttribute("name",String(t.icon)),n.setAttribute("size","sm"),i.appendChild(n)}if(i.appendChild(document.createTextNode(t.label||"")),t.external){let n=document.createElement("span");n.className="sr-only",n.textContent=` ${this.getAttribute("data-label-new-tab")??"(opens in new tab)"}`,i.appendChild(n)}if(t.badge!=null){let n=document.createElement("span");n.className="badge",n.textContent=String(t.badge),i.appendChild(n)}return i}#u(t,i){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++){let n=Object.keys(t[s]).sort(),r=Object.keys(i[s]).sort();if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a]!==r[a]||t[s][n[a]]!==i[s][r[a]])return!1}return!0}};function Ti(e){let t=e.replace(/\/+$/,"");return t===""?"/":t}function vg(e){if(e==null||e==="")return"#";let t=String(e),i;try{i=new URL(t,document.baseURI)}catch{return null}return/^https?:$/.test(i.protocol)?t:null}w("nav-bar",Ln);var wg=0,Dn=class extends E{#t;#e=[];#i;#n;#s;#o;#r;#a;#l=null;#c=0;#b=0;#f=!1;#u=!1;#p=!1;#v=null;#d=!1;#m=!1;#h=!1;#E=!1;#y=new WeakSet;get currentIndex(){return this.#c}get slideCount(){return this.#e.length}get playing(){return this.#l!==null}setup(){let t=[...this.children];if(t.length===0)return!1;this.#u=window.matchMedia("(prefers-reduced-motion: reduce)").matches||document.documentElement.hasAttribute("data-motion-reduced"),this.#p=this.hasAttribute("transition")&&!!document.startViewTransition,this.hasAttribute("transition")&&!this.#p&&this.removeAttribute("transition"),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")&&this.setAttribute("aria-label","Carousel"),this.#t=document.createElement("div"),this.#t.className="carousel-track",this.#t.setAttribute("tabindex","0"),this.#t.setAttribute("role","group"),this.#t.setAttribute("aria-label",this.dataset.labelTrack||"Slides");let i=this.getAttribute("item-width");if(i&&i!=="auto"&&i!=="full"&&CSS.supports("inline-size",i)&&this.#t.style.setProperty("--_item-width",i),t.forEach((a,o)=>{a.setAttribute("role","group"),a.setAttribute("aria-roledescription","slide"),a.hasAttribute("aria-label")||(a.setAttribute("aria-label",`${o+1} of ${t.length}`),this.#y.add(a)),this.#t.appendChild(a)}),this.#e=[...this.#t.children],this.hasAttribute("autoplay")&&!this.#u&&this.#g(),this.#n=document.createElement("button"),this.#n.type="button",this.#n.className="carousel-prev",this.#n.setAttribute("aria-label","Previous slide"),this.#n.innerHTML='<icon-wc name="chevron-left" size="sm"></icon-wc>',this.#s=document.createElement("button"),this.#s.type="button",this.#s.className="carousel-next",this.#s.setAttribute("aria-label","Next slide"),this.#s.innerHTML='<icon-wc name="chevron-right" size="sm"></icon-wc>',this.getAttribute("indicators")!=="false"&&(this.#o=document.createElement("div"),this.#o.className="carousel-indicators",this.#o.setAttribute("role","group"),this.#o.setAttribute("aria-label","Slide indicators"),this.#e.forEach((a,o)=>{let c=document.createElement("button");c.type="button",c.className="carousel-dot",c.setAttribute("aria-label",`Go to slide ${o+1}`),o===0&&c.setAttribute("aria-current","true"),this.listen(c,"click",()=>this.goTo(o)),this.#o.appendChild(c)})),this.#r=document.createElement("div"),this.#r.className="carousel-live",this.#r.setAttribute("aria-live","polite"),this.#r.setAttribute("aria-atomic","true"),this.#i&&this.appendChild(this.#i),this.appendChild(this.#n),this.appendChild(this.#t),this.appendChild(this.#s),this.#o&&this.appendChild(this.#o),this.appendChild(this.#r),this.listen(this.#n,"click",()=>this.prev()),this.listen(this.#s,"click",()=>this.next()),this.listen(this.#t,"keydown",this.#F),this.listen(this,"mouseenter",()=>{this.#h=!0,this.#w()}),this.listen(this,"mouseleave",()=>{this.#h=!1,this.#w()}),this.listen(this,"touchstart",()=>{this.#h=!0,this.#w()},{passive:!0}),this.listen(this,"focusin",()=>{this.#E=!0,this.#w()}),this.listen(this,"focusout",a=>{this.contains(a.relatedTarget)||(this.#E=!1,this.#w())}),this.#p){let a=++wg,o=this.getAttribute("transition")||"fade",c=o==="slide"?"vt-carousel-slide":o==="scale"?"vt-carousel-scale":"vt-carousel";this.#t.style.viewTransitionName=`carousel-${a}`,this.#t.style.viewTransitionClass=c}if(this.#p){let a=this.#t;Promise.resolve().then(()=>(_n(),Mn)).then(({addSwipeListener:o})=>{!this.isConnected||this.#t!==a||(this.#v=o(a,{threshold:40}),this.listen(a,"swipe-left",()=>this.#k()?this.prev():this.next()),this.listen(a,"swipe-right",()=>this.#k()?this.next():this.prev()))})}this.#p||(this.#a=new IntersectionObserver(this.#N,{root:this.#t,threshold:.5}),this.#e.forEach(a=>this.#a.observe(a)),"onscrollend"in window&&this.listen(this.#t,"scrollend",()=>{this.#f=!1,this.#D()}));let r=this.#I()??(Number(this.getAttribute("start"))||0);if(this.#p){let a=r>0&&r<this.#e.length?r:0;this.#e.forEach((o,c)=>{o.hidden=c!==a}),this.#_(a)}else r>0&&r<this.#e.length&&this.goTo(r,!1);return this.#R(),this.#h=this.#E=!1,this.#d=this.hasAttribute("autoplay")&&!this.#u&&!this.#m,this.#w(),!0}teardown(){this.#d=!1,this.#M(),this.#a&&(this.#a.disconnect(),this.#a=null),this.#v&&(this.#v(),this.#v=null),this.#t?.parentElement===this&&[...this.#t.children].forEach(t=>this.appendChild(t)),this.#e.forEach(t=>{this.#y.has(t)&&t.removeAttribute("aria-label")}),this.#t?.remove(),this.#i?.remove(),this.#n?.remove(),this.#s?.remove(),this.#o?.remove(),this.#r?.remove(),this.#t=this.#i=this.#n=this.#s=this.#o=this.#r=null,this.#e=[],this.#p=!1,this.#c=0,this.#b=0,this.#f=!1}get slides(){return this.#e.map((t,i)=>({id:t.id||void 0,html:t.innerHTML,label:t.getAttribute("aria-label")||`${i+1} of ${this.#e.length}`}))}set slides(t){let i=Array.isArray(t)?t:[];for(;this.firstChild;)this.firstChild.remove();for(let s of i){let n=document.createElement("div");s.id&&(n.id=s.id),s.label&&n.setAttribute("aria-label",s.label),n.innerHTML=s.html||"",this.appendChild(n)}this._reinit(),this.dispatchEvent(new CustomEvent("carousel-wc:slides-changed",{detail:{slides:i,source:"property"},bubbles:!0}))}next(){let t=this.hasAttribute("loop");this.#c<this.#e.length-1?this.goTo(this.#c+1):t&&this.goTo(0)}prev(){let t=this.hasAttribute("loop");this.#c>0?this.goTo(this.#c-1):t&&this.goTo(this.#e.length-1)}goTo(t,i=!0){if(!(t<0||t>=this.#e.length)){if(this.#p)if(i&&t!==this.#c){let s=t>this.#c?"forward":"backward";document.documentElement.dataset.vtDirection=s,nt(()=>{this.#x(t)}).finished?.then(()=>{delete document.documentElement.dataset.vtDirection})}else this.#x(t);else{let s=this.#e[t].getBoundingClientRect(),n=this.#t.getBoundingClientRect(),r=this.#k()?s.right-n.right:s.left-n.left,a=i&&!this.#u?"smooth":"instant";this.#t.scrollTo({left:this.#t.scrollLeft+r,behavior:a})}this.#_(t)}}#x(t){this.#e.forEach((i,s)=>{i.hidden=s!==t})}play(){this.#u||!this.#t||(this.#m=!1,this.#d=!0,this.#h=this.#E=!1,this.#i||(this.#g(),this.insertBefore(this.#i,this.firstChild)),this.#w())}pause(){this.#m=!0,this.#d=!1,this.#w()}#g(){let t=document.createElement("button");t.type="button",t.className="carousel-rotate",this.listen(t,"click",()=>{this.#d?this.pause():this.play()}),this.#i=t,this.#S()}#S(){let t=this.#i;if(!t)return;let i=this.#d?"Pause automatic slide show":"Start automatic slide show";t.getAttribute("aria-label")!==i&&(t.setAttribute("aria-label",i),t.innerHTML=`<icon-wc name="${this.#d?"pause":"play"}" size="sm"></icon-wc>`)}#w(){this.#d&&!this.#h&&!this.#E&&!this.#u&&this.isConnected&&!!this.#t?this.#A():this.#M(),this.#S()}#A(){if(this.#l)return;let t=Number(this.getAttribute("autoplay-delay"))||5e3;this.#l=setInterval(()=>this.next(),t),this.#r?.setAttribute("aria-live","off"),this.dispatchEvent(new CustomEvent("carousel-wc:play",{bubbles:!0}))}#M(){this.#r?.setAttribute("aria-live","polite"),this.#l&&(clearInterval(this.#l),this.#l=null,this.dispatchEvent(new CustomEvent("carousel-wc:pause",{bubbles:!0})))}#k(){return getComputedStyle(this).direction==="rtl"}reset(){let t=Number(this.getAttribute("start"))||0;this.goTo(t,!1),this.#C()}#_(t){this.#c=t,this.#R(),this.#j(),this.#r&&(this.#r.textContent=`Slide ${t+1} of ${this.#e.length}`),!this.#f&&(this.#D(),!this.#p&&"onscrollend"in window&&(this.#f=!0))}#D(){this.#c!==this.#b&&(this.#b=this.#c,this.dispatchEvent(new CustomEvent("carousel-wc:change",{detail:{index:this.#c,slide:this.#e[this.#c]},bubbles:!0})))}#R(){let t=this.hasAttribute("loop"),i=this.#c===0,s=this.#c===this.#e.length-1;if(this.#n&&(this.#n.disabled=!t&&i),this.#s&&(this.#s.disabled=!t&&s),this.#o){let n=this.#o.children;for(let r=0;r<n.length;r++)r===this.#c?(n[r].setAttribute("aria-current","true"),n[r].setAttribute("data-active","")):(n[r].removeAttribute("aria-current"),n[r].removeAttribute("data-active"))}}#N=t=>{for(let i of t)if(i.isIntersecting){let s=this.#e.indexOf(i.target);s!==-1&&s!==this.#c&&this.#_(s)}};#F=t=>{let i=(t.key==="ArrowLeft"||t.key==="ArrowRight")&&this.#k();switch(t.key){case"ArrowLeft":t.preventDefault(),i?this.next():this.prev();break;case"ArrowRight":t.preventDefault(),i?this.prev():this.next();break;case"Home":t.preventDefault(),this.goTo(0);break;case"End":t.preventDefault(),this.goTo(this.#e.length-1);break}};#I(){let t=this.getAttribute("persist");if(!t)return null;try{let i=localStorage.getItem(`carousel:${t}`);return i!==null?Number(i):null}catch{return null}}#j(){let t=this.getAttribute("persist");if(t)try{localStorage.setItem(`carousel:${t}`,String(this.#c))}catch{}}#C(){let t=this.getAttribute("persist");if(t)try{localStorage.removeItem(`carousel:${t}`)}catch{}}};w("carousel-wc",Dn);var Ag=0,In=class extends E{static formAssociated=!0;#t;#e;#i;#n;#s=[];#o=[];#r=-1;#a=!1;#l="";#c="";#b;#f=!1;#u;#p;#v=[];constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}get#d(){return this.hasAttribute("multiple")}setup(){let t=this.querySelector(":scope > input")||this.querySelector(":scope > .tags-input-area > input");if(!t)return!1;this.#e=t;let i=this.#e.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#e.removeAttribute("name"));let s=this.querySelector("ul, ol");if(!s)return!1;if(this.#i=s,this.#d){let c=this.querySelector(":scope > .tags-input-area");if(!c){c=document.createElement("div"),c.className="tags-input-area";let u=this.querySelector(":scope > pop-over[data-combobox-host]")||this.#i;this.insertBefore(c,u)}this.#u=c,this.#e.parentNode!==this.#u&&this.#u.appendChild(this.#e);let l=this.querySelector(":scope > [data-combobox-live]");l||(l=document.createElement("div"),l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),l.setAttribute("data-combobox-live",""),l.className="visually-hidden",this.appendChild(l)),this.#p=l}let n=this.getAttribute("placeholder");n&&!this.#e.getAttribute("placeholder")&&this.#e.setAttribute("placeholder",n);let r=`cb${++Ag}`;this.#i.id||(this.#i.id=`combobox-listbox-${r}`),this.#e.setAttribute("role","combobox"),this.#e.setAttribute("aria-expanded","false"),this.#e.setAttribute("aria-autocomplete","list"),this.#e.setAttribute("aria-controls",this.#i.id),this.#e.setAttribute("autocomplete","off"),this.#i.setAttribute("role","listbox"),this.#d&&this.#i.setAttribute("aria-multiselectable","true");let a=this.#d?this.#u:this.#e;a.id||(a.id=`combobox-anchor-${r}`);let o=this.querySelector(":scope > pop-over[data-combobox-host]");if(o?this.#n=o:(this.#n=document.createElement("pop-over"),this.#n.setAttribute("data-combobox-host",""),this.#n.id=`combobox-pop-${r}`,this.#n.dataset.mode="manual",this.#n.dataset.position="bottom-start",this.#n.dataset.anchor=a.id,this.#n.appendChild(this.#i),this.appendChild(this.#n)),this.#n.dataset.anchor=a.id,this.#i.parentElement!==this.#n&&this.#n.appendChild(this.#i),this.#E(),!this.#d){let c=this.getAttribute("value");c&&this.#C(c,!1),this.#b===void 0&&(this.#b=this.#l)}return this.listen(this.#e,"input",this.#w),this.listen(this.#e,"keydown",this.#A),this.listen(this.#e,"focus",this.#M),this.listen(this.#e,"click",this.#k),this.listen(this.#i,"click",this.#_),this.listen(this.#i,"pointerdown",this.#D),this.listen(document,"click",this.#R),this.listen(this.#n,"pop-over:hide",this.#tt),this.listen(this,"invalid",this.#m),this.#$(),this.#L(),this.#B(),this.#h(this.matches(":disabled")),!0}teardown(){}#m=()=>{this.#e.setAttribute("aria-invalid","true")};formDisabledCallback(t){this.#e&&this.#h(t)}#h(t){this.#f=t,t&&this.#B();let i=this.#g(),s=this.#d&&i>0&&this.#v.length>=i;if(this.#e.disabled=t||s,this.#u)for(let n of this.#u.querySelectorAll(".tag button"))n.disabled=t}#E(){this.#s=Array.from(this.#i.querySelectorAll(":scope > li[data-value]")),this.#s.forEach((t,i)=>{t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.id||(t.id=`${this.#i.id}-option-${i}`)}),this.#o=[...this.#s]}#y(t,i){if(this.#v.some(o=>o.value===t))return;let s=this.#g();if(s&&this.#v.length>=s)return;this.#v.push({value:t,label:i});let n=document.createElement("span");n.className="tag",n.dataset.value=t,n.textContent=i+" ";let r=document.createElement("button");r.type="button",r.setAttribute("aria-label",`Remove ${i}`),r.innerHTML="×",r.disabled=this.#f,r.addEventListener("click",o=>{o.stopPropagation(),this.#x(t)}),n.appendChild(r),this.#u.insertBefore(n,this.#e);let a=this.#s.find(o=>o.getAttribute("data-value")===t);a&&a.setAttribute("aria-selected","true"),this.#S(`${i} added`),this.#e.value="",this.#N(""),this.#$(),this.#L(),this.#V(),s&&this.#v.length>=s&&(this.#e.disabled=!0,this.#B())}#x(t){let i=this.#v.findIndex(o=>o.value===t);if(i===-1)return;let s=this.#v.splice(i,1)[0],n=this.#u.querySelector(`.tag[data-value="${CSS.escape(t)}"]`);n&&n.remove();let r=this.#s.find(o=>o.getAttribute("data-value")===t);r&&r.setAttribute("aria-selected","false"),this.#S(`${s.label} removed`),this.#g()&&this.#e.disabled&&(this.#e.disabled=this.#f),this.#N(this.#e.value.trim()),this.#$(),this.#L(),this.#V(),this.#e.focus()}#g(){let t=this.getAttribute("max");return t?parseInt(t,10):0}#S(t){this.#p&&(this.#p.textContent="",requestAnimationFrame(()=>{this.#p.textContent=t}))}#w=()=>{let t=this.#e.value.trim();if(!this.#d&&this.#l){let i=this.#i.querySelector('[aria-selected="true"]');i&&i.setAttribute("aria-selected","false"),this.#l="",this.#c="",this.removeAttribute("value"),this.#$(),this.#L()}this.#N(t),this.#T()};#A=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.#a||this.#T(),this.#F(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#a||this.#T(),this.#F(this.#r-1);break;case"Home":this.#a&&(t.preventDefault(),this.#F(0));break;case"End":this.#a&&(t.preventDefault(),this.#F(this.#o.length-1));break;case"Enter":if(this.#a&&this.#r>=0&&this.#o[this.#r]){t.preventDefault();let i=this.#o[this.#r];this.#d?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#j(i)}else if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#y(i,i)}break;case"Backspace":if(this.#d&&!this.#e.value&&this.#v.length>0){let i=this.#v[this.#v.length-1];this.#x(i.value)}break;case",":if(this.#d&&this.hasAttribute("custom")&&this.#e.value.trim()){t.preventDefault();let i=this.#e.value.trim();this.#y(i,i)}break;case"Escape":this.#a&&(t.preventDefault(),t.stopPropagation(),this.#B(),this.#e.focus());break;case"Tab":this.#a&&this.#B();break}};#M=()=>{this.#d?(this.#N(this.#e.value.trim()),this.#T()):(this.#e.value||!this.#l)&&(this.#N(this.#e.value.trim()),this.#T())};#k=()=>{this.#a||(this.#N(this.#e.value.trim()),this.#T())};#_=t=>{let i=t.target.closest("li[data-value]");i&&this.#o.includes(i)&&(this.#d?this.#y(i.getAttribute("data-value"),i.textContent.trim()):this.#j(i))};#D=t=>{t.preventDefault()};#R=t=>{this.#a&&!this.contains(t.target)&&this.#B()};#N(t){let i=this.getAttribute("filter")||"contains",s=t.toLowerCase(),n=this.#d?new Set(this.#v.map(r=>r.value)):null;this.#o=[],this.#s.forEach(r=>{let a=r.getAttribute("data-value"),o=r.textContent.trim().toLowerCase();if(n&&n.has(a)){r.hidden=!0;return}let c;t?i==="startsWith"?c=o.startsWith(s):c=o.includes(s):c=!0,r.hidden=!c,c&&this.#o.push(r)}),this.#r=-1,this.#I(),this.setState("no-matches",this.#o.length===0)}#F(t){if(this.#o.length===0)return;t<0&&(t=this.#o.length-1),t>=this.#o.length&&(t=0),this.#r>=0&&this.#o[this.#r]&&this.#o[this.#r].removeAttribute("data-active"),this.#r=t;let i=this.#o[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"}),this.#e.setAttribute("aria-activedescendant",i.id)}#I(){this.#s.forEach(t=>t.removeAttribute("data-active")),this.#e.removeAttribute("aria-activedescendant")}#j(t,i="internal"){let s=t.getAttribute("data-value")||"",n=t.textContent.trim();if(this.#l===s){this.#e.value=n,this.#B(),this.#e.focus();return}this.#s.forEach(r=>r.setAttribute("aria-selected","false")),t.setAttribute("aria-selected","true"),this.#l=s,this.#c=n,this.#e.value=n,this.setAttribute("value",s),this.#$(),this.#L(),this.#B(),this.#e.focus(),this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{value:s,label:n,source:i}}))}#C(t,i=!0,s="api"){let n=this.#s.find(r=>r.getAttribute("data-value")===t);n&&(i?this.#j(n,s):(this.#s.forEach(r=>r.setAttribute("aria-selected","false")),n.setAttribute("aria-selected","true"),this.#l=t,this.#c=n.textContent.trim(),this.#e.value=this.#c,this.setAttribute("value",t)))}#T(){this.#a||this.#f||(this.#a=!0,this.setAttribute("open",""),this.#e.setAttribute("aria-expanded","true"),this.#n?.show(),this.dispatchEvent(new CustomEvent("combo-box:open",{bubbles:!0})))}#B(){this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#I(),this.#n?.hide(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))}#tt=()=>{this.#a&&(this.#a=!1,this.removeAttribute("open"),this.#e.setAttribute("aria-expanded","false"),this.#r=-1,this.#I(),this.dispatchEvent(new CustomEvent("combo-box:close",{bubbles:!0})))};#$(){if(this.#d)if(this.#v.length>0){let t=new FormData,i=this.getAttribute("name")||"";for(let s of this.#v)t.append(i,s.value);this.#t.setFormValue(t)}else this.#t.setFormValue(null);else this.#l?this.#t.setFormValue(this.#l,this.#c):this.#t.setFormValue(null)}#L(){this.hasAttribute("required")?this.#d?this.#v.length===0?this.#t.setValidity({valueMissing:!0},"Please select at least one option",this.#e):this.#t.setValidity({}):this.#l?this.#t.setValidity({}):this.#t.setValidity({valueMissing:!0},"Please select an option",this.#e):this.#t.setValidity({}),this.#t.validity.valid&&this.#e.removeAttribute("aria-invalid")}#V(){this.dispatchEvent(new CustomEvent("combo-box:change",{bubbles:!0,detail:{values:this.#v.map(t=>t.value),labels:this.#v.map(t=>t.label),source:"internal"}}))}formResetCallback(){this.#d?(this.#u.querySelectorAll(".tag").forEach(t=>t.remove()),this.#v=[],this.#e.value="",this.#e.disabled=this.#f):(this.#l="",this.#c="",this.#e.value="",this.removeAttribute("value")),this.#s.forEach(t=>{t.setAttribute("aria-selected","false"),t.hidden=!1}),this.#o=[...this.#s],this.#r=-1,this.#I(),this.#B(),this.#e.removeAttribute("aria-invalid"),!this.#d&&this.#b&&this.#C(this.#b,!1),this.#$(),this.#L()}formStateRestoreCallback(t){t&&(this.#d||(this.#C(t,!1),this.#$(),this.#L()))}get value(){return this.#l}set value(t){t?this.#C(t):this.#G()}#G(){this.#s.forEach(t=>t.setAttribute("aria-selected","false")),this.#l="",this.#c="",this.#e&&(this.#e.value=""),this.removeAttribute("value"),this.#$(),this.#L()}get label(){return this.#c}get values(){return this.#v.map(t=>t.value)}get labels(){return this.#v.map(t=>t.label)}static get observedAttributes(){return["value","disabled"]}attributeChangedCallback(t,i,s){if(!this.#e)return;if(t==="disabled"){this.#h(this.matches(":disabled"));return}let n=s??"";t==="value"&&n!==this.#l&&(n?(this.#C(n,!1),this.#$(),this.#L()):this.#G())}};w("combo-box",In);var Ni=86400,Eg=0;function Yt(e){return String(e).padStart(2,"0")}function Nt(e){if(!e)return null;let t=/^(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?$/.exec(String(e).trim());if(!t)return null;let i=Number(t[1]),s=Number(t[2]),n=Number(t[3]||0);return i>23||s>59||n>59?null:i*3600+s*60+n}function il(e,t){let i=Math.floor(e/3600),s=Math.floor(e%3600/60),n=e%60;return t?`${Yt(i)}:${Yt(s)}:${Yt(n)}`:`${Yt(i)}:${Yt(s)}`}function dt(e,t){return(e%t+t)%t}function Sg(e){try{let{hourCycle:t}=new Intl.DateTimeFormat(e||void 0,{hour:"numeric"}).resolvedOptions();return t==="h12"||t==="h11"?"12h":"24h"}catch{return"24h"}}function xg(e){let t={am:"AM",pm:"PM",periodFirst:!1};try{let i=new Intl.DateTimeFormat(e||void 0,{hour:"numeric",minute:"2-digit",hourCycle:"h12"}),s=i.formatToParts(new Date(2e3,0,1,9,0)),n=i.formatToParts(new Date(2e3,0,1,21,0)),r=s.find(o=>o.type==="dayPeriod")?.value,a=n.find(o=>o.type==="dayPeriod")?.value;if(r&&a){t.am=r,t.pm=a;let o=s.map(c=>c.type);t.periodFirst=o.indexOf("dayPeriod")<o.indexOf("hour")}}catch{}return t}function kg(e,t){let i=e.trim().toLowerCase();if(!i)return null;let s=null,n=[[t.am.toLowerCase(),"AM"],[t.pm.toLowerCase(),"PM"],["a.m.","AM"],["p.m.","PM"],["am","AM"],["pm","PM"],["a","AM"],["p","PM"]].sort((l,u)=>u[0].length-l[0].length);for(let[l,u]of n)if(l){if(i.endsWith(l)){s=u,i=i.slice(0,-l.length).trim();break}if(i.startsWith(l)){s=u,i=i.slice(l.length).trim();break}}if(!/^\d{1,2}(?:[:.]\d{1,2}){0,2}$/.test(i))return null;let r=i.split(/[:.]/).map(Number),a=r[0],o=r[1]??0,c=r[2]??0;if(o>59||c>59)return null;if(s){if(a<1||a>12)return null;s==="AM"?a=a===12?0:a:a=a===12?12:a+12}else if(a>23)return null;return a*3600+o*60+c}var $n=class extends E{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`tp${++Eg}`;#i=!1;#n;#s;#o;#r;#a;#l=[];#c=null;#b=[];#f="24h";#u="";#p={am:"AM",pm:"PM",periodFirst:!1};#v=!1;#d=null;#m=null;#h=null;#E=60;#y;#x;#g=!1;#S="";#w=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){let t=this.querySelector(':scope > input[type="time"]');if(!t)return!1;this.#n=t,this.#u=this.closest("[lang]")?.lang||navigator.language||"en-US",this.#p=xg(this.#u);let i=this.getAttribute("data-format");this.#f=i==="12h"||i==="24h"?i:Sg(this.#u),this.#M();let s=t.getAttribute("name");s&&(this.hasAttribute("name")||this.setAttribute("name",s),t.removeAttribute("name")),t.hasAttribute("disabled")&&(t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled",""));let n=`${this.#e}-no-form`,r=t.getAttribute("form");return r&&r!==n&&!this.hasAttribute("form")&&this.setAttribute("form",r),t.setAttribute("form",n),this.#y===void 0&&(this.#y=t.defaultValue),this.#x!==void 0&&(t.value=this.#x,this.#x=void 0),this.#d=Nt(t.value),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(t,"click",this.#D),this.listen(t,"focus",this.#_),this.#N(),this.#F(),this.#i=!0,this.#R(),this.#et(),this.#H(!1),this.#it(),this.listen(document,"click",this.#B),this.listen(this,"focusout",this.#tt),this.listen(this,"invalid",this.#X),this.#A(this.matches(":disabled")),!0}teardown(){this.#g=!1,this.#o?.remove(),this.#a?.remove(),this.#l=[],this.#b=[],this.#c=null,this.#i=!1,clearTimeout(this.#Q),this.#P=""}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#A(this.matches(":disabled")),t==="required"&&this.#it())}formDisabledCallback(t){this.#i&&this.#A(t)}#A(t){this.#s.disabled=t,this.#r.disabled=t,t&&this.#T()}#M(){let t=this.#n.getAttribute("step");if(t&&t.trim().toLowerCase()==="any")this.#E=null;else{let s=Number(t);this.#E=Number.isFinite(s)&&s>0?Math.max(1,Math.round(s)):60}this.#m=Nt(this.#n.getAttribute("min")),this.#h=Nt(this.#n.getAttribute("max"));let i=Nt(this.#n.value);this.#v=this.#E!==null&&this.#E%60!==0||i!==null&&i%60!==0}#k(t,i){return this.dataset[`label${t}`]||i}#_=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#D=t=>{t.preventDefault(),this.#_()};#R(){let t=new Set([...Array.from(this.#n.labels||[]),...Array.from(this.#t.labels||[])]),i=[];for(let a of t)a.id||(a.id=`${this.#e}-label-${i.length}`),i.push(a.id),this.listen(a,"click",this.#_);let s=this.#s,n=i.join(" ")||this.#n.getAttribute("aria-labelledby")||this.getAttribute("aria-labelledby");n?s.setAttribute("aria-labelledby",n):s.setAttribute("aria-label",this.#n.getAttribute("aria-label")||this.getAttribute("aria-label")||this.#k("Input","Time"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#N(){this.#o=document.createElement("div"),this.#o.className="time-trigger";let t=document.createElement("input");t.type="text",t.className="time-input",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),t.setAttribute("placeholder",this.#k("Placeholder","Type a time\u2026")),this.#s=t,this.#o.appendChild(t),this.#r=document.createElement("button"),this.#r.type="button",this.#r.className="time-trigger-icon",this.#r.setAttribute("aria-label",this.#k("Toggle","Toggle time spinners")),this.#r.setAttribute("tabindex","-1");let i=document.createElement("icon-wc");i.setAttribute("name","clock"),i.setAttribute("size","sm"),i.setAttribute("aria-hidden","true"),this.#r.appendChild(i),this.#o.appendChild(this.#r),this.appendChild(this.#o),this.listen(this.#r,"click",s=>{s.stopPropagation(),this.#g?this.#T():this.#C(),this.#s.focus()}),this.listen(t,"focus",()=>t.select()),this.listen(t,"keydown",this.#L),this.listen(t,"blur",this.#G)}#F(){let t=`${this.#e}-panel`;this.#a=document.createElement("div"),this.#a.className="time-panel",this.#a.id=t,this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-modal","false"),this.#a.setAttribute("aria-label",this.#k("Dialog","Choose time")),this.#s.setAttribute("aria-controls",t);let i=this.#E??60,s=i>=3600&&i%3600===0?i/3600:1,n=i>=60&&i<3600&&i%60===0?i/60:1,r=i<60?i:1,a=i>=3600&&i%3600===0,o=this.#f==="12h",c=null;o&&(c=document.createElement("button"),c.type="button",c.className="period-toggle"),this.#c=c,c&&this.#p.periodFirst&&this.#a.appendChild(c);let l=!o&&this.#m!==null&&this.#h!==null&&this.#m<=this.#h;this.#l=[],this.#l.push(this.#I("hour",this.#k("Hours","Hours"),o?1:l?Math.floor(this.#m/3600):0,o?12:l?Math.floor(this.#h/3600):23,s,!1)),this.#a.appendChild(this.#j()),this.#l.push(this.#I("minute",this.#k("Minutes","Minutes"),0,59,n,a)),this.#v&&(this.#a.appendChild(this.#j()),this.#l.push(this.#I("second",this.#k("Seconds","Seconds"),0,59,r,!1))),c&&!this.#p.periodFirst&&this.#a.appendChild(c),this.#b=[...this.#a.querySelectorAll(".time-spinner, .period-toggle")],this.appendChild(this.#a);for(let u of this.#l)this.listen(u.incBtn,"click",()=>this.#U(u,u.delta,"pointer")),this.listen(u.decBtn,"click",()=>this.#U(u,-u.delta,"pointer")),this.listen(u.el,"keydown",d=>this.#z(d,u));if(this.#c){let u=this.#c;this.listen(u,"click",d=>{this.#Z(d.detail===0?"keyboard":"pointer")}),this.listen(u,"keydown",d=>this.#O(d,u))}}#I(t,i,s,n,r,a){let o=document.createElement("div");o.className="time-spinner",o.dataset.unit=t,o.setAttribute("role","spinbutton"),o.setAttribute("aria-label",i),o.setAttribute("aria-valuemin",String(s)),o.setAttribute("aria-valuemax",String(n)),a&&o.setAttribute("aria-readonly","true"),o.setAttribute("tabindex","0");let c=document.createElement("button");c.type="button",c.className="time-inc",c.setAttribute("aria-hidden","true"),c.setAttribute("tabindex","-1"),c.textContent="\u25B2",a&&(c.disabled=!0);let l=document.createElement("span");l.className="time-value";let u=document.createElement("button");return u.type="button",u.className="time-dec",u.setAttribute("aria-hidden","true"),u.setAttribute("tabindex","-1"),u.textContent="\u25BC",a&&(u.disabled=!0),o.append(c,l,u),this.#a.appendChild(o),{unit:t,el:o,valueEl:l,incBtn:c,decBtn:u,min:s,max:n,delta:r,readOnly:a}}#j(){let t=document.createElement("span");return t.className="time-sep",t.setAttribute("aria-hidden","true"),t.textContent=":",t}#C(){this.#g||this.#s.disabled||(this.#g=!0,this.#a.setAttribute("data-open",""),this.#s.setAttribute("aria-expanded","true"))}#T(){this.#g&&(this.#g=!1,this.#a.removeAttribute("data-open"),this.#s.setAttribute("aria-expanded","false"))}#B=t=>{this.#g&&!this.contains(t.target)&&this.#T()};#tt=t=>{let i=t.relatedTarget;i instanceof Node&&this.contains(i)||this.#T()};#$(t){try{let i=new Date(2e3,0,1,Math.floor(t/3600),Math.floor(t%3600/60),t%60),s={hour:this.#f==="12h"?"numeric":"2-digit",minute:"2-digit",hourCycle:this.#f==="12h"?"h12":"h23"};return this.#v&&(s.second="2-digit"),new Intl.DateTimeFormat(this.#u,s).format(i)}catch{return il(t,this.#v)}}#L=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation(),this.#V(),this.#g&&this.#T();return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#g||this.#C(),this.#b[0]?.focus();return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#g&&this.#T(),this.#et();return}};#V(){let t=this.#s.value.trim();if(!t)this.#W(null,"keyboard");else{let i=kg(t,this.#p);i!==null&&this.#W(i,"keyboard")}this.#et()}#G=t=>{t.relatedTarget instanceof Node&&this.contains(t.relatedTarget)||(this.#V(),this.#X())};#X=()=>{this.#i&&(this.#w||(this.#w=!0,this.#it()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#O(t,i){let s=this.#b.indexOf(i),n=getComputedStyle(this).direction==="rtl",r=n?"ArrowLeft":"ArrowRight",a=n?"ArrowRight":"ArrowLeft";return t.key===r||t.key===a?(t.preventDefault(),this.#b[s+(t.key===r?1:-1)]?.focus(),!0):t.key==="Escape"?(t.preventDefault(),t.stopPropagation(),this.#T(),this.#s.focus(),!0):!1}#z(t,i){if(this.#O(t,i.el))return;let s=i.unit==="hour"?i.delta:Math.ceil(10/i.delta)*i.delta;switch(t.key){case"ArrowUp":t.preventDefault(),this.#U(i,i.delta,"keyboard");break;case"ArrowDown":t.preventDefault(),this.#U(i,-i.delta,"keyboard");break;case"PageUp":t.preventDefault(),this.#U(i,s,"keyboard");break;case"PageDown":t.preventDefault(),this.#U(i,-s,"keyboard");break;case"Home":t.preventDefault(),this.#J(i,i.min,1,"keyboard");break;case"End":t.preventDefault(),this.#J(i,i.max,-1,"keyboard");break;default:/^\d$/.test(t.key)&&(t.preventDefault(),this.#K(t.key,i))}}#P="";#Q;#K(t,i){clearTimeout(this.#Q),this.#P+=t;let s=()=>{let n=Math.min(Math.max(Number(this.#P),i.min),i.max);this.#P="",this.#J(i,n,0,"keyboard")};this.#P.length>=2||Number(this.#P)*10>i.max?s():this.#Q=setTimeout(s,800)}#q(){return this.#st(this.#m??0,1)}#st(t,i){let s=dt(t,Ni),n=this.#E;if(n){let o=this.#m??0,c=(s-o)/n,l=i>0?Math.floor(c):i<0?Math.ceil(c):Math.round(c);s=dt(o+l*n,Ni)}let r=this.#m,a=this.#h;return r!==null&&a!==null&&r<=a?(s<r&&(s=r),s>a&&(s=n?r+Math.floor((a-r)/n)*n:a)):r!==null&&a===null&&s<r?s=r:a!==null&&r===null&&s>a&&(s=n?Math.floor(a/n)*n:a),s}#U(t,i,s){if(t.readOnly)return;if(this.#d===null){this.#W(this.#q(),s);return}let n=this.#d,r=Math.floor(n/3600),a=Math.floor(n%3600/60),o=n%60,c;t.unit==="hour"?c=(this.#f==="12h"?dt(r%12+i,12)+(r>=12?12:0):dt(r+i,24))*3600+a*60+o:t.unit==="minute"?c=r*3600+dt(a+i,60)*60+o:c=r*3600+a*60+dt(o+i,60),this.#W(this.#st(c,i),s)}#J(t,i,s,n){if(t.readOnly)return;let r=this.#d??this.#q(),a=Math.floor(r/3600),o=Math.floor(r%3600/60),c=r%60,l;t.unit==="hour"?l=(this.#f==="12h"?i%12+(a>=12?12:0):i)*3600+o*60+c:t.unit==="minute"?l=a*3600+i*60+c:l=a*3600+o*60+i,this.#W(this.#st(l,s),n)}#Z(t){let i=this.#d??this.#q();this.#W(this.#st(dt(i+12*3600,Ni),0),t)}#W(t,i){let s=this.value;return this.#d=t,t!==null&&t%60!==0&&!this.#v&&(this.#v=!0),this.#et(),this.value===s?!1:(this.#H(),this.#it(),this.dispatchEvent(new CustomEvent("time-picker:change",{bubbles:!0,detail:{...this.#Y(),source:i}})),!0)}#Y(){let t=this.#d;return t===null?{value:"",hours:null,minutes:null,seconds:null}:{value:this.value,hours:Math.floor(t/3600),minutes:Math.floor(t%3600/60),seconds:t%60}}#et(){if(!this.#i)return;let t=this.#d;this.#s.value=t===null?"":this.#$(t);let i=this.#k("Empty","Not set"),s=t===null?null:Math.floor(t/3600),n={hour:s===null?null:this.#f==="12h"?s%12||12:s,minute:t===null?null:Math.floor(t%3600/60),second:t===null?null:t%60},r=s===null?"":s>=12?this.#p.pm:this.#p.am;for(let a of this.#l){let o=n[a.unit];if(a.valueEl.textContent=o===null?"--":Yt(o),o===null){a.el.removeAttribute("aria-valuenow"),a.el.setAttribute("aria-valuetext",i);continue}a.el.setAttribute("aria-valuenow",String(o));let c;try{c=a.unit==="hour"&&this.#f==="12h"?new Intl.DateTimeFormat(this.#u,{hour:"numeric",hourCycle:"h12"}).format(new Date(2e3,0,1,s)):new Intl.NumberFormat(this.#u,{style:"unit",unit:a.unit,unitDisplay:"long"}).format(o)}catch{c=a.unit==="hour"&&r?`${o} ${r}`:String(o)}a.el.setAttribute("aria-valuetext",c)}this.#c&&(this.#c.textContent=r||"--",this.#c.setAttribute("aria-label",`${this.#k("Period","AM/PM")}: ${r||i}`))}#H(t=!0){let i=this.value;this.#t.setFormValue(i||null),this.#n.value=i,t&&this.#n.dispatchEvent(new Event("input",{bubbles:!0}))}#nt(t,i,s,n={}){let r=this.#n.getAttribute(`data-message-${t.toLowerCase()}`)??this.#k(i,s);for(let[a,o]of Object.entries(n))r=r.replaceAll(`{${a}}`,o);return r}#it(){if(!this.#i)return!1;let t=this.hasAttribute("required")||this.#n.hasAttribute("required");t?this.#s.setAttribute("aria-required","true"):this.#s.removeAttribute("aria-required");let i=this.#d,s=this.#m,n=this.#h,r={},a="";if(i===null)t&&(r={valueMissing:!0},a=this.#nt("valueMissing","Required","Please select a time"));else{let l=s!==null&&n!==null&&s>n,u=s!==null&&i<s,d=n!==null&&i>n;if(l?u&&d:u)r=l?{rangeUnderflow:!0,rangeOverflow:!0}:{rangeUnderflow:!0},a=this.#nt("rangeUnderflow","RangeUnderflow","Choose a time at or after {time}",{time:this.#$(s)});else if(!l&&d)r={rangeOverflow:!0},a=this.#nt("rangeOverflow","RangeOverflow","Choose a time at or before {time}",{time:this.#$(n)});else if(this.#E&&dt(i-(s??0),this.#E)!==0){let h=this.#st(i,1),f=dt(h+this.#E,Ni);r={stepMismatch:!0},a=this.#nt("stepMismatch","StepMismatch","Choose a valid time. The nearest are {lower} and {upper}",{lower:this.#$(h),upper:this.#$(f)})}}let o=this.#t.validationMessage;return a?this.#t.setValidity(r,a,this.#s):this.#t.setValidity({}),a&&(i!==null||this.#w)?this.#s.setAttribute("aria-invalid","true"):this.#s.removeAttribute("aria-invalid"),(this.#n.validationMessage===this.#S||!this.#n.validity.customError)&&(this.#n.setCustomValidity(a),this.#S=a),o!==a}#rt(t){this.#d=t,this.#et(),this.#H(),this.#it()}formResetCallback(){this.#i&&(this.#w=!1,this.#rt(Nt(this.#y)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#rt(Nt(t))}get form(){return this.#t.form}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}get willValidate(){return this.#t.willValidate}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#i?this.#d===null?"":il(this.#d,this.#v):this.#x??""}set value(t){let i=t==null?"":String(t).trim(),s=i?Nt(i):null;if(!(i&&s===null)){if(!this.#i){this.#x=i;return}this.#W(s,"api")}}};w("time-picker",$n);var Mi="popover"in HTMLElement.prototype;var Gt=[{ja:"\u4EE4\u548C",latin:"R",start:[2019,5,1]},{ja:"\u5E73\u6210",latin:"H",start:[1989,1,8]},{ja:"\u662D\u548C",latin:"S",start:[1926,12,25]},{ja:"\u5927\u6B63",latin:"T",start:[1912,7,30]},{ja:"\u660E\u6CBB",latin:"M",start:[1868,10,23]}],Cg=new RegExp(`^(?:(${Gt.map(e=>e.ja).join("|")})|(${Gt.map(e=>e.latin).join("|")}))`+String.raw`\s*(元|\d{1,2})年?[/.\-]?\s*(\d{1,2})月?[/.\-]?\s*(\d{1,2})日?$`,"i"),Tg=/^(\d{4})年(\d{1,2})月(\d{1,2})日?$/;function sl(e){return e.trim().replace(/[0-9]/g,t=>String(t.charCodeAt(0)-65296)).replace(/\s+/g,"")}function nl(e,t,i){let s=new Date(2e3,t-1,i);return s.setFullYear(e),s.getMonth()===t-1&&s.getDate()===i?s:null}function rl(e){let t=sl(e).match(Cg);if(!t)return null;let i=t[1]?Gt.find(a=>a.ja===t[1]):Gt.find(a=>a.latin.toUpperCase()===t[2].toUpperCase());if(!i)return null;let s=t[3]==="\u5143"?1:Number(t[3]);if(s<1)return null;let n=nl(i.start[0]+s-1,Number(t[4]),Number(t[5]));if(!n||n<new Date(i.start[0],i.start[1]-1,i.start[2]))return null;let r=Gt.indexOf(i);if(r>0){let a=Gt[r-1].start;if(n>=new Date(a[0],a[1]-1,a[2]))return null}return n}function al(e){let t=sl(e).match(Tg);return t?nl(Number(t[1]),Number(t[2]),Number(t[3])):null}G();var Bn=["january","february","march","april","may","june","july","august","september","october","november","december"],Lg=0;function Q(e){let t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}function Hn(e,t,i){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i))return null;let s=new Date(e,t,i);return s.getFullYear()!==e||s.getMonth()!==t||s.getDate()!==i?null:s}function rt(e){if(!e)return null;let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(String(e).trim());return t?Hn(Number(t[1]),Number(t[2])-1,Number(t[3])):null}function Ne(e,t){return new Date(e,t+1,0).getDate()}function On(e,t){let i=new Date(e.getFullYear(),e.getMonth()+t,1),s=i.getFullYear(),n=i.getMonth();return new Date(s,n,Math.min(e.getDate(),Ne(s,n)))}function Ng(e){try{let t=new Intl.Locale(e),i=t.getWeekInfo?.()??t.weekInfo;if(i)return i.firstDay%7}catch{}return 0}var Pn=new Map;function ol(e,t){let i=`${e}:${t}`;if(Pn.has(i))return Pn.get(i);let s;try{let n=new Intl.DateTimeFormat(e,{weekday:t});s=Array.from({length:7},(r,a)=>n.format(new Date(2026,0,4+a)))}catch{s=t==="long"?["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}return Pn.set(i,s),s}function cl(e,t){try{return new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric"}).format(e)}catch{return Q(e)}}function Rn(e,t){return!!(e&&t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}var qn=new Map;function Mg(e){if(qn.has(e))return qn.get(e);let t=new Map;Bn.forEach((i,s)=>{t.set(i,s),t.set(i.slice(0,3),s)});try{let i=new Intl.DateTimeFormat(e,{month:"long"}),s=new Intl.DateTimeFormat(e,{month:"short"});for(let n=0;n<12;n++){let r=new Date(2e3,n,1);t.set(i.format(r).toLowerCase(),n),t.set(s.format(r).toLowerCase().replace(".",""),n)}}catch{}return qn.set(e,t),t}function Fn(e,t){let i=e.trim(),s={date:null,partial:null};if(!i)return s;if(/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(i)){let o=rt(i.replace(/\//g,"-"));return o?{date:o,partial:null}:s}if(vi(t)==="ja"){let o=rl(i);if(o)return{date:o,partial:null}}let n=al(i);if(n)return{date:n,partial:null};let r=Mg(t),a=i.match(/^([a-zÀ-ɏ]+)\.?\s+(\d{1,2}),?\s+(\d{4})$/i);if(a){let o=r.get(a[1].toLowerCase());if(o===void 0)return s;let c=Hn(Number(a[3]),o,Number(a[2]));return c?{date:c,partial:null}:s}if(a=i.match(/^(\d{1,2})\.?\s+([a-zÀ-ɏ]+)\.?\s+(\d{4})$/i),a){let o=r.get(a[2].toLowerCase());if(o===void 0)return s;let c=Hn(Number(a[3]),o,Number(a[1]));return c?{date:c,partial:null}:s}if(a=i.match(/^([a-zÀ-ɏ]+)\.?\s+(\d{4})$/i),a){let o=r.get(a[1].toLowerCase());if(o!==void 0)return{date:null,partial:{year:Number(a[2]),month:o}}}return s}function ll(e){let t=new Map;if(!e)return t;for(let i of e.split(",")){let[s,n]=i.trim().split(":");s&&t.set(s,n||"")}return t}var Vn=class extends E{static formAssociated=!0;static get observedAttributes(){return["disabled","required"]}#t;#e=`dp${++Lg}`;#i=!1;#n;#s;#o;#r;#a;#l;#c;#b;#f=!1;#u=!1;#p="en-US";#v=null;#d=null;#m=new Date().getFullYear();#h=new Date().getMonth();#E=null;#y=null;#x=new Map;#g=new Map;#S;#w;#A=0;#M="";#k=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){let t=this.querySelector(':scope > input[type="date"]');if(!t)return!1;this.#n=t,this.#p=ft(this.closest("[lang]")?.lang||navigator.language),this.#A=Ng(this.#p),this.#E=rt(t.getAttribute("min")),this.#y=rt(t.getAttribute("max")),this.#x=ll(this.getAttribute("data-disabled-dates")),this.#g=ll(this.getAttribute("data-highlight-dates"));let i=t.getAttribute("name");i&&(this.hasAttribute("name")||this.setAttribute("name",i),t.removeAttribute("name")),t.hasAttribute("disabled")&&(t.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled",""));let s=`${this.#e}-no-form`,n=t.getAttribute("form");n&&n!==s&&!this.hasAttribute("form")&&this.setAttribute("form",n),t.setAttribute("form",s),this.#S===void 0&&(this.#S=t.defaultValue),this.#w!==void 0&&(t.value=this.#w,this.#w=void 0),this.#v=rt(t.value);let r=new Date;return this.#y&&r>this.#y&&(r=this.#y),this.#E&&r<this.#E&&(r=this.#E),this.#d=this.#v||r,this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(t,"click",this.#N),this.listen(t,"focus",this.#R),this.#I(),this.#j(),this.#i=!0,this.#F(),this.#X(),this.#Y(!1),this.#H(),this.#u=Mi,this.#u&&this.#a.setAttribute("popover","manual"),this.listen(document,"click",this.#J),this.listen(this,"invalid",this.#U),this.#_(this.matches(":disabled")),!0}teardown(){this.#f=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#Q,{capture:!0}),window.removeEventListener("resize",this.#Q),this.#r?.remove(),this.#a?.remove(),this.#x=new Map,this.#g=new Map,this.#i=!1}attributeChangedCallback(t){this.#i&&(t==="disabled"&&this.#_(this.matches(":disabled")),t==="required"&&this.#H())}formDisabledCallback(t){this.#i&&this.#_(t)}#_(t){this.#s.disabled=t,this.#o.disabled=t,t&&this.#z()}#D(t,i){return this.dataset[`label${t}`]||i}#R=()=>{this.#i&&!this.#s.disabled&&this.#s.focus()};#N=t=>{t.preventDefault(),this.#R()};#F(){let t=new Set([...Array.from(this.#n.labels||[]),...Array.from(this.#t.labels||[])]),i=[];for(let a of t)a.id||(a.id=`${this.#e}-label-${i.length}`),i.push(a.id),this.listen(a,"click",this.#R);let s=this.#s,n=i.join(" ")||this.#n.getAttribute("aria-labelledby")||this.getAttribute("aria-labelledby");n?s.setAttribute("aria-labelledby",n):s.setAttribute("aria-label",this.#n.getAttribute("aria-label")||this.getAttribute("aria-label")||this.#D("Input","Date"));let r=this.#n.getAttribute("aria-describedby");r&&s.setAttribute("aria-describedby",r)}#I(){this.#r=document.createElement("div"),this.#r.className="date-trigger",this.#s=document.createElement("input"),this.#s.type="text",this.#s.className="date-input",this.#s.setAttribute("role","combobox"),this.#s.setAttribute("aria-haspopup","dialog"),this.#s.setAttribute("aria-expanded","false"),this.#s.setAttribute("autocomplete","off"),this.#s.setAttribute("placeholder",this.#D("Placeholder","Type a date\u2026")),this.#r.appendChild(this.#s),this.#o=document.createElement("button"),this.#o.type="button",this.#o.className="date-trigger-icon",this.#o.setAttribute("aria-label",this.#D("Toggle","Toggle calendar")),this.#o.setAttribute("tabindex","-1");let t=document.createElement("icon-wc");t.setAttribute("name","calendar"),t.setAttribute("size","sm"),t.setAttribute("aria-hidden","true"),this.#o.appendChild(t),this.#r.appendChild(this.#o),this.appendChild(this.#r),this.listen(this.#o,"click",i=>{i.stopPropagation(),this.#f?this.#z():this.#O(),this.#s.focus()}),this.listen(this.#s,"focus",()=>this.#s.select()),this.listen(this.#s,"input",this.#K),this.listen(this.#s,"keydown",this.#q),this.listen(this.#s,"blur",this.#st)}#j(){let t=`${this.#e}-calendar`;this.#a=document.createElement("div"),this.#a.className="calendar",this.#a.id=t,this.#a.setAttribute("role","dialog"),this.#a.setAttribute("aria-modal","false"),this.#a.setAttribute("aria-label",this.#D("Dialog","Choose date")),this.#a.hidden=!0,this.#s.setAttribute("aria-controls",t);let i=document.createElement("div");i.className="calendar-header";let s=document.createElement("button");s.type="button",s.className="calendar-nav",s.setAttribute("aria-label",this.#D("Prev","Previous month"));let n=document.createElement("icon-wc");n.setAttribute("name","chevron-left"),n.setAttribute("size","sm"),n.setAttribute("aria-hidden","true"),s.appendChild(n);let r=document.createElement("span");r.className="calendar-title",this.#c=document.createElement("span"),this.#c.className="calendar-month",this.#c.id=`${t}-title`,this.#c.setAttribute("aria-live","polite"),this.#c.setAttribute("aria-atomic","true"),this.#b=document.createElement("select"),this.#b.className="calendar-year",this.#b.setAttribute("aria-label",this.#D("Year","Year")),this.#tt(),r.appendChild(this.#c),r.appendChild(this.#b);let a=document.createElement("button");a.type="button",a.className="calendar-nav",a.setAttribute("aria-label",this.#D("Next","Next month"));let o=document.createElement("icon-wc");o.setAttribute("name","chevron-right"),o.setAttribute("size","sm"),o.setAttribute("aria-hidden","true"),a.appendChild(o),i.appendChild(s),i.appendChild(r),i.appendChild(a),this.#a.appendChild(i);let c=document.createElement("table");c.setAttribute("role","grid"),c.setAttribute("aria-labelledby",`${t}-title`);let l=ol(this.#p,"short"),u=ol(this.#p,"long"),d=document.createElement("thead"),h=document.createElement("tr");for(let f=0;f<7;f++){let p=(this.#A+f)%7,m=document.createElement("th");m.setAttribute("abbr",u[p]),m.setAttribute("scope","col"),m.textContent=l[p],h.appendChild(m)}d.appendChild(h),c.appendChild(d),this.#l=document.createElement("tbody"),c.appendChild(this.#l),this.#a.appendChild(c),this.appendChild(this.#a),this.#C(),this.listen(s,"click",()=>this.#$(-1)),this.listen(a,"click",()=>this.#$(1)),this.listen(this.#b,"change",()=>{this.#m=Number(this.#b.value);let f=Ne(this.#m,this.#h),p=Math.min(this.#d?.getDate()??1,f);this.#d=new Date(this.#m,this.#h,p),this.#C()}),this.listen(this.#l,"click",this.#Z),this.listen(this.#a,"keydown",this.#W)}#C(){let t;try{t=new Intl.DateTimeFormat(this.#p,{month:"long"}).format(new Date(this.#m,this.#h,1))}catch{t=Bn[this.#h].charAt(0).toUpperCase()+Bn[this.#h].slice(1)}let i;try{i=new Intl.DateTimeFormat(this.#p,{month:"long",year:"numeric"}).format(new Date(this.#m,this.#h,1))}catch{i=`${t} ${this.#m}`}if(this.#c.lastElementChild?.textContent!==i){let l=document.createElement("span");l.setAttribute("aria-hidden","true"),l.textContent=t;let u=document.createElement("span");u.className="visually-hidden",u.textContent=i,this.#c.replaceChildren(l,u)}this.#b.querySelector(`option[value="${this.#m}"]`)||this.#tt(),this.#b.value=String(this.#m),this.#l.replaceChildren();let s=Ne(this.#m,this.#h),r=(new Date(this.#m,this.#h,1).getDay()-this.#A+7)%7,a=new Date,o=document.createElement("tr");for(let l=0;l<r;l++)o.appendChild(document.createElement("td"));for(let l=1;l<=s;l++){let u=new Date(this.#m,this.#h,l),d=Q(u),h=document.createElement("td"),f=document.createElement("button");f.type="button",f.setAttribute("data-date",d),f.textContent=String(l),Rn(u,a)&&f.setAttribute("aria-current","date");let p=Rn(u,this.#v);h.setAttribute("aria-selected",String(p));let m=this.#B(u,d);m.disabled&&(f.setAttribute("aria-disabled","true"),m.reason&&f.setAttribute("data-disabled-reason",m.reason)),this.#g.has(d)&&f.setAttribute("data-highlight",this.#g.get(d)||""),Rn(u,this.#d)?(f.setAttribute("tabindex","0"),p||f.setAttribute("data-focused","")):f.setAttribute("tabindex","-1"),h.appendChild(f),o.appendChild(h),(r+l)%7===0&&(this.#l.appendChild(o),o=document.createElement("tr"))}let c=(r+s)%7;if(c>0){for(let l=c;l<7;l++)o.appendChild(document.createElement("td"));this.#l.appendChild(o)}}#T(t){return this.#B(t,Q(t)).disabled}#B(t,i){return this.#x.has(i)?{disabled:!0,reason:this.#x.get(i)}:this.#E&&t<this.#E?{disabled:!0,reason:null}:this.#y&&t>this.#y?{disabled:!0,reason:null}:{disabled:!1,reason:null}}#tt(){this.#b.replaceChildren();let t=new Date().getFullYear(),i=this.#E?this.#E.getFullYear():t-100,s=this.#y?this.#y.getFullYear():t+10;i=Math.min(i,this.#m),s=Math.max(s,this.#m);for(let n=i;n<=s;n++){let r=document.createElement("option");r.value=String(n),r.textContent=String(n),this.#b.appendChild(r)}}#$(t){let i=this.#d??new Date(this.#m,this.#h,1),s=new Date(this.#m,this.#h,Math.min(i.getDate(),Ne(this.#m,this.#h)));this.#d=On(s,t),this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth(),this.#C();let n=document.activeElement;n?.matches(".calendar-nav:focus-visible")&&this.#a.contains(n)||this.#G(this.#d)}#L(t,i){if(t&&this.#T(t))return!1;let s=this.value,n=t?Q(t):"";return this.#v=t,t&&(this.#d=t),this.#X(),n===s?!1:(this.#Y(),this.#H(),t&&i==="api"&&(this.#m=t.getFullYear(),this.#h=t.getMonth()),(this.#f||i==="api")&&this.#C(),this.dispatchEvent(new CustomEvent("date-picker:change",{bubbles:!0,detail:{value:n,date:t?new Date(t):null,source:i}})),!0)}#V(t,i){this.#T(t)||(this.#L(t,i),this.#z(),this.#s.focus())}#G(t){let i=this.#l.querySelector(`[data-date="${Q(t)}"]`);if(i){for(let s of this.#l.querySelectorAll("button[data-date]"))s.setAttribute("tabindex",s===i?"0":"-1"),s!==i&&s.removeAttribute("data-focused");i.closest("td")?.getAttribute("aria-selected")!=="true"&&i.setAttribute("data-focused",""),i.focus()}}#X(){this.#s.value=this.#v?cl(this.#v,this.#p):""}#O(){if(!(this.#f||this.#s.disabled)){if(this.#f=!0,this.setAttribute("open",""),this.#s.setAttribute("aria-expanded","true"),this.#a.hidden=!1,this.#d&&(this.#m=this.#d.getFullYear(),this.#h=this.#d.getMonth()),this.#C(),this.#u){try{this.#a.showPopover()}catch{}this.#P(),window.addEventListener("scroll",this.#Q,{capture:!0,passive:!0}),window.addEventListener("resize",this.#Q,{passive:!0})}this.dispatchEvent(new CustomEvent("date-picker:open",{bubbles:!0}))}}#z(){if(this.#f){if(this.#f=!1,this.removeAttribute("open"),this.#s.setAttribute("aria-expanded","false"),this.#a.hidden=!0,this.#u){try{this.#a.hidePopover()}catch{}window.removeEventListener("scroll",this.#Q,{capture:!0}),window.removeEventListener("resize",this.#Q)}this.dispatchEvent(new CustomEvent("date-picker:close",{bubbles:!0}))}}#P(){if(!this.#u)return;let t=this.#r.getBoundingClientRect(),i=this.#a.getBoundingClientRect(),s=4,n=8,r=window.innerHeight,a=window.innerWidth,o=r-t.bottom-n,c=t.top-n,l;o<i.height&&c>o?(l=t.top-i.height-s,this.#a.dataset.placement="top"):(l=t.bottom+s,delete this.#a.dataset.placement);let u=t.left;u+i.width>a-n&&(u=a-i.width-n),u<n&&(u=n),this.#a.style.setProperty("--calendar-top",`${l}px`),this.#a.style.setProperty("--calendar-left",`${u}px`)}#Q=()=>{this.#f&&this.#P()};#K=()=>{let t=this.#s.value,{date:i,partial:s}=Fn(t,this.#p);if(i)this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#C();else if(s){this.#m=s.year,this.#h=s.month;let n=Ne(s.year,s.month),r=Math.min(this.#d?.getDate()??1,n);this.#d=new Date(s.year,s.month,r),this.#C()}!this.#f&&t.length>0&&this.#O()};#q=t=>{switch(t.key){case"Enter":{t.preventDefault(),t.stopPropagation();let i=this.#s.value.trim();if(!i){this.#L(null,"keyboard"),this.#z();return}let{date:s}=Fn(i,this.#p);s&&!this.#T(s)&&this.#V(s,"keyboard");return}case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.#f||this.#O(),requestAnimationFrame(()=>{this.#d&&this.#G(this.#d)});return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#f&&this.#z(),this.#X();return;case"Tab":this.#f&&this.#z();return}};#st=t=>{if(t.relatedTarget instanceof Node&&this.contains(t.relatedTarget))return;let i=this.#s.value.trim();if(!i)this.#L(null,"keyboard");else{let{date:s}=Fn(i,this.#p);s&&!this.#T(s)&&this.#L(s,"keyboard")}this.#X(),this.#f&&this.#z(),this.#U()};#U=()=>{this.#i&&(this.#k||(this.#k=!0,this.#H()),this.#n.dispatchEvent(new Event("blur",{bubbles:!0})))};#J=t=>{this.#f&&!this.contains(t.target)&&this.#z()};#Z=t=>{let s=t.target?.closest("button[data-date]");if(!s||s.getAttribute("aria-disabled")==="true")return;let n=rt(s.getAttribute("data-date"));n&&this.#V(n,"pointer")};#W=t=>{if(t.key==="Tab"){let o=[...this.#a.querySelectorAll('.calendar-header button, .calendar-header select, tbody button[tabindex="0"]')];if(!o.length)return;let c=o.indexOf(document.activeElement),l=c<0?0:(c+(t.shiftKey?-1:1)+o.length)%o.length;t.preventDefault(),o[l].focus();return}let i=t.target instanceof Element&&this.#l.contains(t.target),s=this.#d;if(!s)return;let n,r=(s.getDay()-this.#A+7)%7,a=getComputedStyle(this).direction==="rtl"?-1:1;switch(t.key){case"ArrowRight":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+a);break;case"ArrowLeft":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-a);break;case"ArrowDown":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+7);break;case"ArrowUp":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-7);break;case"PageDown":n=On(s,t.shiftKey?12:1);break;case"PageUp":n=On(s,t.shiftKey?-12:-1);break;case"Home":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()-r);break;case"End":n=new Date(s.getFullYear(),s.getMonth(),s.getDate()+(6-r));break;case"Enter":case" ":if(!i)return;t.preventDefault(),t.stopPropagation(),this.#V(s,"keyboard");return;case"Escape":t.preventDefault(),t.stopPropagation(),this.#z(),this.#s.focus();return;default:return}i&&(t.preventDefault(),t.stopPropagation(),this.#E&&n<this.#E&&(n=this.#E),this.#y&&n>this.#y&&(n=this.#y),this.#d=n,(n.getMonth()!==this.#h||n.getFullYear()!==this.#m)&&(this.#h=n.getMonth(),this.#m=n.getFullYear(),this.#C()),this.#G(n))};#Y(t=!0){let i=this.#v?Q(this.#v):"";this.#t.setFormValue(i||null),this.#n.value=i,t&&this.#n.dispatchEvent(new Event("input",{bubbles:!0}))}#et(t,i,s,n=null){let r=this.#n.getAttribute(`data-message-${t.toLowerCase()}`)??this.#D(i,s);return n?r.replaceAll("{date}",cl(n,this.#p)):r}#H(){if(!this.#i)return!1;let t=this.hasAttribute("required")||this.#n.hasAttribute("required");t?this.#s.setAttribute("aria-required","true"):this.#s.removeAttribute("aria-required");let i=this.#v,s={},n="";t&&!i?(s={valueMissing:!0},n=this.#et("valueMissing","Required","Please select a date")):i&&this.#E&&i<this.#E?(s={rangeUnderflow:!0},n=this.#et("rangeUnderflow","RangeUnderflow","Choose a date on or after {date}",this.#E)):i&&this.#y&&i>this.#y&&(s={rangeOverflow:!0},n=this.#et("rangeOverflow","RangeOverflow","Choose a date on or before {date}",this.#y));let r=this.#t.validationMessage;return n?this.#t.setValidity(s,n,this.#s):this.#t.setValidity({}),n&&(i||this.#k)?this.#s.setAttribute("aria-invalid","true"):this.#s.removeAttribute("aria-invalid"),(this.#n.validationMessage===this.#M||!this.#n.validity.customError)&&(this.#n.setCustomValidity(n),this.#M=n),r!==n}#nt(){this.#i&&(this.#C(),this.#H()&&this.#n.dispatchEvent(new Event("input",{bubbles:!0})))}#it(t){let i=t||new Date;this.#v=t,this.#d=i,this.#m=i.getFullYear(),this.#h=i.getMonth(),this.#X(),this.#Y(),this.#H(),this.#C()}formResetCallback(){this.#i&&(this.#k=!1,this.#it(rt(this.#S)))}formStateRestoreCallback(t){!this.#i||typeof t!="string"||this.#it(rt(t))}get form(){return this.#t.form}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}get willValidate(){return this.#t.willValidate}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}get value(){return this.#i?this.#v?Q(this.#v):"":this.#w??""}set value(t){let i=t==null?"":String(t).trim(),s=i?rt(i):null;if(!(i&&!s)){if(!this.#i){this.#w=i;return}this.#L(s,"api")}}get min(){return this.#E?Q(this.#E):""}set min(t){this.#E=rt(t),this.#n&&(this.#E?this.#n.setAttribute("min",Q(this.#E)):this.#n.removeAttribute("min")),this.#nt()}get max(){return this.#y?Q(this.#y):""}set max(t){this.#y=rt(t),this.#n&&(this.#y?this.#n.setAttribute("max",Q(this.#y)):this.#n.removeAttribute("max")),this.#nt()}};w("date-picker",Vn);Ut();function Xt(e,t,i){t/=100,i/=100;let s=a=>(a+e/30)%12,n=t*Math.min(i,1-i),r=a=>i-n*Math.max(-1,Math.min(s(a)-3,9-s(a),1));return{r:Math.round(r(0)*255),g:Math.round(r(8)*255),b:Math.round(r(4)*255)}}function _i(e,t,i,s=!1){e/=255,t/=255,i/=255;let n=Math.max(e,t,i),r=Math.min(e,t,i),a=(n+r)/2,o=0,c=0;if(n!==r){let l=n-r;switch(c=a>.5?l/(2-n-r):l/(n+r),n){case e:o=((t-i)/l+(t<i?6:0))/6;break;case t:o=((i-e)/l+2)/6;break;case i:o=((e-t)/l+4)/6;break}}return s?{h:o*360,s:c*100,l:a*100}:{h:Math.round(o*360),s:Math.round(c*100),l:Math.round(a*100)}}function _g(e){e=e.replace(/^#/,""),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}}function Dg(e,t,i){return"#"+[e,t,i].map(s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0")).join("")}function pt(e,t=!1){let{r:i,g:s,b:n}=_g(e);return _i(i,s,n,t)}function mt(e,t,i){let{r:s,g:n,b:r}=Xt(e,t,i);return Dg(s,n,r)}function B(e,t,i){return Math.max(t,Math.min(i,e))}function zn(e){return e/=255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Un(e){let t=e<=.0031308?e*12.92:1.055*Math.pow(e,.4166666666666667)-.055;return Math.round(B(t,0,1)*255)}function Ig(e,t,i){let s=zn(e),n=zn(t),r=zn(i),a=.4122214708*s+.5363325363*n+.0514459929*r,o=.2119034982*s+.6806995451*n+.1073969566*r,c=.0883024619*s+.2817188376*n+.6299787005*r,l=Math.cbrt(a),u=Math.cbrt(o),d=Math.cbrt(c),h=.2104542553*l+.793617785*u-.0040720468*d,f=1.9779984951*l-2.428592205*u+.4505937099*d,p=.0259040371*l+.7827717662*u-.808675766*d,m=Math.sqrt(f*f+p*p),b=Math.atan2(p,f)*180/Math.PI;return b<0&&(b+=360),m<1e-4&&(b=0),{L:h,C:m,H:b}}function $g(e,t,i){let s=i*Math.PI/180,n=t*Math.cos(s),r=t*Math.sin(s),a=e+.3963377774*n+.2158037573*r,o=e-.1055613458*n-.0638541728*r,c=e-.0894841775*n-1.291485548*r,l=a**3,u=o**3,d=c**3,h=4.0767416621*l-3.3077115913*u+.2309699292*d,f=-1.2684380046*l+2.6097574011*u-.3413193965*d,p=-.0041960863*l-.7034186147*u+1.707614701*d;return{r:Un(h),g:Un(f),b:Un(p)}}function Wn(e,t,i){let s=Xt(e,t,i);return Ig(s.r,s.g,s.b)}function ul(e,t,i,s=!1){let{r:n,g:r,b:a}=$g(e,t,i);return _i(n,r,a,s)}function Og(e,t,i){return mt(e,t,i)}function Pg(e,t,i){let{r:s,g:n,b:r}=Xt(e,t,i);return`rgb(${s} ${n} ${r})`}function Rg(e,t,i){return`hsl(${Math.round(e)}deg ${Math.round(t)}% ${Math.round(i)}%)`}function qg(e,t,i){let{L:s,C:n,H:r}=Wn(e,t,i);return`oklch(${(s*100).toFixed(1)}% ${n.toFixed(3)} ${r.toFixed(1)}deg)`}function dl(e,t,i,s){switch(e){case"rgb":return Pg(t,i,s);case"hsl":return Rg(t,i,s);case"oklch":return qg(t,i,s);default:return Og(t,i,s)}}var Jt=["hex","rgb","hsl","oklch"],Fg="hex",Bg=/^#[0-9a-fA-F]{6}$/,Zt=8,Hg=0,jn=class extends E{static formAssociated=!0;#t;#e;#i;#n;#s;#o;#r;#a;#l;#c;#b;#f;#u={};#p=Fg;#v;#d;#m;#h=!1;#E=!1;#y=!1;#x=`cp${++Hg}`;#g=0;#S=100;#w=50;#A;static get observedAttributes(){return["disabled"]}constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){if(this.#e=this.querySelector(':scope > input[type="color"]'),!this.#e)return!1;if(!this.#y){let s=this.getAttribute("format");s&&Jt.includes(s)&&(this.#p=s),this.#y=!0}if(this.#A===void 0){let s=this.#e.defaultValue;this.#A=Bg.test(s)?s.toLowerCase():this.#e.value||"#000000"}let t=pt(this.#e.value||this.#A,!0);this.#g=t.h,this.#S=t.s,this.#w=t.l;let i=this.#e.getAttribute("name");return i&&(this.hasAttribute("name")||this.setAttribute("name",i),this.#e.removeAttribute("name")),this.#e.hasAttribute("disabled")&&(this.#e.removeAttribute("disabled"),this.hasAttribute("disabled")||this.setAttribute("disabled","")),this.#e.setAttribute("tabindex","-1"),this.#e.setAttribute("aria-hidden","true"),this.#e.style.cssText="position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden;",this.listen(this.#e,"click",this.#k),this.#D(),this.#R(),this.#q(),this.#Y(),this.#E=Mi,this.#E&&this.#r.setAttribute("popover","manual"),this.listen(document,"click",this.#W),this.listen(this,"keydown",this.#_),this.#M(this.matches(":disabled")),!0}teardown(){this.#h=!1,this.removeAttribute("open"),window.removeEventListener("scroll",this.#Z,{capture:!0}),window.removeEventListener("resize",this.#Z),this.#i?.remove(),this.#r?.remove()}attributeChangedCallback(t){t==="disabled"&&this.#i&&this.#M(this.matches(":disabled"))}formDisabledCallback(t){this.#i&&this.#M(t)}#M(t){this.#i.disabled=t,t&&this.#U()}#k=t=>{t.preventDefault(),this.#i.disabled||this.#i.focus()};#_=t=>{t.key!=="Escape"||t.defaultPrevented||!this.#h||(t.preventDefault(),t.stopPropagation(),this.#U())};#D(){this.#i=document.createElement("button"),this.#i.type="button",this.#i.className="color-trigger",this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.#n=document.createElement("span"),this.#n.className="color-swatch",this.#s=document.createElement("span"),this.#s.className="color-hex",this.#s.id=`${this.#x}-value`,this.#i.appendChild(this.#n),this.#i.appendChild(this.#s);let t=[];for(let i of Array.from(this.#e.labels||[]))i.id||(i.id=`${this.#x}-label-${t.length}`),t.push(i.id);t.length===0&&(this.#o=document.createElement("span"),this.#o.className="visually-hidden",this.#o.id=`${this.#x}-name`,this.#o.textContent=this.#e.getAttribute("aria-label")||this.getAttribute("aria-label")||"Color",this.#i.prepend(this.#o),t.push(this.#o.id)),this.#i.setAttribute("aria-labelledby",[...t,this.#s.id].join(" ")),this.appendChild(this.#i),this.listen(this.#i,"click",()=>{this.#h?this.#U():this.#st()})}#R(){this.#v=void 0,this.#d=void 0,this.#r=document.createElement("div"),this.#r.className="color-panel",this.#r.setAttribute("role","dialog"),this.#r.setAttribute("aria-label","Color picker"),this.#a=document.createElement("div"),this.#a.className="color-area",this.#a.setAttribute("role","slider"),this.#a.setAttribute("aria-label","Saturation and lightness"),this.#a.setAttribute("aria-valuemin","0"),this.#a.setAttribute("aria-valuemax","100"),this.#a.setAttribute("tabindex","0"),this.#l=document.createElement("div"),this.#l.className="color-area-thumb",this.#a.appendChild(this.#l),this.#r.appendChild(this.#a);let t=document.createElement("div");t.className="color-hue-wrap",this.#c=document.createElement("div"),this.#c.className="color-hue",this.#c.setAttribute("role","slider"),this.#c.setAttribute("aria-label","Hue"),this.#c.setAttribute("aria-valuemin","0"),this.#c.setAttribute("aria-valuemax","360"),this.#c.setAttribute("tabindex","0"),this.#b=document.createElement("div"),this.#b.className="color-hue-thumb",this.#c.appendChild(this.#b),t.appendChild(this.#c),this.#r.appendChild(t);let i=document.createElement("div");i.className="color-format-row";let s=document.createElement("label");s.className="color-format-label";let n=document.createElement("span");n.textContent="Format",this.#f=document.createElement("select"),this.#f.className="color-format-select";for(let o of Jt){let c=document.createElement("option");c.value=o,c.textContent=o.toUpperCase(),this.#f.appendChild(c)}this.#f.value=this.#p,s.appendChild(n),s.appendChild(this.#f),i.appendChild(s),this.#r.appendChild(i),this.listen(this.#f,"change",this.#I),this.#u.hex=this.#N("hex",[{label:"Hex",channel:"hex",kind:"text",maxLength:7}]),this.#u.rgb=this.#N("rgb",[{label:"R",channel:"r",kind:"number",min:0,max:255,step:1},{label:"G",channel:"g",kind:"number",min:0,max:255,step:1},{label:"B",channel:"b",kind:"number",min:0,max:255,step:1}]),this.#u.hsl=this.#N("hsl",[{label:"H",channel:"h",kind:"number",min:0,max:360,step:1},{label:"S",channel:"s",kind:"number",min:0,max:100,step:1},{label:"L",channel:"l",kind:"number",min:0,max:100,step:1}]),this.#u.oklch=this.#N("oklch",[{label:"L%",channel:"oL",kind:"number",min:0,max:100,step:.1},{label:"C",channel:"oC",kind:"number",min:0,max:.4,step:.001},{label:"H\xB0",channel:"oH",kind:"number",min:0,max:360,step:.1}]);for(let o of Jt)this.#r.appendChild(this.#u[o].wrapper);this.#F();let r=this.querySelector(":scope > datalist");if(r){this.#v=document.createElement("div"),this.#v.className="color-swatches",this.#v.setAttribute("role","group"),this.#v.setAttribute("aria-label","Preset colors");for(let o of r.querySelectorAll("option[value]")){let c=document.createElement("button");c.type="button",c.setAttribute("aria-pressed","false"),c.style.background=o.value,c.setAttribute("aria-label",o.textContent||o.value),c.setAttribute("data-color",o.value),this.#v.appendChild(c)}this.#r.appendChild(this.#v),this.listen(this.#v,"click",this.#z)}let a=document.createElement("div");a.className="color-actions","EyeDropper"in window&&(this.#d=document.createElement("button"),this.#d.type="button",this.#d.className="color-eyedropper",this.#d.setAttribute("aria-label","Pick color from screen"),this.#d.textContent="\u{1F4A7}",a.appendChild(this.#d),this.listen(this.#d,"click",this.#P)),this.#m=document.createElement("button"),this.#m.type="button",this.#m.className="color-copy",this.#m.setAttribute("aria-label","Copy hex value"),this.#m.textContent="Copy",a.appendChild(this.#m),this.listen(this.#m,"click",this.#Q),this.#r.appendChild(a),this.appendChild(this.#r),this.listen(this.#a,"pointerdown",this.#j),this.listen(this.#a,"keydown",this.#T),this.listen(this.#c,"pointerdown",this.#B),this.listen(this.#c,"keydown",this.#$);for(let o of Jt){let c=o==="hex"?this.#V:o==="rgb"?this.#G:o==="hsl"?this.#X:this.#O;for(let{el:l}of this.#u[o].inputs)this.listen(l,"change",c)}}#N(t,i){let s=document.createElement("div");s.className=`color-inputs color-inputs-${t}`,s.setAttribute("data-format",t);let n=[];for(let r of i){let a=document.createElement("label");a.className="color-input-label";let o=document.createElement("span");o.textContent=r.label;let c=document.createElement("input");c.type=r.kind,c.setAttribute("data-channel",r.channel),c.setAttribute("autocomplete","off"),c.setAttribute("spellcheck","false"),r.kind==="text"&&r.maxLength&&c.setAttribute("maxlength",String(r.maxLength)),r.kind==="number"&&(c.min=String(r.min),c.max=String(r.max),r.step!=null&&(c.step=String(r.step))),a.appendChild(o),a.appendChild(c),s.appendChild(a),n.push({el:c,channel:r.channel})}return{wrapper:s,inputs:n}}#F(){for(let t of Jt)this.#u[t].wrapper.hidden=t!==this.#p;this.#m&&this.#m.setAttribute("aria-label",`Copy ${this.#p.toUpperCase()} value`)}#I=()=>{let t=this.#f.value;Jt.includes(t)&&(this.#p=t,this.#F(),this.#q())};#j=t=>{t.preventDefault(),this.#a.setPointerCapture(t.pointerId),this.#C(t);let i=n=>this.#C(n),s=n=>{this.#a.releasePointerCapture(n.pointerId),this.#a.removeEventListener("pointermove",i),this.#a.removeEventListener("pointerup",s)};this.#a.addEventListener("pointermove",i),this.#a.addEventListener("pointerup",s)};#C(t){let i=this.#a.getBoundingClientRect(),s=B((t.clientX-i.left)/i.width,0,1),n=B((t.clientY-i.top)/i.height,0,1);this.#S=Math.round(s*100),this.#w=Math.round((1-n)*100),this.#K("pointer")}#T=t=>{let i=t.shiftKey?10:1;switch(this.#S=Math.round(this.#S),this.#w=Math.round(this.#w),t.key){case"ArrowRight":t.preventDefault(),this.#S=B(this.#S+i,0,100);break;case"ArrowLeft":t.preventDefault(),this.#S=B(this.#S-i,0,100);break;case"ArrowUp":t.preventDefault(),this.#w=B(this.#w+i,0,100);break;case"ArrowDown":t.preventDefault(),this.#w=B(this.#w-i,0,100);break;case"Home":t.preventDefault(),this.#S=0;break;case"End":t.preventDefault(),this.#S=100;break;case"PageUp":t.preventDefault(),this.#w=B(this.#w+10,0,100);break;case"PageDown":t.preventDefault(),this.#w=B(this.#w-10,0,100);break;default:return}this.#K("keyboard")};#B=t=>{t.preventDefault(),this.#c.setPointerCapture(t.pointerId),this.#tt(t);let i=n=>this.#tt(n),s=n=>{this.#c.releasePointerCapture(n.pointerId),this.#c.removeEventListener("pointermove",i),this.#c.removeEventListener("pointerup",s)};this.#c.addEventListener("pointermove",i),this.#c.addEventListener("pointerup",s)};#tt(t){let i=this.#c.getBoundingClientRect(),s=B((t.clientX-i.left)/i.width,0,1);this.#g=Math.round(s*360),this.#K("pointer")}#$=t=>{let i=t.shiftKey?10:1;switch(this.#g=Math.round(this.#g),t.key){case"ArrowRight":case"ArrowUp":t.preventDefault(),this.#g=(this.#g+i)%361;break;case"ArrowLeft":case"ArrowDown":t.preventDefault(),this.#g=(this.#g-i+361)%361;break;case"PageUp":t.preventDefault(),this.#g=B(this.#g+10,0,360);break;case"PageDown":t.preventDefault(),this.#g=B(this.#g-10,0,360);break;case"Home":t.preventDefault(),this.#g=0;break;case"End":t.preventDefault(),this.#g=360;break;default:return}this.#K("keyboard")};#L(t,i){return this.#u[t].inputs.find(s=>s.channel===i)?.el}#V=()=>{let t=this.#L("hex","hex");if(!t)return;let i=t.value.trim();if(i.startsWith("#")||(i="#"+i),/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(i)){let s=pt(i,!0);this.#g=s.h,this.#S=s.s,this.#w=s.l,this.#K()}};#G=()=>{let t=B(Number(this.#L("rgb","r").value)||0,0,255),i=B(Number(this.#L("rgb","g").value)||0,0,255),s=B(Number(this.#L("rgb","b").value)||0,0,255),n=_i(t,i,s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#K()};#X=()=>{let t=B(Number(this.#L("hsl","h").value)||0,0,360)%361,i=B(Number(this.#L("hsl","s").value)||0,0,100),s=B(Number(this.#L("hsl","l").value)||0,0,100);this.#g=t,this.#S=i,this.#w=s,this.#K()};#O=()=>{let t=B(Number(this.#L("oklch","oL").value)||0,0,100)/100,i=B(Number(this.#L("oklch","oC").value)||0,0,.4),s=B(Number(this.#L("oklch","oH").value)||0,0,360),n=ul(t,i,s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#K()};#z=t=>{let i=t.target.closest("button[data-color]");if(!i)return;let s=i.getAttribute("data-color"),n=pt(s,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#K()};#P=async()=>{try{let i=await new window.EyeDropper().open(),s=pt(i.sRGBHex,!0);this.#g=s.h,this.#S=s.s,this.#w=s.l,this.#K()}catch{}};#Q=()=>{let t=dl(this.#p,this.#g,this.#S,this.#w);ut(t,{button:this.#m,announceMessage:"Color copied"})};#K(t="internal"){this.#q(),this.#Y();let i=mt(this.#g,this.#S,this.#w),s=Xt(this.#g,this.#S,this.#w);this.dispatchEvent(new CustomEvent("color-picker:change",{bubbles:!0,detail:{hex:i,rgb:{r:s.r,g:s.g,b:s.b},hsl:{h:Math.round(this.#g),s:Math.round(this.#S),l:Math.round(this.#w)},source:t}}))}#q(){let t=mt(this.#g,this.#S,this.#w),i=Xt(this.#g,this.#S,this.#w),s=mt(this.#g,100,50);this.#n.style.background=t,this.#s.textContent=t,this.#a.style.setProperty("--area-hue",s),this.#l.style.left=`${this.#S}%`,this.#l.style.top=`${100-this.#w}%`,this.#l.style.background=t;let n=Math.round(this.#g),r=Math.round(this.#S),a=Math.round(this.#w);this.#a.setAttribute("aria-valuenow",String(r)),this.#a.setAttribute("aria-valuetext",(this.getAttribute("data-label-area-value")||"Saturation {s}%, lightness {l}%").replaceAll("{s}",String(r)).replaceAll("{l}",String(a))),this.#b.style.left=`${this.#g/360*100}%`,this.#c.setAttribute("aria-valuenow",String(n)),this.#c.setAttribute("aria-valuetext",`Hue ${n}\xB0`);let o=(l,u,d)=>{let h=this.#L(l,u);h&&(h.value=String(d))};o("hex","hex",t),o("rgb","r",i.r),o("rgb","g",i.g),o("rgb","b",i.b),o("hsl","h",n),o("hsl","s",r),o("hsl","l",a);let c=Wn(this.#g,this.#S,this.#w);if(o("oklch","oL",(c.L*100).toFixed(1)),o("oklch","oC",c.C.toFixed(3)),o("oklch","oH",c.H.toFixed(1)),this.#v)for(let l of this.#v.querySelectorAll("button[data-color]")){let u=(l.getAttribute("data-color")||"").toLowerCase()===t.toLowerCase();l.setAttribute("aria-pressed",String(u))}}#st(){if(!(this.#h||this.#i.disabled)){if(this.#h=!0,this.setAttribute("open",""),this.#i.setAttribute("aria-expanded","true"),this.#E){try{this.#r.showPopover()}catch{}this.#J(),window.addEventListener("scroll",this.#Z,{capture:!0,passive:!0}),window.addEventListener("resize",this.#Z,{passive:!0})}requestAnimationFrame(()=>this.#a.focus()),this.dispatchEvent(new CustomEvent("color-picker:open",{bubbles:!0}))}}#U(){if(!this.#h)return;let t=this.#r.contains(document.activeElement);if(this.#h=!1,this.removeAttribute("open"),this.#i.setAttribute("aria-expanded","false"),this.#E){try{this.#r.hidePopover()}catch{}window.removeEventListener("scroll",this.#Z,{capture:!0}),window.removeEventListener("resize",this.#Z)}t&&this.#i.isConnected&&!this.#i.disabled&&this.#i.focus(),this.dispatchEvent(new CustomEvent("color-picker:close",{bubbles:!0}))}#J(){if(!this.#E)return;let t=this.#i.getBoundingClientRect(),i=this.#r.offsetWidth,s=this.#r.offsetHeight,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,o=getComputedStyle(this).direction==="rtl"?t.right-i:t.left;o=Math.min(o,n-i-Zt),o=Math.max(o,Zt);let c=t.bottom+4;c+s>r-Zt&&t.top-s-4>=Zt&&(c=t.top-s-4),c=Math.max(Zt,Math.min(c,r-s-Zt)),this.#r.style.setProperty("--panel-top",`${Math.round(c)}px`),this.#r.style.setProperty("--panel-left",`${Math.round(o)}px`)}#Z=()=>{this.#h&&this.#J()};#W=t=>{this.#h&&!this.contains(t.target)&&this.#U()};#Y(){let t=mt(this.#g,this.#S,this.#w);this.#t.setFormValue(t),this.#e.value=t,this.#e.dispatchEvent(new Event("input",{bubbles:!0}))}formResetCallback(){if(!this.#i)return;let t=pt(this.#A,!0);this.#g=t.h,this.#S=t.s,this.#w=t.l,this.#q(),this.#Y()}formStateRestoreCallback(t){if(!t||!this.#i)return;let i=pt(t,!0);this.#g=i.h,this.#S=i.s,this.#w=i.l,this.#q(),this.#Y()}get value(){return mt(this.#g,this.#S,this.#w)}set value(t){if(!/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t))return;let i=mt(this.#g,this.#S,this.#w).toLowerCase(),s=t.toLowerCase();if(i===s||i===s.toLowerCase())return;let n=pt(t,!0);this.#g=n.h,this.#S=n.s,this.#w=n.l,this.#K("api")}};w("color-picker",jn);var Vg='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="5" y1="12" x2="19" y2="12"/></svg>',zg='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>';function Ug(e){if(!e)return[];let t=e.trim();if(t.startsWith("["))try{return JSON.parse(t).map(s=>({value:String(s.value),label:String(s.label??s.value)}))}catch{return[]}return t.split(",").map(i=>{let s=i.trim();return{value:s,label:s}})}function Wg(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}function jg(e){let t=Math.max(0,Math.round(e)),i=Math.floor(t/3600),s=Math.floor(t%3600/60),n=t%60,r=a=>String(a).padStart(2,"0");return i>0?`${i}:${r(s)}:${r(n)}`:`${s}:${r(n)}`}function Kg(e,t){let i=Number(e)||0,s=["B","KB","MB","GB","TB","PB"],n=0,r=Math.abs(i);for(;r>=1e3&&n<s.length-1;)r/=1e3,n+=1;let a=new Intl.NumberFormat(t,{minimumFractionDigits:n===0?0:1,maximumFractionDigits:n===0?0:2});return`${i<0?"-":""}${a.format(r)} ${s[n]}`}function Yg(){return document.documentElement.lang||void 0}function Kn(e){let t=String(e),i=t.indexOf(".");return i<0?0:t.length-i-1}var hl=!1,Gg=0,Yn=class extends E{static formAssociated=!0;static observedAttributes=["value","disabled","readonly","aria-label","aria-labelledby","data-label-decrease","data-label-increase"];#t;#e;#i=-1/0;#n=1/0;#s=1;#o=[];#r=[];#a;#l;#c="";#b=!1;#f=!1;#u;#p;#v;#d=!1;#m=!1;#h;#E;#y;#x;#g;#S;#w=0;#A=0;#M=!1;#k=!1;constructor(){super(),this.#t=this.attachInternals(),this._adoptInternals(this.#t)}setup(){this.#R(),this.#N(),this.#j();let t=this.getAttribute("value");this.#d||(this.#v=t,this.#d=!0),this.#P(t??this.#I(),"init"),this.#_(),requestAnimationFrame(()=>{this.isConnected&&this.#_()}),this.listen(this.#h,"focus",()=>this.#_()),this.listen(this,"click",i=>{i.target===this&&!this.#tt()&&this.#h.focus()})}teardown(){this.#T(),this.#k=!1}attributeChangedCallback(t,i,s){!this.isConnected||!this.#h||(t==="value"?this.#P(s??this.#I(),"attr"):t==="disabled"||t==="readonly"?this.#L():t==="aria-label"||t==="aria-labelledby"?this.#_():this.#D())}#_(){let t=[],i=[];try{i=[...this.#t.labels||[]]}catch{}for(let a of i)a.id||(a.id=`stepper-wc-label-${++Gg}`),t.push(a.id);let s=(this.getAttribute("aria-labelledby")||"").trim();s&&t.push(...s.split(/\s+/));let n=[...new Set(t)];n.length?this.#h.setAttribute("aria-labelledby",n.join(" ")):this.#h.removeAttribute("aria-labelledby");let r=this.getAttribute("aria-label");r?this.#h.setAttribute("aria-label",r):this.#h.removeAttribute("aria-label")}#D(){this.#x.setAttribute("aria-label",this.getAttribute("data-label-decrease")||"Decrease"),this.#g.setAttribute("aria-label",this.getAttribute("data-label-increase")||"Increase")}#R(){if(this.hasAttribute("data-options"))this.#e="enum";else if(this.hasAttribute("data-values"))this.#e="token";else if(this.hasAttribute("data-format")||this.hasAttribute("data-suffix"))this.#e="formatted";else{if(this.#e="numeric",hl)return;hl=!0,console.info('[stepper-wc] No mode attribute set. Plain numeric stepping is better served by `<input type="number" data-stepper>`. See /docs/interaction/numeric-inputs/')}}#N(){this.#i=this.hasAttribute("data-min")?Number(this.getAttribute("data-min")):-1/0,this.#n=this.hasAttribute("data-max")?Number(this.getAttribute("data-max")):1/0,this.#s=Number(this.getAttribute("data-step"))||1,this.#o=Wg(this.getAttribute("data-values")),this.#r=Ug(this.getAttribute("data-options")),this.#a=this.getAttribute("data-format")||(this.hasAttribute("data-suffix")?"number":null),this.#l=this.getAttribute("data-currency")||"USD",this.#c=this.getAttribute("data-suffix")||"",this.#b=this.hasAttribute("data-show-label"),this.#f=this.hasAttribute("data-accelerate"),this.#u=Yg(),this.#S=this.#F()}#F(){if(!this.#a)return null;let t=Kn(this.#s);return this.#a==="number"?new Intl.NumberFormat(this.#u,{minimumFractionDigits:t,maximumFractionDigits:t}):this.#a==="currency"?new Intl.NumberFormat(this.#u,{style:"currency",currency:this.#l}):this.#a==="percent"?new Intl.NumberFormat(this.#u,{style:"percent",minimumFractionDigits:t,maximumFractionDigits:t}):null}#I(){return this.#e==="enum"?this.#r[0]?.value??"":this.#e==="token"?this.#o[0]??"":"0"}#j(){this.replaceChildren(),this.#x=document.createElement("button"),this.#x.type="button",this.#x.className="stepper-dec",this.#x.setAttribute("tabindex","-1"),this.#x.innerHTML=Vg,this.#g=document.createElement("button"),this.#g.type="button",this.#g.className="stepper-inc",this.#g.setAttribute("tabindex","-1"),this.#g.innerHTML=zg,this.#h=document.createElement("span"),this.#h.className="stepper-value",this.#h.setAttribute("role","spinbutton"),this.#h.setAttribute("tabindex","0"),this.#E=document.createElement("span"),this.#E.className="stepper-value-display",this.#h.appendChild(this.#E),this.#y=new Set;for(let t of this.#st())this.#U(t);this.appendChild(this.#x),this.appendChild(this.#h),this.appendChild(this.#g),this.#C(this.#x,-1),this.#C(this.#g,1),this.listen(this.#h,"keydown",this.#B),this.#D(),this.#L()}#C(t,i){if(this.listen(t,"click",n=>{if(this.#k){this.#k=!1,n.preventDefault();return}this.#V(i,1)}),!this.#f)return;this.listen(t,"pointerdown",n=>{let r=n;r.pointerType==="mouse"&&r.button!==0||this.#$()||(this.#M=!1,this.#w=window.setTimeout(()=>{this.#M=!0,this.#A=window.setInterval(()=>this.#V(i,1),100),this.#w=window.setTimeout(()=>{window.clearInterval(this.#A),this.#A=window.setInterval(()=>this.#V(i,5),50)},1e3)},500))});let s=()=>{this.#T(),this.#M&&(this.#k=!0)};this.listen(t,"pointerup",s),this.listen(t,"pointerleave",s),this.listen(t,"pointercancel",s)}#T(){window.clearTimeout(this.#w),window.clearInterval(this.#A),this.#w=0,this.#A=0}#B=t=>{if(this.#$())return;let i=getComputedStyle(this).direction==="rtl";switch(i&&t.key==="ArrowLeft"?"ArrowRight":i&&t.key==="ArrowRight"?"ArrowLeft":t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),this.#V(1,1);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.#V(-1,1);break;case"PageUp":t.preventDefault(),this.#V(1,10);break;case"PageDown":t.preventDefault(),this.#V(-1,10);break;case"Home":t.preventDefault(),this.#G("min");break;case"End":t.preventDefault(),this.#G("max");break;default:}};#tt(){return this.hasAttribute("disabled")||this.#m}#$(){return this.#tt()||this.hasAttribute("readonly")}#L(){let t=this.#tt();this.#h.setAttribute("aria-disabled",String(t)),this.hasAttribute("readonly")?this.#h.setAttribute("aria-readonly","true"):this.#h.removeAttribute("aria-readonly"),t?(this.#h.removeAttribute("tabindex"),this.#T()):this.#h.setAttribute("tabindex","0"),this.#p!==void 0?this.#Z():(this.#x.disabled=this.#$(),this.#g.disabled=this.#$())}#V(t,i){if(this.#$())return;let s=this.#X(t,i);s===null||s===this.#p||this.#P(s,"step")}#G(t){if(this.#e==="enum"){let s=t==="min"?0:this.#r.length-1;this.#P(this.#r[s]?.value,"step");return}if(this.#e==="token"){let s=t==="min"?0:this.#o.length-1;this.#P(this.#o[s],"step");return}let i=t==="min"?this.#i===-1/0?this.#p:this.#i:this.#n===1/0?this.#p:this.#n;this.#P(String(i),"step")}#X(t,i){if(this.#e==="enum"){let c=this.#r.findIndex(d=>d.value===this.#p),l=c===-1?0:c,u=Math.min(this.#r.length-1,Math.max(0,l+t*i));return this.#r[u]?.value}if(this.#e==="token"){let l=this.#O(this.#p);l===-1&&(l=this.#z(this.#p));let u=Math.min(this.#o.length-1,Math.max(0,l+t*i));return this.#o[u]}let s=Number(this.#p)||0,n=Kn(this.#s),r=s+t*this.#s*i,a=Number(r.toFixed(n)),o=Math.min(this.#n,Math.max(this.#i,a));return String(o)}#O(t){if(t==null)return-1;let i=this.#o.indexOf(String(t));if(i!==-1)return i;let s=Number(t);if(Number.isFinite(s)){let n=this.#o.findIndex(r=>Number(r)===s);if(n!==-1)return n}return-1}#z(t){let i=Number(t);if(!Number.isFinite(i))return 0;let s=0,n=1/0;return this.#o.forEach((r,a)=>{let o=Number(r);if(!Number.isFinite(o))return;let c=Math.abs(o-i);c<n&&(n=c,s=a)}),s}#P(t,i){let s=this.#Q(t),n=s!==this.#p;this.#p=s,this.getAttribute("value")!==String(s)&&this.setAttribute("value",String(s)),this.#K(),this.#J(),this.#Z(),this.#et(),this.#H(),n&&i!=="init"&&(this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))}#Q(t){if(t==null)return this.#I();if(this.#e==="enum"){let n=String(t);return this.#r.find(a=>a.value===n)?n:this.#r[0]?.value??""}if(this.#e==="token")return String(t);let i=Number(t);if(!Number.isFinite(i))return String(this.#i===-1/0?0:this.#i);let s=Kn(this.#s);return String(Number(Math.min(this.#n,Math.max(this.#i,i)).toFixed(s)))}#K(){let t=this.#q();this.#E.textContent=t,this.#U(t)}#q(t=this.#p){if(this.#e==="enum")return this.#r.find(s=>s.value===t)?.label??t??"";if(this.#e==="token"){let i=this.#b?String(t).replace(/^--/,""):String(t);return this.#c?`${i}${this.#c}`:i}if(this.#e==="formatted"){let i=Number(t)||0;if(this.#a==="duration")return jg(i);if(this.#a==="bytes")return Kg(i,this.#u);if(this.#S){let s=this.#a==="percent"?i/100:i,n=this.#S.format(s);return this.#c&&this.#a==="number"?`${n}${this.#c}`:n}return this.#c?`${i}${this.#c}`:String(i)}return String(t??"")}#st(){if(this.#e==="enum")return this.#r.map(s=>this.#q(s.value));if(this.#e==="token")return this.#o.map(s=>this.#q(s));let t=new Set,i=s=>{Number.isFinite(s)&&t.add(s)};if(this.#i!==-1/0&&i(this.#i),this.#n!==1/0&&i(this.#n),i(Number(this.getAttribute("value"))||0),this.#n===1/0){let s=[10,100,1e3,1e4];for(let n of s)i(n);if(this.#a==="bytes")for(let n of[999,999e3,999e6,999e9])i(n)}return[...t].map(s=>this.#q(String(s)))}#U(t){let i=String(t??"");if(!i||this.#y.has(i))return;this.#y.add(i);let s=document.createElement("span");s.className="stepper-value-reserve",s.setAttribute("aria-hidden","true"),s.textContent=i,this.#h.appendChild(s)}recomputeWidth(){if(this.#h){this.#h.querySelectorAll(".stepper-value-reserve").forEach(t=>t.remove()),this.#y=new Set;for(let t of this.#st())this.#U(t)}}#J(){if(this.#e==="enum"){let i=this.#r.findIndex(s=>s.value===this.#p);this.#h.setAttribute("aria-valuemin","1"),this.#h.setAttribute("aria-valuemax",String(this.#r.length)),this.#h.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#h.setAttribute("aria-valuetext",this.#q());return}if(this.#e==="token"){let i=this.#O(this.#p);this.#h.setAttribute("aria-valuemin","1"),this.#h.setAttribute("aria-valuemax",String(this.#o.length)),this.#h.setAttribute("aria-valuenow",String((i===-1?0:i)+1)),this.#h.setAttribute("aria-valuetext",this.#q());return}let t=Number(this.#p)||0;this.#i!==-1/0?this.#h.setAttribute("aria-valuemin",String(this.#i)):this.#h.removeAttribute("aria-valuemin"),this.#n!==1/0?this.#h.setAttribute("aria-valuemax",String(this.#n)):this.#h.removeAttribute("aria-valuemax"),this.#h.setAttribute("aria-valuenow",String(t)),this.#h.setAttribute("aria-valuetext",this.#q())}#Z(){let t=this.#W(),i=this.#Y(),s=this.#$();this.#x.disabled=t||s,this.#g.disabled=i||s}#W(){return this.#e==="enum"?this.#p===this.#r[0]?.value:this.#e==="token"?this.#O(this.#p)===0:this.#i!==-1/0&&Number(this.#p)<=this.#i}#Y(){return this.#e==="enum"?this.#p===this.#r[this.#r.length-1]?.value:this.#e==="token"?this.#O(this.#p)===this.#o.length-1:this.#n!==1/0&&Number(this.#p)>=this.#n}#et(){this.#t.setFormValue(String(this.#p??""))}#H(){this.setState("at-min",this.#W()),this.setState("at-max",this.#Y())}formResetCallback(){this.#P(this.#v??this.#I(),"reset")}formDisabledCallback(t){this.#m=t,this.#h&&this.#L()}formStateRestoreCallback(t){t!=null&&this.#P(t,"restore")}get displayText(){return this.#E?.textContent??""}get value(){return this.#p==null?"":String(this.#p)}set value(t){String(t)!==String(this.#p)&&this.#P(t,"api")}get form(){return this.#t.form}get name(){return this.getAttribute("name")}get type(){return this.localName}get validity(){return this.#t.validity}get validationMessage(){return this.#t.validationMessage}checkValidity(){return this.#t.checkValidity()}reportValidity(){return this.#t.reportValidity()}};w("stepper-wc",Yn);var Xg={live:"Live",recording:"Recording",streaming:"Streaming",error:"Error",online:"Online",running:"Running",away:"Away",paused:"Paused",busy:"Busy",offline:"Offline",stopped:"Stopped"},Gn=class extends E{static get observedAttributes(){return["data-variant","data-live","aria-label"]}#t=null;#e=null;#i=!1;setup(){let t=this.querySelector(":scope > .status-dot"),i=this.querySelector(":scope > .status-label"),s=this.querySelector(":scope > .status-default-label");t||(t=document.createElement("span"),t.className="status-dot",t.setAttribute("aria-hidden","true")),i||(i=document.createElement("span"),i.className="status-label"),s||(s=document.createElement("span"),s.className="status-default-label");for(let n of[...this.childNodes])n===t||n===i||n===s||i.appendChild(n);this.append(t,i,s),this.#t=i,this.#e=s,this.#n(),this.#s()}attributeChangedCallback(t,i,s){i!==s&&(!this.isConnected||!this.hasAttribute("data-upgraded")||(t==="data-variant"?(this.#s(),this.dispatchEvent(new CustomEvent("status-wc:change",{bubbles:!0,detail:{variant:s,previousVariant:i}}))):t==="data-live"?this.#n():t==="aria-label"&&this.#s()))}#n(){this.getAttribute("data-live")==="off"?this.#i&&(this.removeAttribute("role"),this.removeAttribute("aria-live"),this.#i=!1):!this.hasAttribute("role")&&!this.hasAttribute("aria-live")&&(this.setAttribute("role","status"),this.setAttribute("aria-live","polite"),this.#i=!0)}#s(){let t=this.#e;if(!t)return;let i=!!this.#t?.textContent?.trim(),s="";if(!i){let n=this.getAttribute("data-variant")||"";s=this.getAttribute("aria-label")||n&&this.getAttribute(`data-label-${n}`)||Xg[n]||n}t.textContent!==s&&(t.textContent=s)}get variant(){return this.getAttribute("data-variant")}set variant(t){t?this.setAttribute("data-variant",t):this.removeAttribute("data-variant")}};w("status-wc",Gn);xe();Ei();var Xn=0,Jg='a[href], button, input, select, textarea, summary, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])',Zg="a[href], button, input, select, textarea, summary",Qg=new Set(["button","link","checkbox","radio","switch","tab","option","treeitem","gridcell","menuitem","menuitemcheckbox","menuitemradio","combobox","textbox","searchbox","slider","spinbutton"]);function Di(e){return e.hasAttribute("data-disabled")||e.getAttribute("aria-disabled")==="true"||!!e.disabled}function tv(e){return e.pointerType===""||e.pointerId===-1||e.button===-1||e.clientX===0&&e.clientY===0&&e.buttons===0}var Jn=class extends E{#t;#e;#i;#n=[];#s=-1;#o=!1;#r=[];#a=!1;#l=[];#c=null;setup(){let t=this.querySelector(":scope > [data-trigger]"),i=this.querySelector('menu, ul[role="menu"]');if(!t||!i)return!1;this.#t=t,this.#e=i;let s=this.querySelector(":scope > pop-over[data-context-menu-host]");s?this.#i=s:(this.#i=document.createElement("pop-over"),this.#i.setAttribute("data-context-menu-host",""),this.#i.id=`ctx-menu-${++Xn}`,this.#i.dataset.mode="auto",this.#i.appendChild(this.#e),this.appendChild(this.#i)),this.#e.parentElement!==this.#i&&this.#i.appendChild(this.#e),this.#e.setAttribute("role","menu"),this.#e.id||(this.#e.id=`ctx-menu-list-${++Xn}`),this.#t.matches(Jg)||this.#b("tabindex","0"),this.#a=this.#t.matches(Zg)||this.#t.hasAttribute("tabindex")&&Qg.has((this.#t.getAttribute("role")||"").trim().toLowerCase()),this.#a?(this.#b("aria-haspopup","menu"),this.#b("aria-expanded","false"),this.#b("aria-controls",this.#e.id)):!this.#t.hasAttribute("aria-description")&&!this.#t.hasAttribute("aria-describedby")&&this.#b("aria-description",this.getAttribute("data-label-available")||"Context menu available"),this.#e.querySelectorAll(':scope > li:empty:not([data-group]), :scope > [role="separator"], :scope > hr').forEach(r=>{r.setAttribute("role","separator")}),this.#f();let n=Array.from(this.#e.querySelectorAll('button, a, [role="menuitem"]'));return n.forEach(r=>{r.setAttribute("role","menuitem"),r.setAttribute("tabindex","-1")}),this.#n=n.filter(r=>!r.disabled),this.#e.querySelectorAll("li").forEach(r=>{r.querySelector(':scope > :is(button, a, [role="menuitem"])')&&r.setAttribute("role","none")}),this.#n.forEach(r=>{r.hasAttribute("data-disabled")&&r.setAttribute("aria-disabled","true"),this.listen(r,"click",this.#g);let a=r.getAttribute("data-shortcut");if(a){if(!r.querySelector(":scope > .ctx-kbd")){let c=document.createElement("kbd");c.className="ctx-kbd",c.setAttribute("aria-hidden","true"),c.textContent=Dc(a),r.appendChild(c)}r.setAttribute("aria-keyshortcuts",Ai(a));let o=Kt(a,()=>{Di(r)||r.click()});this.#r.push(o)}}),this.listen(this.#t,"contextmenu",this.#p),this.listen(this.#t,"keydown",this.#v),this.listen(this.#e,"keydown",this.#y),this.listen(this.#e,"click",this.#x,{capture:!0}),this.listen(window,"scroll",this.#w,{capture:!0}),this.listen(this.#i,"pop-over:hide",this.#S),!0}teardown(){this.#r.forEach(t=>t()),this.#r=[];for(let t of this.#l)this.#t?.removeAttribute(t);this.#l=[],this.#c=null,this.#o&&(this.#o=!1,this.removeAttribute("data-open"),this.#i?.hide?.()),this.#s=-1,this.#n=[],this.#e?.querySelectorAll(".ctx-kbd").forEach(t=>t.remove()),this.#u()}#b(t,i){this.#t.setAttribute(t,i),this.#l.push(t)}#f(){let t=this.#e;for(let i of Array.from(t.querySelectorAll(":scope > li[data-group]"))){i.id||(i.id=`ctx-group-${++Xn}`),i.classList.add("ctx-group-label"),i.setAttribute("aria-hidden","true");let s=document.createElement("li");s.setAttribute("role","group"),s.setAttribute("aria-labelledby",i.id),s.setAttribute("data-ctx-group","");let n=document.createElement("ul");n.setAttribute("role","none"),s.appendChild(n),t.insertBefore(s,i),n.appendChild(i);let r=s.nextElementSibling;for(;r&&!r.hasAttribute("data-group")&&r.getAttribute("role")!=="separator";){let a=r;r=r.nextElementSibling,n.appendChild(a)}}}#u(){let t=this.#e;if(t)for(let i of Array.from(t.querySelectorAll(":scope > li[data-ctx-group]"))){let s=i.querySelector(":scope > ul");if(s)for(let n of Array.from(s.children))t.insertBefore(n,i);i.remove()}}get items(){if(!this.#e)return[];let t=[],i=this.#e.querySelectorAll(":scope > li:not([data-ctx-group]), :scope > li[data-ctx-group] > ul > li");for(let s of i){if(s.hasAttribute("data-group")){t.push({group:s.textContent.trim()});continue}if(s.matches(':empty, [role="separator"]')||s.querySelector("hr")){t.push({separator:!0});continue}let n=s.querySelector('button, a, [role="menuitem"]');if(!n)continue;let r=Array.from(n.childNodes).filter(a=>!(a instanceof Element&&a.classList.contains("ctx-kbd"))).map(a=>a.textContent).join("");t.push({label:r.trim().replace(/\s+/g," "),value:n.getAttribute("data-value")||void 0,href:n.tagName==="A"?n.getAttribute("href"):void 0,shortcut:n.getAttribute("data-shortcut")||void 0,disabled:n.disabled||n.hasAttribute("data-disabled")||void 0})}return t}set items(t){let i=Array.isArray(t)?t:[],s=this.querySelector('menu, ul[role="menu"]');for(s||(s=document.createElement("menu"),this.appendChild(s));s.firstChild;)s.firstChild.remove();for(let n of i){let r=document.createElement("li");if(n.separator)r.setAttribute("role","separator");else if(n.group!=null)r.setAttribute("data-group",""),r.textContent=n.group;else{let a=n.href?document.createElement("a"):document.createElement("button");n.href&&a.setAttribute("href",n.href),n.value&&a.setAttribute("data-value",n.value),n.shortcut&&a.setAttribute("data-shortcut",n.shortcut),n.disabled&&a.setAttribute("data-disabled",""),a.tagName==="BUTTON"&&a.setAttribute("type","button"),a.textContent=n.label||"",r.appendChild(a)}s.appendChild(r)}this._reinit(),this.dispatchEvent(new CustomEvent("context-menu:items-changed",{detail:{items:i,source:"property"},bubbles:!0}))}#p=t=>{if(t.preventDefault(),tv(t)){this.#o||this.#d();return}t.buttons!==0?this.listen(window,"pointerup",()=>{setTimeout(()=>this.#m(t.clientX,t.clientY),0)},{once:!0,capture:!0}):this.#m(t.clientX,t.clientY)};#v=t=>{t.defaultPrevented||(t.key==="ContextMenu"||t.key==="F10"&&t.shiftKey)&&(t.preventDefault(),this.#o||this.#d())};#d(){let t=document.activeElement,s=(t&&this.#t.contains(t)?t:this.#t).getBoundingClientRect();this.#m(s.left,s.bottom)}#m(t,i){let s=document.activeElement;this.#c=s&&this.#t.contains(s)?s:this.#t,this.#o=!0,this.setAttribute("data-open",""),this.#a&&this.#t?.setAttribute("aria-expanded","true"),this.#i.style.top=`${i}px`,this.#i.style.left=`${t}px`,this.#i.show(),requestAnimationFrame(()=>{let n=this.#i.getBoundingClientRect(),r=t+n.width>window.innerWidth?t-n.width:t,a=i+n.height>window.innerHeight?i-n.height:i;this.#i.style.top=`${Math.max(0,a)}px`,this.#i.style.left=`${Math.max(0,r)}px`}),this.#s=-1,this.#A(0),this.dispatchEvent(new CustomEvent("context-menu:open",{bubbles:!0}))}close(){if(!this.#o)return;let t=this.#h();this.#o=!1,this.removeAttribute("data-open"),this.#a&&this.#t?.setAttribute("aria-expanded","false"),this.#s=-1,this.#i?.hide(),t&&this.#E(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0}))}#h(){let t=document.activeElement;return!t||t===document.body||!!this.#i?.contains(t)}#E(){let t=this.#c?.isConnected?this.#c:this.#t;this.#c=null,t?.isConnected&&t.focus({preventScroll:!0})}#y=t=>{switch(t.key){case"ArrowDown":case"Down":t.preventDefault(),this.#A(this.#s+1);break;case"ArrowUp":case"Up":t.preventDefault(),this.#A(this.#s-1);break;case"Home":t.preventDefault(),this.#A(0);break;case"End":t.preventDefault(),this.#A(this.#n.length-1);break;case"Enter":case" ":{t.preventDefault();let i=this.#n[this.#s];i&&!Di(i)&&i.click();break}case"Tab":this.close();break}};#x=t=>{let i=t.target.closest?.('button, a, [role="menuitem"]');i&&this.#e.contains(i)&&Di(i)&&(t.preventDefault(),t.stopPropagation())};#g=t=>{let i=t.currentTarget;Di(i)||(this.close(),this.dispatchEvent(new CustomEvent("context-menu:select",{bubbles:!0,detail:{item:i,value:i.getAttribute("data-value")||void 0}})))};#S=()=>{this.#o&&(this.#o=!1,this.removeAttribute("data-open"),this.#a&&this.#t?.setAttribute("aria-expanded","false"),this.#s=-1,this.#h()&&this.#E(),this.dispatchEvent(new CustomEvent("context-menu:close",{bubbles:!0})))};#w=()=>{this.#o&&this.close()};#A(t){this.#n.length!==0&&(t<0&&(t=this.#n.length-1),t>=this.#n.length&&(t=0),this.#s=t,this.#n[t].focus())}get isOpen(){return this.#o}};w("context-menu",Jn);Vt();var fl=10,ev=new Set(["replace","append","prepend"]),iv="Failed to load content",Zn=class extends E{#t;#e;#i=null;#n=!1;#s=null;#o="";#r=!1;#a=null;setup(){let t=this.getAttribute("src");return t?(this.#r=!0,this.#i===null&&(this.#i=this.innerHTML),this.#n&&this.#s===t||this.#l(t),!0):!1}teardown(){this.#r=!1,this.#t?.disconnect(),this.hasAttribute("data-loading")&&(this.#e?.abort(),this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"))}get src(){return this.getAttribute("src")||""}set src(t){let i=t==null?"":String(t);this.src!==i&&(i?this.setAttribute("src",i):this.removeAttribute("src"),this.dispatchEvent(new CustomEvent("include-file:src-changed",{detail:{src:i,source:"property"},bubbles:!0})))}static get observedAttributes(){return["src"]}attributeChangedCallback(t,i,s){if(!(t!=="src"||!s||i===s)){if(!this.#r){queueMicrotask(()=>{!this.#r&&this.isConnected&&this.getAttribute("src")&&this._reinit()});return}this.#l(s)}}#l(t){this.hasAttribute("lazy")&&!this.#c()?this.#b():this.#d(t)}#c(){let t=this.getBoundingClientRect();return t.top<window.innerHeight+200&&t.bottom>-200}#b(){this.#t?.disconnect(),this.#t=new IntersectionObserver(t=>{for(let i of t)if(i.isIntersecting){this.#t.disconnect();let s=this.getAttribute("src");s&&this.#d(s)}},{rootMargin:"200px"}),this.#t.observe(this)}#f(t){let i;try{i=new URL(t,document.baseURI)}catch{throw new Error(`Invalid URL: ${t}`)}if(i.protocol!=="http:"&&i.protocol!=="https:")throw new Error(`Refused ${i.protocol} URL: only http(s) is allowed`);return this.#u(i.href),i.href}#u(t){if(!this.hasAttribute("allow-cross-origin")&&new URL(t).origin!==location.origin)throw new Error(`Refused cross-origin URL ${t} (add allow-cross-origin to permit)`)}#p(t){let i=0,s=this.parentElement?.closest("include-file");for(;s;){if(#o in s&&(i++,s.#o===t))throw new Error(`Refused include cycle: ${t} is already included by an ancestor`);s=s.parentElement?.closest("include-file")}if(i>=fl)throw new Error(`Refused include: nesting deeper than ${fl}`)}#v(){let t=this.getAttribute("mode")||"replace";return ev.has(t)?t:(console.warn(`<include-file>: unknown mode "${t}", using "replace"`),"replace")}async#d(t){this.#e?.abort();let i=new AbortController;this.#e=i,this.#h(),this.setAttribute("data-loading",""),this.setAttribute("aria-busy","true"),this.removeAttribute("data-loaded"),this.removeAttribute("data-error");try{let s=this.#f(t);this.#p(s),this.#o=s;let n=await fetch(s,{signal:i.signal});if(n.url&&this.#u(n.url),!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);let r=await n.text();if(i.signal.aborted)return;let a=this.hasAttribute("trusted");this.hasAttribute("allow-scripts")&&!a&&console.warn("<include-file>: allow-scripts is ignored without trusted");let o=a&&this.hasAttribute("allow-scripts"),c;if(a){let f=document.createElement("template");f.innerHTML=r,c=f.content}else c=mi(r,{allowIncludeFile:!0,keepIds:!0,keepStyle:!0});let l=document.createElement("template");l.content.append(c.cloneNode(!0));let u=l.innerHTML,d=[...c.querySelectorAll("script")];o||d.forEach(f=>f.remove());let h=this.#v();h==="replace"?this.replaceChildren(c):h==="append"?this.append(c):this.prepend(c);for(let f of o?d:[]){let p=document.createElement("script");for(let m of f.attributes)p.setAttribute(m.name,m.value);p.textContent=f.textContent,f.replaceWith(p)}this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.setAttribute("data-loaded",""),this.#n=!0,this.#s=t,this.dispatchEvent(new CustomEvent("include-file:loaded",{bubbles:!0,detail:{src:t,url:s,html:u}}))}catch(s){if(s.name==="AbortError"||i.signal.aborted)return;this.#m(t,s)}}#m(t,i){if(this.removeAttribute("data-loading"),this.removeAttribute("aria-busy"),this.setAttribute("data-error",""),this.#v()==="replace"&&this.#i!==null&&!this.#n&&(this.innerHTML=this.#i),!this.textContent.trim()&&!this.children.length){let s=document.createElement("p");s.setAttribute("role","alert"),s.setAttribute("data-include-error",""),s.textContent=this.getAttribute("data-label-error")||iv,this.append(s),this.#a=s}this.dispatchEvent(new CustomEvent("include-file:error",{bubbles:!0,detail:{src:t,error:i.message}}))}#h(){this.#a?.parentNode===this&&this.#a.remove(),this.#a=null}reload(){let t=this.getAttribute("src");t&&this.#d(t)}};w("include-file",Zn);it();var pl="environment",ml="preferences",Qn={timeOfDay:!1,seasonal:!1},sv=900*1e3,bt={...Qn};function Mt(e,t,i){return e+(t-e)*Math.min(1,Math.max(0,i))}var Qt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let e=await S.get(pl,ml);bt=e?{...Qn,...e}:{...Qn},(bt.timeOfDay||bt.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...bt}},save(e){return bt={...bt,...e},S.set(pl,ml,bt).catch(()=>{}),{...bt}},setTimeOverride(e){this._timeOverride=e,this._hasActiveSource()&&this._update()},setMonthOverride(e){this._monthOverride=e,this._hasActiveSource()&&this._update()},setSource(e,t){let i=this.save({[e]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(i)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(e){let t=e||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent");let t=e.getAttribute("data-theme");if(t){let i=`[data-theme~="${t}"]`;for(let s of document.styleSheets)try{for(let n=0;n<s.cssRules.length;n++){let r=s.cssRules[n];if(r.selectorText?.includes(i)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let e=this.load(),t=0;e.timeOfDay&&(t+=this._getTimeOfDayOffset()),e.seasonal&&(t+=this._getSeasonalOffset());let i=document.documentElement;t!==0&&this._baseHues?(i.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),i.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),i.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let e=document.documentElement;e.style.removeProperty("--hue-primary"),e.style.removeProperty("--hue-secondary"),e.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let e=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return e<5?-20:e<7?Mt(-20,20,(e-5)/2):e<10?Mt(20,5,(e-7)/3):e<14?Mt(5,0,(e-10)/4):e<17?Mt(0,-5,(e-14)/3):e<19?Mt(-5,15,(e-17)/2):e<21?Mt(15,-10,(e-19)/2):Mt(-10,-20,(e-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let e=this._monthOverride??new Date().getMonth(),i=this._getHemisphere()==="south"?(e+6)%12:e;return i>=2&&i<=4?5:i>=5&&i<=7?10:i>=8&&i<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),sv))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var Ii=null;function gl(){return"0.7.2-e7af00922"}function nv(){let e=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let i of e){let s=i.getAttribute("src");if(s){let n=s.lastIndexOf("/");if(n!==-1){t=s.slice(0,n)+"/sw.js";break}}}return t}function vl(){return Ii||(Ii=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),Ii}function yl(e){return new Promise((t,i)=>{navigator.serviceWorker?.controller?bl(navigator.serviceWorker.controller,e,t,i):vl().then(s=>{let n=s.active||s.waiting||s.installing;n?bl(n,e,t,i):i(new Error("No active service worker"))}).catch(i)})}function bl(e,t,i,s){let n=new MessageChannel;n.port1.onmessage=r=>i(r.data),n.port1.onmessageerror=()=>s(new Error("Message error")),e.postMessage({type:t},[n.port2]),setTimeout(()=>s(new Error("SW message timeout")),5e3)}async function wl(){return yl("GET_STATUS")}async function Al(){return yl("CLEAR_CACHE")}async function El(){let e=await vl();return await e.update(),{updated:!!e.waiting}}function rv(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(rv()){let e=nv();window.addEventListener("load",()=>{Ii=navigator.serviceWorker.register(e).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}it();Sn();var te=null,tt="settings",Pi={motionFx:!0,sounds:!1,charShortcuts:!0},rr=()=>({...Pi,charShortcuts:Tt()}),lv=document.documentElement.hasAttribute("data-sticky"),ar=null,uv={trigger:"Site settings",dialog:"Site settings",title:"Settings",close:"Close settings",appearance:"Appearance","color-mode":"Color mode","mode-auto":"Auto","mode-light":"Light","mode-dark":"Dark",theme:"Theme",accessibility:"Accessibility","high-contrast":"High Contrast","large-text":"Large Text",dyslexia:"Dyslexia-Friendly","char-shortcuts":"Single-Key Shortcuts",layout:"Layout",fluid:"Fluid Scaling",density:"Density","density-compact":"Compact","density-default":"Default","density-spacious":"Spacious",backdrop:"Canvas Backdrop","backdrop-style":"Style","backdrop-default":"Default","backdrop-flush":"Flush","backdrop-elevated":"Elevated",chrome:"Chrome","chrome-card":"Card","chrome-stretch":"Stretch","chrome-integrated":"Integrated","fixed-header":"Fixed Header","page-bg":"Page Background","page-bg-default":"Theme Default","page-bg-color":"Solid Color","page-bg-gradient":"Gradient","bg-color":"Color","grad-start":"Start","grad-end":"End","grad-direction":"Direction","dir-to-bottom":"Top \u2192 Bottom","dir-to-right":"Left \u2192 Right","dir-135deg":"Diagonal \u2198","dir-45deg":"Diagonal \u2197",sticky:"Sticky Navigation",effects:"Effects",motion:"Motion Effects",sounds:"Sound Effects",environment:"Environment","time-of-day":"Time-of-Day Shifts",seasonal:"Seasonal Tinting",system:"System","sw-label":"Service Worker:","sw-checking":"checking\u2026","sw-unsupported":"Not supported","sw-active":"Active ({n} cached files)","sw-unregistered":"Not registered","clear-cache":"Clear Cache",clearing:"Clearing\u2026",cleared:"Cache cleared","check-update":"Check for Updates",checking:"Checking\u2026","update-available":"Update available","up-to-date":"Up to date",failed:"Failed",reset:"Reset to Defaults","reset-confirm":"Reset all settings to defaults?","reset-yes":"Reset","reset-cancel":"Cancel","reset-done":"Settings reset to defaults"},dv='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>';function vt(e){return String(e).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}async function or(e){let t=document.documentElement;e?t.dataset.sticky="":delete t.dataset.sticky;try{let i=await Promise.resolve().then(()=>(sr(),kl));e?i.initStickyManager():i.destroyStickyManager()}catch{}}var cr=class extends E{#t=null;#e=null;#i=!1;#n=!1;#s=0;#o="";#r=new Set;#a=[];#l=[];#c={...Pi,charShortcuts:Tt()};#b=document.documentElement.hasAttribute("data-sticky");setup(){let t=++this.#s;return this.#o||=crypto.randomUUID().slice(0,8),this.#M(),this.#_(),this.#J(),this.listen(window,"vb:theme-change",this.#U),this.listen(window,"vb:extensions-change",this.#U),this.listen(window,"vb:a11y-themes-change",this.#U),this.#n&&(this.#n=!1,this.open()),this.#v().then(()=>{this.#f(t)&&this.#J()}),!0}teardown(){this.#s++;for(let i of this.#a)clearTimeout(i);this.#a=[],this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false");let t=!!this.#e?.contains(document.activeElement);this.#e?.remove(),t&&this.#t?.isConnected&&this.#t.focus(),this.#e=null}#f(t){return t===this.#s&&this.isConnected}#u(t,i={}){let s=this.getAttribute(`data-label-${t}`)??uv[t]??t;for(let[n,r]of Object.entries(i))s=s.replaceAll(`{${n}}`,String(r));return s}#p(t){return vt(this.#u(t))}get data(){return{a11yThemes:[...this.#l],extensions:{...this.#c},sticky:this.#b}}set data(t){if(!t||typeof t!="object")return;let i=[],s=[];Array.isArray(t.a11yThemes)&&(this.#l=t.a11yThemes.map(String),s.push("a11y"),i.push(S.set(tt,"a11y",this.#l)),this.#H(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[...this.#l]}))),t.extensions&&typeof t.extensions=="object"&&(this.#c={...rr(),...t.extensions},s.push("extensions"),i.push(S.set(tt,"extensions",this.#c)),this.#nt()),t.sticky!=null&&(this.#b=!!t.sticky,s.push("sticky"),i.push(S.set(tt,"sticky",this.#b?"on":"off")),or(this.#b));for(let n of s)this.#r.add(n);this.#e&&this.#J(),Promise.allSettled(i).then(()=>{for(let n of s)this.#r.delete(n);this.#e&&this.#J(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#v(){let[t,i,s]=await Promise.all([S.get(tt,"a11y"),S.get(tt,"extensions"),S.get(tt,"sticky")]);ar===null&&(ar=lv&&s!=="on"),this.#r.has("a11y")||(this.#l=Array.isArray(t)?t:[]),this.#r.has("extensions")||(this.#c={...rr(),...i??{}}),this.#r.has("sticky")||(this.#b=document.documentElement.hasAttribute("data-sticky"))}#d(t){return t!==""&&t!==void 0}#m(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#h(t,i){return t?i==="compact"?"compact":i==="spacious"?"spacious":"default":""}#E(t){return t!==""&&t!==void 0}#y(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#x(t,i){return t?i==="flush"?"flush":i==="elevated"?"elevated":"default":""}#g(t){if(!t)return"card";let i=t.split(/\s+/);for(let s of i)if(s==="stretch"||s==="integrated")return s;return"card"}#S(t){return t?t.split(/\s+/).includes("fixed"):!1}#w(t,i){let s=[];return t&&t!=="card"&&s.push(t),i&&s.push("fixed"),s.join(" ")||"card"}#A(t){return this.#e?.querySelector(t)??null}#M(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.setAttribute("type","button"),this.#t.setAttribute("data-trigger",""),this.#t.setAttribute("data-minted",""),this.#t.className="settings-trigger",this.#t.innerHTML=dv,this.prepend(this.#t)),this.#t.hasAttribute("data-minted")&&this.#t.setAttribute("aria-label",this.#u("trigger")),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#e=document.createElement("div"),this.#e.className="settings-panel",this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label",this.#u("dialog")),this.#e.tabIndex=-1;let t=`settings-panel-${this.#o}`;this.#e.id=t,this.#t.setAttribute("aria-controls",t),this.#e.innerHTML=this.#k(),this.appendChild(this.#e)}#k(){let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:u}=_.getState(),d=[...this.#l],h={...this.#c},f=Qt.load(),p=this.#d(s),m=this.#m(s),b=this.#E(n),g=this.#y(n),A=this.#o,y=L=>this.#p(L),O=(L,N,V,be,et,Ft={})=>`
|
|
288
288
|
<fieldset data-segmented>
|
|
289
289
|
<legend class="visually-hidden">${N}</legend>
|
|
290
290
|
${V.map(ot=>`
|
|
291
291
|
<label>
|
|
292
|
-
<input type="radio" name="settings-${L}-${A}" data-field="${L}" value="${ot}" ${
|
|
293
|
-
${
|
|
292
|
+
<input type="radio" name="settings-${L}-${A}" data-field="${L}" value="${ot}" ${be===ot?"checked":""} />
|
|
293
|
+
${Ft[ot]?`<icon-wc name="${Ft[ot]}" size="xs"></icon-wc> `:""}${y(`${et}-${ot}`)}
|
|
294
294
|
</label>
|
|
295
295
|
`).join("")}
|
|
296
296
|
</fieldset>`,M=(L,N,V)=>`
|
|
297
297
|
<label class="toggle-row">
|
|
298
298
|
<span>${y(L)}</span>
|
|
299
299
|
<input type="checkbox" name="settings-${L}-${A}" data-switch="s" ${N} ${V?"checked":""} />
|
|
300
|
-
</label>`,
|
|
300
|
+
</label>`,J=[["to bottom","dir-to-bottom"],["to right","dir-to-right"],["135deg","dir-135deg"],["45deg","dir-45deg"]];return`
|
|
301
301
|
<header class="settings-header">
|
|
302
302
|
<strong>${y("title")}</strong>
|
|
303
303
|
<button type="button" class="settings-close" aria-label="${y("close")}">
|
|
@@ -310,11 +310,11 @@ svg {
|
|
|
310
310
|
<summary>${y("appearance")}</summary>
|
|
311
311
|
<div class="settings-section">
|
|
312
312
|
<span class="settings-label" aria-hidden="true">${y("color-mode")}</span>
|
|
313
|
-
${
|
|
313
|
+
${O("mode",y("color-mode"),["auto","light","dark"],t,"mode",{auto:"monitor",light:"sun",dark:"moon"})}
|
|
314
314
|
|
|
315
315
|
<label class="settings-label" for="settings-theme-${A}">${y("theme")}</label>
|
|
316
316
|
<select id="settings-theme-${A}" name="settings-theme-${A}" data-field="theme">
|
|
317
|
-
${
|
|
317
|
+
${Yo.map(L=>`
|
|
318
318
|
<optgroup label="${vt(L.label)}">
|
|
319
319
|
${L.themes.map(N=>`
|
|
320
320
|
<option value="${vt(N.id)}" ${i===N.id?"selected":""}>${vt(N.name)}</option>
|
|
@@ -341,17 +341,17 @@ svg {
|
|
|
341
341
|
${M("fluid","data-fluid-toggle",p)}
|
|
342
342
|
<div class="density-row" ${p?"":"hidden"}>
|
|
343
343
|
<span class="settings-label" aria-hidden="true">${y("density")}</span>
|
|
344
|
-
${
|
|
344
|
+
${O("density",y("density"),["compact","default","spacious"],m,"density")}
|
|
345
345
|
</div>
|
|
346
346
|
|
|
347
347
|
${M("backdrop","data-backdrop-toggle",b)}
|
|
348
348
|
<div class="backdrop-row" ${b?"":"hidden"}>
|
|
349
349
|
<span class="settings-label" aria-hidden="true">${y("backdrop-style")}</span>
|
|
350
|
-
${
|
|
350
|
+
${O("backdrop",y("backdrop-style"),["default","flush","elevated"],g,"backdrop")}
|
|
351
351
|
</div>
|
|
352
352
|
<div class="backdrop-row" ${b?"":"hidden"}>
|
|
353
353
|
<span class="settings-label" aria-hidden="true">${y("chrome")}</span>
|
|
354
|
-
${
|
|
354
|
+
${O("chrome",y("chrome"),["card","stretch","integrated"],this.#g(r),"chrome")}
|
|
355
355
|
</div>
|
|
356
356
|
<div class="backdrop-row" ${b?"":"hidden"}>
|
|
357
357
|
${M("fixed-header","data-backdrop-fixed",this.#S(r))}
|
|
@@ -377,7 +377,7 @@ svg {
|
|
|
377
377
|
<div class="page-bg-grad-dir-row backdrop-row" ${a==="gradient"&&b?"":"hidden"}>
|
|
378
378
|
<label class="settings-label" for="settings-grad-dir-${A}">${y("grad-direction")}</label>
|
|
379
379
|
<select id="settings-grad-dir-${A}" name="settings-grad-dir-${A}" data-field="grad-dir">
|
|
380
|
-
${
|
|
380
|
+
${J.map(([L,N])=>`<option value="${L}" ${(u||"to bottom")===L?"selected":""}>${y(N)}</option>`).join("")}
|
|
381
381
|
</select>
|
|
382
382
|
</div>
|
|
383
383
|
|
|
@@ -404,7 +404,7 @@ svg {
|
|
|
404
404
|
<details name="settings-${A}">
|
|
405
405
|
<summary>${y("system")}</summary>
|
|
406
406
|
<div class="settings-section system-info">
|
|
407
|
-
<p class="system-version">Vanilla Breeze <code>v${vt(
|
|
407
|
+
<p class="system-version">Vanilla Breeze <code>v${vt(gl())}</code></p>
|
|
408
408
|
<p class="system-sw-status" data-sw-status role="status">${y("sw-label")} <span>${y("sw-checking")}</span></p>
|
|
409
409
|
<footer class="system-actions">
|
|
410
410
|
<button type="button" data-action="clear-cache">${y("clear-cache")}</button>
|
|
@@ -423,44 +423,44 @@ svg {
|
|
|
423
423
|
</p>
|
|
424
424
|
</footer>
|
|
425
425
|
<p class="visually-hidden" data-live role="status"></p>
|
|
426
|
-
`}#N(){let t=this.#e;this.listen(this.#t,"click",this.#_),this.listen(document,"click",this.#P),this.listen(this,"keydown",this.#O),this.listen(this,"focusout",this.#V),t.querySelector(".settings-close")?.addEventListener("click",()=>this.close()),t.querySelectorAll('input[data-field="mode"]').forEach(i=>i.addEventListener("change",this.#$)),this.#A('[data-field="theme"]')?.addEventListener("change",this.#K),this.#A("input[data-fluid-toggle]")?.addEventListener("change",this.#M),t.querySelectorAll('input[data-field="density"]').forEach(i=>i.addEventListener("change",this.#T)),this.#A("input[data-backdrop-toggle]")?.addEventListener("change",this.#B),t.querySelectorAll('input[data-field="backdrop"]').forEach(i=>i.addEventListener("change",this.#et)),t.querySelectorAll('input[data-field="chrome"]').forEach(i=>i.addEventListener("change",this.#I)),this.#A("input[data-backdrop-fixed]")?.addEventListener("change",this.#C),this.#A("input[data-sticky-toggle]")?.addEventListener("change",this.#q),this.#A('[data-field="page-bg"]')?.addEventListener("change",this.#Z),this.#A('[data-field="page-bg-color"]')?.addEventListener("input",this.#D),this.#A('[data-field="grad-start"]')?.addEventListener("input",this.#D),this.#A('[data-field="grad-end"]')?.addEventListener("input",this.#D),this.#A('[data-field="grad-dir"]')?.addEventListener("change",this.#D),t.querySelectorAll("input[data-a11y]").forEach(i=>i.addEventListener("change",this.#U)),t.querySelectorAll("input[data-ext]").forEach(i=>i.addEventListener("change",this.#H)),t.querySelectorAll("input[data-env]").forEach(i=>i.addEventListener("change",this.#Q)),this.#A(".settings-reset")?.addEventListener("click",this.#Y),this.#A('[data-action="reset-confirm"]')?.addEventListener("click",this.#it),this.#A('[data-action="reset-cancel"]')?.addEventListener("click",()=>this.#F(!0)),this.#A('[data-action="clear-cache"]')?.addEventListener("click",this.#ot),this.#A('[data-action="check-update"]')?.addEventListener("click",this.#ct),this.#rt(this.#s)}#_=t=>{t.stopPropagation(),this.toggle()};#P=t=>{this.#i&&!this.contains(t.target)&&this.close()};#O=t=>{t.key==="Escape"&&!t.defaultPrevented&&this.#i&&(t.preventDefault(),this.close())};#V=t=>{if(!this.#i)return;let i=t.relatedTarget;i&&!this.contains(i)&&this.close()};#$=t=>{_.setMode(t.target.value)};#K=async t=>{let i=t.target;i.disabled=!0;try{await _.setBrand(i.value),this.#R()}catch{console.warn("[VB] Theme load failed, using default")}finally{i.disabled=!1}};#M=t=>{let i=t.target.checked,s=this.#m(_.getState().fluid)||"default";_.setFluid(this.#h(i,s)),this.#X(i)};#T=t=>{_.setFluid(this.#h(!0,t.target.value))};#B=t=>{let i=t.target.checked,s=this.#y(_.getState().backdrop)||"default";_.setBackdrop(this.#x(i,s)),this.#j(i)};#et=t=>{_.setBackdrop(this.#x(!0,t.target.value))};#I=t=>{let i=this.#S(_.getState().backdropChrome);_.setBackdropChrome(this.#w(t.target.value,i))};#C=t=>{let i=this.#g(_.getState().backdropChrome);_.setBackdropChrome(this.#w(i,t.target.checked))};#q=t=>{let i=t.target.checked;this.#b=i,S.set(tt,"sticky",i?"on":"off").catch(()=>{}),ir(i)};#G(){let t=this.#A('[data-field="page-bg"]')?.value||"";return t==="color"?{type:t,color:this.#A('[data-field="page-bg-color"]')?.value||"#1a1a2e"}:t==="gradient"?{type:t,gradStart:this.#A('[data-field="grad-start"]')?.value||"#1a1a2e",gradEnd:this.#A('[data-field="grad-end"]')?.value||"#16213e",gradDir:this.#A('[data-field="grad-dir"]')?.value||"to bottom"}:null}#Z=t=>{this.#J(t.target.value),_.setPageBg(this.#G()??{})};#D=()=>{let t=this.#G();t&&_.setPageBg(t)};#U=t=>{let i=t.target.dataset.a11y,s=[...this.#l];if(t.target.checked&&!s.includes(i))s.push(i);else if(!t.target.checked){let n=s.indexOf(i);n!==-1&&s.splice(n,1)}this.#st(s),this.#R(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[...s]}))};#H=t=>{let i=t.target.dataset.ext;this.#c={...this.#c,[i]:t.target.checked},S.set(tt,"extensions",this.#c).catch(()=>{}),this.#tt()};#Q=t=>{Zt.setSource(t.target.dataset.env,t.target.checked)};#Y=()=>{let t=this.#A(".settings-reset-confirm"),i=this.#A(".settings-reset");!t||!i||(t.hidden=!1,i.hidden=!0,this.#A('[data-action="reset-cancel"]')?.focus())};#F(t=!1){let i=this.#A(".settings-reset-confirm"),s=this.#A(".settings-reset");i&&(i.hidden=!0),s&&(s.hidden=!1,t&&s.focus())}#it=()=>{let t=["a11y","extensions","sticky"];for(let i of t)this.#r.add(i);setTimeout(()=>{for(let i of t)this.#r.delete(i)},0),_.reset(),this.#st([]),this.#R(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[]})),this.#c={...Oi,charShortcuts:Oc()},S.remove(tt,"extensions").catch(()=>{}),this.#tt(),this.#b=!!er,S.remove(tt,"sticky").catch(()=>{}),ir(this.#b),Zt.setSource("timeOfDay",!1),Zt.setSource("seasonal",!1),this.#F(!0),this.#W(),this.#nt(this.#u("reset-done"))};#z=t=>{if(t.type==="vb:a11y-themes-change"&&Array.isArray(t.detail))this.#l=t.detail.map(String);else if(t.type==="vb:extensions-change"&&t.detail&&typeof t.detail=="object")this.#c={...tr(),...t.detail};else if(t.type==="vb:theme-change"){let i=this.#s;this.#v().then(()=>{this.#f(i)&&this.#W()})}this.#W()};#W(){if(!this.#e)return;let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:u}=_.getState(),d=this.#l,h=this.#c,f=this.#d(s),p=this.#m(s),m=this.#E(n),b=this.#y(n),g=this.#e,A=(L,N)=>{let V=this.#A(L);V&&(V.checked=N)},y=(L,N)=>{let V=this.#A(L);V&&N&&(V.value=N)};A(`input[data-field="mode"][value="${t}"]`,!0);let $=this.#A('[data-field="theme"]');$&&($.value=i||"default"),A("input[data-fluid-toggle]",f),A(`input[data-field="density"][value="${p}"]`,!0),this.#X(f),A("input[data-backdrop-toggle]",m),A(`input[data-field="backdrop"][value="${b}"]`,!0),A(`input[data-field="chrome"][value="${this.#g(r)}"]`,!0),A("input[data-backdrop-fixed]",this.#S(r)),this.#j(m);let M=this.#A('[data-field="page-bg"]');M&&(M.value=a||""),y('[data-field="page-bg-color"]',o),y('[data-field="grad-start"]',c),y('[data-field="grad-end"]',l),y('[data-field="grad-dir"]',u),m&&this.#J(a||""),g.querySelectorAll("input[data-a11y]").forEach(L=>{let N=L;N.checked=d.includes(N.dataset.a11y||"")}),g.querySelectorAll("input[data-ext]").forEach(L=>{let N=L,V=N.dataset.ext;N.checked=h[V]??Oi[V]}),A("input[data-sticky-toggle]",this.#b);let X=Zt.load();g.querySelectorAll("input[data-env]").forEach(L=>{let N=L;N.checked=X[N.dataset.env]??!1})}#X(t){let i=this.#A(".density-row");i&&(i.hidden=!t)}#j(t){this.#e?.querySelectorAll(".backdrop-row").forEach(i=>{i.hidden=!t}),t&&this.#J(this.#A('[data-field="page-bg"]')?.value||"")}#J(t){let i=this.#A(".page-bg-color-row"),s=this.#A(".page-bg-grad-row"),n=this.#A(".page-bg-grad-dir-row");i&&(i.hidden=t!=="color"),s&&(s.hidden=t!=="gradient"),n&&(n.hidden=t!=="gradient")}#st(t){this.#l=[...t],S.set(tt,"a11y",this.#l).catch(()=>{})}#R(){let t=[...this.#l],{brand:i}=_.getState(),s=document.documentElement,n=i!=="default"?[i,...t]:[...t];n.length?s.dataset.theme=n.join(" "):delete s.dataset.theme}async#tt(){let t={...this.#c},i=document.documentElement;t.motionFx?delete i.dataset.motionReduced:i.dataset.motionReduced="",Ic(t.charShortcuts!==!1),t.sounds?(Qt||(Qt=(await Promise.resolve().then(()=>(kl(),xl))).SoundManager),Qt.init(),Qt.enable()):Qt&&Qt.disable(),window.dispatchEvent(new CustomEvent("vb:extensions-change",{detail:t}))}#nt(t){let i=this.#A("[data-live]");i&&(i.textContent="",requestAnimationFrame(()=>{i.textContent=t}))}async#rt(t){let i=this.#A("[data-sw-status] span");if(i){if(!("serviceWorker"in navigator)){i.textContent=this.#u("sw-unsupported");return}try{let s=await gl();if(!this.#f(t))return;let n=s.cachedURLs?.length??0;i.textContent=this.#u("sw-active",{n})}catch{this.#f(t)&&(i.textContent=this.#u("sw-unregistered"))}}}async#at(t,i,s,n){let r=this.#s;t.disabled=!0,t.textContent=this.#u(s);let a;try{a=await n()}catch{a=this.#u("failed")}this.#f(r)&&(t.textContent=a,this.#nt(a),this.#a.push(setTimeout(()=>{t.textContent=this.#u(i),t.disabled=!1},2e3)))}#ot=t=>{let i=this.#s;this.#at(t.currentTarget,"clear-cache","clearing",async()=>(await vl(),this.#rt(i),this.#u("cleared")))};#ct=t=>{this.#at(t.currentTarget,"check-update","checking",async()=>{let{updated:i}=await yl();return this.#u(i?"update-available":"up-to-date")})};open(){if(!this.#e){this.#n=!0;return}this.#i||(this.#i=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#W(),this.#lt(),this.#e.focus({preventScroll:!0}))}#lt(){let t=this.getBoundingClientRect(),i=this.#e;i.style.removeProperty("top"),i.style.removeProperty("bottom"),i.style.removeProperty("left"),i.style.removeProperty("right");let s=i.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,a=t.top,o=r-t.bottom;a<s.height&&o>a?(i.style.top="calc(100% + 8px)",i.style.bottom="auto"):(i.style.bottom="calc(100% + 8px)",i.style.top="auto");let c=n-t.right,l=t.left,u=s.width;t.right<u&&l<c?(i.style.left="0",i.style.right="auto"):(i.style.right="0",i.style.left="auto")}close(){if(this.#n=!1,!this.#i)return;let t=!!this.#e?.contains(document.activeElement);this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#F(),t&&this.#t?.isConnected&&this.#t.focus()}toggle(){this.#i?this.close():this.open()}};w("settings-panel",sr);it();te();lt();var lv={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"},uv={trigger:"Notifications",unread:"{n} unread",title:"Notifications","mark-all":"Mark all read",close:"Close notifications",tabs:"Notification categories",all:"All",watching:"Watching",empty:"No notifications","watch-empty":"You aren\u2019t watching any pages yet. Use the \u201CWatch\u201D button on a page to start.","last-checked":"Last checked: {date}",never:"\u2014",changed:"Changed",unwatch:"Unwatch {title}",new:"New notification",added:"New notification: {title}. {n} unread","variant-info":"Information:","variant-success":"Success:","variant-warning":"Warning:","variant-error":"Error:"};function O(e){return String(e??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}function Ll(e){if(typeof e!="string"||!e.trim())return null;try{let{protocol:t}=new URL(e,location.href);return t==="http:"||t==="https:"?e:null}catch{return null}}function Nl(e,t){let i=new Date(e);if(Number.isNaN(i.getTime()))return String(e);let n=/^\d{4}-\d{2}-\d{2}$/.test(e)?{dateStyle:"medium",timeZone:"UTC"}:{dateStyle:"medium",timeStyle:"short"};try{return new Intl.DateTimeFormat(t||void 0,n).format(i)}catch{return new Intl.DateTimeFormat(void 0,n).format(i)}}var dv=0,rr=class extends E{static observedAttributes=["variant","position"];#t="panel";#e=0;#i=null;#n=null;#s=null;#o=null;#r=new Set;#a=[];#l=!1;#c=null;#b=new Set;#f="all";#u=[];#p=[];#v=new Set;#d=!1;#m=!1;#h=null;setup(){let t=++this.#e;return this.#t=this.getAttribute("mode")==="banner"?"banner":"panel",this.#t==="banner"?this.#S(t):(this.#m&&(this.removeAttribute("role"),this.#m=!1),this.#_(t)),!0}teardown(){this.#e++,this.#d=!1,this.#c!=null&&(clearInterval(this.#c),this.#c=null),this.#l&&(this.#l=!1,this.#tt(),this.#s&&(this.#s.hidden=!0),this.#i?.setAttribute("aria-expanded","false"))}attributeChangedCallback(t,i,s){i===s||this.#t!=="banner"||!this.hasAttribute("data-upgraded")||(t==="variant"&&(this.dataset.variant=s||"info",this.#A(),this.#w()),t==="position"&&(this.dataset.position=s||"top"))}#E(t){return t===this.#e&&this.isConnected}#y(t,i={}){let s=this.getAttribute(`data-label-${t}`)??uv[t]??t;for(let[n,r]of Object.entries(i))s=s.replaceAll(`{${n}}`,String(r));return s}#x(){let t=(this.getAttribute("toast-new")||"").trim(),i=null;if(t){try{i=document.querySelector(t)}catch{i=null}i&&i.localName!=="toast-msg"&&(i=null)}return i??document.querySelector("toast-msg")}#g(){return this.closest("[lang]")?.lang||document.documentElement.lang||void 0}get notifications(){return[...this.#a]}set notifications(t){this.#t==="panel"&&(this.#a=Array.isArray(t)?t:[],this.#M(),this.dispatchEvent(new CustomEvent("notification-wc:notifications-changed",{detail:{notifications:this.#a,source:"property"},bubbles:!0})))}async#S(t){let i=this.getAttribute("persist");if(i||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",this.#A(),this.#w(),this.listen(this,"focusin",this.#k),i){let n=Number(this.getAttribute("expires")??""),r=Number.isFinite(n)&&n>0?n*864e5:void 0,a=await S.get("notifications",i,r?{maxAge:r}:void 0);if(!this.#E(t))return;if(a&&a.dismissed){this.hidden=!0;return}}let s=this.querySelector('[value="dismiss"], [data-dismiss]');s&&this.listen(s,"click",this.#L)}#w(){this.setAttribute("role",this.dataset.variant==="error"?"alert":"status"),this.#m=!0}#A(){let t=this.dataset.variant||"info",i=this.querySelector(":scope [data-variant-prefix]");i||(i=document.createElement("span"),i.className="visually-hidden",i.setAttribute("data-variant-prefix",""),(this.querySelector(":scope > :is(p, strong, span, h2, h3, h4)")||this).prepend(i)),i.textContent=`${this.#y(`variant-${t}`)} `}#L=async t=>{t.preventDefault();let i=this.contains(document.activeElement),s=this.getAttribute("persist");this.hidden=!0,i&&this.#N(),s&&await S.set("notifications",s,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:s}}))};#k=t=>{let i=t.relatedTarget;i&&!this.contains(i)&&(this.#h=i)};#N(){let t=o=>!!o?.isConnected&&(typeof o.checkVisibility!="function"||o.checkVisibility()),i=[...document.querySelectorAll('notification-wc[mode="banner"]')],s=i.indexOf(this),n=[...i.slice(s+1),...i.slice(0,s).reverse()];for(let o of n){if(!t(o))continue;let c=o.querySelector("a[href], button:not([disabled])");if(c&&(c.focus({preventScroll:!0}),document.activeElement===c))return}let r=this.#h;if(this.#h=null,t(r)&&(r.focus({preventScroll:!0}),document.activeElement===r))return;let a=document.querySelector('main, [role="main"]')||document.querySelector("h1");a&&(a.hasAttribute("tabindex")||(a.setAttribute("tabindex","-1"),a.addEventListener("blur",()=>a.removeAttribute("tabindex"),{once:!0})),a.focus({preventScroll:!0}))}async#_(t){if(this.dataset.mode="panel",this.listen(document,"notification-wc:new",this.#C),await this.#P(),!!this.#E(t)&&(this.#V(),this.#$(),this.listen(document,"click",this.#it),this.listen(this,"keydown",this.#X),this.listen(this,"focusout",this.#W),this.listen(document,"page-watch:add",this.#q),this.listen(document,"page-watch:remove",this.#q),await this.#G(),!!this.#E(t))){if(this.getAttribute("src")){if(await this.#nt(t),!this.#E(t))return;let i=Number(this.getAttribute("poll"));Number.isFinite(i)&&i>0&&(this.#c=setInterval(()=>this.#nt(t),i))}this.#d=!0}}async#P(){let t=this.getAttribute("storage-key")||"notifications",i=await S.get(t,"read-ids");Array.isArray(i)&&(this.#r=new Set(i.filter(s=>typeof s=="string")))}async#O(){let t=this.getAttribute("storage-key")||"notifications";await S.set(t,"read-ids",Array.from(this.#r))}#V(){if(this.#i=this.querySelector(":scope > [data-trigger]"),this.#i){if(!this.#i.classList.contains("notification-trigger")&&this.#n===null){let i=this.#i.cloneNode(!0);i.querySelector(".notification-badge")?.remove(),this.#n=(this.#i.getAttribute("aria-label")||i.textContent||"").trim()}}else{let i=document.createElement("button");i.type="button",i.setAttribute("data-trigger",""),i.className="notification-trigger",i.innerHTML='<icon-wc name="bell" size="sm" aria-hidden="true"></icon-wc><span class="notification-badge" aria-hidden="true" hidden>0</span>',this.#i=i,this.prepend(i)}let t=this.#i.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.setAttribute("aria-hidden","true"),t.hidden=!0,this.#i.appendChild(t)),this.#o=t,this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.listen(this.#i,"click",this.#F)}#$(){let t=this.querySelector(":scope > .notification-panel");t||(t=document.createElement("div"),t.className="notification-panel",t.id=`notification-panel-${++dv}-${Math.random().toString(36).slice(2,7)}`,this.appendChild(t)),this.#s=t;let i=t.id;t.setAttribute("role","dialog"),t.setAttribute("aria-labelledby",`${i}-title`),t.tabIndex=-1,t.hidden=!0,this.#i?.setAttribute("aria-controls",i);let s=this.#f==="all";t.innerHTML=`
|
|
426
|
+
`}#_(){let t=this.#e;this.listen(this.#t,"click",this.#D),this.listen(document,"click",this.#R),this.listen(this,"keydown",this.#N),this.listen(this,"focusout",this.#F),t.querySelector(".settings-close")?.addEventListener("click",()=>this.close()),t.querySelectorAll('input[data-field="mode"]').forEach(i=>i.addEventListener("change",this.#I)),this.#A('[data-field="theme"]')?.addEventListener("change",this.#j),this.#A("input[data-fluid-toggle]")?.addEventListener("change",this.#C),t.querySelectorAll('input[data-field="density"]').forEach(i=>i.addEventListener("change",this.#T)),this.#A("input[data-backdrop-toggle]")?.addEventListener("change",this.#B),t.querySelectorAll('input[data-field="backdrop"]').forEach(i=>i.addEventListener("change",this.#tt)),t.querySelectorAll('input[data-field="chrome"]').forEach(i=>i.addEventListener("change",this.#$)),this.#A("input[data-backdrop-fixed]")?.addEventListener("change",this.#L),this.#A("input[data-sticky-toggle]")?.addEventListener("change",this.#V),this.#A('[data-field="page-bg"]')?.addEventListener("change",this.#X),this.#A('[data-field="page-bg-color"]')?.addEventListener("input",this.#O),this.#A('[data-field="grad-start"]')?.addEventListener("input",this.#O),this.#A('[data-field="grad-end"]')?.addEventListener("input",this.#O),this.#A('[data-field="grad-dir"]')?.addEventListener("change",this.#O),t.querySelectorAll("input[data-a11y]").forEach(i=>i.addEventListener("change",this.#z)),t.querySelectorAll("input[data-ext]").forEach(i=>i.addEventListener("change",this.#P)),t.querySelectorAll("input[data-env]").forEach(i=>i.addEventListener("change",this.#Q)),this.#A(".settings-reset")?.addEventListener("click",this.#K),this.#A('[data-action="reset-confirm"]')?.addEventListener("click",this.#st),this.#A('[data-action="reset-cancel"]')?.addEventListener("click",()=>this.#q(!0)),this.#A('[data-action="clear-cache"]')?.addEventListener("click",this.#ot),this.#A('[data-action="check-update"]')?.addEventListener("click",this.#ct),this.#rt(this.#s)}#D=t=>{t.stopPropagation(),this.toggle()};#R=t=>{this.#i&&!this.contains(t.target)&&this.close()};#N=t=>{t.key==="Escape"&&!t.defaultPrevented&&this.#i&&(t.preventDefault(),this.close())};#F=t=>{if(!this.#i)return;let i=t.relatedTarget;i&&!this.contains(i)&&this.close()};#I=t=>{_.setMode(t.target.value)};#j=async t=>{let i=t.target;i.disabled=!0;try{await _.setBrand(i.value),this.#H()}catch{console.warn("[VB] Theme load failed, using default")}finally{i.disabled=!1}};#C=t=>{let i=t.target.checked,s=this.#m(_.getState().fluid)||"default";_.setFluid(this.#h(i,s)),this.#Z(i)};#T=t=>{_.setFluid(this.#h(!0,t.target.value))};#B=t=>{let i=t.target.checked,s=this.#y(_.getState().backdrop)||"default";_.setBackdrop(this.#x(i,s)),this.#W(i)};#tt=t=>{_.setBackdrop(this.#x(!0,t.target.value))};#$=t=>{let i=this.#S(_.getState().backdropChrome);_.setBackdropChrome(this.#w(t.target.value,i))};#L=t=>{let i=this.#g(_.getState().backdropChrome);_.setBackdropChrome(this.#w(i,t.target.checked))};#V=t=>{let i=t.target.checked;this.#b=i,S.set(tt,"sticky",i?"on":"off").catch(()=>{}),or(i)};#G(){let t=this.#A('[data-field="page-bg"]')?.value||"";return t==="color"?{type:t,color:this.#A('[data-field="page-bg-color"]')?.value||"#1a1a2e"}:t==="gradient"?{type:t,gradStart:this.#A('[data-field="grad-start"]')?.value||"#1a1a2e",gradEnd:this.#A('[data-field="grad-end"]')?.value||"#16213e",gradDir:this.#A('[data-field="grad-dir"]')?.value||"to bottom"}:null}#X=t=>{this.#Y(t.target.value),_.setPageBg(this.#G()??{})};#O=()=>{let t=this.#G();t&&_.setPageBg(t)};#z=t=>{let i=t.target.dataset.a11y,s=[...this.#l];if(t.target.checked&&!s.includes(i))s.push(i);else if(!t.target.checked){let n=s.indexOf(i);n!==-1&&s.splice(n,1)}this.#et(s),this.#H(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[...s]}))};#P=t=>{let i=t.target.dataset.ext;this.#c={...this.#c,[i]:t.target.checked},S.set(tt,"extensions",this.#c).catch(()=>{}),this.#nt()};#Q=t=>{Qt.setSource(t.target.dataset.env,t.target.checked)};#K=()=>{let t=this.#A(".settings-reset-confirm"),i=this.#A(".settings-reset");!t||!i||(t.hidden=!1,i.hidden=!0,this.#A('[data-action="reset-cancel"]')?.focus())};#q(t=!1){let i=this.#A(".settings-reset-confirm"),s=this.#A(".settings-reset");i&&(i.hidden=!0),s&&(s.hidden=!1,t&&s.focus())}#st=()=>{let t=["a11y","extensions","sticky"];for(let i of t)this.#r.add(i);setTimeout(()=>{for(let i of t)this.#r.delete(i)},0),_.reset(),this.#et([]),this.#H(),window.dispatchEvent(new CustomEvent("vb:a11y-themes-change",{detail:[]})),this.#c={...Pi,charShortcuts:qc()},S.remove(tt,"extensions").catch(()=>{}),this.#nt(),this.#b=!!ar,S.remove(tt,"sticky").catch(()=>{}),or(this.#b),Qt.setSource("timeOfDay",!1),Qt.setSource("seasonal",!1),this.#q(!0),this.#J(),this.#it(this.#u("reset-done"))};#U=t=>{if(t.type==="vb:a11y-themes-change"&&Array.isArray(t.detail))this.#l=t.detail.map(String);else if(t.type==="vb:extensions-change"&&t.detail&&typeof t.detail=="object")this.#c={...rr(),...t.detail};else if(t.type==="vb:theme-change"){let i=this.#s;this.#v().then(()=>{this.#f(i)&&this.#J()})}this.#J()};#J(){if(!this.#e)return;let{mode:t,brand:i,fluid:s,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:c,pageBgGradEnd:l,pageBgGradDir:u}=_.getState(),d=this.#l,h=this.#c,f=this.#d(s),p=this.#m(s),m=this.#E(n),b=this.#y(n),g=this.#e,A=(L,N)=>{let V=this.#A(L);V&&(V.checked=N)},y=(L,N)=>{let V=this.#A(L);V&&N&&(V.value=N)};A(`input[data-field="mode"][value="${t}"]`,!0);let O=this.#A('[data-field="theme"]');O&&(O.value=i||"default"),A("input[data-fluid-toggle]",f),A(`input[data-field="density"][value="${p}"]`,!0),this.#Z(f),A("input[data-backdrop-toggle]",m),A(`input[data-field="backdrop"][value="${b}"]`,!0),A(`input[data-field="chrome"][value="${this.#g(r)}"]`,!0),A("input[data-backdrop-fixed]",this.#S(r)),this.#W(m);let M=this.#A('[data-field="page-bg"]');M&&(M.value=a||""),y('[data-field="page-bg-color"]',o),y('[data-field="grad-start"]',c),y('[data-field="grad-end"]',l),y('[data-field="grad-dir"]',u),m&&this.#Y(a||""),g.querySelectorAll("input[data-a11y]").forEach(L=>{let N=L;N.checked=d.includes(N.dataset.a11y||"")}),g.querySelectorAll("input[data-ext]").forEach(L=>{let N=L,V=N.dataset.ext;N.checked=h[V]??Pi[V]}),A("input[data-sticky-toggle]",this.#b);let J=Qt.load();g.querySelectorAll("input[data-env]").forEach(L=>{let N=L;N.checked=J[N.dataset.env]??!1})}#Z(t){let i=this.#A(".density-row");i&&(i.hidden=!t)}#W(t){this.#e?.querySelectorAll(".backdrop-row").forEach(i=>{i.hidden=!t}),t&&this.#Y(this.#A('[data-field="page-bg"]')?.value||"")}#Y(t){let i=this.#A(".page-bg-color-row"),s=this.#A(".page-bg-grad-row"),n=this.#A(".page-bg-grad-dir-row");i&&(i.hidden=t!=="color"),s&&(s.hidden=t!=="gradient"),n&&(n.hidden=t!=="gradient")}#et(t){this.#l=[...t],S.set(tt,"a11y",this.#l).catch(()=>{})}#H(){let t=[...this.#l],{brand:i}=_.getState(),s=document.documentElement,n=i!=="default"?[i,...t]:[...t];n.length?s.dataset.theme=n.join(" "):delete s.dataset.theme}async#nt(){let t={...this.#c},i=document.documentElement;t.motionFx?delete i.dataset.motionReduced:i.dataset.motionReduced="",Pc(t.charShortcuts!==!1),t.sounds?(te||(te=(await Promise.resolve().then(()=>(Ll(),Tl))).SoundManager),te.init(),te.enable()):te&&te.disable(),window.dispatchEvent(new CustomEvent("vb:extensions-change",{detail:t}))}#it(t){let i=this.#A("[data-live]");i&&(i.textContent="",requestAnimationFrame(()=>{i.textContent=t}))}async#rt(t){let i=this.#A("[data-sw-status] span");if(i){if(!("serviceWorker"in navigator)){i.textContent=this.#u("sw-unsupported");return}try{let s=await wl();if(!this.#f(t))return;let n=s.cachedURLs?.length??0;i.textContent=this.#u("sw-active",{n})}catch{this.#f(t)&&(i.textContent=this.#u("sw-unregistered"))}}}async#at(t,i,s,n){let r=this.#s;t.disabled=!0,t.textContent=this.#u(s);let a;try{a=await n()}catch{a=this.#u("failed")}this.#f(r)&&(t.textContent=a,this.#it(a),this.#a.push(setTimeout(()=>{t.textContent=this.#u(i),t.disabled=!1},2e3)))}#ot=t=>{let i=this.#s;this.#at(t.currentTarget,"clear-cache","clearing",async()=>(await Al(),this.#rt(i),this.#u("cleared")))};#ct=t=>{this.#at(t.currentTarget,"check-update","checking",async()=>{let{updated:i}=await El();return this.#u(i?"update-available":"up-to-date")})};open(){if(!this.#e){this.#n=!0;return}this.#i||(this.#i=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#J(),this.#lt(),this.#e.focus({preventScroll:!0}))}#lt(){let t=this.getBoundingClientRect(),i=this.#e;i.style.removeProperty("top"),i.style.removeProperty("bottom"),i.style.removeProperty("left"),i.style.removeProperty("right");let s=i.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,a=t.top,o=r-t.bottom;a<s.height&&o>a?(i.style.top="calc(100% + 8px)",i.style.bottom="auto"):(i.style.bottom="calc(100% + 8px)",i.style.top="auto");let c=n-t.right,l=t.left,u=s.width;t.right<u&&l<c?(i.style.left="0",i.style.right="auto"):(i.style.right="0",i.style.left="auto")}close(){if(this.#n=!1,!this.#i)return;let t=!!this.#e?.contains(document.activeElement);this.#i=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#q(),t&&this.#t?.isConnected&&this.#t.focus()}toggle(){this.#i?this.close():this.open()}};w("settings-panel",cr);it();ee();lt();var pv={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"},mv={trigger:"Notifications",unread:"{n} unread",title:"Notifications","mark-all":"Mark all read",close:"Close notifications",tabs:"Notification categories",all:"All",watching:"Watching",empty:"No notifications","watch-empty":"You aren\u2019t watching any pages yet. Use the \u201CWatch\u201D button on a page to start.","last-checked":"Last checked: {date}",never:"\u2014",changed:"Changed",unwatch:"Unwatch {title}",new:"New notification",added:"New notification: {title}. {n} unread","variant-info":"Information:","variant-success":"Success:","variant-warning":"Warning:","variant-error":"Error:"};function P(e){return String(e??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}function _l(e){if(typeof e!="string"||!e.trim())return null;try{let{protocol:t}=new URL(e,location.href);return t==="http:"||t==="https:"?e:null}catch{return null}}function Dl(e,t){let i=new Date(e);if(Number.isNaN(i.getTime()))return String(e);let n=/^\d{4}-\d{2}-\d{2}$/.test(e)?{dateStyle:"medium",timeZone:"UTC"}:{dateStyle:"medium",timeStyle:"short"};try{return new Intl.DateTimeFormat(t||void 0,n).format(i)}catch{return new Intl.DateTimeFormat(void 0,n).format(i)}}var bv=0,ur=class extends E{static observedAttributes=["variant","position"];#t="panel";#e=0;#i=null;#n=null;#s=null;#o=null;#r=new Set;#a=[];#l=!1;#c=null;#b=new Set;#f="all";#u=[];#p=[];#v=new Set;#d=!1;#m=!1;#h=null;setup(){let t=++this.#e;return this.#t=this.getAttribute("mode")==="banner"?"banner":"panel",this.#t==="banner"?this.#S(t):(this.#m&&(this.removeAttribute("role"),this.#m=!1),this.#D(t)),!0}teardown(){this.#e++,this.#d=!1,this.#c!=null&&(clearInterval(this.#c),this.#c=null),this.#l&&(this.#l=!1,this.#nt(),this.#s&&(this.#s.hidden=!0),this.#i?.setAttribute("aria-expanded","false"))}attributeChangedCallback(t,i,s){i===s||this.#t!=="banner"||!this.hasAttribute("data-upgraded")||(t==="variant"&&(this.dataset.variant=s||"info",this.#A(),this.#w()),t==="position"&&(this.dataset.position=s||"top"))}#E(t){return t===this.#e&&this.isConnected}#y(t,i={}){let s=this.getAttribute(`data-label-${t}`)??mv[t]??t;for(let[n,r]of Object.entries(i))s=s.replaceAll(`{${n}}`,String(r));return s}#x(){let t=(this.getAttribute("toast-new")||"").trim(),i=null;if(t){try{i=document.querySelector(t)}catch{i=null}i&&i.localName!=="toast-msg"&&(i=null)}return i??document.querySelector("toast-msg")}#g(){return this.closest("[lang]")?.lang||document.documentElement.lang||void 0}get notifications(){return[...this.#a]}set notifications(t){this.#t==="panel"&&(this.#a=Array.isArray(t)?t:[],this.#C(),this.dispatchEvent(new CustomEvent("notification-wc:notifications-changed",{detail:{notifications:this.#a,source:"property"},bubbles:!0})))}async#S(t){let i=this.getAttribute("persist");if(i||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",this.#A(),this.#w(),this.listen(this,"focusin",this.#k),i){let n=Number(this.getAttribute("expires")??""),r=Number.isFinite(n)&&n>0?n*864e5:void 0,a=await S.get("notifications",i,r?{maxAge:r}:void 0);if(!this.#E(t))return;if(a&&a.dismissed){this.hidden=!0;return}}let s=this.querySelector('[value="dismiss"], [data-dismiss]');s&&this.listen(s,"click",this.#M)}#w(){this.setAttribute("role",this.dataset.variant==="error"?"alert":"status"),this.#m=!0}#A(){let t=this.dataset.variant||"info",i=this.querySelector(":scope [data-variant-prefix]");i||(i=document.createElement("span"),i.className="visually-hidden",i.setAttribute("data-variant-prefix",""),(this.querySelector(":scope > :is(p, strong, span, h2, h3, h4)")||this).prepend(i)),i.textContent=`${this.#y(`variant-${t}`)} `}#M=async t=>{t.preventDefault();let i=this.contains(document.activeElement),s=this.getAttribute("persist");this.hidden=!0,i&&this.#_(),s&&await S.set("notifications",s,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:s}}))};#k=t=>{let i=t.relatedTarget;i&&!this.contains(i)&&(this.#h=i)};#_(){let t=o=>!!o?.isConnected&&(typeof o.checkVisibility!="function"||o.checkVisibility()),i=[...document.querySelectorAll('notification-wc[mode="banner"]')],s=i.indexOf(this),n=[...i.slice(s+1),...i.slice(0,s).reverse()];for(let o of n){if(!t(o))continue;let c=o.querySelector("a[href], button:not([disabled])");if(c&&(c.focus({preventScroll:!0}),document.activeElement===c))return}let r=this.#h;if(this.#h=null,t(r)&&(r.focus({preventScroll:!0}),document.activeElement===r))return;let a=document.querySelector('main, [role="main"]')||document.querySelector("h1");a&&(a.hasAttribute("tabindex")||(a.setAttribute("tabindex","-1"),a.addEventListener("blur",()=>a.removeAttribute("tabindex"),{once:!0})),a.focus({preventScroll:!0}))}async#D(t){if(this.dataset.mode="panel",this.listen(document,"notification-wc:new",this.#L),await this.#R(),!!this.#E(t)&&(this.#F(),this.#I(),this.listen(document,"click",this.#st),this.listen(this,"keydown",this.#Z),this.listen(this,"focusout",this.#J),this.listen(document,"page-watch:add",this.#V),this.listen(document,"page-watch:remove",this.#V),await this.#G(),!!this.#E(t))){if(this.getAttribute("src")){if(await this.#it(t),!this.#E(t))return;let i=Number(this.getAttribute("poll"));Number.isFinite(i)&&i>0&&(this.#c=setInterval(()=>this.#it(t),i))}this.#d=!0}}async#R(){let t=this.getAttribute("storage-key")||"notifications",i=await S.get(t,"read-ids");Array.isArray(i)&&(this.#r=new Set(i.filter(s=>typeof s=="string")))}async#N(){let t=this.getAttribute("storage-key")||"notifications";await S.set(t,"read-ids",Array.from(this.#r))}#F(){if(this.#i=this.querySelector(":scope > [data-trigger]"),this.#i){if(!this.#i.classList.contains("notification-trigger")&&this.#n===null){let i=this.#i.cloneNode(!0);i.querySelector(".notification-badge")?.remove(),this.#n=(this.#i.getAttribute("aria-label")||i.textContent||"").trim()}}else{let i=document.createElement("button");i.type="button",i.setAttribute("data-trigger",""),i.className="notification-trigger",i.innerHTML='<icon-wc name="bell" size="sm" aria-hidden="true"></icon-wc><span class="notification-badge" aria-hidden="true" hidden>0</span>',this.#i=i,this.prepend(i)}let t=this.#i.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.setAttribute("aria-hidden","true"),t.hidden=!0,this.#i.appendChild(t)),this.#o=t,this.#i.setAttribute("aria-haspopup","dialog"),this.#i.setAttribute("aria-expanded","false"),this.listen(this.#i,"click",this.#q)}#I(){let t=this.querySelector(":scope > .notification-panel");t||(t=document.createElement("div"),t.className="notification-panel",t.id=`notification-panel-${++bv}-${Math.random().toString(36).slice(2,7)}`,this.appendChild(t)),this.#s=t;let i=t.id;t.setAttribute("role","dialog"),t.setAttribute("aria-labelledby",`${i}-title`),t.tabIndex=-1,t.hidden=!0,this.#i?.setAttribute("aria-controls",i);let s=this.#f==="all";t.innerHTML=`
|
|
427
427
|
<header class="notification-header">
|
|
428
|
-
<strong id="${i}-title">${
|
|
429
|
-
<button type="button" class="notification-mark-all">${
|
|
430
|
-
<button type="button" class="notification-close" aria-label="${
|
|
428
|
+
<strong id="${i}-title">${P(this.#y("title"))}</strong>
|
|
429
|
+
<button type="button" class="notification-mark-all">${P(this.#y("mark-all"))}</button>
|
|
430
|
+
<button type="button" class="notification-close" aria-label="${P(this.#y("close"))}"><icon-wc name="x" size="sm" aria-hidden="true"></icon-wc></button>
|
|
431
431
|
</header>
|
|
432
|
-
<div class="notification-tabs" role="tablist" aria-label="${
|
|
433
|
-
<button type="button" role="tab" id="${i}-tab-all" data-tab="all" aria-controls="${i}-all" aria-selected="${s}" tabindex="${s?0:-1}">${
|
|
434
|
-
<button type="button" role="tab" id="${i}-tab-watching" data-tab="watching" aria-controls="${i}-watching" aria-selected="${!s}" tabindex="${s?-1:0}">${
|
|
432
|
+
<div class="notification-tabs" role="tablist" aria-label="${P(this.#y("tabs"))}">
|
|
433
|
+
<button type="button" role="tab" id="${i}-tab-all" data-tab="all" aria-controls="${i}-all" aria-selected="${s}" tabindex="${s?0:-1}">${P(this.#y("all"))}</button>
|
|
434
|
+
<button type="button" role="tab" id="${i}-tab-watching" data-tab="watching" aria-controls="${i}-watching" aria-selected="${!s}" tabindex="${s?-1:0}">${P(this.#y("watching"))} <span class="notification-tab-count" hidden>0</span></button>
|
|
435
435
|
</div>
|
|
436
436
|
<div class="notification-tabpanel" role="tabpanel" id="${i}-all" aria-labelledby="${i}-tab-all" data-tab-panel="all"${s?"":" hidden"}>
|
|
437
437
|
<ul class="notification-list" role="list"></ul>
|
|
438
|
-
<p class="notification-footer" hidden><em>${
|
|
438
|
+
<p class="notification-footer" hidden><em>${P(this.#y("empty"))}</em></p>
|
|
439
439
|
</div>
|
|
440
440
|
<div class="notification-tabpanel" role="tabpanel" id="${i}-watching" aria-labelledby="${i}-tab-watching" data-tab-panel="watching"${s?" hidden":""}>
|
|
441
441
|
<ul class="notification-watch-list" role="list"></ul>
|
|
442
442
|
</div>
|
|
443
|
-
`,this.listen(t,"click",this.#Q),this.listen(t,"keydown",this.#
|
|
444
|
-
<icon-wc class="notification-type-icon" name="${
|
|
443
|
+
`,this.listen(t,"click",this.#Q),this.listen(t,"keydown",this.#P),this.#C(),this.#X()}#j(){let t=Array.from(this.querySelectorAll(":scope > article")),i=new Map;for(let s of t){let n=s.getAttribute("data-id")||s.id||`static-${i.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()||"",u=s.querySelector("a");i.set(n,{id:n,type:r,date:a,title:o,body:l,url:u?.getAttribute("href")||null,source:"static"})}for(let s of[...this.#p,...this.#a])if(!(!s||typeof s.id!="string")){if(s.dismissed){i.delete(s.id);continue}i.set(s.id,{...i.get(s.id),...s,source:"dynamic"})}return Array.from(i.values()).sort((s,n)=>{let r=s.date&&Date.parse(s.date)||0;return(n.date&&Date.parse(n.date)||0)-r})}#C(){if(!this.#s)return;let t=this.#s.querySelector(".notification-list"),i=this.#s.querySelector(".notification-footer");if(!t)return;let s=this.#j(),n=this.#g(),r=this.#B(t,a=>a.getAttribute("data-notification-id"));t.innerHTML=s.map(a=>this.#tt(a,n)).join(""),r(),i&&(i.hidden=s.length>0),this.#$(s),this.#T(s)}#T(t){let i=t.filter(r=>!this.#v.has(r.id));for(let r of i)this.#v.add(r.id);if(!this.#d)return;let s=i.find(r=>!this.#r.has(r.id));if(!s)return;let n=t.filter(r=>!this.#r.has(r.id)).length;W(this.#y("added",{title:s.title||this.#y("new"),n}))}#B(t,i){let s=document.activeElement,n=s&&t.contains(s)?s.closest("li"):null;if(!s||!n)return()=>{};let r=i(n),a=[...t.children].indexOf(n),o=s.matches("[data-watch-unwatch]")?"[data-watch-unwatch]":"a, button";return()=>{let c=[...t.children],l=r!=null&&c.find(d=>i(d)===r)||c[Math.min(a,c.length-1)];(l?.querySelector(o)??l?.querySelector("a, button")??this.#s)?.focus({preventScroll:!0})}}#tt(t,i){let s=pv[t.type]||"bell",n=this.#r.has(t.id),r=t.date?Dl(t.date,i):"",a=`
|
|
444
|
+
<icon-wc class="notification-type-icon" name="${P(s)}" size="sm" aria-hidden="true"></icon-wc>
|
|
445
445
|
<span class="notification-body">
|
|
446
|
-
<strong class="notification-title">${
|
|
447
|
-
${t.body?`<span class="notification-text">${
|
|
448
|
-
${r?`<time datetime="${
|
|
446
|
+
<strong class="notification-title">${P(t.title)}</strong>
|
|
447
|
+
${t.body?`<span class="notification-text">${P(t.body)}</span>`:""}
|
|
448
|
+
${r?`<time datetime="${P(t.date)}">${P(r)}</time>`:""}
|
|
449
449
|
</span>
|
|
450
|
-
`,o=
|
|
450
|
+
`,o=_l(t.url),c=o?"a":"button",l=o?`href="${P(o)}"`:'type="button"';return`<li data-notification-id="${P(t.id)}" data-type="${P(t.type||"update")}"${n?" data-read":""}>
|
|
451
451
|
<${c} class="notification-row" ${l}>${a}</${c}>
|
|
452
|
-
</li>`}
|
|
452
|
+
</li>`}#$(t=this.#j()){if(!this.#o||!this.#i)return;let i=t.filter(r=>!this.#r.has(r.id)).length,s=this.#i.querySelector("icon-wc");i>0?(this.#o.textContent=String(i),this.#o.hidden=!1,s?.setAttribute("name","bell-dot"),this.setAttribute("data-unread",String(i))):(this.#o.hidden=!0,s?.setAttribute("name","bell"),this.removeAttribute("data-unread"));let n=this.#n||this.#y("trigger");this.#i.setAttribute("aria-label",i>0?`${n}, ${this.#y("unread",{n:i})}`:n)}#L=t=>{if(t.target instanceof Element&&t.target.localName==="notification-wc")return;let i=t.detail?.notification;!i||typeof i.id!="string"||this.#p.some(s=>s.id===i.id)||(this.#p.push(i),this.#C())};#V=()=>{this.#G()};async#G(){let t=this.#e,i;try{i=await S.list("watches")}catch{i=[]}this.#E(t)&&(this.#u=Array.isArray(i)?i:[],this.#X())}#X(){if(!this.#s)return;let t=this.#s.querySelector(".notification-watch-list"),i=this.#s.querySelector(".notification-tab-count");if(!t)return;let s=this.#g(),n=this.#B(t,r=>r.querySelector("[data-watch-key]")?.getAttribute("data-watch-key"));if(t.innerHTML=this.#u.map(r=>this.#O(r,s)).join("")||`<li class="notification-empty"><em>${P(this.#y("watch-empty"))}</em></li>`,n(),i){let r=this.#u.length;i.textContent=String(r),i.hidden=r===0}}#O(t,i){let s=t.data||{},n=s.url||t.key,r=s.title||n,a=s.lastChecked?Dl(s.lastChecked,i):this.#y("never"),o=!!s.lastChanged,c=_l(n),l=`
|
|
453
453
|
<icon-wc class="notification-type-icon" name="eye" size="sm" aria-hidden="true"></icon-wc>
|
|
454
454
|
<span class="notification-body">
|
|
455
|
-
<strong class="notification-title">${
|
|
456
|
-
<span class="notification-text">${
|
|
457
|
-
<time>${
|
|
458
|
-
</span>`,u=c?`<a class="notification-watch-row" href="${
|
|
455
|
+
<strong class="notification-title">${P(r)}${o?` <span class="notification-changed-badge">${P(this.#y("changed"))}</span>`:""}</strong>
|
|
456
|
+
<span class="notification-text">${P(n)}</span>
|
|
457
|
+
<time>${P(this.#y("last-checked",{date:a}))}</time>
|
|
458
|
+
</span>`,u=c?`<a class="notification-watch-row" href="${P(c)}">${l}</a>`:`<span class="notification-watch-row">${l}</span>`;return`<li class="notification-watch-item"${o?" data-changed":""}>
|
|
459
459
|
${u}
|
|
460
|
-
<button type="button" class="notification-unwatch" data-watch-unwatch data-watch-key="${
|
|
460
|
+
<button type="button" class="notification-unwatch" data-watch-unwatch data-watch-key="${P(t.key)}" aria-label="${P(this.#y("unwatch",{title:r}))}">
|
|
461
461
|
<icon-wc name="x" size="xs" aria-hidden="true"></icon-wc>
|
|
462
462
|
</button>
|
|
463
|
-
</li>`}#
|
|
463
|
+
</li>`}#z(t,{focus:i=!1}={}){if(this.#s){this.#f=t;for(let s of this.#s.querySelectorAll('[role="tab"]')){let n=s.dataset.tab===t;s.setAttribute("aria-selected",n?"true":"false"),s.setAttribute("tabindex",n?"0":"-1"),n&&i&&s.focus()}for(let s of this.#s.querySelectorAll("[data-tab-panel]"))s.hidden=s.dataset.tabPanel!==t}}#P=t=>{let i=t.target.closest?.('[role="tab"]');if(!i||!this.#s)return;let s=[...this.#s.querySelectorAll('[role="tab"]')],n=s.indexOf(i),r=getComputedStyle(this.#s).direction==="rtl",a=-1;if(t.key==="ArrowRight")a=r?n-1:n+1;else if(t.key==="ArrowLeft")a=r?n+1:n-1;else if(t.key==="Home")a=0;else if(t.key==="End")a=s.length-1;else return;t.preventDefault(),a=(a+s.length)%s.length;let o=s[a].dataset.tab;o&&this.#z(o,{focus:!0})};#Q=t=>{let i=t.target,s=i.closest('[role="tab"]');if(s?.dataset.tab){this.#z(s.dataset.tab);return}if(i.closest(".notification-mark-all")){this.#Y();return}if(i.closest(".notification-close")){this.#H({restoreFocus:!0});return}let n=i.closest("[data-watch-unwatch]");if(n){this.#K(t,n);return}let r=i.closest(".notification-list .notification-row");r&&this.#W(r)};async#K(t,i){t.preventDefault(),t.stopPropagation();let s=i.getAttribute("data-watch-key");if(!s||!this.#s)return;let r=[...this.#s.querySelectorAll("[data-watch-unwatch]")].indexOf(i),a=this.#u.find(l=>l.key===s);await S.remove("watches",s),this.#u=this.#u.filter(l=>l.key!==s),this.#X();let o=[...this.#s.querySelectorAll("[data-watch-unwatch]")];(o[Math.min(r,o.length-1)]||this.#s.querySelector('[role="tab"][data-tab="watching"]'))?.focus(),this.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:a?.data?.url||s,subscriptionId:a?.data?.subscriptionId||null}}))}#q=t=>{t.stopPropagation(),this.#l?this.#H():this.#et()};#st=t=>{if(this.#l){if(!this.contains(t.target)){this.#H();return}if(t.target===this.#s&&this.#s?.matches(":popover-open")){let i=this.#s.getBoundingClientRect(),{clientX:s,clientY:n}=t;(s<i.left||s>i.right||n<i.top||n>i.bottom)&&this.#H({restoreFocus:!0})}}};#U(){return!!this.closest("[popover]")||matchMedia("(width < 37.5rem)").matches}#J=t=>{let i=t.relatedTarget;this.#l&&i&&!this.contains(i)&&this.#H()};#Z=t=>{t.key==="Escape"&&!t.defaultPrevented&&this.#l&&(t.preventDefault(),this.#H({restoreFocus:!0}))};async#W(t){let i=t.closest("[data-notification-id]"),s=i?.getAttribute("data-notification-id");!i||!s||this.#r.has(s)||(this.#r.add(s),i.setAttribute("data-read",""),this.#$(),this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:s}})),await this.#N())}async#Y(){let t=this.#j();for(let i of t)this.#r.add(i.id);this.#C();for(let i of t)this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:i.id}}));await this.#N()}#et(){this.#s&&(this.#l=!0,this.#s.hidden=!1,this.#U()&&typeof this.#s.showPopover=="function"&&(this.#s.setAttribute("popover","manual"),this.#s.showPopover()),this.#i?.setAttribute("aria-expanded","true"),this.#s.focus({preventScroll:!0}),this.#G(),this.dispatchEvent(new CustomEvent("notification-wc:open",{bubbles:!0,composed:!0})))}#H({restoreFocus:t=!1}={}){if(!this.#s)return;let i=this.#s.contains(document.activeElement);this.#l=!1,this.#nt(),this.#s.hidden=!0,this.#i?.setAttribute("aria-expanded","false"),(t||i)&&this.#i?.focus(),this.dispatchEvent(new CustomEvent("notification-wc:close",{bubbles:!0,composed:!0}))}#nt(){let t=this.#s;t?.hasAttribute("popover")&&(t.matches(":popover-open")&&t.hidePopover(),t.removeAttribute("popover"))}async#it(t){let i=this.getAttribute("src");if(!i)return;let s,n=0;try{if(i.startsWith("http")||i.startsWith("/")){let l=await fetch(i,{headers:{accept:"application/json"}});if(n=l.status,!l.ok)throw new Error(`${l.status}`);s=await l.json()}else s=await new Y(i).get("/")}catch(l){let u=l instanceof j?l.status:n;if(u===404||u===503)return;let d=l instanceof j?`${l.status}`:String(l);console.warn("[notification-wc] failed to fetch",i,d);return}if(!this.#E(t))return;let r=Array.isArray(s)?s:Array.isArray(s?.notifications)?s.notifications:[],a=this.#b,o=a.size===0,c=this.hasAttribute("toast-new")?this.#x():null;for(let l of r)l?.id&&(a.has(l.id)||(this.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:l}})),!o&&c&&typeof c.show=="function"&&(c.show({message:l.title||l.body||this.#y("new"),variant:l.type==="alert"||l.type==="stewardship"?"warning":"info",duration:5e3}),this.#v.add(l.id))),a.add(l.id));this.#a=r,this.#C()}};w("notification-wc",ur);var Ov={watch:"Watch for updates",watching:"Watching",action:"Watch this page for updates",stop:"Stop watching this page"},Er=class extends E{static observedAttributes=["variant","label","data-label-watch","data-label-watching","data-label-action","data-label-stop"];#t=null;#e=null;setup(){if(this.hasAttribute("server-sync")){let s=window;s.vbPageWatch={...s.vbPageWatch??{},serverSync:!0}}let t=this.#n();this.dataset.variant=t,this.querySelectorAll(":scope > [data-watch-wc]").forEach(s=>s.remove());let i=this.#s(t);this.#t=i,this.appendChild(i),this.#o(),this.#e=new MutationObserver(()=>this.#o()),this.#e.observe(i,{attributes:!0,attributeFilter:["aria-pressed"]}),Promise.resolve().then(()=>(Ar(),wr)).catch(()=>{})}teardown(){this.#e?.disconnect(),this.#e=null,this.#t?.remove(),this.#t=null}attributeChangedCallback(t,i,s){i===s||!this.hasAttribute("data-upgraded")||this._reinit()}#i(t){return this.getAttribute(`data-label-${t}`)??Ov[t]}#n(){let t=this.getAttribute("variant");return t==="compact"||t==="button"?t:"icon"}#s(t){let i=document.createElement("button");i.type="button",i.className="ghost",i.setAttribute("data-watch-page",""),i.setAttribute("data-watch-wc",""),i.setAttribute("data-watch-label-locked",""),i.setAttribute("aria-pressed","false");let s=document.createElement("icon-wc");return s.setAttribute("name","bookmark"),s.setAttribute("size",t==="icon"?"sm":"xs"),s.setAttribute("aria-hidden","true"),i.appendChild(s),t==="icon"?i.setAttribute("aria-label",this.#i("action")):i.appendChild(document.createElement("span")),i}#o(){let t=this.#t;if(!t)return;let i=t.getAttribute("aria-pressed")==="true";t.querySelector("icon-wc")?.setAttribute("name",i?"bookmark-check":"bookmark");let s=t.querySelector(":scope > span");s?(s.textContent=this.getAttribute("label")??this.#i(i?"watching":"watch"),t.removeAttribute("title")):t.setAttribute("title",i?this.#i("stop"):this.#i("action"))}};w("watch-wc",Er);wt();var Kv="Analytics on this page",Yv=2;function Gv(e){let t=Number.parseInt(e??"",10);return Number.isInteger(t)&&t>=1&&t<=6?t:Yv}var au={gpc:"your browser sends a Global Privacy Control signal",dnt:"your browser sends Do Not Track",consent:"this site has not been given consent to collect analytics"};function Xv(e){if(!e||!e.initialized)return{state:"off",reason:"uninitialized",text:"Off. The analytics runtime is not running on this page, so nothing is sent."};if(e.inIframe)return{state:"off",reason:"iframe",text:"Off. Analytics does not run inside embedded frames, so nothing is sent."};if(e.reason==="user")return{state:"paused",reason:"user",text:"Paused for this tab. Nothing is being sent."};if(e.reason){let i=au[e.reason];return{state:"off",reason:e.reason,text:`Off because ${i}. Nothing is sent.`}}if(e.transport==="disabled")return{state:"off",reason:"disabled",text:"Off. This site has analytics switched off, so nothing is sent."};if(e.transport==="console")return{state:"debug",reason:null,text:"Debug mode. Events are written to this browser\u2019s console, not sent anywhere."};let t=typeof e.sampleRate=="number"&&e.sampleRate<1?` (a ${Math.round(e.sampleRate*100)}% sample)`:"";return{state:"active",reason:null,text:`Active. Events from this page are sent to ${e.endpoint}${t}.`}}function Jv(e){return e?.signals?["gpc","dnt","consent"].filter(t=>e.signals[t]):[]}var Lr=class extends E{static get observedAttributes(){return["heading","heading-level"]}#t={};setup(){(!this.#t.status||!this.contains(this.#t.status))&&this.#s(),this.listen(this,"click",this.#i),this.listen(document,kr,()=>this.refresh()),this.refresh()}attributeChangedCallback(t){this.#t.heading&&(t==="heading"&&(this.#t.heading.textContent=this.#e),t==="heading-level"&&this.#o())}get#e(){return this.getAttribute("heading")||Kv}get status(){let t=Tr();return typeof t?.getStatus=="function"?t.getStatus():null}#i=t=>{let i=t.target?.closest?.("[data-analytics-action]");if(!i||!this.contains(i)||i.getAttribute("aria-disabled")==="true")return;let s=i.dataset.analyticsAction;s==="toggle"&&this.#n(),s==="refresh"&&this.refresh()};#n(){let t=!this.status?.signals?.user;Tr().setConsent(!t),this.dispatchEvent(new CustomEvent(t?"analytics-panel:optout":"analytics-panel:optin",{bubbles:!0,composed:!0})),this.refresh()}#s(){let t=`analytics-panel-${Math.random().toString(36).slice(2,8)}`;this.innerHTML=`
|
|
464
464
|
<header class="analytics-panel__header">
|
|
465
465
|
<h2 data-part="heading"></h2>
|
|
466
466
|
<p class="analytics-panel__status" role="status">
|
|
@@ -490,12 +490,12 @@ svg {
|
|
|
490
490
|
server records your country from the request; your IP address is not
|
|
491
491
|
stored.
|
|
492
492
|
</p>
|
|
493
|
-
`;for(let i of this.querySelectorAll("[data-part]"))this.#t[i.dataset.part??""]=i;this.#t.heading.textContent=this.#e,this.#o()}#o(){let t=Uv(this.getAttribute("heading-level")),i={heading:t,"fields-heading":Math.min(t+1,6)};for(let[s,n]of Object.entries(i)){let r=this.#t[s];if(!r||r.localName===`h${n}`)continue;let a=document.createElement(`h${n}`);for(let{name:o,value:c}of r.attributes)a.setAttribute(o,c);a.textContent=r.textContent,r.replaceWith(a),this.#t[s]=a}}refresh(){if(!this.#t.status)return;let t=this.status,i=Wv(t),s=this.#t;this.setAttribute("data-state",i.state),i.reason?this.setAttribute("data-reason",i.reason):this.removeAttribute("data-reason"),s.status.textContent!==i.text&&(s.status.textContent=i.text),this.#r(t);let n=!!t?.signals?.user,r=jv(t),a=n?"Resume analytics":"Pause analytics";if(s.toggle.textContent!==a&&(s.toggle.textContent=a),s.toggle.setAttribute("aria-pressed",String(n)),n&&r.length>0?s.toggle.setAttribute("aria-disabled","true"):s.toggle.removeAttribute("aria-disabled"),r.length){let c=r.map(l=>su[l]).join(" and ");s.hint.textContent=n?`Resume is unavailable because ${c}.`:`Analytics stays off because ${c}; pausing as well changes nothing.`,s.hint.hidden=!1,s.toggle.setAttribute("aria-describedby",s.hint.id)}else s.hint.textContent="",s.hint.hidden=!0,s.toggle.removeAttribute("aria-describedby")}#r(t){let{data:i,empty:s}=this.#t;if(!t?.initialized||!t.preview){i.hidden=!0,i.replaceChildren(),s.hidden=!1,s.textContent="Nothing to show: the analytics runtime has not started on this page.";return}s.hidden=!0,i.hidden=!1;let n=[["Fields",t.collects.join(", ")],["Page path",t.preview.path],["Referrer",t.preview.referrer||"(none)"],["Page context",t.contextKeys.length?t.contextKeys.join(", "):"(none)"]];t.transport==="beacon"?(n.push(["Sent to",t.endpoint]),n.push(["Sent from this page",String(t.sent)])):t.transport==="console"&&n.push(["Logged on this page",String(t.logged)]),t.queued>0&&n.push(["Waiting to send",String(t.queued)]),t.outboundLinks&&n.push(["Outbound link clicks","Reported (site, page path, destination)"]);let r=document.createDocumentFragment();for(let[a,o]of n){let c=document.createElement("dt");c.textContent=a;let l=document.createElement("dd");l.textContent=o,r.append(c,l)}i.replaceChildren(r)}};w("analytics-panel",Sr);var xr="data-brand-mark-img",Kv="(width < 48rem)",kr=class extends E{static observedAttributes=["src","src-dark","src-compact","compact-media","alt","wordmark","height"];#t=null;#e=null;#i=null;#n=!1;setup(){this.#a(),this.hasAttribute("src-dark")&&this.#o(),this.#c(),this.#e=new MutationObserver(()=>this.#b()),this.#e.observe(this,{childList:!0,characterData:!0,subtree:!0})}teardown(){this.#t?.disconnect(),this.#t=null,this.#e?.disconnect(),this.#e=null,this.#i=null,this.#n=!1}attributeChangedCallback(t,i,s){if(i!==s&&!(!this.isConnected||!this.hasAttribute("data-upgraded"))){if(t==="height"){this.#a();return}t==="src-dark"&&s!==null&&this.#o(),this.#c()}}#s(){let t=document.documentElement.getAttribute("data-mode");if(t==="dark")return!0;if(t==="light")return!1;let i=getComputedStyle(this).colorScheme||"";return/\bdark\b/.test(i)&&!/\blight\b/.test(i)?!0:/\blight\b/.test(i)&&!/\bdark\b/.test(i)?!1:(this.#i??matchMedia("(prefers-color-scheme: dark)")).matches}#o(){this.#n||(this.#n=!0,this.#i=matchMedia("(prefers-color-scheme: dark)"),this.listen(this.#i,"change",this.#r),this.listen(window,"vb:theme-change",this.#r),this.#t=new MutationObserver(this.#r),this.#t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-mode","data-theme"]}))}#r=()=>{this.isConnected&&this.#c()};#a(){let t=this.getAttribute("height")?.trim();if(!t){this.style.removeProperty("--brand-mark-height"),this.getAttribute("style")||this.removeAttribute("style");return}this.style.setProperty("--brand-mark-height",/^\d+(\.\d+)?$/.test(t)?`${t}px`:t)}#l(){return this.querySelector(`:scope > [${xr}]`)}#c(){let t=this.getAttribute("src"),i=this.#l();if(!t){i?.remove();return}let s=this.getAttribute("src-dark"),n=s&&this.#s()?s:t;if(!(i instanceof HTMLPictureElement)||!i.querySelector(":scope > img")){i?.remove(),i=document.createElement("picture"),i.setAttribute(xr,"");let c=document.createElement("img");c.decoding="async",i.append(c),this.prepend(i)}let r=i.querySelector(":scope > img");r.getAttribute("src")!==n&&r.setAttribute("src",n);let a=this.getAttribute("src-compact"),o=i.querySelector(":scope > source");if(a){o||(o=document.createElement("source"),i.prepend(o));let c=this.getAttribute("compact-media")||Kv;o.getAttribute("media")!==c&&o.setAttribute("media",c),o.getAttribute("srcset")!==a&&o.setAttribute("srcset",a)}else o?.remove();this.#b()}#b(){let t=this.#l()?.querySelector(":scope > img");if(!t)return;let i=this.getAttribute("alt"),s=!this.hasAttribute("wordmark"),n;s&&i?n=i:this.#f()?n="":n=i??"",t.getAttribute("alt")!==n&&t.setAttribute("alt",n)}#f(){for(let t of this.childNodes)if(!(t instanceof Element&&t.hasAttribute(xr))&&t.textContent?.trim())return!0;return!1}};w("brand-mark",kr);var Yv="52rem",Cr=class extends HTMLElement{static observedAttributes=["breakpoint"];#t=null;#e=new Map;connectedCallback(){this.#i()}disconnectedCallback(){this.#n(),this.#r()}attributeChangedCallback(){this.isConnected&&this.#i()}#i(){this.#n();let t=this.getAttribute("breakpoint")||Yv;this.#t=matchMedia(`(max-width: ${t})`),this.#t.addEventListener("change",this.#s),this.#s()}#n(){this.#t?.removeEventListener("change",this.#s),this.#t=null}#s=()=>{let t=this.#t?.matches??!1;if(this.toggleAttribute("data-mobile",t),t?this.#o():this.#r(),!t){let i=this.querySelector("[popover]");i?.matches(":popover-open")&&i.hidePopover?.()}};#o(){let t=this.querySelector("[popover]"),i=this.parentElement;if(!t||!i)return;let s=t.querySelector("[data-mobile-menu-slot]")??t;for(let n of i.querySelectorAll(":scope > [data-mobile-menu]")){let r=document.createComment("mobile-menu");n.before(r),this.#e.set(n,r),s.append(n)}}#r(){for(let[t,i]of this.#e)i.isConnected?i.replaceWith(t):i.remove();this.#e.clear()}};customElements.get("mobile-menu")||customElements.define("mobile-menu",Cr);var K="interestfor",cu="interestForElement"in HTMLButtonElement.prototype,U=new WeakMap,se=new WeakMap,Yi=new Set,Nr=!1,Mr=CSS.supports?.("anchor-name","--a")??!1;function nu(e){let t=String(e).trim(),i=t.match(/^([\d.]+)s$/);if(i)return parseFloat(i[1])*1e3;let s=t.match(/^([\d.]+)ms$/);return s?parseFloat(s[1]):parseFloat(t)||0}function lu(e,t){let i=getComputedStyle(e),s=i.getPropertyValue(t).trim();if(s.toLowerCase()!=="normal")return nu(s);let n=i.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 nu(a)}}return t==="--interest-delay-start"?500:250}var uu=["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(","),Gv="h1,h2,h3,h4,h5,h6,ul,ol,li,table,nav,header,footer,main,aside,article,section,form,blockquote,details,summary,dialog";function _r(e){if(e.getAttribute("popover")?.toLowerCase()!=="hint"||e.querySelector(uu)||e.querySelector(Gv))return!1;for(let t of e.querySelectorAll("[role]")){let i=t.getAttribute("role").toLowerCase();if(!["presentation","none","generic","image"].includes(i))return!1}return!0}function ru(e,t,i){let s=(e.getAttribute(t)||"").split(/\s+/).filter(Boolean);s.includes(i)||e.setAttribute(t,[...s,i].join(" "))}function Xv(e,t){t.parentElement?.localName!=="tool-tip"&&(_r(t)?ru(e,"aria-describedby",t.id):(ru(e,"aria-details",t.id),e.setAttribute("aria-expanded","false"),!(t.matches(".hover-card")||t.querySelector(uu))&&!t.hasAttribute("role")&&t.setAttribute("role","tooltip")))}function at(e){let t=e.getAttribute(K);return t?document.getElementById(t):null}function Ki(e){let t=se.get(e);return t?.invoker&&U.get(t.invoker)?.state==="full"?t.invoker:null}function Re(e){if(U.has(e))return U.get(e);let t={state:"none",gainedTimer:null,lostTimer:null,longPressTimer:null};U.set(e,t);let i=at(e);return i&&Xv(e,i),t}function du(e,t){if(!e||!t||!e.isConnected||at(e)!==t)return!1;let i=Ki(t);if(i){if(i===e)return clearTimeout(U.get(i).lostTimer),!1;if(!Pe(i,t)||!e.isConnected||at(e)!==t)return!1}let s=Re(e);if(s.state!=="none")return!1;let n=new CustomEvent("interest",{bubbles:!1,cancelable:!0,detail:{source:e}});if(t.dispatchEvent(n),t.hasAttribute("popover")){try{t.showPopover()}catch{}Zv(e,t)}s.state="full",se.has(t)||se.set(t,{});let r=se.get(t);if(r.invoker=e,t.hasAttribute("popover")){let a=o=>{o.newState==="closed"&&Pe(e,t)};r.toggleListener=a,t.addEventListener("toggle",a)}return Yi.add(e),e.classList.add("interest-source"),t.classList.add("interest-target"),_r(t)||e.setAttribute("aria-expanded","true"),!0}function Pe(e,t){if(!e||!t||at(e)!==t||Ki(t)!==e)return!1;let i=U.get(e);if(!i||i.state==="none")return!1;if(clearTimeout(i.gainedTimer),clearTimeout(i.lostTimer),t.dispatchEvent(new CustomEvent("loseinterest",{bubbles:!1,detail:{source:e}})),t.hasAttribute("popover"))try{t.hidePopover()}catch{}let s=se.get(t);return s?.toggleListener&&t.removeEventListener("toggle",s.toggleListener),se.delete(t),Yi.delete(e),e.classList.remove("interest-source"),t.classList.remove("interest-target"),_r(t)||e.setAttribute("aria-expanded","false"),i.state="none",!0}function Jv(e){let t=Re(e);clearTimeout(t.gainedTimer);let i=lu(e,"--interest-delay-start");t.gainedTimer=setTimeout(()=>{let s=at(e);s&&du(e,s)},i)}function Tr(e){let t=U.get(e);if(!t)return;clearTimeout(t.lostTimer);let i=lu(e,"--interest-delay-end");t.lostTimer=setTimeout(()=>{let s=at(e);s&&Pe(e,s)},i)}function Oe(e){if(!Mr)return;let t=e.getAttribute(K),i=t?document.getElementById(t):null;if(!i?.id)return;let s=`--interest-${i.id}`;e.style.anchorName=s,i.style.positionAnchor=s}function Zv(e,t){if(Mr)return;let i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),n=8,r=8,a=i.top-s.height-n,o=i.left+(i.width-s.width)/2;a<r&&(a=i.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 Qv(e,t){if(Nr||!e.isConnected)return;if(!at(e)){let r=e.closest(".interest-target");if(r){let a=Ki(r);a&&(t?clearTimeout(U.get(a)?.lostTimer):Tr(a))}return}let s=Re(e),n=Ki(e);if(t)clearTimeout(s.lostTimer),n&&clearTimeout(U.get(n)?.lostTimer),Jv(e);else if(clearTimeout(s.gainedTimer),s.state!=="none"&&Tr(e),n){let r=U.get(n);r&&clearTimeout(r.gainedTimer),Tr(n)}}function ty(){let e=(s,n)=>{for(let r=s.target;r;r=r.parentElement)Qv(r,n)};document.body.addEventListener("mouseover",s=>e(s,!0)),document.body.addEventListener("mouseout",s=>e(s,!1)),document.body.addEventListener("focusin",s=>e(s,!0)),document.body.addEventListener("focusout",s=>e(s,!1)),document.body.addEventListener("keydown",s=>{if(s.key==="Escape")for(let n of Yi){let r=at(n);r&&Pe(n,r)}});let t=500;document.body.addEventListener("touchstart",s=>{Nr=!0;let n=s.target.closest(`button[${K}]`);if(!n)return;let r=Re(n);r.longPressTimer=setTimeout(()=>{let a=at(n);a&&du(n,a),r.longPressTimer=null},t)});let i=s=>{let n=s.target.closest(`button[${K}]`);if(!n)return;let r=U.get(n);r?.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)};document.body.addEventListener("touchend",s=>{i(s),Nr=!1}),document.body.addEventListener("touchmove",i)}function ey(){let e=document.createElement("style");e.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(`
|
|
494
|
-
`),document.head.appendChild(e)}function ji(e){Re(e),Oe(e)}function Lr(e){let t=U.get(e);if(t){if(clearTimeout(t.gainedTimer),clearTimeout(t.lostTimer),clearTimeout(t.longPressTimer),t.state!=="none"){let i=at(e);i&&Pe(e,i)}e.classList.remove("interest-source"),U.delete(e),Yi.delete(e)}}function au(e=document){e.querySelectorAll(`[${K}]`).forEach(ji)}var ou=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute(K)&&ji(s),s.querySelectorAll(`[${K}]`).forEach(ji)}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;U.has(s)&&Lr(s),s.querySelectorAll(`[${K}]`).forEach(n=>{U.has(n)&&Lr(n)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let i=t.target;i.hasAttribute(K)?U.has(i)||ji(i):U.has(i)&&Lr(i)}}});cu||(ey(),ty(),document.documentElement.setAttribute("data-interest-polyfill",""),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{au(),ou.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[K]})}):(au(),ou.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[K]})));if(cu&&Mr){let e=()=>{document.querySelectorAll(`[${K}]`).forEach(Oe),new MutationObserver(t=>{for(let i of t){for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.hasAttribute(K)&&Oe(n),n.querySelectorAll(`[${K}]`).forEach(Oe)}i.type==="attributes"&&i.target.hasAttribute?.(K)&&Oe(i.target)}}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[K]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}zt();Or();Ee();var Pr="kbd[data-hotkey]";function gu(e=document){e.querySelectorAll(Pr).forEach(t=>Rr(t))}function ry(e,t){if(!/^[a-z][a-z0-9]*$/.test(t))return null;let i=`data-label-${t}`;return e.closest(`[${i}]`)?.getAttribute(i)||null}function Rr(e){let t=e.dataset.hotkey;if(!t||e.getAttribute("data-hotkey-init")===t)return;let i=gi(t);if(!i.length)return;e.setAttribute("data-hotkey-init",t);let s=[],n=document.createDocumentFragment();i.forEach((a,o)=>{let c=bn(a,G),l=ry(e,a),u=l&&!(G&&c.modifier)?l:c.label;s.push(l??c.spoken);let d=document.createElement("kbd");if(d.textContent=u,d.setAttribute("aria-hidden","true"),n.appendChild(d),o<i.length-1&&!G){let h=document.createElement("span");h.textContent="+",h.setAttribute("aria-hidden","true"),n.appendChild(h)}});let r=document.createElement("span");r.className="visually-hidden",r.textContent=s.join(" "),n.appendChild(r),e.replaceChildren(n),e.removeAttribute("aria-label")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>gu()):gu();var ay=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Pr)&&Rr(s),s.querySelectorAll(Pr).forEach(n=>Rr(n))}});ay.observe(document.documentElement,{childList:!0,subtree:!0});Hr();Kr();Gr();ta();na();ra();oa();ca();ma();va();ya();Aa();xa();ka();Ca();Ta();La();var $w=window.matchMedia("(prefers-reduced-motion: reduce)");function Ow(){return $w.matches||document.documentElement.hasAttribute("data-motion-reduced")}var Yd=0,Pw=new Map([["vb-fade-in","entrance"],["vb-slide-up","entrance"],["vb-pop","entrance"],["vb-slide-in-ltr","entrance"],["vb-slide-in-rtl","entrance"],["vb-fade-slide-up","entrance"],["vb-shadow-lift","entrance"],["vb-fade-out","exit"],["vb-collapse","exit"],["vb-slide-out-ltr","exit"],["vb-slide-out-rtl","exit"],["vb-shake","attention"],["vb-pulse","attention"],["vb-bounce","attention"],["vb-blink","attention"],["vb-neon-pulse","decoration"],["vb-3d-shift","decoration"],["vb-outline-glow-pulse","decoration"],["vb-rainbow","decoration"],["vb-gradient-flow","decoration"],["vb-shimmer","decoration"],["vb-shimmer-gradient","decoration"],["vb-glow","decoration"],["vb-float","decoration"]]),Gd="__vbEffectsRuntime",Xd=globalThis,C=Xd[Gd]??{_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_wiredTriggers:new WeakMap,_transitionCleanups:new WeakMap,_transitionFallback:new WeakSet,_processed:new WeakSet,_transitionProcessed:new WeakSet,_staggerTime:new WeakSet,_unresolved:new Set,_warnedTriggers:new Set,_unresolvedTimer:null,_keyframePhase:Pw,_observer:null,_animationEndHandler:null,_autoBooted:!1,effect(e,t){this._effects.set(e,t),document.querySelectorAll("[data-effect]").forEach(i=>{if(!(i.getAttribute("data-effect")||"").split(/\s+/).includes(e))return;let n=!this._instances.get(i)?.has(e);this._initEffect(i,e),n&&i.hasAttribute("data-effect-active")&&this._instances.get(i)?.get(e)?.activate?.()})},trigger(e,t){this._triggers.set(e,t),document.querySelectorAll("[data-effect][data-trigger]").forEach(i=>{if(!this._processed.has(i))return;let s=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(i,s)})},transition(e,t){this._transitions.set(e,t),document.querySelectorAll("[data-transition]").forEach(i=>{if(!this._transitionProcessed.has(i)||!this._transitionFallback.has(i))return;let s=i.getAttribute("data-transition")||"",n=s.indexOf(":");if((n>-1?s.slice(0,n):s)!==e)return;this._transitionFallback.delete(i);let r=i;r.style.viewTransitionName="";let a=t(i,n>-1?s.slice(n+1):null);a&&this._transitionCleanups.set(i,a)})},uid(e){return e.id?e.id:(e._vbUid||(Yd++,e._vbUid=`vb-${Yd}`),e._vbUid)},theme(e,t){this._themes=this._themes||new Map,this._themes.set(e,t)},applyTheme(e,t=document.documentElement){let i=this._themes?.get(e);if(i)for(let[s,n]of Object.entries(i))t.style.setProperty(s,n)},swap(e){if(!document.startViewTransition){e(),queueMicrotask(()=>this._dispatchVtDone(document.body));return}let t=document.startViewTransition(e);return t.updateCallbackDone.then(()=>{this._dispatchVtDone(document.body)}).catch(()=>{}),t},_dispatchVtDone(e){e.querySelectorAll('[data-trigger~="vt"]').forEach(t=>{this.emit(t,"vb:vt-update-done",{})})},activate(e){this._activateEffects(e)},deactivate(e){e.hasAttribute("data-effect-active")&&(e.removeAttribute("data-effect-active"),this.emit(e,"vb:phase-change",{active:!1}))},onPhaseEnd(e,t,i){let s=n=>{n.detail?.phase===t&&i(n.detail)};return e.addEventListener("vb:effect-phase-end",s),()=>e.removeEventListener("vb:effect-phase-end",s)},registerKeyframe(e,t){this._keyframePhase.set(e,t)},observe(e=document){if(e.querySelectorAll("[data-effect]").forEach(i=>this._processElement(i)),e.querySelectorAll("[data-stagger]").forEach(i=>this._processStagger(i)),e.querySelectorAll("[data-transition]").forEach(i=>this._processTransition(i)),this._observer)return;this._observer=new MutationObserver(i=>{let s=new Set;for(let n of i){if(n.type==="childList"){let r=n.target;r.hasAttribute?.("data-stagger")&&s.add(r);for(let a of n.addedNodes)a.nodeType===Node.ELEMENT_NODE&&this._processTree(a);for(let a of n.removedNodes)a.nodeType===Node.ELEMENT_NODE&&(a.isConnected||this._cleanupTree(a))}if(n.type==="attributes"){let r=n.target;n.attributeName==="data-effect"&&this._reconcileEffects(r),n.attributeName==="data-trigger"&&this._reconcileTrigger(r),n.attributeName==="data-stagger"&&(r.hasAttribute("data-stagger")?s.add(r):this._cleanupStagger(r)),n.attributeName==="data-transition"&&this._reconcileTransition(r)}}for(let n of s)n.isConnected&&this._processStagger(n)});let t=e===document?document.body:e;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]}),this._animationEndHandler||(this._animationEndHandler=i=>{let s=i.target;if(!(s instanceof Element)||!s.hasAttribute("data-effect"))return;let n=this._keyframePhase.get(i.animationName);n&&this.emit(s,"vb:effect-phase-end",{phase:n,animationName:i.animationName})},document.addEventListener("animationend",this._animationEndHandler))},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null),this._animationEndHandler&&(document.removeEventListener("animationend",this._animationEndHandler),this._animationEndHandler=null)},params(e){let t=getComputedStyle(e);return{get(i){return t.getPropertyValue(`--vb-${i}`).trim()},getNumber(i,s=0){let n=t.getPropertyValue(`--vb-${i}`).trim();return n?parseFloat(n):s},getTime(i,s=0){let n=t.getPropertyValue(`--vb-${i}`).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(i){return e.classList.contains(i)}}},emit(e,t,i={}){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))},prefersReducedMotion:Ow,_processTree(e){e.hasAttribute?.("data-effect")&&this._processElement(e),e.hasAttribute?.("data-stagger")&&this._processStagger(e),e.hasAttribute?.("data-transition")&&this._processTransition(e),e.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),e.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),e.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(e){e.hasAttribute?.("data-effect")&&this._cleanupElement(e),e.hasAttribute?.("data-transition")&&this._cleanupTransition(e),e.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),e.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(e){if(this._processed.has(e))return;this._processed.add(e),e.removeAttribute("data-effect-processed"),e.removeAttribute("data-effect-armed");let t=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let i of t)this._initEffect(e,i);this._wireTrigger(e,t)},_initEffect(e,t){let i=this._effects.get(t);if(!i)return;let s=this._instances.get(e);if(s?.has(t))return;let n=i(e);n&&(s||(s=new Map,this._instances.set(e,s)),typeof n=="function"?s.set(t,{cleanup:n}):s.set(t,n))},_parseTrigger(e){let t=e.indexOf(":");return t>-1?[e.slice(0,t),e.slice(t+1)]:[e,null]},_wireTrigger(e,t){let i=e.getAttribute("data-trigger");if(!i||!i.trim()){e.removeAttribute("data-effect-armed"),this._activateEffects(e);return}let s=i.split(/\s+/).filter(Boolean);this._wiredTriggers??=new WeakMap;let n=this._wiredTriggers.get(e);n||(n=new Set,this._wiredTriggers.set(e,n));let r=!1;for(let a of s){if(n.has(a))continue;let[o,c]=this._parseTrigger(a),l=this._triggers.get(o);if(!l){r=!0;continue}n.add(a);let u=l(e,()=>this._activateEffects(e),c);if(u){let d=this._triggerCleanups.get(e);if(d){let h=d;this._triggerCleanups.set(e,()=>{h(),u()})}else this._triggerCleanups.set(e,u)}}n.size&&e.setAttribute("data-effect-armed",""),r?(this._unresolved.add(e),this._scheduleUnresolvedCheck()):this._unresolved.delete(e)},_scheduleUnresolvedCheck(){if(this._unresolvedTimer)return;let e=()=>{this._unresolvedTimer=null,this._resolveUnknownTriggers()};typeof window>"u"||typeof window.addEventListener!="function"||(document.readyState==="complete"?this._unresolvedTimer=setTimeout(e,0):(this._unresolvedTimer=!0,window.addEventListener("load",()=>setTimeout(e,0),{once:!0})))},_resolveUnknownTriggers(){for(let e of[...this._unresolved]){if(this._unresolved.delete(e),!e.isConnected||!this._processed.has(e))continue;let i=(e.getAttribute("data-trigger")||"").split(/\s+/).filter(Boolean).filter(s=>!this._triggers.has(this._parseTrigger(s)[0]));if(i.length){for(let s of i){let n=this._parseTrigger(s)[0];this._warnedTriggers.has(n)||(this._warnedTriggers.add(n),console.warn(`[VB] data-trigger="${s}": no trigger named "${n}" is registered. The effect runs immediately instead. Register it with VB.trigger('${n}', \u2026) or check the spelling.`,e))}!e.hasAttribute("data-effect-armed")&&!e.hasAttribute("data-effect-active")&&this._activateEffects(e)}}},_activateEffects(e){e.setAttribute("data-effect-active",""),this.emit(e,"vb:phase-change",{active:!0});let t=this._instances.get(e);if(t)for(let[,i]of t)i.activate&&i.activate()},_cleanupElement(e){let t=this._instances.get(e);if(t){for(let[,s]of t)s.cleanup&&s.cleanup();this._instances.delete(e)}let i=this._triggerCleanups.get(e);i&&(i(),this._triggerCleanups.delete(e)),this._wiredTriggers?.delete(e),this._unresolved.delete(e),e.removeAttribute("data-effect-armed"),this._processed.delete(e)},_reconcileEffects(e){if(!e.hasAttribute("data-effect")){this._cleanupElement(e),e.removeAttribute("data-effect-active");return}let t=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],i=this._instances.get(e);if(i)for(let[s,n]of i)t.includes(s)||(n.cleanup&&n.cleanup(),i.delete(s));for(let s of t)i?.has(s)||this._initEffect(e,s);this._processed.has(e)||this._processElement(e)},_reconcileTrigger(e){if(!e.hasAttribute("data-effect"))return;let t=this._triggerCleanups.get(e);if(t&&(t(),this._triggerCleanups.delete(e)),this._wiredTriggers?.delete(e),this._unresolved.delete(e),e.removeAttribute("data-effect-armed"),!this._processed.has(e)){this._processElement(e);return}let i=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(e,i)},_parseStagger(e){let t=(e||"").trim().split(/\s+/).filter(Boolean),i=t.find(n=>/^(\d+(\.\d+)?|\.\d+)(ms|s)$/i.test(n))||null;return{mode:t.find(n=>n==="reverse"||n==="random"||n==="grid")||"",time:i}},_processStagger(e){let{mode:t,time:i}=this._parseStagger(e.getAttribute("data-stagger"));i?(e.style.setProperty("--vb-stagger",i),this._staggerTime.add(e)):this._staggerTime.has(e)&&(e.style.removeProperty("--vb-stagger"),this._staggerTime.delete(e));let s=Array.from(e.children),n=s.length,r;if(t==="reverse")r=Array.from({length:n},(a,o)=>n-1-o);else if(t==="random"){let a=this._hashString(this.uid(e));r=Array.from({length:n},(c,l)=>l);let o=a;for(let c=n-1;c>0;c--){o^=o<<13,o^=o>>>17,o^=o<<5;let l=Math.abs(o)%(c+1);[r[c],r[l]]=[r[l],r[c]]}}else t==="grid"?r=this._gridStaggerIndices(e,s):r=Array.from({length:n},(a,o)=>o);for(let a=0;a<n;a++)s[a].style.setProperty("--vb-stagger-index",String(r[a]))},_gridStaggerIndices(e,t){let i=t.length,s=()=>Array.from({length:i},(l,u)=>u);if(!i)return[];let n=t.map(l=>{let u=getComputedStyle(l);return[parseInt(u.gridRowStart,10),parseInt(u.gridColumnStart,10)]});if(n.every(([l,u])=>Number.isFinite(l)&&Number.isFinite(u))){let l=Math.min(...n.map(([d])=>d)),u=Math.min(...n.map(([,d])=>d));return n.map(([d,h])=>d-l+(h-u))}let r=t.map(l=>l.getBoundingClientRect?.());if(!r.every(Boolean)||r.every(l=>l.width===0&&l.height===0))return s();let a=getComputedStyle(e).direction==="rtl",o=this._trackRanks(r.map(l=>[l.top,l.bottom])),c=this._trackRanks(r.map(l=>a?[-l.right,-l.left]:[l.left,l.right]));return o.map((l,u)=>l+c[u])},_trackRanks(e){let t=e.map((r,a)=>a).sort((r,a)=>e[r][0]-e[a][0]),i=new Array(e.length),s=-1,n=-1/0;for(let r of t){let[a,o]=e[r];a>=n-.5?(s++,n=o):n=Math.min(n,o),i[r]=s}return i},_cleanupStagger(e){this._staggerTime.has(e)&&(e.style.removeProperty("--vb-stagger"),this._staggerTime.delete(e));for(let t of Array.from(e.children))t.style?.removeProperty("--vb-stagger-index")},_hashString(e){let t=5381;for(let i=0;i<e.length;i++)t=(t<<5)+t^e.charCodeAt(i);return t|0},_vtIdent(e){let t=String(e).replace(/[^A-Za-z0-9_ --]/g,"-");return(!t||/^(-?\d|--)/.test(t))&&(t=`vb-${t}`),t},_processTransition(e){if(this._transitionProcessed.has(e)||e.matches?.("[data-swap], content-swap"))return;let t=(e.getAttribute("data-transition")||"").trim();if(!t)return;this._transitionProcessed.add(e),e.removeAttribute("data-transition-processed");let[i,s]=this._parseTrigger(t),n=this._transitions.get(i);if(n){let r=n(e,s);r&&this._transitionCleanups.set(e,r)}else e.style.viewTransitionName=this._vtIdent(`${i}-${this.uid(e)}`),this._transitionFallback.add(e)},_cleanupTransition(e){if(!this._transitionProcessed.has(e))return;let t=this._transitionCleanups.get(e);t&&(t(),this._transitionCleanups.delete(e)),this._transitionFallback.has(e)&&(this._transitionFallback.delete(e),e.style.viewTransitionName=""),this._transitionProcessed.delete(e)},_reconcileTransition(e){this._cleanupTransition(e),e.hasAttribute("data-transition")&&this._processTransition(e)}};Xd[Gd]=C;if(typeof window<"u"){let e=window.VB;if(e&&e!==C)for(let t of Object.keys(e))t in C||(C[t]=e[t]);window.VB=C}typeof document<"u"&&!C._autoBooted&&(C._autoBooted=!0,document.body?C.observe():document.addEventListener("DOMContentLoaded",()=>C.observe(),{once:!0}));var Jd="vb-split-sr",Zd="vb-split";function Rw(e){return e.closest?.("[lang]")?.getAttribute("lang")||void 0}function qw(e,t){if(typeof Intl<"u"&&"Segmenter"in Intl)try{let i=new Intl.Segmenter(t,{granularity:"grapheme"});return Array.from(i.segment(e),s=>s.segment)}catch{}return Array.from(e)}function Fw(e,t){let i=[],s;if(typeof Intl<"u"&&"Segmenter"in Intl)try{s=Array.from(new Intl.Segmenter(t,{granularity:"word"}).segment(e))}catch{s=null}if(!s){for(let r of e.split(/(\s+)/))r&&i.push({text:r,space:/^\s+$/.test(r)});return i}let n="";for(let r of s){if(/^\s+$/.test(r.segment)){n&&(i.push({text:n,space:!1}),n=""),i.push({text:r.segment,space:!0});continue}let a=i[i.length-1];if(!r.isWordLike){a&&!a.space?a.text+=r.segment:n+=r.segment;continue}i.push({text:n+r.segment,space:!1}),n=""}return n&&i.push({text:n,space:!1}),i}function ds(e){for(let t of e.querySelectorAll(`.${Jd}`)){let i=t.nextElementSibling;i?.classList.contains(Zd)&&i.remove(),t.replaceWith(document.createTextNode(t.textContent||""))}e.normalize()}function Qd(e,{unit:t="word",className:i="",locale:s}={}){ds(e);let n=s||Rw(e),r=[],a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(l){let u=l.parentElement;return u&&u.closest("script, style, template, svg, math")?NodeFilter.FILTER_REJECT:l.nodeValue&&l.nodeValue.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});for(;a.nextNode();)r.push(a.currentNode);let o=[],c=l=>{let u=document.createElement("span");return i&&(u.className=i),u.textContent=l,o.push(u),u};for(let l of r){let u=l.nodeValue||"",d=document.createElement("span");d.className=Jd,d.textContent=u;let h=document.createElement("span");if(h.className=Zd,h.setAttribute("aria-hidden","true"),t==="grapheme")for(let f of qw(u,n)){let p=c(f);/^\s+$/.test(f)&&p.setAttribute("data-space",""),h.append(p)}else for(let f of Fw(u,n))h.append(f.space?document.createTextNode(f.text):c(f.text));l.replaceWith(d,h)}return o}function Na(e){let t=0,i=null;for(let s of e){let n=s.getBoundingClientRect(),r=n.top;i!==null&&r-i>n.height/2&&t++,i=r,s.style.setProperty("--i",String(t))}return e.length?t+1:0}var Ma="data-effect-reveal-init";C.effect("reveal",e=>{let t=e;if(ds(t),t.removeAttribute(Ma),C.prefersReducedMotion())return{cleanup(){}};let i=C.params(t);t.style.setProperty("--reveal-delay",i.get("reveal-delay")||"80ms"),t.style.setProperty("--reveal-duration",i.get("reveal-duration")||"400ms");let s=Qd(t,{className:"vb-reveal-chunk"});s.forEach((r,a)=>r.style.setProperty("--i",String(a))),t.setAttribute(Ma,"");let n=null;if(t.classList.contains("line")){Na(s);let r=t.clientWidth;n=new ResizeObserver(()=>{t.clientWidth!==r&&(r=t.clientWidth,Na(s))}),n.observe(t)}return{activate(){t.setAttribute("data-effect-active","")},cleanup(){n?.disconnect(),ds(t),t.removeAttribute(Ma),t.style.removeProperty("--reveal-delay"),t.style.removeProperty("--reveal-duration")}}});var th="data-effect-highlight-init";C.effect("highlight",e=>{let t=e,i=C.params(t).get("highlight-color");return i&&t.style.setProperty("--highlight-color",i),t.setAttribute(th,""),C.prefersReducedMotion()&&t.setAttribute("data-effect-active",""),{activate(){t.setAttribute("data-effect-active","")},cleanup(){t.removeAttribute(th),t.style.removeProperty("--highlight-color")}}});Ia();qa();var Ha="vb:recently-visited",Gw="vb:recently-visited:paused";var Xw="recently-visited:change";function Va(e){let t=document.querySelector(`meta[name="${e}"]`);return t?t.getAttribute("content")??"":null}function Jw(){return typeof document>"u"||document.documentElement.hasAttribute("data-vb-no-track")||Va("vb:no-track-history")!==null?!1:(Va("vb:track-history")??"").trim().toLowerCase()==="on"?!0:document.querySelector("recently-visited")!==null}function Zw(){try{return localStorage.getItem(Gw)==="1"}catch{return!1}}function Qw(){let e=Va("vb:track-history-params")||"";return new Set(e.split(/[\s,]+/).filter(Boolean))}function dh(e,t=null){if(typeof e!="string")return null;let i=e.trim().replace(/^[\\/]{2,}/,"/");if(!i)return null;let s;try{s=new URL(i,location.origin)}catch{return null}if(s.protocol!=="http:"&&s.protocol!=="https:"||s.origin!==location.origin)return null;let n=s.pathname.replace(/^\/{2,}/,"/"),r=s.search;if(t){let a=new URLSearchParams;for(let[c,l]of s.searchParams)t.has(c)&&a.append(c,l);let o=a.toString();r=o?`?${o}`:""}return n+r}function tA(){return dh(location.pathname+location.search,Qw())}function hh(e,t=Date.now()){if(!Array.isArray(e))return[];let i=[];for(let s of e){if(!s||typeof s!="object")continue;let n=Number(s.ts);if(!Number.isFinite(n)||Math.abs(t-n)>2592e6)continue;let r=dh(s.url);if(!r)continue;let a=typeof s.hash=="string"&&s.hash.startsWith("#")&&s.hash.length>1?s.hash:"";i.push({url:r,hash:a,title:typeof s.title=="string"?s.title:"",hashTitle:a&&typeof s.hashTitle=="string"?s.hashTitle:"",ts:n})}return i}function eA(){try{let e=localStorage.getItem(Ha);return e?hh(JSON.parse(e)):[]}catch{return[]}}function iA(e){window.dispatchEvent(new CustomEvent(Xw,{detail:{key:e}}))}function sA(e){try{localStorage.setItem(Ha,JSON.stringify(hh(e).slice(0,100)))}catch{}iA(Ha)}function nA(e){if(!e)return"";let t=e.slice(1);try{t=decodeURIComponent(t)}catch{}if(!t)return"";let i=document.getElementById(t);return i&&(i.textContent||"").trim().slice(0,80)||t}function Fa(){if(!Jw()||Zw()||location.protocol!=="http:"&&location.protocol!=="https:")return!1;let e=tA();if(!e)return!1;let t=location.hash.length>1?location.hash:"",i=(document.title||"").trim();if(!i)return!1;let s=eA(),n=e+t,r=s[0];if(r&&r.url+r.hash===n)return!1;let a=s.filter(o=>o.url+o.hash!==n);return a.unshift({url:e,hash:t,title:i,hashTitle:nA(t),ts:Date.now()}),sA(a),!0}var Ba=typeof document<"u"?document.documentElement:null;Ba&&!Ba.hasAttribute("data-vb-recently-visited-init")&&(Ba.setAttribute("data-vb-recently-visited-init",""),Fa(),window.addEventListener("pageshow",e=>{e.persisted&&Fa()}),window.addEventListener("hashchange",Fa));var mh=CSS.supports("anchor-name","--test"),rA=new Set(["BUTTON","A","AREA"]),bh=(()=>{let e=document.createElement("span");return e.setAttribute("popover","hint"),e.popover==="hint"})(),gh=new Map,fh=!1;function aA(){if(fh||bh)return;fh=!0;let e=t=>{gh.forEach((i,s)=>{s.matches(":popover-open")&&!t(s,i)&&s.hidePopover()})};document.addEventListener("keydown",t=>{t.key==="Escape"&&e(()=>!1)}),document.addEventListener("pointerdown",t=>{let i=t.target;e((s,n)=>s.contains(i)||n.contains(i))})}function vh(e){return e.getAttribute("aria-label")?.trim()||e.hasAttribute("aria-labelledby")||e.labels?.length||e.textContent?.trim()||e instanceof HTMLInputElement&&["button","submit","reset"].includes(e.type)&&e.value?!0:!!e.querySelector('img[alt]:not([alt=""]), [aria-label]:not([aria-hidden="true"])')}function yh(e,t,i){let s=(e.getAttribute(t)||"").split(/\s+/).filter(Boolean);s.includes(i)||e.setAttribute(t,[...s,i].join(" "))}function oA(e){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?rA.has(e.tagName):!1}function za(e,t){if(gh.set(t,e),aA(),oA(e)){e.setAttribute("interestfor",t.id),t.addEventListener("toggle",l=>{l.newState==="open"&&hs(e,t)});return}let i=null,s=null,n=t,r=()=>{clearTimeout(s),i=setTimeout(()=>{n.showPopover(),hs(e,t)},200)},a=()=>{clearTimeout(i),s=setTimeout(()=>{n.hidePopover()},100)},o=()=>{clearTimeout(s),n.showPopover(),hs(e,t)},c=()=>{clearTimeout(i),n.hidePopover()};e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",a),e.addEventListener("focus",o),e.addEventListener("blur",c),t.addEventListener("mouseenter",()=>clearTimeout(s)),t.addEventListener("mouseleave",a)}function Ua(e,t){if(!mh)return;let i=`--tooltip-anchor-${t.id}`;e.style.anchorName=i,t.style.positionAnchor=i,t.setAttribute("data-anchor","")}function cA(e){let t=e.getAttribute("title");if(!t)return;let i=!vh(e);i&&e.setAttribute("aria-label",t),e.removeAttribute("title");let s=document.createElement("div");s.setAttribute("role","tooltip"),s.setAttribute("popover",bh?"hint":"manual"),s.id=`tooltip-${crypto.randomUUID().slice(0,8)}`,s.textContent=t;let n=e.dataset.tooltipPosition||"top";s.dataset.tooltipPosition=n;let r=document.createElement("span");r.className="tooltip-arrow",r.setAttribute("aria-hidden","true"),s.appendChild(r),e.after(s),i||yh(e,"aria-describedby",s.id),Ua(e,s),za(e,s)}function lA(e,t){let i=document.getElementById(t);if(!i?.hasAttribute("popover"))return;let s=e.getAttribute("title");s&&(vh(e)||e.setAttribute("aria-label",s),e.removeAttribute("title")),yh(e,"aria-describedby",t),Ua(e,i),za(e,i)}function ph(e=document){e.querySelectorAll("[data-tooltip]").forEach(t=>{if(t.closest("tool-tip")||t.hasAttribute("data-tooltip-init"))return;t.setAttribute("data-tooltip-init","");let i=t.dataset.tooltip;i?lA(t,i):cA(t)}),e.querySelectorAll("[aria-describedby]").forEach(t=>{let i=t.getAttribute("aria-describedby")??"",s=document.getElementById(i);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||t.closest("tool-tip")||t.hasAttribute("data-tooltip-init")||(t.setAttribute("data-tooltip-init",""),Ua(t,s),za(t,s))}),e.querySelectorAll("[popovertarget]").forEach(t=>{let i=t.getAttribute("popovertarget")??"",s=document.getElementById(i);!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"&&hs(t,s)}))})}function hs(e,t){if(mh||t.hasAttribute("data-anchor"))return;let i=e.getBoundingClientRect(),s=t.dataset.tooltipPosition||"top",n=8,r=t.getBoundingClientRect(),a,o;switch(s){case"bottom":a=i.bottom+n,o=i.left+(i.width-r.width)/2;break;case"left":a=i.top+(i.height-r.height)/2,o=i.left-r.width-n;break;case"right":a=i.top+(i.height-r.height)/2,o=i.right+n;break;default:a=i.top-r.height-n,o=i.left+(i.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",()=>ph()):ph();var Wa="[data-vt-name]";function fs(e){let t=e;t.removeAttribute("data-vt-name-init"),t.style.viewTransitionName=t.dataset.vtName||""}function wh(e=document){e.querySelectorAll(Wa).forEach(fs)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>wh()):wh();var uA=new MutationObserver(e=>{for(let t of e){if(t.type==="attributes"){fs(t.target);continue}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Wa)&&fs(s),s.querySelectorAll(Wa).forEach(fs)}}});uA.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-vt-name"]});function ps(e,t){C.deactivate(e),e.offsetWidth,t()}function ja(e,t){if(C.prefersReducedMotion()){t();return}let i=new IntersectionObserver(([s])=>{s.isIntersecting&&(i.disconnect(),t())},{threshold:.1});return i.observe(e),()=>i.disconnect()}function dA(e){let t=(e||"0").trim(),i=parseFloat(t);return!Number.isFinite(i)||i<0?0:/^[\d.]+s$/i.test(t)?i*1e3:i}C.trigger("scroll",(e,t)=>ja(e,t));C.trigger("hover",(e,t)=>{let i=!1,s=!1;function n(u){let d=i||s;u==="hover"?i=!0:s=!0,d||ps(e,t)}function r(){!i&&!s&&C.deactivate(e)}let a=()=>n("hover"),o=()=>{i=!1,r()},c=()=>n("focus"),l=u=>{u.relatedTarget instanceof Node&&e.contains(u.relatedTarget)||(s=!1,r())};return e.addEventListener("pointerenter",a),e.addEventListener("pointerleave",o),e.addEventListener("focusin",c),e.addEventListener("focusout",l),()=>{e.removeEventListener("pointerenter",a),e.removeEventListener("pointerleave",o),e.removeEventListener("focusin",c),e.removeEventListener("focusout",l)}});C.trigger("click",(e,t,i)=>{function s(){i==="replay"?ps(e,t):e.hasAttribute("data-effect-active")?C.deactivate(e):t()}return e.addEventListener("click",s),()=>e.removeEventListener("click",s)});C.trigger("time",(e,t,i)=>{let s=setTimeout(t,dA(i));return()=>clearTimeout(s)});C.trigger("intersect",(e,t,i)=>{if(C.prefersReducedMotion()){t();return}if((i||"once")==="toggle"){let n=new IntersectionObserver(([r])=>{r.isIntersecting?t():C.deactivate(e)},{threshold:.1});return n.observe(e),()=>n.disconnect()}return ja(e,t)});C.trigger("media",(e,t,i)=>{if(!i)return;let s=window.matchMedia(i);function n(){s.matches?t():C.deactivate(e)}return s.addEventListener("change",n),n(),()=>s.removeEventListener("change",n)});C.trigger("event",(e,t,i)=>{if(!i)return;let s=()=>ps(e,t);return e.addEventListener(i,s),()=>e.removeEventListener(i,s)});C.trigger("vt",(e,t)=>{let i=()=>ps(e,t);return e.addEventListener("vb:vt-update-done",i),()=>e.removeEventListener("vb:vt-update-done",i)});var hA=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()");for(let e of["view-progress","scroll-progress"])C.trigger(e,(t,i)=>{if(!(hA&&!C.prefersReducedMotion()))return ja(t,i)});var fA=12;function Ot(e,t,i){let s=C.uid(t),n=i===void 0?`${e}-${s}`:`${e}-${s}-${i}`;return typeof CSS<"u"&&CSS.escape?CSS.escape(n):n.replace(/[^\w-]/g,"_")}function ce(e,t,i){return e.style.viewTransitionName=t,i&&(e.style.viewTransitionClass=i),()=>{e.style.viewTransitionName="",i&&(e.style.viewTransitionClass="")}}C.transition("morph",e=>ce(e,Ot("morph",e)));function pA(e,t){let i=(t||"forward").trim().toLowerCase();if(i==="left")return"slide-left";if(i==="right")return"slide-right";let n=!(getComputedStyle(e).direction==="rtl");return(i==="back"?!n:n)?"slide-left":"slide-right"}C.transition("slide",(e,t)=>ce(e,Ot("slide",e),pA(e,t)));C.transition("fade",e=>ce(e,Ot("fade",e),"fade"));C.transition("scale",e=>ce(e,Ot("scale",e),"scale"));C.transition("none",e=>ce(e,Ot("none",e),"vt-none"));function mA(e){let t=new Set,i=()=>{let n=Array.from(e.children);for(let r of t)r.parentElement!==e&&(r.style.viewTransitionName="",r.style.viewTransitionClass="",t.delete(r));n.forEach((r,a)=>{if(!(r instanceof HTMLElement))return;let o=Math.min(a,fA-1);r.style.viewTransitionName=Ot("stagger",e,C.uid(r)),r.style.viewTransitionClass=`fade vt-stagger-${o}`,t.add(r)})};i();let s=new MutationObserver(i);return s.observe(e,{childList:!0}),()=>{s.disconnect();for(let n of t)n.style.viewTransitionName="",n.style.viewTransitionClass="";t.clear()}}C.transition("stagger",e=>mA(e));C.transition("effect",(e,t)=>{let i=(t||"fade").trim();return ce(e,Ot("effect",e),/^-?[_a-zA-Z][\w-]*$/.test(i)?i:"fade")});var ms='progress[data-type="ring"]',Ah={xs:"2em",s:"3em",m:"4em",l:"6em",xl:"8em"};function bA(e){let t=e.max||100,i=e.value;return t>0?Math.round(i/t*100):0}var Ka=new WeakMap;function gA(e){let t=Ka.get(e);if(t)return t;let i=document.createElement("div");i.className="progress-ring-wrap";let s=e.dataset.size;return s&&Ah[s]&&i.style.setProperty("--progress-ring-size",Ah[s]),e.parentNode?.insertBefore(i,e),i.appendChild(e),t=document.createElement("span"),t.className="progress-ring-label",t.setAttribute("aria-hidden","true"),i.appendChild(t),Ka.set(e,t),t}function Sh(e){let t=bA(e);e.style.setProperty("--progress",String(t));let i=e.dataset.label;if(i==="none")return;let s=!e.hasAttribute("value");if(s&&!Ka.has(e))return;let n=gA(e);n.hidden=s,n.textContent=i||t+"%"}function Ya(e){e.hasAttribute("data-enhanced")||(e.setAttribute("data-enhanced",""),Sh(e))}function Eh(e=document){e.querySelectorAll(ms).forEach(t=>Ya(t))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Eh()):Eh();var vA=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(ms)&&Ya(s),s.querySelectorAll(ms).forEach(n=>Ya(n))}if(t.type==="attributes"){let i=t.target;i.matches(ms)&&i.hasAttribute("data-enhanced")&&Sh(i)}}});vA.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","max"]});function xh(e){document.querySelectorAll("browser-window").forEach(t=>{t.setAttribute("mode",e)}),document.querySelectorAll("code-block").forEach(t=>{t.setAttribute("theme",e)})}function kh(){let{effectiveMode:e}=_.getState();xh(e),window.addEventListener("vb:theme-change",i=>{xh(i.detail.effectiveMode)}),new MutationObserver(i=>{let{effectiveMode:s}=_.getState();for(let n of i)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})}var LE=[{selector:"[data-wizard]",load:()=>Promise.resolve().then(()=>(Dh(),_h))},{selector:"[data-gesture]",load:()=>Promise.resolve().then(()=>(kn(),xn))},{selector:"[data-keyboard-aware]",load:()=>Promise.resolve().then(()=>(Oh(),$h))},{selector:"[data-focus-trap]",load:()=>Promise.resolve().then(()=>(qh(),Rh))},{selector:"[data-scroll-hide]",load:()=>Promise.resolve().then(()=>(Bh(),CA))},{selector:"[data-spotlight]",load:()=>Promise.resolve().then(()=>(zh(),Vh))},{selector:"[data-splitter]",load:()=>Promise.resolve().then(()=>(na(),Pu))},{selector:"[data-back-to-top]",load:()=>Promise.resolve().then(()=>(Or(),bu))},{selector:"[data-hotkey]:not(kbd)",load:()=>Promise.resolve().then(()=>(Gh(),Yh))},{selector:'a[target="_blank"]',load:()=>Promise.resolve().then(()=>(ef(),tf))},{selector:"[data-watch-page], watch-wc",load:()=>Promise.resolve().then(()=>(br(),mr))},{selector:"img[data-responsive]",load:()=>Promise.resolve().then(()=>(cf(),of))},{selector:"form-field[data-floating-label]",load:()=>Promise.resolve().then(()=>(hf(),df))},{selector:"button[data-loading]",load:()=>Promise.resolve().then(()=>(vf(),gf))},{selector:"input[data-mask]",load:()=>Promise.resolve().then(()=>(xa(),Nd))},{selector:"input[data-accept]",load:()=>Promise.resolve().then(()=>(ka(),$d))},{selector:'input[type="file"][data-upload]',load:()=>Promise.resolve().then(()=>(ya(),vd))},{selector:'input[type="range"][data-range]',load:()=>Promise.resolve().then(()=>(va(),dd))},{selector:'input[type="number"][data-stepper]',load:()=>Promise.resolve().then(()=>(Ta(),zd))},{selector:'input[type="checkbox"][data-switch]',load:()=>Promise.resolve().then(()=>(ra(),Fu))},{selector:'input[type="color"][data-color]',load:()=>Promise.resolve().then(()=>(La(),Kd))},{selector:"textarea[data-grow]",load:()=>Promise.resolve().then(()=>(ca(),Ju))},{selector:"textarea[data-count]",load:()=>Promise.resolve().then(()=>(oa(),Ku))},{selector:"fieldset[data-toggle-tags][data-max]",load:()=>Promise.resolve().then(()=>(Ca(),qd))},{selector:"form[data-autosave]",load:()=>Promise.resolve().then(()=>(Aa(),Ed))},{selector:"form[data-vb-email-form]",load:()=>Promise.resolve().then(()=>(Af(),wf))},{selector:"form[data-vb-newsletter-form]",load:()=>Promise.resolve().then(()=>(Lf(),Tf))},{selector:"[data-copy], [data-copy-target], [data-paste-target]",load:()=>Promise.resolve().then(()=>(zt(),kc))},{selector:"[data-select-all]",load:()=>Promise.resolve().then(()=>(Ia(),nh))},{selector:"[data-show-when], [data-hide-when]",load:()=>Promise.resolve().then(()=>(ma(),rd))},{selector:"[data-spoiler]",load:()=>Promise.resolve().then(()=>(ta(),Du))},{selector:"[data-math], code.language-math",load:()=>Promise.resolve().then(()=>(qa(),uh))},{selector:"time[data-format-date]",load:()=>Promise.resolve().then(()=>(Kr(),ku))},{selector:"data[data-format-number]",load:()=>Promise.resolve().then(()=>(Hr(),yu))},{selector:"data[data-format-bytes]",load:()=>Promise.resolve().then(()=>(Gr(),Lu))},{selector:"[data-audio-playlist]",load:()=>Promise.resolve().then(()=>($f(),If))},{selector:"[data-paged]",load:()=>Promise.resolve().then(()=>(Uf(),zf))},{selector:"[data-sortable], [data-sort-target]",load:()=>Promise.resolve().then(()=>(np(),sp))},{selector:"[data-toggle]",load:()=>Promise.resolve().then(()=>(hp(),dp))},{selector:'table[data-responsive="card"]',load:()=>Promise.resolve().then(()=>(bp(),mp))}],he=new Set,Qe=null,Co=0;function NE(){Co=0;for(let e of he)document.querySelector(e.selector)&&(he.delete(e),e.load());he.size||(Qe?.disconnect(),Qe=null)}function ME(){if(Qe||!he.size||typeof MutationObserver>"u")return;let e=document.documentElement;e&&(Qe=new MutationObserver(()=>{Co||(Co=window.setTimeout(NE,100))}),Qe.observe(e,{childList:!0,subtree:!0,attributes:!0}))}function _E(e,t=document){for(let i of e)t.querySelector(i.selector)?(he.delete(i),i.load()):t===document&&he.add(i);t===document&&ME()}function gp(e=document){_E(LE,e)}Zn();var DE=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","badInput"],IE={"data-label-group":"Group","data-message-min-checked":"Select at least {min}","data-message-max-checked":"Select no more than {max}","data-message-invalid-selection":"Invalid selection","data-message-match":"Values do not match","data-message-network":"Something went wrong. Please try again."},ti=new WeakSet,fe=new WeakSet,$E=0;function Rt(e,t,i,s={}){return(t?.getAttribute(i)??e.getAttribute(i)??IE[i]??"").replace(/\{(\w+)\}/g,(r,a)=>a in s?String(s[a]):r)}function vp(e,t){let i=e.closest("[lang]")?.getAttribute("lang")||void 0,s="other";try{s=new Intl.PluralRules(i).select(t)}catch{}return(e.getAttribute(`data-label-summary-${s}`)??e.getAttribute("data-label-summary")??(t===1?"Please fix {count} error:":"Please fix {count} errors:")).replaceAll("{count}",String(t))}function ei(e){return[...e.elements].filter(t=>t.willValidate&&!("honeypot"in t.dataset))}function yp(e){return ei(e).filter(t=>t.dataset.match)}function xp(e){return[...e.querySelectorAll("form-field[data-upgraded]")]}function Mo(e){let t=e.closest("form-field[data-upgraded]");return t&&t.input===e?t:null}function kp(e){return e.id||(e.id=`vb-field-${++$E}`),e.id}function OE(e){return!e.disabled&&!e.closest("[inert], [hidden]")&&e.getClientRects().length>0}function PE(e,t){if(t.type==="radio"){let s=t.closest("fieldset")?.querySelector(":scope > legend")?.textContent?.trim();if(s)return s}let i=Mo(t);return i?.fieldName?i.fieldName:t.labels?.[0]?.textContent?.trim()||t.getAttribute("aria-label")||t.name||t.id||Rt(e,null,"data-label-group")}function RE(e){let t=Mo(e);if(t&&typeof t.errorMessage=="string"&&t.errorMessage)return t.errorMessage;let i=Lo(e)?.textContent?.trim();if(i)return i;for(let s of DE){if(!e.validity[s])continue;let n=e.getAttribute(`data-message-${s.toLowerCase()}`);if(n)return n;break}return e.validationMessage}function Lo(e){let t=e.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 e.closest("form-field")?.querySelector("output.error")??null}function qE(e){return e.querySelector('input:not([type="hidden"]), select, textarea, button')}function Cp(e,t){let i=e.dataset.match;return i?t.querySelector(`#${CSS.escape(i)}`)??t.querySelector(`[name="${CSS.escape(i)}"]`):null}function ks(e,t){let i=Cp(e,t);if(i){if(e.setCustomValidity(""),e.value&&i.value&&e.value!==i.value){let s=Rt(t,e,"data-message-match");e.setCustomValidity(s);let n=Lo(e);n&&(n.textContent=s)}else if(e.validity.valid){let s=Lo(e);s&&(s.textContent="")}}}function wp(e,t){let s=[...t.querySelectorAll('input[type="checkbox"]')].filter(c=>c.checked).length,n=parseInt(t.dataset.minChecked??"0",10),r=parseInt(t.dataset.maxChecked??"999",10),a=t.querySelector(":scope > output"),o=null;return s<n&&(o=Rt(e,t,"data-message-min-checked",{min:n,max:r})),s>r&&(o=Rt(e,t,"data-message-max-checked",{min:n,max:r})),a&&(a.textContent=o??""),o?t.dataset.invalid="":delete t.dataset.invalid,!o}function Ap(e){return[...e.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]")]}function Tp(e){let t=[],i=new Set;for(let s of ei(e)){if(s.validity.valid)continue;let n=s;if(s.type==="radio"&&s.name){if(i.has(s.name))continue;i.add(s.name),n=ei(e).find(r=>r.type==="radio"&&r.name===s.name)??s}t.push({target:n,label:PE(e,s),message:RE(s)})}for(let s of e.querySelectorAll("fieldset[data-invalid]")){let n=qE(s);if(!n)continue;let r=s.querySelector(":scope > output");t.push({target:n,label:s.querySelector(":scope > legend")?.textContent?.trim()||Rt(e,s,"data-label-group"),message:r?.textContent?.trim()||Rt(e,s,"data-message-invalid-selection")})}return t.sort((s,n)=>s.target.compareDocumentPosition(n.target)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t}function Lp(e){return Tp(e).map(t=>t.target).find(OE)??null}function FE(e){let t=e.querySelector("[data-form-summary]");if(t)return{el:t,type:"authored",signature:"",active:!1};let i=e.querySelector("output.error-summary");return i?{el:i,type:"legacy",signature:"",active:!1}:null}function Ep(e){return e.map(t=>{let i=document.createElement("li"),s=document.createElement("a");return s.href=`#${kp(t.target)}`,s.textContent=`${t.label}: ${t.message}`,i.append(s),i})}function No(e,t,{focus:i=!1}={}){if(!t)return;let s=Tp(e);if(s.length===0){Np(t);return}t.active=!0;let n=s.map(a=>`${kp(a.target)}\0${a.label}\0${a.message}`).join(""),r=n!==t.signature;if(t.signature=n,t.type==="authored"){if(r){t.el.querySelector("[data-summary-list]")?.replaceChildren(...Ep(s));let a=t.el.querySelector("[data-summary-heading]");a&&(a.textContent=vp(e,s.length))}(t.el.hidden||!t.el.hasAttribute("data-state-visible"))&&(t.el.hidden=!1,t.el.offsetHeight,t.el.dataset.stateVisible="")}else if(r){let a=document.createElement("p");a.textContent=vp(e,s.length);let o=document.createElement("ul");o.append(...Ep(s)),t.el.replaceChildren(a,o)}i&&t.el.focus()}function BE(e){let t=getComputedStyle(e),i=r=>r.split(",").map(a=>parseFloat(a)*(a.trim().endsWith("ms")?1:1e3)||0),s=i(t.transitionDuration),n=i(t.transitionDelay);return Math.max(0,...s.map((r,a)=>r+(n[a]??n[0]??0)))}function Np(e){if(e)if(e.active=!1,e.signature="",e.type==="authored"){let t=e.el;delete t.dataset.stateVisible;let i=()=>{t.hasAttribute("data-state-visible")||(t.hidden=!0,t.querySelector("[data-summary-list]")?.replaceChildren())},n=matchMedia("(prefers-reduced-motion: reduce)").matches?0:BE(t);n===0?i():setTimeout(i,n+50)}else e.el.replaceChildren()}function HE(e){e&&e.el.addEventListener("click",t=>{let i=t.target.closest('a[href^="#"]');if(!i)return;t.preventDefault();let s=document.getElementById((i.getAttribute("href")??"#").slice(1));s&&(s.scrollIntoView({behavior:"smooth",block:"center"}),s.focus())})}function VE(e){for(let t of ei(e))Mo(t)||(t.validity.valid?fe.has(t)&&(t.removeAttribute("aria-invalid"),fe.delete(t)):(t.setAttribute("aria-invalid","true"),fe.add(t)))}function Sp(e){let t=e.target;if(!fe.has(t))return;let i=t.type==="radio"&&t.form&&t.name?ei(t.form).filter(s=>s.type==="radio"&&s.name===t.name):[t];for(let s of i)fe.has(s)&&s.validity.valid&&(s.removeAttribute("aria-invalid"),fe.delete(s))}function zE(e){let t=e.querySelector("[data-form-error]");return t||(t=document.createElement("p"),t.setAttribute("data-form-error",""),t.hidden=!0,e.prepend(t)),t.hasAttribute("role")||t.setAttribute("role","alert"),t}function UE(e){e.dataset.error="network";let t=zE(e);(!t.textContent.trim()||t.hasAttribute("data-vb-generated"))&&(t.textContent=Rt(e,null,"data-message-network"),t.setAttribute("data-vb-generated","")),t.hidden=!1}function WE(e){if(e.hasAttribute("data-success")){delete e.dataset.success;let i=e.querySelector("[data-form-success]");i&&(i.hidden=!0)}delete e.dataset.error;let t=e.querySelector("[data-form-error]");t&&(t.hidden=!0)}function jE(e){e.dataset.success="";let t=e.querySelector("[data-form-success]");t&&(t.hidden=!1,t.hasAttribute("tabindex")||(t.tabIndex=-1),t.hasAttribute("role")||t.setAttribute("role","status"),t.focus())}function KE(e){return[...e.elements].find(t=>t instanceof HTMLButtonElement&&t.type==="submit"||t instanceof HTMLInputElement&&(t.type==="submit"||t.type==="image"))??null}function Mp(e,t){try{return t?new FormData(e,t):new FormData(e)}catch{return new FormData(e)}}function YE(e,t){return t?.hasAttribute("formenctype")?t.formEnctype:e.hasAttribute("enctype")?e.enctype:"multipart/form-data"}function GE(e,t){if(t==="multipart/form-data")return e;let i=[...e].map(([s,n])=>[s,typeof n=="string"?n:n.name]);return t==="text/plain"?i.map(([s,n])=>`${s}=${n}\r
|
|
495
|
-
`).join(""):new URLSearchParams(i)}async function XE(e,t){let i=t??KE(e),n=(t?.getAttribute("formmethod")||e.getAttribute("method")||"post").toLowerCase()==="get"?"GET":"POST",r=t?.hasAttribute("formaction")?t.formAction:e.action;e.dataset.submitting="",i&&i.setAttribute("aria-disabled","true");let a=()=>{delete e.dataset.submitting,i&&i.getAttribute("aria-busy")!=="true"&&i.removeAttribute("aria-disabled")};try{let o=Mp(e,t),c;if(n==="GET"){let l=new URL(r,document.baseURI);l.search="";for(let[u,d]of o)typeof d=="string"&&l.searchParams.append(u,d);c=await fetch(l,{method:n})}else c=await fetch(r,{method:n,body:GE(o,YE(e,t))});if(a(),!c.ok){if((c.headers.get("content-type")??"").includes("application/json")){let u=await c.json();if(u.errors){JE(e,u.errors);return}}throw new Error(`Server error: ${c.status}`)}jE(e)}catch{a(),UE(e)}}function JE(e,t){e.dataset.error="";let i=xp(e),s=!1;for(let n of i){let r=n.input??n.querySelector("input, textarea, select");if(!r)continue;let a=t[r.name];a&&(n.setError(String(a)),s=!0)}if(s){let n=e._vbSummary;n?No(e,n,{focus:!0}):Lp(e)?.focus()}for(let n of i)(n.input??n.querySelector("input, textarea, select"))?.addEventListener("input",()=>n.clearError(),{once:!0})}function ZE(e,t){setTimeout(()=>{if(!e.isConnected)return;let i=t?.isConnected&&t.form===e?t:null;ti.add(e);try{i?e.requestSubmit(i):e.requestSubmit()}catch{ti.delete(e),e.submit()}ti.delete(e)})}function To(e){if(e.hasAttribute("data-vb-enhanced"))return;e.setAttribute("novalidate",""),e.setAttribute("data-vb-enhanced","");let t=FE(e);e._vbSummary=t,t&&HE(t);for(let i of yp(e))i.addEventListener("input",()=>ks(i,e)),i.addEventListener("blur",()=>ks(i,e)),Cp(i,e)?.addEventListener("input",()=>ks(i,e));for(let i of Ap(e))i.addEventListener("change",()=>wp(e,i));if(e.addEventListener("input",Sp),e.addEventListener("change",Sp),e.addEventListener("submit",i=>{if(ti.has(e)){ti.delete(e);return}i.preventDefault();let s=i.submitter??null;WE(e);let n=!!s?.hasAttribute("formnovalidate");if(!n){for(let c of xp(e))c.validate();for(let c of yp(e))ks(c,e);for(let c of Ap(e))wp(e,c);VE(e)}if(!(n||e.checkValidity()&&!e.querySelector("fieldset[data-invalid]"))){if(t)No(e,t,{focus:!0});else{let c=Lp(e);c&&(c.scrollIntoView({behavior:"smooth",block:"center"}),c.focus())}return}Np(t);let a=new CustomEvent("vb:beforesubmit",{bubbles:!0,cancelable:!0,detail:{form:e,submitter:s}});if(e.dispatchEvent(a),a.defaultPrevented)return;let o=e.dataset.submit??"native";o==="fetch"?XE(e,s):o==="event"?e.dispatchEvent(new CustomEvent("vb:submit",{bubbles:!0,cancelable:!0,detail:Mp(e,s)})):ZE(e,s)}),t){let i=()=>requestAnimationFrame(()=>{t.active&&No(e,t)});e.addEventListener("focusout",i),e.addEventListener("change",i)}}function _p(){for(let t of document.querySelectorAll("form[data-validate]"))To(t);new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-validate]")&&To(n),n.querySelectorAll?.("form[data-validate]").forEach(r=>To(r))}}).observe(document.body,{childList:!0,subtree:!0})}D();var Dp='<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>',QE='<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>',pe={password:new WeakSet,otp:new WeakSet,strength:new WeakSet},tS=0;function z(e,t,i){return e.getAttribute(`data-label-${t}`)??i}function _o(e){let t=e.querySelector('input[type="password"]');if(!t||pe.password.has(e)||t.closest(".password-wrapper")||e.querySelector(".password-toggle"))return;pe.password.add(e);let i=z(e,"show-password","Show password"),s=z(e,"hide-password","Hide password"),n=document.createElement("div");n.className="password-wrapper",t.parentNode.insertBefore(n,t),n.appendChild(t);let r=document.createElement("button");r.type="button",r.className="password-toggle",r.setAttribute("aria-label",i),r.setAttribute("aria-pressed","false"),r.innerHTML=Dp,n.appendChild(r),r.addEventListener("click",()=>{let a=t.type==="password";t.type=a?"text":"password",r.setAttribute("aria-pressed",String(a)),r.setAttribute("aria-label",a?s:i),r.innerHTML=a?QE:Dp})}function Do(e){let t=e.querySelector('input[data-type="otp"], input[data-type="pin"]');if(!t||pe.otp.has(e)||e.querySelector(".otp-wrapper"))return;let i=t;pe.otp.add(e),e.setAttribute("data-otp-ready","");let s=Math.max(1,parseInt(i.dataset.length||"6",10)||6),n=i.id||`otp-${++tS}`;i.classList.add("otp-source"),i.tabIndex=-1,i.setAttribute("aria-hidden","true"),i.hasAttribute("pattern")||(i.pattern=`\\d{${s}}`),i.maxLength=s;let r=i.getAttribute("autocomplete")||(i.dataset.type==="otp"?"one-time-code":"off");i.setAttribute("autocomplete","off"),i.hasAttribute("data-message-patternmismatch")||i.setAttribute("data-message-patternmismatch",z(e,"incomplete","Enter all {total} digits").replace("{total}",String(s)));let a=i.id&&e.querySelector(`label[for="${CSS.escape(i.id)}"]`)||e.querySelector("label"),o=document.createElement("div");o.className="otp-wrapper",o.setAttribute("role","group"),a&&(a.id||(a.id=`${n}-label`),o.setAttribute("aria-labelledby",a.id));let c=[...e.querySelectorAll("output.hint")].map((m,b)=>(m.id||(m.id=`${n}-hint${b?`-${b}`:""}`),m.id)),l=[...new Set([...(i.getAttribute("aria-describedby")??"").split(/\s+/),...c])].filter(Boolean);l.length&&o.setAttribute("aria-describedby",l.join(" ")),i.after(o);let u=z(e,"digit","Digit {n} of {total}"),d=[];for(let m=0;m<s;m++){let b=document.createElement("input");b.type="text",b.inputMode="numeric",b.pattern="[0-9]",b.className="otp-digit",b.setAttribute("autocomplete",m===0?r:"off"),b.setAttribute("aria-label",u.replace("{n}",String(m+1)).replace("{total}",String(s))),d.push(b),o.appendChild(b)}[...i.value.replace(/\D/g,"").slice(0,s)].forEach((m,b)=>{d[b].value=m});function f(){i.value=d.map(m=>m.value).join(""),i.dispatchEvent(new Event("input",{bubbles:!0}))}function p(m,b){let g=b.replace(/\D/g,"").slice(0,s-m).split("");g.forEach((y,$)=>{d[m+$].value=y});let A=d.findIndex(y=>!y.value);A!==-1?d[A].focus():d[Math.min(m+Math.max(g.length,1)-1,s-1)].focus(),f()}d.forEach((m,b)=>{m.addEventListener("input",()=>{let g=m.value;if(g.length>1){m.value="",p(b,g);return}if(g&&!/^\d$/.test(g)){m.value="";return}g&&b<d.length-1&&d[b+1].focus(),f()}),m.addEventListener("keydown",g=>{g.key==="Backspace"&&!m.value&&b>0&&d[b-1].focus();let A=getComputedStyle(o).direction==="rtl",y=A?"ArrowRight":"ArrowLeft",$=A?"ArrowLeft":"ArrowRight";g.key===y&&b>0&&(g.preventDefault(),d[b-1].focus()),g.key===$&&b<d.length-1&&(g.preventDefault(),d[b+1].focus())}),m.addEventListener("paste",g=>{g.preventDefault();let A=(g.clipboardData||window.clipboardData)?.getData("text")??"";p(0,A)}),m.addEventListener("focus",()=>{m.select()})}),i.addEventListener("focus",()=>{(d.find(m=>!m.value)??d[s-1]).focus()}),i.form?.addEventListener("reset",()=>{queueMicrotask(()=>{let m=i.value.replace(/\D/g,"");d.forEach((b,g)=>{b.value=m[g]??""})})}),e.addEventListener("click",m=>{m.target===e&&d[0].focus()})}var Ip=["weak","fair","good","strong"],eS=0;function Io(e){let t=e.querySelector("input[data-strength]");if(!t||pe.strength.has(e))return;let i=t;pe.strength.add(e),e.querySelectorAll(".strength-meter, .strength-rules, .strength-status").forEach(L=>L.remove());let s=$p(i.dataset.rules||"length:8",e),n={weak:z(e,"strength-weak","Weak"),fair:z(e,"strength-fair","Fair"),good:z(e,"strength-good","Good"),strong:z(e,"strength-strong","Strong")},r=z(e,"strength","Password strength"),a=z(e,"strength-empty","No password entered"),o=z(e,"rule-met","met"),c=z(e,"rule-unmet","not met"),l=`strength-${++eS}`,u=document.createElement("div");u.className="strength-meter";let d=document.createElement("meter");d.min=0,d.max=s.length,d.low=Math.ceil(s.length*.4),d.high=Math.ceil(s.length*.75),d.optimum=s.length,d.value=0,d.className="s",d.setAttribute("aria-label",r);let h=document.createElement("span");h.className="strength-label",h.setAttribute("aria-hidden","true"),u.append(d,h);let f=document.createElement("ul");f.className="strength-rules",f.id=`${l}-rules`,f.setAttribute("aria-label",z(e,"requirements","Password requirements"));let p=s.map(L=>{let N=document.createElement("li");N.dataset.rule=L.type;let V=document.createElement("span");return V.className="visually-hidden",N.append(L.label,V),f.append(N),{li:N,state:V}}),m=document.createElement("span");m.className="strength-status visually-hidden",m.setAttribute("role","status"),(e.querySelector(".password-wrapper")||i).insertAdjacentElement("afterend",u),u.insertAdjacentElement("afterend",f),f.insertAdjacentElement("afterend",m);let g=new Set((i.getAttribute("aria-describedby")||"").split(/\s+/).filter(L=>L&&!/^strength-\d+-rules$/.test(L)));g.add(f.id),i.setAttribute("aria-describedby",[...g].join(" "));let A=Ip.indexOf(i.dataset.strengthMin??""),y=z(e,"strength-too-weak","Choose a stronger password. Meet more of the requirements."),$=0,M="";function X({announce:L=!0}={}){let N=i.value,V=0;s.forEach((ot,Jp)=>{let Ts=iS(ot,N),{li:Zp,state:Qp}=p[Jp];Zp.toggleAttribute("data-met",Ts),Qp.textContent=`: ${Ts?o:c}`,Ts&&V++}),d.value=V;let me=V/s.length,et=N.length===0?"":me<.4?"weak":me<.75?"fair":me<1?"good":"strong",qt=et?n[et]:"";if(h.textContent=qt,u.dataset.level=et,d.setAttribute("aria-valuetext",qt||a),A>=0){let ot=et!==""&&Ip.indexOf(et)<A;i.setCustomValidity(ot?y:"")}et!==M&&(M=et,clearTimeout($),L&&et?$=window.setTimeout(()=>{m.textContent=`${r}: ${qt}`},600):m.textContent="")}i.addEventListener("input",()=>X()),I(i,()=>X({announce:!1})),X({announce:!1})}function $p(e,t){let i=[];for(let s of e.split(",")){let[n,r]=s.trim().split(":");switch(n){case"length":{let a=parseInt(r)||8;i.push({type:n,param:a,label:z(t,"rule-length","At least {n} characters").replace("{n}",String(a))});break}case"uppercase":i.push({type:n,label:z(t,"rule-uppercase","One uppercase letter")});break;case"lowercase":i.push({type:n,label:z(t,"rule-lowercase","One lowercase letter")});break;case"number":i.push({type:n,label:z(t,"rule-number","One number")});break;case"special":i.push({type:n,label:z(t,"rule-special","One special character")});break;case"":break;default:console.warn(`[data-strength] Unknown rule "${n}" ignored.`,t)}}return i.length?i:$p("length:8",t)}function iS(e,t){switch(e.type){case"length":return[...t].length>=(e.param||8);case"uppercase":return/\p{Lu}/u.test(t);case"lowercase":return/\p{Ll}/u.test(t);case"number":return/\p{N}/u.test(t);case"special":return/[^\p{L}\p{N}]/u.test(t);default:return!1}}function sS(){document.querySelectorAll('form-field:has(input[type="password"])').forEach(_o)}function nS(){document.querySelectorAll('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])').forEach(Do)}function rS(){document.querySelectorAll("form-field:has(input[data-strength])").forEach(Io)}function Op(){sS(),nS(),rS(),new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.('form-field:has(input[type="password"])')&&_o(n),(n.matches?.('form-field:has(input[data-type="otp"])')||n.matches?.('form-field:has(input[data-type="pin"])'))&&Do(n),n.matches?.("form-field:has(input[data-strength])")&&Io(n),n.querySelectorAll?.('form-field:has(input[type="password"])')?.forEach(_o),n.querySelectorAll?.('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])')?.forEach(Do),n.querySelectorAll?.("form-field:has(input[data-strength])")?.forEach(Io)}}).observe(document.body,{childList:!0,subtree:!0})}function aS(e){let t=Date.now(),i=e*7+t%9973&65535;return btoa(JSON.stringify({s:e,t,c:i}))}function oS(e,t,i){let s=0,n=e.submitAt-(e.firstInteractionAt??e.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&&e.keyboardEventCount===0&&(s+=30),e.fieldFocusCount===0&&(s+=40),!i&&!e.mouseMovedInForm&&(s+=20),n<1e3?s+=80:n<3e3&&(s+=50),Math.min(s,100)}function cS(e){return new Promise((t,i)=>{let s=document.createElement("script");s.src=e,s.async=!0,s.onload=t,s.onerror=i,document.head.appendChild(s)})}async function lS(e,t){if(!document.querySelector("[data-cf-turnstile-loaded]"))try{await cS("https://challenges.cloudflare.com/turnstile/v0/api.js"),document.head.dataset.cfTurnstileLoaded="";let i=document.createElement("div");i.className="cf-turnstile",i.dataset.sitekey=t,i.dataset.size="invisible",e.appendChild(i)}catch{}}function $o(e){if(e.hasAttribute("data-bot-enhanced"))return;e.setAttribute("data-bot-enhanced","");let t={fieldFocusCount:0,keyboardEventCount:0,mouseMovedInForm:!1,firstInteractionAt:null,submitAt:null},i=navigator.maxTouchPoints>0;e.addEventListener("focusin",s=>{s.target.matches("input, textarea, select")&&!("honeypot"in s.target.dataset)&&(t.fieldFocusCount++,t.firstInteractionAt??=Date.now())},{capture:!0}),e.addEventListener("keydown",s=>{s.target.matches("input, textarea")&&t.keyboardEventCount++},{capture:!0}),i||e.addEventListener("mousemove",()=>{t.mouseMovedInForm=!0},{once:!0}),e.addEventListener("vb:beforesubmit",s=>{t.submitAt=Date.now();let n=oS(t,e,i),r=e.querySelector("[data-bot-score-field]");if(r||(r=document.createElement("input"),r.type="hidden",r.name="_vb_score",r.dataset.botScoreField="",e.appendChild(r)),r.value=aS(n),n>=80){s.preventDefault(),e.dispatchEvent(new CustomEvent("vb:botblocked",{bubbles:!0,detail:{score:n}}));return}n>=60&&e.dataset.turnstileSitekey&&lS(e,e.dataset.turnstileSitekey)})}function Pp(){for(let t of document.querySelectorAll("form[data-bot-protection]"))$o(t);new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-bot-protection]")&&$o(n),n.querySelectorAll?.("form[data-bot-protection]").forEach(r=>$o(r))}}).observe(document.body,{childList:!0,subtree:!0})}wt();wt();var uS=1e3,Rp=new Map;function Oo(e,t){return i=>{let s=JSON.stringify(i.detail??null),n=Rp.get(e),r=Date.now();n&&n.key===s&&r-n.at<uS||(Rp.set(e,{key:s,at:r}),t(i))}}var dS={"vb:submit":e=>k.track("form.submit_valid",{formId:e.detail?.formId}),"wizard:step-change":e=>k.track("form.wizard_step",{from:e.detail?.from,to:e.detail?.to,direction:e.detail?.direction}),"wizard:complete":e=>k.track("form.wizard_complete",{steps:e.detail?.steps}),"wizard:reset":()=>k.track("form.wizard_reset"),"data-table:sort":e=>k.track("table.sort",{column:e.detail?.column,direction:e.detail?.direction,columnName:e.detail?.columnName}),"data-table:filter":e=>k.track("table.filter",{column:e.detail?.column,hasValue:!!e.detail?.value,length:e.detail?.value?.length??0}),"data-table:page":e=>k.track("table.paginate",{page:e.detail?.page}),"vb:theme-change":Oo("vb:theme-change",e=>k.track("ui.theme_change",{theme:e.detail?.brand??e.detail?.theme,mode:e.detail?.mode})),"vb:a11y-themes-change":Oo("vb:a11y-themes-change",e=>k.track("ui.a11y_theme",{themes:e.detail})),"vb:extensions-change":Oo("vb:extensions-change",e=>k.track("ui.extension_toggle",{extensions:e.detail})),"heading-links:navigate":e=>k.track("docs.anchor_navigate",{id:e.detail?.id}),"page-toc:navigate":e=>k.track("docs.toc_navigate",{id:e.detail?.id}),"site-search:open":()=>k.track("search.open"),"site-search:close":e=>k.track("search.close",{hasQuery:e.detail?.hasQuery}),"theme-composer:change":e=>k.track("theme.compose",{dimension:e.detail?.dimension,source:e.detail?.source,token:e.detail?.token})},hS={"accordion-wc:toggle":e=>k.track("ui.accordion_toggle",{open:e.detail?.open,index:e.detail?.index}),"tab-set:change":e=>k.track("ui.tab_change",{tab:e.detail?.index,from:e.detail?.previousIndex}),"carousel-wc:change":e=>k.track("ui.carousel_slide",{index:e.detail?.index}),"carousel-wc:play":()=>k.track("ui.carousel_play"),"carousel-wc:pause":()=>k.track("ui.carousel_pause"),"data-table:expand":e=>k.track("table.row_expand",{row:e.detail?.row}),"data-table:selection":e=>k.track("table.row_select",{count:e.detail?.count??e.detail?.rows?.length??0}),"theme-picker:open":()=>k.track("ui.theme_picker_open"),"theme-picker:close":()=>k.track("ui.theme_picker_close"),"color-palette:select":e=>k.track("palette.color_select",{name:e.detail?.name,index:e.detail?.index}),"color-palette:change":e=>k.track("palette.color_edit",{name:e.detail?.name,index:e.detail?.index}),"semantic-palette:change":e=>k.track("palette.semantic_change",{role:e.detail?.role}),"token-specimen:change":e=>k.track("tokens.edit",{token:e.detail?.token}),"spacing-specimen:change":e=>k.track("tokens.spacing_edit",{token:e.detail?.token}),"type-specimen:change":e=>k.track("tokens.type_edit",{token:e.detail?.token}),"theme-export:change":e=>k.track("theme.export_format",{format:e.detail?.format})};function qp(e){for(let[t,i]of Object.entries(e))(t.startsWith("vb:theme-change")||t==="vb:a11y-themes-change"||t==="vb:extensions-change"?window:document).addEventListener(t,i)}function Fp({tiers:e=["tier1","tier2"]}={}){e.includes("tier1")&&qp(dS),e.includes("tier2")&&qp(hS)}wt();it();te();Z();lt();function fS(e,t){let i=String(e??"").split(`
|
|
493
|
+
`;for(let i of this.querySelectorAll("[data-part]"))this.#t[i.dataset.part??""]=i;this.#t.heading.textContent=this.#e,this.#o()}#o(){let t=Gv(this.getAttribute("heading-level")),i={heading:t,"fields-heading":Math.min(t+1,6)};for(let[s,n]of Object.entries(i)){let r=this.#t[s];if(!r||r.localName===`h${n}`)continue;let a=document.createElement(`h${n}`);for(let{name:o,value:c}of r.attributes)a.setAttribute(o,c);a.textContent=r.textContent,r.replaceWith(a),this.#t[s]=a}}refresh(){if(!this.#t.status)return;let t=this.status,i=Xv(t),s=this.#t;this.setAttribute("data-state",i.state),i.reason?this.setAttribute("data-reason",i.reason):this.removeAttribute("data-reason"),s.status.textContent!==i.text&&(s.status.textContent=i.text),this.#r(t);let n=!!t?.signals?.user,r=Jv(t),a=n?"Resume analytics":"Pause analytics";if(s.toggle.textContent!==a&&(s.toggle.textContent=a),s.toggle.setAttribute("aria-pressed",String(n)),n&&r.length>0?s.toggle.setAttribute("aria-disabled","true"):s.toggle.removeAttribute("aria-disabled"),r.length){let c=r.map(l=>au[l]).join(" and ");s.hint.textContent=n?`Resume is unavailable because ${c}.`:`Analytics stays off because ${c}; pausing as well changes nothing.`,s.hint.hidden=!1,s.toggle.setAttribute("aria-describedby",s.hint.id)}else s.hint.textContent="",s.hint.hidden=!0,s.toggle.removeAttribute("aria-describedby")}#r(t){let{data:i,empty:s}=this.#t;if(!t?.initialized||!t.preview){i.hidden=!0,i.replaceChildren(),s.hidden=!1,s.textContent="Nothing to show: the analytics runtime has not started on this page.";return}s.hidden=!0,i.hidden=!1;let n=[["Fields",t.collects.join(", ")],["Page path",t.preview.path],["Referrer",t.preview.referrer||"(none)"],["Page context",t.contextKeys.length?t.contextKeys.join(", "):"(none)"]];t.transport==="beacon"?(n.push(["Sent to",t.endpoint]),n.push(["Sent from this page",String(t.sent)])):t.transport==="console"&&n.push(["Logged on this page",String(t.logged)]),t.queued>0&&n.push(["Waiting to send",String(t.queued)]),t.outboundLinks&&n.push(["Outbound link clicks","Reported (site, page path, destination)"]);let r=document.createDocumentFragment();for(let[a,o]of n){let c=document.createElement("dt");c.textContent=a;let l=document.createElement("dd");l.textContent=o,r.append(c,l)}i.replaceChildren(r)}};w("analytics-panel",Lr);var Nr="data-brand-mark-img",Zv="(width < 48rem)",Mr=class extends E{static observedAttributes=["src","src-dark","src-compact","compact-media","alt","wordmark","height"];#t=null;#e=null;#i=null;#n=!1;setup(){this.#a(),this.hasAttribute("src-dark")&&this.#o(),this.#c(),this.#e=new MutationObserver(()=>this.#b()),this.#e.observe(this,{childList:!0,characterData:!0,subtree:!0})}teardown(){this.#t?.disconnect(),this.#t=null,this.#e?.disconnect(),this.#e=null,this.#i=null,this.#n=!1}attributeChangedCallback(t,i,s){if(i!==s&&!(!this.isConnected||!this.hasAttribute("data-upgraded"))){if(t==="height"){this.#a();return}t==="src-dark"&&s!==null&&this.#o(),this.#c()}}#s(){let t=document.documentElement.getAttribute("data-mode");if(t==="dark")return!0;if(t==="light")return!1;let i=getComputedStyle(this).colorScheme||"";return/\bdark\b/.test(i)&&!/\blight\b/.test(i)?!0:/\blight\b/.test(i)&&!/\bdark\b/.test(i)?!1:(this.#i??matchMedia("(prefers-color-scheme: dark)")).matches}#o(){this.#n||(this.#n=!0,this.#i=matchMedia("(prefers-color-scheme: dark)"),this.listen(this.#i,"change",this.#r),this.listen(window,"vb:theme-change",this.#r),this.#t=new MutationObserver(this.#r),this.#t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-mode","data-theme"]}))}#r=()=>{this.isConnected&&this.#c()};#a(){let t=this.getAttribute("height")?.trim();if(!t){this.style.removeProperty("--brand-mark-height"),this.getAttribute("style")||this.removeAttribute("style");return}this.style.setProperty("--brand-mark-height",/^\d+(\.\d+)?$/.test(t)?`${t}px`:t)}#l(){return this.querySelector(`:scope > [${Nr}]`)}#c(){let t=this.getAttribute("src"),i=this.#l();if(!t){i?.remove();return}let s=this.getAttribute("src-dark"),n=s&&this.#s()?s:t;if(!(i instanceof HTMLPictureElement)||!i.querySelector(":scope > img")){i?.remove(),i=document.createElement("picture"),i.setAttribute(Nr,"");let c=document.createElement("img");c.decoding="async",i.append(c),this.prepend(i)}let r=i.querySelector(":scope > img");r.getAttribute("src")!==n&&r.setAttribute("src",n);let a=this.getAttribute("src-compact"),o=i.querySelector(":scope > source");if(a){o||(o=document.createElement("source"),i.prepend(o));let c=this.getAttribute("compact-media")||Zv;o.getAttribute("media")!==c&&o.setAttribute("media",c),o.getAttribute("srcset")!==a&&o.setAttribute("srcset",a)}else o?.remove();this.#b()}#b(){let t=this.#l()?.querySelector(":scope > img");if(!t)return;let i=this.getAttribute("alt"),s=!this.hasAttribute("wordmark"),n;s&&i?n=i:this.#f()?n="":n=i??"",t.getAttribute("alt")!==n&&t.setAttribute("alt",n)}#f(){for(let t of this.childNodes)if(!(t instanceof Element&&t.hasAttribute(Nr))&&t.textContent?.trim())return!0;return!1}};w("brand-mark",Mr);var Qv="52rem",_r=class extends HTMLElement{static observedAttributes=["breakpoint"];#t=null;#e=new Map;connectedCallback(){this.#i()}disconnectedCallback(){this.#n(),this.#r()}attributeChangedCallback(){this.isConnected&&this.#i()}#i(){this.#n();let t=this.getAttribute("breakpoint")||Qv;this.#t=matchMedia(`(max-width: ${t})`),this.#t.addEventListener("change",this.#s),this.#s()}#n(){this.#t?.removeEventListener("change",this.#s),this.#t=null}#s=()=>{let t=this.#t?.matches??!1;if(this.toggleAttribute("data-mobile",t),t?this.#o():this.#r(),!t){let i=this.querySelector("[popover]");i?.matches(":popover-open")&&i.hidePopover?.()}};#o(){let t=this.querySelector("[popover]"),i=this.parentElement;if(!t||!i)return;let s=t.querySelector("[data-mobile-menu-slot]")??t;for(let n of i.querySelectorAll(":scope > [data-mobile-menu]")){let r=document.createComment("mobile-menu");n.before(r),this.#e.set(n,r),s.append(n)}}#r(){for(let[t,i]of this.#e)i.isConnected?i.replaceWith(t):i.remove();this.#e.clear()}};customElements.get("mobile-menu")||customElements.define("mobile-menu",_r);var K="interestfor",du="interestForElement"in HTMLButtonElement.prototype,U=new WeakMap,ne=new WeakMap,Gi=new Set,$r=!1,Or=CSS.supports?.("anchor-name","--a")??!1;function ou(e){let t=String(e).trim(),i=t.match(/^([\d.]+)s$/);if(i)return parseFloat(i[1])*1e3;let s=t.match(/^([\d.]+)ms$/);return s?parseFloat(s[1]):parseFloat(t)||0}function hu(e,t){let i=getComputedStyle(e),s=i.getPropertyValue(t).trim();if(s.toLowerCase()!=="normal")return ou(s);let n=i.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 ou(a)}}return t==="--interest-delay-start"?500:250}var fu=["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(","),ty="h1,h2,h3,h4,h5,h6,ul,ol,li,table,nav,header,footer,main,aside,article,section,form,blockquote,details,summary,dialog";function Pr(e){if(e.getAttribute("popover")?.toLowerCase()!=="hint"||e.querySelector(fu)||e.querySelector(ty))return!1;for(let t of e.querySelectorAll("[role]")){let i=t.getAttribute("role").toLowerCase();if(!["presentation","none","generic","image"].includes(i))return!1}return!0}function cu(e,t,i){let s=(e.getAttribute(t)||"").split(/\s+/).filter(Boolean);s.includes(i)||e.setAttribute(t,[...s,i].join(" "))}function ey(e,t){t.parentElement?.localName!=="tool-tip"&&(Pr(t)?cu(e,"aria-describedby",t.id):(cu(e,"aria-details",t.id),e.setAttribute("aria-expanded","false"),!(t.matches(".hover-card")||t.querySelector(fu))&&!t.hasAttribute("role")&&t.setAttribute("role","tooltip")))}function at(e){let t=e.getAttribute(K);return t?document.getElementById(t):null}function Yi(e){let t=ne.get(e);return t?.invoker&&U.get(t.invoker)?.state==="full"?t.invoker:null}function Fe(e){if(U.has(e))return U.get(e);let t={state:"none",gainedTimer:null,lostTimer:null,longPressTimer:null};U.set(e,t);let i=at(e);return i&&ey(e,i),t}function pu(e,t){if(!e||!t||!e.isConnected||at(e)!==t)return!1;let i=Yi(t);if(i){if(i===e)return clearTimeout(U.get(i).lostTimer),!1;if(!qe(i,t)||!e.isConnected||at(e)!==t)return!1}let s=Fe(e);if(s.state!=="none")return!1;let n=new CustomEvent("interest",{bubbles:!1,cancelable:!0,detail:{source:e}});if(t.dispatchEvent(n),t.hasAttribute("popover")){try{t.showPopover()}catch{}sy(e,t)}s.state="full",ne.has(t)||ne.set(t,{});let r=ne.get(t);if(r.invoker=e,t.hasAttribute("popover")){let a=o=>{o.newState==="closed"&&qe(e,t)};r.toggleListener=a,t.addEventListener("toggle",a)}return Gi.add(e),e.classList.add("interest-source"),t.classList.add("interest-target"),Pr(t)||e.setAttribute("aria-expanded","true"),!0}function qe(e,t){if(!e||!t||at(e)!==t||Yi(t)!==e)return!1;let i=U.get(e);if(!i||i.state==="none")return!1;if(clearTimeout(i.gainedTimer),clearTimeout(i.lostTimer),t.dispatchEvent(new CustomEvent("loseinterest",{bubbles:!1,detail:{source:e}})),t.hasAttribute("popover"))try{t.hidePopover()}catch{}let s=ne.get(t);return s?.toggleListener&&t.removeEventListener("toggle",s.toggleListener),ne.delete(t),Gi.delete(e),e.classList.remove("interest-source"),t.classList.remove("interest-target"),Pr(t)||e.setAttribute("aria-expanded","false"),i.state="none",!0}function iy(e){let t=Fe(e);clearTimeout(t.gainedTimer);let i=hu(e,"--interest-delay-start");t.gainedTimer=setTimeout(()=>{let s=at(e);s&&pu(e,s)},i)}function Dr(e){let t=U.get(e);if(!t)return;clearTimeout(t.lostTimer);let i=hu(e,"--interest-delay-end");t.lostTimer=setTimeout(()=>{let s=at(e);s&&qe(e,s)},i)}function Re(e){if(!Or)return;let t=e.getAttribute(K),i=t?document.getElementById(t):null;if(!i?.id)return;let s=`--interest-${i.id}`;e.style.anchorName=s,i.style.positionAnchor=s}function sy(e,t){if(Or)return;let i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),n=8,r=8,a=i.top-s.height-n,o=i.left+(i.width-s.width)/2;a<r&&(a=i.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 ny(e,t){if($r||!e.isConnected)return;if(!at(e)){let r=e.closest(".interest-target");if(r){let a=Yi(r);a&&(t?clearTimeout(U.get(a)?.lostTimer):Dr(a))}return}let s=Fe(e),n=Yi(e);if(t)clearTimeout(s.lostTimer),n&&clearTimeout(U.get(n)?.lostTimer),iy(e);else if(clearTimeout(s.gainedTimer),s.state!=="none"&&Dr(e),n){let r=U.get(n);r&&clearTimeout(r.gainedTimer),Dr(n)}}function ry(){let e=(s,n)=>{for(let r=s.target;r;r=r.parentElement)ny(r,n)};document.body.addEventListener("mouseover",s=>e(s,!0)),document.body.addEventListener("mouseout",s=>e(s,!1)),document.body.addEventListener("focusin",s=>e(s,!0)),document.body.addEventListener("focusout",s=>e(s,!1)),document.body.addEventListener("keydown",s=>{if(s.key==="Escape")for(let n of Gi){let r=at(n);r&&qe(n,r)}});let t=500;document.body.addEventListener("touchstart",s=>{$r=!0;let n=s.target.closest(`button[${K}]`);if(!n)return;let r=Fe(n);r.longPressTimer=setTimeout(()=>{let a=at(n);a&&pu(n,a),r.longPressTimer=null},t)});let i=s=>{let n=s.target.closest(`button[${K}]`);if(!n)return;let r=U.get(n);r?.longPressTimer&&(clearTimeout(r.longPressTimer),r.longPressTimer=null)};document.body.addEventListener("touchend",s=>{i(s),$r=!1}),document.body.addEventListener("touchmove",i)}function ay(){let e=document.createElement("style");e.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(`
|
|
494
|
+
`),document.head.appendChild(e)}function Ki(e){Fe(e),Re(e)}function Ir(e){let t=U.get(e);if(t){if(clearTimeout(t.gainedTimer),clearTimeout(t.lostTimer),clearTimeout(t.longPressTimer),t.state!=="none"){let i=at(e);i&&qe(e,i)}e.classList.remove("interest-source"),U.delete(e),Gi.delete(e)}}function lu(e=document){e.querySelectorAll(`[${K}]`).forEach(Ki)}var uu=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.hasAttribute(K)&&Ki(s),s.querySelectorAll(`[${K}]`).forEach(Ki)}for(let i of t.removedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;U.has(s)&&Ir(s),s.querySelectorAll(`[${K}]`).forEach(n=>{U.has(n)&&Ir(n)})}if(t.type==="attributes"&&t.target.nodeType===Node.ELEMENT_NODE){let i=t.target;i.hasAttribute(K)?U.has(i)||Ki(i):U.has(i)&&Ir(i)}}});du||(ay(),ry(),document.documentElement.setAttribute("data-interest-polyfill",""),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{lu(),uu.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[K]})}):(lu(),uu.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[K]})));if(du&&Or){let e=()=>{document.querySelectorAll(`[${K}]`).forEach(Re),new MutationObserver(t=>{for(let i of t){for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.hasAttribute(K)&&Re(n),n.querySelectorAll(`[${K}]`).forEach(Re)}i.type==="attributes"&&i.target.hasAttribute?.(K)&&Re(i.target)}}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[K]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}Ut();Br();xe();var Hr="kbd[data-hotkey]";function wu(e=document){e.querySelectorAll(Hr).forEach(t=>Vr(t))}function uy(e,t){if(!/^[a-z][a-z0-9]*$/.test(t))return null;let i=`data-label-${t}`;return e.closest(`[${i}]`)?.getAttribute(i)||null}function Vr(e){let t=e.dataset.hotkey;if(!t||e.getAttribute("data-hotkey-init")===t)return;let i=yi(t);if(!i.length)return;e.setAttribute("data-hotkey-init",t);let s=[],n=document.createDocumentFragment();i.forEach((a,o)=>{let c=En(a,X),l=uy(e,a),u=l&&!(X&&c.modifier)?l:c.label;s.push(l??c.spoken);let d=document.createElement("kbd");if(d.textContent=u,d.setAttribute("aria-hidden","true"),n.appendChild(d),o<i.length-1&&!X){let h=document.createElement("span");h.textContent="+",h.setAttribute("aria-hidden","true"),n.appendChild(h)}});let r=document.createElement("span");r.className="visually-hidden",r.textContent=s.join(" "),n.appendChild(r),e.replaceChildren(n),e.removeAttribute("aria-label")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>wu()):wu();var dy=new MutationObserver(e=>{for(let t of e)for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Hr)&&Vr(s),s.querySelectorAll(Hr).forEach(n=>Vr(n))}});dy.observe(document.documentElement,{childList:!0,subtree:!0});jr();Zr();ta();ra();la();ua();ha();fa();wa();Sa();xa();Ca();Na();Ma();_a();Da();Ia();var Fw=window.matchMedia("(prefers-reduced-motion: reduce)");function Bw(){return Fw.matches||document.documentElement.hasAttribute("data-motion-reduced")}var Jd=0,Hw=new Map([["vb-fade-in","entrance"],["vb-slide-up","entrance"],["vb-pop","entrance"],["vb-slide-in-ltr","entrance"],["vb-slide-in-rtl","entrance"],["vb-fade-slide-up","entrance"],["vb-shadow-lift","entrance"],["vb-fade-out","exit"],["vb-collapse","exit"],["vb-slide-out-ltr","exit"],["vb-slide-out-rtl","exit"],["vb-shake","attention"],["vb-pulse","attention"],["vb-bounce","attention"],["vb-blink","attention"],["vb-neon-pulse","decoration"],["vb-3d-shift","decoration"],["vb-outline-glow-pulse","decoration"],["vb-rainbow","decoration"],["vb-gradient-flow","decoration"],["vb-shimmer","decoration"],["vb-shimmer-gradient","decoration"],["vb-glow","decoration"],["vb-float","decoration"]]),Zd="__vbEffectsRuntime",Qd=globalThis,C=Qd[Zd]??{_effects:new Map,_triggers:new Map,_transitions:new Map,_instances:new WeakMap,_triggerCleanups:new WeakMap,_wiredTriggers:new WeakMap,_transitionCleanups:new WeakMap,_transitionFallback:new WeakSet,_processed:new WeakSet,_transitionProcessed:new WeakSet,_staggerTime:new WeakSet,_unresolved:new Set,_warnedTriggers:new Set,_unresolvedTimer:null,_keyframePhase:Hw,_observer:null,_animationEndHandler:null,_autoBooted:!1,effect(e,t){this._effects.set(e,t),document.querySelectorAll("[data-effect]").forEach(i=>{if(!(i.getAttribute("data-effect")||"").split(/\s+/).includes(e))return;let n=!this._instances.get(i)?.has(e);this._initEffect(i,e),n&&i.hasAttribute("data-effect-active")&&this._instances.get(i)?.get(e)?.activate?.()})},trigger(e,t){this._triggers.set(e,t),document.querySelectorAll("[data-effect][data-trigger]").forEach(i=>{if(!this._processed.has(i))return;let s=i.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(i,s)})},transition(e,t){this._transitions.set(e,t),document.querySelectorAll("[data-transition]").forEach(i=>{if(!this._transitionProcessed.has(i)||!this._transitionFallback.has(i))return;let s=i.getAttribute("data-transition")||"",n=s.indexOf(":");if((n>-1?s.slice(0,n):s)!==e)return;this._transitionFallback.delete(i);let r=i;r.style.viewTransitionName="";let a=t(i,n>-1?s.slice(n+1):null);a&&this._transitionCleanups.set(i,a)})},uid(e){return e.id?e.id:(e._vbUid||(Jd++,e._vbUid=`vb-${Jd}`),e._vbUid)},theme(e,t){this._themes=this._themes||new Map,this._themes.set(e,t)},applyTheme(e,t=document.documentElement){let i=this._themes?.get(e);if(i)for(let[s,n]of Object.entries(i))t.style.setProperty(s,n)},swap(e){if(!document.startViewTransition){e(),queueMicrotask(()=>this._dispatchVtDone(document.body));return}let t=document.startViewTransition(e);return t.updateCallbackDone.then(()=>{this._dispatchVtDone(document.body)}).catch(()=>{}),t},_dispatchVtDone(e){e.querySelectorAll('[data-trigger~="vt"]').forEach(t=>{this.emit(t,"vb:vt-update-done",{})})},activate(e){this._activateEffects(e)},deactivate(e){e.hasAttribute("data-effect-active")&&(e.removeAttribute("data-effect-active"),this.emit(e,"vb:phase-change",{active:!1}))},onPhaseEnd(e,t,i){let s=n=>{n.detail?.phase===t&&i(n.detail)};return e.addEventListener("vb:effect-phase-end",s),()=>e.removeEventListener("vb:effect-phase-end",s)},registerKeyframe(e,t){this._keyframePhase.set(e,t)},observe(e=document){if(e.querySelectorAll("[data-effect]").forEach(i=>this._processElement(i)),e.querySelectorAll("[data-stagger]").forEach(i=>this._processStagger(i)),e.querySelectorAll("[data-transition]").forEach(i=>this._processTransition(i)),this._observer)return;this._observer=new MutationObserver(i=>{let s=new Set;for(let n of i){if(n.type==="childList"){let r=n.target;r.hasAttribute?.("data-stagger")&&s.add(r);for(let a of n.addedNodes)a.nodeType===Node.ELEMENT_NODE&&this._processTree(a);for(let a of n.removedNodes)a.nodeType===Node.ELEMENT_NODE&&(a.isConnected||this._cleanupTree(a))}if(n.type==="attributes"){let r=n.target;n.attributeName==="data-effect"&&this._reconcileEffects(r),n.attributeName==="data-trigger"&&this._reconcileTrigger(r),n.attributeName==="data-stagger"&&(r.hasAttribute("data-stagger")?s.add(r):this._cleanupStagger(r)),n.attributeName==="data-transition"&&this._reconcileTransition(r)}}for(let n of s)n.isConnected&&this._processStagger(n)});let t=e===document?document.body:e;this._observer.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-effect","data-trigger","data-stagger","data-transition"]}),this._animationEndHandler||(this._animationEndHandler=i=>{let s=i.target;if(!(s instanceof Element)||!s.hasAttribute("data-effect"))return;let n=this._keyframePhase.get(i.animationName);n&&this.emit(s,"vb:effect-phase-end",{phase:n,animationName:i.animationName})},document.addEventListener("animationend",this._animationEndHandler))},disconnect(){this._observer&&(this._observer.disconnect(),this._observer=null),this._animationEndHandler&&(document.removeEventListener("animationend",this._animationEndHandler),this._animationEndHandler=null)},params(e){let t=getComputedStyle(e);return{get(i){return t.getPropertyValue(`--vb-${i}`).trim()},getNumber(i,s=0){let n=t.getPropertyValue(`--vb-${i}`).trim();return n?parseFloat(n):s},getTime(i,s=0){let n=t.getPropertyValue(`--vb-${i}`).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(i){return e.classList.contains(i)}}},emit(e,t,i={}){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))},prefersReducedMotion:Bw,_processTree(e){e.hasAttribute?.("data-effect")&&this._processElement(e),e.hasAttribute?.("data-stagger")&&this._processStagger(e),e.hasAttribute?.("data-transition")&&this._processTransition(e),e.querySelectorAll?.("[data-effect]").forEach(t=>this._processElement(t)),e.querySelectorAll?.("[data-stagger]").forEach(t=>this._processStagger(t)),e.querySelectorAll?.("[data-transition]").forEach(t=>this._processTransition(t))},_cleanupTree(e){e.hasAttribute?.("data-effect")&&this._cleanupElement(e),e.hasAttribute?.("data-transition")&&this._cleanupTransition(e),e.querySelectorAll?.("[data-effect]").forEach(t=>this._cleanupElement(t)),e.querySelectorAll?.("[data-transition]").forEach(t=>this._cleanupTransition(t))},_processElement(e){if(this._processed.has(e))return;this._processed.add(e),e.removeAttribute("data-effect-processed"),e.removeAttribute("data-effect-armed");let t=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];for(let i of t)this._initEffect(e,i);this._wireTrigger(e,t)},_initEffect(e,t){let i=this._effects.get(t);if(!i)return;let s=this._instances.get(e);if(s?.has(t))return;let n=i(e);n&&(s||(s=new Map,this._instances.set(e,s)),typeof n=="function"?s.set(t,{cleanup:n}):s.set(t,n))},_parseTrigger(e){let t=e.indexOf(":");return t>-1?[e.slice(0,t),e.slice(t+1)]:[e,null]},_wireTrigger(e,t){let i=e.getAttribute("data-trigger");if(!i||!i.trim()){e.removeAttribute("data-effect-armed"),this._activateEffects(e);return}let s=i.split(/\s+/).filter(Boolean);this._wiredTriggers??=new WeakMap;let n=this._wiredTriggers.get(e);n||(n=new Set,this._wiredTriggers.set(e,n));let r=!1;for(let a of s){if(n.has(a))continue;let[o,c]=this._parseTrigger(a),l=this._triggers.get(o);if(!l){r=!0;continue}n.add(a);let u=l(e,()=>this._activateEffects(e),c);if(u){let d=this._triggerCleanups.get(e);if(d){let h=d;this._triggerCleanups.set(e,()=>{h(),u()})}else this._triggerCleanups.set(e,u)}}n.size&&e.setAttribute("data-effect-armed",""),r?(this._unresolved.add(e),this._scheduleUnresolvedCheck()):this._unresolved.delete(e)},_scheduleUnresolvedCheck(){if(this._unresolvedTimer)return;let e=()=>{this._unresolvedTimer=null,this._resolveUnknownTriggers()};typeof window>"u"||typeof window.addEventListener!="function"||(document.readyState==="complete"?this._unresolvedTimer=setTimeout(e,0):(this._unresolvedTimer=!0,window.addEventListener("load",()=>setTimeout(e,0),{once:!0})))},_resolveUnknownTriggers(){for(let e of[...this._unresolved]){if(this._unresolved.delete(e),!e.isConnected||!this._processed.has(e))continue;let i=(e.getAttribute("data-trigger")||"").split(/\s+/).filter(Boolean).filter(s=>!this._triggers.has(this._parseTrigger(s)[0]));if(i.length){for(let s of i){let n=this._parseTrigger(s)[0];this._warnedTriggers.has(n)||(this._warnedTriggers.add(n),console.warn(`[VB] data-trigger="${s}": no trigger named "${n}" is registered. The effect runs immediately instead. Register it with VB.trigger('${n}', \u2026) or check the spelling.`,e))}!e.hasAttribute("data-effect-armed")&&!e.hasAttribute("data-effect-active")&&this._activateEffects(e)}}},_activateEffects(e){e.setAttribute("data-effect-active",""),this.emit(e,"vb:phase-change",{active:!0});let t=this._instances.get(e);if(t)for(let[,i]of t)i.activate&&i.activate()},_cleanupElement(e){let t=this._instances.get(e);if(t){for(let[,s]of t)s.cleanup&&s.cleanup();this._instances.delete(e)}let i=this._triggerCleanups.get(e);i&&(i(),this._triggerCleanups.delete(e)),this._wiredTriggers?.delete(e),this._unresolved.delete(e),e.removeAttribute("data-effect-armed"),this._processed.delete(e)},_reconcileEffects(e){if(!e.hasAttribute("data-effect")){this._cleanupElement(e),e.removeAttribute("data-effect-active");return}let t=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[],i=this._instances.get(e);if(i)for(let[s,n]of i)t.includes(s)||(n.cleanup&&n.cleanup(),i.delete(s));for(let s of t)i?.has(s)||this._initEffect(e,s);this._processed.has(e)||this._processElement(e)},_reconcileTrigger(e){if(!e.hasAttribute("data-effect"))return;let t=this._triggerCleanups.get(e);if(t&&(t(),this._triggerCleanups.delete(e)),this._wiredTriggers?.delete(e),this._unresolved.delete(e),e.removeAttribute("data-effect-armed"),!this._processed.has(e)){this._processElement(e);return}let i=e.getAttribute("data-effect")?.split(/\s+/).filter(Boolean)||[];this._wireTrigger(e,i)},_parseStagger(e){let t=(e||"").trim().split(/\s+/).filter(Boolean),i=t.find(n=>/^(\d+(\.\d+)?|\.\d+)(ms|s)$/i.test(n))||null;return{mode:t.find(n=>n==="reverse"||n==="random"||n==="grid")||"",time:i}},_processStagger(e){let{mode:t,time:i}=this._parseStagger(e.getAttribute("data-stagger"));i?(e.style.setProperty("--vb-stagger",i),this._staggerTime.add(e)):this._staggerTime.has(e)&&(e.style.removeProperty("--vb-stagger"),this._staggerTime.delete(e));let s=Array.from(e.children),n=s.length,r;if(t==="reverse")r=Array.from({length:n},(a,o)=>n-1-o);else if(t==="random"){let a=this._hashString(this.uid(e));r=Array.from({length:n},(c,l)=>l);let o=a;for(let c=n-1;c>0;c--){o^=o<<13,o^=o>>>17,o^=o<<5;let l=Math.abs(o)%(c+1);[r[c],r[l]]=[r[l],r[c]]}}else t==="grid"?r=this._gridStaggerIndices(e,s):r=Array.from({length:n},(a,o)=>o);for(let a=0;a<n;a++)s[a].style.setProperty("--vb-stagger-index",String(r[a]))},_gridStaggerIndices(e,t){let i=t.length,s=()=>Array.from({length:i},(l,u)=>u);if(!i)return[];let n=t.map(l=>{let u=getComputedStyle(l);return[parseInt(u.gridRowStart,10),parseInt(u.gridColumnStart,10)]});if(n.every(([l,u])=>Number.isFinite(l)&&Number.isFinite(u))){let l=Math.min(...n.map(([d])=>d)),u=Math.min(...n.map(([,d])=>d));return n.map(([d,h])=>d-l+(h-u))}let r=t.map(l=>l.getBoundingClientRect?.());if(!r.every(Boolean)||r.every(l=>l.width===0&&l.height===0))return s();let a=getComputedStyle(e).direction==="rtl",o=this._trackRanks(r.map(l=>[l.top,l.bottom])),c=this._trackRanks(r.map(l=>a?[-l.right,-l.left]:[l.left,l.right]));return o.map((l,u)=>l+c[u])},_trackRanks(e){let t=e.map((r,a)=>a).sort((r,a)=>e[r][0]-e[a][0]),i=new Array(e.length),s=-1,n=-1/0;for(let r of t){let[a,o]=e[r];a>=n-.5?(s++,n=o):n=Math.min(n,o),i[r]=s}return i},_cleanupStagger(e){this._staggerTime.has(e)&&(e.style.removeProperty("--vb-stagger"),this._staggerTime.delete(e));for(let t of Array.from(e.children))t.style?.removeProperty("--vb-stagger-index")},_hashString(e){let t=5381;for(let i=0;i<e.length;i++)t=(t<<5)+t^e.charCodeAt(i);return t|0},_vtIdent(e){let t=String(e).replace(/[^A-Za-z0-9_ --]/g,"-");return(!t||/^(-?\d|--)/.test(t))&&(t=`vb-${t}`),t},_processTransition(e){if(this._transitionProcessed.has(e)||e.matches?.("[data-swap], content-swap"))return;let t=(e.getAttribute("data-transition")||"").trim();if(!t)return;this._transitionProcessed.add(e),e.removeAttribute("data-transition-processed");let[i,s]=this._parseTrigger(t),n=this._transitions.get(i);if(n){let r=n(e,s);r&&this._transitionCleanups.set(e,r)}else e.style.viewTransitionName=this._vtIdent(`${i}-${this.uid(e)}`),this._transitionFallback.add(e)},_cleanupTransition(e){if(!this._transitionProcessed.has(e))return;let t=this._transitionCleanups.get(e);t&&(t(),this._transitionCleanups.delete(e)),this._transitionFallback.has(e)&&(this._transitionFallback.delete(e),e.style.viewTransitionName=""),this._transitionProcessed.delete(e)},_reconcileTransition(e){this._cleanupTransition(e),e.hasAttribute("data-transition")&&this._processTransition(e)}};Qd[Zd]=C;if(typeof window<"u"){let e=window.VB;if(e&&e!==C)for(let t of Object.keys(e))t in C||(C[t]=e[t]);window.VB=C}typeof document<"u"&&!C._autoBooted&&(C._autoBooted=!0,document.body?C.observe():document.addEventListener("DOMContentLoaded",()=>C.observe(),{once:!0}));var th="vb-split-sr",eh="vb-split";function Vw(e){return e.closest?.("[lang]")?.getAttribute("lang")||void 0}function zw(e,t){if(typeof Intl<"u"&&"Segmenter"in Intl)try{let i=new Intl.Segmenter(t,{granularity:"grapheme"});return Array.from(i.segment(e),s=>s.segment)}catch{}return Array.from(e)}function Uw(e,t){let i=[],s;if(typeof Intl<"u"&&"Segmenter"in Intl)try{s=Array.from(new Intl.Segmenter(t,{granularity:"word"}).segment(e))}catch{s=null}if(!s){for(let r of e.split(/(\s+)/))r&&i.push({text:r,space:/^\s+$/.test(r)});return i}let n="";for(let r of s){if(/^\s+$/.test(r.segment)){n&&(i.push({text:n,space:!1}),n=""),i.push({text:r.segment,space:!0});continue}let a=i[i.length-1];if(!r.isWordLike){a&&!a.space?a.text+=r.segment:n+=r.segment;continue}i.push({text:n+r.segment,space:!1}),n=""}return n&&i.push({text:n,space:!1}),i}function hs(e){for(let t of e.querySelectorAll(`.${th}`)){let i=t.nextElementSibling;i?.classList.contains(eh)&&i.remove(),t.replaceWith(document.createTextNode(t.textContent||""))}e.normalize()}function ih(e,{unit:t="word",className:i="",locale:s}={}){hs(e);let n=s||Vw(e),r=[],a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(l){let u=l.parentElement;return u&&u.closest("script, style, template, svg, math")?NodeFilter.FILTER_REJECT:l.nodeValue&&l.nodeValue.trim()?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});for(;a.nextNode();)r.push(a.currentNode);let o=[],c=l=>{let u=document.createElement("span");return i&&(u.className=i),u.textContent=l,o.push(u),u};for(let l of r){let u=l.nodeValue||"",d=document.createElement("span");d.className=th,d.textContent=u;let h=document.createElement("span");if(h.className=eh,h.setAttribute("aria-hidden","true"),t==="grapheme")for(let f of zw(u,n)){let p=c(f);/^\s+$/.test(f)&&p.setAttribute("data-space",""),h.append(p)}else for(let f of Uw(u,n))h.append(f.space?document.createTextNode(f.text):c(f.text));l.replaceWith(d,h)}return o}function $a(e){let t=0,i=null;for(let s of e){let n=s.getBoundingClientRect(),r=n.top;i!==null&&r-i>n.height/2&&t++,i=r,s.style.setProperty("--i",String(t))}return e.length?t+1:0}var Oa="data-effect-reveal-init";C.effect("reveal",e=>{let t=e;if(hs(t),t.removeAttribute(Oa),C.prefersReducedMotion())return{cleanup(){}};let i=C.params(t);t.style.setProperty("--reveal-delay",i.get("reveal-delay")||"80ms"),t.style.setProperty("--reveal-duration",i.get("reveal-duration")||"400ms");let s=ih(t,{className:"vb-reveal-chunk"});s.forEach((r,a)=>r.style.setProperty("--i",String(a))),t.setAttribute(Oa,"");let n=null;if(t.classList.contains("line")){$a(s);let r=t.clientWidth;n=new ResizeObserver(()=>{t.clientWidth!==r&&(r=t.clientWidth,$a(s))}),n.observe(t)}return{activate(){t.setAttribute("data-effect-active","")},cleanup(){n?.disconnect(),hs(t),t.removeAttribute(Oa),t.style.removeProperty("--reveal-delay"),t.style.removeProperty("--reveal-duration")}}});var sh="data-effect-highlight-init";C.effect("highlight",e=>{let t=e,i=C.params(t).get("highlight-color");return i&&t.style.setProperty("--highlight-color",i),t.setAttribute(sh,""),C.prefersReducedMotion()&&t.setAttribute("data-effect-active",""),{activate(){t.setAttribute("data-effect-active","")},cleanup(){t.removeAttribute(sh),t.style.removeProperty("--highlight-color")}}});qa();za();var ja="vb:recently-visited",tA="vb:recently-visited:paused";var eA="recently-visited:change";function Ka(e){let t=document.querySelector(`meta[name="${e}"]`);return t?t.getAttribute("content")??"":null}function iA(){return typeof document>"u"||document.documentElement.hasAttribute("data-vb-no-track")||Ka("vb:no-track-history")!==null?!1:(Ka("vb:track-history")??"").trim().toLowerCase()==="on"?!0:document.querySelector("recently-visited")!==null}function sA(){try{return localStorage.getItem(tA)==="1"}catch{return!1}}function nA(){let e=Ka("vb:track-history-params")||"";return new Set(e.split(/[\s,]+/).filter(Boolean))}function ph(e,t=null){if(typeof e!="string")return null;let i=e.trim().replace(/^[\\/]{2,}/,"/");if(!i)return null;let s;try{s=new URL(i,location.origin)}catch{return null}if(s.protocol!=="http:"&&s.protocol!=="https:"||s.origin!==location.origin)return null;let n=s.pathname.replace(/^\/{2,}/,"/"),r=s.search;if(t){let a=new URLSearchParams;for(let[c,l]of s.searchParams)t.has(c)&&a.append(c,l);let o=a.toString();r=o?`?${o}`:""}return n+r}function rA(){return ph(location.pathname+location.search,nA())}function mh(e,t=Date.now()){if(!Array.isArray(e))return[];let i=[];for(let s of e){if(!s||typeof s!="object")continue;let n=Number(s.ts);if(!Number.isFinite(n)||Math.abs(t-n)>2592e6)continue;let r=ph(s.url);if(!r)continue;let a=typeof s.hash=="string"&&s.hash.startsWith("#")&&s.hash.length>1?s.hash:"";i.push({url:r,hash:a,title:typeof s.title=="string"?s.title:"",hashTitle:a&&typeof s.hashTitle=="string"?s.hashTitle:"",ts:n})}return i}function aA(){try{let e=localStorage.getItem(ja);return e?mh(JSON.parse(e)):[]}catch{return[]}}function oA(e){window.dispatchEvent(new CustomEvent(eA,{detail:{key:e}}))}function cA(e){try{localStorage.setItem(ja,JSON.stringify(mh(e).slice(0,100)))}catch{}oA(ja)}function lA(e){if(!e)return"";let t=e.slice(1);try{t=decodeURIComponent(t)}catch{}if(!t)return"";let i=document.getElementById(t);return i&&(i.textContent||"").trim().slice(0,80)||t}function Ua(){if(!iA()||sA()||location.protocol!=="http:"&&location.protocol!=="https:")return!1;let e=rA();if(!e)return!1;let t=location.hash.length>1?location.hash:"",i=(document.title||"").trim();if(!i)return!1;let s=aA(),n=e+t,r=s[0];if(r&&r.url+r.hash===n)return!1;let a=s.filter(o=>o.url+o.hash!==n);return a.unshift({url:e,hash:t,title:i,hashTitle:lA(t),ts:Date.now()}),cA(a),!0}var Wa=typeof document<"u"?document.documentElement:null;Wa&&!Wa.hasAttribute("data-vb-recently-visited-init")&&(Wa.setAttribute("data-vb-recently-visited-init",""),Ua(),window.addEventListener("pageshow",e=>{e.persisted&&Ua()}),window.addEventListener("hashchange",Ua));var vh=CSS.supports("anchor-name","--test"),uA=new Set(["BUTTON","A","AREA"]),yh=(()=>{let e=document.createElement("span");return e.setAttribute("popover","hint"),e.popover==="hint"})(),wh=new Map,bh=!1;function dA(){if(bh||yh)return;bh=!0;let e=t=>{wh.forEach((i,s)=>{s.matches(":popover-open")&&!t(s,i)&&s.hidePopover()})};document.addEventListener("keydown",t=>{t.key==="Escape"&&e(()=>!1)}),document.addEventListener("pointerdown",t=>{let i=t.target;e((s,n)=>s.contains(i)||n.contains(i))})}function Ah(e){return e.getAttribute("aria-label")?.trim()||e.hasAttribute("aria-labelledby")||e.labels?.length||e.textContent?.trim()||e instanceof HTMLInputElement&&["button","submit","reset"].includes(e.type)&&e.value?!0:!!e.querySelector('img[alt]:not([alt=""]), [aria-label]:not([aria-hidden="true"])')}function Eh(e,t,i){let s=(e.getAttribute(t)||"").split(/\s+/).filter(Boolean);s.includes(i)||e.setAttribute(t,[...s,i].join(" "))}function hA(e){return document.documentElement.hasAttribute("data-interest-polyfill")?!0:"interestForElement"in HTMLButtonElement.prototype?uA.has(e.tagName):!1}function Ya(e,t){if(wh.set(t,e),dA(),hA(e)){e.setAttribute("interestfor",t.id),t.addEventListener("toggle",l=>{l.newState==="open"&&fs(e,t)});return}let i=null,s=null,n=t,r=()=>{clearTimeout(s),i=setTimeout(()=>{n.showPopover(),fs(e,t)},200)},a=()=>{clearTimeout(i),s=setTimeout(()=>{n.hidePopover()},100)},o=()=>{clearTimeout(s),n.showPopover(),fs(e,t)},c=()=>{clearTimeout(i),n.hidePopover()};e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",a),e.addEventListener("focus",o),e.addEventListener("blur",c),t.addEventListener("mouseenter",()=>clearTimeout(s)),t.addEventListener("mouseleave",a)}function Ga(e,t){if(!vh)return;let i=`--tooltip-anchor-${t.id}`;e.style.anchorName=i,t.style.positionAnchor=i,t.setAttribute("data-anchor","")}function fA(e){let t=e.getAttribute("title");if(!t)return;let i=!Ah(e);i&&e.setAttribute("aria-label",t),e.removeAttribute("title");let s=document.createElement("div");s.setAttribute("role","tooltip"),s.setAttribute("popover",yh?"hint":"manual"),s.id=`tooltip-${crypto.randomUUID().slice(0,8)}`,s.textContent=t;let n=e.dataset.tooltipPosition||"top";s.dataset.tooltipPosition=n;let r=document.createElement("span");r.className="tooltip-arrow",r.setAttribute("aria-hidden","true"),s.appendChild(r),e.after(s),i||Eh(e,"aria-describedby",s.id),Ga(e,s),Ya(e,s)}function pA(e,t){let i=document.getElementById(t);if(!i?.hasAttribute("popover"))return;let s=e.getAttribute("title");s&&(Ah(e)||e.setAttribute("aria-label",s),e.removeAttribute("title")),Eh(e,"aria-describedby",t),Ga(e,i),Ya(e,i)}function gh(e=document){e.querySelectorAll("[data-tooltip]").forEach(t=>{if(t.closest("tool-tip")||t.hasAttribute("data-tooltip-init"))return;t.setAttribute("data-tooltip-init","");let i=t.dataset.tooltip;i?pA(t,i):fA(t)}),e.querySelectorAll("[aria-describedby]").forEach(t=>{let i=t.getAttribute("aria-describedby")??"",s=document.getElementById(i);!s?.hasAttribute("popover")||!s.matches('[role="tooltip"]')||t.closest("tool-tip")||t.hasAttribute("data-tooltip-init")||(t.setAttribute("data-tooltip-init",""),Ga(t,s),Ya(t,s))}),e.querySelectorAll("[popovertarget]").forEach(t=>{let i=t.getAttribute("popovertarget")??"",s=document.getElementById(i);!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"&&fs(t,s)}))})}function fs(e,t){if(vh||t.hasAttribute("data-anchor"))return;let i=e.getBoundingClientRect(),s=t.dataset.tooltipPosition||"top",n=8,r=t.getBoundingClientRect(),a,o;switch(s){case"bottom":a=i.bottom+n,o=i.left+(i.width-r.width)/2;break;case"left":a=i.top+(i.height-r.height)/2,o=i.left-r.width-n;break;case"right":a=i.top+(i.height-r.height)/2,o=i.right+n;break;default:a=i.top-r.height-n,o=i.left+(i.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",()=>gh()):gh();var Xa="[data-vt-name]";function ps(e){let t=e;t.removeAttribute("data-vt-name-init"),t.style.viewTransitionName=t.dataset.vtName||""}function Sh(e=document){e.querySelectorAll(Xa).forEach(ps)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Sh()):Sh();var mA=new MutationObserver(e=>{for(let t of e){if(t.type==="attributes"){ps(t.target);continue}for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(Xa)&&ps(s),s.querySelectorAll(Xa).forEach(ps)}}});mA.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-vt-name"]});function ms(e,t){C.deactivate(e),e.offsetWidth,t()}function Ja(e,t){if(C.prefersReducedMotion()){t();return}let i=new IntersectionObserver(([s])=>{s.isIntersecting&&(i.disconnect(),t())},{threshold:.1});return i.observe(e),()=>i.disconnect()}function bA(e){let t=(e||"0").trim(),i=parseFloat(t);return!Number.isFinite(i)||i<0?0:/^[\d.]+s$/i.test(t)?i*1e3:i}C.trigger("scroll",(e,t)=>Ja(e,t));C.trigger("hover",(e,t)=>{let i=!1,s=!1;function n(u){let d=i||s;u==="hover"?i=!0:s=!0,d||ms(e,t)}function r(){!i&&!s&&C.deactivate(e)}let a=()=>n("hover"),o=()=>{i=!1,r()},c=()=>n("focus"),l=u=>{u.relatedTarget instanceof Node&&e.contains(u.relatedTarget)||(s=!1,r())};return e.addEventListener("pointerenter",a),e.addEventListener("pointerleave",o),e.addEventListener("focusin",c),e.addEventListener("focusout",l),()=>{e.removeEventListener("pointerenter",a),e.removeEventListener("pointerleave",o),e.removeEventListener("focusin",c),e.removeEventListener("focusout",l)}});C.trigger("click",(e,t,i)=>{function s(){i==="replay"?ms(e,t):e.hasAttribute("data-effect-active")?C.deactivate(e):t()}return e.addEventListener("click",s),()=>e.removeEventListener("click",s)});C.trigger("time",(e,t,i)=>{let s=setTimeout(t,bA(i));return()=>clearTimeout(s)});C.trigger("intersect",(e,t,i)=>{if(C.prefersReducedMotion()){t();return}if((i||"once")==="toggle"){let n=new IntersectionObserver(([r])=>{r.isIntersecting?t():C.deactivate(e)},{threshold:.1});return n.observe(e),()=>n.disconnect()}return Ja(e,t)});C.trigger("media",(e,t,i)=>{if(!i)return;let s=window.matchMedia(i);function n(){s.matches?t():C.deactivate(e)}return s.addEventListener("change",n),n(),()=>s.removeEventListener("change",n)});C.trigger("event",(e,t,i)=>{if(!i)return;let s=()=>ms(e,t);return e.addEventListener(i,s),()=>e.removeEventListener(i,s)});C.trigger("vt",(e,t)=>{let i=()=>ms(e,t);return e.addEventListener("vb:vt-update-done",i),()=>e.removeEventListener("vb:vt-update-done",i)});var gA=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()");for(let e of["view-progress","scroll-progress"])C.trigger(e,(t,i)=>{if(!(gA&&!C.prefersReducedMotion()))return Ja(t,i)});var vA=12;function Pt(e,t,i){let s=C.uid(t),n=i===void 0?`${e}-${s}`:`${e}-${s}-${i}`;return typeof CSS<"u"&&CSS.escape?CSS.escape(n):n.replace(/[^\w-]/g,"_")}function le(e,t,i){return e.style.viewTransitionName=t,i&&(e.style.viewTransitionClass=i),()=>{e.style.viewTransitionName="",i&&(e.style.viewTransitionClass="")}}C.transition("morph",e=>le(e,Pt("morph",e)));function yA(e,t){let i=(t||"forward").trim().toLowerCase();if(i==="left")return"slide-left";if(i==="right")return"slide-right";let n=!(getComputedStyle(e).direction==="rtl");return(i==="back"?!n:n)?"slide-left":"slide-right"}C.transition("slide",(e,t)=>le(e,Pt("slide",e),yA(e,t)));C.transition("fade",e=>le(e,Pt("fade",e),"fade"));C.transition("scale",e=>le(e,Pt("scale",e),"scale"));C.transition("none",e=>le(e,Pt("none",e),"vt-none"));function wA(e){let t=new Set,i=()=>{let n=Array.from(e.children);for(let r of t)r.parentElement!==e&&(r.style.viewTransitionName="",r.style.viewTransitionClass="",t.delete(r));n.forEach((r,a)=>{if(!(r instanceof HTMLElement))return;let o=Math.min(a,vA-1);r.style.viewTransitionName=Pt("stagger",e,C.uid(r)),r.style.viewTransitionClass=`fade vt-stagger-${o}`,t.add(r)})};i();let s=new MutationObserver(i);return s.observe(e,{childList:!0}),()=>{s.disconnect();for(let n of t)n.style.viewTransitionName="",n.style.viewTransitionClass="";t.clear()}}C.transition("stagger",e=>wA(e));C.transition("effect",(e,t)=>{let i=(t||"fade").trim();return le(e,Pt("effect",e),/^-?[_a-zA-Z][\w-]*$/.test(i)?i:"fade")});var bs='progress[data-type="ring"]',xh={xs:"2em",s:"3em",m:"4em",l:"6em",xl:"8em"};function AA(e){let t=e.max||100,i=e.value;return t>0?Math.round(i/t*100):0}var Za=new WeakMap;function EA(e){let t=Za.get(e);if(t)return t;let i=document.createElement("div");i.className="progress-ring-wrap";let s=e.dataset.size;return s&&xh[s]&&i.style.setProperty("--progress-ring-size",xh[s]),e.parentNode?.insertBefore(i,e),i.appendChild(e),t=document.createElement("span"),t.className="progress-ring-label",t.setAttribute("aria-hidden","true"),i.appendChild(t),Za.set(e,t),t}function Ch(e){let t=AA(e);e.style.setProperty("--progress",String(t));let i=e.dataset.label;if(i==="none")return;let s=!e.hasAttribute("value");if(s&&!Za.has(e))return;let n=EA(e);n.hidden=s,n.textContent=i||t+"%"}function Qa(e){e.hasAttribute("data-enhanced")||(e.setAttribute("data-enhanced",""),Ch(e))}function kh(e=document){e.querySelectorAll(bs).forEach(t=>Qa(t))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>kh()):kh();var SA=new MutationObserver(e=>{for(let t of e){for(let i of t.addedNodes){if(i.nodeType!==Node.ELEMENT_NODE)continue;let s=i;s.matches(bs)&&Qa(s),s.querySelectorAll(bs).forEach(n=>Qa(n))}if(t.type==="attributes"){let i=t.target;i.matches(bs)&&i.hasAttribute("data-enhanced")&&Ch(i)}}});SA.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","max"]});function Th(e){document.querySelectorAll("browser-window").forEach(t=>{t.setAttribute("mode",e)}),document.querySelectorAll("code-block").forEach(t=>{t.setAttribute("theme",e)})}function Lh(){let{effectiveMode:e}=_.getState();Th(e),window.addEventListener("vb:theme-change",i=>{Th(i.detail.effectiveMode)}),new MutationObserver(i=>{let{effectiveMode:s}=_.getState();for(let n of i)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})}var NE=[{selector:"[data-wizard]",load:()=>Promise.resolve().then(()=>(Oh(),$h))},{selector:"[data-gesture]",load:()=>Promise.resolve().then(()=>(_n(),Mn))},{selector:"[data-keyboard-aware]",load:()=>Promise.resolve().then(()=>(qh(),Rh))},{selector:"[data-focus-trap]",load:()=>Promise.resolve().then(()=>(Hh(),Bh))},{selector:"[data-scroll-hide]",load:()=>Promise.resolve().then(()=>(zh(),_A))},{selector:"[data-spotlight]",load:()=>Promise.resolve().then(()=>(jh(),Wh))},{selector:"[data-splitter]",load:()=>Promise.resolve().then(()=>(la(),Fu))},{selector:"[data-back-to-top]",load:()=>Promise.resolve().then(()=>(Br(),yu))},{selector:"[data-hotkey]:not(kbd)",load:()=>Promise.resolve().then(()=>(Zh(),Jh))},{selector:'a[target="_blank"]',load:()=>Promise.resolve().then(()=>(rf(),nf))},{selector:"[data-watch-page], watch-wc",load:()=>Promise.resolve().then(()=>(Ar(),wr))},{selector:"img[data-responsive]",load:()=>Promise.resolve().then(()=>(df(),uf))},{selector:"form-field[data-floating-label]",load:()=>Promise.resolve().then(()=>(mf(),pf))},{selector:"button[data-loading]",load:()=>Promise.resolve().then(()=>(Af(),wf))},{selector:"input[data-mask]",load:()=>Promise.resolve().then(()=>(Na(),Dd))},{selector:"input[data-accept]",load:()=>Promise.resolve().then(()=>(Ma(),Rd))},{selector:'input[type="file"][data-upload]',load:()=>Promise.resolve().then(()=>(xa(),Ad))},{selector:'input[type="range"][data-range]',load:()=>Promise.resolve().then(()=>(Sa(),pd))},{selector:'input[type="number"][data-stepper]',load:()=>Promise.resolve().then(()=>(Da(),jd))},{selector:'input[type="checkbox"][data-switch]',load:()=>Promise.resolve().then(()=>(ua(),Vu))},{selector:'input[type="color"][data-color]',load:()=>Promise.resolve().then(()=>(Ia(),Xd))},{selector:"textarea[data-grow]",load:()=>Promise.resolve().then(()=>(fa(),td))},{selector:"textarea[data-count]",load:()=>Promise.resolve().then(()=>(ha(),Xu))},{selector:"fieldset[data-toggle-tags][data-max]",load:()=>Promise.resolve().then(()=>(_a(),Hd))},{selector:"form[data-autosave]",load:()=>Promise.resolve().then(()=>(Ca(),kd))},{selector:"form[data-vb-email-form]",load:()=>Promise.resolve().then(()=>(xf(),Sf))},{selector:"form[data-vb-newsletter-form]",load:()=>Promise.resolve().then(()=>(_f(),Mf))},{selector:"[data-copy], [data-copy-target], [data-paste-target]",load:()=>Promise.resolve().then(()=>(Ut(),Tc))},{selector:"[data-select-all]",load:()=>Promise.resolve().then(()=>(qa(),oh))},{selector:"[data-show-when], [data-hide-when]",load:()=>Promise.resolve().then(()=>(wa(),cd))},{selector:"[data-spoiler]",load:()=>Promise.resolve().then(()=>(ra(),Ou))},{selector:"[data-math], code.language-math",load:()=>Promise.resolve().then(()=>(za(),fh))},{selector:"time[data-format-date]",load:()=>Promise.resolve().then(()=>(Zr(),Lu))},{selector:"data[data-format-number]",load:()=>Promise.resolve().then(()=>(jr(),Eu))},{selector:"data[data-format-bytes]",load:()=>Promise.resolve().then(()=>(ta(),_u))},{selector:"[data-audio-playlist]",load:()=>Promise.resolve().then(()=>(Rf(),Pf))},{selector:"[data-paged]",load:()=>Promise.resolve().then(()=>(Wf(),Uf))},{selector:"[data-sortable], [data-sort-target]",load:()=>Promise.resolve().then(()=>(rp(),np))},{selector:"[data-toggle]",load:()=>Promise.resolve().then(()=>(fp(),hp))},{selector:'table[data-responsive="card"]',load:()=>Promise.resolve().then(()=>(gp(),bp))}],fe=new Set,ti=null,Lo=0;function ME(){Lo=0;for(let e of fe)document.querySelector(e.selector)&&(fe.delete(e),e.load());fe.size||(ti?.disconnect(),ti=null)}function _E(){if(ti||!fe.size||typeof MutationObserver>"u")return;let e=document.documentElement;e&&(ti=new MutationObserver(()=>{Lo||(Lo=window.setTimeout(ME,100))}),ti.observe(e,{childList:!0,subtree:!0,attributes:!0}))}function DE(e,t=document){for(let i of e)t.querySelector(i.selector)?(fe.delete(i),i.load()):t===document&&fe.add(i);t===document&&_E()}function vp(e=document){DE(NE,e)}sr();var IE=["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","badInput"],$E={"data-label-group":"Group","data-message-min-checked":"Select at least {min}","data-message-max-checked":"Select no more than {max}","data-message-invalid-selection":"Invalid selection","data-message-match":"Values do not match","data-message-network":"Something went wrong. Please try again."},ei=new WeakSet,pe=new WeakSet,OE=0;function qt(e,t,i,s={}){return(t?.getAttribute(i)??e.getAttribute(i)??$E[i]??"").replace(/\{(\w+)\}/g,(r,a)=>a in s?String(s[a]):r)}function yp(e,t){let i=e.closest("[lang]")?.getAttribute("lang")||void 0,s="other";try{s=new Intl.PluralRules(i).select(t)}catch{}return(e.getAttribute(`data-label-summary-${s}`)??e.getAttribute("data-label-summary")??(t===1?"Please fix {count} error:":"Please fix {count} errors:")).replaceAll("{count}",String(t))}function ii(e){return[...e.elements].filter(t=>t.willValidate&&!("honeypot"in t.dataset))}function wp(e){return ii(e).filter(t=>t.dataset.match)}function kp(e){return[...e.querySelectorAll("form-field[data-upgraded]")]}function Do(e){let t=e.closest("form-field[data-upgraded]");return t&&t.input===e?t:null}function Cp(e){return e.id||(e.id=`vb-field-${++OE}`),e.id}function PE(e){return!e.disabled&&!e.closest("[inert], [hidden]")&&e.getClientRects().length>0}function RE(e,t){if(t.type==="radio"){let s=t.closest("fieldset")?.querySelector(":scope > legend")?.textContent?.trim();if(s)return s}let i=Do(t);return i?.fieldName?i.fieldName:t.labels?.[0]?.textContent?.trim()||t.getAttribute("aria-label")||t.name||t.id||qt(e,null,"data-label-group")}function qE(e){let t=Do(e);if(t&&typeof t.errorMessage=="string"&&t.errorMessage)return t.errorMessage;let i=Mo(e)?.textContent?.trim();if(i)return i;for(let s of IE){if(!e.validity[s])continue;let n=e.getAttribute(`data-message-${s.toLowerCase()}`);if(n)return n;break}return e.validationMessage}function Mo(e){let t=e.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 e.closest("form-field")?.querySelector("output.error")??null}function FE(e){return e.querySelector('input:not([type="hidden"]), select, textarea, button')}function Tp(e,t){let i=e.dataset.match;return i?t.querySelector(`#${CSS.escape(i)}`)??t.querySelector(`[name="${CSS.escape(i)}"]`):null}function ks(e,t){let i=Tp(e,t);if(i){if(e.setCustomValidity(""),e.value&&i.value&&e.value!==i.value){let s=qt(t,e,"data-message-match");e.setCustomValidity(s);let n=Mo(e);n&&(n.textContent=s)}else if(e.validity.valid){let s=Mo(e);s&&(s.textContent="")}}}function Ap(e,t){let s=[...t.querySelectorAll('input[type="checkbox"]')].filter(c=>c.checked).length,n=parseInt(t.dataset.minChecked??"0",10),r=parseInt(t.dataset.maxChecked??"999",10),a=t.querySelector(":scope > output"),o=null;return s<n&&(o=qt(e,t,"data-message-min-checked",{min:n,max:r})),s>r&&(o=qt(e,t,"data-message-max-checked",{min:n,max:r})),a&&(a.textContent=o??""),o?t.dataset.invalid="":delete t.dataset.invalid,!o}function Ep(e){return[...e.querySelectorAll("fieldset[data-min-checked], fieldset[data-max-checked]")]}function Lp(e){let t=[],i=new Set;for(let s of ii(e)){if(s.validity.valid)continue;let n=s;if(s.type==="radio"&&s.name){if(i.has(s.name))continue;i.add(s.name),n=ii(e).find(r=>r.type==="radio"&&r.name===s.name)??s}t.push({target:n,label:RE(e,s),message:qE(s)})}for(let s of e.querySelectorAll("fieldset[data-invalid]")){let n=FE(s);if(!n)continue;let r=s.querySelector(":scope > output");t.push({target:n,label:s.querySelector(":scope > legend")?.textContent?.trim()||qt(e,s,"data-label-group"),message:r?.textContent?.trim()||qt(e,s,"data-message-invalid-selection")})}return t.sort((s,n)=>s.target.compareDocumentPosition(n.target)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1),t}function Np(e){return Lp(e).map(t=>t.target).find(PE)??null}function BE(e){let t=e.querySelector("[data-form-summary]");if(t)return{el:t,type:"authored",signature:"",active:!1};let i=e.querySelector("output.error-summary");return i?{el:i,type:"legacy",signature:"",active:!1}:null}function Sp(e){return e.map(t=>{let i=document.createElement("li"),s=document.createElement("a");return s.href=`#${Cp(t.target)}`,s.textContent=`${t.label}: ${t.message}`,i.append(s),i})}function _o(e,t,{focus:i=!1}={}){if(!t)return;let s=Lp(e);if(s.length===0){Mp(t);return}t.active=!0;let n=s.map(a=>`${Cp(a.target)}\0${a.label}\0${a.message}`).join(""),r=n!==t.signature;if(t.signature=n,t.type==="authored"){if(r){t.el.querySelector("[data-summary-list]")?.replaceChildren(...Sp(s));let a=t.el.querySelector("[data-summary-heading]");a&&(a.textContent=yp(e,s.length))}(t.el.hidden||!t.el.hasAttribute("data-state-visible"))&&(t.el.hidden=!1,t.el.offsetHeight,t.el.dataset.stateVisible="")}else if(r){let a=document.createElement("p");a.textContent=yp(e,s.length);let o=document.createElement("ul");o.append(...Sp(s)),t.el.replaceChildren(a,o)}i&&t.el.focus()}function HE(e){let t=getComputedStyle(e),i=r=>r.split(",").map(a=>parseFloat(a)*(a.trim().endsWith("ms")?1:1e3)||0),s=i(t.transitionDuration),n=i(t.transitionDelay);return Math.max(0,...s.map((r,a)=>r+(n[a]??n[0]??0)))}function Mp(e){if(e)if(e.active=!1,e.signature="",e.type==="authored"){let t=e.el;delete t.dataset.stateVisible;let i=()=>{t.hasAttribute("data-state-visible")||(t.hidden=!0,t.querySelector("[data-summary-list]")?.replaceChildren())},n=matchMedia("(prefers-reduced-motion: reduce)").matches?0:HE(t);n===0?i():setTimeout(i,n+50)}else e.el.replaceChildren()}function VE(e){e&&e.el.addEventListener("click",t=>{let i=t.target.closest('a[href^="#"]');if(!i)return;t.preventDefault();let s=document.getElementById((i.getAttribute("href")??"#").slice(1));s&&(s.scrollIntoView({behavior:"smooth",block:"center"}),s.focus())})}function zE(e){for(let t of ii(e))Do(t)||(t.validity.valid?pe.has(t)&&(t.removeAttribute("aria-invalid"),pe.delete(t)):(t.setAttribute("aria-invalid","true"),pe.add(t)))}function xp(e){let t=e.target;if(!pe.has(t))return;let i=t.type==="radio"&&t.form&&t.name?ii(t.form).filter(s=>s.type==="radio"&&s.name===t.name):[t];for(let s of i)pe.has(s)&&s.validity.valid&&(s.removeAttribute("aria-invalid"),pe.delete(s))}function UE(e){let t=e.querySelector("[data-form-error]");return t||(t=document.createElement("p"),t.setAttribute("data-form-error",""),t.hidden=!0,e.prepend(t)),t.hasAttribute("role")||t.setAttribute("role","alert"),t}function WE(e){e.dataset.error="network";let t=UE(e);(!t.textContent.trim()||t.hasAttribute("data-vb-generated"))&&(t.textContent=qt(e,null,"data-message-network"),t.setAttribute("data-vb-generated","")),t.hidden=!1}function jE(e){if(e.hasAttribute("data-success")){delete e.dataset.success;let i=e.querySelector("[data-form-success]");i&&(i.hidden=!0)}delete e.dataset.error;let t=e.querySelector("[data-form-error]");t&&(t.hidden=!0)}function KE(e){e.dataset.success="";let t=e.querySelector("[data-form-success]");t&&(t.hidden=!1,t.hasAttribute("tabindex")||(t.tabIndex=-1),t.hasAttribute("role")||t.setAttribute("role","status"),t.focus())}function YE(e){return[...e.elements].find(t=>t instanceof HTMLButtonElement&&t.type==="submit"||t instanceof HTMLInputElement&&(t.type==="submit"||t.type==="image"))??null}function _p(e,t){try{return t?new FormData(e,t):new FormData(e)}catch{return new FormData(e)}}function GE(e,t){return t?.hasAttribute("formenctype")?t.formEnctype:e.hasAttribute("enctype")?e.enctype:"multipart/form-data"}function XE(e,t){if(t==="multipart/form-data")return e;let i=[...e].map(([s,n])=>[s,typeof n=="string"?n:n.name]);return t==="text/plain"?i.map(([s,n])=>`${s}=${n}\r
|
|
495
|
+
`).join(""):new URLSearchParams(i)}async function JE(e,t){let i=t??YE(e),n=(t?.getAttribute("formmethod")||e.getAttribute("method")||"post").toLowerCase()==="get"?"GET":"POST",r=t?.hasAttribute("formaction")?t.formAction:e.action;e.dataset.submitting="",i&&i.setAttribute("aria-disabled","true");let a=()=>{delete e.dataset.submitting,i&&i.getAttribute("aria-busy")!=="true"&&i.removeAttribute("aria-disabled")};try{let o=_p(e,t),c;if(n==="GET"){let l=new URL(r,document.baseURI);l.search="";for(let[u,d]of o)typeof d=="string"&&l.searchParams.append(u,d);c=await fetch(l,{method:n})}else c=await fetch(r,{method:n,body:XE(o,GE(e,t))});if(a(),!c.ok){if((c.headers.get("content-type")??"").includes("application/json")){let u=await c.json();if(u.errors){ZE(e,u.errors);return}}throw new Error(`Server error: ${c.status}`)}KE(e)}catch{a(),WE(e)}}function ZE(e,t){e.dataset.error="";let i=kp(e),s=!1;for(let n of i){let r=n.input??n.querySelector("input, textarea, select");if(!r)continue;let a=t[r.name];a&&(n.setError(String(a)),s=!0)}if(s){let n=e._vbSummary;n?_o(e,n,{focus:!0}):Np(e)?.focus()}for(let n of i)(n.input??n.querySelector("input, textarea, select"))?.addEventListener("input",()=>n.clearError(),{once:!0})}function QE(e,t){setTimeout(()=>{if(!e.isConnected)return;let i=t?.isConnected&&t.form===e?t:null;ei.add(e);try{i?e.requestSubmit(i):e.requestSubmit()}catch{ei.delete(e),e.submit()}ei.delete(e)})}function No(e){if(e.hasAttribute("data-vb-enhanced"))return;e.setAttribute("novalidate",""),e.setAttribute("data-vb-enhanced","");let t=BE(e);e._vbSummary=t,t&&VE(t);for(let i of wp(e))i.addEventListener("input",()=>ks(i,e)),i.addEventListener("blur",()=>ks(i,e)),Tp(i,e)?.addEventListener("input",()=>ks(i,e));for(let i of Ep(e))i.addEventListener("change",()=>Ap(e,i));if(e.addEventListener("input",xp),e.addEventListener("change",xp),e.addEventListener("submit",i=>{if(ei.has(e)){ei.delete(e);return}i.preventDefault();let s=i.submitter??null;jE(e);let n=!!s?.hasAttribute("formnovalidate");if(!n){for(let c of kp(e))c.validate();for(let c of wp(e))ks(c,e);for(let c of Ep(e))Ap(e,c);zE(e)}if(!(n||e.checkValidity()&&!e.querySelector("fieldset[data-invalid]"))){if(t)_o(e,t,{focus:!0});else{let c=Np(e);c&&(c.scrollIntoView({behavior:"smooth",block:"center"}),c.focus())}return}Mp(t);let a=new CustomEvent("vb:beforesubmit",{bubbles:!0,cancelable:!0,detail:{form:e,submitter:s}});if(e.dispatchEvent(a),a.defaultPrevented)return;let o=e.dataset.submit??"native";o==="fetch"?JE(e,s):o==="event"?e.dispatchEvent(new CustomEvent("vb:submit",{bubbles:!0,cancelable:!0,detail:_p(e,s)})):QE(e,s)}),t){let i=()=>requestAnimationFrame(()=>{t.active&&_o(e,t)});e.addEventListener("focusout",i),e.addEventListener("change",i)}}function Dp(){for(let t of document.querySelectorAll("form[data-validate]"))No(t);new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-validate]")&&No(n),n.querySelectorAll?.("form[data-validate]").forEach(r=>No(r))}}).observe(document.body,{childList:!0,subtree:!0})}D();var Ip='<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>',tS='<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>',me={password:new WeakSet,otp:new WeakSet,strength:new WeakSet},eS=0;function z(e,t,i){return e.getAttribute(`data-label-${t}`)??i}function Io(e){let t=e.querySelector('input[type="password"]');if(!t||me.password.has(e)||t.closest(".password-wrapper")||e.querySelector(".password-toggle"))return;me.password.add(e);let i=z(e,"show-password","Show password"),s=z(e,"hide-password","Hide password"),n=document.createElement("div");n.className="password-wrapper",t.parentNode.insertBefore(n,t),n.appendChild(t);let r=document.createElement("button");r.type="button",r.className="password-toggle",r.setAttribute("aria-label",i),r.setAttribute("aria-pressed","false"),r.innerHTML=Ip,n.appendChild(r),r.addEventListener("click",()=>{let a=t.type==="password";t.type=a?"text":"password",r.setAttribute("aria-pressed",String(a)),r.setAttribute("aria-label",a?s:i),r.innerHTML=a?tS:Ip})}function $o(e){let t=e.querySelector('input[data-type="otp"], input[data-type="pin"]');if(!t||me.otp.has(e)||e.querySelector(".otp-wrapper"))return;let i=t;me.otp.add(e),e.setAttribute("data-otp-ready","");let s=Math.max(1,parseInt(i.dataset.length||"6",10)||6),n=i.id||`otp-${++eS}`;i.classList.add("otp-source"),i.tabIndex=-1,i.setAttribute("aria-hidden","true"),i.hasAttribute("pattern")||(i.pattern=`\\d{${s}}`),i.maxLength=s;let r=i.getAttribute("autocomplete")||(i.dataset.type==="otp"?"one-time-code":"off");i.setAttribute("autocomplete","off"),i.hasAttribute("data-message-patternmismatch")||i.setAttribute("data-message-patternmismatch",z(e,"incomplete","Enter all {total} digits").replace("{total}",String(s)));let a=i.id&&e.querySelector(`label[for="${CSS.escape(i.id)}"]`)||e.querySelector("label"),o=document.createElement("div");o.className="otp-wrapper",o.setAttribute("role","group"),a&&(a.id||(a.id=`${n}-label`),o.setAttribute("aria-labelledby",a.id));let c=[...e.querySelectorAll("output.hint")].map((m,b)=>(m.id||(m.id=`${n}-hint${b?`-${b}`:""}`),m.id)),l=[...new Set([...(i.getAttribute("aria-describedby")??"").split(/\s+/),...c])].filter(Boolean);l.length&&o.setAttribute("aria-describedby",l.join(" ")),i.after(o);let u=z(e,"digit","Digit {n} of {total}"),d=[];for(let m=0;m<s;m++){let b=document.createElement("input");b.type="text",b.inputMode="numeric",b.pattern="[0-9]",b.className="otp-digit",b.setAttribute("autocomplete",m===0?r:"off"),b.setAttribute("aria-label",u.replace("{n}",String(m+1)).replace("{total}",String(s))),d.push(b),o.appendChild(b)}[...i.value.replace(/\D/g,"").slice(0,s)].forEach((m,b)=>{d[b].value=m});function f(){i.value=d.map(m=>m.value).join(""),i.dispatchEvent(new Event("input",{bubbles:!0}))}function p(m,b){let g=b.replace(/\D/g,"").slice(0,s-m).split("");g.forEach((y,O)=>{d[m+O].value=y});let A=d.findIndex(y=>!y.value);A!==-1?d[A].focus():d[Math.min(m+Math.max(g.length,1)-1,s-1)].focus(),f()}d.forEach((m,b)=>{m.addEventListener("input",()=>{let g=m.value;if(g.length>1){m.value="",p(b,g);return}if(g&&!/^\d$/.test(g)){m.value="";return}g&&b<d.length-1&&d[b+1].focus(),f()}),m.addEventListener("keydown",g=>{g.key==="Backspace"&&!m.value&&b>0&&d[b-1].focus();let A=getComputedStyle(o).direction==="rtl",y=A?"ArrowRight":"ArrowLeft",O=A?"ArrowLeft":"ArrowRight";g.key===y&&b>0&&(g.preventDefault(),d[b-1].focus()),g.key===O&&b<d.length-1&&(g.preventDefault(),d[b+1].focus())}),m.addEventListener("paste",g=>{g.preventDefault();let A=(g.clipboardData||window.clipboardData)?.getData("text")??"";p(0,A)}),m.addEventListener("focus",()=>{m.select()})}),i.addEventListener("focus",()=>{(d.find(m=>!m.value)??d[s-1]).focus()}),i.form?.addEventListener("reset",()=>{queueMicrotask(()=>{let m=i.value.replace(/\D/g,"");d.forEach((b,g)=>{b.value=m[g]??""})})}),e.addEventListener("click",m=>{m.target===e&&d[0].focus()})}var $p=["weak","fair","good","strong"],iS=0;function Oo(e){let t=e.querySelector("input[data-strength]");if(!t||me.strength.has(e))return;let i=t;me.strength.add(e),e.querySelectorAll(".strength-meter, .strength-rules, .strength-status").forEach(L=>L.remove());let s=Op(i.dataset.rules||"length:8",e),n={weak:z(e,"strength-weak","Weak"),fair:z(e,"strength-fair","Fair"),good:z(e,"strength-good","Good"),strong:z(e,"strength-strong","Strong")},r=z(e,"strength","Password strength"),a=z(e,"strength-empty","No password entered"),o=z(e,"rule-met","met"),c=z(e,"rule-unmet","not met"),l=`strength-${++iS}`,u=document.createElement("div");u.className="strength-meter";let d=document.createElement("meter");d.min=0,d.max=s.length,d.low=Math.ceil(s.length*.4),d.high=Math.ceil(s.length*.75),d.optimum=s.length,d.value=0,d.className="s",d.setAttribute("aria-label",r);let h=document.createElement("span");h.className="strength-label",h.setAttribute("aria-hidden","true"),u.append(d,h);let f=document.createElement("ul");f.className="strength-rules",f.id=`${l}-rules`,f.setAttribute("aria-label",z(e,"requirements","Password requirements"));let p=s.map(L=>{let N=document.createElement("li");N.dataset.rule=L.type;let V=document.createElement("span");return V.className="visually-hidden",N.append(L.label,V),f.append(N),{li:N,state:V}}),m=document.createElement("span");m.className="strength-status visually-hidden",m.setAttribute("role","status"),(e.querySelector(".password-wrapper")||i).insertAdjacentElement("afterend",u),u.insertAdjacentElement("afterend",f),f.insertAdjacentElement("afterend",m);let g=new Set((i.getAttribute("aria-describedby")||"").split(/\s+/).filter(L=>L&&!/^strength-\d+-rules$/.test(L)));g.add(f.id),i.setAttribute("aria-describedby",[...g].join(" "));let A=$p.indexOf(i.dataset.strengthMin??""),y=z(e,"strength-too-weak","Choose a stronger password. Meet more of the requirements."),O=0,M="";function J({announce:L=!0}={}){let N=i.value,V=0;s.forEach((ot,Zp)=>{let Ts=sS(ot,N),{li:Qp,state:tm}=p[Zp];Qp.toggleAttribute("data-met",Ts),tm.textContent=`: ${Ts?o:c}`,Ts&&V++}),d.value=V;let be=V/s.length,et=N.length===0?"":be<.4?"weak":be<.75?"fair":be<1?"good":"strong",Ft=et?n[et]:"";if(h.textContent=Ft,u.dataset.level=et,d.setAttribute("aria-valuetext",Ft||a),A>=0){let ot=et!==""&&$p.indexOf(et)<A;i.setCustomValidity(ot?y:"")}et!==M&&(M=et,clearTimeout(O),L&&et?O=window.setTimeout(()=>{m.textContent=`${r}: ${Ft}`},600):m.textContent="")}i.addEventListener("input",()=>J()),$(i,()=>J({announce:!1})),J({announce:!1})}function Op(e,t){let i=[];for(let s of e.split(",")){let[n,r]=s.trim().split(":");switch(n){case"length":{let a=parseInt(r)||8;i.push({type:n,param:a,label:z(t,"rule-length","At least {n} characters").replace("{n}",String(a))});break}case"uppercase":i.push({type:n,label:z(t,"rule-uppercase","One uppercase letter")});break;case"lowercase":i.push({type:n,label:z(t,"rule-lowercase","One lowercase letter")});break;case"number":i.push({type:n,label:z(t,"rule-number","One number")});break;case"special":i.push({type:n,label:z(t,"rule-special","One special character")});break;case"":break;default:console.warn(`[data-strength] Unknown rule "${n}" ignored.`,t)}}return i.length?i:Op("length:8",t)}function sS(e,t){switch(e.type){case"length":return[...t].length>=(e.param||8);case"uppercase":return/\p{Lu}/u.test(t);case"lowercase":return/\p{Ll}/u.test(t);case"number":return/\p{N}/u.test(t);case"special":return/[^\p{L}\p{N}]/u.test(t);default:return!1}}function nS(){document.querySelectorAll('form-field:has(input[type="password"])').forEach(Io)}function rS(){document.querySelectorAll('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])').forEach($o)}function aS(){document.querySelectorAll("form-field:has(input[data-strength])").forEach(Oo)}function Pp(){nS(),rS(),aS(),new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.('form-field:has(input[type="password"])')&&Io(n),(n.matches?.('form-field:has(input[data-type="otp"])')||n.matches?.('form-field:has(input[data-type="pin"])'))&&$o(n),n.matches?.("form-field:has(input[data-strength])")&&Oo(n),n.querySelectorAll?.('form-field:has(input[type="password"])')?.forEach(Io),n.querySelectorAll?.('form-field:has(input[data-type="otp"]), form-field:has(input[data-type="pin"])')?.forEach($o),n.querySelectorAll?.("form-field:has(input[data-strength])")?.forEach(Oo)}}).observe(document.body,{childList:!0,subtree:!0})}function oS(e){let t=Date.now(),i=e*7+t%9973&65535;return btoa(JSON.stringify({s:e,t,c:i}))}function cS(e,t,i){let s=0,n=e.submitAt-(e.firstInteractionAt??e.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&&e.keyboardEventCount===0&&(s+=30),e.fieldFocusCount===0&&(s+=40),!i&&!e.mouseMovedInForm&&(s+=20),n<1e3?s+=80:n<3e3&&(s+=50),Math.min(s,100)}function lS(e){return new Promise((t,i)=>{let s=document.createElement("script");s.src=e,s.async=!0,s.onload=t,s.onerror=i,document.head.appendChild(s)})}async function uS(e,t){if(!document.querySelector("[data-cf-turnstile-loaded]"))try{await lS("https://challenges.cloudflare.com/turnstile/v0/api.js"),document.head.dataset.cfTurnstileLoaded="";let i=document.createElement("div");i.className="cf-turnstile",i.dataset.sitekey=t,i.dataset.size="invisible",e.appendChild(i)}catch{}}function Po(e){if(e.hasAttribute("data-bot-enhanced"))return;e.setAttribute("data-bot-enhanced","");let t={fieldFocusCount:0,keyboardEventCount:0,mouseMovedInForm:!1,firstInteractionAt:null,submitAt:null},i=navigator.maxTouchPoints>0;e.addEventListener("focusin",s=>{s.target.matches("input, textarea, select")&&!("honeypot"in s.target.dataset)&&(t.fieldFocusCount++,t.firstInteractionAt??=Date.now())},{capture:!0}),e.addEventListener("keydown",s=>{s.target.matches("input, textarea")&&t.keyboardEventCount++},{capture:!0}),i||e.addEventListener("mousemove",()=>{t.mouseMovedInForm=!0},{once:!0}),e.addEventListener("vb:beforesubmit",s=>{t.submitAt=Date.now();let n=cS(t,e,i),r=e.querySelector("[data-bot-score-field]");if(r||(r=document.createElement("input"),r.type="hidden",r.name="_vb_score",r.dataset.botScoreField="",e.appendChild(r)),r.value=oS(n),n>=80){s.preventDefault(),e.dispatchEvent(new CustomEvent("vb:botblocked",{bubbles:!0,detail:{score:n}}));return}n>=60&&e.dataset.turnstileSitekey&&uS(e,e.dataset.turnstileSitekey)})}function Rp(){for(let t of document.querySelectorAll("form[data-bot-protection]"))Po(t);new MutationObserver(t=>{for(let i of t)for(let s of i.addedNodes){if(s.nodeType!==Node.ELEMENT_NODE)continue;let n=s;n.matches?.("form[data-bot-protection]")&&Po(n),n.querySelectorAll?.("form[data-bot-protection]").forEach(r=>Po(r))}}).observe(document.body,{childList:!0,subtree:!0})}wt();wt();var dS=1e3,qp=new Map;function Ro(e,t){return i=>{let s=JSON.stringify(i.detail??null),n=qp.get(e),r=Date.now();n&&n.key===s&&r-n.at<dS||(qp.set(e,{key:s,at:r}),t(i))}}var hS={"vb:submit":e=>k.track("form.submit_valid",{formId:e.detail?.formId}),"wizard:step-change":e=>k.track("form.wizard_step",{from:e.detail?.from,to:e.detail?.to,direction:e.detail?.direction}),"wizard:complete":e=>k.track("form.wizard_complete",{steps:e.detail?.steps}),"wizard:reset":()=>k.track("form.wizard_reset"),"data-table:sort":e=>k.track("table.sort",{column:e.detail?.column,direction:e.detail?.direction,columnName:e.detail?.columnName}),"data-table:filter":e=>k.track("table.filter",{column:e.detail?.column,hasValue:!!e.detail?.value,length:e.detail?.value?.length??0}),"data-table:page":e=>k.track("table.paginate",{page:e.detail?.page}),"vb:theme-change":Ro("vb:theme-change",e=>k.track("ui.theme_change",{theme:e.detail?.brand??e.detail?.theme,mode:e.detail?.mode})),"vb:a11y-themes-change":Ro("vb:a11y-themes-change",e=>k.track("ui.a11y_theme",{themes:e.detail})),"vb:extensions-change":Ro("vb:extensions-change",e=>k.track("ui.extension_toggle",{extensions:e.detail})),"heading-links:navigate":e=>k.track("docs.anchor_navigate",{id:e.detail?.id}),"page-toc:navigate":e=>k.track("docs.toc_navigate",{id:e.detail?.id}),"site-search:open":()=>k.track("search.open"),"site-search:close":e=>k.track("search.close",{hasQuery:e.detail?.hasQuery}),"theme-composer:change":e=>k.track("theme.compose",{dimension:e.detail?.dimension,source:e.detail?.source,token:e.detail?.token})},fS={"accordion-wc:toggle":e=>k.track("ui.accordion_toggle",{open:e.detail?.open,index:e.detail?.index}),"tab-set:change":e=>k.track("ui.tab_change",{tab:e.detail?.index,from:e.detail?.previousIndex}),"carousel-wc:change":e=>k.track("ui.carousel_slide",{index:e.detail?.index}),"carousel-wc:play":()=>k.track("ui.carousel_play"),"carousel-wc:pause":()=>k.track("ui.carousel_pause"),"data-table:expand":e=>k.track("table.row_expand",{row:e.detail?.row}),"data-table:selection":e=>k.track("table.row_select",{count:e.detail?.count??e.detail?.rows?.length??0}),"theme-picker:open":()=>k.track("ui.theme_picker_open"),"theme-picker:close":()=>k.track("ui.theme_picker_close"),"color-palette:select":e=>k.track("palette.color_select",{name:e.detail?.name,index:e.detail?.index}),"color-palette:change":e=>k.track("palette.color_edit",{name:e.detail?.name,index:e.detail?.index}),"semantic-palette:change":e=>k.track("palette.semantic_change",{role:e.detail?.role}),"token-specimen:change":e=>k.track("tokens.edit",{token:e.detail?.token}),"spacing-specimen:change":e=>k.track("tokens.spacing_edit",{token:e.detail?.token}),"type-specimen:change":e=>k.track("tokens.type_edit",{token:e.detail?.token}),"theme-export:change":e=>k.track("theme.export_format",{format:e.detail?.format})};function Fp(e){for(let[t,i]of Object.entries(e))(t.startsWith("vb:theme-change")||t==="vb:a11y-themes-change"||t==="vb:extensions-change"?window:document).addEventListener(t,i)}function Bp({tiers:e=["tier1","tier2"]}={}){e.includes("tier1")&&Fp(hS),e.includes("tier2")&&Fp(fS)}wt();it();ee();G();lt();function pS(e,t){let i=String(e??"").split(`
|
|
496
496
|
`),s=String(t??"").split(`
|
|
497
|
-
`),n=i.length,r=s.length,a=Array.from({length:n+1},()=>new Array(r+1).fill(0));for(let u=1;u<=n;u++)for(let d=1;d<=r;d++)i[u-1]===s[d-1]?a[u][d]=a[u-1][d-1]+1:a[u][d]=Math.max(a[u-1][d],a[u][d-1]);let o=[],c=n,l=r;for(;c>0||l>0;)c>0&&l>0&&i[c-1]===s[l-1]?(o.unshift({type:"eq",text:i[c-1]}),c-=1,l-=1):l>0&&(c===0||a[c][l-1]>=a[c-1][l])?(o.unshift({type:"add",text:s[l-1]}),l-=1):(o.unshift({type:"del",text:i[c-1]}),c-=1);return o}function
|
|
497
|
+
`),n=i.length,r=s.length,a=Array.from({length:n+1},()=>new Array(r+1).fill(0));for(let u=1;u<=n;u++)for(let d=1;d<=r;d++)i[u-1]===s[d-1]?a[u][d]=a[u-1][d-1]+1:a[u][d]=Math.max(a[u-1][d],a[u][d-1]);let o=[],c=n,l=r;for(;c>0||l>0;)c>0&&l>0&&i[c-1]===s[l-1]?(o.unshift({type:"eq",text:i[c-1]}),c-=1,l-=1):l>0&&(c===0||a[c][l-1]>=a[c-1][l])?(o.unshift({type:"add",text:s[l-1]}),l-=1):(o.unshift({type:"del",text:i[c-1]}),c-=1);return o}function mS(e){let t=document.createDocumentFragment(),i=document.createElement("pre");i.className="text-diff";for(let s of e)if(s.type==="eq")i.appendChild(document.createTextNode(`${s.text}
|
|
498
498
|
`));else if(s.type==="add"){let n=document.createElement("ins");n.textContent=`${s.text}
|
|
499
499
|
`,i.appendChild(n)}else if(s.type==="del"){let n=document.createElement("del");n.textContent=`${s.text}
|
|
500
|
-
`,i.appendChild(n)}return t.appendChild(i),t}await _.init();document.documentElement.hasAttribute("data-sticky")&&
|
|
500
|
+
`,i.appendChild(n)}return t.appendChild(i),t}await _.init();document.documentElement.hasAttribute("data-sticky")&&ir();Lh();Dp();Pp();Rp();k.init({siteId:globalThis.vbAnalyticsConfig?.siteId??"vb-docs",transport:globalThis.vbAnalyticsConfig?.transport??"console",endpoint:globalThis.vbAnalyticsConfig?.endpoint??"/api/analytics"});Bp();Promise.resolve().then(()=>Vp());Promise.resolve().then(()=>Up());Promise.resolve().then(()=>Jp());vp();export{k as Analytics,_ as ThemeManager,Y as VBService,j as VBServiceError,S as VBStore,vn as VbI18n,W as announce,pS as diffLines,I as getLocale,Rb as isRTL,mS as renderDiffFragment,ft as usableLocale};
|
|
501
501
|
//# sourceMappingURL=vanilla-breeze-core.js.map
|