vanilla-breeze 0.6.0 → 0.6.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 +8361 -8408
- package/dist/cdn/components/chart-wc.js +56 -32
- package/dist/cdn/components/form-field.js +1 -1
- package/dist/cdn/components/glossary-index.js +1 -1
- package/dist/cdn/components/manifest.json +12 -12
- package/dist/cdn/components/nav-bar.js +1 -1
- package/dist/cdn/components/notification-wc.js +16 -15
- package/dist/cdn/components/page-tools.js +1 -1
- package/dist/cdn/components/settings-panel.js +1 -1
- package/dist/cdn/components/site-index.js +1 -1
- package/dist/cdn/components/site-map.js +1 -1
- package/dist/cdn/components/site-search.js +1 -1
- package/dist/cdn/components/stepper-wc.js +1 -1
- package/dist/cdn/components/theme-picker.js +44 -212
- package/dist/cdn/components/time-index.js +1 -1
- package/dist/cdn/fonts/barlow-condensed-OFL.txt +93 -0
- package/dist/cdn/fonts/barlow-condensed-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-500-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-600-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-500-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-600-normal.woff2 +0 -0
- package/dist/cdn/fonts/barlow-condensed-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/big-shoulders-display-OFL.txt +93 -0
- package/dist/cdn/fonts/big-shoulders-display-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/big-shoulders-display-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/caveat-OFL.txt +93 -0
- package/dist/cdn/fonts/caveat-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/caveat-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/courier-prime-OFL.txt +93 -0
- package/dist/cdn/fonts/courier-prime-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/courier-prime-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/courier-prime-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/courier-prime-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/dm-sans-OFL.txt +93 -0
- package/dist/cdn/fonts/dm-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/dm-sans-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/dm-serif-display-OFL.txt +93 -0
- package/dist/cdn/fonts/dm-serif-display-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/dm-serif-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/exo-2-OFL.txt +93 -0
- package/dist/cdn/fonts/exo-2-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/exo-2-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/fira-code-OFL.txt +93 -0
- package/dist/cdn/fonts/fira-code-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/fira-code-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/flow-block-OFL.txt +93 -0
- package/dist/cdn/fonts/flow-block-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/flow-block-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/fraunces-OFL.txt +93 -0
- package/dist/cdn/fonts/fraunces-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/fraunces-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/ibm-plex-mono-OFL.txt +93 -0
- package/dist/cdn/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/ibm-plex-mono-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/ibm-plex-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/ibm-plex-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/inter-OFL.txt +93 -0
- package/dist/cdn/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/jetbrains-mono-OFL.txt +93 -0
- package/dist/cdn/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/josefin-sans-OFL.txt +93 -0
- package/dist/cdn/fonts/josefin-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/josefin-sans-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/lora-OFL.txt +93 -0
- package/dist/cdn/fonts/lora-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/lora-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/merriweather-OFL.txt +93 -0
- package/dist/cdn/fonts/merriweather-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/merriweather-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/newsreader-OFL.txt +93 -0
- package/dist/cdn/fonts/newsreader-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/newsreader-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/newsreader-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/newsreader-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/nunito-OFL.txt +93 -0
- package/dist/cdn/fonts/nunito-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/nunito-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/orbitron-OFL.txt +93 -0
- package/dist/cdn/fonts/orbitron-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/playfair-display-OFL.txt +93 -0
- package/dist/cdn/fonts/playfair-display-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/playfair-display-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/press-start-2p-OFL.txt +93 -0
- package/dist/cdn/fonts/press-start-2p-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/press-start-2p-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-OFL.txt +93 -0
- package/dist/cdn/fonts/redacted-script-latin-300-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-ext-300-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/redacted-script-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/shantell-sans-OFL.txt +93 -0
- package/dist/cdn/fonts/shantell-sans-latin-ext-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/shantell-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/shantell-sans-latin-wght-italic.woff2 +0 -0
- package/dist/cdn/fonts/shantell-sans-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/share-tech-mono-OFL.txt +93 -0
- package/dist/cdn/fonts/share-tech-mono-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/source-code-pro-OFL.txt +93 -0
- package/dist/cdn/fonts/source-code-pro-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/source-code-pro-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/fonts/space-mono-OFL.txt +93 -0
- package/dist/cdn/fonts/space-mono-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/space-mono-latin-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/space-mono-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/space-mono-latin-ext-700-normal.woff2 +0 -0
- package/dist/cdn/fonts/vt323-OFL.txt +93 -0
- package/dist/cdn/fonts/vt323-latin-400-normal.woff2 +0 -0
- package/dist/cdn/fonts/vt323-latin-ext-400-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/fira-code-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/fira-code-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/nunito-latin-ext-wght-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii/fonts/nunito-latin-wght-normal.woff2 +0 -0
- package/dist/cdn/packs/kawaii.full.css +1 -1
- package/dist/cdn/packs/kawaii.theme.css +1 -1
- package/dist/cdn/packs/manifest.json +4 -4
- package/dist/cdn/packs/ui.full.css +1 -1
- package/dist/cdn/packs/ui.full.js +44 -212
- package/dist/cdn/themes/8bit.css +1 -1
- package/dist/cdn/themes/8bit.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999.css +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.css +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.css +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.css +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.css +1 -1
- package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.css +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-mocha.css +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.css +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.css +1 -1
- package/dist/cdn/themes/cottagecore.tokens.json +1 -1
- package/dist/cdn/themes/cyber.css +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.css +1 -1
- package/dist/cdn/themes/dawn.tokens.json +1 -1
- package/dist/cdn/themes/dracula.css +1 -1
- package/dist/cdn/themes/dracula.tokens.json +1 -1
- package/dist/cdn/themes/dusk.css +1 -1
- package/dist/cdn/themes/dusk.tokens.json +10 -1
- package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
- package/dist/cdn/themes/editorial.css +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.css +1 -1
- package/dist/cdn/themes/financial.tokens.json +1 -1
- package/dist/cdn/themes/genai.css +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.css +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.css +1 -1
- package/dist/cdn/themes/gruvbox.tokens.json +3 -2
- package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
- package/dist/cdn/themes/high-noon.css +1 -1
- package/dist/cdn/themes/high-noon.tokens.json +10 -1
- package/dist/cdn/themes/journal-dark.tokens.json +1 -1
- package/dist/cdn/themes/journal.css +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.css +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.css +1 -1
- package/dist/cdn/themes/magna.tokens.json +1 -1
- package/dist/cdn/themes/manifest.json +37 -37
- package/dist/cdn/themes/midnight.css +1 -1
- package/dist/cdn/themes/midnight.tokens.json +9 -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.css +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.css +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.css +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.css +1 -1
- package/dist/cdn/themes/nord.tokens.json +3 -2
- package/dist/cdn/themes/organic-dark.tokens.json +1 -1
- package/dist/cdn/themes/organic.css +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.css +1 -1
- package/dist/cdn/themes/rose-pine.tokens.json +3 -2
- package/dist/cdn/themes/rough-dark.tokens.json +1 -1
- package/dist/cdn/themes/rough.css +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.css +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.css +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.css +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.css +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.css +1 -1
- package/dist/cdn/themes/tokyo-night.tokens.json +3 -2
- package/dist/cdn/themes/vaporwave-dark.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave.css +1 -1
- package/dist/cdn/themes/vaporwave.tokens.json +9 -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 +44 -43
- package/dist/cdn/vanilla-breeze-charts.js +56 -32
- package/dist/cdn/vanilla-breeze-core.css +1 -1
- package/dist/cdn/vanilla-breeze-core.js +36 -35
- package/dist/cdn/vanilla-breeze-dev.css +1 -1
- package/dist/cdn/vanilla-breeze-extras.js +12 -12
- package/dist/cdn/vanilla-breeze.css +1 -1
- package/dist/cdn/vanilla-breeze.js +130 -297
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var A=window.matchMedia("(prefers-reduced-motion: reduce)");var f=new Map;function m(
|
|
1
|
+
var A=window.matchMedia("(prefers-reduced-motion: reduce)");var f=new Map;function m(n,t,e={}){let i=e.priority??10,r={impl:t,bundle:e.bundle,contract:e.contract,priority:i},s=f.get(n);if(customElements.get(n)){if(!s||s.priority>=i){s&&s.priority===i&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${n}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=i){s.priority===i&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${s.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}f.set(n,r),customElements.define(n,t)}var c=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,e,i,r){t.addEventListener(e,i,r),this.#t.push(()=>t.removeEventListener(e,i,r))}_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,e){this.#e||(this.#e=this.attachInternals());let i=this.#e.states;try{e?i.add(t):i.delete(t)}catch{let r=`--${t}`;e?i.add(r):i.delete(r)}}_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 g=["valueMissing","badInput","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"],v='input:not([type="hidden"]):not(.otp-digit), textarea, select',y="output.hint, output.textarea-counter",b="Please check this field.",E=0;function p(n){return n.localName.includes("-")?!!customElements.get(n.localName)?.formAssociated:!1}function a(n){return n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement}var u=class extends c{#t=null;#e=[];#i=null;#r=!1;#s="";#n;#d=`ff-${++E}`;setup(){if(this.#y(),this.#t=this.#v(),this.#i=this.querySelector("output.error")??this.querySelector("output:not(.hint):not(.textarea-counter)"),!this.#t)return!1;this.#i&&this.#n===void 0&&(this.#n=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.#b(t));let e=this.#e.length?this.#e:[t];for(let r of e)this.listen(r,"input",this.#o),this.listen(r,"change",this.#o),this.listen(r,"invalid",this.#g);a(t)||this.listen(t,`${t.localName}:change`,this.#o),this.listen(this,"focusout",r=>{let s=r.relatedTarget;s instanceof Node&&this.contains(s)||this.validate()});let i=t.form??this.closest("form");return i instanceof HTMLFormElement&&this.listen(i,"reset",r=>{setTimeout(()=>{!r.defaultPrevented&&this.isConnected&&this.clearError()})}),this.#l(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:e,message:i}=this.#E();return t&&(e?(this.#c(this.#p()?"valid":null),this.#u("")):(this.#r=!0,this.#c("invalid"),this.#u(i)),this.#l(!e)),e}setError(t){if(!this.#t)return;this.#s=t;let e=this.#h();e&&e.setCustomValidity(t),this.validate()}clearError(){this.#t&&(this.#f(),this.#r=!1,this.#c(null),this.#u(""),this.#l(!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}#o=()=>{this.#s&&this.#f(),this.#r&&this.validate()};#a=!1;#g=()=>{if(!this.#a){this.#a=!0;try{this.validate()}finally{this.#a=!1}}};#v(){for(let t of this.querySelectorAll("*"))if(p(t))return t;return this.querySelector(v)}#y(){for(let t of this.querySelectorAll(":not(:defined)"))t.localName.includes("-")&&customElements.whenDefined(t.localName).then(()=>{!this.isConnected||!this.contains(t)||this.#t===t||p(t)&&this._reinit()})}#b(t){return t.name?(t.form?[...t.form.elements]:[...t.getRootNode().querySelectorAll('input[type="radio"]')].filter(i=>!i.form)).filter(i=>i instanceof HTMLInputElement&&i.type==="radio"&&i.name===t.name):[t]}#h(){let t=this.#t;return t&&a(t)?t:null}#f(){let t=this.#h();t&&t.validity.customError&&t.validationMessage===this.#s&&t.setCustomValidity(""),this.#s=""}#E(){let t=this.#t;if(this.#s)return{valid:!1,message:this.#s};let e=t.validity;if(e)return e.valid?{valid:!0,message:""}:{valid:!1,message:this.#m(e)};let i=t.matches(":invalid");return{valid:!i,message:i?this.#m(null):""}}#m(t){let e=this.#t,i=a(e),r=s=>e.getAttribute(`data-message-${s.toLowerCase()}`)??(i?null:this.getAttribute(`data-message-${s.toLowerCase()}`));if(t)for(let s of g){if(!t[s])continue;let o=r(s);if(o)return o;if((s==="customError"||!i)&&e.validationMessage)return e.validationMessage;break}else if(!this.#p()){let s=r("valueMissing");if(s)return s}return this.#n||e.validationMessage||this.getAttribute("data-message-invalid")||b}#p(){let t=this.#t;if(this.#e.length)return this.#e.some(i=>i.checked);if(t instanceof HTMLInputElement&&t.type==="checkbox")return t.checked;let e=t.value;return Array.isArray(e)?e.length>0:!a(t)&&e===0?!1:e!=null&&String(e)!==""}#A(){let t=this.#t,e=this.querySelector('.otp-wrapper[role="group"]');return e?[e]:this.#e.length?this.#e.filter(i=>this.contains(i)):a(t)?[t]:[t.querySelector('[role="combobox"], fieldset, input:not([type="hidden"]):not([aria-hidden="true"]), textarea, select')??t]}#l(t){let e=[...this.querySelectorAll(y)];e.forEach((o,l)=>{o.id||(o.id=`${this.#d}-hint${l?`-${l}`:""}`)});let i=this.#i;i&&!i.id&&(i.id=`${this.#d}-error`);let r=new Set([...e.map(o=>o.id),...i?[i.id]:[]]),s=[...e.map(o=>o.id),...t&&i?[i.id]:[]];for(let o of this.#A()){let l=(o.getAttribute("aria-describedby")??"").split(/\s+/).filter(h=>h&&!r.has(h)),d=[...new Set([...l,...s])];d.length?o.setAttribute("aria-describedby",d.join(" ")):o.removeAttribute("aria-describedby"),t?o.setAttribute("aria-invalid","true"):o.removeAttribute("aria-invalid")}}#c(t){delete this.dataset.valid,delete this.dataset.invalid,t&&(this.dataset[t]="")}#u(t){this.#i&&(this.#i.textContent=t)}};m("form-field",u);export{u as FormField};
|
|
2
2
|
//# sourceMappingURL=form-field.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var U=window.matchMedia("(prefers-reduced-motion: reduce)");var x=new Map;function T(s,e,t={}){let r=t.priority??10,n={impl:e,bundle:t.bundle,contract:t.contract,priority:r},i=x.get(s);if(customElements.get(s)){if(!i||i.priority>=r){i&&i.priority===r&&i.impl!==e&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${i.bundle}" (priority ${i.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${i.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(i&&i.priority>=r){i.priority===r&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${i.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}x.set(s,n),customElements.define(s,e)}var m=class extends HTMLElement{#r=[];#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 e of this.#r)e();this.#r=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,t,r,n){e.addEventListener(t,r,n),this.#r.push(()=>e.removeEventListener(t,r,n))}_reinit(){for(let e of this.#r)e();this.#r=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(e,t){this.#e||(this.#e=this.attachInternals());let r=this.#e.states;try{t?r.add(e):r.delete(e)}catch{let n=`--${e}`;t?r.add(n):r.delete(n)}}_adoptInternals(e){this.#e||(this.#e=e)}#t(){return this.constructor.formAssociated&&this.#e?this.#e:null}get validity(){return this.#t()?.validity}get validationMessage(){return this.#t()?.validationMessage??""}get willValidate(){return this.#t()?.willValidate??!1}get form(){return this.#t()?.form??null}checkValidity(){return this.#t()?.checkValidity()??!0}reportValidity(){return this.#t()?.reportValidity()??!0}};var D=["position:absolute","inline-size:1px","block-size:1px","padding:0","margin:-1px","overflow:hidden","clip-path:inset(50%)","white-space:nowrap","border:0"].join(";"),S=new WeakMap;function R(s,e){let t=S.get(e);t||S.set(e,t=new Map);let r=t.get(s);if(!r||!r.region.isConnected){let i=(e.ownerDocument||document).createElement("span");i.setAttribute("data-vb-announcer",s),i.setAttribute("role",s==="assertive"?"alert":"status"),i.setAttribute("aria-live",s),i.setAttribute("aria-atomic","true"),i.style.cssText=D,e.appendChild(i),r={region:i},t.set(s,r)}return r}function k(s,{politeness:e="polite",root:t}={}){let r=String(s??"").trim();if(!r||typeof document>"u")return null;let n=t||document.body;if(!n)return null;let o=R(e==="assertive"?"assertive":"polite",n);return clearTimeout(o.write),clearTimeout(o.clear),o.region.textContent="",o.write=setTimeout(()=>{o.region.textContent=r,o.clear=setTimeout(()=>{o.region.textContent=""},7e3)},50),o.region}function p(s,e,t,r){let n=`data-label-${e}`,o=s?.closest?.(`[${n}]`)?.getAttribute(n)||t;return r?o.replace(/\{(\w+)\}/g,(c,l)=>l in r?String(r[l]):c):o}var M=1500,F="[data-copy], [data-copy-target], [data-paste-target]",h={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"},A=new WeakMap;function _(s){if(typeof document.execCommand!="function"||!document.body)return!1;let e=document.activeElement,t=document.createElement("textarea");t.value=s,t.setAttribute("readonly",""),t.setAttribute("aria-hidden","true"),t.style.cssText="position:fixed;inset-block-start:0;inset-inline-start:0;opacity:0;pointer-events:none",document.body.appendChild(t),t.select();let r=!1;try{r=document.execCommand("copy")}catch{r=!1}return t.remove(),e?.focus?.({preventScroll:!0}),r}function B(s){if(!s)return!1;if(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)return s.focus(),s.select(),!0;let e=window.getSelection?.();if(!e)return!1;let t=document.createRange();return t.selectNodeContents(s),e.removeAllRanges(),e.addRange(t),!e.isCollapsed}async function E(s,e={}){if(s==null||s==="")return!1;let{button:t,duration:r=M}=e,n=!1,i=null;try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(s),n=!0}catch(c){i=c,n=_(s)}if(n)return y({button:t,duration:r,state:"copied",eventName:"copy:done",eventDetail:{text:s},message:e.announceMessage??p(t,"copied",h.copied)}),!0;let o=B(e.source);return y({button:t,duration:r,state:"failed",eventName:"copy:error",eventDetail:{text:s,error:i},message:e.failureMessage??p(t,"copy-failed",o?h["copy-failed-selected"]:h["copy-failed"])}),!1}function y({button:s,duration:e,message:t,eventDetail:r,state:n,eventName:i}){if(s){s.dataset.state=n;let o=A.get(s);o&&clearTimeout(o),A.set(s,setTimeout(()=>{s.dataset.state===n&&delete s.dataset.state,A.delete(s)},e)),s.dispatchEvent(new CustomEvent(i,{bubbles:!0,detail:r}))}k(t,{politeness:n==="failed"?"assertive":"polite"})}async function P(s,e={}){let{button:t,duration:r=M}=e,n;try{if(!navigator.clipboard?.readText)throw new Error("Clipboard API unavailable");n=await navigator.clipboard.readText()}catch(i){return y({button:t,duration:r,state:"failed",eventName:"paste:error",eventDetail:{target:s,error:i},message:e.failureMessage??p(t,"paste-failed",h["paste-failed"])}),null}return s&&(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement||s instanceof HTMLSelectElement?s.value=n:s.textContent=n,s.dispatchEvent(new Event("input",{bubbles:!0}))),y({button:t,duration:r,state:"pasted",eventName:"paste:done",eventDetail:{text:n,target:s},message:e.announceMessage??p(t,"pasted",h.pasted)}),n}function L(s){let e=s.dataset.copyTarget;if(!e)return null;try{return document.querySelector(e)}catch{return null}}function O(s){if(s.dataset.copy)return s.dataset.copy;let e=L(s);if(!e)return"";let t=s.dataset.copyAttr;return t?e.getAttribute(t)??"":e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e.value:e.textContent??""}function j(s){let e=s.target?.closest?.(F);if(!e||e.matches(':disabled, [aria-disabled="true"]'))return;if(e.dataset.pasteTarget){let r=null;try{r=document.querySelector(e.dataset.pasteTarget)}catch{}if(!r)return;P(r,{button:e});return}let t=O(e);t&&E(t,{button:e,source:L(e)??void 0})}typeof document<"u"&&!document.__vbCopyDelegated&&(document.__vbCopyDelegated=!0,document.addEventListener("click",j));var H=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function w(s,e){let r=(()=>{try{return decodeURIComponent(location.hash.slice(1))}catch{return location.hash.slice(1)}})()===e;r||(location.hash=e);let n=s;typeof n.focus=="function"&&(n.tabIndex<0&&!n.hasAttribute("tabindex")&&n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0})),(r||!n.matches?.(":target"))&&n.scrollIntoView({behavior:H()?"auto":"smooth",block:"start"})}function N(s){let e=s;if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;let r=(e.target instanceof Element?e.target:null)?.closest('a[href^="#"]');if(!r)return!1;let n=r.getAttribute("target");if(n&&n!=="_self"||r.hasAttribute("download"))return!1;let i=(r.getAttribute("href")??"").slice(1);if(!i)return!1;let o=i;try{o=decodeURIComponent(i)}catch{}let c=r.ownerDocument.getElementById(o);return c?(e.preventDefault(),w(c,o),!0):!1}var $={filter:"Filter glossary terms","matches-one":"{count} term matches","matches-other":"{count} terms match","all-one":"Showing {count} term","all-other":"Showing all {count} terms",empty:"No terms match your filter.",permalink:"Copy link to",copied:"Link copied to clipboard"},g='.glossary-section, section[id^="glossary-"]',V=1500;function K(s){let e=[],t=null;for(let r of[...s.children])if(r.localName==="div"){let n={dts:[],dds:[],wrapper:r};for(let i of[...r.children])i.localName==="dt"?n.dts.push(i):i.localName==="dd"&&n.dds.push(i);e.push(n),t=null}else r.localName==="dt"?((!t||t.dds.length)&&(t={dts:[],dds:[],wrapper:null},e.push(t)),t.dts.push(r)):r.localName==="dd"&&(t||(t={dts:[],dds:[],wrapper:null},e.push(t)),t.dds.push(r));return e}var C=class extends m{#r=null;#e=null;#t=null;#i=null;#a=[];#n=new Map;#o="";setup(){this.#o="",this.listen(this,"click",this.#h),this.listen(this,"click",N),this.#f(),this.#p(),this.#y()}teardown(){this.#i?.disconnect(),this.#i=null;for(let e of this.#n.values())clearTimeout(e);this.#n.clear(),this.#o&&this.#l("",{silent:!0}),this.#r?.remove(),this.#e?.remove(),this.#t?.remove();for(let e of this.#a)e.remove();for(let e of this.querySelectorAll(".glossary-jump a[aria-current]"))e.removeAttribute("aria-current");this.#r=null,this.#e=null,this.#t=null,this.#a=[]}#f(){let e=document.createElement("search");e.className="glossary-search";let t=document.createElement("input");t.type="search",t.placeholder=this.getAttribute("placeholder")||"Filter terms\u2026",t.setAttribute("aria-label",this.#s("filter")),e.append(t),this.listen(t,"input",()=>this.#l(t.value));let r=document.createElement("p");r.className="glossary-status",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true");let n=document.createElement("p");n.className="glossary-empty",n.textContent=this.#s("empty"),n.hidden=!0;let i=this.querySelector("main"),o=this.querySelector(".glossary-jump"),c=this.querySelector(":scope > :is(h1, h2, h3, h4, h5, h6)");i?i.prepend(e,r):o?.parentElement?o.before(e,r):c?c.after(e,r):this.prepend(e,r);let l=this.querySelectorAll(g),f=l[l.length-1];f?f.after(n):r.after(n),this.#r=e,this.#e=r,this.#t=n}#l(e,{silent:t=!1}={}){let r=this.#c(),n=a=>{try{return a.toLocaleLowerCase(r)}catch{return a.toLowerCase()}},i=n(e.trim()),o=this.#o!=="";this.#o=i;let c=0,l=0,f=new Set;for(let a of this.querySelectorAll(g)){let d=!1;for(let I of a.querySelectorAll("dl"))for(let u of K(I)){if(!u.dts.length)continue;l+=u.dts.length;let q=n(u.dts.map(v=>this.#d(v)).join(" ")),b=!i||q.includes(i);u.wrapper&&(u.wrapper.hidden=!b);for(let v of[...u.dts,...u.dds])v.hidden=!b;b&&(d=!0,c+=u.dts.length)}a.hidden=!d,!d&&a.id&&f.add(a.id)}for(let a of this.querySelectorAll('.glossary-jump a[href^="#"]')){let d=decodeURIComponent((a.getAttribute("href")??"").slice(1));f.has(d)?a.hasAttribute("aria-disabled")||(a.setAttribute("aria-disabled","true"),a.setAttribute("data-glossary-disabled","")):a.hasAttribute("data-glossary-disabled")&&(a.removeAttribute("aria-disabled"),a.removeAttribute("data-glossary-disabled"))}if(this.#t&&(this.#t.hidden=!i||c>0),!t){if(this.#e&&(i||o)){let a=i?this.#u("matches",c):this.#u("all",l),d=this.#e;d.textContent="",requestAnimationFrame(()=>{d.textContent=a})}this.dispatchEvent(new CustomEvent("glossary-index:filter",{bubbles:!0,detail:{query:i,matchCount:c}}))}}#p(){for(let e of this.querySelectorAll(`:is(${g}) dl dt[id]`)){if(e.querySelector(":scope > .glossary-permalink"))continue;let t=document.createElement("a");t.className="glossary-permalink",t.href=`#${encodeURIComponent(e.id)}`,t.setAttribute("aria-label",`${this.#s("permalink")} ${this.#d(e)}`);let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.textContent="#",t.append(r),e.append(t),this.#a.push(t)}}#d(e){let t=e.querySelector("dfn");if(t)return(t.textContent??"").trim();let r="";for(let n of e.childNodes)n instanceof Element&&n.classList.contains("glossary-permalink")||(r+=n.textContent??"");return r.replace(/\s+/g," ").trim()}#h=e=>{let t=e,n=(t.target instanceof Element?t.target:null)?.closest("a");if(!n||!this.contains(n))return;if(n.getAttribute("aria-disabled")==="true"){t.preventDefault();return}if(!n.classList.contains("glossary-permalink")||t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let i=n.parentElement;i?.id&&(t.preventDefault(),this.#m(i,n))};async#m(e,t){w(e,e.id);let r=new URL(document.URL);r.hash=e.id,await E(r.href,{announceMessage:this.#s("copied")})&&(t.dataset.state="copied",clearTimeout(this.#n.get(t)),this.#n.set(t,setTimeout(()=>{delete t.dataset.state,this.#n.delete(t)},V)))}#y(){let e=this.querySelectorAll(".glossary-jump a");if(!e.length)return;let t=this.querySelectorAll(g);if(t.length){this.#i=new IntersectionObserver(r=>{for(let n of r)if(n.isIntersecting){let i=n.target.id;for(let o of e){let c=o.getAttribute("href")===`#${i}`;o.setAttribute("aria-current",c?"true":"false")}}},{rootMargin:"-20% 0px -60% 0px"});for(let r of t)this.#i.observe(r)}}#c(){return this.closest("[lang]")?.getAttribute("lang")||void 0}#s(e){return this.getAttribute(`data-label-${e}`)??$[e]??""}#u(e,t){let r="other",n=String(t);try{r=new Intl.PluralRules(this.#c()).select(t),n=new Intl.NumberFormat(this.#c()).format(t)}catch{}return(this.getAttribute(`data-label-${e}-${r}`)??$[`${e}-${r}`]??this.#s(`${e}-other`)).replaceAll("{count}",n)}};T("glossary-index",C);export{C as GlossaryIndex,K as termGroups};
|
|
1
|
+
var U=window.matchMedia("(prefers-reduced-motion: reduce)");var x=new Map;function T(i,e,t={}){let r=t.priority??10,n={impl:e,bundle:t.bundle,contract:t.contract,priority:r},s=x.get(i);if(customElements.get(i)){if(!s||s.priority>=r){s&&s.priority===r&&s.impl!==e&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=r){s.priority===r&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${s.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}x.set(i,n),customElements.define(i,e)}var y=class extends HTMLElement{#r=[];#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 e of this.#r)e();this.#r=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,t,r,n){e.addEventListener(t,r,n),this.#r.push(()=>e.removeEventListener(t,r,n))}_reinit(){for(let e of this.#r)e();this.#r=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(e,t){this.#e||(this.#e=this.attachInternals());let r=this.#e.states;try{t?r.add(e):r.delete(e)}catch{let n=`--${e}`;t?r.add(n):r.delete(n)}}_adoptInternals(e){this.#e||(this.#e=e)}#t(){return this.constructor.formAssociated&&this.#e?this.#e:null}get validity(){return this.#t()?.validity}get validationMessage(){return this.#t()?.validationMessage??""}get willValidate(){return this.#t()?.willValidate??!1}get form(){return this.#t()?.form??null}checkValidity(){return this.#t()?.checkValidity()??!0}reportValidity(){return this.#t()?.reportValidity()??!0}};var D=["position:absolute","inline-size:1px","block-size:1px","padding:0","margin:-1px","overflow:hidden","clip-path:inset(50%)","white-space:nowrap","border:0"].join(";"),S=new WeakMap;function F(i,e){let t=S.get(e);t||S.set(e,t=new Map);let r=t.get(i);if(!r||!r.region.isConnected){let s=(e.ownerDocument||document).createElement("span");s.setAttribute("data-vb-announcer",i),s.setAttribute("role",i==="assertive"?"alert":"status"),s.setAttribute("aria-live",i),s.setAttribute("aria-atomic","true"),s.style.cssText=D,e.appendChild(s),r={region:s},t.set(i,r)}return r}function k(i,{politeness:e="polite",root:t}={}){let r=String(i??"").trim();if(!r||typeof document>"u")return null;let n=t||document.body;if(!n)return null;let o=F(e==="assertive"?"assertive":"polite",n);return clearTimeout(o.write),clearTimeout(o.clear),o.region.textContent="",o.write=setTimeout(()=>{o.region.textContent=r,o.clear=setTimeout(()=>{o.region.textContent=""},7e3)},50),o.region}function h(i,e,t,r){let n=`data-label-${e}`,o=i?.closest?.(`[${n}]`)?.getAttribute(n)||t;return r?o.replace(/\{(\w+)\}/g,(l,c)=>c in r?String(r[c]):l):o}var M=1500,R="[data-copy], [data-copy-target], [data-paste-target]",p={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"},w=new WeakMap;function _(i){if(typeof document.execCommand!="function"||!document.body)return!1;let e=document.activeElement,t=document.createElement("textarea");t.value=i,t.setAttribute("readonly",""),t.setAttribute("aria-hidden","true"),t.style.cssText="position:fixed;inset-block-start:0;inset-inline-start:0;opacity:0;pointer-events:none",document.body.appendChild(t),t.select();let r=!1;try{r=document.execCommand("copy")}catch{r=!1}return t.remove(),e?.focus?.({preventScroll:!0}),r}function B(i){if(!i)return!1;if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)return i.focus(),i.select(),!0;let e=window.getSelection?.();if(!e)return!1;let t=document.createRange();return t.selectNodeContents(i),e.removeAllRanges(),e.addRange(t),!e.isCollapsed}async function A(i,e={}){if(i==null||i==="")return!1;let{button:t,duration:r=M}=e,n=!1,s=null;try{if(!navigator.clipboard?.writeText)throw new Error("Clipboard API unavailable");await navigator.clipboard.writeText(i),n=!0}catch(l){s=l,n=_(i)}if(n)return g({button:t,duration:r,state:"copied",eventName:"copy:done",eventDetail:{text:i},message:e.announceMessage??h(t,"copied",p.copied)}),!0;let o=B(e.source);return g({button:t,duration:r,state:"failed",eventName:"copy:error",eventDetail:{text:i,error:s},message:e.failureMessage??h(t,"copy-failed",o?p["copy-failed-selected"]:p["copy-failed"])}),!1}function g({button:i,duration:e,message:t,eventDetail:r,state:n,eventName:s}){if(i){i.dataset.state=n;let o=w.get(i);o&&clearTimeout(o),w.set(i,setTimeout(()=>{i.dataset.state===n&&delete i.dataset.state,w.delete(i)},e)),i.dispatchEvent(new CustomEvent(s,{bubbles:!0,detail:r}))}k(t,{politeness:n==="failed"?"assertive":"polite"})}async function P(i,e={}){let{button:t,duration:r=M}=e,n;try{if(!navigator.clipboard?.readText)throw new Error("Clipboard API unavailable");n=await navigator.clipboard.readText()}catch(s){return g({button:t,duration:r,state:"failed",eventName:"paste:error",eventDetail:{target:i,error:s},message:e.failureMessage??h(t,"paste-failed",p["paste-failed"])}),null}return i&&(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement?i.value=n:i.textContent=n,i.dispatchEvent(new Event("input",{bubbles:!0}))),g({button:t,duration:r,state:"pasted",eventName:"paste:done",eventDetail:{text:n,target:i},message:e.announceMessage??h(t,"pasted",p.pasted)}),n}function L(i){let e=i.dataset.copyTarget;if(!e)return null;try{return document.querySelector(e)}catch{return null}}function j(i){if(i.dataset.copy)return i.dataset.copy;let e=L(i);if(!e)return"";let t=i.dataset.copyAttr;return t?e.getAttribute(t)??"":e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e.value:e.textContent??""}function H(i){let e=i.target?.closest?.(R);if(!e||e.matches(':disabled, [aria-disabled="true"]'))return;if(e.dataset.pasteTarget){let r=null;try{r=document.querySelector(e.dataset.pasteTarget)}catch{}if(!r)return;P(r,{button:e});return}let t=j(e);t&&A(t,{button:e,source:L(e)??void 0})}typeof document<"u"&&!document.__vbCopyDelegated&&(document.__vbCopyDelegated=!0,document.addEventListener("click",H));var O=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function E(i,e){let r=(()=>{try{return decodeURIComponent(location.hash.slice(1))}catch{return location.hash.slice(1)}})()===e;r||(location.hash=e);let n=i;typeof n.focus=="function"&&(n.tabIndex<0&&!n.hasAttribute("tabindex")&&n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0})),(r||!n.matches?.(":target"))&&n.scrollIntoView({behavior:O()?"auto":"smooth",block:"start"})}function q(i){let e=i;if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;let r=(e.target instanceof Element?e.target:null)?.closest('a[href^="#"]');if(!r)return!1;let n=r.getAttribute("target");if(n&&n!=="_self"||r.hasAttribute("download"))return!1;let s=(r.getAttribute("href")??"").slice(1);if(!s)return!1;let o=s;try{o=decodeURIComponent(s)}catch{}let l=r.ownerDocument.getElementById(o);return l?(e.preventDefault(),E(l,o),!0):!1}var N={filter:"Filter glossary terms","matches-one":"{count} term matches","matches-other":"{count} terms match","all-one":"Showing {count} term","all-other":"Showing all {count} terms",empty:"No terms match your filter.",permalink:"Copy link to",copied:"Link copied to clipboard"},m='.glossary-section, section[id^="glossary-"]',V=1500;function K(i){let e=[],t=null;for(let r of[...i.children])if(r.localName==="div"){let n={dts:[],dds:[],wrapper:r};for(let s of[...r.children])s.localName==="dt"?n.dts.push(s):s.localName==="dd"&&n.dds.push(s);e.push(n),t=null}else r.localName==="dt"?((!t||t.dds.length)&&(t={dts:[],dds:[],wrapper:null},e.push(t)),t.dts.push(r)):r.localName==="dd"&&(t||(t={dts:[],dds:[],wrapper:null},e.push(t)),t.dds.push(r));return e}var C=class extends y{#r=null;#e=null;#t=null;#n=0;#a=[];#i=new Map;#o="";setup(){this.#o="",this.listen(this,"click",this.#m),this.listen(this,"click",q),this.#h(),this.hasAttribute("permalinks")&&this.#p(),this.#g()}teardown(){cancelAnimationFrame(this.#n),this.#n=0;for(let e of this.#i.values())clearTimeout(e);this.#i.clear(),this.#o&&this.#c("",{silent:!0}),this.#r?.remove(),this.#e?.remove(),this.#t?.remove();for(let e of this.#a)e.remove();for(let e of this.querySelectorAll(".glossary-jump a[aria-current]"))e.removeAttribute("aria-current");this.#r=null,this.#e=null,this.#t=null,this.#a=[]}#h(){let e=document.createElement("search");e.className="glossary-search";let t=document.createElement("input");t.type="search",t.placeholder=this.getAttribute("placeholder")||"Filter terms\u2026",t.setAttribute("aria-label",this.#s("filter")),e.append(t),this.listen(t,"input",()=>this.#c(t.value));let r=document.createElement("p");r.className="glossary-status",r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true");let n=document.createElement("p");n.className="glossary-empty",n.textContent=this.#s("empty"),n.hidden=!0;let s=this.querySelector("main"),o=this.querySelector(".glossary-jump"),l=this.querySelector(":scope > :is(h1, h2, h3, h4, h5, h6)");s?s.prepend(e,r):o?.parentElement?o.before(e,r):l?l.after(e,r):this.prepend(e,r);let c=this.querySelectorAll(m),f=c[c.length-1];f?f.after(n):r.after(n),this.#r=e,this.#e=r,this.#t=n}#c(e,{silent:t=!1}={}){let r=this.#l(),n=a=>{try{return a.toLocaleLowerCase(r)}catch{return a.toLowerCase()}},s=n(e.trim()),o=this.#o!=="";this.#o=s;let l=0,c=0,f=new Set;for(let a of this.querySelectorAll(m)){let d=!1;for(let $ of a.querySelectorAll("dl"))for(let u of K($)){if(!u.dts.length)continue;c+=u.dts.length;let I=n(u.dts.map(v=>this.#d(v)).join(" ")),b=!s||I.includes(s);u.wrapper&&(u.wrapper.hidden=!b);for(let v of[...u.dts,...u.dds])v.hidden=!b;b&&(d=!0,l+=u.dts.length)}a.hidden=!d,!d&&a.id&&f.add(a.id)}for(let a of this.querySelectorAll('.glossary-jump a[href^="#"]')){let d=decodeURIComponent((a.getAttribute("href")??"").slice(1));f.has(d)?a.hasAttribute("aria-disabled")||(a.setAttribute("aria-disabled","true"),a.setAttribute("data-glossary-disabled","")):a.hasAttribute("data-glossary-disabled")&&(a.removeAttribute("aria-disabled"),a.removeAttribute("data-glossary-disabled"))}if(this.#t&&(this.#t.hidden=!s||l>0),!t){if(this.#e&&(s||o)){let a=s?this.#f("matches",l):this.#f("all",c),d=this.#e;d.textContent="",requestAnimationFrame(()=>{d.textContent=a})}this.dispatchEvent(new CustomEvent("glossary-index:filter",{bubbles:!0,detail:{query:s,matchCount:l}}))}}#p(){for(let e of this.querySelectorAll(`:is(${m}) dl dt[id]`)){if(e.querySelector(":scope > .glossary-permalink"))continue;let t=document.createElement("a");t.className="glossary-permalink",t.href=`#${encodeURIComponent(e.id)}`,t.setAttribute("aria-label",`${this.#s("permalink")} ${this.#d(e)}`);let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.textContent="#",t.append(r),e.append(t),this.#a.push(t)}}#d(e){let t=e.querySelector("dfn");if(t)return(t.textContent??"").trim();let r="";for(let n of e.childNodes)n instanceof Element&&n.classList.contains("glossary-permalink")||(r+=n.textContent??"");return r.replace(/\s+/g," ").trim()}#m=e=>{let t=e,n=(t.target instanceof Element?t.target:null)?.closest("a");if(!n||!this.contains(n))return;if(n.getAttribute("aria-disabled")==="true"){t.preventDefault();return}if(!n.classList.contains("glossary-permalink")||t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let s=n.parentElement;s?.id&&(t.preventDefault(),this.#y(s,n))};async#y(e,t){E(e,e.id);let r=new URL(document.URL);r.hash=e.id,await A(r.href,{announceMessage:this.#s("copied")})&&(t.dataset.state="copied",clearTimeout(this.#i.get(t)),this.#i.set(t,setTimeout(()=>{delete t.dataset.state,this.#i.delete(t)},V)))}#g(){if(!this.querySelector(".glossary-jump a")||!this.querySelector(m))return;let e=()=>{this.#n||(this.#n=requestAnimationFrame(()=>{this.#n=0,this.#u()}))};this.listen(window,"scroll",e,{passive:!0}),this.listen(window,"resize",e,{passive:!0}),this.#u()}#u(){let e=[...this.querySelectorAll(m)].filter(n=>!n.hidden);if(!e.length)return;let t=window.innerHeight/3,r=e[0];for(let n of e)if(n.getBoundingClientRect().top<=t)r=n;else break;for(let n of this.querySelectorAll(".glossary-jump a"))n.setAttribute("aria-current",n.getAttribute("href")===`#${r.id}`?"true":"false")}#l(){return this.closest("[lang]")?.getAttribute("lang")||void 0}#s(e){return this.getAttribute(`data-label-${e}`)??N[e]??""}#f(e,t){let r="other",n=String(t);try{r=new Intl.PluralRules(this.#l()).select(t),n=new Intl.NumberFormat(this.#l()).format(t)}catch{}return(this.getAttribute(`data-label-${e}-${r}`)??N[`${e}-${r}`]??this.#s(`${e}-other`)).replaceAll("{count}",n)}};T("glossary-index",C);export{C as GlossaryIndex,K as termGroups};
|
|
2
2
|
//# sourceMappingURL=glossary-index.js.map
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"chart-wc": {
|
|
59
59
|
"file": "chart-wc.js",
|
|
60
|
-
"size":
|
|
60
|
+
"size": 84027
|
|
61
61
|
},
|
|
62
62
|
"chat-input": {
|
|
63
63
|
"file": "chat-input.js",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
},
|
|
162
162
|
"form-field": {
|
|
163
163
|
"file": "form-field.js",
|
|
164
|
-
"size":
|
|
164
|
+
"size": 6938
|
|
165
165
|
},
|
|
166
166
|
"geo-map": {
|
|
167
167
|
"file": "geo-map.js",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
},
|
|
170
170
|
"glossary-index": {
|
|
171
171
|
"file": "glossary-index.js",
|
|
172
|
-
"size":
|
|
172
|
+
"size": 13349
|
|
173
173
|
},
|
|
174
174
|
"glossary-wc": {
|
|
175
175
|
"file": "glossary-wc.js",
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
},
|
|
210
210
|
"nav-bar": {
|
|
211
211
|
"file": "nav-bar.js",
|
|
212
|
-
"size":
|
|
212
|
+
"size": 6689
|
|
213
213
|
},
|
|
214
214
|
"note-wc": {
|
|
215
215
|
"file": "note-wc.js",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
},
|
|
218
218
|
"notification-wc": {
|
|
219
219
|
"file": "notification-wc.js",
|
|
220
|
-
"size":
|
|
220
|
+
"size": 21925
|
|
221
221
|
},
|
|
222
222
|
"page-info": {
|
|
223
223
|
"file": "page-info.js",
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
},
|
|
234
234
|
"page-tools": {
|
|
235
235
|
"file": "page-tools.js",
|
|
236
|
-
"size":
|
|
236
|
+
"size": 7093
|
|
237
237
|
},
|
|
238
238
|
"page-tour": {
|
|
239
239
|
"file": "page-tour.js",
|
|
@@ -309,15 +309,15 @@
|
|
|
309
309
|
},
|
|
310
310
|
"site-index": {
|
|
311
311
|
"file": "site-index.js",
|
|
312
|
-
"size":
|
|
312
|
+
"size": 10395
|
|
313
313
|
},
|
|
314
314
|
"site-map": {
|
|
315
315
|
"file": "site-map.js",
|
|
316
|
-
"size":
|
|
316
|
+
"size": 30920
|
|
317
317
|
},
|
|
318
318
|
"site-search": {
|
|
319
319
|
"file": "site-search.js",
|
|
320
|
-
"size":
|
|
320
|
+
"size": 13924
|
|
321
321
|
},
|
|
322
322
|
"slide-accept": {
|
|
323
323
|
"file": "slide-accept.js",
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
},
|
|
342
342
|
"stepper-wc": {
|
|
343
343
|
"file": "stepper-wc.js",
|
|
344
|
-
"size":
|
|
344
|
+
"size": 14240
|
|
345
345
|
},
|
|
346
346
|
"tab-set": {
|
|
347
347
|
"file": "tab-set.js",
|
|
@@ -353,11 +353,11 @@
|
|
|
353
353
|
},
|
|
354
354
|
"theme-picker": {
|
|
355
355
|
"file": "theme-picker.js",
|
|
356
|
-
"size":
|
|
356
|
+
"size": 35453
|
|
357
357
|
},
|
|
358
358
|
"time-index": {
|
|
359
359
|
"file": "time-index.js",
|
|
360
|
-
"size":
|
|
360
|
+
"size": 8313
|
|
361
361
|
},
|
|
362
362
|
"time-picker": {
|
|
363
363
|
"file": "time-picker.js",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var A=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;function g(s,t,n={}){let e=n.priority??10,r={impl:t,bundle:n.bundle,contract:n.contract,priority:e},i=m.get(s);if(customElements.get(s)){if(!i||i.priority>=e){i&&i.priority===e&&i.impl!==t&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${i.bundle}" (priority ${i.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${i.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(i&&i.priority>=e){i.priority===e&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${i.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}m.set(s,r),customElements.define(s,t)}var f=class extends HTMLElement{#e=[];#t;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.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,n,e,r){t.addEventListener(n,e,r),this.#e.push(()=>t.removeEventListener(n,e,r))}_reinit(){for(let t of this.#e)t();this.#e=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,n){this.#t||(this.#t=this.attachInternals());let e=this.#t.states;try{n?e.add(t):e.delete(t)}catch{let r=`--${t}`;n?e.add(r):e.delete(r)}}_adoptInternals(t){this.#t||(this.#t=t)}#n(){return this.constructor.formAssociated&&this.#t?this.#t:null}get validity(){return this.#n()?.validity}get validationMessage(){return this.#n()?.validationMessage??""}get willValidate(){return this.#n()?.willValidate??!1}get form(){return this.#n()?.form??null}checkValidity(){return this.#n()?.checkValidity()??!0}reportValidity(){return this.#n()?.reportValidity()??!0}};var b=class extends f{#e=null;#t=!1;#n=null;setup(){!this.hasAttribute("role")&&!this.querySelector("nav")&&this.setAttribute("role","navigation"),this.#r("pathname"),this.listen(window,"popstate",this.#o);let t=window.navigation;t&&typeof t.addEventListener=="function"&&this.listen(t,"currententrychange",this.#a)}get items(){return this.#e?this.#e.map(t=>({...t})):Array.from(this.#i()).map(t=>({href:t.getAttribute("href")||"",label:t.textContent?.trim()||""}))}set items(t){if(!Array.isArray(t))return;let n=t.map(e=>({...e}));this.#e&&this.#h(this.#e,n)||(this.#e=n,this.#u(n),this.#t?this.#s(this.#n):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.#t)return this.#n;for(let t of this.#i())if(t.getAttribute("aria-current")==="page")return t.getAttribute("data-route")||t.getAttribute("href")||null;return null}set current(t){let n=this.current,e=t==null?null:String(t);this.#t=!0,this.#n=e,this.#s(e),n!==e&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:e,previous:n,source:"property"},bubbles:!0,composed:!0}))}releaseCurrent(){this.#t&&(this.#t=!1,this.#n=null,this.#r("pathname"))}refresh(){this.#t||this.#r("pathname")}#i(){let t=this.querySelectorAll("a[data-nav-link]");return t.length>0?t:this.querySelectorAll(":scope > a")}#o=()=>{this.#t||this.#r("popstate")};#a=()=>{queueMicrotask(()=>{this.#t||!this.isConnected||this.#r("navigation")})};#r(t){let n=this.current,e=this.#c();this.#s(e),e==null&&this.#l(),n!==e&&this.dispatchEvent(new CustomEvent("nav-bar:current-changed",{detail:{current:e,previous:n,source:t},bubbles:!0,composed:!0}))}#c(){let t=p(window.location.pathname),n=window.location.origin,e=Array.from(this.#i());if(e.length===0)return null;let r=this.getAttribute("data-match")==="exact",i=null,o=null,d=-1;for(let u of e){let l=u.getAttribute("href");if(!l||l.startsWith("#"))continue;let c;try{c=new URL(l,document.baseURI)}catch{continue}if(!/^https?:$/.test(c.protocol)||c.origin!==n)continue;let a=p(c.pathname);if(a===t){i==null&&(i=u);continue}!r&&a!=="/"&&t.startsWith(a+"/")&&a.length>d&&(o=u,d=a.length)}let h=i||o;return h?h.getAttribute("data-route")||h.getAttribute("href"):null}#l(){let t=p(window.location.pathname),n=window.location.origin,e=this.getAttribute("data-match")==="exact",r=null,i=-1;for(let o of this.querySelectorAll("a[data-nav-link]")){let d=o.closest("drop-down, li");if(!(!d||!this.contains(d)))for(let h of d.querySelectorAll("a[href]:not([data-nav-link])")){let u=h.getAttribute("href");if(!u||u.startsWith("#"))continue;let l;try{l=new URL(u,document.baseURI)}catch{continue}if(!/^https?:$/.test(l.protocol)||l.origin!==n)continue;let c=p(l.pathname),a=-1;c===t?a=Number.MAX_SAFE_INTEGER:!e&&c!=="/"&&t.startsWith(c+"/")&&(a=c.length),a>i&&(r=o,i=a)}}r&&r.setAttribute("aria-current","true")}#s(t){let n=this.#i();for(let e of n){let r=e.getAttribute("data-route")||e.getAttribute("href");t!=null&&r===t?e.setAttribute("aria-current","page"):e.removeAttribute("aria-current")}}#u(t){this.querySelectorAll(":scope > a").forEach(r=>r.remove());let n=this.querySelector("a[data-nav-link]")!=null,e=document.createDocumentFragment();for(let r of t){let i=this.#d(r);n&&i.setAttribute("data-nav-link",""),e.appendChild(i)}this.appendChild(e)}#d(t){let n=document.createElement("a"),e=y(t.href);if(e!=null&&n.setAttribute("href",e),t.route&&n.setAttribute("data-route",t.route),t.external&&(n.target="_blank",n.rel="noopener noreferrer"),t.icon){let r=document.createElement("icon-wc");r.setAttribute("name",String(t.icon)),r.setAttribute("size","sm"),n.appendChild(r)}if(n.appendChild(document.createTextNode(t.label||"")),t.external){let r=document.createElement("span");r.className="sr-only",r.textContent=` ${this.getAttribute("data-label-new-tab")??"(opens in new tab)"}`,n.appendChild(r)}if(t.badge!=null){let r=document.createElement("span");r.className="badge",r.textContent=String(t.badge),n.appendChild(r)}return n}#h(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++){let r=Object.keys(t[e]).sort(),i=Object.keys(n[e]).sort();if(r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(r[o]!==i[o]||t[e][r[o]]!==n[e][i[o]])return!1}return!0}};function p(s){let t=s.replace(/\/+$/,"");return t===""?"/":t}function y(s){if(s==null||s==="")return"#";let t=String(s),n;try{n=new URL(t,document.baseURI)}catch{return null}return/^https?:$/.test(n.protocol)?t:null}g("nav-bar",b);export{b as NavBar};
|
|
2
2
|
//# sourceMappingURL=nav-bar.js.map
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
var O=window.matchMedia("(prefers-reduced-motion: reduce)");var k=new Map;function x(s,t,e={}){let i=e.priority??10,n={impl:t,bundle:e.bundle,contract:e.contract,priority:i},a=k.get(s);if(customElements.get(s)){if(!a||a.priority>=i){a&&a.priority===i&&a.impl!==t&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${a.bundle}" (priority ${a.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${a.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(a&&a.priority>=i){a.priority===i&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${a.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}k.set(s,n),customElements.define(s,t)}var w=class extends HTMLElement{#i=[];#s;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.#i)t();this.#i=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,n){t.addEventListener(e,i,n),this.#i.push(()=>t.removeEventListener(e,i,n))}_reinit(){for(let t of this.#i)t();this.#i=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#s||(this.#s=this.attachInternals());let i=this.#s.states;try{e?i.add(t):i.delete(t)}catch{let n=`--${t}`;e?i.add(n):i.delete(n)}}_adoptInternals(t){this.#s||(this.#s=t)}#t(){return this.constructor.formAssociated&&this.#s?this.#s:null}get validity(){return this.#t()?.validity}get validationMessage(){return this.#t()?.validationMessage??""}get willValidate(){return this.#t()?.willValidate??!1}get form(){return this.#t()?.form??null}checkValidity(){return this.#t()?.checkValidity()??!0}reportValidity(){return this.#t()?.reportValidity()??!0}};function M(){let s=globalThis.localStorage;if(!s)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return s.getItem(t)},async setRaw(t,e){s.setItem(t,e)},async removeRaw(t){s.removeItem(t)},async keys(t){let e=[];for(let i=0;i<s.length;i++){let n=s.key(i);n&&n.startsWith(t)&&e.push(n)}return e}}}var v="__vbStoreBackend",$=globalThis;function u(){return $[v]||($[v]=M()),$[v]}function A(s,t){if(typeof s!="string"||!s)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:${s}:${t}`}function C(s){if(typeof s!="string"||!s)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${s}:`}function T(s){try{let t=JSON.parse(s);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var f={configure(s={}){$[v]=s.backend??null},async set(s,t,e){let i={data:e,timestamp:Date.now()};await u().setRaw(A(s,t),JSON.stringify(i))},async get(s,t,e){let i=await u().getRaw(A(s,t));if(i==null)return null;let n=T(i);return!n||e?.maxAge!=null&&Date.now()-n.timestamp>e.maxAge?null:n.data},async remove(s,t){await u().removeRaw(A(s,t))},async list(s){let t=C(s),e=await u().keys(t),i=[];for(let n of e){let a=await u().getRaw(n);if(a==null)continue;let o=T(a);o&&i.push({key:n.slice(t.length),data:o.data,timestamp:o.timestamp})}return i},async clear(s){let t=C(s),e=await u().keys(t);for(let i of e)await u().removeRaw(i)},async clearAll(){let s=await u().keys("vb:");for(let t of s)await u().removeRaw(t)},async setMany(s,t){for(let[e,i]of t)await f.set(s,e,i)}};if(typeof window<"u"){let s=window.VB??(window.VB={});s.store??=f}var b="__vbServiceConfig",m=globalThis,N=()=>({baseUrl:"/go",headers:{},services:{}});m[b]||(m[b]=N());var S=()=>m[b],p=class extends Error{constructor(t,e,i,n){super(`VBService(${i}): ${t} ${n}`),this.name="VBServiceError",this.status=t,this.body=e,this.role=i,this.path=n}};function I(s,t){if(!t)return s;let e=s??new URLSearchParams;for(let[i,n]of Object.entries(t))n!=null&&e.set(i,String(n));return e}async function R(s){if((s.headers.get("content-type")??"").includes("application/json"))try{return await s.json()}catch{return null}try{return await s.text()}catch{return null}}var y=class s{static configure(t={}){let e=S();m[b]={baseUrl:t.baseUrl??e.baseUrl,headers:{...e.headers,...t.headers??{}},services:{...e.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");let e=S();return e.services[t]?q(e.services[t]):e.baseUrl?`${q(e.baseUrl)}/${t}`:`/go/${t}`}static _reset(){m[b]=N()}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,e){return this.#i("GET",t,{params:e})}async post(t,e){return this.#i("POST",t,{body:e})}async patch(t,e){return this.#i("PATCH",t,{body:e})}async delete(t){return this.#i("DELETE",t,{})}async#i(t,e,i){let n=s.resolve(this.role),a=e?e.startsWith("/")?e:`/${e}`:"",o=new URL(`${n}${a}`,globalThis.location?.origin??"http://localhost"),l=I(o.searchParams,i.params);l&&(o.search=l.toString());let d={method:t,headers:{...S().headers}};i.body!==void 0&&(d.body=JSON.stringify(i.body),d.headers["content-type"]="application/json");let r=o.toString(),h=await fetch(r,d),g=await R(h);if(!h.ok)throw new p(h.status,g,this.role,`${a||"/"}`);return g}};function q(s){return s.endsWith("/")?s.slice(0,-1):s}if(typeof window<"u"){let s=window.VB??(window.VB={});s.service??=y,s.ServiceError??=p}var V={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"},P={trigger:"Notifications",unread:"{n} unread",title:"Notifications","mark-all":"Mark all read",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","variant-info":"Information:","variant-success":"Success:","variant-warning":"Warning:","variant-error":"Error:"};function c(s){return String(s??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}function B(s){if(typeof s!="string"||!s.trim())return null;try{let{protocol:t}=new URL(s,location.href);return t==="http:"||t==="https:"?s:null}catch{return null}}function L(s,t){let e=new Date(s);if(Number.isNaN(e.getTime()))return String(s);let n=/^\d{4}-\d{2}-\d{2}$/.test(s)?{dateStyle:"medium",timeZone:"UTC"}:{dateStyle:"medium",timeStyle:"short"};try{return new Intl.DateTimeFormat(t||void 0,n).format(e)}catch{return new Intl.DateTimeFormat(void 0,n).format(e)}}var D=0,E=class extends w{static observedAttributes=["variant","position"];#i="panel";#s=0;#t=null;#p=null;#e=null;#l=null;#r=new Set;#d=[];#a=!1;#u=null;#C=new Set;#w="all";#o=[];#b=[];setup(){let t=++this.#s;return this.#i=this.getAttribute("mode")==="banner"?"banner":"panel",this.#i==="banner"?this.#q(t):this.#L(t),!0}teardown(){this.#s++,this.#u!=null&&(clearInterval(this.#u),this.#u=null),this.#a&&(this.#a=!1,this.#e&&(this.#e.hidden=!0),this.#t?.setAttribute("aria-expanded","false"))}attributeChangedCallback(t,e,i){e===i||this.#i!=="banner"||!this.hasAttribute("data-upgraded")||(t==="variant"&&(this.dataset.variant=i||"info",this.#$()),t==="position"&&(this.dataset.position=i||"top"))}#c(t){return t===this.#s&&this.isConnected}#n(t,e={}){let i=this.getAttribute(`data-label-${t}`)??P[t]??t;for(let[n,a]of Object.entries(e))i=i.replaceAll(`{${n}}`,String(a));return i}#T(){let t=(this.getAttribute("toast-new")||"").trim(),e=null;if(t){try{e=document.querySelector(t)}catch{e=null}e&&e.localName!=="toast-msg"&&(e=null)}return e??document.querySelector("toast-msg")}#v(){return this.closest("[lang]")?.lang||document.documentElement.lang||void 0}get notifications(){return[...this.#d]}set notifications(t){this.#i==="panel"&&(this.#d=Array.isArray(t)?t:[],this.#h(),this.dispatchEvent(new CustomEvent("notification-wc:notifications-changed",{detail:{notifications:this.#d,source:"property"},bubbles:!0})))}async#q(t){let e=this.getAttribute("persist");if(e||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.#$(),e){let n=Number(this.getAttribute("expires")??""),a=Number.isFinite(n)&&n>0?n*864e5:void 0,o=await f.get("notifications",e,a?{maxAge:a}:void 0);if(!this.#c(t))return;if(o&&o.dismissed){this.hidden=!0;return}}let i=this.querySelector('[value="dismiss"], [data-dismiss]');i&&this.listen(i,"click",this.#N)}#$(){let t=this.dataset.variant||"info",e=this.querySelector(":scope [data-variant-prefix]");e||(e=document.createElement("span"),e.className="visually-hidden",e.setAttribute("data-variant-prefix",""),(this.querySelector(":scope > :is(p, strong, span, h2, h3, h4)")||this).prepend(e)),e.textContent=`${this.#n(`variant-${t}`)} `}#N=async t=>{t.preventDefault();let e=this.contains(document.activeElement),i=this.getAttribute("persist");this.hidden=!0,e&&this.#B(),i&&await f.set("notifications",i,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:i}}))};#B(){let t=document.querySelector('main, [role="main"]')||document.querySelector("h1");t&&(t.hasAttribute("tabindex")||(t.setAttribute("tabindex","-1"),t.addEventListener("blur",()=>t.removeAttribute("tabindex"),{once:!0})),t.focus({preventScroll:!0}))}async#L(t){if(this.dataset.mode="panel",this.listen(document,"notification-wc:new",this.#P),await this.#M(),!!this.#c(t)&&(this.#I(),this.#R(),this.listen(document,"click",this.#_),this.listen(document,"keydown",this.#H),this.listen(this,"focusout",this.#W),this.listen(document,"page-watch:add",this.#E),this.listen(document,"page-watch:remove",this.#E),await this.#y(),!!this.#c(t)&&this.getAttribute("src"))){if(await this.#x(t),!this.#c(t))return;let e=Number(this.getAttribute("poll"));Number.isFinite(e)&&e>0&&(this.#u=setInterval(()=>this.#x(t),e))}}async#M(){let t=this.getAttribute("storage-key")||"notifications",e=await f.get(t,"read-ids");Array.isArray(e)&&(this.#r=new Set(e.filter(i=>typeof i=="string")))}async#A(){let t=this.getAttribute("storage-key")||"notifications";await f.set(t,"read-ids",Array.from(this.#r))}#I(){if(this.#t=this.querySelector(":scope > [data-trigger]"),this.#t){if(!this.#t.classList.contains("notification-trigger")&&this.#p===null){let e=this.#t.cloneNode(!0);e.querySelector(".notification-badge")?.remove(),this.#p=(this.#t.getAttribute("aria-label")||e.textContent||"").trim()}}else{let e=document.createElement("button");e.type="button",e.setAttribute("data-trigger",""),e.className="notification-trigger",e.innerHTML='<icon-wc name="bell" size="sm" aria-hidden="true"></icon-wc><span class="notification-badge" aria-hidden="true" hidden>0</span>',this.#t=e,this.prepend(e)}let t=this.#t.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.setAttribute("aria-hidden","true"),t.hidden=!0,this.#t.appendChild(t)),this.#l=t,this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.listen(this.#t,"click",this.#j)}#R(){let t=this.querySelector(":scope > .notification-panel");t||(t=document.createElement("div"),t.className="notification-panel",t.id=`notification-panel-${++D}-${Math.random().toString(36).slice(2,7)}`,this.appendChild(t)),this.#e=t;let e=t.id;t.setAttribute("role","dialog"),t.setAttribute("aria-labelledby",`${e}-title`),t.tabIndex=-1,t.hidden=!0,this.#t?.setAttribute("aria-controls",e);let i=this.#w==="all";t.innerHTML=`
|
|
1
|
+
var O=window.matchMedia("(prefers-reduced-motion: reduce)");var k=new Map;function x(n,t,e={}){let i=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:i},a=k.get(n);if(customElements.get(n)){if(!a||a.priority>=i){a&&a.priority===i&&a.impl!==t&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${a.bundle}" (priority ${a.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${n}> defined by "${a.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(a&&a.priority>=i){a.priority===i&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${a.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}k.set(n,s),customElements.define(n,t)}var w=class extends HTMLElement{#s=[];#n;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.#s)t();this.#s=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,s){t.addEventListener(e,i,s),this.#s.push(()=>t.removeEventListener(e,i,s))}_reinit(){for(let t of this.#s)t();this.#s=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#n||(this.#n=this.attachInternals());let i=this.#n.states;try{e?i.add(t):i.delete(t)}catch{let s=`--${t}`;e?i.add(s):i.delete(s)}}_adoptInternals(t){this.#n||(this.#n=t)}#e(){return this.constructor.formAssociated&&this.#n?this.#n:null}get validity(){return this.#e()?.validity}get validationMessage(){return this.#e()?.validationMessage??""}get willValidate(){return this.#e()?.willValidate??!1}get form(){return this.#e()?.form??null}checkValidity(){return this.#e()?.checkValidity()??!0}reportValidity(){return this.#e()?.reportValidity()??!0}};function L(){let n=globalThis.localStorage;if(!n)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return n.getItem(t)},async setRaw(t,e){n.setItem(t,e)},async removeRaw(t){n.removeItem(t)},async keys(t){let e=[];for(let i=0;i<n.length;i++){let s=n.key(i);s&&s.startsWith(t)&&e.push(s)}return e}}}var v="__vbStoreBackend",$=globalThis;function u(){return $[v]||($[v]=L()),$[v]}function A(n,t){if(typeof n!="string"||!n)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:${n}:${t}`}function C(n){if(typeof n!="string"||!n)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${n}:`}function T(n){try{let t=JSON.parse(n);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var f={configure(n={}){$[v]=n.backend??null},async set(n,t,e){let i={data:e,timestamp:Date.now()};await u().setRaw(A(n,t),JSON.stringify(i))},async get(n,t,e){let i=await u().getRaw(A(n,t));if(i==null)return null;let s=T(i);return!s||e?.maxAge!=null&&Date.now()-s.timestamp>e.maxAge?null:s.data},async remove(n,t){await u().removeRaw(A(n,t))},async list(n){let t=C(n),e=await u().keys(t),i=[];for(let s of e){let a=await u().getRaw(s);if(a==null)continue;let o=T(a);o&&i.push({key:s.slice(t.length),data:o.data,timestamp:o.timestamp})}return i},async clear(n){let t=C(n),e=await u().keys(t);for(let i of e)await u().removeRaw(i)},async clearAll(){let n=await u().keys("vb:");for(let t of n)await u().removeRaw(t)},async setMany(n,t){for(let[e,i]of t)await f.set(n,e,i)}};if(typeof window<"u"){let n=window.VB??(window.VB={});n.store??=f}var b="__vbServiceConfig",m=globalThis,N=()=>({baseUrl:"/go",headers:{},services:{}});m[b]||(m[b]=N());var S=()=>m[b],p=class extends Error{constructor(t,e,i,s){super(`VBService(${i}): ${t} ${s}`),this.name="VBServiceError",this.status=t,this.body=e,this.role=i,this.path=s}};function I(n,t){if(!t)return n;let e=n??new URLSearchParams;for(let[i,s]of Object.entries(t))s!=null&&e.set(i,String(s));return e}async function P(n){if((n.headers.get("content-type")??"").includes("application/json"))try{return await n.json()}catch{return null}try{return await n.text()}catch{return null}}var y=class n{static configure(t={}){let e=S();m[b]={baseUrl:t.baseUrl??e.baseUrl,headers:{...e.headers,...t.headers??{}},services:{...e.services,...t.services??{}}}}static resolve(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");let e=S();return e.services[t]?q(e.services[t]):e.baseUrl?`${q(e.baseUrl)}/${t}`:`/go/${t}`}static _reset(){m[b]=N()}constructor(t){if(!t||typeof t!="string")throw new TypeError("VBService: role must be a non-empty string");this.role=t}async get(t,e){return this.#s("GET",t,{params:e})}async post(t,e){return this.#s("POST",t,{body:e})}async patch(t,e){return this.#s("PATCH",t,{body:e})}async delete(t){return this.#s("DELETE",t,{})}async#s(t,e,i){let s=n.resolve(this.role),a=e?e.startsWith("/")?e:`/${e}`:"",o=new URL(`${s}${a}`,globalThis.location?.origin??"http://localhost"),l=I(o.searchParams,i.params);l&&(o.search=l.toString());let d={method:t,headers:{...S().headers}};i.body!==void 0&&(d.body=JSON.stringify(i.body),d.headers["content-type"]="application/json");let r=o.toString(),h=await fetch(r,d),g=await P(h);if(!h.ok)throw new p(h.status,g,this.role,`${a||"/"}`);return g}};function q(n){return n.endsWith("/")?n.slice(0,-1):n}if(typeof window<"u"){let n=window.VB??(window.VB={});n.service??=y,n.ServiceError??=p}var R={update:"package",alert:"alert-triangle",watch:"eye",system:"settings",message:"mail",stewardship:"shield"},V={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","variant-info":"Information:","variant-success":"Success:","variant-warning":"Warning:","variant-error":"Error:"};function c(n){return String(n??"").replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}function B(n){if(typeof n!="string"||!n.trim())return null;try{let{protocol:t}=new URL(n,location.href);return t==="http:"||t==="https:"?n:null}catch{return null}}function M(n,t){let e=new Date(n);if(Number.isNaN(e.getTime()))return String(n);let s=/^\d{4}-\d{2}-\d{2}$/.test(n)?{dateStyle:"medium",timeZone:"UTC"}:{dateStyle:"medium",timeStyle:"short"};try{return new Intl.DateTimeFormat(t||void 0,s).format(e)}catch{return new Intl.DateTimeFormat(void 0,s).format(e)}}var D=0,E=class extends w{static observedAttributes=["variant","position"];#s="panel";#n=0;#e=null;#p=null;#t=null;#d=null;#r=new Set;#h=[];#a=!1;#f=null;#T=new Set;#w="all";#o=[];#b=[];setup(){let t=++this.#n;return this.#s=this.getAttribute("mode")==="banner"?"banner":"panel",this.#s==="banner"?this.#N(t):this.#L(t),!0}teardown(){this.#n++,this.#f!=null&&(clearInterval(this.#f),this.#f=null),this.#a&&(this.#a=!1,this.#x(),this.#t&&(this.#t.hidden=!0),this.#e?.setAttribute("aria-expanded","false"))}attributeChangedCallback(t,e,i){e===i||this.#s!=="banner"||!this.hasAttribute("data-upgraded")||(t==="variant"&&(this.dataset.variant=i||"info",this.#$()),t==="position"&&(this.dataset.position=i||"top"))}#c(t){return t===this.#n&&this.isConnected}#i(t,e={}){let i=this.getAttribute(`data-label-${t}`)??V[t]??t;for(let[s,a]of Object.entries(e))i=i.replaceAll(`{${s}}`,String(a));return i}#q(){let t=(this.getAttribute("toast-new")||"").trim(),e=null;if(t){try{e=document.querySelector(t)}catch{e=null}e&&e.localName!=="toast-msg"&&(e=null)}return e??document.querySelector("toast-msg")}#v(){return this.closest("[lang]")?.lang||document.documentElement.lang||void 0}get notifications(){return[...this.#h]}set notifications(t){this.#s==="panel"&&(this.#h=Array.isArray(t)?t:[],this.#u(),this.dispatchEvent(new CustomEvent("notification-wc:notifications-changed",{detail:{notifications:this.#h,source:"property"},bubbles:!0})))}async#N(t){let e=this.getAttribute("persist");if(e||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.#$(),e){let s=Number(this.getAttribute("expires")??""),a=Number.isFinite(s)&&s>0?s*864e5:void 0,o=await f.get("notifications",e,a?{maxAge:a}:void 0);if(!this.#c(t))return;if(o&&o.dismissed){this.hidden=!0;return}}let i=this.querySelector('[value="dismiss"], [data-dismiss]');i&&this.listen(i,"click",this.#B)}#$(){let t=this.dataset.variant||"info",e=this.querySelector(":scope [data-variant-prefix]");e||(e=document.createElement("span"),e.className="visually-hidden",e.setAttribute("data-variant-prefix",""),(this.querySelector(":scope > :is(p, strong, span, h2, h3, h4)")||this).prepend(e)),e.textContent=`${this.#i(`variant-${t}`)} `}#B=async t=>{t.preventDefault();let e=this.contains(document.activeElement),i=this.getAttribute("persist");this.hidden=!0,e&&this.#M(),i&&await f.set("notifications",i,{dismissed:!0}),this.dispatchEvent(new CustomEvent("notification-wc:dismiss",{bubbles:!0,composed:!0,detail:{id:i}}))};#M(){let t=document.querySelector('main, [role="main"]')||document.querySelector("h1");t&&(t.hasAttribute("tabindex")||(t.setAttribute("tabindex","-1"),t.addEventListener("blur",()=>t.removeAttribute("tabindex"),{once:!0})),t.focus({preventScroll:!0}))}async#L(t){if(this.dataset.mode="panel",this.listen(document,"notification-wc:new",this.#D),await this.#I(),!!this.#c(t)&&(this.#P(),this.#R(),this.listen(document,"click",this.#W),this.listen(document,"keydown",this.#K),this.listen(this,"focusout",this.#z),this.listen(document,"page-watch:add",this.#E),this.listen(document,"page-watch:remove",this.#E),await this.#y(),!!this.#c(t)&&this.getAttribute("src"))){if(await this.#C(t),!this.#c(t))return;let e=Number(this.getAttribute("poll"));Number.isFinite(e)&&e>0&&(this.#f=setInterval(()=>this.#C(t),e))}}async#I(){let t=this.getAttribute("storage-key")||"notifications",e=await f.get(t,"read-ids");Array.isArray(e)&&(this.#r=new Set(e.filter(i=>typeof i=="string")))}async#A(){let t=this.getAttribute("storage-key")||"notifications";await f.set(t,"read-ids",Array.from(this.#r))}#P(){if(this.#e=this.querySelector(":scope > [data-trigger]"),this.#e){if(!this.#e.classList.contains("notification-trigger")&&this.#p===null){let e=this.#e.cloneNode(!0);e.querySelector(".notification-badge")?.remove(),this.#p=(this.#e.getAttribute("aria-label")||e.textContent||"").trim()}}else{let e=document.createElement("button");e.type="button",e.setAttribute("data-trigger",""),e.className="notification-trigger",e.innerHTML='<icon-wc name="bell" size="sm" aria-hidden="true"></icon-wc><span class="notification-badge" aria-hidden="true" hidden>0</span>',this.#e=e,this.prepend(e)}let t=this.#e.querySelector(".notification-badge");t||(t=document.createElement("span"),t.className="notification-badge",t.setAttribute("aria-hidden","true"),t.hidden=!0,this.#e.appendChild(t)),this.#d=t,this.#e.setAttribute("aria-haspopup","dialog"),this.#e.setAttribute("aria-expanded","false"),this.listen(this.#e,"click",this.#_)}#R(){let t=this.querySelector(":scope > .notification-panel");t||(t=document.createElement("div"),t.className="notification-panel",t.id=`notification-panel-${++D}-${Math.random().toString(36).slice(2,7)}`,this.appendChild(t)),this.#t=t;let e=t.id;t.setAttribute("role","dialog"),t.setAttribute("aria-labelledby",`${e}-title`),t.tabIndex=-1,t.hidden=!0,this.#e?.setAttribute("aria-controls",e);let i=this.#w==="all";t.innerHTML=`
|
|
2
2
|
<header class="notification-header">
|
|
3
|
-
<strong id="${e}-title">${c(this.#
|
|
4
|
-
<button type="button" class="notification-mark-all">${c(this.#
|
|
3
|
+
<strong id="${e}-title">${c(this.#i("title"))}</strong>
|
|
4
|
+
<button type="button" class="notification-mark-all">${c(this.#i("mark-all"))}</button>
|
|
5
|
+
<button type="button" class="notification-close" aria-label="${c(this.#i("close"))}"><icon-wc name="x" size="sm" aria-hidden="true"></icon-wc></button>
|
|
5
6
|
</header>
|
|
6
|
-
<div class="notification-tabs" role="tablist" aria-label="${c(this.#
|
|
7
|
-
<button type="button" role="tab" id="${e}-tab-all" data-tab="all" aria-controls="${e}-all" aria-selected="${i}" tabindex="${i?0:-1}">${c(this.#
|
|
8
|
-
<button type="button" role="tab" id="${e}-tab-watching" data-tab="watching" aria-controls="${e}-watching" aria-selected="${!i}" tabindex="${i?-1:0}">${c(this.#
|
|
7
|
+
<div class="notification-tabs" role="tablist" aria-label="${c(this.#i("tabs"))}">
|
|
8
|
+
<button type="button" role="tab" id="${e}-tab-all" data-tab="all" aria-controls="${e}-all" aria-selected="${i}" tabindex="${i?0:-1}">${c(this.#i("all"))}</button>
|
|
9
|
+
<button type="button" role="tab" id="${e}-tab-watching" data-tab="watching" aria-controls="${e}-watching" aria-selected="${!i}" tabindex="${i?-1:0}">${c(this.#i("watching"))} <span class="notification-tab-count" hidden>0</span></button>
|
|
9
10
|
</div>
|
|
10
11
|
<div class="notification-tabpanel" role="tabpanel" id="${e}-all" aria-labelledby="${e}-tab-all" data-tab-panel="all"${i?"":" hidden"}>
|
|
11
12
|
<ul class="notification-list" role="list"></ul>
|
|
12
|
-
<p class="notification-footer" hidden><em>${c(this.#
|
|
13
|
+
<p class="notification-footer" hidden><em>${c(this.#i("empty"))}</em></p>
|
|
13
14
|
</div>
|
|
14
15
|
<div class="notification-tabpanel" role="tabpanel" id="${e}-watching" aria-labelledby="${e}-tab-watching" data-tab-panel="watching"${i?" hidden":""}>
|
|
15
16
|
<ul class="notification-watch-list" role="list"></ul>
|
|
16
17
|
</div>
|
|
17
|
-
`,this.listen(t,"click",this.#
|
|
18
|
+
`,this.listen(t,"click",this.#U),this.listen(t,"keydown",this.#F),this.#u(),this.#g()}#m(){let t=Array.from(this.querySelectorAll(":scope > article")),e=new Map;for(let i of t){let s=i.getAttribute("data-id")||i.id||`static-${e.size}`,a=i.getAttribute("data-type")||"update",o=i.getAttribute("data-date")||"",l=i.querySelector("h1, h2, h3, h4, h5, h6")?.textContent?.trim()||s,r=i.querySelector("p")?.textContent?.trim()||"",h=i.querySelector("a");e.set(s,{id:s,type:a,date:o,title:l,body:r,url:h?.getAttribute("href")||null,source:"static"})}for(let i of[...this.#b,...this.#h])if(!(!i||typeof i.id!="string")){if(i.dismissed){e.delete(i.id);continue}e.set(i.id,{...e.get(i.id),...i,source:"dynamic"})}return Array.from(e.values()).sort((i,s)=>{let a=i.date&&Date.parse(i.date)||0;return(s.date&&Date.parse(s.date)||0)-a})}#u(){if(!this.#t)return;let t=this.#t.querySelector(".notification-list"),e=this.#t.querySelector(".notification-footer");if(!t)return;let i=this.#m(),s=this.#v();t.innerHTML=i.map(a=>this.#V(a,s)).join(""),e&&(e.hidden=i.length>0),this.#S(i)}#V(t,e){let i=R[t.type]||"bell",s=this.#r.has(t.id),a=t.date?M(t.date,e):"",o=`
|
|
18
19
|
<icon-wc class="notification-type-icon" name="${c(i)}" size="sm" aria-hidden="true"></icon-wc>
|
|
19
20
|
<span class="notification-body">
|
|
20
21
|
<strong class="notification-title">${c(t.title)}</strong>
|
|
21
22
|
${t.body?`<span class="notification-text">${c(t.body)}</span>`:""}
|
|
22
23
|
${a?`<time datetime="${c(t.date)}">${c(a)}</time>`:""}
|
|
23
24
|
</span>
|
|
24
|
-
`,l=B(t.url),d=l?"a":"button",r=l?`href="${c(l)}"`:'type="button"';return`<li data-notification-id="${c(t.id)}" data-type="${c(t.type||"update")}"${
|
|
25
|
+
`,l=B(t.url),d=l?"a":"button",r=l?`href="${c(l)}"`:'type="button"';return`<li data-notification-id="${c(t.id)}" data-type="${c(t.type||"update")}"${s?" data-read":""}>
|
|
25
26
|
<${d} class="notification-row" ${r}>${o}</${d}>
|
|
26
|
-
</li>`}#S(t=this.#m()){if(!this.#
|
|
27
|
+
</li>`}#S(t=this.#m()){if(!this.#d||!this.#e)return;let e=t.filter(a=>!this.#r.has(a.id)).length,i=this.#e.querySelector("icon-wc");e>0?(this.#d.textContent=String(e),this.#d.hidden=!1,i?.setAttribute("name","bell-dot"),this.setAttribute("data-unread",String(e))):(this.#d.hidden=!0,i?.setAttribute("name","bell"),this.removeAttribute("data-unread"));let s=this.#p||this.#i("trigger");this.#e.setAttribute("aria-label",e>0?`${s}, ${this.#i("unread",{n:e})}`:s)}#D=t=>{if(t.target instanceof Element&&t.target.localName==="notification-wc")return;let e=t.detail?.notification;!e||typeof e.id!="string"||this.#b.some(i=>i.id===e.id)||(this.#b.push(e),this.#u())};#E=()=>{this.#y()};async#y(){let t=this.#n,e;try{e=await f.list("watches")}catch{e=[]}this.#c(t)&&(this.#o=Array.isArray(e)?e:[],this.#g())}#g(){if(!this.#t)return;let t=this.#t.querySelector(".notification-watch-list"),e=this.#t.querySelector(".notification-tab-count");if(!t)return;let i=this.#v();if(t.innerHTML=this.#o.map(s=>this.#O(s,i)).join("")||`<li class="notification-empty"><em>${c(this.#i("watch-empty"))}</em></li>`,e){let s=this.#o.length;e.textContent=String(s),e.hidden=s===0}}#O(t,e){let i=t.data||{},s=i.url||t.key,a=i.title||s,o=i.lastChecked?M(i.lastChecked,e):this.#i("never"),l=!!i.lastChanged,d=B(s),r=`
|
|
27
28
|
<icon-wc class="notification-type-icon" name="eye" size="sm" aria-hidden="true"></icon-wc>
|
|
28
29
|
<span class="notification-body">
|
|
29
|
-
<strong class="notification-title">${c(a)}${l?` <span class="notification-changed-badge">${c(this.#
|
|
30
|
-
<span class="notification-text">${c(
|
|
31
|
-
<time>${c(this.#
|
|
30
|
+
<strong class="notification-title">${c(a)}${l?` <span class="notification-changed-badge">${c(this.#i("changed"))}</span>`:""}</strong>
|
|
31
|
+
<span class="notification-text">${c(s)}</span>
|
|
32
|
+
<time>${c(this.#i("last-checked",{date:o}))}</time>
|
|
32
33
|
</span>`,h=d?`<a class="notification-watch-row" href="${c(d)}">${r}</a>`:`<span class="notification-watch-row">${r}</span>`;return`<li class="notification-watch-item"${l?" data-changed":""}>
|
|
33
34
|
${h}
|
|
34
|
-
<button type="button" class="notification-unwatch" data-watch-unwatch data-watch-key="${c(t.key)}" aria-label="${c(this.#
|
|
35
|
+
<button type="button" class="notification-unwatch" data-watch-unwatch data-watch-key="${c(t.key)}" aria-label="${c(this.#i("unwatch",{title:a}))}">
|
|
35
36
|
<icon-wc name="x" size="xs" aria-hidden="true"></icon-wc>
|
|
36
37
|
</button>
|
|
37
|
-
</li>`}#k(t,{focus:e=!1}={}){if(this.#
|
|
38
|
+
</li>`}#k(t,{focus:e=!1}={}){if(this.#t){this.#w=t;for(let i of this.#t.querySelectorAll('[role="tab"]')){let s=i.dataset.tab===t;i.setAttribute("aria-selected",s?"true":"false"),i.setAttribute("tabindex",s?"0":"-1"),s&&e&&i.focus()}for(let i of this.#t.querySelectorAll("[data-tab-panel]"))i.hidden=i.dataset.tabPanel!==t}}#F=t=>{let e=t.target.closest?.('[role="tab"]');if(!e||!this.#t)return;let i=[...this.#t.querySelectorAll('[role="tab"]')],s=i.indexOf(e),a=getComputedStyle(this.#t).direction==="rtl",o=-1;if(t.key==="ArrowRight")o=a?s-1:s+1;else if(t.key==="ArrowLeft")o=a?s+1:s-1;else if(t.key==="Home")o=0;else if(t.key==="End")o=i.length-1;else return;t.preventDefault(),o=(o+i.length)%i.length;let l=i[o].dataset.tab;l&&this.#k(l,{focus:!0})};#U=t=>{let e=t.target,i=e.closest('[role="tab"]');if(i?.dataset.tab){this.#k(i.dataset.tab);return}if(e.closest(".notification-mark-all")){this.#Y();return}if(e.closest(".notification-close")){this.#l({restoreFocus:!0});return}let s=e.closest("[data-watch-unwatch]");if(s){this.#j(t,s);return}let a=e.closest(".notification-list .notification-row");a&&this.#X(a)};async#j(t,e){t.preventDefault(),t.stopPropagation();let i=e.getAttribute("data-watch-key");if(!i||!this.#t)return;let a=[...this.#t.querySelectorAll("[data-watch-unwatch]")].indexOf(e),o=this.#o.find(r=>r.key===i);await f.remove("watches",i),this.#o=this.#o.filter(r=>r.key!==i),this.#g();let l=[...this.#t.querySelectorAll("[data-watch-unwatch]")];(l[Math.min(a,l.length-1)]||this.#t.querySelector('[role="tab"][data-tab="watching"]'))?.focus(),this.dispatchEvent(new CustomEvent("page-watch:remove",{bubbles:!0,composed:!0,detail:{url:o?.data?.url||i,subscriptionId:o?.data?.subscriptionId||null}}))}#_=t=>{t.stopPropagation(),this.#a?this.#l():this.#J()};#W=t=>{if(this.#a){if(!this.contains(t.target)){this.#l();return}if(t.target===this.#t&&this.#t?.matches(":popover-open")){let e=this.#t.getBoundingClientRect(),{clientX:i,clientY:s}=t;(i<e.left||i>e.right||s<e.top||s>e.bottom)&&this.#l({restoreFocus:!0})}}};#H(){return!!this.closest("[popover]")||matchMedia("(width < 37.5rem)").matches}#z=t=>{let e=t.relatedTarget;this.#a&&e&&!this.contains(e)&&this.#l()};#K=t=>{t.key==="Escape"&&this.#a&&(t.preventDefault(),this.#l({restoreFocus:!0}))};async#X(t){let e=t.closest("[data-notification-id]"),i=e?.getAttribute("data-notification-id");!e||!i||this.#r.has(i)||(this.#r.add(i),e.setAttribute("data-read",""),this.#S(),this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:i}})),await this.#A())}async#Y(){let t=this.#m();for(let e of t)this.#r.add(e.id);this.#u();for(let e of t)this.dispatchEvent(new CustomEvent("notification-wc:read",{bubbles:!0,composed:!0,detail:{id:e.id}}));await this.#A()}#J(){this.#t&&(this.#a=!0,this.#t.hidden=!1,this.#H()&&typeof this.#t.showPopover=="function"&&(this.#t.setAttribute("popover","manual"),this.#t.showPopover()),this.#e?.setAttribute("aria-expanded","true"),this.#t.focus({preventScroll:!0}),this.#y(),this.dispatchEvent(new CustomEvent("notification-wc:open",{bubbles:!0,composed:!0})))}#l({restoreFocus:t=!1}={}){if(!this.#t)return;let e=this.#t.contains(document.activeElement);this.#a=!1,this.#x(),this.#t.hidden=!0,this.#e?.setAttribute("aria-expanded","false"),(t||e)&&this.#e?.focus(),this.dispatchEvent(new CustomEvent("notification-wc:close",{bubbles:!0,composed:!0}))}#x(){let t=this.#t;t?.hasAttribute("popover")&&(t.matches(":popover-open")&&t.hidePopover(),t.removeAttribute("popover"))}async#C(t){let e=this.getAttribute("src");if(!e)return;let i,s=0;try{if(e.startsWith("http")||e.startsWith("/")){let r=await fetch(e,{headers:{accept:"application/json"}});if(s=r.status,!r.ok)throw new Error(`${r.status}`);i=await r.json()}else i=await new y(e).get("/")}catch(r){let h=r instanceof p?r.status:s;if(h===404||h===503)return;let g=r instanceof p?`${r.status}`:String(r);console.warn("[notification-wc] failed to fetch",e,g);return}if(!this.#c(t))return;let a=Array.isArray(i)?i:Array.isArray(i?.notifications)?i.notifications:[],o=this.#T,l=o.size===0,d=this.hasAttribute("toast-new")?this.#q():null;for(let r of a)r?.id&&(o.has(r.id)||(this.dispatchEvent(new CustomEvent("notification-wc:new",{bubbles:!0,composed:!0,detail:{notification:r}})),!l&&d&&typeof d.show=="function"&&d.show({message:r.title||r.body||this.#i("new"),variant:r.type==="alert"||r.type==="stewardship"?"warning":"info",duration:5e3})),o.add(r.id));this.#h=a,this.#u()}};x("notification-wc",E);export{E as NotificationWc};
|
|
38
39
|
//# sourceMappingURL=notification-wc.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var y=window.matchMedia("(prefers-reduced-motion: reduce)");var u=new Map;function f(
|
|
1
|
+
var y=window.matchMedia("(prefers-reduced-motion: reduce)");var u=new Map;function f(n,t,e={}){let i=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:i},r=u.get(n);if(customElements.get(n)){if(!r||r.priority>=i){r&&r.priority===i&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${n}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=i){r.priority===i&&console.warn(`[VB Bundle] Tag <${n}> already registered by "${r.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}u.set(n,s),customElements.define(n,t)}var l=class extends HTMLElement{#e=[];#t;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.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,s){t.addEventListener(e,i,s),this.#e.push(()=>t.removeEventListener(e,i,s))}_reinit(){for(let t of this.#e)t();this.#e=[],this.teardown(),this.removeAttribute("data-upgraded"),this.isConnected&&this.setup()!==!1&&this.setAttribute("data-upgraded","")}setup(){}teardown(){}setState(t,e){this.#t||(this.#t=this.attachInternals());let i=this.#t.states;try{e?i.add(t):i.delete(t)}catch{let s=`--${t}`;e?i.add(s):i.delete(s)}}_adoptInternals(t){this.#t||(this.#t=t)}#i(){return this.constructor.formAssociated&&this.#t?this.#t: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 p=0,b="button, a[href], input, select, textarea, [tabindex]",m='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]), select, textarea, [contenteditable]',d=class extends l{static get observedAttributes(){return["data-orientation","data-position"]}#e=null;#t=null;#i=null;#s=!1;#n=null;#a=!1;#r=0;#l=null;setup(){this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.getAttribute("aria-label")||this.setAttribute("aria-label","Page tools"),this.#u(),this.#g();let t=this.dataset.breakpoint||"48rem";this.#i=matchMedia(`(max-width: ${t})`),this.#p(this.#i),this.listen(this.#i,"change",e=>this.#p(e)),this.listen(this,"keydown",this.#y),this.listen(this,"focusin",this.#m),this.#n=new MutationObserver(e=>{for(let i of e)i.type==="childList"&&i.target===this&&this.#s&&this.#E();this.#d()}),this.#n.observe(this,{childList:!0,subtree:!0}),this.#d()}teardown(){this.#n?.disconnect(),this.#n=null,cancelAnimationFrame(this.#r),this.#r=0,this.#s&&this.#b(),this.#e?.remove(),this.#t?.remove(),this.#e=null,this.#t=null,this.#l=null}attributeChangedCallback(t,e,i){e===i||!this.hasAttribute("data-upgraded")||this.#u()}get tools(){let t=this.#s&&this.#t?this.#t:this;return Array.from(t.children).filter(e=>!e.hasAttribute("data-page-tools-internal"))}#u(){let t=this.dataset.orientation||"auto",e=this.dataset.position||"sticky",i=t==="horizontal"||t==="vertical"?t:e==="inline"?"horizontal":"vertical";this.setAttribute("data-resolved-orientation",i),this.#h()}#f(){return this.#s?"vertical":this.dataset.resolvedOrientation||"vertical"}#h(){this.setAttribute("aria-orientation",this.#f())}#c(){return Array.from(this.querySelectorAll(b)).filter(t=>!t.closest("[data-page-tools-internal]:not(.page-tools-popover)")&&!t.matches(":disabled")&&!t.closest("[inert]")&&t.checkVisibility())}#d(){this.#r||(this.#r=requestAnimationFrame(()=>{this.#r=0,this.#o()}))}#o(t=null){let e=this.#c();if(!e.length)return;let i=[t,this.#l].find(s=>s&&e.includes(s))||e[0];this.#l=i;for(let s of e)s.tabIndex=s===i?0:-1}#m=t=>{let e=t.target;e!==this.#e&&this.#c().includes(e)&&this.#o(e)};#y=t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;let e=t.target;if(e===this.#e||e.matches(m))return;let i=this.#c(),s=i.indexOf(e);if(s===-1)return;let r=this.#f()==="horizontal",h=getComputedStyle(this).direction==="rtl",c=r?h?"ArrowRight":"ArrowLeft":"ArrowUp",a=r?h?"ArrowLeft":"ArrowRight":"ArrowDown",o=-1;t.key===a?o=(s+1)%i.length:t.key===c?o=(s-1+i.length)%i.length:t.key==="Home"?o=0:t.key==="End"&&(o=i.length-1),o!==-1&&(t.preventDefault(),this.#o(i[o]),i[o].focus())};#g(){let t=`pt-${++p}`,e=this.dataset.fabIcon||"ellipsis-vertical",i=this.dataset.fabLabel||"Page tools";this.#e=document.createElement("button"),this.#e.type="button",this.#e.className="page-tools-fab",this.#e.setAttribute("data-page-tools-internal",""),this.#e.setAttribute("popovertarget",t),this.#e.setAttribute("aria-label",i),this.#e.hidden=!0;let s=document.createElement("icon-wc");s.setAttribute("name",e),s.setAttribute("size","md"),s.setAttribute("aria-hidden","true"),this.#e.appendChild(s),this.#t=document.createElement("section"),this.#t.className="page-tools-popover",this.#t.setAttribute("data-page-tools-internal",""),this.#t.id=t,this.#t.setAttribute("popover",""),this.#t.setAttribute("aria-label",i),this.appendChild(this.#e),this.appendChild(this.#t),this.listen(this.#t,"beforetoggle",r=>{r.newState==="closed"?this.#a=!!this.#t?.contains(document.activeElement):this.#v()}),this.listen(this.#t,"toggle",r=>{if(r.newState==="open"){this.#o();return}let c=this.#a&&this.#s;if(this.#a=!1,!c)return;let a=document.activeElement;(!a||a===document.body||this.#t?.contains(a))&&this.#e?.focus()})}#v(){if(!this.#e||!this.#t)return;if(this.#e.parentElement===this){this.#t.style.removeProperty("--_fab-top"),this.#t.style.removeProperty("--_fab-end");return}let t=this.#e.getBoundingClientRect(),i=getComputedStyle(this.#e).direction==="rtl"?t.left:document.documentElement.clientWidth-t.right;this.#t.style.setProperty("--_fab-top",`${Math.round(window.innerHeight-t.top+8)}px`),this.#t.style.setProperty("--_fab-end",`${Math.max(8,Math.round(i))}px`)}#p(t){t.matches??t?this.#A():this.#b()}#A(){if(this.#s||!this.#e||!this.#t)return;let t=this.tools;for(let e of t)this.#t.appendChild(e);this.#s=!0,this.#e.hidden=!1,document.querySelector("fab-stack")?.append(this.#e),this.setAttribute("data-collapsed",""),this.#h()}#b(){if(!this.#s||!this.#e||!this.#t)return;this.#s=!1,this.#t.matches(":popover-open")&&this.#t.hidePopover?.(),this.#e.parentElement!==this&&this.insertBefore(this.#e,this.#t);let t=Array.from(this.#t.children);for(let e of t)this.insertBefore(e,this.#e);this.#e.hidden=!0,this.removeAttribute("data-collapsed"),this.#h(),this.#d()}#E(){if(!this.#t)return;let t=Array.from(this.children).filter(e=>!e.hasAttribute("data-page-tools-internal"));for(let e of t)this.#t.appendChild(e)}};f("page-tools",d);export{d as PageTools};
|
|
2
2
|
//# sourceMappingURL=page-tools.js.map
|