@zazz-ui/core 0.3.0 → 0.4.0
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/CHANGELOG.md +19 -2
- package/README.md +4 -2
- package/dist/sri.json +16 -16
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/examples/about.html +5 -12
- package/examples/components.html +3 -10
- package/examples/forms.html +3 -10
- package/examples/index.html +3 -10
- package/examples/layout.html +3 -10
- package/examples/products.html +3 -10
- package/examples/responsive.html +3 -10
- package/package.json +1 -1
- package/src/base/typeahead.js +1 -1
- package/src/base/typeahead.ts +1 -1
- package/src/head.d.ts +11 -4
- package/src/head.d.ts.map +1 -1
- package/src/head.js +23 -24
- package/src/head.ts +23 -24
- package/src/manifest.d.ts +1 -1
- package/src/manifest.js +6 -6
- package/src/primitives/autocomplete/autocomplete.css +1 -1
- package/src/primitives/combobox/combobox.css +1 -1
- package/src/primitives/command/command.css +1 -1
- package/src/primitives/command/command.js +1 -1
- package/src/primitives/command/command.ts +1 -1
- package/src/primitives/menu/menu.js +1 -1
- package/src/primitives/menu/menu.ts +1 -1
- package/src/primitives/navigation-menu/navigation-menu.css +4 -15
- package/src/primitives/popover/popover.css +5 -3
- package/src/primitives/select/select.css +1 -1
- package/src/primitives/toaster/toaster.css +1 -1
- package/src/primitives/toaster/toaster.js +2 -2
- package/src/primitives/toaster/toaster.ts +2 -2
- package/src/primitives/tooltip/tooltip.css +1 -1
package/dist/zazz.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"embla-carousel";import t from"embla-carousel-autoplay";import n from"embla-carousel-auto-scroll";import r from"embla-carousel-class-names";import{Signal as i}from"signal-polyfill";function a(e){if(e===`true`)return!0;if(e===`false`)return!1;if(!Number.isNaN(Number(e))&&e.trim()!==``)return Number(e);if(e.startsWith(`[`)&&e.endsWith(`]`))try{return JSON.parse(e)}catch{return e}return e}const o={parseValue:a,parseDataAttributes:(e,t)=>{let n={};for(let r of e.attributes)if(r.name.startsWith(t)){let e=r.name.replace(t,``).replace(/-([a-z])/g,(e,t)=>t.toUpperCase());n[e]=a(r.value)}return n}};typeof window<`u`&&(window.Utils=o);var s=class extends HTMLElement{#e=null;connectedCallback(){this.#e||(this.#e=new AbortController,this.setup(this.#e.signal))}disconnectedCallback(){this.#e?.abort(),this.#e=null,this.teardown?.()}};function c(e,t){typeof window>`u`||customElements.get(e)||customElements.define(e,t)}const l=[];function u(e){l.push(e)}function d(e){for(let t of l)t(e)}function f(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}const p=typeof CSS<`u`&&CSS.supports(`top`,`calc(sibling-index() * 1px)`);function m(e){let t=e.trim();return t?/^-?\d*\.?\d+ms$/.test(t)?parseFloat(t):/^-?\d*\.?\d+s$/.test(t)?parseFloat(t)*1e3:parseInt(t,10)||0:0}var h=class e{static#e(){return{margin:`0px`,threshold:.2,duration:f(`--ui-reveal-global-duration`)||`400ms`,ease:f(`--ui-reveal-global-ease`)||`cubic-bezier(0.4, 0, 0.2, 1)`,wait:m(f(`--ui-reveal-global-wait`)),distance:f(`--ui-reveal-global-distance`)||`1rem`,step:80,grow:parseFloat(f(`--ui-reveal-global-grow`))||.97,shrink:parseFloat(f(`--ui-reveal-global-shrink`))||1.03}}static get defaultConfig(){return e.#e()}#t=new Map;config;constructor(t={}){this.config={...e.defaultConfig,...t.config},this.init()}#n(e){let t=JSON.stringify(e),n=this.#t.get(t);return n||(n=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add(`in-viewport`),t.unobserve(e.target))})},e),this.#t.set(t,n)),n}#r(e){let t=e.dataset.revealMargin||this.config.margin,n=parseFloat(e.dataset.revealThreshold||this.config.threshold.toString());return{rootMargin:t,threshold:Math.min(Math.max(n,0),1)}}#i(e){let t=e.toString().trim();return/^-?\d*\.?\d+(ms|s)$/.test(t)?t:`${Math.max(0,parseInt(t,10)||0)}ms`}#a(e,t){Object.entries(t).forEach(([t,n])=>{n!=null&&e.style.setProperty(t,n.toString())})}#o(e){let t=e.dataset,n=this.#r(e),r=this.#n(n),i={step:Math.max(0,parseInt(t.revealStep||this.config.step.toString(),10)||0),duration:t.revealDuration?Math.max(0,parseInt(t.revealDuration,10)||0):this.config.duration,ease:t.revealEase||this.config.ease,baseWait:Math.max(0,parseInt(t.revealWait||this.config.wait.toString(),10)||0),distance:t.revealDistance||this.config.distance,order:t.revealOrder},a=Array.from(e.children),o=i.order===`reversed`?a.reverse():a;p&&this.#a(e,{"--ui-reveal-stagger-base":`${i.baseWait}ms`,"--ui-reveal-stagger-step":`${i.step}ms`}),o.forEach((e,n)=>{e instanceof HTMLElement&&(this.#a(e,{"--ui-reveal-duration":this.#i(i.duration),"--ui-reveal-ease":i.ease,"--ui-reveal-wait":p?null:`${i.baseWait+i.step*n}ms`,"--ui-reveal-distance":i.distance,"--ui-reveal-scale":t.revealScale||null}),r.observe(e))})}#s(e){let t=e.dataset,n=this.#r(e),r=this.#n(n),i=t.revealDuration?Math.max(0,parseInt(t.revealDuration,10)||0):null,a=t.revealWait?Math.max(0,parseInt(t.revealWait,10)||0):null;this.#a(e,{"--ui-reveal-duration":i===null?null:this.#i(i),"--ui-reveal-wait":a===null?null:this.#i(a),"--ui-reveal-ease":t.revealEase||null,"--ui-reveal-distance":t.revealDistance||null,"--ui-reveal-scale":t.revealScale||null}),r.observe(e)}init(){this.#t.forEach(e=>e.disconnect()),this.#t.clear();let e=document.documentElement.style;e.setProperty(`--ui-reveal-global-duration`,this.#i(this.config.duration)),e.setProperty(`--ui-reveal-global-ease`,this.config.ease),e.setProperty(`--ui-reveal-global-wait`,this.#i(this.config.wait)),e.setProperty(`--ui-reveal-global-distance`,this.config.distance),e.setProperty(`--ui-reveal-global-grow`,this.config.grow.toString()),e.setProperty(`--ui-reveal-global-shrink`,this.config.shrink.toString()),document.querySelectorAll(`[data-reveal]`).forEach(e=>{e instanceof HTMLElement&&this.#s(e)}),document.querySelectorAll(`[data-reveal-each]`).forEach(e=>{e instanceof HTMLElement&&this.#o(e)})}refresh(){this.init()}};if(typeof window<`u`&&typeof document<`u`){let e=null,t=()=>{e||=new h};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t):t(),u(()=>h.getAutoInstance()?.refresh()),h.disableAutoInit=()=>{e=`disabled`},h.getAutoInstance=()=>e===`disabled`?null:e}typeof window<`u`&&(window.Reveal=h);function g(e,t){e.dispatchEvent(new Event(t,{bubbles:!0}))}const _=function(){_._bound||(_._bound=!0,new MutationObserver(function(e){for(let t of e)t.type===`attributes`&&t.attributeName===`open`&&t.target instanceof HTMLDialogElement&&t.target.hasAttribute(`open`)&&g(t.target,`zazz:dialog-open`)}).observe(document.body,{attributes:!0,attributeFilter:[`open`],subtree:!0}),document.addEventListener(`close`,function(e){e.target instanceof HTMLDialogElement&&g(e.target,`zazz:dialog-close`)},!0))};typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,_):_());function ee(e){return e?e.trim().split(/\s+/).filter(Boolean):[]}const te={autoplay:e=>t(v(e,`data-carousel-autoplay-`)),"auto-scroll":e=>n(v(e,`data-carousel-auto-scroll-`)),"class-names":e=>r(v(e,`data-carousel-class-names-`))};function v(e,t){return o.parseDataAttributes(e,t)}function y(e,t,n={}){e.forEach((e,r)=>{let i=r===t;e.classList.toggle(`is-active`,i),n.ariaCurrent&&(i?e.setAttribute(`aria-current`,`true`):e.removeAttribute(`aria-current`))})}const ne=(e,t,n)=>{if(!t)return;let r=t.querySelector(`[data-slot~="carousel-dot"]`);if(!r)return;let i=[],a=()=>{let a=e.scrollSnapList().length;if(t.innerHTML=``,a<=1){i=[];return}i=[];for(let o=0;o<a;o++){let a=r.cloneNode(!0);i.push(a),t.appendChild(a),a.addEventListener(`click`,()=>e.scrollTo(o),{signal:n})}},o=()=>{i.length&&y(i,e.selectedScrollSnap())};return e.on(`init`,a).on(`reInit`,a).on(`init`,o).on(`reInit`,o).on(`select`,o),()=>{t.innerHTML=``}},b=(e,t,n)=>{t.slideNodes().forEach((t,r)=>{t.addEventListener(`click`,()=>e.scrollTo(r),{signal:n})})},x=(e,t)=>{let n=t.slideNodes(),r=()=>{let r=e.selectedScrollSnap();t.scrollTo(r),y(n,r,{ariaCurrent:!0})};e.on(`select`,r),r()};let S=0;function C(e,t,n,r={},i){let a=r.dragThresholdPx??6,o=n.includes(`commandfor`),s=!1,c=!1,l=0,u=0,d=0,f=0,p=0,m=0,h=()=>Math.hypot(d-l,f-u);e.addEventListener(`pointerdown`,e=>{e instanceof PointerEvent&&(e.pointerType===`mouse`&&e.button!==0||(s=!0,c=!1,l=e.clientX,u=e.clientY,d=e.clientX,f=e.clientY,p=t.selectedScrollSnap()))},{passive:!0,signal:i}),e.addEventListener(`pointermove`,e=>{!s||!(e instanceof PointerEvent)||(d=e.clientX,f=e.clientY,!c&&h()>=a&&(c=!0))},{passive:!0,signal:i});let g=()=>{s&&c&&(m=performance.now()+250,o&&(S=m)),s=!1,c=!1};e.addEventListener(`pointerup`,g,{passive:!0,signal:i}),e.addEventListener(`pointercancel`,g,{passive:!0,signal:i}),t.on(`pointerUp`,g),t.on(`scroll`,()=>{if(s){if(o){(h()>=a||t.selectedScrollSnap()!==p)&&(c=!0);return}c=!0}}),e.addEventListener(`click`,t=>{if(performance.now()>m)return;let r=t.target instanceof Element?t.target.closest(n):null;!r||!e.contains(r)||(t.preventDefault(),t.stopImmediatePropagation())},{capture:!0,signal:i})}let w=!1;function T(){w||(w=!0,document.addEventListener(`command`,e=>{e.cancelable&&performance.now()<=S&&e.preventDefault()},!0))}function E(t){if(t.hasAttribute(`data-carousel-init`)||t.closest(`dialog:not([open])`))return;t.setAttribute(`data-carousel-init`,``);let n=t.querySelector(`[data-slot~="carousel-thumbs"]`),r=n?t.querySelector(`[data-slot~="carousel-viewport"]:not([data-slot~="carousel-thumbs"] *)`):t.querySelector(`[data-slot~="carousel-viewport"]`),i=t.querySelector(`[data-slot~="carousel-prev"]`),a=t.querySelector(`[data-slot~="carousel-next"]`),o=t.querySelector(`[data-slot~="carousel-dots"]`);if(!r)return;r.hasAttribute(`tabindex`)||r.setAttribute(`tabindex`,`0`);let s=v(t,`data-carousel-`);Object.keys(s).forEach(function(e){(e===`name`||e===`keyboard`||e===`plugins`||e.startsWith(`autoplay`)||e.startsWith(`autoScroll`)||e.startsWith(`classNames`))&&delete s[e]}),`watchDrag`in s||(s.watchDrag=e=>e.canScrollPrev()||e.canScrollNext());let c=[];for(let e of ee(t.getAttribute(`data-carousel-plugins`))){let n=te[e];n&&c.push(n(t))}let l=e(r,s,c);t._emblaApi=l;let u=new AbortController,{signal:d}=u;if(t._emblaController=u,i&&i.addEventListener(`click`,()=>l.scrollPrev(),{signal:d}),a&&a.addEventListener(`click`,()=>l.scrollNext(),{signal:d}),o&&ne(l,o,d),t.querySelector(`[data-slot~="carousel-slide"][commandfor]`)&&C(t,l,`[data-slot~="carousel-slide"][commandfor]`,{dragThresholdPx:14},d),n){let r=n.querySelector(`[data-slot~="carousel-viewport"]`);if(r){let i={containScroll:`keepSnaps`,dragFree:!0},a=v(n,`data-carousel-thumbs-`),o=e(r,{...i,...a});t._emblaApiThumb=o,b(l,o,d),x(l,o),C(n,o,`[data-slot~="carousel-slide"]`,{},d)}}}function D(e){(e||document).querySelectorAll(`:is(ui-carousel, .ui-carousel)`).forEach(function(e){e.closest(`ui-carousel`)||E(e)})}function O(){document.addEventListener(`zazz:dialog-open`,function(e){if(!(e.target instanceof HTMLDialogElement))return;let t=e.target;D(t),t.querySelectorAll(`:is(ui-carousel, .ui-carousel)`).forEach(function(e){let t=e.getAttribute(`data-carousel-start-index`);t!=null&&e._emblaApi&&(e._emblaApi.scrollTo(Number(t),!0),e.removeAttribute(`data-carousel-start-index`));let n=e.querySelector(`[data-slot~="carousel-viewport"]`);n instanceof HTMLElement&&n.focus({preventScroll:!0})})})}function re(){let e=document.querySelector(`dialog[open]`);if(e){let t=e.querySelector(`:is(ui-carousel, .ui-carousel)[data-carousel-init]`);if(t?._emblaApi&&t.getAttribute(`data-carousel-keyboard`)!==`false`)return t}let t=document.activeElement?.closest(`:is(ui-carousel, .ui-carousel)[data-carousel-init]`);return t?._emblaApi&&t.getAttribute(`data-carousel-keyboard`)!==`false`?t:null}const k=function(){k._bound||(k._bound=!0,document.addEventListener(`keydown`,function(e){if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`||e.defaultPrevented)return;let t=e.target;if(!(t instanceof HTMLElement)||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t.isContentEditable)return;let n=re();n&&(e.preventDefault(),e.key===`ArrowLeft`?n._emblaApi.scrollPrev():n._emblaApi.scrollNext())}))},ie={init:D,initRoot:E,addDotBtnsAndClickHandlers:ne,addThumbClickHandlers:b,addTogglethumbsActive:x};function A(){document.addEventListener(`click`,function(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest(`[data-carousel-start], [data-slot~='carousel-slide'][commandfor]`);if(!t)return;let n=t.getAttribute(`data-carousel-start`);if(n==null&&t.hasAttribute(`commandfor`)){let e=t.closest(`:is(ui-carousel, .ui-carousel)`);e?._emblaApi&&(n=String(e._emblaApi.selectedScrollSnap()))}let r=t.getAttribute(`commandfor`);if(!r)return;let i=document.getElementById(r);if(!i)return;let a=i.querySelector(`:is(ui-carousel, .ui-carousel)`);a&&(a._emblaApi?a._emblaApi.scrollTo(Number(n),!0):n!=null&&a.setAttribute(`data-carousel-start-index`,n))})}typeof window<`u`&&typeof document<`u`&&(u(e=>D(e)),document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,function(){D(),O(),A(),k(),T()}):(D(),O(),A(),k(),T())),typeof window<`u`&&(window.EmblaInit=ie);const j=.1,M=.999,ae=/[\\/_+.#"@[({&]/,oe=/[\\/_+.#"@[({&]/g,se=/[\s-]/,N=/[\s-]/g;function P(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?1:.99;let s=`${i},${a}`,c=o[s];if(c!==void 0)return c;let l=r.charAt(a),u=n.indexOf(l,i),d=0;for(;u>=0;){let s=P(e,t,n,r,u+1,a+1,o);if(s>d){if(u===i)s*=1;else if(ae.test(e.charAt(u-1))){s*=.8;let t=e.slice(i,u-1).match(oe);t&&i>0&&(s*=M**t.length)}else if(se.test(e.charAt(u-1))){s*=.9;let t=e.slice(i,u-1).match(N);t&&i>0&&(s*=M**t.length)}else s*=.17,i>0&&(s*=M**(u-i));e.charAt(u)!==t.charAt(a)&&(s*=.9999)}if(s<j&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a)){let i=P(e,t,n,r,u+1,a+2,o);i*j>s&&(s=i*j)}s>d&&(d=s),u=n.indexOf(l,u+1)}return o[s]=d,d}function F(e){return e.toLowerCase().replace(N,` `)}function ce(e,t,n=[]){let r=n.length>0?`${e} ${n.join(` `)}`:e;return P(r,t,F(r),F(t),0,0,{})}Symbol.dispose??=Symbol(`Symbol.dispose`);function I(e,t){return new i.State(e,t)}function L(e,t){return new i.Computed(e,t)}let R=!0;const z=new i.subtle.Watcher(()=>{R&&(R=!1,queueMicrotask(le))});function le(){R=!0;for(let e of z.getPending())e.get();z.watch()}function B(e,t={}){let n,r=!1,a=new i.Computed(()=>{typeof n==`function`&&n(),n=e()});z.watch(a),a.get();let o=()=>{r||(r=!0,z.unwatch(a),typeof n==`function`&&n(),n=void 0)};return t.signal?.addEventListener(`abort`,o,{once:!0}),Object.assign(o,{[Symbol.dispose]:o})}typeof window<`u`&&(window.Signals={state:I,computed:L,effect:B});function ue(e,t){let n=e.trim();return t.map((e,t)=>{let r=n===``?1:ce(e.value,n,e.keywords);return{index:t,score:r,hidden:r<=0}})}function de(e,t,n){if(n===0)return-1;switch(t){case`ArrowDown`:return e<0?0:(e+1)%n;case`ArrowUp`:return e<0?n-1:(e-1+n)%n;case`Home`:return 0;case`End`:return n-1;default:return e}}let V=0;var H=class extends s{managesPanel=!0;openOnFocus=!0;get sortByScore(){return this.getAttribute(`data-sort`)===`score`}autoHighlight=!1;searchInput=null;panel=null;query=I(``);open=I(!1);activeIndex=I(-1);setup(e){let t=this.slotPrefix,n=this.querySelector(`[data-slot~="${t}-panel"]`),r=this.querySelector(`input[role="combobox"]`)??this.querySelector(`[data-slot~="${t}-input"]`);if(!(n instanceof HTMLElement)||!(r instanceof HTMLInputElement))return;this.panel=n,this.searchInput=r;let i=n.querySelector(`[data-slot~="${t}-list"]`);i instanceof HTMLElement&&(i.id||=`ui-${t}-list-${++V}`,r.setAttribute(`aria-controls`,i.id)),r.addEventListener(`input`,()=>{this.query.set(r.value),this.activeIndex.set(this.autoHighlight?0:-1),this.managesPanel&&!this.#n()&&this.open.set(r.value.length>=this.#t())},{signal:e}),r.addEventListener(`keydown`,e=>this.#i(e),{signal:e}),this.#n()?(this.open.set(!0),r.setAttribute(`aria-expanded`,`true`)):this.managesPanel?(this.openOnFocus&&r.addEventListener(`focus`,()=>{r.value.length>=this.#t()&&this.open.set(!0)},{signal:e}),document.addEventListener(`pointerdown`,e=>{e.target instanceof Node&&(this.contains(e.target)||this.open.set(!1))},{signal:e}),this.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t instanceof Node&&this.contains(t)||this.open.set(!1)},{signal:e})):n instanceof HTMLDialogElement?(this.addEventListener(`zazz:dialog-open`,e=>{e.target===n&&(this.open.set(!0),r.focus())},{signal:e}),this.addEventListener(`zazz:dialog-close`,e=>{e.target===n&&this.open.set(!1)},{signal:e})):n.addEventListener(`toggle`,e=>{let t=e.newState===`open`;this.open.set(t),t&&r.focus()},{signal:e}),n.addEventListener(`mousedown`,e=>{e.target instanceof Element&&(e.target.closest(`input, textarea, select, [contenteditable]`)||e.target.closest(`[data-slot~="${t}-list"]`)&&e.preventDefault())},{signal:e}),n.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let n=e.target.closest(`[data-slot~="${t}-item"]`);n&&!n.hidden&&this.commit(n,`pointer`)},{signal:e}),this.#n()||(this.managesPanel?B(()=>{let e=this.open.get();r.setAttribute(`aria-expanded`,String(e)),e&&!this.#r()?n.showPopover():!e&&this.#r()&&n.hidePopover(),e||this.activeIndex.set(-1)},{signal:e}):B(()=>{r.setAttribute(`aria-expanded`,String(this.open.get()))},{signal:e})),B(()=>{let e=this.open.get(),n=this.query.get(),i=this.activeIndex.get();if(!e&&this.managesPanel&&!this.#n()){r.removeAttribute(`aria-activedescendant`);return}let{items:a,ranked:o,visible:s}=this.#e(n),c=this.sortByScore;for(let e of o){let t=a[e.index];t.hidden=e.hidden,c?t.style.order=String(-Math.round(e.score*1e3)):t.style.order&&t.style.removeProperty(`order`)}s.forEach((e,n)=>{e.id||=`ui-${t}-item-${++V}`,n===i?e.setAttribute(`data-highlighted`,``):e.removeAttribute(`data-highlighted`)});let l=i>=0?s[i]:void 0;l?(r.setAttribute(`aria-activedescendant`,l.id),l.scrollIntoView({block:`nearest`})):r.removeAttribute(`aria-activedescendant`)},{signal:e})}items(){let e=this.panel;return e?Array.from(e.querySelectorAll(`[data-slot~="${this.slotPrefix}-item"]`)).filter(e=>e instanceof HTMLElement):[]}visibleItems(e,t){let n=t.filter(e=>!e.hidden);return this.sortByScore&&n.sort((e,t)=>t.score-e.score||e.index-t.index),n.map(t=>e[t.index])}#e(e){let t=this.items(),n=ue(e,t.map(e=>({value:this.itemValue(e),keywords:(e.getAttribute(`data-keywords`)??``).split(/\s+/).filter(Boolean)})));return{items:t,ranked:n,visible:this.visibleItems(t,n)}}itemValue(e){let t=e.getAttribute(`data-value`);if(t!==null)return t;if(!e.querySelector(`kbd, ui-kbd-group`))return e.textContent?.trim()??``;let n=e.cloneNode(!0);for(let e of n.querySelectorAll(`kbd, ui-kbd-group`))e.remove();return n.textContent?.trim()??``}clearQuery(){let e=this.searchInput;e&&(e.value=``,this.query.set(``))}#t(){let e=Number(this.getAttribute(`data-min-length`));return Number.isFinite(e)&&e>0?e:0}#n(){return this.managesPanel&&this.panel!==null&&!this.panel.hasAttribute(`popover`)}#r(){return this.panel?.matches(`:popover-open, .\\:popover-open`)??!1}#i(e){let t=this.searchInput;if(t){if(e.key===`Escape`&&this.managesPanel){this.open.get()&&!this.#n()?(e.preventDefault(),this.open.set(!1)):t.value&&(e.preventDefault(),this.clearQuery());return}if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){if((e.key===`Home`||e.key===`End`)&&this.activeIndex.get()<0)return;e.preventDefault(),this.managesPanel&&!this.open.get()&&this.open.set(!0);let t=this.#e(this.query.get()).visible.length;this.activeIndex.set(de(this.activeIndex.get(),e.key,t));return}if(e.key===`Enter`){let t=this.activeIndex.get(),n=t>=0?this.#e(this.query.get()).visible[t]:void 0;n&&(e.preventDefault(),this.commit(n,`keyboard`))}}}};c(`ui-autocomplete`,class extends H{slotPrefix=`autocomplete`;commit(e,t){let n=this.searchInput;n&&(n.value=this.itemValue(e),this.query.set(n.value),this.open.set(!1),n.focus(),n.dispatchEvent(new Event(`change`,{bubbles:!0})))}});const U=`data-checkbox-controls`;function fe(e){let t=e.filter(Boolean).length;return t===0?`none`:t===e.length?`all`:`some`}function W(e){let t=e.getAttribute(U);if(!t)return[];let n=(e.form??e.ownerDocument).querySelectorAll(`input[type="checkbox"]`);return Array.from(n).filter(n=>n.name===t&&n!==e)}function pe(e){if(!e.name)return null;let t=(e.form??e.ownerDocument).querySelectorAll(`input[type="checkbox"][${U}]`);for(let n of t)if(n.getAttribute(U)===e.name&&n!==e)return n;return null}const G=new Map;function K(e){G.get(e)?.members.set(W(e).map(e=>e.checked))}function q(e){let t=I(W(e).map(e=>e.checked)),n=L(()=>fe(t.get())),r=B(()=>{let r=n.get(),i=t.get();e.checked=r===`all`,e.indeterminate=r===`some`,W(e).forEach((e,t)=>{let n=e.closest(`tr`);n&&(i[t]?n.setAttribute(`data-state`,`selected`):n.getAttribute(`data-state`)===`selected`&&n.removeAttribute(`data-state`))})});G.set(e,{members:t,dispose:r})}function me(e){let t=e.target;if(!(t instanceof HTMLInputElement)||t.type!==`checkbox`)return;if(t.hasAttribute(U)){G.has(t)||q(t);for(let e of W(t))e.checked=t.checked;K(t);return}let n=pe(t);n&&(G.has(n)||q(n),K(n))}function J(e=document){for(let[e,t]of G)e.isConnected||(t.dispose(),G.delete(e));let t=e.querySelectorAll(`input[type="checkbox"][${U}]`);for(let e of t)G.has(e)?K(e):q(e)}typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>J()):J(),document.addEventListener(`change`,me),u(J));let Y=null;function he(){return Y||(Y=document.createElement(`template`),Y.innerHTML=`<span class="ui-badge" data-slot="combobox-tag"><span data-slot="combobox-tag-label"></span><button type="button" tabindex="-1" data-slot="combobox-tag-remove"></button></span>`),Y}function ge(e,t,n){return n?{value:``,clear:!1}:e===``?{value:``,clear:!0}:{value:t,clear:!1}}function _e(e,t){return e.replace(`{label}`,t)}c(`ui-combobox`,class extends H{slotPrefix=`combobox`;openOnFocus=!1;#e=``;#t=``;#n=[];#r=``;setup(e){super.setup(e);let t=this.searchInput;if(!t)return;let n=this.#i();this.#t=t.getAttribute(`placeholder`)??``,n&&this.querySelector(`[data-slot~="combobox-list"]`)?.setAttribute(`aria-multiselectable`,`true`);let r=this.#u();if(r!==null&&r.value!==``&&this.#o().length===0&&this.items().find(e=>this.#c(e)===r.value)?.setAttribute(`aria-selected`,`true`),n)for(let e of this.items())e.getAttribute(`aria-selected`)!==`true`&&e.setAttribute(`aria-selected`,`false`);this.#n=this.#o().map(e=>this.#c(e)),this.#e=n?``:this.#s()??``,t.value=this.#e,this.#d(!1);let i=t.closest(`[data-slot~="combobox-control"]`);t.addEventListener(`click`,()=>this.#a(),{signal:e}),i?.addEventListener(`mousedown`,e=>{!(e.target instanceof Element)||e.target===t||(e.preventDefault(),t.focus(),e.target.closest(`[data-slot~="combobox-trigger"], [data-slot~="combobox-tag"]`)||this.#a())},{signal:e}),i?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let n=e.target.closest(`[data-slot~="combobox-tag-remove"]`);if(!n)return;e.preventDefault();let r=n.closest(`[data-slot~="combobox-tag"]`)?.getAttribute(`data-value`);this.#l(this.items().find(e=>this.#c(e)===r)),t.focus()},{signal:e});let a=this.querySelector(`[data-slot~="combobox-trigger"]`);a instanceof HTMLElement&&a.addEventListener(`click`,()=>{this.open.get()?this.open.set(!1):this.#a()},{signal:e}),n&&t.addEventListener(`keydown`,e=>{if(e.key!==`Backspace`||t.value!==``)return;let n=this.#o().at(-1);n&&(e.preventDefault(),this.#l(n))},{signal:e}),this.addEventListener(`focusout`,e=>{let n=e.relatedTarget;if(n instanceof Node&&this.contains(n))return;let r=ge(t.value,this.#e,this.#i());t.value=r.value,this.query.set(``),r.clear&&this.#m()},{signal:e}),(r??t).form?.addEventListener(`reset`,()=>queueMicrotask(()=>this.#h()),{signal:e})}teardown(){for(let e of this.querySelectorAll(`[data-slot~="combobox-tag"], [data-combobox-stamped]`))e.remove();this.searchInput&&(this.searchInput.placeholder=this.#t)}itemValue(e){return e.textContent?.trim()??``}clearQuery(){let e=this.searchInput;e&&(e.value=this.#i()?``:this.#e,this.query.set(``))}commit(e,t){let n=this.searchInput;if(n){if(this.#i()){e.setAttribute(`aria-selected`,String(e.getAttribute(`aria-selected`)!==`true`)),n.value=``,this.query.set(``),this.activeIndex.set(this.items().indexOf(e)),this.#d(!0),n.focus();return}this.#e=this.itemValue(e),n.value=this.#e,this.query.set(``);for(let e of this.items())e.removeAttribute(`aria-selected`);e.setAttribute(`aria-selected`,`true`),this.#d(!0),n.focus(),this.panel?.hasAttribute(`popover`)?this.open.set(!1):n.select()}}#i(){return this.getAttribute(`data-variant`)===`multiselect`}#a(){let e=this.searchInput;if(!(!e||this.open.get())){if(this.#i())e.value=``,this.activeIndex.set(-1);else{e.value=this.#e;let t=this.#o()[0];this.activeIndex.set(t?this.items().indexOf(t):-1),e.value!==``&&e.select()}this.query.set(``),this.open.set(!0)}}#o(){return this.items().filter(e=>e.getAttribute(`aria-selected`)===`true`)}#s(){let e=this.#o()[0];return e?this.itemValue(e):void 0}#c(e){return e.getAttribute(`data-value`)??this.itemValue(e)}#l(e){e&&(e.setAttribute(`aria-selected`,`false`),this.#d(!0))}#u(){let e=this.querySelector(`[data-slot~="combobox-value"]:not([data-combobox-stamped])`);return e instanceof HTMLInputElement?e:null}#d(e){let t=this.searchInput,n=this.#o().map(e=>this.#c(e)),r=JSON.stringify(n),i=r!==this.#r;this.#r=r,t&&this.#i()&&this.#p(t);let a=this.#u();if(!a)return;a.value=n[0]??``;for(let e of this.querySelectorAll(`[data-combobox-stamped]`))e.remove();let o=a;for(let e of n.slice(1)){let t=document.createElement(`input`);t.type=`hidden`,t.setAttribute(`data-slot`,`combobox-value`),t.setAttribute(`data-combobox-stamped`,``),a.name&&(t.name=a.name),t.value=e,o.after(t),o=t}e&&i&&a.dispatchEvent(new Event(`change`,{bubbles:!0}))}#f(){let e=this.querySelector(`[data-slot~="combobox-tag-template"]`),t=(e instanceof HTMLTemplateElement?e:he()).content.firstElementChild;return t instanceof HTMLElement?t:null}#p(e){let t=e.closest(`[data-slot~="combobox-control"]`);if(!t)return;for(let e of t.querySelectorAll(`[data-slot~="combobox-tag"]`))e.remove();let n=this.#f();if(!n)return;let r=this.getAttribute(`data-label-remove`)??`Remove {label}`,i=this.#o().map(e=>{let t=this.itemValue(e),i=n.cloneNode(!0);if(i.setAttribute(`data-value`,this.#c(e)),!i.matches(`[data-slot~="combobox-tag"]`)){let e=i.getAttribute(`data-slot`);i.setAttribute(`data-slot`,e?`${e} combobox-tag`:`combobox-tag`)}let a=i.querySelector(`[data-slot~="combobox-tag-label"]`);return a?a.textContent=t:i.prepend(document.createTextNode(t)),i.querySelector(`[data-slot~="combobox-tag-remove"]`)?.setAttribute(`aria-label`,_e(r,t)),i});e.before(...i),e.placeholder=i.length>0?``:this.#t}#m(){this.#e=``;let e=this.#i();for(let t of this.items())e?t.setAttribute(`aria-selected`,`false`):t.removeAttribute(`aria-selected`);this.#d(!0)}#h(){let e=this.searchInput;if(!e)return;let t=this.#i();for(let e of this.items()){let n=this.#n.includes(this.#c(e));t?e.setAttribute(`aria-selected`,String(n)):n?e.setAttribute(`aria-selected`,`true`):e.removeAttribute(`aria-selected`)}this.#e=t?``:this.#s()??``,e.value=this.#e,this.query.set(``),this.#d(!0)}});function ve(e){let t=e.split(`+`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0);if(t.length===0)return null;let n={key:``,ctrl:!1,alt:!1,shift:!1,meta:!1,mod:!1};for(let e of t.slice(0,-1))switch(e){case`mod`:n.mod=!0;break;case`ctrl`:case`control`:n.ctrl=!0;break;case`alt`:case`option`:n.alt=!0;break;case`shift`:n.shift=!0;break;case`meta`:case`cmd`:case`super`:n.meta=!0;break;default:return null}return n.key=t[t.length-1],n}function ye(){return typeof navigator>`u`?!1:/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent)}function be(e,t,n=ye()){let r=t.meta||t.mod&&n,i=t.ctrl||t.mod&&!n;return e.metaKey!==r||e.ctrlKey!==i||e.altKey!==t.alt||e.shiftKey!==t.shift?!1:e.key.toLowerCase()===t.key}function xe(e){return e instanceof HTMLElement?e.isContentEditable?!0:e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement:!1}function Se(e){return!e.ctrl&&!e.alt&&!e.meta&&!e.mod}function X(e,t,n={}){let r=ve(e);return!r||typeof document>`u`?!1:(document.addEventListener(`keydown`,e=>{e.defaultPrevented||e.repeat||Se(r)&&xe(e.target)||be(e,r)&&(e.preventDefault(),t(e))},{signal:n.signal}),!0)}c(`ui-command`,class extends H{slotPrefix=`command`;managesPanel=!1;autoHighlight=!0;get sortByScore(){return this.getAttribute(`data-sort`)!==`document`}setup(e){super.setup(e);let t=this.searchInput,n=this.panel;if(!t||!n)return;let r=this.getAttribute(`data-command-hotkey`);r&&X(r,()=>this.#t(),{signal:e});for(let t of this.items()){let n=t.getAttribute(`data-hotkey`);n&&X(n,()=>this.#e(t,!0),{signal:e})}let i=()=>{t.value=``,this.query.set(``),this.activeIndex.set(0)};n instanceof HTMLDialogElement?this.addEventListener(`zazz:dialog-close`,e=>{e.target===n&&i()},{signal:e}):n.addEventListener(`toggle`,e=>{e.newState===`closed`&&i()},{signal:e})}commit(e,t){this.#e(e,t===`keyboard`)}#e(e,t){this.dispatchEvent(new CustomEvent(`zazz:command-select`,{bubbles:!0,detail:{item:e,value:this.itemValue(e)}})),t&&e.click(),e.hasAttribute(`data-stay-open`)||this.#n()}#t(){let e=this.panel;e&&(e instanceof HTMLDialogElement?e.open?e.close():e.showModal():e.togglePopover())}#n(){let e=this.panel;e&&(e instanceof HTMLDialogElement?e.open&&e.close():e.matches(`:popover-open, .\\:popover-open`)&&e.hidePopover())}});var Z=class extends s{setup(e){let t=this.closest(`dialog`);if(t&&!t.open){t.addEventListener(`zazz:dialog-open`,()=>this.init(),{signal:e});return}this.init()}teardown(){this._emblaController?.abort(),delete this._emblaController,this._emblaApi?.destroy(),this._emblaApiThumb?.destroy(),delete this._emblaApi,delete this._emblaApiThumb,this.removeAttribute(`data-carousel-init`)}init(){ie.initRoot(this)}get api(){return this._emblaApi??null}};c(`ui-carousel`,Z),c(`ui-lightbox`,class extends s{setup(e){let t=this.querySelector(`dialog`);t instanceof HTMLDialogElement&&(this.addEventListener(`zazz:dialog-open`,e=>{e.target===t&&this.#t(t)},{signal:e}),this.addEventListener(`zazz:dialog-close`,e=>{e.target===t&&this.#n(t)},{signal:e}))}#e(){return this.querySelector(`[data-slot~="lightbox-gallery"] :is(ui-carousel, .ui-carousel)`)}#t(e){let t=e.querySelector(`:is(ui-carousel, .ui-carousel)`);if(!t)return;t instanceof Z&&t.init();let n=this.#e()?._emblaApi;t._emblaApi&&n&&t._emblaApi.scrollTo(n.selectedScrollSnap(),!0);let r=t.querySelector(`[data-slot~="carousel-viewport"]`);r instanceof HTMLElement&&r.focus({preventScroll:!0})}#n(e){let t=e.querySelector(`:is(ui-carousel, .ui-carousel)`)?._emblaApi,n=this.#e()?._emblaApi;t&&n&&n.scrollTo(t.selectedScrollSnap())}}),c(`ui-menu`,class extends s{setup(e){this.addEventListener(`keydown`,e=>this.#n(e),{signal:e})}#e(){let e=this.querySelector(`:scope > [data-slot~="menu-popover"]`);return e instanceof HTMLElement?e:null}#t(e){return Array.from(e.querySelectorAll(`a[href], button`)).filter(e=>e instanceof HTMLElement).filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-disabled`)!==`true`&&e.closest(`ui-menu, .ui-menu`)===this)}#n(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest(`ui-menu`)!==this)return;let n=this.#e();if(!n)return;let r=t.parentElement===this&&(t.hasAttribute(`popovertarget`)||t.hasAttribute(`interestfor`)),i=n.matches(`:popover-open, .\\:popover-open`);if(r&&!i&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){e.preventDefault(),n.showPopover();let t=this.#t(n);t[e.key===`ArrowDown`?0:t.length-1]?.focus();return}if(!i||!n.contains(t))return;let a=this.#t(n);if(a.length===0)return;let o=a.indexOf(t),s;switch(e.key){case`ArrowDown`:s=o===-1?0:(o+1)%a.length;break;case`ArrowUp`:s=o===-1?a.length-1:(o-1+a.length)%a.length;break;case`Home`:s=0;break;case`End`:s=a.length-1;break;default:return}e.preventDefault(),a[s].focus()}});function Ce(e,t){if(!e)return[t];let n=e.split(`-`).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e)&&e>0);return n.reduce((e,t)=>e+t,0)===t&&n.length>0?n:[t]}function we(e,t,n){let r;switch(t){case`numeric`:r=/[^0-9]/g;break;case`alpha`:r=/[^a-zA-Z]/g;break;case`alphanumeric`:r=/[^a-zA-Z0-9]/g;break;case`none`:r=/\s/g;break}return e.replace(r,``).slice(0,n)}function Te(e,t,n,r,i){let a=r?Math.min(n,t-1):-1;return Array.from({length:t},(t,n)=>{let r=e.charAt(n);return{char:r===``?``:i?`•`:r,filled:r!==``,active:n===a}})}function Ee(e,t){return t>0&&e.length===t}c(`ui-otp`,class extends s{#e=null;#t=``;setup(e){let t=this.querySelector(`input`);if(!(t instanceof HTMLInputElement))return;let n=t.maxLength>0?t.maxLength:6,r=this.getAttribute(`data-otp-type`)??`numeric`,i=this.hasAttribute(`data-otp-mask`),a=Ce(this.getAttribute(`data-otp-groups`),n),o=this.#n(a);this.setAttribute(`data-otp-ready`,``);let s=I(we(t.value,r,n)),c=I(t.selectionStart??0),l=I(document.activeElement===t);t.addEventListener(`input`,()=>{let e=we(t.value,r,n);t.value!==e&&(t.value=e),s.set(e),c.set(t.selectionStart??e.length)},{signal:e}),document.addEventListener(`selectionchange`,()=>{document.activeElement===t&&c.set(t.selectionStart??0)},{signal:e}),t.addEventListener(`focus`,()=>l.set(!0),{signal:e}),t.addEventListener(`blur`,()=>l.set(!1),{signal:e}),o.addEventListener(`pointerdown`,e=>{let r=e.target instanceof Element?e.target.closest(`[data-otp-index]`):null;e.preventDefault(),t.focus();let i=r?Number(r.getAttribute(`data-otp-index`)):n,a=Math.min(i,t.value.length);t.setSelectionRange(a,a),c.set(a)},{signal:e}),B(()=>{let e=Te(s.get(),n,c.get(),l.get(),i),r=o.querySelectorAll(`[data-otp-index]`);e.forEach((e,t)=>{let n=r[t];n instanceof HTMLElement&&(n.textContent=e.char,e.filled?n.setAttribute(`data-filled`,``):n.removeAttribute(`data-filled`),e.active?n.setAttribute(`data-active`,``):n.removeAttribute(`data-active`))});let a=Ee(s.get(),n);a?this.setAttribute(`data-otp-complete`,``):this.removeAttribute(`data-otp-complete`),a&&this.hasAttribute(`data-otp-auto-submit`)&&this.#t!==s.get()&&(this.#t=s.get(),t.form?.requestSubmit())},{signal:e})}teardown(){this.#e?.remove(),this.#e=null,this.removeAttribute(`data-otp-ready`),this.removeAttribute(`data-otp-complete`)}#n(e){let t=document.createElement(`div`);t.setAttribute(`data-slot`,`otp-rail`),t.setAttribute(`aria-hidden`,`true`);let n=0;return e.forEach((e,r)=>{if(r>0){let e=document.createElement(`span`);e.setAttribute(`data-slot`,`otp-separator`),e.setAttribute(`aria-role`,`presentation`),e.textContent=`–`,t.append(e)}for(let r=0;r<e;r++){let e=document.createElement(`span`);e.setAttribute(`data-slot`,`otp-slot`),e.setAttribute(`data-otp-index`,String(n++)),t.append(e)}}),this.append(t),this.#e=t,t}});function De(e,t,n){return{type:e?`text`:`password`,ariaPressed:e?`true`:`false`,ariaLabel:e?n:t}}c(`ui-password`,class extends s{setup(e){let t=this.querySelector(`input[type="password"], input[type="text"]`),n=this.querySelector(`[data-slot~="password-group-toggle"]`);if(!(t instanceof HTMLInputElement)||!(n instanceof HTMLElement))return;let r=I(t.type===`text`);n.addEventListener(`click`,()=>r.set(!r.get()),{signal:e}),B(()=>{let e=this.getAttribute(`data-label-show`)||`Show password`,i=this.getAttribute(`data-label-hide`)||`Hide password`,a=De(r.get(),e,i);t.type=a.type,n.setAttribute(`aria-pressed`,a.ariaPressed),n.setAttribute(`aria-label`,a.ariaLabel)},{signal:e})}});function Oe(e,t,n){return e.length===0?t:e.length===1?e[0]:`${e[0]} ${n.replace(`{n}`,String(e.length-1))}`}let ke=0;c(`ui-multiselect`,class extends s{#e=[];#t=null;setup(e){let t=this.querySelector(`select[multiple]`);if(!(t instanceof HTMLSelectElement))return;this.#t=t;let n=this.getAttribute(`data-placeholder`)??`Select…`,r=this.getAttribute(`data-label-more`)??`(+{n} more)`,{trigger:i,label:a,panel:o,checkboxes:s}=this.#n(t);t.setAttribute(`data-multiselect-enhanced`,``);let c=()=>Array.from(t.selectedOptions).map(e=>e.label),l=I(c());s.forEach((n,r)=>{n.addEventListener(`change`,()=>{let e=t.options[r];e&&(e.selected=n.checked),l.set(c()),t.dispatchEvent(new Event(`change`,{bubbles:!0}))},{signal:e})}),t.addEventListener(`change`,()=>l.set(c()),{signal:e}),t.form?.addEventListener(`reset`,()=>queueMicrotask(()=>l.set(c())),{signal:e}),o.addEventListener(`toggle`,e=>{i.setAttribute(`aria-expanded`,String(e.newState===`open`))},{signal:e}),B(()=>{l.get(),a.textContent=Oe(c(),n,r),s.forEach((e,n)=>{let r=t.options[n];r&&e.checked!==r.selected&&(e.checked=r.selected)})},{signal:e})}teardown(){for(let e of this.#e)e.remove();this.#e=[],this.#t?.removeAttribute(`data-multiselect-enhanced`),this.#t=null}#n(e){let t=`ui-multiselect-panel-${++ke}`,n=document.createElement(`button`);n.type=`button`,n.className=`ui-select`,n.setAttribute(`data-slot`,`multiselect-trigger`),n.setAttribute(`popovertarget`,t),n.setAttribute(`aria-expanded`,`false`);let r=document.createElement(`span`);r.setAttribute(`data-slot`,`multiselect-label`);let i=document.createElement(`span`);i.setAttribute(`data-slot`,`multiselect-icon`),i.setAttribute(`aria-hidden`,`true`),n.append(r,i);let a=document.createElement(`div`);a.id=t,a.setAttribute(`data-slot`,`multiselect-panel`),a.setAttribute(`popover`,`auto`);let o=this.getAttribute(`data-side`),s=this.getAttribute(`data-align`);o&&a.setAttribute(`data-side`,o),s&&a.setAttribute(`data-align`,s);let c=[];for(let t of Array.from(e.options)){let e=document.createElement(`label`);e.setAttribute(`data-slot`,`multiselect-option`);let n=document.createElement(`input`);n.type=`checkbox`,n.checked=t.selected,n.disabled=t.disabled,e.append(n,document.createTextNode(t.label)),a.append(e),c.push(n)}return e.after(n,a),this.#e=[n,a],{trigger:n,label:r,panel:a,checkboxes:c}}}),c(`ui-tabs`,class extends s{setup(e){this.addEventListener(`keydown`,e=>this.#e(e),{signal:e})}#e(e){let t=e.target;if(!(t instanceof HTMLInputElement)||t.type!==`radio`)return;let n=t.closest(`[role="tablist"], [data-slot~="tabs-list"]`);if(!n||n.closest(`ui-tabs`)!==this)return;let r=Array.from(n.querySelectorAll(`input[type="radio"]`)).filter(e=>e instanceof HTMLInputElement).filter(e=>!e.disabled);if(r.length<2)return;let i=this.getAttribute(`data-orientation`)===`vertical`,a=i?`ArrowUp`:`ArrowLeft`,o=i?`ArrowDown`:`ArrowRight`,s=r.indexOf(t);if(s===-1)return;let c;switch(e.key){case a:c=(s-1+r.length)%r.length;break;case o:c=(s+1)%r.length;break;case`Home`:c=0;break;case`End`:c=r.length-1;break;default:return}e.preventDefault();let l=r[c];l.checked=!0,l.focus(),l.dispatchEvent(new Event(`change`,{bubbles:!0}))}}),Symbol.dispose??=Symbol(`Symbol.dispose`);const Ae=[`success`,`info`,`warning`,`destructive`],je={success:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"/></svg>`,info:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"/></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd"/></svg>`,destructive:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/></svg>`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>`};function Me(e){for(let t of e)t.style.blockSize=`auto`;return{[Symbol.dispose](){for(let t of e)t.style.removeProperty(`block-size`)}}}function Ne(e){let t=e.length,n=Array.from({length:t}),r=0;for(let i=t-1;i>=0;i--){let a=t-1-i;n[i]={stackIndex:a,offsetPx:r,zIndex:t-a,front:a===0,visible:a<3},r+=e[i]}return{toasts:n,frontToastHeightPx:t>0?e[t-1]:null}}var Q=class extends s{#e=new Map;#t=0;#n=0;#r=null;#i=0;#a=I(!1);#o=I(typeof document<`u`?document.hidden:!1);#s=L(()=>this.#a.get()||this.#o.get());#c=I([]);#l=L(()=>Ne(this.#c.get().map(e=>e.height)));setup(e){if(this.hasAttribute(`popover`)||this.setAttribute(`popover`,`manual`),this.hasAttribute(`role`)||this.setAttribute(`role`,`region`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Notifications`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`-1`),!this.querySelector(`[data-slot~="toaster-list"]`)){let e=document.createElement(`ol`);e.setAttribute(`data-slot`,`toaster-list`),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-relevant`,`additions text`),e.setAttribute(`aria-atomic`,`false`),this.append(e)}this.addEventListener(`command`,e=>this.#u(e),{signal:e}),this.addEventListener(`mouseenter`,()=>this.#h(!0),{signal:e}),this.addEventListener(`mouseleave`,()=>this.#g(),{signal:e}),this.addEventListener(`focusin`,()=>this.#h(!0),{signal:e}),this.addEventListener(`focusout`,()=>this.#g(),{signal:e}),document.addEventListener(`visibilitychange`,()=>this.#o.set(document.hidden),{signal:e}),window.addEventListener(`resize`,()=>{cancelAnimationFrame(this.#n),this.#n=requestAnimationFrame(()=>this.#f())},{signal:e}),B(()=>{this.dataset.expanded=String(this.#a.get())},{signal:e}),B(()=>{this.#s.get()?this.#y():this.#b()},{signal:e}),B(()=>{let e=this.#c.get(),{toasts:t,frontToastHeightPx:n}=this.#l.get();for(let n=0;n<e.length;n++){let{node:r,height:i}=e[n],a=t[n];r.dataset.front=String(a.front),r.dataset.visible=String(a.visible),r.style.zIndex=String(a.zIndex),r.style.setProperty(`--toasts-before`,String(a.stackIndex)),r.style.setProperty(`--initial-height`,`${i}px`),r.style.setProperty(`--offset`,`calc(${a.offsetPx}px + var(--ui-toaster-gap) * ${a.stackIndex})`)}n!==null&&this.style.setProperty(`--front-toast-height`,`${n}px`)},{signal:e})}teardown(){cancelAnimationFrame(this.#n),window.clearTimeout(this.#i);for(let e of this.#e.values())clearTimeout(e.timeoutId);this.#e.clear()}addToast(e={}){let t=`toast-${++this.#t}`,n=this.#p();return this.#x(),n.append(this.#d(e,t)),this.#f(),this.#_(t,e.duration??4e3),t}dismiss(e){if(e===void 0){this.dismissAll();return}let t=this.#p().querySelector(`[data-toast-id="${CSS.escape(e)}"]`);if(!(t instanceof HTMLElement)||t.dataset.removed===`true`)return;let n=this.#e.get(e);n&&clearTimeout(n.timeoutId),this.#e.delete(e),t.dataset.removed=`true`;let r=document.activeElement;r instanceof HTMLElement&&t.contains(r)&&r.matches(`:focus-visible`)&&this.#m().filter(e=>e.dataset.removed!==`true`).at(-1)?.focus({preventScroll:!0}),this.#f(),this.#C(t)}dismissAll(){for(let e of this.#m()){let t=e.dataset.toastId;t&&this.dismiss(t)}}#u(e){let t=e.command;if(typeof t!=`string`||!t.startsWith(`--toast`))return;let n=this.#r;if(n&&n.source===e.source&&n.command===t)return;this.#r={source:e.source,command:t},window.setTimeout(()=>{this.#r=null},0);let r=e.source,i={},a=t.slice(8);if(Ae.includes(a)&&(i.variant=a),r instanceof HTMLElement){let{title:e,description:t,variant:n,duration:a,closeButton:o}=r.dataset;if(e&&(i.title=e),t&&(i.description=t),!i.variant&&n&&Ae.includes(n)&&(i.variant=n),a!==void 0){let e=a.trim()===``?NaN:Number(a);Number.isNaN(e)||(i.duration=e)}o!==void 0&&(i.closeButton=o!==`false`)}this.addToast(i)}#d(e,t){let n=document.createElement(`li`);if(n.setAttribute(`data-slot`,`toaster-toast`),n.dataset.toastId=t,n.tabIndex=0,e.variant&&(n.dataset.variant=e.variant),e.variant){let t=document.createElement(`span`);t.setAttribute(`data-slot`,`toaster-icon`),t.setAttribute(`aria-hidden`,`true`),t.innerHTML=je[e.variant],n.append(t)}let r=document.createElement(`div`);if(r.setAttribute(`data-slot`,`toaster-content`),e.title){let t=document.createElement(`div`);t.setAttribute(`data-slot`,`toaster-title`),t.textContent=e.title,r.append(t)}if(e.description){let t=document.createElement(`div`);t.setAttribute(`data-slot`,`toaster-description`),t.textContent=e.description,r.append(t)}n.append(r);let i=e.action;if(i){let e=document.createElement(`button`);e.type=`button`,e.className=`ui-button`,e.setAttribute(`data-slot`,`toaster-action`),e.dataset.size=`sm`,e.textContent=i.label,e.addEventListener(`click`,e=>{i.onClick?.(e),e.defaultPrevented||this.dismiss(t)}),n.append(e)}if(e.closeButton!==!1){let e=document.createElement(`button`);e.type=`button`,e.className=`ui-button`,e.setAttribute(`data-slot`,`toaster-close`),e.dataset.variant=`ghost`,e.dataset.size=`icon-sm`,e.setAttribute(`aria-label`,`Close notification`),e.innerHTML=je.close,e.addEventListener(`click`,()=>this.dismiss(t)),n.append(e)}return n}#f(){let e=this.#m().filter(e=>e.dataset.removed!==`true`);using t=Me(e);let n=e.map(e=>({node:e,height:e.offsetHeight}));this.#c.set(n)}#p(){let e=this.querySelector(`[data-slot~="toaster-list"]`);return e instanceof HTMLOListElement||(e=document.createElement(`ol`),e.setAttribute(`data-slot`,`toaster-list`),this.append(e)),e}#m(){return Array.from(this.#p().children).filter(e=>e instanceof HTMLElement).filter(e=>e.matches(`[data-slot~="toaster-toast"]`))}#h(e){e&&window.clearTimeout(this.#i),this.#a.set(e)}#g(){window.clearTimeout(this.#i),this.#i=window.setTimeout(()=>{let e=document.activeElement,t=e instanceof Node&&this.contains(e);!this.matches(`:hover`)&&!t&&this.#h(!1)},100)}#_(e,t){if(t===1/0||Number.isNaN(t))return;let n={remaining:t,startedAt:0,timeoutId:0};this.#e.set(e,n),this.#s.get()||this.#v(e,n)}#v(e,t){t.startedAt=Date.now(),t.timeoutId=window.setTimeout(()=>this.dismiss(e),t.remaining)}#y(){for(let e of this.#e.values())e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=0,e.remaining=Math.max(0,e.remaining-(Date.now()-e.startedAt)))}#b(){if(!this.#s.get())for(let[e,t]of this.#e)t.timeoutId||this.#v(e,t)}#x(){try{this.matches(`:popover-open, .\\:popover-open`)||this.showPopover()}catch{}}#S(){try{this.matches(`:popover-open, .\\:popover-open`)&&this.hidePopover()}catch{}}#C(e){let t=!1,n=()=>{t||(t=!0,e.remove(),this.#m().length===0&&(this.#h(!1),this.#S()))};e.addEventListener(`transitionend`,t=>{t.target===e&&n()});let r=getComputedStyle(e).transitionDuration.split(`,`).reduce((e,t)=>Math.max(e,Number.parseFloat(t)||0),0);window.setTimeout(n,Math.max(600,r*1e3+100))}};function Pe(e){let t=e instanceof Element?e:typeof e==`string`?document.getElementById(e):document.querySelector(`ui-toaster`);return t instanceof Q?t:(console.warn('Toaster: no <ui-toaster> found. Add `<ui-toaster class="ui-toaster" popover="manual"></ui-toaster>` to the page.'),null)}function Fe(e){return typeof e==`string`?{title:e}:e??{}}const $={toast(e){let t=Fe(e),n=Pe(t.region);return n?n.addToast(t):null},success(e,t){return $.toast({...t,title:e,variant:`success`})},info(e,t){return $.toast({...t,title:e,variant:`info`})},warning(e,t){return $.toast({...t,title:e,variant:`warning`})},error(e,t){return $.toast({...t,title:e,variant:`destructive`})},dismiss(e){for(let t of document.querySelectorAll(`ui-toaster`))t instanceof Q&&t.dismiss(e)}};if(c(`ui-toaster`,Q),typeof window<`u`&&(window.Toaster=$),`navigation`in window){let e=null;window.navigation.addEventListener(`navigate`,i=>{if(e!==null&&i.destination.url===e){e=null;return}!i.canIntercept||i.hashChange||i.downloadRequest!==null||i.formData!==null||!r(i.destination.url)||i.intercept({async handler(){let e;try{let t=await fetch(i.destination.url);if(!t.ok)throw Error(t.statusText);e=new DOMParser().parseFromString(await t.text(),`text/html`)}catch{t(i.destination.url);return}let r=e.querySelector(`main`),a=document.querySelector(`main`);if(!(r instanceof HTMLElement)||!(a instanceof HTMLElement)||r.dataset.layout!==a.dataset.layout){t(i.destination.url);return}let o=()=>{a.replaceWith(r),document.title=e.title,i.scroll()};document.startViewTransition?await document.startViewTransition(o).finished:o(),d(r),n(r)}})});function t(t){e=t,location.assign(t)}function n(e){let t=e.querySelector(`h1`)??e;t instanceof HTMLElement&&(t.hasAttribute(`tabindex`)||(t.tabIndex=-1),t.focus({preventScroll:!0}))}function r(e){return new URL(e,location.href).origin===location.origin}}else console.warn(`Navigation API not supported. That's okay, we'll just use a full page reload.`);export{};
|
|
1
|
+
import e from"embla-carousel";import t from"embla-carousel-autoplay";import n from"embla-carousel-auto-scroll";import r from"embla-carousel-class-names";import{Signal as i}from"signal-polyfill";function a(e){if(e===`true`)return!0;if(e===`false`)return!1;if(!Number.isNaN(Number(e))&&e.trim()!==``)return Number(e);if(e.startsWith(`[`)&&e.endsWith(`]`))try{return JSON.parse(e)}catch{return e}return e}const o={parseValue:a,parseDataAttributes:(e,t)=>{let n={};for(let r of e.attributes)if(r.name.startsWith(t)){let e=r.name.replace(t,``).replace(/-([a-z])/g,(e,t)=>t.toUpperCase());n[e]=a(r.value)}return n}};typeof window<`u`&&(window.Utils=o);var s=class extends HTMLElement{#e=null;connectedCallback(){this.#e||(this.#e=new AbortController,this.setup(this.#e.signal))}disconnectedCallback(){this.#e?.abort(),this.#e=null,this.teardown?.()}};function c(e,t){typeof window>`u`||customElements.get(e)||customElements.define(e,t)}const l=[];function u(e){l.push(e)}function d(e){for(let t of l)t(e)}function f(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}const p=typeof CSS<`u`&&CSS.supports(`top`,`calc(sibling-index() * 1px)`);function m(e){let t=e.trim();return t?/^-?\d*\.?\d+ms$/.test(t)?parseFloat(t):/^-?\d*\.?\d+s$/.test(t)?parseFloat(t)*1e3:parseInt(t,10)||0:0}var h=class e{static#e(){return{margin:`0px`,threshold:.2,duration:f(`--ui-reveal-global-duration`)||`400ms`,ease:f(`--ui-reveal-global-ease`)||`cubic-bezier(0.4, 0, 0.2, 1)`,wait:m(f(`--ui-reveal-global-wait`)),distance:f(`--ui-reveal-global-distance`)||`1rem`,step:80,grow:parseFloat(f(`--ui-reveal-global-grow`))||.97,shrink:parseFloat(f(`--ui-reveal-global-shrink`))||1.03}}static get defaultConfig(){return e.#e()}#t=new Map;config;constructor(t={}){this.config={...e.defaultConfig,...t.config},this.init()}#n(e){let t=JSON.stringify(e),n=this.#t.get(t);return n||(n=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add(`in-viewport`),t.unobserve(e.target))})},e),this.#t.set(t,n)),n}#r(e){let t=e.dataset.revealMargin||this.config.margin,n=parseFloat(e.dataset.revealThreshold||this.config.threshold.toString());return{rootMargin:t,threshold:Math.min(Math.max(n,0),1)}}#i(e){let t=e.toString().trim();return/^-?\d*\.?\d+(ms|s)$/.test(t)?t:`${Math.max(0,parseInt(t,10)||0)}ms`}#a(e,t){Object.entries(t).forEach(([t,n])=>{n!=null&&e.style.setProperty(t,n.toString())})}#o(e){let t=e.dataset,n=this.#r(e),r=this.#n(n),i={step:Math.max(0,parseInt(t.revealStep||this.config.step.toString(),10)||0),duration:t.revealDuration?Math.max(0,parseInt(t.revealDuration,10)||0):this.config.duration,ease:t.revealEase||this.config.ease,baseWait:Math.max(0,parseInt(t.revealWait||this.config.wait.toString(),10)||0),distance:t.revealDistance||this.config.distance,order:t.revealOrder},a=Array.from(e.children),o=i.order===`reversed`?a.reverse():a;p&&this.#a(e,{"--ui-reveal-stagger-base":`${i.baseWait}ms`,"--ui-reveal-stagger-step":`${i.step}ms`}),o.forEach((e,n)=>{e instanceof HTMLElement&&(this.#a(e,{"--ui-reveal-duration":this.#i(i.duration),"--ui-reveal-ease":i.ease,"--ui-reveal-wait":p?null:`${i.baseWait+i.step*n}ms`,"--ui-reveal-distance":i.distance,"--ui-reveal-scale":t.revealScale||null}),r.observe(e))})}#s(e){let t=e.dataset,n=this.#r(e),r=this.#n(n),i=t.revealDuration?Math.max(0,parseInt(t.revealDuration,10)||0):null,a=t.revealWait?Math.max(0,parseInt(t.revealWait,10)||0):null;this.#a(e,{"--ui-reveal-duration":i===null?null:this.#i(i),"--ui-reveal-wait":a===null?null:this.#i(a),"--ui-reveal-ease":t.revealEase||null,"--ui-reveal-distance":t.revealDistance||null,"--ui-reveal-scale":t.revealScale||null}),r.observe(e)}init(){this.#t.forEach(e=>e.disconnect()),this.#t.clear();let e=document.documentElement.style;e.setProperty(`--ui-reveal-global-duration`,this.#i(this.config.duration)),e.setProperty(`--ui-reveal-global-ease`,this.config.ease),e.setProperty(`--ui-reveal-global-wait`,this.#i(this.config.wait)),e.setProperty(`--ui-reveal-global-distance`,this.config.distance),e.setProperty(`--ui-reveal-global-grow`,this.config.grow.toString()),e.setProperty(`--ui-reveal-global-shrink`,this.config.shrink.toString()),document.querySelectorAll(`[data-reveal]`).forEach(e=>{e instanceof HTMLElement&&this.#s(e)}),document.querySelectorAll(`[data-reveal-each]`).forEach(e=>{e instanceof HTMLElement&&this.#o(e)})}refresh(){this.init()}};if(typeof window<`u`&&typeof document<`u`){let e=null,t=()=>{e||=new h};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t):t(),u(()=>h.getAutoInstance()?.refresh()),h.disableAutoInit=()=>{e=`disabled`},h.getAutoInstance=()=>e===`disabled`?null:e}typeof window<`u`&&(window.Reveal=h);function g(e,t){e.dispatchEvent(new Event(t,{bubbles:!0}))}const _=function(){_._bound||(_._bound=!0,new MutationObserver(function(e){for(let t of e)t.type===`attributes`&&t.attributeName===`open`&&t.target instanceof HTMLDialogElement&&t.target.hasAttribute(`open`)&&g(t.target,`zazz:dialog-open`)}).observe(document.body,{attributes:!0,attributeFilter:[`open`],subtree:!0}),document.addEventListener(`close`,function(e){e.target instanceof HTMLDialogElement&&g(e.target,`zazz:dialog-close`)},!0))};typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,_):_());function ee(e){return e?e.trim().split(/\s+/).filter(Boolean):[]}const te={autoplay:e=>t(v(e,`data-carousel-autoplay-`)),"auto-scroll":e=>n(v(e,`data-carousel-auto-scroll-`)),"class-names":e=>r(v(e,`data-carousel-class-names-`))};function v(e,t){return o.parseDataAttributes(e,t)}function y(e,t,n={}){e.forEach((e,r)=>{let i=r===t;e.classList.toggle(`is-active`,i),n.ariaCurrent&&(i?e.setAttribute(`aria-current`,`true`):e.removeAttribute(`aria-current`))})}const ne=(e,t,n)=>{if(!t)return;let r=t.querySelector(`[data-slot~="carousel-dot"]`);if(!r)return;let i=[],a=()=>{let a=e.scrollSnapList().length;if(t.innerHTML=``,a<=1){i=[];return}i=[];for(let o=0;o<a;o++){let a=r.cloneNode(!0);i.push(a),t.appendChild(a),a.addEventListener(`click`,()=>e.scrollTo(o),{signal:n})}},o=()=>{i.length&&y(i,e.selectedScrollSnap())};return e.on(`init`,a).on(`reInit`,a).on(`init`,o).on(`reInit`,o).on(`select`,o),()=>{t.innerHTML=``}},b=(e,t,n)=>{t.slideNodes().forEach((t,r)=>{t.addEventListener(`click`,()=>e.scrollTo(r),{signal:n})})},x=(e,t)=>{let n=t.slideNodes(),r=()=>{let r=e.selectedScrollSnap();t.scrollTo(r),y(n,r,{ariaCurrent:!0})};e.on(`select`,r),r()};let S=0;function C(e,t,n,r={},i){let a=r.dragThresholdPx??6,o=n.includes(`commandfor`),s=!1,c=!1,l=0,u=0,d=0,f=0,p=0,m=0,h=()=>Math.hypot(d-l,f-u);e.addEventListener(`pointerdown`,e=>{e instanceof PointerEvent&&(e.pointerType===`mouse`&&e.button!==0||(s=!0,c=!1,l=e.clientX,u=e.clientY,d=e.clientX,f=e.clientY,p=t.selectedScrollSnap()))},{passive:!0,signal:i}),e.addEventListener(`pointermove`,e=>{!s||!(e instanceof PointerEvent)||(d=e.clientX,f=e.clientY,!c&&h()>=a&&(c=!0))},{passive:!0,signal:i});let g=()=>{s&&c&&(m=performance.now()+250,o&&(S=m)),s=!1,c=!1};e.addEventListener(`pointerup`,g,{passive:!0,signal:i}),e.addEventListener(`pointercancel`,g,{passive:!0,signal:i}),t.on(`pointerUp`,g),t.on(`scroll`,()=>{if(s){if(o){(h()>=a||t.selectedScrollSnap()!==p)&&(c=!0);return}c=!0}}),e.addEventListener(`click`,t=>{if(performance.now()>m)return;let r=t.target instanceof Element?t.target.closest(n):null;!r||!e.contains(r)||(t.preventDefault(),t.stopImmediatePropagation())},{capture:!0,signal:i})}let w=!1;function T(){w||(w=!0,document.addEventListener(`command`,e=>{e.cancelable&&performance.now()<=S&&e.preventDefault()},!0))}function E(t){if(t.hasAttribute(`data-carousel-init`)||t.closest(`dialog:not([open])`))return;t.setAttribute(`data-carousel-init`,``);let n=t.querySelector(`[data-slot~="carousel-thumbs"]`),r=n?t.querySelector(`[data-slot~="carousel-viewport"]:not([data-slot~="carousel-thumbs"] *)`):t.querySelector(`[data-slot~="carousel-viewport"]`),i=t.querySelector(`[data-slot~="carousel-prev"]`),a=t.querySelector(`[data-slot~="carousel-next"]`),o=t.querySelector(`[data-slot~="carousel-dots"]`);if(!r)return;r.hasAttribute(`tabindex`)||r.setAttribute(`tabindex`,`0`);let s=v(t,`data-carousel-`);Object.keys(s).forEach(function(e){(e===`name`||e===`keyboard`||e===`plugins`||e.startsWith(`autoplay`)||e.startsWith(`autoScroll`)||e.startsWith(`classNames`))&&delete s[e]}),`watchDrag`in s||(s.watchDrag=e=>e.canScrollPrev()||e.canScrollNext());let c=[];for(let e of ee(t.getAttribute(`data-carousel-plugins`))){let n=te[e];n&&c.push(n(t))}let l=e(r,s,c);t._emblaApi=l;let u=new AbortController,{signal:d}=u;if(t._emblaController=u,i&&i.addEventListener(`click`,()=>l.scrollPrev(),{signal:d}),a&&a.addEventListener(`click`,()=>l.scrollNext(),{signal:d}),o&&ne(l,o,d),t.querySelector(`[data-slot~="carousel-slide"][commandfor]`)&&C(t,l,`[data-slot~="carousel-slide"][commandfor]`,{dragThresholdPx:14},d),n){let r=n.querySelector(`[data-slot~="carousel-viewport"]`);if(r){let i={containScroll:`keepSnaps`,dragFree:!0},a=v(n,`data-carousel-thumbs-`),o=e(r,{...i,...a});t._emblaApiThumb=o,b(l,o,d),x(l,o),C(n,o,`[data-slot~="carousel-slide"]`,{},d)}}}function D(e){(e||document).querySelectorAll(`:is(ui-carousel, .ui-carousel)`).forEach(function(e){e.closest(`ui-carousel`)||E(e)})}function O(){document.addEventListener(`zazz:dialog-open`,function(e){if(!(e.target instanceof HTMLDialogElement))return;let t=e.target;D(t),t.querySelectorAll(`:is(ui-carousel, .ui-carousel)`).forEach(function(e){let t=e.getAttribute(`data-carousel-start-index`);t!=null&&e._emblaApi&&(e._emblaApi.scrollTo(Number(t),!0),e.removeAttribute(`data-carousel-start-index`));let n=e.querySelector(`[data-slot~="carousel-viewport"]`);n instanceof HTMLElement&&n.focus({preventScroll:!0})})})}function re(){let e=document.querySelector(`dialog[open]`);if(e){let t=e.querySelector(`:is(ui-carousel, .ui-carousel)[data-carousel-init]`);if(t?._emblaApi&&t.getAttribute(`data-carousel-keyboard`)!==`false`)return t}let t=document.activeElement?.closest(`:is(ui-carousel, .ui-carousel)[data-carousel-init]`);return t?._emblaApi&&t.getAttribute(`data-carousel-keyboard`)!==`false`?t:null}const k=function(){k._bound||(k._bound=!0,document.addEventListener(`keydown`,function(e){if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`||e.defaultPrevented)return;let t=e.target;if(!(t instanceof HTMLElement)||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t.isContentEditable)return;let n=re();n&&(e.preventDefault(),e.key===`ArrowLeft`?n._emblaApi.scrollPrev():n._emblaApi.scrollNext())}))},ie={init:D,initRoot:E,addDotBtnsAndClickHandlers:ne,addThumbClickHandlers:b,addTogglethumbsActive:x};function A(){document.addEventListener(`click`,function(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest(`[data-carousel-start], [data-slot~='carousel-slide'][commandfor]`);if(!t)return;let n=t.getAttribute(`data-carousel-start`);if(n==null&&t.hasAttribute(`commandfor`)){let e=t.closest(`:is(ui-carousel, .ui-carousel)`);e?._emblaApi&&(n=String(e._emblaApi.selectedScrollSnap()))}let r=t.getAttribute(`commandfor`);if(!r)return;let i=document.getElementById(r);if(!i)return;let a=i.querySelector(`:is(ui-carousel, .ui-carousel)`);a&&(a._emblaApi?a._emblaApi.scrollTo(Number(n),!0):n!=null&&a.setAttribute(`data-carousel-start-index`,n))})}typeof window<`u`&&typeof document<`u`&&(u(e=>D(e)),document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,function(){D(),O(),A(),k(),T()}):(D(),O(),A(),k(),T())),typeof window<`u`&&(window.EmblaInit=ie);const j=.1,M=.999,ae=/[\\/_+.#"@[({&]/,oe=/[\\/_+.#"@[({&]/g,se=/[\s-]/,N=/[\s-]/g;function P(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?1:.99;let s=`${i},${a}`,c=o[s];if(c!==void 0)return c;let l=r.charAt(a),u=n.indexOf(l,i),d=0;for(;u>=0;){let s=P(e,t,n,r,u+1,a+1,o);if(s>d){if(u===i)s*=1;else if(ae.test(e.charAt(u-1))){s*=.8;let t=e.slice(i,u-1).match(oe);t&&i>0&&(s*=M**t.length)}else if(se.test(e.charAt(u-1))){s*=.9;let t=e.slice(i,u-1).match(N);t&&i>0&&(s*=M**t.length)}else s*=.17,i>0&&(s*=M**(u-i));e.charAt(u)!==t.charAt(a)&&(s*=.9999)}if(s<j&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a)){let i=P(e,t,n,r,u+1,a+2,o);i*j>s&&(s=i*j)}s>d&&(d=s),u=n.indexOf(l,u+1)}return o[s]=d,d}function F(e){return e.toLowerCase().replace(N,` `)}function ce(e,t,n=[]){let r=n.length>0?`${e} ${n.join(` `)}`:e;return P(r,t,F(r),F(t),0,0,{})}Symbol.dispose??=Symbol(`Symbol.dispose`);function I(e,t){return new i.State(e,t)}function L(e,t){return new i.Computed(e,t)}let R=!0;const z=new i.subtle.Watcher(()=>{R&&(R=!1,queueMicrotask(le))});function le(){R=!0;for(let e of z.getPending())e.get();z.watch()}function B(e,t={}){let n,r=!1,a=new i.Computed(()=>{typeof n==`function`&&n(),n=e()});z.watch(a),a.get();let o=()=>{r||(r=!0,z.unwatch(a),typeof n==`function`&&n(),n=void 0)};return t.signal?.addEventListener(`abort`,o,{once:!0}),Object.assign(o,{[Symbol.dispose]:o})}typeof window<`u`&&(window.Signals={state:I,computed:L,effect:B});function ue(e,t){let n=e.trim();return t.map((e,t)=>{let r=n===``?1:ce(e.value,n,e.keywords);return{index:t,score:r,hidden:r<=0}})}function de(e,t,n){if(n===0)return-1;switch(t){case`ArrowDown`:return e<0?0:(e+1)%n;case`ArrowUp`:return e<0?n-1:(e-1+n)%n;case`Home`:return 0;case`End`:return n-1;default:return e}}let V=0;var H=class extends s{managesPanel=!0;openOnFocus=!0;get sortByScore(){return this.getAttribute(`data-sort`)===`score`}autoHighlight=!1;searchInput=null;panel=null;query=I(``);open=I(!1);activeIndex=I(-1);setup(e){let t=this.slotPrefix,n=this.querySelector(`[data-slot~="${t}-panel"]`),r=this.querySelector(`input[role="combobox"]`)??this.querySelector(`[data-slot~="${t}-input"]`);if(!(n instanceof HTMLElement)||!(r instanceof HTMLInputElement))return;this.panel=n,this.searchInput=r;let i=n.querySelector(`[data-slot~="${t}-list"]`);i instanceof HTMLElement&&(i.id||=`ui-${t}-list-${++V}`,r.setAttribute(`aria-controls`,i.id)),r.addEventListener(`input`,()=>{this.query.set(r.value),this.activeIndex.set(this.autoHighlight?0:-1),this.managesPanel&&!this.#n()&&this.open.set(r.value.length>=this.#t())},{signal:e}),r.addEventListener(`keydown`,e=>this.#i(e),{signal:e}),this.#n()?(this.open.set(!0),r.setAttribute(`aria-expanded`,`true`)):this.managesPanel?(this.openOnFocus&&r.addEventListener(`focus`,()=>{r.value.length>=this.#t()&&this.open.set(!0)},{signal:e}),document.addEventListener(`pointerdown`,e=>{e.target instanceof Node&&(this.contains(e.target)||this.open.set(!1))},{signal:e}),this.addEventListener(`focusout`,e=>{let t=e.relatedTarget;t instanceof Node&&this.contains(t)||this.open.set(!1)},{signal:e})):n instanceof HTMLDialogElement?(this.addEventListener(`zazz:dialog-open`,e=>{e.target===n&&(this.open.set(!0),r.focus())},{signal:e}),this.addEventListener(`zazz:dialog-close`,e=>{e.target===n&&this.open.set(!1)},{signal:e})):n.addEventListener(`toggle`,e=>{let t=e.newState===`open`;this.open.set(t),t&&r.focus()},{signal:e}),n.addEventListener(`mousedown`,e=>{e.target instanceof Element&&(e.target.closest(`input, textarea, select, [contenteditable]`)||e.target.closest(`[data-slot~="${t}-list"]`)&&e.preventDefault())},{signal:e}),n.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let n=e.target.closest(`[data-slot~="${t}-item"]`);n&&!n.hidden&&this.commit(n,`pointer`)},{signal:e}),this.#n()||(this.managesPanel?B(()=>{let e=this.open.get();r.setAttribute(`aria-expanded`,String(e)),e&&!this.#r()?n.showPopover():!e&&this.#r()&&n.hidePopover(),e||this.activeIndex.set(-1)},{signal:e}):B(()=>{r.setAttribute(`aria-expanded`,String(this.open.get()))},{signal:e})),B(()=>{let e=this.open.get(),n=this.query.get(),i=this.activeIndex.get();if(!e&&this.managesPanel&&!this.#n()){r.removeAttribute(`aria-activedescendant`);return}let{items:a,ranked:o,visible:s}=this.#e(n),c=this.sortByScore;for(let e of o){let t=a[e.index];t.hidden=e.hidden,c?t.style.order=String(-Math.round(e.score*1e3)):t.style.order&&t.style.removeProperty(`order`)}s.forEach((e,n)=>{e.id||=`ui-${t}-item-${++V}`,n===i?e.setAttribute(`data-highlighted`,``):e.removeAttribute(`data-highlighted`)});let l=i>=0?s[i]:void 0;l?(r.setAttribute(`aria-activedescendant`,l.id),l.scrollIntoView({block:`nearest`})):r.removeAttribute(`aria-activedescendant`)},{signal:e})}items(){let e=this.panel;return e?Array.from(e.querySelectorAll(`[data-slot~="${this.slotPrefix}-item"]`)).filter(e=>e instanceof HTMLElement):[]}visibleItems(e,t){let n=t.filter(e=>!e.hidden);return this.sortByScore&&n.sort((e,t)=>t.score-e.score||e.index-t.index),n.map(t=>e[t.index])}#e(e){let t=this.items(),n=ue(e,t.map(e=>({value:this.itemValue(e),keywords:(e.getAttribute(`data-keywords`)??``).split(/\s+/).filter(Boolean)})));return{items:t,ranked:n,visible:this.visibleItems(t,n)}}itemValue(e){let t=e.getAttribute(`data-value`);if(t!==null)return t;if(!e.querySelector(`kbd, ui-kbd-group`))return e.textContent?.trim()??``;let n=e.cloneNode(!0);for(let e of n.querySelectorAll(`kbd, ui-kbd-group`))e.remove();return n.textContent?.trim()??``}clearQuery(){let e=this.searchInput;e&&(e.value=``,this.query.set(``))}#t(){let e=Number(this.getAttribute(`data-min-length`));return Number.isFinite(e)&&e>0?e:0}#n(){return this.managesPanel&&this.panel!==null&&!this.panel.hasAttribute(`popover`)}#r(){return this.panel?.matches(`:popover-open`)??!1}#i(e){let t=this.searchInput;if(t){if(e.key===`Escape`&&this.managesPanel){this.open.get()&&!this.#n()?(e.preventDefault(),this.open.set(!1)):t.value&&(e.preventDefault(),this.clearQuery());return}if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){if((e.key===`Home`||e.key===`End`)&&this.activeIndex.get()<0)return;e.preventDefault(),this.managesPanel&&!this.open.get()&&this.open.set(!0);let t=this.#e(this.query.get()).visible.length;this.activeIndex.set(de(this.activeIndex.get(),e.key,t));return}if(e.key===`Enter`){let t=this.activeIndex.get(),n=t>=0?this.#e(this.query.get()).visible[t]:void 0;n&&(e.preventDefault(),this.commit(n,`keyboard`))}}}};c(`ui-autocomplete`,class extends H{slotPrefix=`autocomplete`;commit(e,t){let n=this.searchInput;n&&(n.value=this.itemValue(e),this.query.set(n.value),this.open.set(!1),n.focus(),n.dispatchEvent(new Event(`change`,{bubbles:!0})))}});const U=`data-checkbox-controls`;function fe(e){let t=e.filter(Boolean).length;return t===0?`none`:t===e.length?`all`:`some`}function W(e){let t=e.getAttribute(U);if(!t)return[];let n=(e.form??e.ownerDocument).querySelectorAll(`input[type="checkbox"]`);return Array.from(n).filter(n=>n.name===t&&n!==e)}function pe(e){if(!e.name)return null;let t=(e.form??e.ownerDocument).querySelectorAll(`input[type="checkbox"][${U}]`);for(let n of t)if(n.getAttribute(U)===e.name&&n!==e)return n;return null}const G=new Map;function K(e){G.get(e)?.members.set(W(e).map(e=>e.checked))}function q(e){let t=I(W(e).map(e=>e.checked)),n=L(()=>fe(t.get())),r=B(()=>{let r=n.get(),i=t.get();e.checked=r===`all`,e.indeterminate=r===`some`,W(e).forEach((e,t)=>{let n=e.closest(`tr`);n&&(i[t]?n.setAttribute(`data-state`,`selected`):n.getAttribute(`data-state`)===`selected`&&n.removeAttribute(`data-state`))})});G.set(e,{members:t,dispose:r})}function me(e){let t=e.target;if(!(t instanceof HTMLInputElement)||t.type!==`checkbox`)return;if(t.hasAttribute(U)){G.has(t)||q(t);for(let e of W(t))e.checked=t.checked;K(t);return}let n=pe(t);n&&(G.has(n)||q(n),K(n))}function J(e=document){for(let[e,t]of G)e.isConnected||(t.dispose(),G.delete(e));let t=e.querySelectorAll(`input[type="checkbox"][${U}]`);for(let e of t)G.has(e)?K(e):q(e)}typeof window<`u`&&typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>J()):J(),document.addEventListener(`change`,me),u(J));let Y=null;function he(){return Y||(Y=document.createElement(`template`),Y.innerHTML=`<span class="ui-badge" data-slot="combobox-tag"><span data-slot="combobox-tag-label"></span><button type="button" tabindex="-1" data-slot="combobox-tag-remove"></button></span>`),Y}function ge(e,t,n){return n?{value:``,clear:!1}:e===``?{value:``,clear:!0}:{value:t,clear:!1}}function _e(e,t){return e.replace(`{label}`,t)}c(`ui-combobox`,class extends H{slotPrefix=`combobox`;openOnFocus=!1;#e=``;#t=``;#n=[];#r=``;setup(e){super.setup(e);let t=this.searchInput;if(!t)return;let n=this.#i();this.#t=t.getAttribute(`placeholder`)??``,n&&this.querySelector(`[data-slot~="combobox-list"]`)?.setAttribute(`aria-multiselectable`,`true`);let r=this.#u();if(r!==null&&r.value!==``&&this.#o().length===0&&this.items().find(e=>this.#c(e)===r.value)?.setAttribute(`aria-selected`,`true`),n)for(let e of this.items())e.getAttribute(`aria-selected`)!==`true`&&e.setAttribute(`aria-selected`,`false`);this.#n=this.#o().map(e=>this.#c(e)),this.#e=n?``:this.#s()??``,t.value=this.#e,this.#d(!1);let i=t.closest(`[data-slot~="combobox-control"]`);t.addEventListener(`click`,()=>this.#a(),{signal:e}),i?.addEventListener(`mousedown`,e=>{!(e.target instanceof Element)||e.target===t||(e.preventDefault(),t.focus(),e.target.closest(`[data-slot~="combobox-trigger"], [data-slot~="combobox-tag"]`)||this.#a())},{signal:e}),i?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let n=e.target.closest(`[data-slot~="combobox-tag-remove"]`);if(!n)return;e.preventDefault();let r=n.closest(`[data-slot~="combobox-tag"]`)?.getAttribute(`data-value`);this.#l(this.items().find(e=>this.#c(e)===r)),t.focus()},{signal:e});let a=this.querySelector(`[data-slot~="combobox-trigger"]`);a instanceof HTMLElement&&a.addEventListener(`click`,()=>{this.open.get()?this.open.set(!1):this.#a()},{signal:e}),n&&t.addEventListener(`keydown`,e=>{if(e.key!==`Backspace`||t.value!==``)return;let n=this.#o().at(-1);n&&(e.preventDefault(),this.#l(n))},{signal:e}),this.addEventListener(`focusout`,e=>{let n=e.relatedTarget;if(n instanceof Node&&this.contains(n))return;let r=ge(t.value,this.#e,this.#i());t.value=r.value,this.query.set(``),r.clear&&this.#m()},{signal:e}),(r??t).form?.addEventListener(`reset`,()=>queueMicrotask(()=>this.#h()),{signal:e})}teardown(){for(let e of this.querySelectorAll(`[data-slot~="combobox-tag"], [data-combobox-stamped]`))e.remove();this.searchInput&&(this.searchInput.placeholder=this.#t)}itemValue(e){return e.textContent?.trim()??``}clearQuery(){let e=this.searchInput;e&&(e.value=this.#i()?``:this.#e,this.query.set(``))}commit(e,t){let n=this.searchInput;if(n){if(this.#i()){e.setAttribute(`aria-selected`,String(e.getAttribute(`aria-selected`)!==`true`)),n.value=``,this.query.set(``),this.activeIndex.set(this.items().indexOf(e)),this.#d(!0),n.focus();return}this.#e=this.itemValue(e),n.value=this.#e,this.query.set(``);for(let e of this.items())e.removeAttribute(`aria-selected`);e.setAttribute(`aria-selected`,`true`),this.#d(!0),n.focus(),this.panel?.hasAttribute(`popover`)?this.open.set(!1):n.select()}}#i(){return this.getAttribute(`data-variant`)===`multiselect`}#a(){let e=this.searchInput;if(!(!e||this.open.get())){if(this.#i())e.value=``,this.activeIndex.set(-1);else{e.value=this.#e;let t=this.#o()[0];this.activeIndex.set(t?this.items().indexOf(t):-1),e.value!==``&&e.select()}this.query.set(``),this.open.set(!0)}}#o(){return this.items().filter(e=>e.getAttribute(`aria-selected`)===`true`)}#s(){let e=this.#o()[0];return e?this.itemValue(e):void 0}#c(e){return e.getAttribute(`data-value`)??this.itemValue(e)}#l(e){e&&(e.setAttribute(`aria-selected`,`false`),this.#d(!0))}#u(){let e=this.querySelector(`[data-slot~="combobox-value"]:not([data-combobox-stamped])`);return e instanceof HTMLInputElement?e:null}#d(e){let t=this.searchInput,n=this.#o().map(e=>this.#c(e)),r=JSON.stringify(n),i=r!==this.#r;this.#r=r,t&&this.#i()&&this.#p(t);let a=this.#u();if(!a)return;a.value=n[0]??``;for(let e of this.querySelectorAll(`[data-combobox-stamped]`))e.remove();let o=a;for(let e of n.slice(1)){let t=document.createElement(`input`);t.type=`hidden`,t.setAttribute(`data-slot`,`combobox-value`),t.setAttribute(`data-combobox-stamped`,``),a.name&&(t.name=a.name),t.value=e,o.after(t),o=t}e&&i&&a.dispatchEvent(new Event(`change`,{bubbles:!0}))}#f(){let e=this.querySelector(`[data-slot~="combobox-tag-template"]`),t=(e instanceof HTMLTemplateElement?e:he()).content.firstElementChild;return t instanceof HTMLElement?t:null}#p(e){let t=e.closest(`[data-slot~="combobox-control"]`);if(!t)return;for(let e of t.querySelectorAll(`[data-slot~="combobox-tag"]`))e.remove();let n=this.#f();if(!n)return;let r=this.getAttribute(`data-label-remove`)??`Remove {label}`,i=this.#o().map(e=>{let t=this.itemValue(e),i=n.cloneNode(!0);if(i.setAttribute(`data-value`,this.#c(e)),!i.matches(`[data-slot~="combobox-tag"]`)){let e=i.getAttribute(`data-slot`);i.setAttribute(`data-slot`,e?`${e} combobox-tag`:`combobox-tag`)}let a=i.querySelector(`[data-slot~="combobox-tag-label"]`);return a?a.textContent=t:i.prepend(document.createTextNode(t)),i.querySelector(`[data-slot~="combobox-tag-remove"]`)?.setAttribute(`aria-label`,_e(r,t)),i});e.before(...i),e.placeholder=i.length>0?``:this.#t}#m(){this.#e=``;let e=this.#i();for(let t of this.items())e?t.setAttribute(`aria-selected`,`false`):t.removeAttribute(`aria-selected`);this.#d(!0)}#h(){let e=this.searchInput;if(!e)return;let t=this.#i();for(let e of this.items()){let n=this.#n.includes(this.#c(e));t?e.setAttribute(`aria-selected`,String(n)):n?e.setAttribute(`aria-selected`,`true`):e.removeAttribute(`aria-selected`)}this.#e=t?``:this.#s()??``,e.value=this.#e,this.query.set(``),this.#d(!0)}});function ve(e){let t=e.split(`+`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0);if(t.length===0)return null;let n={key:``,ctrl:!1,alt:!1,shift:!1,meta:!1,mod:!1};for(let e of t.slice(0,-1))switch(e){case`mod`:n.mod=!0;break;case`ctrl`:case`control`:n.ctrl=!0;break;case`alt`:case`option`:n.alt=!0;break;case`shift`:n.shift=!0;break;case`meta`:case`cmd`:case`super`:n.meta=!0;break;default:return null}return n.key=t[t.length-1],n}function ye(){return typeof navigator>`u`?!1:/mac|iphone|ipad|ipod/i.test(navigator.platform||navigator.userAgent)}function be(e,t,n=ye()){let r=t.meta||t.mod&&n,i=t.ctrl||t.mod&&!n;return e.metaKey!==r||e.ctrlKey!==i||e.altKey!==t.alt||e.shiftKey!==t.shift?!1:e.key.toLowerCase()===t.key}function xe(e){return e instanceof HTMLElement?e.isContentEditable?!0:e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement:!1}function Se(e){return!e.ctrl&&!e.alt&&!e.meta&&!e.mod}function X(e,t,n={}){let r=ve(e);return!r||typeof document>`u`?!1:(document.addEventListener(`keydown`,e=>{e.defaultPrevented||e.repeat||Se(r)&&xe(e.target)||be(e,r)&&(e.preventDefault(),t(e))},{signal:n.signal}),!0)}c(`ui-command`,class extends H{slotPrefix=`command`;managesPanel=!1;autoHighlight=!0;get sortByScore(){return this.getAttribute(`data-sort`)!==`document`}setup(e){super.setup(e);let t=this.searchInput,n=this.panel;if(!t||!n)return;let r=this.getAttribute(`data-command-hotkey`);r&&X(r,()=>this.#t(),{signal:e});for(let t of this.items()){let n=t.getAttribute(`data-hotkey`);n&&X(n,()=>this.#e(t,!0),{signal:e})}let i=()=>{t.value=``,this.query.set(``),this.activeIndex.set(0)};n instanceof HTMLDialogElement?this.addEventListener(`zazz:dialog-close`,e=>{e.target===n&&i()},{signal:e}):n.addEventListener(`toggle`,e=>{e.newState===`closed`&&i()},{signal:e})}commit(e,t){this.#e(e,t===`keyboard`)}#e(e,t){this.dispatchEvent(new CustomEvent(`zazz:command-select`,{bubbles:!0,detail:{item:e,value:this.itemValue(e)}})),t&&e.click(),e.hasAttribute(`data-stay-open`)||this.#n()}#t(){let e=this.panel;e&&(e instanceof HTMLDialogElement?e.open?e.close():e.showModal():e.togglePopover())}#n(){let e=this.panel;e&&(e instanceof HTMLDialogElement?e.open&&e.close():e.matches(`:popover-open`)&&e.hidePopover())}});var Z=class extends s{setup(e){let t=this.closest(`dialog`);if(t&&!t.open){t.addEventListener(`zazz:dialog-open`,()=>this.init(),{signal:e});return}this.init()}teardown(){this._emblaController?.abort(),delete this._emblaController,this._emblaApi?.destroy(),this._emblaApiThumb?.destroy(),delete this._emblaApi,delete this._emblaApiThumb,this.removeAttribute(`data-carousel-init`)}init(){ie.initRoot(this)}get api(){return this._emblaApi??null}};c(`ui-carousel`,Z),c(`ui-lightbox`,class extends s{setup(e){let t=this.querySelector(`dialog`);t instanceof HTMLDialogElement&&(this.addEventListener(`zazz:dialog-open`,e=>{e.target===t&&this.#t(t)},{signal:e}),this.addEventListener(`zazz:dialog-close`,e=>{e.target===t&&this.#n(t)},{signal:e}))}#e(){return this.querySelector(`[data-slot~="lightbox-gallery"] :is(ui-carousel, .ui-carousel)`)}#t(e){let t=e.querySelector(`:is(ui-carousel, .ui-carousel)`);if(!t)return;t instanceof Z&&t.init();let n=this.#e()?._emblaApi;t._emblaApi&&n&&t._emblaApi.scrollTo(n.selectedScrollSnap(),!0);let r=t.querySelector(`[data-slot~="carousel-viewport"]`);r instanceof HTMLElement&&r.focus({preventScroll:!0})}#n(e){let t=e.querySelector(`:is(ui-carousel, .ui-carousel)`)?._emblaApi,n=this.#e()?._emblaApi;t&&n&&n.scrollTo(t.selectedScrollSnap())}}),c(`ui-menu`,class extends s{setup(e){this.addEventListener(`keydown`,e=>this.#n(e),{signal:e})}#e(){let e=this.querySelector(`:scope > [data-slot~="menu-popover"]`);return e instanceof HTMLElement?e:null}#t(e){return Array.from(e.querySelectorAll(`a[href], button`)).filter(e=>e instanceof HTMLElement).filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-disabled`)!==`true`&&e.closest(`ui-menu, .ui-menu`)===this)}#n(e){if(![`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest(`ui-menu`)!==this)return;let n=this.#e();if(!n)return;let r=t.parentElement===this&&(t.hasAttribute(`popovertarget`)||t.hasAttribute(`interestfor`)),i=n.matches(`:popover-open`);if(r&&!i&&(e.key===`ArrowDown`||e.key===`ArrowUp`)){e.preventDefault(),n.showPopover();let t=this.#t(n);t[e.key===`ArrowDown`?0:t.length-1]?.focus();return}if(!i||!n.contains(t))return;let a=this.#t(n);if(a.length===0)return;let o=a.indexOf(t),s;switch(e.key){case`ArrowDown`:s=o===-1?0:(o+1)%a.length;break;case`ArrowUp`:s=o===-1?a.length-1:(o-1+a.length)%a.length;break;case`Home`:s=0;break;case`End`:s=a.length-1;break;default:return}e.preventDefault(),a[s].focus()}});function Ce(e,t){if(!e)return[t];let n=e.split(`-`).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e)&&e>0);return n.reduce((e,t)=>e+t,0)===t&&n.length>0?n:[t]}function we(e,t,n){let r;switch(t){case`numeric`:r=/[^0-9]/g;break;case`alpha`:r=/[^a-zA-Z]/g;break;case`alphanumeric`:r=/[^a-zA-Z0-9]/g;break;case`none`:r=/\s/g;break}return e.replace(r,``).slice(0,n)}function Te(e,t,n,r,i){let a=r?Math.min(n,t-1):-1;return Array.from({length:t},(t,n)=>{let r=e.charAt(n);return{char:r===``?``:i?`•`:r,filled:r!==``,active:n===a}})}function Ee(e,t){return t>0&&e.length===t}c(`ui-otp`,class extends s{#e=null;#t=``;setup(e){let t=this.querySelector(`input`);if(!(t instanceof HTMLInputElement))return;let n=t.maxLength>0?t.maxLength:6,r=this.getAttribute(`data-otp-type`)??`numeric`,i=this.hasAttribute(`data-otp-mask`),a=Ce(this.getAttribute(`data-otp-groups`),n),o=this.#n(a);this.setAttribute(`data-otp-ready`,``);let s=I(we(t.value,r,n)),c=I(t.selectionStart??0),l=I(document.activeElement===t);t.addEventListener(`input`,()=>{let e=we(t.value,r,n);t.value!==e&&(t.value=e),s.set(e),c.set(t.selectionStart??e.length)},{signal:e}),document.addEventListener(`selectionchange`,()=>{document.activeElement===t&&c.set(t.selectionStart??0)},{signal:e}),t.addEventListener(`focus`,()=>l.set(!0),{signal:e}),t.addEventListener(`blur`,()=>l.set(!1),{signal:e}),o.addEventListener(`pointerdown`,e=>{let r=e.target instanceof Element?e.target.closest(`[data-otp-index]`):null;e.preventDefault(),t.focus();let i=r?Number(r.getAttribute(`data-otp-index`)):n,a=Math.min(i,t.value.length);t.setSelectionRange(a,a),c.set(a)},{signal:e}),B(()=>{let e=Te(s.get(),n,c.get(),l.get(),i),r=o.querySelectorAll(`[data-otp-index]`);e.forEach((e,t)=>{let n=r[t];n instanceof HTMLElement&&(n.textContent=e.char,e.filled?n.setAttribute(`data-filled`,``):n.removeAttribute(`data-filled`),e.active?n.setAttribute(`data-active`,``):n.removeAttribute(`data-active`))});let a=Ee(s.get(),n);a?this.setAttribute(`data-otp-complete`,``):this.removeAttribute(`data-otp-complete`),a&&this.hasAttribute(`data-otp-auto-submit`)&&this.#t!==s.get()&&(this.#t=s.get(),t.form?.requestSubmit())},{signal:e})}teardown(){this.#e?.remove(),this.#e=null,this.removeAttribute(`data-otp-ready`),this.removeAttribute(`data-otp-complete`)}#n(e){let t=document.createElement(`div`);t.setAttribute(`data-slot`,`otp-rail`),t.setAttribute(`aria-hidden`,`true`);let n=0;return e.forEach((e,r)=>{if(r>0){let e=document.createElement(`span`);e.setAttribute(`data-slot`,`otp-separator`),e.setAttribute(`aria-role`,`presentation`),e.textContent=`–`,t.append(e)}for(let r=0;r<e;r++){let e=document.createElement(`span`);e.setAttribute(`data-slot`,`otp-slot`),e.setAttribute(`data-otp-index`,String(n++)),t.append(e)}}),this.append(t),this.#e=t,t}});function De(e,t,n){return{type:e?`text`:`password`,ariaPressed:e?`true`:`false`,ariaLabel:e?n:t}}c(`ui-password`,class extends s{setup(e){let t=this.querySelector(`input[type="password"], input[type="text"]`),n=this.querySelector(`[data-slot~="password-group-toggle"]`);if(!(t instanceof HTMLInputElement)||!(n instanceof HTMLElement))return;let r=I(t.type===`text`);n.addEventListener(`click`,()=>r.set(!r.get()),{signal:e}),B(()=>{let e=this.getAttribute(`data-label-show`)||`Show password`,i=this.getAttribute(`data-label-hide`)||`Hide password`,a=De(r.get(),e,i);t.type=a.type,n.setAttribute(`aria-pressed`,a.ariaPressed),n.setAttribute(`aria-label`,a.ariaLabel)},{signal:e})}});function Oe(e,t,n){return e.length===0?t:e.length===1?e[0]:`${e[0]} ${n.replace(`{n}`,String(e.length-1))}`}let ke=0;c(`ui-multiselect`,class extends s{#e=[];#t=null;setup(e){let t=this.querySelector(`select[multiple]`);if(!(t instanceof HTMLSelectElement))return;this.#t=t;let n=this.getAttribute(`data-placeholder`)??`Select…`,r=this.getAttribute(`data-label-more`)??`(+{n} more)`,{trigger:i,label:a,panel:o,checkboxes:s}=this.#n(t);t.setAttribute(`data-multiselect-enhanced`,``);let c=()=>Array.from(t.selectedOptions).map(e=>e.label),l=I(c());s.forEach((n,r)=>{n.addEventListener(`change`,()=>{let e=t.options[r];e&&(e.selected=n.checked),l.set(c()),t.dispatchEvent(new Event(`change`,{bubbles:!0}))},{signal:e})}),t.addEventListener(`change`,()=>l.set(c()),{signal:e}),t.form?.addEventListener(`reset`,()=>queueMicrotask(()=>l.set(c())),{signal:e}),o.addEventListener(`toggle`,e=>{i.setAttribute(`aria-expanded`,String(e.newState===`open`))},{signal:e}),B(()=>{l.get(),a.textContent=Oe(c(),n,r),s.forEach((e,n)=>{let r=t.options[n];r&&e.checked!==r.selected&&(e.checked=r.selected)})},{signal:e})}teardown(){for(let e of this.#e)e.remove();this.#e=[],this.#t?.removeAttribute(`data-multiselect-enhanced`),this.#t=null}#n(e){let t=`ui-multiselect-panel-${++ke}`,n=document.createElement(`button`);n.type=`button`,n.className=`ui-select`,n.setAttribute(`data-slot`,`multiselect-trigger`),n.setAttribute(`popovertarget`,t),n.setAttribute(`aria-expanded`,`false`);let r=document.createElement(`span`);r.setAttribute(`data-slot`,`multiselect-label`);let i=document.createElement(`span`);i.setAttribute(`data-slot`,`multiselect-icon`),i.setAttribute(`aria-hidden`,`true`),n.append(r,i);let a=document.createElement(`div`);a.id=t,a.setAttribute(`data-slot`,`multiselect-panel`),a.setAttribute(`popover`,`auto`);let o=this.getAttribute(`data-side`),s=this.getAttribute(`data-align`);o&&a.setAttribute(`data-side`,o),s&&a.setAttribute(`data-align`,s);let c=[];for(let t of Array.from(e.options)){let e=document.createElement(`label`);e.setAttribute(`data-slot`,`multiselect-option`);let n=document.createElement(`input`);n.type=`checkbox`,n.checked=t.selected,n.disabled=t.disabled,e.append(n,document.createTextNode(t.label)),a.append(e),c.push(n)}return e.after(n,a),this.#e=[n,a],{trigger:n,label:r,panel:a,checkboxes:c}}}),c(`ui-tabs`,class extends s{setup(e){this.addEventListener(`keydown`,e=>this.#e(e),{signal:e})}#e(e){let t=e.target;if(!(t instanceof HTMLInputElement)||t.type!==`radio`)return;let n=t.closest(`[role="tablist"], [data-slot~="tabs-list"]`);if(!n||n.closest(`ui-tabs`)!==this)return;let r=Array.from(n.querySelectorAll(`input[type="radio"]`)).filter(e=>e instanceof HTMLInputElement).filter(e=>!e.disabled);if(r.length<2)return;let i=this.getAttribute(`data-orientation`)===`vertical`,a=i?`ArrowUp`:`ArrowLeft`,o=i?`ArrowDown`:`ArrowRight`,s=r.indexOf(t);if(s===-1)return;let c;switch(e.key){case a:c=(s-1+r.length)%r.length;break;case o:c=(s+1)%r.length;break;case`Home`:c=0;break;case`End`:c=r.length-1;break;default:return}e.preventDefault();let l=r[c];l.checked=!0,l.focus(),l.dispatchEvent(new Event(`change`,{bubbles:!0}))}}),Symbol.dispose??=Symbol(`Symbol.dispose`);const Ae=[`success`,`info`,`warning`,`destructive`],je={success:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"/></svg>`,info:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"/></svg>`,warning:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd"/></svg>`,destructive:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"/></svg>`,close:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>`};function Me(e){for(let t of e)t.style.blockSize=`auto`;return{[Symbol.dispose](){for(let t of e)t.style.removeProperty(`block-size`)}}}function Ne(e){let t=e.length,n=Array.from({length:t}),r=0;for(let i=t-1;i>=0;i--){let a=t-1-i;n[i]={stackIndex:a,offsetPx:r,zIndex:t-a,front:a===0,visible:a<3},r+=e[i]}return{toasts:n,frontToastHeightPx:t>0?e[t-1]:null}}var Q=class extends s{#e=new Map;#t=0;#n=0;#r=null;#i=0;#a=I(!1);#o=I(typeof document<`u`?document.hidden:!1);#s=L(()=>this.#a.get()||this.#o.get());#c=I([]);#l=L(()=>Ne(this.#c.get().map(e=>e.height)));setup(e){if(this.hasAttribute(`popover`)||this.setAttribute(`popover`,`manual`),this.hasAttribute(`role`)||this.setAttribute(`role`,`region`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Notifications`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`-1`),!this.querySelector(`[data-slot~="toaster-list"]`)){let e=document.createElement(`ol`);e.setAttribute(`data-slot`,`toaster-list`),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-relevant`,`additions text`),e.setAttribute(`aria-atomic`,`false`),this.append(e)}this.addEventListener(`command`,e=>this.#u(e),{signal:e}),this.addEventListener(`mouseenter`,()=>this.#h(!0),{signal:e}),this.addEventListener(`mouseleave`,()=>this.#g(),{signal:e}),this.addEventListener(`focusin`,()=>this.#h(!0),{signal:e}),this.addEventListener(`focusout`,()=>this.#g(),{signal:e}),document.addEventListener(`visibilitychange`,()=>this.#o.set(document.hidden),{signal:e}),window.addEventListener(`resize`,()=>{cancelAnimationFrame(this.#n),this.#n=requestAnimationFrame(()=>this.#f())},{signal:e}),B(()=>{this.dataset.expanded=String(this.#a.get())},{signal:e}),B(()=>{this.#s.get()?this.#y():this.#b()},{signal:e}),B(()=>{let e=this.#c.get(),{toasts:t,frontToastHeightPx:n}=this.#l.get();for(let n=0;n<e.length;n++){let{node:r,height:i}=e[n],a=t[n];r.dataset.front=String(a.front),r.dataset.visible=String(a.visible),r.style.zIndex=String(a.zIndex),r.style.setProperty(`--toasts-before`,String(a.stackIndex)),r.style.setProperty(`--initial-height`,`${i}px`),r.style.setProperty(`--offset`,`calc(${a.offsetPx}px + var(--ui-toaster-gap) * ${a.stackIndex})`)}n!==null&&this.style.setProperty(`--front-toast-height`,`${n}px`)},{signal:e})}teardown(){cancelAnimationFrame(this.#n),window.clearTimeout(this.#i);for(let e of this.#e.values())clearTimeout(e.timeoutId);this.#e.clear()}addToast(e={}){let t=`toast-${++this.#t}`,n=this.#p();return this.#x(),n.append(this.#d(e,t)),this.#f(),this.#_(t,e.duration??4e3),t}dismiss(e){if(e===void 0){this.dismissAll();return}let t=this.#p().querySelector(`[data-toast-id="${CSS.escape(e)}"]`);if(!(t instanceof HTMLElement)||t.dataset.removed===`true`)return;let n=this.#e.get(e);n&&clearTimeout(n.timeoutId),this.#e.delete(e),t.dataset.removed=`true`;let r=document.activeElement;r instanceof HTMLElement&&t.contains(r)&&r.matches(`:focus-visible`)&&this.#m().filter(e=>e.dataset.removed!==`true`).at(-1)?.focus({preventScroll:!0}),this.#f(),this.#C(t)}dismissAll(){for(let e of this.#m()){let t=e.dataset.toastId;t&&this.dismiss(t)}}#u(e){let t=e.command;if(typeof t!=`string`||!t.startsWith(`--toast`))return;let n=this.#r;if(n&&n.source===e.source&&n.command===t)return;this.#r={source:e.source,command:t},window.setTimeout(()=>{this.#r=null},0);let r=e.source,i={},a=t.slice(8);if(Ae.includes(a)&&(i.variant=a),r instanceof HTMLElement){let{title:e,description:t,variant:n,duration:a,closeButton:o}=r.dataset;if(e&&(i.title=e),t&&(i.description=t),!i.variant&&n&&Ae.includes(n)&&(i.variant=n),a!==void 0){let e=a.trim()===``?NaN:Number(a);Number.isNaN(e)||(i.duration=e)}o!==void 0&&(i.closeButton=o!==`false`)}this.addToast(i)}#d(e,t){let n=document.createElement(`li`);if(n.setAttribute(`data-slot`,`toaster-toast`),n.dataset.toastId=t,n.tabIndex=0,e.variant&&(n.dataset.variant=e.variant),e.variant){let t=document.createElement(`span`);t.setAttribute(`data-slot`,`toaster-icon`),t.setAttribute(`aria-hidden`,`true`),t.innerHTML=je[e.variant],n.append(t)}let r=document.createElement(`div`);if(r.setAttribute(`data-slot`,`toaster-content`),e.title){let t=document.createElement(`div`);t.setAttribute(`data-slot`,`toaster-title`),t.textContent=e.title,r.append(t)}if(e.description){let t=document.createElement(`div`);t.setAttribute(`data-slot`,`toaster-description`),t.textContent=e.description,r.append(t)}n.append(r);let i=e.action;if(i){let e=document.createElement(`button`);e.type=`button`,e.className=`ui-button`,e.setAttribute(`data-slot`,`toaster-action`),e.dataset.size=`sm`,e.textContent=i.label,e.addEventListener(`click`,e=>{i.onClick?.(e),e.defaultPrevented||this.dismiss(t)}),n.append(e)}if(e.closeButton!==!1){let e=document.createElement(`button`);e.type=`button`,e.className=`ui-button`,e.setAttribute(`data-slot`,`toaster-close`),e.dataset.variant=`ghost`,e.dataset.size=`icon-sm`,e.setAttribute(`aria-label`,`Close notification`),e.innerHTML=je.close,e.addEventListener(`click`,()=>this.dismiss(t)),n.append(e)}return n}#f(){let e=this.#m().filter(e=>e.dataset.removed!==`true`);using t=Me(e);let n=e.map(e=>({node:e,height:e.offsetHeight}));this.#c.set(n)}#p(){let e=this.querySelector(`[data-slot~="toaster-list"]`);return e instanceof HTMLOListElement||(e=document.createElement(`ol`),e.setAttribute(`data-slot`,`toaster-list`),this.append(e)),e}#m(){return Array.from(this.#p().children).filter(e=>e instanceof HTMLElement).filter(e=>e.matches(`[data-slot~="toaster-toast"]`))}#h(e){e&&window.clearTimeout(this.#i),this.#a.set(e)}#g(){window.clearTimeout(this.#i),this.#i=window.setTimeout(()=>{let e=document.activeElement,t=e instanceof Node&&this.contains(e);!this.matches(`:hover`)&&!t&&this.#h(!1)},100)}#_(e,t){if(t===1/0||Number.isNaN(t))return;let n={remaining:t,startedAt:0,timeoutId:0};this.#e.set(e,n),this.#s.get()||this.#v(e,n)}#v(e,t){t.startedAt=Date.now(),t.timeoutId=window.setTimeout(()=>this.dismiss(e),t.remaining)}#y(){for(let e of this.#e.values())e.timeoutId&&(clearTimeout(e.timeoutId),e.timeoutId=0,e.remaining=Math.max(0,e.remaining-(Date.now()-e.startedAt)))}#b(){if(!this.#s.get())for(let[e,t]of this.#e)t.timeoutId||this.#v(e,t)}#x(){try{this.matches(`:popover-open`)||this.showPopover()}catch{}}#S(){try{this.matches(`:popover-open`)&&this.hidePopover()}catch{}}#C(e){let t=!1,n=()=>{t||(t=!0,e.remove(),this.#m().length===0&&(this.#h(!1),this.#S()))};e.addEventListener(`transitionend`,t=>{t.target===e&&n()});let r=getComputedStyle(e).transitionDuration.split(`,`).reduce((e,t)=>Math.max(e,Number.parseFloat(t)||0),0);window.setTimeout(n,Math.max(600,r*1e3+100))}};function Pe(e){let t=e instanceof Element?e:typeof e==`string`?document.getElementById(e):document.querySelector(`ui-toaster`);return t instanceof Q?t:(console.warn('Toaster: no <ui-toaster> found. Add `<ui-toaster class="ui-toaster" popover="manual"></ui-toaster>` to the page.'),null)}function Fe(e){return typeof e==`string`?{title:e}:e??{}}const $={toast(e){let t=Fe(e),n=Pe(t.region);return n?n.addToast(t):null},success(e,t){return $.toast({...t,title:e,variant:`success`})},info(e,t){return $.toast({...t,title:e,variant:`info`})},warning(e,t){return $.toast({...t,title:e,variant:`warning`})},error(e,t){return $.toast({...t,title:e,variant:`destructive`})},dismiss(e){for(let t of document.querySelectorAll(`ui-toaster`))t instanceof Q&&t.dismiss(e)}};if(c(`ui-toaster`,Q),typeof window<`u`&&(window.Toaster=$),`navigation`in window){let e=null;window.navigation.addEventListener(`navigate`,i=>{if(e!==null&&i.destination.url===e){e=null;return}!i.canIntercept||i.hashChange||i.downloadRequest!==null||i.formData!==null||!r(i.destination.url)||i.intercept({async handler(){let e;try{let t=await fetch(i.destination.url);if(!t.ok)throw Error(t.statusText);e=new DOMParser().parseFromString(await t.text(),`text/html`)}catch{t(i.destination.url);return}let r=e.querySelector(`main`),a=document.querySelector(`main`);if(!(r instanceof HTMLElement)||!(a instanceof HTMLElement)||r.dataset.layout!==a.dataset.layout){t(i.destination.url);return}let o=()=>{a.replaceWith(r),document.title=e.title,i.scroll()};document.startViewTransition?await document.startViewTransition(o).finished:o(),d(r),n(r)}})});function t(t){e=t,location.assign(t)}function n(e){let t=e.querySelector(`h1`)??e;t instanceof HTMLElement&&(t.hasAttribute(`tabindex`)||(t.tabIndex=-1),t.focus({preventScroll:!0}))}function r(e){return new URL(e,location.href).origin===location.origin}}else console.warn(`Navigation API not supported. That's okay, we'll just use a full page reload.`);export{};
|
package/examples/about.html
CHANGED
|
@@ -48,19 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
</script>
|
|
50
50
|
<link rel="modulepreload" href="../src/index.js" />
|
|
51
|
-
<!--
|
|
52
|
-
<script
|
|
53
|
-
src="https://cdn.jsdelivr.net/npm/@oddbird/popover-polyfill@0.7.2/dist/popover.min.js"
|
|
54
|
-
integrity="sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd"
|
|
55
|
-
crossorigin="anonymous"
|
|
56
|
-
defer
|
|
57
|
-
></script>
|
|
51
|
+
<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
58
52
|
<script
|
|
59
53
|
type="module"
|
|
60
|
-
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/
|
|
61
|
-
integrity="sha384-
|
|
54
|
+
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
55
|
+
integrity="sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T"
|
|
62
56
|
crossorigin="anonymous"
|
|
63
|
-
defer
|
|
64
57
|
></script>
|
|
65
58
|
<!-- Zazz behavior: one ES module imports every component script in dependency order -->
|
|
66
59
|
<script type="module" src="../src/index.js"></script>
|
|
@@ -129,7 +122,7 @@
|
|
|
129
122
|
|
|
130
123
|
<main data-layout="main">
|
|
131
124
|
<section class="container py-xl">
|
|
132
|
-
<div class="grid grid-cols-2
|
|
125
|
+
<div class="grid @md:grid-cols-2 gap-lg items-center">
|
|
133
126
|
<hgroup
|
|
134
127
|
class="flex flex-col items-center @md:items-start gap-sm text-center @md:text-left"
|
|
135
128
|
>
|
|
@@ -244,7 +237,7 @@
|
|
|
244
237
|
</div>
|
|
245
238
|
</section>
|
|
246
239
|
<section class="container py-xl">
|
|
247
|
-
<ui-carousel data-carousel-plugins="class-names"
|
|
240
|
+
<ui-carousel data-carousel-plugins="class-names">
|
|
248
241
|
<div class="flex items-end justify-between gap-md flex-wrap pb-lg">
|
|
249
242
|
<h2 class="text-h5 font-heading">Featured Articles</h2>
|
|
250
243
|
<div class="flex @md:hidden gap-xs">
|
package/examples/components.html
CHANGED
|
@@ -48,19 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
</script>
|
|
50
50
|
<link rel="modulepreload" href="../src/index.js" />
|
|
51
|
-
<!--
|
|
52
|
-
<script
|
|
53
|
-
src="https://cdn.jsdelivr.net/npm/@oddbird/popover-polyfill@0.7.2/dist/popover.min.js"
|
|
54
|
-
integrity="sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd"
|
|
55
|
-
crossorigin="anonymous"
|
|
56
|
-
defer
|
|
57
|
-
></script>
|
|
51
|
+
<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
58
52
|
<script
|
|
59
53
|
type="module"
|
|
60
|
-
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/
|
|
61
|
-
integrity="sha384-
|
|
54
|
+
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
55
|
+
integrity="sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T"
|
|
62
56
|
crossorigin="anonymous"
|
|
63
|
-
defer
|
|
64
57
|
></script>
|
|
65
58
|
<!-- Zazz behavior: one ES module imports every component script in dependency order -->
|
|
66
59
|
<script type="module" src="../src/index.js"></script>
|
package/examples/forms.html
CHANGED
|
@@ -48,19 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
</script>
|
|
50
50
|
<link rel="modulepreload" href="../src/index.js" />
|
|
51
|
-
<!--
|
|
52
|
-
<script
|
|
53
|
-
src="https://cdn.jsdelivr.net/npm/@oddbird/popover-polyfill@0.7.2/dist/popover.min.js"
|
|
54
|
-
integrity="sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd"
|
|
55
|
-
crossorigin="anonymous"
|
|
56
|
-
defer
|
|
57
|
-
></script>
|
|
51
|
+
<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
58
52
|
<script
|
|
59
53
|
type="module"
|
|
60
|
-
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/
|
|
61
|
-
integrity="sha384-
|
|
54
|
+
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
55
|
+
integrity="sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T"
|
|
62
56
|
crossorigin="anonymous"
|
|
63
|
-
defer
|
|
64
57
|
></script>
|
|
65
58
|
<!-- Zazz behavior: one ES module imports every component script in dependency order -->
|
|
66
59
|
<script type="module" src="../src/index.js"></script>
|
package/examples/index.html
CHANGED
|
@@ -48,19 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
</script>
|
|
50
50
|
<link rel="modulepreload" href="../src/index.js" />
|
|
51
|
-
<!--
|
|
52
|
-
<script
|
|
53
|
-
src="https://cdn.jsdelivr.net/npm/@oddbird/popover-polyfill@0.7.2/dist/popover.min.js"
|
|
54
|
-
integrity="sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd"
|
|
55
|
-
crossorigin="anonymous"
|
|
56
|
-
defer
|
|
57
|
-
></script>
|
|
51
|
+
<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
58
52
|
<script
|
|
59
53
|
type="module"
|
|
60
|
-
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/
|
|
61
|
-
integrity="sha384-
|
|
54
|
+
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
55
|
+
integrity="sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T"
|
|
62
56
|
crossorigin="anonymous"
|
|
63
|
-
defer
|
|
64
57
|
></script>
|
|
65
58
|
<!-- Zazz behavior: one ES module imports every component script in dependency order -->
|
|
66
59
|
<script type="module" src="../src/index.js"></script>
|
package/examples/layout.html
CHANGED
|
@@ -48,19 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
</script>
|
|
50
50
|
<link rel="modulepreload" href="../src/index.js" />
|
|
51
|
-
<!--
|
|
52
|
-
<script
|
|
53
|
-
src="https://cdn.jsdelivr.net/npm/@oddbird/popover-polyfill@0.7.2/dist/popover.min.js"
|
|
54
|
-
integrity="sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd"
|
|
55
|
-
crossorigin="anonymous"
|
|
56
|
-
defer
|
|
57
|
-
></script>
|
|
51
|
+
<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
58
52
|
<script
|
|
59
53
|
type="module"
|
|
60
|
-
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/
|
|
61
|
-
integrity="sha384-
|
|
54
|
+
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
55
|
+
integrity="sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T"
|
|
62
56
|
crossorigin="anonymous"
|
|
63
|
-
defer
|
|
64
57
|
></script>
|
|
65
58
|
<!-- Zazz behavior: one ES module imports every component script in dependency order -->
|
|
66
59
|
<script type="module" src="../src/index.js"></script>
|
package/examples/products.html
CHANGED
|
@@ -48,19 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
</script>
|
|
50
50
|
<link rel="modulepreload" href="../src/index.js" />
|
|
51
|
-
<!--
|
|
52
|
-
<script
|
|
53
|
-
src="https://cdn.jsdelivr.net/npm/@oddbird/popover-polyfill@0.7.2/dist/popover.min.js"
|
|
54
|
-
integrity="sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd"
|
|
55
|
-
crossorigin="anonymous"
|
|
56
|
-
defer
|
|
57
|
-
></script>
|
|
51
|
+
<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
58
52
|
<script
|
|
59
53
|
type="module"
|
|
60
|
-
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/
|
|
61
|
-
integrity="sha384-
|
|
54
|
+
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
55
|
+
integrity="sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T"
|
|
62
56
|
crossorigin="anonymous"
|
|
63
|
-
defer
|
|
64
57
|
></script>
|
|
65
58
|
<!-- Zazz behavior: one ES module imports every component script in dependency order -->
|
|
66
59
|
<script type="module" src="../src/index.js"></script>
|
package/examples/responsive.html
CHANGED
|
@@ -48,19 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
</script>
|
|
50
50
|
<link rel="modulepreload" href="../src/index.js" />
|
|
51
|
-
<!--
|
|
52
|
-
<script
|
|
53
|
-
src="https://cdn.jsdelivr.net/npm/@oddbird/popover-polyfill@0.7.2/dist/popover.min.js"
|
|
54
|
-
integrity="sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd"
|
|
55
|
-
crossorigin="anonymous"
|
|
56
|
-
defer
|
|
57
|
-
></script>
|
|
51
|
+
<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
58
52
|
<script
|
|
59
53
|
type="module"
|
|
60
|
-
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/
|
|
61
|
-
integrity="sha384-
|
|
54
|
+
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
55
|
+
integrity="sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T"
|
|
62
56
|
crossorigin="anonymous"
|
|
63
|
-
defer
|
|
64
57
|
></script>
|
|
65
58
|
<!-- Zazz behavior: one ES module imports every component script in dependency order -->
|
|
66
59
|
<script type="module" src="../src/index.js"></script>
|
package/package.json
CHANGED
package/src/base/typeahead.js
CHANGED
|
@@ -361,7 +361,7 @@ class TypeaheadElement extends ZazzElement {
|
|
|
361
361
|
* @private
|
|
362
362
|
*/
|
|
363
363
|
#panelOpen() {
|
|
364
|
-
return this.panel?.matches(":popover-open
|
|
364
|
+
return this.panel?.matches(":popover-open") ?? false;
|
|
365
365
|
}
|
|
366
366
|
/**
|
|
367
367
|
* @description Keyboard contract on the search input: arrows/Home/End move
|
package/src/base/typeahead.ts
CHANGED
|
@@ -448,7 +448,7 @@ abstract class TypeaheadElement extends ZazzElement {
|
|
|
448
448
|
* @private
|
|
449
449
|
*/
|
|
450
450
|
#panelOpen(): boolean {
|
|
451
|
-
return this.panel?.matches(":popover-open
|
|
451
|
+
return this.panel?.matches(":popover-open") ?? false;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
/**
|
package/src/head.d.ts
CHANGED
|
@@ -28,10 +28,17 @@ declare function cdnUrl(dep: CdnDependency): string;
|
|
|
28
28
|
*/
|
|
29
29
|
declare const ESM_DEPENDENCIES: readonly CdnDependency[];
|
|
30
30
|
/**
|
|
31
|
-
* Feature polyfills loaded
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
31
|
+
* Feature polyfills loaded ahead of the kit module. Exactly one entry:
|
|
32
|
+
* **Interest Invokers** (`interestfor`), which drives tooltip triggers and the
|
|
33
|
+
* optional hover/focus open on menu, menubar, and navigation-menu. Chromium
|
|
34
|
+
* 142+ ships it; Firefox and Safari do not, so this is the kit's one API below
|
|
35
|
+
* the browser-support floor that a polyfill can cover (ADR-0011).
|
|
36
|
+
*
|
|
37
|
+
* Deliberately *not* polyfilled any more (all native across the support
|
|
38
|
+
* window): the **Popover API** (Chrome 114, Firefox 125, Safari 17, iOS 18.3)
|
|
39
|
+
* and **Invoker Commands** `command`/`commandfor` (Chrome 135, Firefox 144,
|
|
40
|
+
* Safari 26.2). CSS anchor positioning is below the floor but has no polyfill
|
|
41
|
+
* here — the components gate it behind `@supports` instead.
|
|
35
42
|
*/
|
|
36
43
|
declare const POLYFILLS: readonly CdnDependency[];
|
|
37
44
|
/** CDN mode for `buildHead` — kit files served from jsDelivr (ticket 06). */
|
package/src/head.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"head.d.ts","sourceRoot":"","sources":["head.ts"],"names":[],"mappings":"AA8BA,wDAAwD;AACxD,UAAU,aAAa;IACrB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AA2CD;;;;;;GAMG;AACH,iBAAS,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAE1C;AAED;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,EAAE,SAAS,aAAa,EA+B7C,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"head.d.ts","sourceRoot":"","sources":["head.ts"],"names":[],"mappings":"AA8BA,wDAAwD;AACxD,UAAU,aAAa;IACrB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AA2CD;;;;;;GAMG;AACH,iBAAS,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAE1C;AAED;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,EAAE,SAAS,aAAa,EA+B7C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,SAAS,EAAE,SAAS,aAAa,EAOtC,CAAC;AAiFF,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,+BAA+B;AAC/B,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,KAAK,CAAC;IAC1C,kFAAkF;IAClF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,WAAgB,GAAG,MAAM,CAoC3D;AAoGD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AAC/C,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
package/src/head.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @fileoverview Canonical `<head>` contract for Zazz pages.
|
|
4
4
|
* @description The single owner of everything a Zazz page loads before its own
|
|
5
5
|
* content: meta tags, the Geist fonts block, the one `index.css` stylesheet
|
|
6
|
-
* link, the feature
|
|
6
|
+
* link, the feature polyfill, the third-party **import map**, the `index.js`
|
|
7
7
|
* module tag, and the theme-persistence script. The docs preview iframe, the
|
|
8
8
|
* kit's example pages (via `scripts/generate-heads.mjs`), and the docs page
|
|
9
9
|
* that teaches head structure all render from this module: there is no other
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* static package files only (never dynamically generated `/+esm` bundles,
|
|
17
17
|
* as jsDelivr regenerates those when its bundler toolchain updates, which would
|
|
18
18
|
* silently invalidate SRI hashes), `sha384` integrity on every URL. ES modules
|
|
19
|
-
* resolve through the import map;
|
|
19
|
+
* resolve through the import map; the polyfill loads as its own module tag.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* import { buildHead } from "@zazz-ui/core/head";
|
|
@@ -108,23 +108,24 @@ const ESM_DEPENDENCIES = [
|
|
|
108
108
|
},
|
|
109
109
|
];
|
|
110
110
|
/**
|
|
111
|
-
* Feature polyfills loaded
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
111
|
+
* Feature polyfills loaded ahead of the kit module. Exactly one entry:
|
|
112
|
+
* **Interest Invokers** (`interestfor`), which drives tooltip triggers and the
|
|
113
|
+
* optional hover/focus open on menu, menubar, and navigation-menu. Chromium
|
|
114
|
+
* 142+ ships it; Firefox and Safari do not, so this is the kit's one API below
|
|
115
|
+
* the browser-support floor that a polyfill can cover (ADR-0011).
|
|
116
|
+
*
|
|
117
|
+
* Deliberately *not* polyfilled any more (all native across the support
|
|
118
|
+
* window): the **Popover API** (Chrome 114, Firefox 125, Safari 17, iOS 18.3)
|
|
119
|
+
* and **Invoker Commands** `command`/`commandfor` (Chrome 135, Firefox 144,
|
|
120
|
+
* Safari 26.2). CSS anchor positioning is below the floor but has no polyfill
|
|
121
|
+
* here — the components gate it behind `@supports` instead.
|
|
115
122
|
*/
|
|
116
123
|
const POLYFILLS = [
|
|
117
|
-
{
|
|
118
|
-
name: "@oddbird/popover-polyfill",
|
|
119
|
-
version: "0.7.2",
|
|
120
|
-
file: "dist/popover.min.js",
|
|
121
|
-
integrity: "sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd",
|
|
122
|
-
},
|
|
123
124
|
{
|
|
124
125
|
name: "invokers",
|
|
125
126
|
version: "2.2.2",
|
|
126
|
-
file: "dist/esm/production/
|
|
127
|
-
integrity: "sha384-
|
|
127
|
+
file: "dist/esm/production/interest.js",
|
|
128
|
+
integrity: "sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T",
|
|
128
129
|
},
|
|
129
130
|
];
|
|
130
131
|
// --- Head fragments ---
|
|
@@ -165,18 +166,17 @@ ${json}
|
|
|
165
166
|
</script>`;
|
|
166
167
|
}
|
|
167
168
|
/**
|
|
168
|
-
* @description Renders the polyfill script
|
|
169
|
-
*
|
|
170
|
-
*
|
|
169
|
+
* @description Renders the polyfill script tag. The invokers interest build is
|
|
170
|
+
* an ES module, so it is deferred by default and executes in document order —
|
|
171
|
+
* ahead of the `index.js` module tag that follows it.
|
|
171
172
|
*
|
|
172
173
|
* @returns The polyfill markup.
|
|
173
174
|
* @private
|
|
174
175
|
*/
|
|
175
176
|
function polyfillsBlock() {
|
|
176
|
-
const [
|
|
177
|
-
return `<!--
|
|
178
|
-
<script src="${cdnUrl(
|
|
179
|
-
<script type="module" src="${cdnUrl(invokers)}" integrity="${invokers.integrity}" crossorigin="anonymous" defer></script>`;
|
|
177
|
+
const [interest] = POLYFILLS;
|
|
178
|
+
return `<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
179
|
+
<script type="module" src="${cdnUrl(interest)}" integrity="${interest.integrity}" crossorigin="anonymous"></script>`;
|
|
180
180
|
}
|
|
181
181
|
/**
|
|
182
182
|
* The theme-persistence script. Runs inline (no `defer`) while the parser is
|
|
@@ -282,9 +282,8 @@ function cdnBlocks(cdn, scripts) {
|
|
|
282
282
|
// Side-effect modules need their own tag (nothing imports them); the rest
|
|
283
283
|
// of each primitive's chain loads through native relative imports. The
|
|
284
284
|
// core dialog-lifecycle module always leads: dialogs, menus, and popovers
|
|
285
|
-
// assume its lifecycle events.
|
|
286
|
-
// closures — tooltip
|
|
287
|
-
// Invoker Commands.
|
|
285
|
+
// assume its lifecycle events. The polyfill stays in even for css-only
|
|
286
|
+
// closures — tooltip is styles-only but its trigger is `interestfor`.
|
|
288
287
|
const scriptFiles = [
|
|
289
288
|
...new Set([
|
|
290
289
|
"base/dialog-lifecycle.js",
|