@ni/fast-foundation 10.2.1 → 10.2.3

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.
@@ -1,44 +1,44 @@
1
- const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch{return{}}}();void 0===t.trustedTypes&&(t.trustedTypes={createPolicy:(t,e)=>e});const e={configurable:!1,enumerable:!1,writable:!1};void 0===t.FAST&&Reflect.defineProperty(t,"FAST",{value:Object.create(null),...e});const i=t.FAST;if(void 0===i.getById){const t=Object.create(null);Reflect.defineProperty(i,"getById",{value(e,i){let s=t[e];return void 0===s&&(s=i?t[e]=i():null),s},...e})}const s=Object.freeze([]);function o(){const t=new WeakMap;return function(e){let i=t.get(e);if(void 0===i){let s=Reflect.getPrototypeOf(e);for(;void 0===i&&null!==s;)i=t.get(s),s=Reflect.getPrototypeOf(s);i=void 0===i?[]:i.slice(0),t.set(e,i)}return i}}const n=t.FAST.getById(1,(()=>{const e=[],i=[];function s(){if(i.length)throw i.shift()}function o(t){try{t.call()}catch(t){i.push(t),setTimeout(s,0)}}function n(){let t=0;for(;t<e.length;)if(o(e[t]),t++,t>1024){for(let i=0,s=e.length-t;i<s;i++)e[i]=e[i+t];e.length-=t,t=0}e.length=0}return Object.freeze({enqueue:function(i){e.length<1&&t.requestAnimationFrame(n),e.push(i)},process:n})})),r=t.trustedTypes.createPolicy("fast-html",{createHTML:t=>t});let a=r;const l=`fast-${Math.random().toString(36).substring(2,8)}`,h=`${l}{`,d=`}${l}`,c=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(t){if(a!==r)throw new Error("The HTML policy can only be set once.");a=t},createHTML:t=>a.createHTML(t),isMarker:t=>t&&8===t.nodeType&&t.data.startsWith(l),extractDirectiveIndexFromMarker:t=>parseInt(t.data.replace(`${l}:`,"")),createInterpolationPlaceholder:t=>`${h}${t}${d}`,createCustomAttributePlaceholder(t,e){return`${t}="${this.createInterpolationPlaceholder(e)}"`},createBlockPlaceholder:t=>`\x3c!--${l}:${t}--\x3e`,queueUpdate:n.enqueue,processUpdates:n.process,nextUpdate:()=>new Promise(n.enqueue),setAttribute(t,e,i){null==i?t.removeAttribute(e):t.setAttribute(e,i)},setBooleanAttribute(t,e,i){i?t.setAttribute(e,""):t.removeAttribute(e)},removeChildNodes(t){for(let e=t.firstChild;null!==e;e=t.firstChild)t.removeChild(e)},createTemplateWalker:t=>document.createTreeWalker(t,133,null,!1)});class u{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=t,this.sub1=e}has(t){return void 0===this.spillover?this.sub1===t||this.sub2===t:-1!==this.spillover.indexOf(t)}subscribe(t){const e=this.spillover;if(void 0===e){if(this.has(t))return;if(void 0===this.sub1)return void(this.sub1=t);if(void 0===this.sub2)return void(this.sub2=t);this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else{-1===e.indexOf(t)&&e.push(t)}}unsubscribe(t){const e=this.spillover;if(void 0===e)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{const i=e.indexOf(t);-1!==i&&e.splice(i,1)}}notify(t){const e=this.spillover,i=this.source;if(void 0===e){const e=this.sub1,s=this.sub2;void 0!==e&&e.handleChange(i,t),void 0!==s&&s.handleChange(i,t)}else for(let s=0,o=e.length;s<o;++s)e[s].handleChange(i,t)}}class p{constructor(t){this.subscribers={},this.sourceSubscribers=null,this.source=t}notify(t){const e=this.subscribers[t];void 0!==e&&e.notify(t),this.sourceSubscribers?.notify(t)}subscribe(t,e){if(e){let i=this.subscribers[e];void 0===i&&(this.subscribers[e]=i=new u(this.source)),i.subscribe(t)}else this.sourceSubscribers=this.sourceSubscribers??new u(this.source),this.sourceSubscribers.subscribe(t)}unsubscribe(t,e){if(e){const i=this.subscribers[e];void 0!==i&&i.unsubscribe(t)}else this.sourceSubscribers?.unsubscribe(t)}}const m=i.getById(2,(()=>{const t=/(\?\?|:|&&|\|\||if)/,e=new WeakMap,i=c.queueUpdate;let s,n=t=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function r(t){let i=t.$fastController||e.get(t);return void 0===i&&(Array.isArray(t)?i=n(t):e.set(t,i=new p(t))),i}const a=o();class l{constructor(t){this.name=t,this.field=`_${t}`,this.callback=`${t}Changed`}getValue(t){return void 0!==s&&s.watch(t,this.name),t[this.field]}setValue(t,e){const i=this.field,s=t[i];if(s!==e){t[i]=e;const o=t[this.callback];"function"==typeof o&&o.call(t,s,e),r(t).notify(this.name)}}}class h extends u{constructor(t,e,i=!1){super(t,e),this.binding=t,this.isVolatileBinding=i,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(t,e){this.needsRefresh&&null!==this.last&&this.disconnect();const i=s;s=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const o=this.binding(t,e);return s=i,o}disconnect(){if(null!==this.last){let t=this.first;for(;void 0!==t;)t.notifier.unsubscribe(this,t.propertyName),t=t.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(t,e){const i=this.last,o=r(t),n=null===i?this.first:{};if(n.propertySource=t,n.propertyName=e,n.notifier=o,o.subscribe(this,e),null!==i){if(!this.needsRefresh){let e;s=void 0,e=i.propertySource[i.propertyName],s=this,t===e&&(this.needsRefresh=!0)}i.next=n}this.last=n}handleChange(){this.needsQueue&&(this.needsQueue=!1,i(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let t=this.first;return{next:()=>{const e=t;return void 0===e?{value:void 0,done:!0}:(t=t.next,{value:e,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(t){n=t},getNotifier:r,track(t,e){void 0!==s&&s.watch(t,e)},trackVolatile(){void 0!==s&&(s.needsRefresh=!0)},notify(t,e){r(t).notify(e)},defineProperty(t,e){"string"==typeof e&&(e=new l(e)),a(t).push(e),Reflect.defineProperty(t,e.name,{enumerable:!0,get:function(){return e.getValue(this)},set:function(t){e.setValue(this,t)}})},getAccessors:a,binding(t,e,i=this.isVolatileBinding(t)){return new h(t,e,i)},isVolatileBinding:e=>t.test(e.toString())})}));function f(t,e){m.defineProperty(t,e)}function v(t,e,i){return Object.assign({},i,{get:function(){return m.trackVolatile(),i.get.apply(this)}})}const g=i.getById(3,(()=>{let t=null;return{get:()=>t,set(e){t=e}}}));class b{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return g.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(t){g.set(t)}}m.defineProperty(b.prototype,"index"),m.defineProperty(b.prototype,"length");const y=Object.seal(new b);class C{constructor(){this.targetIndex=0}}class x extends C{constructor(){super(...arguments),this.createPlaceholder=c.createInterpolationPlaceholder}}class w extends C{constructor(t,e,i){super(),this.name=t,this.behavior=e,this.options=i}createPlaceholder(t){return c.createCustomAttributePlaceholder(this.name,t)}createBehavior(t){return new this.behavior(t,this.options)}}function $(t,e){this.source=t,this.context=e,null===this.bindingObserver&&(this.bindingObserver=m.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(t,e))}function I(t,e){this.source=t,this.context=e,this.target.addEventListener(this.targetName,this)}function k(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function E(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}function T(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function O(t){c.setAttribute(this.target,this.targetName,t)}function S(t){c.setBooleanAttribute(this.target,this.targetName,t)}function R(t){if(null==t&&(t=""),t.create){this.target.textContent="";let e=this.target.$fastView;void 0===e?e=t.create():this.target.$fastTemplate!==t&&(e.isComposed&&(e.remove(),e.unbind()),e=t.create()),e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.source,this.context)):(e.isComposed=!0,e.bind(this.source,this.context),e.insertBefore(this.target),this.target.$fastView=e,this.target.$fastTemplate=t)}else{const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.isComposed=!1,e.remove(),e.needsBindOnly?e.needsBindOnly=!1:e.unbind()),this.target.textContent=t}}function A(t){this.target[this.targetName]=t}function D(t){const e=this.classVersions||Object.create(null),i=this.target;let s=this.version||0;if(null!=t&&t.length){const o=t.split(/\s+/);for(let t=0,n=o.length;t<n;++t){const n=o[t];""!==n&&(e[n]=s,i.classList.add(n))}}if(this.classVersions=e,this.version=s+1,0!==s){s-=1;for(const t in e)e[t]===s&&i.classList.remove(t)}}class F extends x{constructor(t,e){super(),this.binding=t,this.bind=$,this.unbind=k,this.updateTarget=O,this.isBindingVolatile=e??m.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(t){if(this.originalTargetName=t,void 0!==t)switch(t[0]){case":":if(this.cleanedTargetName=t.substr(1),this.updateTarget=A,"innerHTML"===this.cleanedTargetName){const t=this.binding;this.binding=(e,i)=>c.createHTML(t(e,i))}break;case"?":this.cleanedTargetName=t.substr(1),this.updateTarget=S;break;case"@":this.cleanedTargetName=t.substr(1),this.bind=I,this.unbind=T;break;default:this.cleanedTargetName=t,"class"===t&&(this.updateTarget=D)}}targetAtContent(){this.updateTarget=R,this.unbind=E}createBehavior(t){return new L(t,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class L{constructor(t,e,i,s,o,n,r){this.source=null,this.context=null,this.bindingObserver=null,this.target=t,this.binding=e,this.isBindingVolatile=i,this.bind=s,this.unbind=o,this.updateTarget=n,this.targetName=r}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(t){b.setEvent(t);const e=this.binding(this.source,this.context);b.setEvent(null),!0!==e&&t.preventDefault()}}let P=null;class M{addFactory(t){t.targetIndex=this.targetIndex,this.behaviorFactories.push(t)}captureContentBinding(t){t.targetAtContent(),this.addFactory(t)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){P=this}static borrow(t){const e=P||new M;return e.directives=t,e.reset(),P=null,e}}function V(t){if(1===t.length)return t[0];let e,i=!1;const s=t.length,o=t.map((t=>"string"==typeof t?()=>t:(e=t.targetName||e,i=i||m.isVolatileBinding(t.binding),t.binding))),n=new F(((t,e)=>{let i="";for(let n=0;n<s;++n)i+=o[n](t,e);return i}),i);return n.targetName=e,n}const H=d.length;function z(t,e){const i=e.split(h);if(1===i.length)return null;const s=[];for(let e=0,o=i.length;e<o;++e){const o=i[e],n=o.indexOf(d);let r;if(-1===n)r=o;else{const e=parseInt(o.substring(0,n));s.push(t.directives[e]),r=o.substring(n+H)}""!==r&&s.push(r)}return s}function N(t,e,i=!1){const s=e.attributes;for(let o=0,n=s.length;o<n;++o){const r=s[o],a=r.value,l=z(t,a);let h=null;null===l?i&&(h=new F((()=>a)),h.targetName=r.name):h=V(l),null!==h&&(e.removeAttributeNode(r),o--,n--,t.addFactory(h))}}function B(t,e,i){const s=z(t,e.textContent);if(null!==s){let o=e;for(let n=0,r=s.length;n<r;++n){const r=s[n],a=0===n?e:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);"string"==typeof r?a.textContent=r:(a.textContent=" ",t.captureContentBinding(r)),o=a,t.targetIndex++,a!==e&&i.nextNode()}t.targetIndex--}}function q(t,e){const i=t.content;document.adoptNode(i);const s=M.borrow(e);N(s,t,!0);const o=s.behaviorFactories;s.reset();const n=c.createTemplateWalker(i);let r;for(;r=n.nextNode();)switch(s.targetIndex++,r.nodeType){case 1:N(s,r);break;case 3:B(s,r,n);break;case 8:c.isMarker(r)&&s.addFactory(e[c.extractDirectiveIndexFromMarker(r)])}let a=0;(c.isMarker(i.firstChild)||1===i.childNodes.length&&e.length)&&(i.insertBefore(document.createComment(""),i.firstChild),a=-1);const l=s.behaviorFactories;return s.release(),{fragment:i,viewBehaviorFactories:l,hostBehaviorFactories:o,targetOffset:a}}const U=document.createRange();class _{constructor(t,e){this.fragment=t,this.behaviors=e,this.source=null,this.context=null,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{const e=this.lastChild;if(t.previousSibling===e)return;const i=t.parentNode;let s,o=this.firstChild;for(;o!==e;)s=o.nextSibling,i.insertBefore(o,t),o=s;i.insertBefore(e,t)}}remove(){const t=this.fragment,e=this.lastChild;let i,s=this.firstChild;for(;s!==e;)i=s.nextSibling,t.appendChild(s),s=i;t.appendChild(e)}dispose(){const t=this.firstChild.parentNode,e=this.lastChild;let i,s=this.firstChild;for(;s!==e;)i=s.nextSibling,t.removeChild(s),s=i;t.removeChild(e);const o=this.behaviors,n=this.source;for(let t=0,e=o.length;t<e;++t)o[t].unbind(n)}bind(t,e){const i=this.behaviors;if(this.source!==t)if(null!==this.source){const s=this.source;this.source=t,this.context=e;for(let o=0,n=i.length;o<n;++o){const n=i[o];n.unbind(s),n.bind(t,e)}}else{this.source=t,this.context=e;for(let s=0,o=i.length;s<o;++s)i[s].bind(t,e)}}unbind(){if(null===this.source)return;const t=this.behaviors,e=this.source;for(let i=0,s=t.length;i<s;++i)t[i].unbind(e);this.source=null}static disposeContiguousBatch(t){if(0!==t.length){U.setStartBefore(t[0].firstChild),U.setEndAfter(t[t.length-1].lastChild),U.deleteContents();for(let e=0,i=t.length;e<i;++e){const i=t[e],s=i.behaviors,o=i.source;for(let t=0,e=s.length;t<e;++t)s[t].unbind(o)}}}}class j{constructor(t,e){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=t,this.directives=e}create(t){if(null===this.fragment){let t;const e=this.html;if("string"==typeof e){t=document.createElement("template"),t.innerHTML=c.createHTML(e);const i=t.content.firstElementChild;null!==i&&"TEMPLATE"===i.tagName&&(t=i)}else t=e;const i=q(t,this.directives);this.fragment=i.fragment,this.viewBehaviorFactories=i.viewBehaviorFactories,this.hostBehaviorFactories=i.hostBehaviorFactories,this.targetOffset=i.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const e=this.fragment.cloneNode(!0),i=this.viewBehaviorFactories,s=new Array(this.behaviorCount),o=c.createTemplateWalker(e);let n=0,r=this.targetOffset,a=o.nextNode();for(let t=i.length;n<t;++n){const t=i[n],e=t.targetIndex;for(;null!==a;){if(r===e){s[n]=t.createBehavior(a);break}a=o.nextNode(),r++}}if(this.hasHostBehaviors){const e=this.hostBehaviorFactories;for(let i=0,o=e.length;i<o;++i,++n)s[n]=e[i].createBehavior(t)}return new _(e,s)}render(t,e,i){"string"==typeof e&&(e=document.getElementById(e)),void 0===i&&(i=e);const s=this.create(i);return s.bind(t,y),s.appendTo(e),s}}const W=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function K(t,...e){const i=[];let s="";for(let o=0,n=t.length-1;o<n;++o){const n=t[o];let r=e[o];if(s+=n,r instanceof j){const t=r;r=()=>t}if("function"==typeof r&&(r=new F(r)),r instanceof x){const t=W.exec(n);null!==t&&(r.targetName=t[2])}r instanceof C?(s+=r.createPlaceholder(i.length),i.push(r)):s+=r}return s+=t[t.length-1],new j(s,i)}class Y{constructor(){this.targets=new WeakSet}addStylesTo(t){this.targets.add(t)}removeStylesFrom(t){this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=null===this.behaviors?t:this.behaviors.concat(t),this}static{this.create=(()=>{if(c.supportsAdoptedStyleSheets){const t=new Map;return e=>new et(e,t)}return t=>new st(t)})()}}function X(t){return t.map((t=>t instanceof Y?X(t.styles):[t])).reduce(((t,e)=>t.concat(e)),[])}function G(t){return t.map((t=>t instanceof Y?t.behaviors:null)).reduce(((t,e)=>null===e?t:(null===t&&(t=[]),t.concat(e))),null)}const Q=Symbol("prependToAdoptedStyleSheets");function Z(t){const e=[],i=[];return t.forEach((t=>(t[Q]?e:i).push(t))),{prepend:e,append:i}}let J=(t,e)=>{const{prepend:i,append:s}=Z(e);t.adoptedStyleSheets=[...i,...t.adoptedStyleSheets,...s]},tt=(t,e)=>{t.adoptedStyleSheets=t.adoptedStyleSheets.filter((t=>-1===e.indexOf(t)))};if(c.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),J=(t,e)=>{const{prepend:i,append:s}=Z(e);t.adoptedStyleSheets.splice(0,0,...i),t.adoptedStyleSheets.push(...s)},tt=(t,e)=>{for(const i of e){const e=t.adoptedStyleSheets.indexOf(i);-1!==e&&t.adoptedStyleSheets.splice(e,1)}}}catch{}class et extends Y{get styleSheets(){if(void 0===this._styleSheets){const t=this.styles,e=this.styleSheetCache;this._styleSheets=X(t).map((t=>{if(t instanceof CSSStyleSheet)return t;let i=e.get(t);return void 0===i&&(i=new CSSStyleSheet,i.replaceSync(t),e.set(t,i)),i}))}return this._styleSheets}constructor(t,e){super(),this.styles=t,this.styleSheetCache=e,this._styleSheets=void 0,this.behaviors=G(t)}addStylesTo(t){J(t,this.styleSheets),super.addStylesTo(t)}removeStylesFrom(t){tt(t,this.styleSheets),super.removeStylesFrom(t)}}let it=0;class st extends Y{constructor(t){super(),this.styles=t,this.behaviors=null,this.behaviors=G(t),this.styleSheets=X(t),this.styleClass="fast-style-class-"+ ++it}addStylesTo(t){const e=this.styleSheets,i=this.styleClass;t=this.normalizeTarget(t);for(let s=0;s<e.length;s++){const o=document.createElement("style");o.innerHTML=e[s],o.className=i,t.append(o)}super.addStylesTo(t)}removeStylesFrom(t){const e=(t=this.normalizeTarget(t)).querySelectorAll(`.${this.styleClass}`);for(let i=0,s=e.length;i<s;++i)t.removeChild(e[i]);super.removeStylesFrom(t)}isAttachedTo(t){return super.isAttachedTo(this.normalizeTarget(t))}normalizeTarget(t){return t===document?document.body:t}}const ot=Object.freeze({locate:o()}),nt={toView:t=>t?"true":"false",fromView:t=>null!=t&&"false"!==t&&!1!==t&&0!==t},rt={toView(t){if(null==t)return null;const e=1*t;return isNaN(e)?null:e.toString()},fromView(t){if(null==t)return null;const e=1*t;return isNaN(e)?null:e}};class at{constructor(t,e,i=e.toLowerCase(),s="reflect",o){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=i,this.mode=s,this.converter=o,this.fieldName=`_${e}`,this.callbackName=`${e}Changed`,this.hasCallback=this.callbackName in t.prototype,"boolean"===s&&void 0===o&&(this.converter=nt)}setValue(t,e){const i=t[this.fieldName],s=this.converter;void 0!==s&&(e=s.fromView(e)),i!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](i,e),t.$fastController.notify(this.name))}getValue(t){return m.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){const e=this.mode,i=this.guards;i.has(t)||"fromView"===e||c.queueUpdate((()=>{i.add(t);const s=t[this.fieldName];switch(e){case"reflect":const e=this.converter;c.setAttribute(t,this.attribute,void 0!==e?e.toView(s):s);break;case"boolean":c.setBooleanAttribute(t,this.attribute,s)}i.delete(t)}))}static collect(t,...e){const i=[];e.push(ot.locate(t));for(let s=0,o=e.length;s<o;++s){const o=e[s];if(void 0!==o)for(let e=0,s=o.length;e<s;++e){const s=o[e];"string"==typeof s?i.push(new at(t,s)):i.push(new at(t,s.property,s.attribute,s.mode,s.converter))}}return i}}function lt(t,e){let i;function s(t,e){arguments.length>1&&(i.property=e),ot.locate(t.constructor).push(i)}return arguments.length>1?(i={},void s(t,e)):(i=void 0===t?{}:t,s)}const ht={mode:"open"},dt={},ct=i.getById(4,(()=>{const t=new Map;return Object.freeze({register:e=>!t.has(e.type)&&(t.set(e.type,e),!0),getByType:e=>t.get(e)})}));class ut{get isDefined(){return!!ct.getByType(this.type)}constructor(t,e=t.definition){"string"==typeof e&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template;const i=at.collect(t,e.attributes),s=new Array(i.length),o={},n={};for(let t=0,e=i.length;t<e;++t){const e=i[t];s[t]=e.attribute,o[e.name]=e,n[e.attribute]=e}this.attributes=i,this.observedAttributes=s,this.propertyLookup=o,this.attributeLookup=n,this.shadowOptions=void 0===e.shadowOptions?ht:null===e.shadowOptions?void 0:{...ht,...e.shadowOptions},this.elementOptions=void 0===e.elementOptions?dt:{...dt,...e.elementOptions},this.styles=void 0===e.styles?void 0:Array.isArray(e.styles)?Y.create(e.styles):e.styles instanceof Y?e.styles:Y.create([e.styles])}define(t=customElements){const e=this.type;if(ct.register(this)){const t=this.attributes,i=e.prototype;for(let e=0,s=t.length;e<s;++e)m.defineProperty(i,t[e]);Reflect.defineProperty(e,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return t.get(this.name)||t.define(this.name,e,this.elementOptions),this}static{this.forType=ct.getByType}}const pt=new WeakMap,mt={bubbles:!0,composed:!0,cancelable:!0};function ft(t){return t.shadowRoot||pt.get(t)||null}class vt extends p{get isConnected(){return m.track(this,"isConnected"),this._isConnected}setIsConnected(t){this._isConnected=t,m.notify(this,"isConnected")}get template(){return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get styles(){return this._styles}set styles(t){this._styles!==t&&(null!==this._styles&&this.removeStyles(this._styles),this._styles=t,this.needsInitialization||null===t||this.addStyles(t))}constructor(t,e){super(t),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=t,this.definition=e;const i=e.shadowOptions;if(void 0!==i){const e=t.attachShadow(i);"closed"===i.mode&&pt.set(t,e)}const s=m.getAccessors(t);if(s.length>0){const e=this.boundObservables=Object.create(null);for(let i=0,o=s.length;i<o;++i){const o=s[i].name,n=t[o];void 0!==n&&(delete t[o],e[o]=n)}}}addStyles(t){const e=ft(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.append(t);else if(!t.isAttachedTo(e)){const i=t.behaviors;t.addStylesTo(e),null!==i&&this.addBehaviors(i)}}removeStyles(t){const e=ft(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.removeChild(t);else if(t.isAttachedTo(e)){const i=t.behaviors;t.removeStylesFrom(e),null!==i&&this.removeBehaviors(i)}}addBehaviors(t){const e=this.behaviors||(this.behaviors=new Map),i=t.length,s=[];for(let o=0;o<i;++o){const i=t[o];e.has(i)?e.set(i,e.get(i)+1):(e.set(i,1),s.push(i))}if(this._isConnected){const t=this.element;for(let e=0;e<s.length;++e)s[e].bind(t,y)}}removeBehaviors(t,e=!1){const i=this.behaviors;if(null===i)return;const s=t.length,o=[];for(let n=0;n<s;++n){const s=t[n];if(i.has(s)){const t=i.get(s)-1;0===t||e?i.delete(s)&&o.push(s):i.set(s,t)}}if(this._isConnected){const t=this.element;for(let e=0;e<o.length;++e)o[e].unbind(t)}}onConnectedCallback(){if(this._isConnected)return;const t=this.element;this.needsInitialization?this.finishInitialization():null!==this.view&&this.view.bind(t,y);const e=this.behaviors;if(null!==e)for(const[i]of e)i.bind(t,y);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const t=this.view;null!==t&&t.unbind();const e=this.behaviors;if(null!==e){const t=this.element;for(const[i]of e)i.unbind(t)}}onAttributeChangedCallback(t,e,i){const s=this.definition.attributeLookup[t];void 0!==s&&s.onAttributeChangedCallback(this.element,i)}emit(t,e,i){return!!this._isConnected&&this.element.dispatchEvent(new CustomEvent(t,{detail:e,...mt,...i}))}finishInitialization(){const t=this.element,e=this.boundObservables;if(null!==e){const i=Object.keys(e);for(let s=0,o=i.length;s<o;++s){const o=i[s];t[o]=e[o]}this.boundObservables=null}const i=this.definition;null===this._template&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():i.template&&(this._template=i.template||null)),null!==this._template&&this.renderTemplate(this._template),null===this._styles&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():i.styles&&(this._styles=i.styles||null)),null!==this._styles&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(t){const e=this.element,i=ft(e)||e;null!==this.view?(this.view.dispose(),this.view=null):this.needsInitialization||c.removeChildNodes(i),t&&(this.view=t.render(e,i,e))}static forCustomElement(t){const e=t.$fastController;if(void 0!==e)return e;const i=ut.forType(t.constructor);if(void 0===i)throw new Error("Missing FASTElement definition.");return t.$fastController=new vt(t,i)}}function gt(t){return class extends t{constructor(){super(),vt.forCustomElement(this)}$emit(t,e,i){return this.$fastController.emit(t,e,i)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(t,e,i){this.$fastController.onAttributeChangedCallback(t,e,i)}}}const bt=Object.assign(gt(HTMLElement),{from:t=>gt(t),define:(t,e)=>new ut(t,e).define().type});function yt(t){return function(e){new ut(e,t).define()}}class Ct{createCSS(){return""}createBehavior(){}}function xt(t,e){const i=[];let s="";const o=[];for(let n=0,r=t.length-1;n<r;++n){s+=t[n];let r=e[n];if(r instanceof Ct){const t=r.createBehavior();r=r.createCSS(),t&&o.push(t)}r instanceof Y||r instanceof CSSStyleSheet?(""!==s.trim()&&(i.push(s),s=""),i.push(r)):s+=r}return s+=t[t.length-1],""!==s.trim()&&i.push(s),{styles:i,behaviors:o}}function wt(t,...e){const{styles:i,behaviors:s}=xt(t,e),o=Y.create(i);return s.length&&o.withBehaviors(...s),o}class $t extends Ct{constructor(t,e){super(),this.behaviors=e,this.css="";const i=t.reduce(((t,e)=>("string"==typeof e?this.css+=e:t.push(e),t)),[]);i.length&&(this.styles=Y.create(i))}createBehavior(){return this}createCSS(){return this.css}bind(t){this.styles&&t.$fastController.addStyles(this.styles),this.behaviors.length&&t.$fastController.addBehaviors(this.behaviors)}unbind(t){this.styles&&t.$fastController.removeStyles(this.styles),this.behaviors.length&&t.$fastController.removeBehaviors(this.behaviors)}}function It(t,...e){const{styles:i,behaviors:s}=xt(t,e);return new $t(i,s)}function kt(t,e,i){return{index:t,removed:e,addedCount:i}}function Et(t,e,i,o,n,r){let a=0,l=0;const h=Math.min(i-e,r-n);if(0===e&&0===n&&(a=function(t,e,i){for(let s=0;s<i;++s)if(t[s]!==e[s])return s;return i}(t,o,h)),i===t.length&&r===o.length&&(l=function(t,e,i){let s=t.length,o=e.length,n=0;for(;n<i&&t[--s]===e[--o];)n++;return n}(t,o,h-a)),n+=a,r-=l,(i-=l)-(e+=a)===0&&r-n===0)return s;if(e===i){const t=kt(e,[],0);for(;n<r;)t.removed.push(o[n++]);return[t]}if(n===r)return[kt(e,[],i-e)];const d=function(t){let e=t.length-1,i=t[0].length-1,s=t[e][i];const o=[];for(;e>0||i>0;){if(0===e){o.push(2),i--;continue}if(0===i){o.push(3),e--;continue}const n=t[e-1][i-1],r=t[e-1][i],a=t[e][i-1];let l;l=r<a?r<n?r:n:a<n?a:n,l===n?(n===s?o.push(0):(o.push(1),s=n),e--,i--):l===r?(o.push(3),e--,s=r):(o.push(2),i--,s=a)}return o.reverse(),o}(function(t,e,i,s,o,n){const r=n-o+1,a=i-e+1,l=new Array(r);let h,d;for(let t=0;t<r;++t)l[t]=new Array(a),l[t][0]=t;for(let t=0;t<a;++t)l[0][t]=t;for(let i=1;i<r;++i)for(let n=1;n<a;++n)t[e+n-1]===s[o+i-1]?l[i][n]=l[i-1][n-1]:(h=l[i-1][n]+1,d=l[i][n-1]+1,l[i][n]=h<d?h:d);return l}(t,e,i,o,n,r)),c=[];let u,p=e,m=n;for(let t=0;t<d.length;++t)switch(d[t]){case 0:void 0!==u&&(c.push(u),u=void 0),p++,m++;break;case 1:void 0===u&&(u=kt(p,[],0)),u.addedCount++,p++,u.removed.push(o[m]),m++;break;case 2:void 0===u&&(u=kt(p,[],0)),u.addedCount++,p++;break;case 3:void 0===u&&(u=kt(p,[],0)),u.removed.push(o[m]),m++}return void 0!==u&&c.push(u),c}const Tt=Array.prototype.push;function Ot(t,e,i,s){const o=kt(e,i,s);let n=!1,r=0;for(let e=0;e<t.length;e++){const i=t[e];if(i.index+=r,n)continue;const s=(a=o.index,l=o.index+o.removed.length,h=i.index,d=i.index+i.addedCount,l<h||d<a?-1:l===h||d===a?0:a<h?l<d?l-h:d-h:d<l?d-a:l-a);if(s>=0){t.splice(e,1),e--,r-=i.addedCount-i.removed.length,o.addedCount+=i.addedCount-s;const a=o.removed.length+i.removed.length-s;if(o.addedCount||a){let t=i.removed;if(o.index<i.index){const e=o.removed.slice(0,i.index-o.index);Tt.apply(e,t),t=e}if(o.index+o.removed.length>i.index+i.addedCount){const e=o.removed.slice(i.index+i.addedCount-o.index);Tt.apply(t,e)}o.removed=t,i.index<o.index&&(o.index=i.index)}else n=!0}else if(o.index<i.index){n=!0,t.splice(e,0,o),e++;const s=o.addedCount-o.removed.length;i.index+=s,r+=s}}var a,l,h,d;n||t.push(o)}function St(t,e){let i=[];const s=function(t){const e=[];for(let i=0,s=t.length;i<s;i++){const s=t[i];Ot(e,s.index,s.removed,s.addedCount)}return e}(e);for(let e=0,o=s.length;e<o;++e){const o=s[e];1!==o.addedCount||1!==o.removed.length?i=i.concat(Et(t,o.index,o.index+o.addedCount,o.removed,0,o.removed.length)):o.removed[0]!==t[o.index]&&i.push(o)}return i}let Rt=!1;function At(t,e){let i=t.index;const s=e.length;return i>s?i=s-t.addedCount:i<0&&(i=s+t.removed.length+i-t.addedCount),i<0&&(i=0),t.index=i,t}class Dt extends u{constructor(t){super(t),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(t,"$fastController",{value:this,enumerable:!1})}subscribe(t){this.flush(),super.subscribe(t)}addSplice(t){void 0===this.splices?this.splices=[t]:this.splices.push(t),this.needsQueue&&(this.needsQueue=!1,c.queueUpdate(this))}reset(t){this.oldCollection=t,this.needsQueue&&(this.needsQueue=!1,c.queueUpdate(this))}flush(){const t=this.splices,e=this.oldCollection;if(void 0===t&&void 0===e)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const i=void 0===e?St(this.source,t):Et(this.source,0,this.source.length,e,0,e.length);this.notify(i)}}function Ft(){if(Rt)return;Rt=!0,m.setArrayObserverFactory((t=>new Dt(t)));const t=Array.prototype;if(t.$fastPatch)return;Reflect.defineProperty(t,"$fastPatch",{value:1,enumerable:!1});const e=t.pop,i=t.push,s=t.reverse,o=t.shift,n=t.sort,r=t.splice,a=t.unshift;t.pop=function(){const t=this.length>0,i=e.apply(this,arguments),s=this.$fastController;return void 0!==s&&t&&s.addSplice(kt(this.length,[i],0)),i},t.push=function(){const t=i.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(At(kt(this.length-arguments.length,[],arguments.length),this)),t},t.reverse=function(){let t;const e=this.$fastController;void 0!==e&&(e.flush(),t=this.slice());const i=s.apply(this,arguments);return void 0!==e&&e.reset(t),i},t.shift=function(){const t=this.length>0,e=o.apply(this,arguments),i=this.$fastController;return void 0!==i&&t&&i.addSplice(kt(0,[e],0)),e},t.sort=function(){let t;const e=this.$fastController;void 0!==e&&(e.flush(),t=this.slice());const i=n.apply(this,arguments);return void 0!==e&&e.reset(t),i},t.splice=function(){const t=r.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(At(kt(+arguments[0],t,arguments.length>2?arguments.length-2:0),this)),t},t.unshift=function(){const t=a.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(At(kt(0,[],arguments.length),this)),t}}class Lt{constructor(t,e){this.target=t,this.propertyName=e}bind(t){t[this.propertyName]=this.target}unbind(){}}function Pt(t){return new w("fast-ref",Lt,t)}const Mt=t=>"function"==typeof t,Vt=()=>null;function Ht(t){return void 0===t?Vt:Mt(t)?t:()=>t}function zt(t,e,i){const s=Mt(t)?t:()=>t,o=Ht(e),n=Ht(i);return(t,e)=>s(t,e)?o(t,e):n(t,e)}const Nt=Object.freeze({positioning:!1,recycle:!0});function Bt(t,e,i,s){t.bind(e[i],s)}function qt(t,e,i,s){const o=Object.create(s);o.index=i,o.length=e.length,t.bind(e[i],o)}class Ut{constructor(t,e,i,s,o,n){this.location=t,this.itemsBinding=e,this.templateBinding=s,this.options=n,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=Bt,this.itemsBindingObserver=m.binding(e,this,i),this.templateBindingObserver=m.binding(s,this,o),n.positioning&&(this.bindView=qt)}bind(t,e){this.source=t,this.originalContext=e,this.childContext=Object.create(e),this.childContext.parent=t,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(t,this.originalContext),this.template=this.templateBindingObserver.observe(t,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(t,e){t===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):t===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(e)}observeItems(t=!1){if(!this.items)return void(this.items=s);const e=this.itemsObserver,i=this.itemsObserver=m.getNotifier(this.items),o=e!==i;o&&null!==e&&e.unsubscribe(this),(o||t)&&i.subscribe(this)}updateViews(t){const e=this.childContext,i=this.views,s=this.bindView,o=this.items,n=this.template,r=this.options.recycle,a=[];let l=0,h=0;for(let d=0,c=t.length;d<c;++d){const c=t[d],u=c.removed;let p=0,m=c.index;const f=m+c.addedCount,v=i.splice(c.index,u.length),g=h=a.length+v.length;for(;m<f;++m){const t=i[m],d=t?t.firstChild:this.location;let c;r&&h>0?(p<=g&&v.length>0?(c=v[p],p++):(c=a[l],l++),h--):c=n.create(),i.splice(m,0,c),s(c,o,m,e),c.insertBefore(d)}v[p]&&a.push(...v.slice(p))}for(let t=l,e=a.length;t<e;++t)a[t].dispose();if(this.options.positioning)for(let t=0,e=i.length;t<e;++t){const s=i[t].context;s.length=e,s.index=t}}refreshAllViews(t=!1){const e=this.items,i=this.childContext,s=this.template,o=this.location,n=this.bindView;let r=e.length,a=this.views,l=a.length;if(0!==r&&!t&&this.options.recycle||(_.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(r);for(let t=0;t<r;++t){const r=s.create();n(r,e,t,i),a[t]=r,r.insertBefore(o)}}else{let t=0;for(;t<r;++t)if(t<l){n(a[t],e,t,i)}else{const r=s.create();n(r,e,t,i),a.push(r),r.insertBefore(o)}const h=a.splice(t,l-t);for(t=0,r=h.length;t<r;++t)h[t].dispose()}}unbindAllViews(){const t=this.views;for(let e=0,i=t.length;e<i;++e)t[e].unbind()}}class _t extends C{constructor(t,e,i){super(),this.itemsBinding=t,this.templateBinding=e,this.options=i,this.createPlaceholder=c.createBlockPlaceholder,Ft(),this.isItemsBindingVolatile=m.isVolatileBinding(t),this.isTemplateBindingVolatile=m.isVolatileBinding(e)}createBehavior(t){return new Ut(t,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function jt(t,e,i=Nt){return new _t(t,"function"==typeof e?e:()=>e,{...Nt,...i})}function Wt(t){return t?function(e,i,s){return 1===e.nodeType&&e.matches(t)}:function(t,e,i){return 1===t.nodeType}}class Kt{constructor(t,e){this.target=t,this.options=e,this.source=null}bind(t){const e=this.options.property;this.shouldUpdate=m.getAccessors(t).some((t=>t.name===e)),this.source=t,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(s),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let t=this.getNodes();return void 0!==this.options.filter&&(t=t.filter(this.options.filter)),t}updateTarget(t){this.source[this.options.property]=t}}class Yt extends Kt{constructor(t,e){super(t,e)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}}function Xt(t){return"string"==typeof t&&(t={property:t}),new w("fast-slotted",Yt,t)}class Gt extends Kt{constructor(t,e){super(t,e),this.observer=null,e.childList=!0}observe(){null===this.observer&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function Qt(t){return"string"==typeof t&&(t={property:t}),new w("fast-children",Gt,t)}class Zt{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}}const Jt=(t,e)=>K`
1
+ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch{return{}}}();void 0===t.trustedTypes&&(t.trustedTypes={createPolicy:(t,e)=>e});const e={configurable:!1,enumerable:!1,writable:!1};void 0===t.FAST&&Reflect.defineProperty(t,"FAST",{value:Object.create(null),...e});const i=t.FAST;if(void 0===i.getById){const t=Object.create(null);Reflect.defineProperty(i,"getById",{value(e,i){let s=t[e];return void 0===s&&(s=i?t[e]=i():null),s},...e})}const s=Object.freeze([]);function o(){const t=new WeakMap;return function(e){let i=t.get(e);if(void 0===i){let s=Reflect.getPrototypeOf(e);for(;void 0===i&&null!==s;)i=t.get(s),s=Reflect.getPrototypeOf(s);i=void 0===i?[]:i.slice(0),t.set(e,i)}return i}}const n=t.FAST.getById(1,(()=>{const e=[],i=[];function s(){if(i.length)throw i.shift()}function o(t){try{t.call()}catch(t){i.push(t),setTimeout(s,0)}}function n(){let t=0;for(;t<e.length;)if(o(e[t]),t++,t>1024){for(let i=0,s=e.length-t;i<s;i++)e[i]=e[i+t];e.length-=t,t=0}e.length=0}return Object.freeze({enqueue:function(i){e.length<1&&t.requestAnimationFrame(n),e.push(i)},process:n})})),r=t.trustedTypes.createPolicy("fast-html",{createHTML:t=>t});let a=r;const l=`fast-${Math.random().toString(36).substring(2,8)}`,h=`${l}{`,d=`}${l}`,c=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(t){if(a!==r)throw new Error("The HTML policy can only be set once.");a=t},createHTML:t=>a.createHTML(t),isMarker:t=>t&&8===t.nodeType&&t.data.startsWith(l),extractDirectiveIndexFromMarker:t=>parseInt(t.data.replace(`${l}:`,"")),createInterpolationPlaceholder:t=>`${h}${t}${d}`,createCustomAttributePlaceholder(t,e){return`${t}="${this.createInterpolationPlaceholder(e)}"`},createBlockPlaceholder:t=>`\x3c!--${l}:${t}--\x3e`,queueUpdate:n.enqueue,processUpdates:n.process,nextUpdate:()=>new Promise(n.enqueue),setAttribute(t,e,i){null==i?t.removeAttribute(e):t.setAttribute(e,i)},setBooleanAttribute(t,e,i){i?t.setAttribute(e,""):t.removeAttribute(e)},removeChildNodes(t){for(let e=t.firstChild;null!==e;e=t.firstChild)t.removeChild(e)},createTemplateWalker:t=>document.createTreeWalker(t,133,null,!1)});class u{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=t,this.sub1=e}has(t){return void 0===this.spillover?this.sub1===t||this.sub2===t:-1!==this.spillover.indexOf(t)}subscribe(t){const e=this.spillover;if(void 0===e){if(this.has(t))return;if(void 0===this.sub1)return void(this.sub1=t);if(void 0===this.sub2)return void(this.sub2=t);this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else{-1===e.indexOf(t)&&e.push(t)}}unsubscribe(t){const e=this.spillover;if(void 0===e)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{const i=e.indexOf(t);-1!==i&&e.splice(i,1)}}notify(t){const e=this.spillover,i=this.source;if(void 0===e){const e=this.sub1,s=this.sub2;void 0!==e&&e.handleChange(i,t),void 0!==s&&s.handleChange(i,t)}else for(let s=0,o=e.length;s<o;++s)e[s].handleChange(i,t)}}class p{constructor(t){this.subscribers={},this.sourceSubscribers=null,this.source=t}notify(t){const e=this.subscribers[t];void 0!==e&&e.notify(t),this.sourceSubscribers?.notify(t)}subscribe(t,e){if(e){let i=this.subscribers[e];void 0===i&&(this.subscribers[e]=i=new u(this.source)),i.subscribe(t)}else this.sourceSubscribers=this.sourceSubscribers??new u(this.source),this.sourceSubscribers.subscribe(t)}unsubscribe(t,e){if(e){const i=this.subscribers[e];void 0!==i&&i.unsubscribe(t)}else this.sourceSubscribers?.unsubscribe(t)}}const m=i.getById(2,(()=>{const t=/(\?\?|:|&&|\|\||if)/,e=new WeakMap,i=c.queueUpdate;let s,n=t=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function r(t){let i=t.$fastController||e.get(t);return void 0===i&&(Array.isArray(t)?i=n(t):e.set(t,i=new p(t))),i}const a=o();class l{constructor(t){this.name=t,this.field=`_${t}`,this.callback=`${t}Changed`}getValue(t){return void 0!==s&&s.watch(t,this.name),t[this.field]}setValue(t,e){const i=this.field,s=t[i];if(s!==e){t[i]=e;const o=t[this.callback];"function"==typeof o&&o.call(t,s,e),r(t).notify(this.name)}}}class h extends u{constructor(t,e,i=!1){super(t,e),this.binding=t,this.isVolatileBinding=i,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(t,e){this.needsRefresh&&null!==this.last&&this.disconnect();const i=s;s=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const o=this.binding(t,e);return s=i,o}disconnect(){if(null!==this.last){let t=this.first;for(;void 0!==t;)t.notifier.unsubscribe(this,t.propertyName),t=t.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(t,e){const i=this.last,o=r(t),n=null===i?this.first:{};if(n.propertySource=t,n.propertyName=e,n.notifier=o,o.subscribe(this,e),null!==i){if(!this.needsRefresh){let e;s=void 0,e=i.propertySource[i.propertyName],s=this,t===e&&(this.needsRefresh=!0)}i.next=n}this.last=n}handleChange(){this.needsQueue&&(this.needsQueue=!1,i(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let t=this.first;return{next:()=>{const e=t;return void 0===e?{value:void 0,done:!0}:(t=t.next,{value:e,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(t){n=t},getNotifier:r,track(t,e){void 0!==s&&s.watch(t,e)},trackVolatile(){void 0!==s&&(s.needsRefresh=!0)},notify(t,e){r(t).notify(e)},defineProperty(t,e){"string"==typeof e&&(e=new l(e)),a(t).push(e),Reflect.defineProperty(t,e.name,{enumerable:!0,get:function(){return e.getValue(this)},set:function(t){e.setValue(this,t)}})},getAccessors:a,binding(t,e,i=this.isVolatileBinding(t)){return new h(t,e,i)},isVolatileBinding:e=>t.test(e.toString())})}));function f(t,e){m.defineProperty(t,e)}function v(t,e,i){return Object.assign({},i,{get:function(){return m.trackVolatile(),i.get.apply(this)}})}const g=i.getById(3,(()=>{let t=null;return{get:()=>t,set(e){t=e}}}));class b{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return g.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(t){g.set(t)}}m.defineProperty(b.prototype,"index"),m.defineProperty(b.prototype,"length");const y=Object.seal(new b);class C{constructor(){this.targetIndex=0}}class x extends C{constructor(){super(...arguments),this.createPlaceholder=c.createInterpolationPlaceholder}}class w extends C{constructor(t,e,i){super(),this.name=t,this.behavior=e,this.options=i}createPlaceholder(t){return c.createCustomAttributePlaceholder(this.name,t)}createBehavior(t){return new this.behavior(t,this.options)}}function $(t,e){this.source=t,this.context=e,null===this.bindingObserver&&(this.bindingObserver=m.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(t,e))}function I(t,e){this.source=t,this.context=e,this.target.addEventListener(this.targetName,this)}function k(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function E(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}function T(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function O(t){c.setAttribute(this.target,this.targetName,t)}function S(t){c.setBooleanAttribute(this.target,this.targetName,t)}function R(t){if(null==t&&(t=""),t.create){this.target.textContent="";let e=this.target.$fastView;void 0===e?e=t.create():this.target.$fastTemplate!==t&&(e.isComposed&&(e.remove(),e.unbind()),e=t.create()),e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.source,this.context)):(e.isComposed=!0,e.bind(this.source,this.context),e.insertBefore(this.target),this.target.$fastView=e,this.target.$fastTemplate=t)}else{const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.isComposed=!1,e.remove(),e.needsBindOnly?e.needsBindOnly=!1:e.unbind()),this.target.textContent=t}}function D(t){this.target[this.targetName]=t}function A(t){const e=this.classVersions||Object.create(null),i=this.target;let s=this.version||0;if(null!=t&&t.length){const o=t.split(/\s+/);for(let t=0,n=o.length;t<n;++t){const n=o[t];""!==n&&(e[n]=s,i.classList.add(n))}}if(this.classVersions=e,this.version=s+1,0!==s){s-=1;for(const t in e)e[t]===s&&i.classList.remove(t)}}class F extends x{constructor(t,e){super(),this.binding=t,this.bind=$,this.unbind=k,this.updateTarget=O,this.isBindingVolatile=e??m.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(t){if(this.originalTargetName=t,void 0!==t)switch(t[0]){case":":if(this.cleanedTargetName=t.substr(1),this.updateTarget=D,"innerHTML"===this.cleanedTargetName){const t=this.binding;this.binding=(e,i)=>c.createHTML(t(e,i))}break;case"?":this.cleanedTargetName=t.substr(1),this.updateTarget=S;break;case"@":this.cleanedTargetName=t.substr(1),this.bind=I,this.unbind=T;break;default:this.cleanedTargetName=t,"class"===t&&(this.updateTarget=A)}}targetAtContent(){this.updateTarget=R,this.unbind=E}createBehavior(t){return new L(t,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class L{constructor(t,e,i,s,o,n,r){this.source=null,this.context=null,this.bindingObserver=null,this.target=t,this.binding=e,this.isBindingVolatile=i,this.bind=s,this.unbind=o,this.updateTarget=n,this.targetName=r}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(t){b.setEvent(t);const e=this.binding(this.source,this.context);b.setEvent(null),!0!==e&&t.preventDefault()}}let P=null;class M{addFactory(t){t.targetIndex=this.targetIndex,this.behaviorFactories.push(t)}captureContentBinding(t){t.targetAtContent(),this.addFactory(t)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){P=this}static borrow(t){const e=P||new M;return e.directives=t,e.reset(),P=null,e}}function V(t){if(1===t.length)return t[0];let e,i=!1;const s=t.length,o=t.map((t=>"string"==typeof t?()=>t:(e=t.targetName||e,i=i||m.isVolatileBinding(t.binding),t.binding))),n=new F(((t,e)=>{let i="";for(let n=0;n<s;++n)i+=o[n](t,e);return i}),i);return n.targetName=e,n}const H=d.length;function z(t,e){const i=e.split(h);if(1===i.length)return null;const s=[];for(let e=0,o=i.length;e<o;++e){const o=i[e],n=o.indexOf(d);let r;if(-1===n)r=o;else{const e=parseInt(o.substring(0,n));s.push(t.directives[e]),r=o.substring(n+H)}""!==r&&s.push(r)}return s}function N(t,e,i=!1){const s=e.attributes;for(let o=0,n=s.length;o<n;++o){const r=s[o],a=r.value,l=z(t,a);let h=null;null===l?i&&(h=new F((()=>a)),h.targetName=r.name):h=V(l),null!==h&&(e.removeAttributeNode(r),o--,n--,t.addFactory(h))}}function B(t,e,i){const s=z(t,e.textContent);if(null!==s){let o=e;for(let n=0,r=s.length;n<r;++n){const r=s[n],a=0===n?e:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);"string"==typeof r?a.textContent=r:(a.textContent=" ",t.captureContentBinding(r)),o=a,t.targetIndex++,a!==e&&i.nextNode()}t.targetIndex--}}function q(t,e){const i=t.content;document.adoptNode(i);const s=M.borrow(e);N(s,t,!0);const o=s.behaviorFactories;s.reset();const n=c.createTemplateWalker(i);let r;for(;r=n.nextNode();)switch(s.targetIndex++,r.nodeType){case 1:N(s,r);break;case 3:B(s,r,n);break;case 8:c.isMarker(r)&&s.addFactory(e[c.extractDirectiveIndexFromMarker(r)])}let a=0;(c.isMarker(i.firstChild)||1===i.childNodes.length&&e.length)&&(i.insertBefore(document.createComment(""),i.firstChild),a=-1);const l=s.behaviorFactories;return s.release(),{fragment:i,viewBehaviorFactories:l,hostBehaviorFactories:o,targetOffset:a}}class U{constructor(t,e){this.fragment=t,this.behaviors=e,this.source=null,this.context=null,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{const e=this.lastChild;if(t.previousSibling===e)return;const i=t.parentNode;let s,o=this.firstChild;for(;o!==e;)s=o.nextSibling,i.insertBefore(o,t),o=s;i.insertBefore(e,t)}}remove(){const t=this.fragment,e=this.lastChild;let i,s=this.firstChild;for(;s!==e;)i=s.nextSibling,t.appendChild(s),s=i;t.appendChild(e)}dispose(){const t=this.firstChild.parentNode,e=this.lastChild;let i,s=this.firstChild;for(;s!==e;)i=s.nextSibling,t.removeChild(s),s=i;t.removeChild(e);const o=this.behaviors,n=this.source;for(let t=0,e=o.length;t<e;++t)o[t].unbind(n)}bind(t,e){const i=this.behaviors;if(this.source!==t)if(null!==this.source){const s=this.source;this.source=t,this.context=e;for(let o=0,n=i.length;o<n;++o){const n=i[o];n.unbind(s),n.bind(t,e)}}else{this.source=t,this.context=e;for(let s=0,o=i.length;s<o;++s)i[s].bind(t,e)}}unbind(){if(null===this.source)return;const t=this.behaviors,e=this.source;for(let i=0,s=t.length;i<s;++i)t[i].unbind(e);this.source=null}static disposeContiguousBatch(t){if(0!==t.length)for(let e=0,i=t.length;e<i;++e){t[e].dispose()}}}class _{constructor(t,e){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=t,this.directives=e}create(t){if(null===this.fragment){let t;const e=this.html;if("string"==typeof e){t=document.createElement("template"),t.innerHTML=c.createHTML(e);const i=t.content.firstElementChild;null!==i&&"TEMPLATE"===i.tagName&&(t=i)}else t=e;const i=q(t,this.directives);this.fragment=i.fragment,this.viewBehaviorFactories=i.viewBehaviorFactories,this.hostBehaviorFactories=i.hostBehaviorFactories,this.targetOffset=i.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const e=this.fragment.cloneNode(!0),i=this.viewBehaviorFactories,s=new Array(this.behaviorCount),o=c.createTemplateWalker(e);let n=0,r=this.targetOffset,a=o.nextNode();for(let t=i.length;n<t;++n){const t=i[n],e=t.targetIndex;for(;null!==a;){if(r===e){s[n]=t.createBehavior(a);break}a=o.nextNode(),r++}}if(this.hasHostBehaviors){const e=this.hostBehaviorFactories;for(let i=0,o=e.length;i<o;++i,++n)s[n]=e[i].createBehavior(t)}return new U(e,s)}render(t,e,i){"string"==typeof e&&(e=document.getElementById(e)),void 0===i&&(i=e);const s=this.create(i);return s.bind(t,y),s.appendTo(e),s}}const j=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function W(t,...e){const i=[];let s="";for(let o=0,n=t.length-1;o<n;++o){const n=t[o];let r=e[o];if(s+=n,r instanceof _){const t=r;r=()=>t}if("function"==typeof r&&(r=new F(r)),r instanceof x){const t=j.exec(n);null!==t&&(r.targetName=t[2])}r instanceof C?(s+=r.createPlaceholder(i.length),i.push(r)):s+=r}return s+=t[t.length-1],new _(s,i)}class K{constructor(){this.targets=new WeakSet}addStylesTo(t){this.targets.add(t)}removeStylesFrom(t){this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=null===this.behaviors?t:this.behaviors.concat(t),this}static{this.create=(()=>{if(c.supportsAdoptedStyleSheets){const t=new Map;return e=>new tt(e,t)}return t=>new it(t)})()}}function Y(t){return t.map((t=>t instanceof K?Y(t.styles):[t])).reduce(((t,e)=>t.concat(e)),[])}function X(t){return t.map((t=>t instanceof K?t.behaviors:null)).reduce(((t,e)=>null===e?t:(null===t&&(t=[]),t.concat(e))),null)}const G=Symbol("prependToAdoptedStyleSheets");function Q(t){const e=[],i=[];return t.forEach((t=>(t[G]?e:i).push(t))),{prepend:e,append:i}}let Z=(t,e)=>{const{prepend:i,append:s}=Q(e);t.adoptedStyleSheets=[...i,...t.adoptedStyleSheets,...s]},J=(t,e)=>{t.adoptedStyleSheets=t.adoptedStyleSheets.filter((t=>-1===e.indexOf(t)))};if(c.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Z=(t,e)=>{const{prepend:i,append:s}=Q(e);t.adoptedStyleSheets.splice(0,0,...i),t.adoptedStyleSheets.push(...s)},J=(t,e)=>{for(const i of e){const e=t.adoptedStyleSheets.indexOf(i);-1!==e&&t.adoptedStyleSheets.splice(e,1)}}}catch{}class tt extends K{get styleSheets(){if(void 0===this._styleSheets){const t=this.styles,e=this.styleSheetCache;this._styleSheets=Y(t).map((t=>{if(t instanceof CSSStyleSheet)return t;let i=e.get(t);return void 0===i&&(i=new CSSStyleSheet,i.replaceSync(t),e.set(t,i)),i}))}return this._styleSheets}constructor(t,e){super(),this.styles=t,this.styleSheetCache=e,this._styleSheets=void 0,this.behaviors=X(t)}addStylesTo(t){Z(t,this.styleSheets),super.addStylesTo(t)}removeStylesFrom(t){J(t,this.styleSheets),super.removeStylesFrom(t)}}let et=0;class it extends K{constructor(t){super(),this.styles=t,this.behaviors=null,this.behaviors=X(t),this.styleSheets=Y(t),this.styleClass="fast-style-class-"+ ++et}addStylesTo(t){const e=this.styleSheets,i=this.styleClass;t=this.normalizeTarget(t);for(let s=0;s<e.length;s++){const o=document.createElement("style");o.innerHTML=e[s],o.className=i,t.append(o)}super.addStylesTo(t)}removeStylesFrom(t){const e=(t=this.normalizeTarget(t)).querySelectorAll(`.${this.styleClass}`);for(let i=0,s=e.length;i<s;++i)t.removeChild(e[i]);super.removeStylesFrom(t)}isAttachedTo(t){return super.isAttachedTo(this.normalizeTarget(t))}normalizeTarget(t){return t===document?document.body:t}}const st=Object.freeze({locate:o()}),ot={toView:t=>t?"true":"false",fromView:t=>null!=t&&"false"!==t&&!1!==t&&0!==t},nt={toView(t){if(null==t)return null;const e=1*t;return isNaN(e)?null:e.toString()},fromView(t){if(null==t)return null;const e=1*t;return isNaN(e)?null:e}};class rt{constructor(t,e,i=e.toLowerCase(),s="reflect",o){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=i,this.mode=s,this.converter=o,this.fieldName=`_${e}`,this.callbackName=`${e}Changed`,this.hasCallback=this.callbackName in t.prototype,"boolean"===s&&void 0===o&&(this.converter=ot)}setValue(t,e){const i=t[this.fieldName],s=this.converter;void 0!==s&&(e=s.fromView(e)),i!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](i,e),t.$fastController.notify(this.name))}getValue(t){return m.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){const e=this.mode,i=this.guards;i.has(t)||"fromView"===e||c.queueUpdate((()=>{i.add(t);const s=t[this.fieldName];switch(e){case"reflect":const e=this.converter;c.setAttribute(t,this.attribute,void 0!==e?e.toView(s):s);break;case"boolean":c.setBooleanAttribute(t,this.attribute,s)}i.delete(t)}))}static collect(t,...e){const i=[];e.push(st.locate(t));for(let s=0,o=e.length;s<o;++s){const o=e[s];if(void 0!==o)for(let e=0,s=o.length;e<s;++e){const s=o[e];"string"==typeof s?i.push(new rt(t,s)):i.push(new rt(t,s.property,s.attribute,s.mode,s.converter))}}return i}}function at(t,e){let i;function s(t,e){arguments.length>1&&(i.property=e),st.locate(t.constructor).push(i)}return arguments.length>1?(i={},void s(t,e)):(i=void 0===t?{}:t,s)}const lt={mode:"open"},ht={},dt=i.getById(4,(()=>{const t=new Map;return Object.freeze({register:e=>!t.has(e.type)&&(t.set(e.type,e),!0),getByType:e=>t.get(e)})}));class ct{get isDefined(){return!!dt.getByType(this.type)}constructor(t,e=t.definition){"string"==typeof e&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template;const i=rt.collect(t,e.attributes),s=new Array(i.length),o={},n={};for(let t=0,e=i.length;t<e;++t){const e=i[t];s[t]=e.attribute,o[e.name]=e,n[e.attribute]=e}this.attributes=i,this.observedAttributes=s,this.propertyLookup=o,this.attributeLookup=n,this.shadowOptions=void 0===e.shadowOptions?lt:null===e.shadowOptions?void 0:{...lt,...e.shadowOptions},this.elementOptions=void 0===e.elementOptions?ht:{...ht,...e.elementOptions},this.styles=void 0===e.styles?void 0:Array.isArray(e.styles)?K.create(e.styles):e.styles instanceof K?e.styles:K.create([e.styles])}define(t=customElements){const e=this.type;if(dt.register(this)){const t=this.attributes,i=e.prototype;for(let e=0,s=t.length;e<s;++e)m.defineProperty(i,t[e]);Reflect.defineProperty(e,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return t.get(this.name)||t.define(this.name,e,this.elementOptions),this}static{this.forType=dt.getByType}}const ut=new WeakMap,pt={bubbles:!0,composed:!0,cancelable:!0};function mt(t){return t.shadowRoot||ut.get(t)||null}class ft extends p{get isConnected(){return m.track(this,"isConnected"),this._isConnected}setIsConnected(t){this._isConnected=t,m.notify(this,"isConnected")}get template(){return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get styles(){return this._styles}set styles(t){this._styles!==t&&(null!==this._styles&&this.removeStyles(this._styles),this._styles=t,this.needsInitialization||null===t||this.addStyles(t))}constructor(t,e){super(t),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=t,this.definition=e;const i=e.shadowOptions;if(void 0!==i){const e=t.attachShadow(i);"closed"===i.mode&&ut.set(t,e)}const s=m.getAccessors(t);if(s.length>0){const e=this.boundObservables=Object.create(null);for(let i=0,o=s.length;i<o;++i){const o=s[i].name,n=t[o];void 0!==n&&(delete t[o],e[o]=n)}}}addStyles(t){const e=mt(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.append(t);else if(!t.isAttachedTo(e)){const i=t.behaviors;t.addStylesTo(e),null!==i&&this.addBehaviors(i)}}removeStyles(t){const e=mt(this.element)||this.element.getRootNode();if(t instanceof HTMLStyleElement)e.removeChild(t);else if(t.isAttachedTo(e)){const i=t.behaviors;t.removeStylesFrom(e),null!==i&&this.removeBehaviors(i)}}addBehaviors(t){const e=this.behaviors||(this.behaviors=new Map),i=t.length,s=[];for(let o=0;o<i;++o){const i=t[o];e.has(i)?e.set(i,e.get(i)+1):(e.set(i,1),s.push(i))}if(this._isConnected){const t=this.element;for(let e=0;e<s.length;++e)s[e].bind(t,y)}}removeBehaviors(t,e=!1){const i=this.behaviors;if(null===i)return;const s=t.length,o=[];for(let n=0;n<s;++n){const s=t[n];if(i.has(s)){const t=i.get(s)-1;0===t||e?i.delete(s)&&o.push(s):i.set(s,t)}}if(this._isConnected){const t=this.element;for(let e=0;e<o.length;++e)o[e].unbind(t)}}onConnectedCallback(){if(this._isConnected)return;const t=this.element;this.needsInitialization?this.finishInitialization():null!==this.view&&this.view.bind(t,y);const e=this.behaviors;if(null!==e)for(const[i]of e)i.bind(t,y);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const t=this.view;null!==t&&t.unbind();const e=this.behaviors;if(null!==e){const t=this.element;for(const[i]of e)i.unbind(t)}}onAttributeChangedCallback(t,e,i){const s=this.definition.attributeLookup[t];void 0!==s&&s.onAttributeChangedCallback(this.element,i)}emit(t,e,i){return!!this._isConnected&&this.element.dispatchEvent(new CustomEvent(t,{detail:e,...pt,...i}))}finishInitialization(){const t=this.element,e=this.boundObservables;if(null!==e){const i=Object.keys(e);for(let s=0,o=i.length;s<o;++s){const o=i[s];t[o]=e[o]}this.boundObservables=null}const i=this.definition;null===this._template&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():i.template&&(this._template=i.template||null)),null!==this._template&&this.renderTemplate(this._template),null===this._styles&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():i.styles&&(this._styles=i.styles||null)),null!==this._styles&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(t){const e=this.element,i=mt(e)||e;null!==this.view?(this.view.dispose(),this.view=null):this.needsInitialization||c.removeChildNodes(i),t&&(this.view=t.render(e,i,e))}static forCustomElement(t){const e=t.$fastController;if(void 0!==e)return e;const i=ct.forType(t.constructor);if(void 0===i)throw new Error("Missing FASTElement definition.");return t.$fastController=new ft(t,i)}}function vt(t){return class extends t{constructor(){super(),ft.forCustomElement(this)}$emit(t,e,i){return this.$fastController.emit(t,e,i)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(t,e,i){this.$fastController.onAttributeChangedCallback(t,e,i)}}}const gt=Object.assign(vt(HTMLElement),{from:t=>vt(t),define:(t,e)=>new ct(t,e).define().type});function bt(t){return function(e){new ct(e,t).define()}}class yt{createCSS(){return""}createBehavior(){}}function Ct(t,e){const i=[];let s="";const o=[];for(let n=0,r=t.length-1;n<r;++n){s+=t[n];let r=e[n];if(r instanceof yt){const t=r.createBehavior();r=r.createCSS(),t&&o.push(t)}r instanceof K||r instanceof CSSStyleSheet?(""!==s.trim()&&(i.push(s),s=""),i.push(r)):s+=r}return s+=t[t.length-1],""!==s.trim()&&i.push(s),{styles:i,behaviors:o}}function xt(t,...e){const{styles:i,behaviors:s}=Ct(t,e),o=K.create(i);return s.length&&o.withBehaviors(...s),o}class wt extends yt{constructor(t,e){super(),this.behaviors=e,this.css="";const i=t.reduce(((t,e)=>("string"==typeof e?this.css+=e:t.push(e),t)),[]);i.length&&(this.styles=K.create(i))}createBehavior(){return this}createCSS(){return this.css}bind(t){this.styles&&t.$fastController.addStyles(this.styles),this.behaviors.length&&t.$fastController.addBehaviors(this.behaviors)}unbind(t){this.styles&&t.$fastController.removeStyles(this.styles),this.behaviors.length&&t.$fastController.removeBehaviors(this.behaviors)}}function $t(t,...e){const{styles:i,behaviors:s}=Ct(t,e);return new wt(i,s)}function It(t,e,i){return{index:t,removed:e,addedCount:i}}function kt(t,e,i,o,n,r){let a=0,l=0;const h=Math.min(i-e,r-n);if(0===e&&0===n&&(a=function(t,e,i){for(let s=0;s<i;++s)if(t[s]!==e[s])return s;return i}(t,o,h)),i===t.length&&r===o.length&&(l=function(t,e,i){let s=t.length,o=e.length,n=0;for(;n<i&&t[--s]===e[--o];)n++;return n}(t,o,h-a)),n+=a,r-=l,(i-=l)-(e+=a)===0&&r-n===0)return s;if(e===i){const t=It(e,[],0);for(;n<r;)t.removed.push(o[n++]);return[t]}if(n===r)return[It(e,[],i-e)];const d=function(t){let e=t.length-1,i=t[0].length-1,s=t[e][i];const o=[];for(;e>0||i>0;){if(0===e){o.push(2),i--;continue}if(0===i){o.push(3),e--;continue}const n=t[e-1][i-1],r=t[e-1][i],a=t[e][i-1];let l;l=r<a?r<n?r:n:a<n?a:n,l===n?(n===s?o.push(0):(o.push(1),s=n),e--,i--):l===r?(o.push(3),e--,s=r):(o.push(2),i--,s=a)}return o.reverse(),o}(function(t,e,i,s,o,n){const r=n-o+1,a=i-e+1,l=new Array(r);let h,d;for(let t=0;t<r;++t)l[t]=new Array(a),l[t][0]=t;for(let t=0;t<a;++t)l[0][t]=t;for(let i=1;i<r;++i)for(let n=1;n<a;++n)t[e+n-1]===s[o+i-1]?l[i][n]=l[i-1][n-1]:(h=l[i-1][n]+1,d=l[i][n-1]+1,l[i][n]=h<d?h:d);return l}(t,e,i,o,n,r)),c=[];let u,p=e,m=n;for(let t=0;t<d.length;++t)switch(d[t]){case 0:void 0!==u&&(c.push(u),u=void 0),p++,m++;break;case 1:void 0===u&&(u=It(p,[],0)),u.addedCount++,p++,u.removed.push(o[m]),m++;break;case 2:void 0===u&&(u=It(p,[],0)),u.addedCount++,p++;break;case 3:void 0===u&&(u=It(p,[],0)),u.removed.push(o[m]),m++}return void 0!==u&&c.push(u),c}const Et=Array.prototype.push;function Tt(t,e,i,s){const o=It(e,i,s);let n=!1,r=0;for(let e=0;e<t.length;e++){const i=t[e];if(i.index+=r,n)continue;const s=(a=o.index,l=o.index+o.removed.length,h=i.index,d=i.index+i.addedCount,l<h||d<a?-1:l===h||d===a?0:a<h?l<d?l-h:d-h:d<l?d-a:l-a);if(s>=0){t.splice(e,1),e--,r-=i.addedCount-i.removed.length,o.addedCount+=i.addedCount-s;const a=o.removed.length+i.removed.length-s;if(o.addedCount||a){let t=i.removed;if(o.index<i.index){const e=o.removed.slice(0,i.index-o.index);Et.apply(e,t),t=e}if(o.index+o.removed.length>i.index+i.addedCount){const e=o.removed.slice(i.index+i.addedCount-o.index);Et.apply(t,e)}o.removed=t,i.index<o.index&&(o.index=i.index)}else n=!0}else if(o.index<i.index){n=!0,t.splice(e,0,o),e++;const s=o.addedCount-o.removed.length;i.index+=s,r+=s}}var a,l,h,d;n||t.push(o)}function Ot(t,e){let i=[];const s=function(t){const e=[];for(let i=0,s=t.length;i<s;i++){const s=t[i];Tt(e,s.index,s.removed,s.addedCount)}return e}(e);for(let e=0,o=s.length;e<o;++e){const o=s[e];1!==o.addedCount||1!==o.removed.length?i=i.concat(kt(t,o.index,o.index+o.addedCount,o.removed,0,o.removed.length)):o.removed[0]!==t[o.index]&&i.push(o)}return i}let St=!1;function Rt(t,e){let i=t.index;const s=e.length;return i>s?i=s-t.addedCount:i<0&&(i=s+t.removed.length+i-t.addedCount),i<0&&(i=0),t.index=i,t}class Dt extends u{constructor(t){super(t),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(t,"$fastController",{value:this,enumerable:!1})}subscribe(t){this.flush(),super.subscribe(t)}addSplice(t){void 0===this.splices?this.splices=[t]:this.splices.push(t),this.needsQueue&&(this.needsQueue=!1,c.queueUpdate(this))}reset(t){this.oldCollection=t,this.needsQueue&&(this.needsQueue=!1,c.queueUpdate(this))}flush(){const t=this.splices,e=this.oldCollection;if(void 0===t&&void 0===e)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const i=void 0===e?Ot(this.source,t):kt(this.source,0,this.source.length,e,0,e.length);this.notify(i)}}function At(){if(St)return;St=!0,m.setArrayObserverFactory((t=>new Dt(t)));const t=Array.prototype;if(t.$fastPatch)return;Reflect.defineProperty(t,"$fastPatch",{value:1,enumerable:!1});const e=t.pop,i=t.push,s=t.reverse,o=t.shift,n=t.sort,r=t.splice,a=t.unshift;t.pop=function(){const t=this.length>0,i=e.apply(this,arguments),s=this.$fastController;return void 0!==s&&t&&s.addSplice(It(this.length,[i],0)),i},t.push=function(){const t=i.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(Rt(It(this.length-arguments.length,[],arguments.length),this)),t},t.reverse=function(){let t;const e=this.$fastController;void 0!==e&&(e.flush(),t=this.slice());const i=s.apply(this,arguments);return void 0!==e&&e.reset(t),i},t.shift=function(){const t=this.length>0,e=o.apply(this,arguments),i=this.$fastController;return void 0!==i&&t&&i.addSplice(It(0,[e],0)),e},t.sort=function(){let t;const e=this.$fastController;void 0!==e&&(e.flush(),t=this.slice());const i=n.apply(this,arguments);return void 0!==e&&e.reset(t),i},t.splice=function(){const t=r.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(Rt(It(+arguments[0],t,arguments.length>2?arguments.length-2:0),this)),t},t.unshift=function(){const t=a.apply(this,arguments),e=this.$fastController;return void 0!==e&&e.addSplice(Rt(It(0,[],arguments.length),this)),t}}class Ft{constructor(t,e){this.target=t,this.propertyName=e}bind(t){t[this.propertyName]=this.target}unbind(){}}function Lt(t){return new w("fast-ref",Ft,t)}const Pt=t=>"function"==typeof t,Mt=()=>null;function Vt(t){return void 0===t?Mt:Pt(t)?t:()=>t}function Ht(t,e,i){const s=Pt(t)?t:()=>t,o=Vt(e),n=Vt(i);return(t,e)=>s(t,e)?o(t,e):n(t,e)}const zt=Object.freeze({positioning:!1,recycle:!0});function Nt(t,e,i,s){t.bind(e[i],s)}function Bt(t,e,i,s){const o=Object.create(s);o.index=i,o.length=e.length,t.bind(e[i],o)}class qt{constructor(t,e,i,s,o,n){this.location=t,this.itemsBinding=e,this.templateBinding=s,this.options=n,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=Nt,this.itemsBindingObserver=m.binding(e,this,i),this.templateBindingObserver=m.binding(s,this,o),n.positioning&&(this.bindView=Bt)}bind(t,e){this.source=t,this.originalContext=e,this.childContext=Object.create(e),this.childContext.parent=t,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(t,this.originalContext),this.template=this.templateBindingObserver.observe(t,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(t,e){t===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):t===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(e)}observeItems(t=!1){if(!this.items)return void(this.items=s);const e=this.itemsObserver,i=this.itemsObserver=m.getNotifier(this.items),o=e!==i;o&&null!==e&&e.unsubscribe(this),(o||t)&&i.subscribe(this)}updateViews(t){const e=this.childContext,i=this.views,s=this.bindView,o=this.items,n=this.template,r=this.options.recycle,a=[];let l=0,h=0;for(let d=0,c=t.length;d<c;++d){const c=t[d],u=c.removed;let p=0,m=c.index;const f=m+c.addedCount,v=i.splice(c.index,u.length),g=h=a.length+v.length;for(;m<f;++m){const t=i[m],d=t?t.firstChild:this.location;let c;r&&h>0?(p<=g&&v.length>0?(c=v[p],p++):(c=a[l],l++),h--):c=n.create(),i.splice(m,0,c),s(c,o,m,e),c.insertBefore(d)}v[p]&&a.push(...v.slice(p))}for(let t=l,e=a.length;t<e;++t)a[t].dispose();if(this.options.positioning)for(let t=0,e=i.length;t<e;++t){const s=i[t].context;s.length=e,s.index=t}}refreshAllViews(t=!1){const e=this.items,i=this.childContext,s=this.template,o=this.location,n=this.bindView;let r=e.length,a=this.views,l=a.length;if(0!==r&&!t&&this.options.recycle||(U.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(r);for(let t=0;t<r;++t){const r=s.create();n(r,e,t,i),a[t]=r,r.insertBefore(o)}}else{let t=0;for(;t<r;++t)if(t<l){n(a[t],e,t,i)}else{const r=s.create();n(r,e,t,i),a.push(r),r.insertBefore(o)}const h=a.splice(t,l-t);for(t=0,r=h.length;t<r;++t)h[t].dispose()}}unbindAllViews(){const t=this.views;for(let e=0,i=t.length;e<i;++e)t[e].unbind()}}class Ut extends C{constructor(t,e,i){super(),this.itemsBinding=t,this.templateBinding=e,this.options=i,this.createPlaceholder=c.createBlockPlaceholder,At(),this.isItemsBindingVolatile=m.isVolatileBinding(t),this.isTemplateBindingVolatile=m.isVolatileBinding(e)}createBehavior(t){return new qt(t,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function _t(t,e,i=zt){return new Ut(t,"function"==typeof e?e:()=>e,{...zt,...i})}function jt(t){return t?function(e,i,s){return 1===e.nodeType&&e.matches(t)}:function(t,e,i){return 1===t.nodeType}}class Wt{constructor(t,e){this.target=t,this.options=e,this.source=null}bind(t){const e=this.options.property;this.shouldUpdate=m.getAccessors(t).some((t=>t.name===e)),this.source=t,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(s),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let t=this.getNodes();return void 0!==this.options.filter&&(t=t.filter(this.options.filter)),t}updateTarget(t){this.source[this.options.property]=t}}class Kt extends Wt{constructor(t,e){super(t,e)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}}function Yt(t){return"string"==typeof t&&(t={property:t}),new w("fast-slotted",Kt,t)}class Xt extends Wt{constructor(t,e){super(t,e),this.observer=null,e.childList=!0}observe(){null===this.observer&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function Gt(t){return"string"==typeof t&&(t={property:t}),new w("fast-children",Xt,t)}class Qt{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}}const Zt=(t,e)=>W`
2
2
  <span
3
3
  part="end"
4
- ${Pt("endContainer")}
4
+ ${Lt("endContainer")}
5
5
  class=${t=>e.end?"end":void 0}
6
6
  >
7
- <slot name="end" ${Pt("end")} @slotchange="${t=>t.handleEndContentChange()}">
7
+ <slot name="end" ${Lt("end")} @slotchange="${t=>t.handleEndContentChange()}">
8
8
  ${e.end||""}
9
9
  </slot>
10
10
  </span>
11
- `,te=(t,e)=>K`
11
+ `,Jt=(t,e)=>W`
12
12
  <span
13
13
  part="start"
14
- ${Pt("startContainer")}
14
+ ${Lt("startContainer")}
15
15
  class="${t=>e.start?"start":void 0}"
16
16
  >
17
17
  <slot
18
18
  name="start"
19
- ${Pt("start")}
19
+ ${Lt("start")}
20
20
  @slotchange="${t=>t.handleStartContentChange()}"
21
21
  >
22
22
  ${e.start||""}
23
23
  </slot>
24
24
  </span>
25
- `,ee=K`
26
- <span part="end" ${Pt("endContainer")}>
25
+ `,te=W`
26
+ <span part="end" ${Lt("endContainer")}>
27
27
  <slot
28
28
  name="end"
29
- ${Pt("end")}
29
+ ${Lt("end")}
30
30
  @slotchange="${t=>t.handleEndContentChange()}"
31
31
  ></slot>
32
32
  </span>
33
- `,ie=K`
34
- <span part="start" ${Pt("startContainer")}>
33
+ `,ee=W`
34
+ <span part="start" ${Lt("startContainer")}>
35
35
  <slot
36
36
  name="start"
37
- ${Pt("start")}
37
+ ${Lt("start")}
38
38
  @slotchange="${t=>t.handleStartContentChange()}"
39
39
  ></slot>
40
40
  </span>
41
- `,se=(t,e)=>K`
41
+ `,ie=(t,e)=>W`
42
42
  <template class="${t=>t.expanded?"expanded":""}">
43
43
  <div
44
44
  class="heading"
@@ -49,7 +49,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
49
49
  <button
50
50
  class="button"
51
51
  part="button"
52
- ${Pt("expandbutton")}
52
+ ${Lt("expandbutton")}
53
53
  aria-expanded="${t=>t.expanded}"
54
54
  aria-controls="${t=>t.id}-panel"
55
55
  id="${t=>t.id}"
@@ -59,8 +59,8 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
59
59
  <slot name="heading"></slot>
60
60
  </span>
61
61
  </button>
62
- ${te(0,e)}
63
62
  ${Jt(0,e)}
63
+ ${Zt(0,e)}
64
64
  <span class="icon" part="icon" aria-hidden="true">
65
65
  <slot name="expanded-icon" part="expanded-icon">
66
66
  ${e.expandedIcon||""}
@@ -80,12 +80,12 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
80
80
  <slot></slot>
81
81
  </div>
82
82
  </template>
83
- `;function oe(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r}"function"==typeof SuppressedError&&SuppressedError;const ne=new Map;"metadata"in Reflect||(Reflect.metadata=function(t,e){return function(i){Reflect.defineMetadata(t,e,i)}},Reflect.defineMetadata=function(t,e,i){let s=ne.get(i);void 0===s&&ne.set(i,s=new Map),s.set(t,e)},Reflect.getOwnMetadata=function(t,e){const i=ne.get(e);if(void 0!==i)return i.get(t)});class re{constructor(t,e){this.container=t,this.key=e}instance(t){return this.registerResolver(0,t)}singleton(t){return this.registerResolver(1,t)}transient(t){return this.registerResolver(2,t)}callback(t){return this.registerResolver(3,t)}cachedCallback(t){return this.registerResolver(3,qe(t))}aliasTo(t){return this.registerResolver(5,t)}registerResolver(t,e){const{container:i,key:s}=this;return this.container=this.key=void 0,i.registerResolver(s,new Re(s,t,e))}}function ae(t){const e=t.slice(),i=Object.keys(t),s=i.length;let o;for(let n=0;n<s;++n)o=i[n],Ge(o)||(e[o]=t[o]);return e}const le=Object.freeze({none(t){throw Error(`${t.toString()} not registered, did you forget to add @singleton()?`)},singleton:t=>new Re(t,1,t),transient:t=>new Re(t,2,t)}),he=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:le.singleton})}),de=new Map;function ce(t){return e=>Reflect.getOwnMetadata(t,e)}let ue=null;const pe=Object.freeze({createContainer:t=>new Ne(null,Object.assign({},he.default,t)),findResponsibleContainer(t){const e=t.$$container$$;return e&&e.responsibleForOwnerRequests?e:pe.findParentContainer(t)},findParentContainer(t){const e=new CustomEvent(He,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return t.dispatchEvent(e),e.detail.container||pe.getOrCreateDOMContainer()},getOrCreateDOMContainer:(t,e)=>t?t.$$container$$||new Ne(t,Object.assign({},he.default,e,{parentLocator:pe.findParentContainer})):ue||(ue=new Ne(null,Object.assign({},he.default,e,{parentLocator:()=>null}))),getDesignParamtypes:ce("design:paramtypes"),getAnnotationParamtypes:ce("di:paramtypes"),getOrCreateAnnotationParamTypes(t){let e=this.getAnnotationParamtypes(t);return void 0===e&&Reflect.defineMetadata("di:paramtypes",e=[],t),e},getDependencies(t){let e=de.get(t);if(void 0===e){const i=t.inject;if(void 0===i){const i=pe.getDesignParamtypes(t),s=pe.getAnnotationParamtypes(t);if(void 0===i)if(void 0===s){const i=Object.getPrototypeOf(t);e="function"==typeof i&&i!==Function.prototype?ae(pe.getDependencies(i)):[]}else e=ae(s);else if(void 0===s)e=ae(i);else{e=ae(i);let t,o=s.length;for(let i=0;i<o;++i)t=s[i],void 0!==t&&(e[i]=t);const n=Object.keys(s);let r;o=n.length;for(let t=0;t<o;++t)r=n[t],Ge(r)||(e[r]=s[r])}}else e=ae(i);de.set(t,e)}return e},defineProperty(t,e,i,s=!1){const o=`$di_${e}`;Reflect.defineProperty(t,e,{get:function(){let t=this[o];if(void 0===t){const n=this instanceof HTMLElement?pe.findResponsibleContainer(this):pe.getOrCreateDOMContainer();if(t=n.get(i),this[o]=t,s&&this instanceof bt){const s=this.$fastController,n=()=>{pe.findResponsibleContainer(this).get(i)!==this[o]&&(this[o]=t,s.notify(e))};s.subscribe({handleChange:n},"isConnected")}}return t}})},createInterface(t,e){const i="function"==typeof t?t:e,s="string"==typeof t?t:t&&"friendlyName"in t&&t.friendlyName||We,o="string"!=typeof t&&(t&&"respectConnection"in t&&t.respectConnection||!1),n=function(t,e,i){if(null==t||void 0!==new.target)throw new Error(`No registration for interface: '${n.friendlyName}'`);if(e)pe.defineProperty(t,e,n,o);else{pe.getOrCreateAnnotationParamTypes(t)[i]=n}};return n.$isInterface=!0,n.friendlyName=null==s?"(anonymous)":s,null!=i&&(n.register=function(t,e){return i(new re(t,e??n))}),n.toString=function(){return`InterfaceSymbol<${n.friendlyName}>`},n},inject:(...t)=>function(e,i,s){if("number"==typeof s){const i=pe.getOrCreateAnnotationParamTypes(e),o=t[0];void 0!==o&&(i[s]=o)}else if(i)pe.defineProperty(e,i,t[0]);else{const i=s?pe.getOrCreateAnnotationParamTypes(s.value):pe.getOrCreateAnnotationParamTypes(e);let o;for(let e=0;e<t.length;++e)o=t[e],void 0!==o&&(i[e]=o)}},transient:t=>(t.register=function(e){return Ue.transient(t,t).register(e)},t.registerInRequestor=!1,t),singleton:(t,e=Ce)=>(t.register=function(e){return Ue.singleton(t,t).register(e)},t.registerInRequestor=e.scoped,t)}),me=pe.createInterface("Container"),fe=me;function ve(t){return function(e){const i=function(t,e,s){pe.inject(i)(t,e,s)};return i.$isResolver=!0,i.resolve=function(i,s){return t(e,i,s)},i}}const ge=pe.inject;function be(t){return pe.transient(t)}function ye(t){return null==t?be:be(t)}const Ce={scoped:!1};function xe(t){return"function"==typeof t?pe.singleton(t):function(e){return pe.singleton(e,t)}}const we=($e=(t,e,i,s)=>i.getAll(t,s),function(t,e){e=!!e;const i=function(t,e,s){pe.inject(i)(t,e,s)};return i.$isResolver=!0,i.resolve=function(i,s){return $e(t,i,s,e)},i});var $e;const Ie=ve(((t,e,i)=>()=>i.get(t))),ke=ve(((t,e,i)=>i.has(t,!0)?i.get(t):void 0));function Ee(t,e,i){pe.inject(Ee)(t,e,i)}Ee.$isResolver=!0,Ee.resolve=()=>{};const Te=ve(((t,e,i)=>{const s=Se(t,e),o=new Re(t,0,s);return i.registerResolver(t,o),s})),Oe=ve(((t,e,i)=>Se(t,e)));function Se(t,e){return e.getFactory(t).construct(e)}class Re{constructor(t,e,i){this.key=t,this.strategy=e,this.state=i,this.resolving=!1}get $isResolver(){return!0}register(t){return t.registerResolver(this.key,this)}resolve(t,e){switch(this.strategy){case 0:return this.state;case 1:if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=t.getFactory(this.state).construct(e),this.strategy=0,this.resolving=!1,this.state;case 2:{const i=t.getFactory(this.state);if(null===i)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return i.construct(e)}case 3:return this.state(t,e,this);case 4:return this.state[0].resolve(t,e);case 5:return e.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(t){switch(this.strategy){case 1:case 2:return t.getFactory(this.state);case 5:return t.getResolver(this.state)?.getFactory?.(t)??null;default:return null}}}function Ae(t){return this.get(t)}function De(t,e){return e(t)}class Fe{constructor(t,e){this.Type=t,this.dependencies=e,this.transformers=null}construct(t,e){let i;return i=void 0===e?new this.Type(...this.dependencies.map(Ae,t)):new this.Type(...this.dependencies.map(Ae,t),...e),null==this.transformers?i:this.transformers.reduce(De,i)}registerTransformer(t){(this.transformers||(this.transformers=[])).push(t)}}const Le={$isResolver:!0,resolve:(t,e)=>e};function Pe(t){return"function"==typeof t.register}function Me(t){return function(t){return Pe(t)&&"boolean"==typeof t.registerInRequestor}(t)&&t.registerInRequestor}const Ve=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),He="__DI_LOCATE_PARENT__",ze=new Map;class Ne{get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}constructor(t,e){this.owner=t,this.config=e,this._parent=void 0,this.registerDepth=0,this.context=null,null!==t&&(t.$$container$$=this),this.resolvers=new Map,this.resolvers.set(me,Le),t instanceof Node&&t.addEventListener(He,(t=>{t.composedPath()[0]!==this.owner&&(t.detail.container=this,t.stopImmediatePropagation())}))}registerWithContext(t,...e){return this.context=t,this.register(...e),this.context=null,this}register(...t){if(100===++this.registerDepth)throw new Error("Unable to autoregister dependency");let e,i,s,o,n;const r=this.context;for(let a=0,l=t.length;a<l;++a)if(e=t[a],Ke(e))if(Pe(e))e.register(this,r);else if(void 0!==e.prototype)Ue.singleton(e,e).register(this);else for(i=Object.keys(e),o=0,n=i.length;o<n;++o)s=e[i[o]],Ke(s)&&(Pe(s)?s.register(this,r):this.register(s));return--this.registerDepth,this}registerResolver(t,e){_e(t);const i=this.resolvers,s=i.get(t);return null==s?i.set(t,e):s instanceof Re&&4===s.strategy?s.state.push(e):i.set(t,new Re(t,4,[s,e])),e}registerTransformer(t,e){const i=this.getResolver(t);if(null==i)return!1;if(i.getFactory){const t=i.getFactory(this);return null!=t&&(t.registerTransformer(e),!0)}return!1}getResolver(t,e=!0){if(_e(t),void 0!==t.resolve)return t;let i,s=this;for(;null!=s;){if(i=s.resolvers.get(t),null!=i)return i;if(null==s.parent){const i=Me(t)?this:s;return e?this.jitRegister(t,i):null}s=s.parent}return null}has(t,e=!1){return!!this.resolvers.has(t)||!(!e||null==this.parent)&&this.parent.has(t,!0)}get(t){if(_e(t),t.$isResolver)return t.resolve(this,this);let e,i=this;for(;null!=i;){if(e=i.resolvers.get(t),null!=e)return e.resolve(i,this);if(null==i.parent){const s=Me(t)?this:i;return e=this.jitRegister(t,s),e.resolve(i,this)}i=i.parent}throw new Error(`Unable to resolve key: ${String(t)}`)}getAll(t,e=!1){_e(t);const i=this;let o,n=i;if(e){let e=s;for(;null!=n;)o=n.resolvers.get(t),null!=o&&(e=e.concat(je(o,n,i))),n=n.parent;return e}for(;null!=n;){if(o=n.resolvers.get(t),null!=o)return je(o,n,i);if(n=n.parent,null==n)return s}return s}getFactory(t){let e=ze.get(t);if(void 0===e){if(Ye(t))throw new Error(`${t.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);ze.set(t,e=new Fe(t,pe.getDependencies(t)))}return e}registerFactory(t,e){ze.set(t,e)}createChild(t){return new Ne(null,Object.assign({},this.config,t,{parentLocator:()=>this}))}jitRegister(t,e){if("function"!=typeof t)throw new Error(`Attempted to jitRegister something that is not a constructor: '${t}'. Did you forget to register this dependency?`);if(Ve.has(t.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${t.name}. Did you forget to add @inject(Key)`);if(Pe(t)){const i=t.register(e);if(!(i instanceof Object)||null==i.resolve){const i=e.resolvers.get(t);if(null!=i)return i;throw new Error("A valid resolver was not returned from the static register method")}return i}if(t.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${t.friendlyName}`);{const i=this.config.defaultResolver(t,e);return e.resolvers.set(t,i),i}}}const Be=new WeakMap;function qe(t){return function(e,i,s){if(Be.has(s))return Be.get(s);const o=t(e,i,s);return Be.set(s,o),o}}const Ue=Object.freeze({instance:(t,e)=>new Re(t,0,e),singleton:(t,e)=>new Re(t,1,e),transient:(t,e)=>new Re(t,2,e),callback:(t,e)=>new Re(t,3,e),cachedCallback:(t,e)=>new Re(t,3,qe(e)),aliasTo:(t,e)=>new Re(e,5,t)});function _e(t){if(null==t)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function je(t,e,i){if(t instanceof Re&&4===t.strategy){const s=t.state;let o=s.length;const n=new Array(o);for(;o--;)n[o]=s[o].resolve(e,i);return n}return[t.resolve(e,i)]}const We="(anonymous)";function Ke(t){return"object"==typeof t&&null!==t||"function"==typeof t}const Ye=function(){const t=new WeakMap;let e=!1,i="",s=0;return function(o){return e=t.get(o),void 0===e&&(i=o.toString(),s=i.length,e=s>=29&&s<=100&&125===i.charCodeAt(s-1)&&i.charCodeAt(s-2)<=32&&93===i.charCodeAt(s-3)&&101===i.charCodeAt(s-4)&&100===i.charCodeAt(s-5)&&111===i.charCodeAt(s-6)&&99===i.charCodeAt(s-7)&&32===i.charCodeAt(s-8)&&101===i.charCodeAt(s-9)&&118===i.charCodeAt(s-10)&&105===i.charCodeAt(s-11)&&116===i.charCodeAt(s-12)&&97===i.charCodeAt(s-13)&&110===i.charCodeAt(s-14)&&88===i.charCodeAt(s-15),t.set(o,e)),e}}(),Xe={};function Ge(t){switch(typeof t){case"number":return t>=0&&(0|t)===t;case"string":{const e=Xe[t];if(void 0!==e)return e;const i=t.length;if(0===i)return Xe[t]=!1;let s=0;for(let e=0;e<i;++e)if(s=t.charCodeAt(e),0===e&&48===s&&i>1||s<48||s>57)return Xe[t]=!1;return Xe[t]=!0}default:return!1}}function Qe(t){return`${t.toLowerCase()}:presentation`}const Ze=new Map,Je=Object.freeze({define(t,e,i){const s=Qe(t);void 0===Ze.get(s)?Ze.set(s,e):Ze.set(s,!1),i.register(Ue.instance(s,e))},forTag(t,e){const i=Qe(t),s=Ze.get(i);if(!1===s){return pe.findResponsibleContainer(e).get(i)}return s||null}});class ti{constructor(t,e){this.template=t||null,this.styles=void 0===e?null:Array.isArray(e)?Y.create(e):e instanceof Y?e:Y.create([e])}applyTo(t){const e=t.$fastController;null===e.template&&(e.template=this.template),null===e.styles&&(e.styles=this.styles)}}class ei extends bt{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=Je.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(t){return(e={})=>new si(this===ei?class extends ei{}:this,t,e)}}function ii(t,e,i){return"function"==typeof t?t(e,i):t}oe([f],ei.prototype,"template",void 0),oe([f],ei.prototype,"styles",void 0);class si{constructor(t,e,i){this.type=t,this.elementDefinition=e,this.overrideDefinition=i,this.definition={...this.elementDefinition,...this.overrideDefinition}}register(t,e){const i=this.definition,s=this.overrideDefinition,o=`${i.prefix||e.elementPrefix}-${i.baseName}`;e.tryDefineElement({name:o,type:this.type,baseClass:this.elementDefinition.baseClass,callback:t=>{const e=new ti(ii(i.template,t,i),ii(i.styles,t,i));t.definePresentation(e);let o=ii(i.shadowOptions,t,i);t.shadowRootMode&&(o?s.shadowOptions||(o.mode=t.shadowRootMode):null!==o&&(o={mode:t.shadowRootMode})),t.defineElement({elementOptions:ii(i.elementOptions,t,i),shadowOptions:o,attributes:ii(i.attributes,t,i)})}})}}function oi(t,...e){const i=ot.locate(t);e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((i=>{"constructor"!==i&&Object.defineProperty(t.prototype,i,Object.getOwnPropertyDescriptor(e.prototype,i))}));ot.locate(e).forEach((t=>i.push(t)))}))}class ni extends ei{constructor(){super(...arguments),this.headinglevel=2,this.expanded=!1,this.clickHandler=t=>{this.expanded=!this.expanded,this.change()},this.change=()=>{this.$emit("change")}}}oe([lt({attribute:"heading-level",mode:"fromView",converter:rt})],ni.prototype,"headinglevel",void 0),oe([lt({mode:"boolean"})],ni.prototype,"expanded",void 0),oe([lt],ni.prototype,"id",void 0),oi(ni,Zt);const ri=(t,e)=>K`
83
+ `;function se(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r}"function"==typeof SuppressedError&&SuppressedError;const oe=new Map;"metadata"in Reflect||(Reflect.metadata=function(t,e){return function(i){Reflect.defineMetadata(t,e,i)}},Reflect.defineMetadata=function(t,e,i){let s=oe.get(i);void 0===s&&oe.set(i,s=new Map),s.set(t,e)},Reflect.getOwnMetadata=function(t,e){const i=oe.get(e);if(void 0!==i)return i.get(t)});class ne{constructor(t,e){this.container=t,this.key=e}instance(t){return this.registerResolver(0,t)}singleton(t){return this.registerResolver(1,t)}transient(t){return this.registerResolver(2,t)}callback(t){return this.registerResolver(3,t)}cachedCallback(t){return this.registerResolver(3,Be(t))}aliasTo(t){return this.registerResolver(5,t)}registerResolver(t,e){const{container:i,key:s}=this;return this.container=this.key=void 0,i.registerResolver(s,new Se(s,t,e))}}function re(t){const e=t.slice(),i=Object.keys(t),s=i.length;let o;for(let n=0;n<s;++n)o=i[n],Xe(o)||(e[o]=t[o]);return e}const ae=Object.freeze({none(t){throw Error(`${t.toString()} not registered, did you forget to add @singleton()?`)},singleton:t=>new Se(t,1,t),transient:t=>new Se(t,2,t)}),le=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:ae.singleton})}),he=new Map;function de(t){return e=>Reflect.getOwnMetadata(t,e)}let ce=null;const ue=Object.freeze({createContainer:t=>new ze(null,Object.assign({},le.default,t)),findResponsibleContainer(t){const e=t.$$container$$;return e&&e.responsibleForOwnerRequests?e:ue.findParentContainer(t)},findParentContainer(t){const e=new CustomEvent(Ve,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return t.dispatchEvent(e),e.detail.container||ue.getOrCreateDOMContainer()},getOrCreateDOMContainer:(t,e)=>t?t.$$container$$||new ze(t,Object.assign({},le.default,e,{parentLocator:ue.findParentContainer})):ce||(ce=new ze(null,Object.assign({},le.default,e,{parentLocator:()=>null}))),getDesignParamtypes:de("design:paramtypes"),getAnnotationParamtypes:de("di:paramtypes"),getOrCreateAnnotationParamTypes(t){let e=this.getAnnotationParamtypes(t);return void 0===e&&Reflect.defineMetadata("di:paramtypes",e=[],t),e},getDependencies(t){let e=he.get(t);if(void 0===e){const i=t.inject;if(void 0===i){const i=ue.getDesignParamtypes(t),s=ue.getAnnotationParamtypes(t);if(void 0===i)if(void 0===s){const i=Object.getPrototypeOf(t);e="function"==typeof i&&i!==Function.prototype?re(ue.getDependencies(i)):[]}else e=re(s);else if(void 0===s)e=re(i);else{e=re(i);let t,o=s.length;for(let i=0;i<o;++i)t=s[i],void 0!==t&&(e[i]=t);const n=Object.keys(s);let r;o=n.length;for(let t=0;t<o;++t)r=n[t],Xe(r)||(e[r]=s[r])}}else e=re(i);he.set(t,e)}return e},defineProperty(t,e,i,s=!1){const o=`$di_${e}`;Reflect.defineProperty(t,e,{get:function(){let t=this[o];if(void 0===t){const n=this instanceof HTMLElement?ue.findResponsibleContainer(this):ue.getOrCreateDOMContainer();if(t=n.get(i),this[o]=t,s&&this instanceof gt){const s=this.$fastController,n=()=>{ue.findResponsibleContainer(this).get(i)!==this[o]&&(this[o]=t,s.notify(e))};s.subscribe({handleChange:n},"isConnected")}}return t}})},createInterface(t,e){const i="function"==typeof t?t:e,s="string"==typeof t?t:t&&"friendlyName"in t&&t.friendlyName||je,o="string"!=typeof t&&(t&&"respectConnection"in t&&t.respectConnection||!1),n=function(t,e,i){if(null==t||void 0!==new.target)throw new Error(`No registration for interface: '${n.friendlyName}'`);if(e)ue.defineProperty(t,e,n,o);else{ue.getOrCreateAnnotationParamTypes(t)[i]=n}};return n.$isInterface=!0,n.friendlyName=null==s?"(anonymous)":s,null!=i&&(n.register=function(t,e){return i(new ne(t,e??n))}),n.toString=function(){return`InterfaceSymbol<${n.friendlyName}>`},n},inject:(...t)=>function(e,i,s){if("number"==typeof s){const i=ue.getOrCreateAnnotationParamTypes(e),o=t[0];void 0!==o&&(i[s]=o)}else if(i)ue.defineProperty(e,i,t[0]);else{const i=s?ue.getOrCreateAnnotationParamTypes(s.value):ue.getOrCreateAnnotationParamTypes(e);let o;for(let e=0;e<t.length;++e)o=t[e],void 0!==o&&(i[e]=o)}},transient:t=>(t.register=function(e){return qe.transient(t,t).register(e)},t.registerInRequestor=!1,t),singleton:(t,e=ye)=>(t.register=function(e){return qe.singleton(t,t).register(e)},t.registerInRequestor=e.scoped,t)}),pe=ue.createInterface("Container"),me=pe;function fe(t){return function(e){const i=function(t,e,s){ue.inject(i)(t,e,s)};return i.$isResolver=!0,i.resolve=function(i,s){return t(e,i,s)},i}}const ve=ue.inject;function ge(t){return ue.transient(t)}function be(t){return null==t?ge:ge(t)}const ye={scoped:!1};function Ce(t){return"function"==typeof t?ue.singleton(t):function(e){return ue.singleton(e,t)}}const xe=(we=(t,e,i,s)=>i.getAll(t,s),function(t,e){e=!!e;const i=function(t,e,s){ue.inject(i)(t,e,s)};return i.$isResolver=!0,i.resolve=function(i,s){return we(t,i,s,e)},i});var we;const $e=fe(((t,e,i)=>()=>i.get(t))),Ie=fe(((t,e,i)=>i.has(t,!0)?i.get(t):void 0));function ke(t,e,i){ue.inject(ke)(t,e,i)}ke.$isResolver=!0,ke.resolve=()=>{};const Ee=fe(((t,e,i)=>{const s=Oe(t,e),o=new Se(t,0,s);return i.registerResolver(t,o),s})),Te=fe(((t,e,i)=>Oe(t,e)));function Oe(t,e){return e.getFactory(t).construct(e)}class Se{constructor(t,e,i){this.key=t,this.strategy=e,this.state=i,this.resolving=!1}get $isResolver(){return!0}register(t){return t.registerResolver(this.key,this)}resolve(t,e){switch(this.strategy){case 0:return this.state;case 1:if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=t.getFactory(this.state).construct(e),this.strategy=0,this.resolving=!1,this.state;case 2:{const i=t.getFactory(this.state);if(null===i)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return i.construct(e)}case 3:return this.state(t,e,this);case 4:return this.state[0].resolve(t,e);case 5:return e.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(t){switch(this.strategy){case 1:case 2:return t.getFactory(this.state);case 5:return t.getResolver(this.state)?.getFactory?.(t)??null;default:return null}}}function Re(t){return this.get(t)}function De(t,e){return e(t)}class Ae{constructor(t,e){this.Type=t,this.dependencies=e,this.transformers=null}construct(t,e){let i;return i=void 0===e?new this.Type(...this.dependencies.map(Re,t)):new this.Type(...this.dependencies.map(Re,t),...e),null==this.transformers?i:this.transformers.reduce(De,i)}registerTransformer(t){(this.transformers||(this.transformers=[])).push(t)}}const Fe={$isResolver:!0,resolve:(t,e)=>e};function Le(t){return"function"==typeof t.register}function Pe(t){return function(t){return Le(t)&&"boolean"==typeof t.registerInRequestor}(t)&&t.registerInRequestor}const Me=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),Ve="__DI_LOCATE_PARENT__",He=new Map;class ze{get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}constructor(t,e){this.owner=t,this.config=e,this._parent=void 0,this.registerDepth=0,this.context=null,null!==t&&(t.$$container$$=this),this.resolvers=new Map,this.resolvers.set(pe,Fe),t instanceof Node&&t.addEventListener(Ve,(t=>{t.composedPath()[0]!==this.owner&&(t.detail.container=this,t.stopImmediatePropagation())}))}registerWithContext(t,...e){return this.context=t,this.register(...e),this.context=null,this}register(...t){if(100===++this.registerDepth)throw new Error("Unable to autoregister dependency");let e,i,s,o,n;const r=this.context;for(let a=0,l=t.length;a<l;++a)if(e=t[a],We(e))if(Le(e))e.register(this,r);else if(void 0!==e.prototype)qe.singleton(e,e).register(this);else for(i=Object.keys(e),o=0,n=i.length;o<n;++o)s=e[i[o]],We(s)&&(Le(s)?s.register(this,r):this.register(s));return--this.registerDepth,this}registerResolver(t,e){Ue(t);const i=this.resolvers,s=i.get(t);return null==s?i.set(t,e):s instanceof Se&&4===s.strategy?s.state.push(e):i.set(t,new Se(t,4,[s,e])),e}registerTransformer(t,e){const i=this.getResolver(t);if(null==i)return!1;if(i.getFactory){const t=i.getFactory(this);return null!=t&&(t.registerTransformer(e),!0)}return!1}getResolver(t,e=!0){if(Ue(t),void 0!==t.resolve)return t;let i,s=this;for(;null!=s;){if(i=s.resolvers.get(t),null!=i)return i;if(null==s.parent){const i=Pe(t)?this:s;return e?this.jitRegister(t,i):null}s=s.parent}return null}has(t,e=!1){return!!this.resolvers.has(t)||!(!e||null==this.parent)&&this.parent.has(t,!0)}get(t){if(Ue(t),t.$isResolver)return t.resolve(this,this);let e,i=this;for(;null!=i;){if(e=i.resolvers.get(t),null!=e)return e.resolve(i,this);if(null==i.parent){const s=Pe(t)?this:i;return e=this.jitRegister(t,s),e.resolve(i,this)}i=i.parent}throw new Error(`Unable to resolve key: ${String(t)}`)}getAll(t,e=!1){Ue(t);const i=this;let o,n=i;if(e){let e=s;for(;null!=n;)o=n.resolvers.get(t),null!=o&&(e=e.concat(_e(o,n,i))),n=n.parent;return e}for(;null!=n;){if(o=n.resolvers.get(t),null!=o)return _e(o,n,i);if(n=n.parent,null==n)return s}return s}getFactory(t){let e=He.get(t);if(void 0===e){if(Ke(t))throw new Error(`${t.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);He.set(t,e=new Ae(t,ue.getDependencies(t)))}return e}registerFactory(t,e){He.set(t,e)}createChild(t){return new ze(null,Object.assign({},this.config,t,{parentLocator:()=>this}))}jitRegister(t,e){if("function"!=typeof t)throw new Error(`Attempted to jitRegister something that is not a constructor: '${t}'. Did you forget to register this dependency?`);if(Me.has(t.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${t.name}. Did you forget to add @inject(Key)`);if(Le(t)){const i=t.register(e);if(!(i instanceof Object)||null==i.resolve){const i=e.resolvers.get(t);if(null!=i)return i;throw new Error("A valid resolver was not returned from the static register method")}return i}if(t.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${t.friendlyName}`);{const i=this.config.defaultResolver(t,e);return e.resolvers.set(t,i),i}}}const Ne=new WeakMap;function Be(t){return function(e,i,s){if(Ne.has(s))return Ne.get(s);const o=t(e,i,s);return Ne.set(s,o),o}}const qe=Object.freeze({instance:(t,e)=>new Se(t,0,e),singleton:(t,e)=>new Se(t,1,e),transient:(t,e)=>new Se(t,2,e),callback:(t,e)=>new Se(t,3,e),cachedCallback:(t,e)=>new Se(t,3,Be(e)),aliasTo:(t,e)=>new Se(e,5,t)});function Ue(t){if(null==t)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function _e(t,e,i){if(t instanceof Se&&4===t.strategy){const s=t.state;let o=s.length;const n=new Array(o);for(;o--;)n[o]=s[o].resolve(e,i);return n}return[t.resolve(e,i)]}const je="(anonymous)";function We(t){return"object"==typeof t&&null!==t||"function"==typeof t}const Ke=function(){const t=new WeakMap;let e=!1,i="",s=0;return function(o){return e=t.get(o),void 0===e&&(i=o.toString(),s=i.length,e=s>=29&&s<=100&&125===i.charCodeAt(s-1)&&i.charCodeAt(s-2)<=32&&93===i.charCodeAt(s-3)&&101===i.charCodeAt(s-4)&&100===i.charCodeAt(s-5)&&111===i.charCodeAt(s-6)&&99===i.charCodeAt(s-7)&&32===i.charCodeAt(s-8)&&101===i.charCodeAt(s-9)&&118===i.charCodeAt(s-10)&&105===i.charCodeAt(s-11)&&116===i.charCodeAt(s-12)&&97===i.charCodeAt(s-13)&&110===i.charCodeAt(s-14)&&88===i.charCodeAt(s-15),t.set(o,e)),e}}(),Ye={};function Xe(t){switch(typeof t){case"number":return t>=0&&(0|t)===t;case"string":{const e=Ye[t];if(void 0!==e)return e;const i=t.length;if(0===i)return Ye[t]=!1;let s=0;for(let e=0;e<i;++e)if(s=t.charCodeAt(e),0===e&&48===s&&i>1||s<48||s>57)return Ye[t]=!1;return Ye[t]=!0}default:return!1}}function Ge(t){return`${t.toLowerCase()}:presentation`}const Qe=new Map,Ze=Object.freeze({define(t,e,i){const s=Ge(t);void 0===Qe.get(s)?Qe.set(s,e):Qe.set(s,!1),i.register(qe.instance(s,e))},forTag(t,e){const i=Ge(t),s=Qe.get(i);if(!1===s){return ue.findResponsibleContainer(e).get(i)}return s||null}});class Je{constructor(t,e){this.template=t||null,this.styles=void 0===e?null:Array.isArray(e)?K.create(e):e instanceof K?e:K.create([e])}applyTo(t){const e=t.$fastController;null===e.template&&(e.template=this.template),null===e.styles&&(e.styles=this.styles)}}class ti extends gt{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=Ze.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(t){return(e={})=>new ii(this===ti?class extends ti{}:this,t,e)}}function ei(t,e,i){return"function"==typeof t?t(e,i):t}se([f],ti.prototype,"template",void 0),se([f],ti.prototype,"styles",void 0);class ii{constructor(t,e,i){this.type=t,this.elementDefinition=e,this.overrideDefinition=i,this.definition={...this.elementDefinition,...this.overrideDefinition}}register(t,e){const i=this.definition,s=this.overrideDefinition,o=`${i.prefix||e.elementPrefix}-${i.baseName}`;e.tryDefineElement({name:o,type:this.type,baseClass:this.elementDefinition.baseClass,callback:t=>{const e=new Je(ei(i.template,t,i),ei(i.styles,t,i));t.definePresentation(e);let o=ei(i.shadowOptions,t,i);t.shadowRootMode&&(o?s.shadowOptions||(o.mode=t.shadowRootMode):null!==o&&(o={mode:t.shadowRootMode})),t.defineElement({elementOptions:ei(i.elementOptions,t,i),shadowOptions:o,attributes:ei(i.attributes,t,i)})}})}}function si(t,...e){const i=st.locate(t);e.forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((i=>{"constructor"!==i&&Object.defineProperty(t.prototype,i,Object.getOwnPropertyDescriptor(e.prototype,i))}));st.locate(e).forEach((t=>i.push(t)))}))}class oi extends ti{constructor(){super(...arguments),this.headinglevel=2,this.expanded=!1,this.clickHandler=t=>{this.expanded=!this.expanded,this.change()},this.change=()=>{this.$emit("change")}}}se([at({attribute:"heading-level",mode:"fromView",converter:nt})],oi.prototype,"headinglevel",void 0),se([at({mode:"boolean"})],oi.prototype,"expanded",void 0),se([at],oi.prototype,"id",void 0),si(oi,Qt);const ni=(t,e)=>W`
84
84
  <template>
85
- <slot ${Xt({property:"accordionItems",filter:Wt()})}></slot>
86
- <slot name="item" part="item" ${Xt("accordionItems")}></slot>
85
+ <slot ${Yt({property:"accordionItems",filter:jt()})}></slot>
86
+ <slot name="item" part="item" ${Yt("accordionItems")}></slot>
87
87
  </template>
88
- `,ai="horizontal",li="vertical";function hi(...t){return t.every((t=>t instanceof HTMLElement))}let di;const ci="focus",ui="focusin",pi="focusout",mi="keydown",fi="resize",vi="scroll";var gi;!function(t){t[t.alt=18]="alt",t[t.arrowDown=40]="arrowDown",t[t.arrowLeft=37]="arrowLeft",t[t.arrowRight=39]="arrowRight",t[t.arrowUp=38]="arrowUp",t[t.back=8]="back",t[t.backSlash=220]="backSlash",t[t.break=19]="break",t[t.capsLock=20]="capsLock",t[t.closeBracket=221]="closeBracket",t[t.colon=186]="colon",t[t.colon2=59]="colon2",t[t.comma=188]="comma",t[t.ctrl=17]="ctrl",t[t.delete=46]="delete",t[t.end=35]="end",t[t.enter=13]="enter",t[t.equals=187]="equals",t[t.equals2=61]="equals2",t[t.equals3=107]="equals3",t[t.escape=27]="escape",t[t.forwardSlash=191]="forwardSlash",t[t.function1=112]="function1",t[t.function10=121]="function10",t[t.function11=122]="function11",t[t.function12=123]="function12",t[t.function2=113]="function2",t[t.function3=114]="function3",t[t.function4=115]="function4",t[t.function5=116]="function5",t[t.function6=117]="function6",t[t.function7=118]="function7",t[t.function8=119]="function8",t[t.function9=120]="function9",t[t.home=36]="home",t[t.insert=45]="insert",t[t.menu=93]="menu",t[t.minus=189]="minus",t[t.minus2=109]="minus2",t[t.numLock=144]="numLock",t[t.numPad0=96]="numPad0",t[t.numPad1=97]="numPad1",t[t.numPad2=98]="numPad2",t[t.numPad3=99]="numPad3",t[t.numPad4=100]="numPad4",t[t.numPad5=101]="numPad5",t[t.numPad6=102]="numPad6",t[t.numPad7=103]="numPad7",t[t.numPad8=104]="numPad8",t[t.numPad9=105]="numPad9",t[t.numPadDivide=111]="numPadDivide",t[t.numPadDot=110]="numPadDot",t[t.numPadMinus=109]="numPadMinus",t[t.numPadMultiply=106]="numPadMultiply",t[t.numPadPlus=107]="numPadPlus",t[t.openBracket=219]="openBracket",t[t.pageDown=34]="pageDown",t[t.pageUp=33]="pageUp",t[t.period=190]="period",t[t.print=44]="print",t[t.quote=222]="quote",t[t.scrollLock=145]="scrollLock",t[t.shift=16]="shift",t[t.space=32]="space",t[t.tab=9]="tab",t[t.tilde=192]="tilde",t[t.windowsLeft=91]="windowsLeft",t[t.windowsOpera=219]="windowsOpera",t[t.windowsRight=92]="windowsRight"}(gi||(gi={}));const bi="ArrowDown",yi="ArrowLeft",Ci="ArrowRight",xi="ArrowUp",wi="Enter",$i="Escape",Ii="Home",ki="End",Ei=" ",Ti="Tab",Oi={ArrowDown:bi,ArrowLeft:yi,ArrowRight:Ci,ArrowUp:xi};var Si;function Ri(t,e,i){return Math.min(Math.max(i,t),e)}function Ai(t,e,i=0){return[e,i]=[e,i].sort(((t,e)=>t-e)),e<=t&&t<i}!function(t){t.ltr="ltr",t.rtl="rtl"}(Si||(Si={}));let Di=0;function Fi(t=""){return`${t}${Di++}`}const Li={single:"single",multi:"multi"};class Pi extends ei{constructor(){super(...arguments),this.expandmode=Li.multi,this.activeItemIndex=0,this.change=()=>{this.$emit("change",this.activeid)},this.setItems=()=>{if(0!==this.accordionItems.length&&(this.accordionIds=this.getItemIds(),this.accordionItems.forEach(((t,e)=>{t instanceof ni&&(t.addEventListener("change",this.activeItemChange),this.isSingleExpandMode()&&(t.expanded=this.activeItemIndex===e));const i=this.accordionIds[e];t.setAttribute("id","string"!=typeof i?`accordion-${e+1}`:i),this.activeid=this.accordionIds[this.activeItemIndex],t.addEventListener("keydown",this.handleItemKeyDown),t.addEventListener("focus",this.handleItemFocus)})),this.isSingleExpandMode())){(this.findExpandedItem()??this.accordionItems[0]).setAttribute("aria-disabled","true")}},this.removeItemListeners=t=>{t.forEach(((t,e)=>{t.removeEventListener("change",this.activeItemChange),t.removeEventListener("keydown",this.handleItemKeyDown),t.removeEventListener("focus",this.handleItemFocus)}))},this.activeItemChange=t=>{if(t.defaultPrevented||t.target!==t.currentTarget)return;t.preventDefault();const e=t.target;this.activeid=e.getAttribute("id"),this.isSingleExpandMode()&&(this.resetItems(),e.expanded=!0,e.setAttribute("aria-disabled","true"),this.accordionItems.forEach((t=>{t.hasAttribute("disabled")||t.id===this.activeid||t.removeAttribute("aria-disabled")}))),this.activeItemIndex=Array.from(this.accordionItems).indexOf(e),this.change()},this.handleItemKeyDown=t=>{if(t.target===t.currentTarget)switch(this.accordionIds=this.getItemIds(),t.key){case xi:t.preventDefault(),this.adjust(-1);break;case bi:t.preventDefault(),this.adjust(1);break;case Ii:this.activeItemIndex=0,this.focusItem();break;case ki:this.activeItemIndex=this.accordionItems.length-1,this.focusItem()}},this.handleItemFocus=t=>{if(t.target===t.currentTarget){const e=t.target,i=this.activeItemIndex=Array.from(this.accordionItems).indexOf(e);this.activeItemIndex!==i&&-1!==i&&(this.activeItemIndex=i,this.activeid=this.accordionIds[this.activeItemIndex])}}}accordionItemsChanged(t,e){this.$fastController.isConnected&&(this.removeItemListeners(t),this.setItems())}findExpandedItem(){for(let t=0;t<this.accordionItems.length;t++)if("true"===this.accordionItems[t].getAttribute("expanded"))return this.accordionItems[t];return null}resetItems(){this.accordionItems.forEach(((t,e)=>{t.expanded=!1}))}getItemIds(){return this.accordionItems.map((t=>t.getAttribute("id")))}isSingleExpandMode(){return this.expandmode===Li.single}adjust(t){var e,i,s;this.activeItemIndex=(e=0,i=this.accordionItems.length-1,(s=this.activeItemIndex+t)<e?i:s>i?e:s),this.focusItem()}focusItem(){const t=this.accordionItems[this.activeItemIndex];t instanceof ni&&t.expandbutton.focus()}}oe([lt({attribute:"expand-mode"})],Pi.prototype,"expandmode",void 0),oe([f],Pi.prototype,"accordionItems",void 0);const Mi=(t,e)=>K`
88
+ `,ri="horizontal",ai="vertical";function li(...t){return t.every((t=>t instanceof HTMLElement))}let hi;const di="focus",ci="focusin",ui="focusout",pi="keydown",mi="resize",fi="scroll";var vi;!function(t){t[t.alt=18]="alt",t[t.arrowDown=40]="arrowDown",t[t.arrowLeft=37]="arrowLeft",t[t.arrowRight=39]="arrowRight",t[t.arrowUp=38]="arrowUp",t[t.back=8]="back",t[t.backSlash=220]="backSlash",t[t.break=19]="break",t[t.capsLock=20]="capsLock",t[t.closeBracket=221]="closeBracket",t[t.colon=186]="colon",t[t.colon2=59]="colon2",t[t.comma=188]="comma",t[t.ctrl=17]="ctrl",t[t.delete=46]="delete",t[t.end=35]="end",t[t.enter=13]="enter",t[t.equals=187]="equals",t[t.equals2=61]="equals2",t[t.equals3=107]="equals3",t[t.escape=27]="escape",t[t.forwardSlash=191]="forwardSlash",t[t.function1=112]="function1",t[t.function10=121]="function10",t[t.function11=122]="function11",t[t.function12=123]="function12",t[t.function2=113]="function2",t[t.function3=114]="function3",t[t.function4=115]="function4",t[t.function5=116]="function5",t[t.function6=117]="function6",t[t.function7=118]="function7",t[t.function8=119]="function8",t[t.function9=120]="function9",t[t.home=36]="home",t[t.insert=45]="insert",t[t.menu=93]="menu",t[t.minus=189]="minus",t[t.minus2=109]="minus2",t[t.numLock=144]="numLock",t[t.numPad0=96]="numPad0",t[t.numPad1=97]="numPad1",t[t.numPad2=98]="numPad2",t[t.numPad3=99]="numPad3",t[t.numPad4=100]="numPad4",t[t.numPad5=101]="numPad5",t[t.numPad6=102]="numPad6",t[t.numPad7=103]="numPad7",t[t.numPad8=104]="numPad8",t[t.numPad9=105]="numPad9",t[t.numPadDivide=111]="numPadDivide",t[t.numPadDot=110]="numPadDot",t[t.numPadMinus=109]="numPadMinus",t[t.numPadMultiply=106]="numPadMultiply",t[t.numPadPlus=107]="numPadPlus",t[t.openBracket=219]="openBracket",t[t.pageDown=34]="pageDown",t[t.pageUp=33]="pageUp",t[t.period=190]="period",t[t.print=44]="print",t[t.quote=222]="quote",t[t.scrollLock=145]="scrollLock",t[t.shift=16]="shift",t[t.space=32]="space",t[t.tab=9]="tab",t[t.tilde=192]="tilde",t[t.windowsLeft=91]="windowsLeft",t[t.windowsOpera=219]="windowsOpera",t[t.windowsRight=92]="windowsRight"}(vi||(vi={}));const gi="ArrowDown",bi="ArrowLeft",yi="ArrowRight",Ci="ArrowUp",xi="Enter",wi="Escape",$i="Home",Ii="End",ki=" ",Ei="Tab",Ti={ArrowDown:gi,ArrowLeft:bi,ArrowRight:yi,ArrowUp:Ci};var Oi;function Si(t,e,i){return Math.min(Math.max(i,t),e)}function Ri(t,e,i=0){return[e,i]=[e,i].sort(((t,e)=>t-e)),e<=t&&t<i}!function(t){t.ltr="ltr",t.rtl="rtl"}(Oi||(Oi={}));let Di=0;function Ai(t=""){return`${t}${Di++}`}const Fi={single:"single",multi:"multi"};class Li extends ti{constructor(){super(...arguments),this.expandmode=Fi.multi,this.activeItemIndex=0,this.change=()=>{this.$emit("change",this.activeid)},this.setItems=()=>{if(0!==this.accordionItems.length&&(this.accordionIds=this.getItemIds(),this.accordionItems.forEach(((t,e)=>{t instanceof oi&&(t.addEventListener("change",this.activeItemChange),this.isSingleExpandMode()&&(t.expanded=this.activeItemIndex===e));const i=this.accordionIds[e];t.setAttribute("id","string"!=typeof i?`accordion-${e+1}`:i),this.activeid=this.accordionIds[this.activeItemIndex],t.addEventListener("keydown",this.handleItemKeyDown),t.addEventListener("focus",this.handleItemFocus)})),this.isSingleExpandMode())){(this.findExpandedItem()??this.accordionItems[0]).setAttribute("aria-disabled","true")}},this.removeItemListeners=t=>{t.forEach(((t,e)=>{t.removeEventListener("change",this.activeItemChange),t.removeEventListener("keydown",this.handleItemKeyDown),t.removeEventListener("focus",this.handleItemFocus)}))},this.activeItemChange=t=>{if(t.defaultPrevented||t.target!==t.currentTarget)return;t.preventDefault();const e=t.target;this.activeid=e.getAttribute("id"),this.isSingleExpandMode()&&(this.resetItems(),e.expanded=!0,e.setAttribute("aria-disabled","true"),this.accordionItems.forEach((t=>{t.hasAttribute("disabled")||t.id===this.activeid||t.removeAttribute("aria-disabled")}))),this.activeItemIndex=Array.from(this.accordionItems).indexOf(e),this.change()},this.handleItemKeyDown=t=>{if(t.target===t.currentTarget)switch(this.accordionIds=this.getItemIds(),t.key){case Ci:t.preventDefault(),this.adjust(-1);break;case gi:t.preventDefault(),this.adjust(1);break;case $i:this.activeItemIndex=0,this.focusItem();break;case Ii:this.activeItemIndex=this.accordionItems.length-1,this.focusItem()}},this.handleItemFocus=t=>{if(t.target===t.currentTarget){const e=t.target,i=this.activeItemIndex=Array.from(this.accordionItems).indexOf(e);this.activeItemIndex!==i&&-1!==i&&(this.activeItemIndex=i,this.activeid=this.accordionIds[this.activeItemIndex])}}}accordionItemsChanged(t,e){this.$fastController.isConnected&&(this.removeItemListeners(t),this.setItems())}findExpandedItem(){for(let t=0;t<this.accordionItems.length;t++)if("true"===this.accordionItems[t].getAttribute("expanded"))return this.accordionItems[t];return null}resetItems(){this.accordionItems.forEach(((t,e)=>{t.expanded=!1}))}getItemIds(){return this.accordionItems.map((t=>t.getAttribute("id")))}isSingleExpandMode(){return this.expandmode===Fi.single}adjust(t){var e,i,s;this.activeItemIndex=(e=0,i=this.accordionItems.length-1,(s=this.activeItemIndex+t)<e?i:s>i?e:s),this.focusItem()}focusItem(){const t=this.accordionItems[this.activeItemIndex];t instanceof oi&&t.expandbutton.focus()}}se([at({attribute:"expand-mode"})],Li.prototype,"expandmode",void 0),se([f],Li.prototype,"accordionItems",void 0);const Pi=(t,e)=>W`
89
89
  <a
90
90
  class="control"
91
91
  part="control"
@@ -117,21 +117,21 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
117
117
  aria-owns="${t=>t.ariaOwns}"
118
118
  aria-relevant="${t=>t.ariaRelevant}"
119
119
  aria-roledescription="${t=>t.ariaRoledescription}"
120
- ${Pt("control")}
120
+ ${Lt("control")}
121
121
  >
122
- ${te(0,e)}
122
+ ${Jt(0,e)}
123
123
  <span class="content" part="content">
124
- <slot ${Xt("defaultSlottedContent")}></slot>
124
+ <slot ${Yt("defaultSlottedContent")}></slot>
125
125
  </span>
126
- ${Jt(0,e)}
126
+ ${Zt(0,e)}
127
127
  </a>
128
- `;class Vi{}oe([lt({attribute:"aria-atomic"})],Vi.prototype,"ariaAtomic",void 0),oe([lt({attribute:"aria-busy"})],Vi.prototype,"ariaBusy",void 0),oe([lt({attribute:"aria-controls"})],Vi.prototype,"ariaControls",void 0),oe([lt({attribute:"aria-current"})],Vi.prototype,"ariaCurrent",void 0),oe([lt({attribute:"aria-describedby"})],Vi.prototype,"ariaDescribedby",void 0),oe([lt({attribute:"aria-details"})],Vi.prototype,"ariaDetails",void 0),oe([lt({attribute:"aria-disabled"})],Vi.prototype,"ariaDisabled",void 0),oe([lt({attribute:"aria-errormessage"})],Vi.prototype,"ariaErrormessage",void 0),oe([lt({attribute:"aria-flowto"})],Vi.prototype,"ariaFlowto",void 0),oe([lt({attribute:"aria-haspopup"})],Vi.prototype,"ariaHaspopup",void 0),oe([lt({attribute:"aria-hidden"})],Vi.prototype,"ariaHidden",void 0),oe([lt({attribute:"aria-invalid"})],Vi.prototype,"ariaInvalid",void 0),oe([lt({attribute:"aria-keyshortcuts"})],Vi.prototype,"ariaKeyshortcuts",void 0),oe([lt({attribute:"aria-label"})],Vi.prototype,"ariaLabel",void 0),oe([lt({attribute:"aria-labelledby"})],Vi.prototype,"ariaLabelledby",void 0),oe([lt({attribute:"aria-live"})],Vi.prototype,"ariaLive",void 0),oe([lt({attribute:"aria-owns"})],Vi.prototype,"ariaOwns",void 0),oe([lt({attribute:"aria-relevant"})],Vi.prototype,"ariaRelevant",void 0),oe([lt({attribute:"aria-roledescription"})],Vi.prototype,"ariaRoledescription",void 0);class Hi extends ei{constructor(){super(...arguments),this.handleUnsupportedDelegatesFocus=()=>{window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&this.$fastController.definition.shadowOptions?.delegatesFocus&&(this.focus=()=>{this.control?.focus()})}}connectedCallback(){super.connectedCallback(),this.handleUnsupportedDelegatesFocus()}}oe([lt],Hi.prototype,"download",void 0),oe([lt],Hi.prototype,"href",void 0),oe([lt],Hi.prototype,"hreflang",void 0),oe([lt],Hi.prototype,"ping",void 0),oe([lt],Hi.prototype,"referrerpolicy",void 0),oe([lt],Hi.prototype,"rel",void 0),oe([lt],Hi.prototype,"target",void 0),oe([lt],Hi.prototype,"type",void 0),oe([f],Hi.prototype,"defaultSlottedContent",void 0);class zi{}oe([lt({attribute:"aria-expanded"})],zi.prototype,"ariaExpanded",void 0),oi(zi,Vi),oi(Hi,Zt,zi);const Ni=(t,e)=>K`
128
+ `;class Mi{}se([at({attribute:"aria-atomic"})],Mi.prototype,"ariaAtomic",void 0),se([at({attribute:"aria-busy"})],Mi.prototype,"ariaBusy",void 0),se([at({attribute:"aria-controls"})],Mi.prototype,"ariaControls",void 0),se([at({attribute:"aria-current"})],Mi.prototype,"ariaCurrent",void 0),se([at({attribute:"aria-describedby"})],Mi.prototype,"ariaDescribedby",void 0),se([at({attribute:"aria-details"})],Mi.prototype,"ariaDetails",void 0),se([at({attribute:"aria-disabled"})],Mi.prototype,"ariaDisabled",void 0),se([at({attribute:"aria-errormessage"})],Mi.prototype,"ariaErrormessage",void 0),se([at({attribute:"aria-flowto"})],Mi.prototype,"ariaFlowto",void 0),se([at({attribute:"aria-haspopup"})],Mi.prototype,"ariaHaspopup",void 0),se([at({attribute:"aria-hidden"})],Mi.prototype,"ariaHidden",void 0),se([at({attribute:"aria-invalid"})],Mi.prototype,"ariaInvalid",void 0),se([at({attribute:"aria-keyshortcuts"})],Mi.prototype,"ariaKeyshortcuts",void 0),se([at({attribute:"aria-label"})],Mi.prototype,"ariaLabel",void 0),se([at({attribute:"aria-labelledby"})],Mi.prototype,"ariaLabelledby",void 0),se([at({attribute:"aria-live"})],Mi.prototype,"ariaLive",void 0),se([at({attribute:"aria-owns"})],Mi.prototype,"ariaOwns",void 0),se([at({attribute:"aria-relevant"})],Mi.prototype,"ariaRelevant",void 0),se([at({attribute:"aria-roledescription"})],Mi.prototype,"ariaRoledescription",void 0);class Vi extends ti{constructor(){super(...arguments),this.handleUnsupportedDelegatesFocus=()=>{window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&this.$fastController.definition.shadowOptions?.delegatesFocus&&(this.focus=()=>{this.control?.focus()})}}connectedCallback(){super.connectedCallback(),this.handleUnsupportedDelegatesFocus()}}se([at],Vi.prototype,"download",void 0),se([at],Vi.prototype,"href",void 0),se([at],Vi.prototype,"hreflang",void 0),se([at],Vi.prototype,"ping",void 0),se([at],Vi.prototype,"referrerpolicy",void 0),se([at],Vi.prototype,"rel",void 0),se([at],Vi.prototype,"target",void 0),se([at],Vi.prototype,"type",void 0),se([f],Vi.prototype,"defaultSlottedContent",void 0);class Hi{}se([at({attribute:"aria-expanded"})],Hi.prototype,"ariaExpanded",void 0),si(Hi,Mi),si(Vi,Qt,Hi);const zi=(t,e)=>W`
129
129
  <template class="${t=>t.initialLayoutComplete?"loaded":""}">
130
- ${zt((t=>t.initialLayoutComplete),K`
130
+ ${Ht((t=>t.initialLayoutComplete),W`
131
131
  <slot></slot>
132
132
  `)}
133
133
  </template>
134
- `,Bi=t=>{const e=t.closest("[dir]");return null!==e&&"rtl"===e.dir?Si.rtl:Si.ltr};class qi{constructor(){this.intersectionDetector=null,this.observedElements=new Map,this.requestPosition=(t,e)=>{null!==this.intersectionDetector&&(this.observedElements.has(t)?this.observedElements.get(t)?.push(e):(this.observedElements.set(t,[e]),this.intersectionDetector.observe(t)))},this.cancelRequestPosition=(t,e)=>{const i=this.observedElements.get(t);if(void 0!==i){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}},this.initializeIntersectionDetector=()=>{t.IntersectionObserver&&(this.intersectionDetector=new IntersectionObserver(this.handleIntersection,{root:null,rootMargin:"0px",threshold:[0,1]}))},this.handleIntersection=t=>{if(null===this.intersectionDetector)return;const e=[],i=[];t.forEach((t=>{this.intersectionDetector?.unobserve(t.target);const s=this.observedElements.get(t.target);void 0!==s&&(s.forEach((s=>{let o=e.indexOf(s);-1===o&&(o=e.length,e.push(s),i.push([])),i[o].push(t)})),this.observedElements.delete(t.target))})),e.forEach(((t,e)=>{t(i[e])}))},this.initializeIntersectionDetector()}}class Ui extends ei{constructor(){super(...arguments),this.anchor="",this.viewport="",this.horizontalPositioningMode="uncontrolled",this.horizontalDefaultPosition="unset",this.horizontalViewportLock=!1,this.horizontalInset=!1,this.horizontalScaling="content",this.verticalPositioningMode="uncontrolled",this.verticalDefaultPosition="unset",this.verticalViewportLock=!1,this.verticalInset=!1,this.verticalScaling="content",this.fixedPlacement=!1,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.initialLayoutComplete=!1,this.resizeDetector=null,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.pendingPositioningUpdate=!1,this.pendingReset=!1,this.currentDirection=Si.ltr,this.regionVisible=!1,this.forceUpdate=!1,this.updateThreshold=.5,this.update=()=>{this.pendingPositioningUpdate||this.requestPositionUpdates()},this.startObservers=()=>{this.stopObservers(),null!==this.anchorElement&&(this.requestPositionUpdates(),null!==this.resizeDetector&&(this.resizeDetector.observe(this.anchorElement),this.resizeDetector.observe(this)))},this.requestPositionUpdates=()=>{null===this.anchorElement||this.pendingPositioningUpdate||(Ui.intersectionService.requestPosition(this,this.handleIntersection),Ui.intersectionService.requestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&Ui.intersectionService.requestPosition(this.viewportElement,this.handleIntersection),this.pendingPositioningUpdate=!0)},this.stopObservers=()=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,Ui.intersectionService.cancelRequestPosition(this,this.handleIntersection),null!==this.anchorElement&&Ui.intersectionService.cancelRequestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&Ui.intersectionService.cancelRequestPosition(this.viewportElement,this.handleIntersection)),null!==this.resizeDetector&&this.resizeDetector.disconnect()},this.getViewport=()=>"string"!=typeof this.viewport||""===this.viewport?document.documentElement:document.getElementById(this.viewport),this.getAnchor=()=>document.getElementById(this.anchor),this.handleIntersection=t=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,this.applyIntersectionEntries(t)&&this.updateLayout())},this.applyIntersectionEntries=t=>{const e=t.find((t=>t.target===this)),i=t.find((t=>t.target===this.anchorElement)),s=t.find((t=>t.target===this.viewportElement));return void 0!==e&&void 0!==s&&void 0!==i&&(!!(!this.regionVisible||this.forceUpdate||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect||this.isRectDifferent(this.anchorRect,i.boundingClientRect)||this.isRectDifferent(this.viewportRect,s.boundingClientRect)||this.isRectDifferent(this.regionRect,e.boundingClientRect))&&(this.regionRect=e.boundingClientRect,this.anchorRect=i.boundingClientRect,this.viewportElement===document.documentElement?this.viewportRect=new DOMRectReadOnly(s.boundingClientRect.x+document.documentElement.scrollLeft,s.boundingClientRect.y+document.documentElement.scrollTop,s.boundingClientRect.width,s.boundingClientRect.height):this.viewportRect=s.boundingClientRect,this.updateRegionOffset(),this.forceUpdate=!1,!0))},this.updateRegionOffset=()=>{this.anchorRect&&this.regionRect&&(this.baseHorizontalOffset=this.baseHorizontalOffset+(this.anchorRect.left-this.regionRect.left)+(this.translateX-this.baseHorizontalOffset),this.baseVerticalOffset=this.baseVerticalOffset+(this.anchorRect.top-this.regionRect.top)+(this.translateY-this.baseVerticalOffset))},this.isRectDifferent=(t,e)=>Math.abs(t.top-e.top)>this.updateThreshold||Math.abs(t.right-e.right)>this.updateThreshold||Math.abs(t.bottom-e.bottom)>this.updateThreshold||Math.abs(t.left-e.left)>this.updateThreshold,this.handleResize=t=>{this.update()},this.reset=()=>{this.pendingReset&&(this.pendingReset=!1,null===this.anchorElement&&(this.anchorElement=this.getAnchor()),null===this.viewportElement&&(this.viewportElement=this.getViewport()),this.currentDirection=Bi(this),this.startObservers())},this.updateLayout=()=>{let t,e;if("uncontrolled"!==this.horizontalPositioningMode){const t=this.getPositioningOptions(this.horizontalInset);if("center"===this.horizontalDefaultPosition)e="center";else if("unset"!==this.horizontalDefaultPosition){let t=this.horizontalDefaultPosition;if("start"===t||"end"===t){const e=Bi(this);if(e!==this.currentDirection)return this.currentDirection=e,void this.initialize();t=this.currentDirection===Si.ltr?"start"===t?"left":"right":"start"===t?"right":"left"}switch(t){case"left":e=this.horizontalInset?"insetStart":"start";break;case"right":e=this.horizontalInset?"insetEnd":"end"}}const i=void 0!==this.horizontalThreshold?this.horizontalThreshold:void 0!==this.regionRect?this.regionRect.width:0,s=void 0!==this.anchorRect?this.anchorRect.left:0,o=void 0!==this.anchorRect?this.anchorRect.right:0,n=void 0!==this.anchorRect?this.anchorRect.width:0,r=void 0!==this.viewportRect?this.viewportRect.left:0,a=void 0!==this.viewportRect?this.viewportRect.right:0;(void 0===e||"locktodefault"!==this.horizontalPositioningMode&&this.getAvailableSpace(e,s,o,n,r,a)<i)&&(e=this.getAvailableSpace(t[0],s,o,n,r,a)>this.getAvailableSpace(t[1],s,o,n,r,a)?t[0]:t[1])}if("uncontrolled"!==this.verticalPositioningMode){const e=this.getPositioningOptions(this.verticalInset);if("center"===this.verticalDefaultPosition)t="center";else if("unset"!==this.verticalDefaultPosition)switch(this.verticalDefaultPosition){case"top":t=this.verticalInset?"insetStart":"start";break;case"bottom":t=this.verticalInset?"insetEnd":"end"}const i=void 0!==this.verticalThreshold?this.verticalThreshold:void 0!==this.regionRect?this.regionRect.height:0,s=void 0!==this.anchorRect?this.anchorRect.top:0,o=void 0!==this.anchorRect?this.anchorRect.bottom:0,n=void 0!==this.anchorRect?this.anchorRect.height:0,r=void 0!==this.viewportRect?this.viewportRect.top:0,a=void 0!==this.viewportRect?this.viewportRect.bottom:0;(void 0===t||"locktodefault"!==this.verticalPositioningMode&&this.getAvailableSpace(t,s,o,n,r,a)<i)&&(t=this.getAvailableSpace(e[0],s,o,n,r,a)>this.getAvailableSpace(e[1],s,o,n,r,a)?e[0]:e[1])}const i=this.getNextRegionDimension(e,t),s=this.horizontalPosition!==e||this.verticalPosition!==t;if(this.setHorizontalPosition(e,i),this.setVerticalPosition(t,i),this.updateRegionStyle(),!this.initialLayoutComplete)return this.initialLayoutComplete=!0,void this.requestPositionUpdates();this.regionVisible||(this.regionVisible=!0,this.style.removeProperty("pointer-events"),this.style.removeProperty("opacity"),this.classList.toggle("loaded",!0),this.$emit("loaded",this,{bubbles:!1})),this.updatePositionClasses(),s&&this.$emit("positionchange",this,{bubbles:!1})},this.updateRegionStyle=()=>{this.style.width=this.regionWidth,this.style.height=this.regionHeight,this.style.transform=`translate(${this.translateX}px, ${this.translateY}px)`},this.updatePositionClasses=()=>{this.classList.toggle("top","start"===this.verticalPosition),this.classList.toggle("bottom","end"===this.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.verticalPosition),this.classList.toggle("vertical-center","center"===this.verticalPosition),this.classList.toggle("left","start"===this.horizontalPosition),this.classList.toggle("right","end"===this.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.horizontalPosition),this.classList.toggle("horizontal-center","center"===this.horizontalPosition)},this.setHorizontalPosition=(t,e)=>{if(void 0===t||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.horizontalScaling){case"anchor":case"fill":i=this.horizontalViewportLock?this.viewportRect.width:e.width,this.regionWidth=`${i}px`;break;case"content":i=this.regionRect.width,this.regionWidth="unset"}let s=0;switch(t){case"start":this.translateX=this.baseHorizontalOffset-i,this.horizontalViewportLock&&this.anchorRect.left>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.right));break;case"insetStart":this.translateX=this.baseHorizontalOffset-i+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.right));break;case"insetEnd":this.translateX=this.baseHorizontalOffset,this.horizontalViewportLock&&this.anchorRect.left<this.viewportRect.left&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.left));break;case"end":this.translateX=this.baseHorizontalOffset+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right<this.viewportRect.left&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.left));break;case"center":if(s=(this.anchorRect.width-i)/2,this.translateX=this.baseHorizontalOffset+s,this.horizontalViewportLock){const t=this.anchorRect.left+s,e=this.anchorRect.right-s;t<this.viewportRect.left&&!(e>this.viewportRect.right)?this.translateX=this.translateX-(t-this.viewportRect.left):e>this.viewportRect.right&&!(t<this.viewportRect.left)&&(this.translateX=this.translateX-(e-this.viewportRect.right))}}this.horizontalPosition=t},this.setVerticalPosition=(t,e)=>{if(void 0===t||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.verticalScaling){case"anchor":case"fill":i=this.verticalViewportLock?this.viewportRect.height:e.height,this.regionHeight=`${i}px`;break;case"content":i=this.regionRect.height,this.regionHeight="unset"}let s=0;switch(t){case"start":this.translateY=this.baseVerticalOffset-i,this.verticalViewportLock&&this.anchorRect.top>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.bottom));break;case"insetStart":this.translateY=this.baseVerticalOffset-i+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.bottom));break;case"insetEnd":this.translateY=this.baseVerticalOffset,this.verticalViewportLock&&this.anchorRect.top<this.viewportRect.top&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.top));break;case"end":this.translateY=this.baseVerticalOffset+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom<this.viewportRect.top&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.top));break;case"center":if(s=(this.anchorRect.height-i)/2,this.translateY=this.baseVerticalOffset+s,this.verticalViewportLock){const t=this.anchorRect.top+s,e=this.anchorRect.bottom-s;t<this.viewportRect.top&&!(e>this.viewportRect.bottom)?this.translateY=this.translateY-(t-this.viewportRect.top):e>this.viewportRect.bottom&&!(t<this.viewportRect.top)&&(this.translateY=this.translateY-(e-this.viewportRect.bottom))}}this.verticalPosition=t},this.getPositioningOptions=t=>t?["insetStart","insetEnd"]:["start","end"],this.getAvailableSpace=(t,e,i,s,o,n)=>{const r=e-o,a=n-(e+s);switch(t){case"start":return r;case"insetStart":return r+s;case"insetEnd":return a+s;case"end":return a;case"center":return 2*Math.min(r,a)+s}},this.getNextRegionDimension=(t,e)=>{const i={height:void 0!==this.regionRect?this.regionRect.height:0,width:void 0!==this.regionRect?this.regionRect.width:0};return void 0!==t&&"fill"===this.horizontalScaling?i.width=this.getAvailableSpace(t,void 0!==this.anchorRect?this.anchorRect.left:0,void 0!==this.anchorRect?this.anchorRect.right:0,void 0!==this.anchorRect?this.anchorRect.width:0,void 0!==this.viewportRect?this.viewportRect.left:0,void 0!==this.viewportRect?this.viewportRect.right:0):"anchor"===this.horizontalScaling&&(i.width=void 0!==this.anchorRect?this.anchorRect.width:0),void 0!==e&&"fill"===this.verticalScaling?i.height=this.getAvailableSpace(e,void 0!==this.anchorRect?this.anchorRect.top:0,void 0!==this.anchorRect?this.anchorRect.bottom:0,void 0!==this.anchorRect?this.anchorRect.height:0,void 0!==this.viewportRect?this.viewportRect.top:0,void 0!==this.viewportRect?this.viewportRect.bottom:0):"anchor"===this.verticalScaling&&(i.height=void 0!==this.anchorRect?this.anchorRect.height:0),i},this.startAutoUpdateEventListeners=()=>{window.addEventListener(fi,this.update,{passive:!0}),window.addEventListener(vi,this.update,{passive:!0,capture:!0}),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.observe(this.viewportElement)},this.stopAutoUpdateEventListeners=()=>{window.removeEventListener(fi,this.update),window.removeEventListener(vi,this.update),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.unobserve(this.viewportElement)}}anchorChanged(){this.initialLayoutComplete&&(this.anchorElement=this.getAnchor())}viewportChanged(){this.initialLayoutComplete&&(this.viewportElement=this.getViewport())}horizontalPositioningModeChanged(){this.requestReset()}horizontalDefaultPositionChanged(){this.updateForAttributeChange()}horizontalViewportLockChanged(){this.updateForAttributeChange()}horizontalInsetChanged(){this.updateForAttributeChange()}horizontalThresholdChanged(){this.updateForAttributeChange()}horizontalScalingChanged(){this.updateForAttributeChange()}verticalPositioningModeChanged(){this.requestReset()}verticalDefaultPositionChanged(){this.updateForAttributeChange()}verticalViewportLockChanged(){this.updateForAttributeChange()}verticalInsetChanged(){this.updateForAttributeChange()}verticalThresholdChanged(){this.updateForAttributeChange()}verticalScalingChanged(){this.updateForAttributeChange()}fixedPlacementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}autoUpdateModeChanged(t,e){this.$fastController.isConnected&&this.initialLayoutComplete&&("auto"===t&&this.stopAutoUpdateEventListeners(),"auto"===e&&this.startAutoUpdateEventListeners())}anchorElementChanged(){this.requestReset()}viewportElementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}static{this.intersectionService=new qi}connectedCallback(){super.connectedCallback(),"auto"===this.autoUpdateMode&&this.startAutoUpdateEventListeners(),this.initialize()}disconnectedCallback(){super.disconnectedCallback(),"auto"===this.autoUpdateMode&&this.stopAutoUpdateEventListeners(),this.stopObservers(),this.disconnectResizeDetector()}adoptedCallback(){this.initialize()}disconnectResizeDetector(){null!==this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.handleResize)}updateForAttributeChange(){this.$fastController.isConnected&&this.initialLayoutComplete&&(this.forceUpdate=!0,this.update())}initialize(){this.initializeResizeDetector(),null===this.anchorElement&&(this.anchorElement=this.getAnchor()),this.requestReset()}requestReset(){this.$fastController.isConnected&&!1===this.pendingReset&&(this.setInitialState(),c.queueUpdate((()=>this.reset())),this.pendingReset=!0)}setInitialState(){this.initialLayoutComplete=!1,this.regionVisible=!1,this.translateX=0,this.translateY=0,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.viewportRect=void 0,this.regionRect=void 0,this.anchorRect=void 0,this.verticalPosition=void 0,this.horizontalPosition=void 0,this.style.opacity="0",this.style.pointerEvents="none",this.forceUpdate=!1,this.style.position=this.fixedPlacement?"fixed":"absolute",this.updatePositionClasses(),this.updateRegionStyle()}}oe([lt],Ui.prototype,"anchor",void 0),oe([lt],Ui.prototype,"viewport",void 0),oe([lt({attribute:"horizontal-positioning-mode"})],Ui.prototype,"horizontalPositioningMode",void 0),oe([lt({attribute:"horizontal-default-position"})],Ui.prototype,"horizontalDefaultPosition",void 0),oe([lt({attribute:"horizontal-viewport-lock",mode:"boolean"})],Ui.prototype,"horizontalViewportLock",void 0),oe([lt({attribute:"horizontal-inset",mode:"boolean"})],Ui.prototype,"horizontalInset",void 0),oe([lt({attribute:"horizontal-threshold"})],Ui.prototype,"horizontalThreshold",void 0),oe([lt({attribute:"horizontal-scaling"})],Ui.prototype,"horizontalScaling",void 0),oe([lt({attribute:"vertical-positioning-mode"})],Ui.prototype,"verticalPositioningMode",void 0),oe([lt({attribute:"vertical-default-position"})],Ui.prototype,"verticalDefaultPosition",void 0),oe([lt({attribute:"vertical-viewport-lock",mode:"boolean"})],Ui.prototype,"verticalViewportLock",void 0),oe([lt({attribute:"vertical-inset",mode:"boolean"})],Ui.prototype,"verticalInset",void 0),oe([lt({attribute:"vertical-threshold"})],Ui.prototype,"verticalThreshold",void 0),oe([lt({attribute:"vertical-scaling"})],Ui.prototype,"verticalScaling",void 0),oe([lt({attribute:"fixed-placement",mode:"boolean"})],Ui.prototype,"fixedPlacement",void 0),oe([lt({attribute:"auto-update-mode"})],Ui.prototype,"autoUpdateMode",void 0),oe([f],Ui.prototype,"anchorElement",void 0),oe([f],Ui.prototype,"viewportElement",void 0),oe([f],Ui.prototype,"initialLayoutComplete",void 0);const _i={horizontalDefaultPosition:"center",horizontalPositioningMode:"locktodefault",horizontalInset:!1,horizontalScaling:"anchor"},ji={..._i,verticalDefaultPosition:"top",verticalPositioningMode:"locktodefault",verticalInset:!1,verticalScaling:"content"},Wi={..._i,verticalDefaultPosition:"bottom",verticalPositioningMode:"locktodefault",verticalInset:!1,verticalScaling:"content"},Ki={..._i,verticalPositioningMode:"dynamic",verticalInset:!1,verticalScaling:"content"},Yi={...ji,verticalScaling:"fill"},Xi={...Wi,verticalScaling:"fill"},Gi={...Ki,verticalScaling:"fill"},Qi=(t,e)=>K`
134
+ `,Ni=t=>{const e=t.closest("[dir]");return null!==e&&"rtl"===e.dir?Oi.rtl:Oi.ltr};class Bi{constructor(){this.intersectionDetector=null,this.observedElements=new Map,this.requestPosition=(t,e)=>{null!==this.intersectionDetector&&(this.observedElements.has(t)?this.observedElements.get(t)?.push(e):(this.observedElements.set(t,[e]),this.intersectionDetector.observe(t)))},this.cancelRequestPosition=(t,e)=>{const i=this.observedElements.get(t);if(void 0!==i){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}},this.initializeIntersectionDetector=()=>{t.IntersectionObserver&&(this.intersectionDetector=new IntersectionObserver(this.handleIntersection,{root:null,rootMargin:"0px",threshold:[0,1]}))},this.handleIntersection=t=>{if(null===this.intersectionDetector)return;const e=[],i=[];t.forEach((t=>{this.intersectionDetector?.unobserve(t.target);const s=this.observedElements.get(t.target);void 0!==s&&(s.forEach((s=>{let o=e.indexOf(s);-1===o&&(o=e.length,e.push(s),i.push([])),i[o].push(t)})),this.observedElements.delete(t.target))})),e.forEach(((t,e)=>{t(i[e])}))},this.initializeIntersectionDetector()}}class qi extends ti{constructor(){super(...arguments),this.anchor="",this.viewport="",this.horizontalPositioningMode="uncontrolled",this.horizontalDefaultPosition="unset",this.horizontalViewportLock=!1,this.horizontalInset=!1,this.horizontalScaling="content",this.verticalPositioningMode="uncontrolled",this.verticalDefaultPosition="unset",this.verticalViewportLock=!1,this.verticalInset=!1,this.verticalScaling="content",this.fixedPlacement=!1,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.initialLayoutComplete=!1,this.resizeDetector=null,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.pendingPositioningUpdate=!1,this.pendingReset=!1,this.currentDirection=Oi.ltr,this.regionVisible=!1,this.forceUpdate=!1,this.updateThreshold=.5,this.update=()=>{this.pendingPositioningUpdate||this.requestPositionUpdates()},this.startObservers=()=>{this.stopObservers(),null!==this.anchorElement&&(this.requestPositionUpdates(),null!==this.resizeDetector&&(this.resizeDetector.observe(this.anchorElement),this.resizeDetector.observe(this)))},this.requestPositionUpdates=()=>{null===this.anchorElement||this.pendingPositioningUpdate||(qi.intersectionService.requestPosition(this,this.handleIntersection),qi.intersectionService.requestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&qi.intersectionService.requestPosition(this.viewportElement,this.handleIntersection),this.pendingPositioningUpdate=!0)},this.stopObservers=()=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,qi.intersectionService.cancelRequestPosition(this,this.handleIntersection),null!==this.anchorElement&&qi.intersectionService.cancelRequestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&qi.intersectionService.cancelRequestPosition(this.viewportElement,this.handleIntersection)),null!==this.resizeDetector&&this.resizeDetector.disconnect()},this.getViewport=()=>"string"!=typeof this.viewport||""===this.viewport?document.documentElement:document.getElementById(this.viewport),this.getAnchor=()=>document.getElementById(this.anchor),this.handleIntersection=t=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,this.applyIntersectionEntries(t)&&this.updateLayout())},this.applyIntersectionEntries=t=>{const e=t.find((t=>t.target===this)),i=t.find((t=>t.target===this.anchorElement)),s=t.find((t=>t.target===this.viewportElement));return void 0!==e&&void 0!==s&&void 0!==i&&(!!(!this.regionVisible||this.forceUpdate||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect||this.isRectDifferent(this.anchorRect,i.boundingClientRect)||this.isRectDifferent(this.viewportRect,s.boundingClientRect)||this.isRectDifferent(this.regionRect,e.boundingClientRect))&&(this.regionRect=e.boundingClientRect,this.anchorRect=i.boundingClientRect,this.viewportElement===document.documentElement?this.viewportRect=new DOMRectReadOnly(s.boundingClientRect.x+document.documentElement.scrollLeft,s.boundingClientRect.y+document.documentElement.scrollTop,s.boundingClientRect.width,s.boundingClientRect.height):this.viewportRect=s.boundingClientRect,this.updateRegionOffset(),this.forceUpdate=!1,!0))},this.updateRegionOffset=()=>{this.anchorRect&&this.regionRect&&(this.baseHorizontalOffset=this.baseHorizontalOffset+(this.anchorRect.left-this.regionRect.left)+(this.translateX-this.baseHorizontalOffset),this.baseVerticalOffset=this.baseVerticalOffset+(this.anchorRect.top-this.regionRect.top)+(this.translateY-this.baseVerticalOffset))},this.isRectDifferent=(t,e)=>Math.abs(t.top-e.top)>this.updateThreshold||Math.abs(t.right-e.right)>this.updateThreshold||Math.abs(t.bottom-e.bottom)>this.updateThreshold||Math.abs(t.left-e.left)>this.updateThreshold,this.handleResize=t=>{this.update()},this.reset=()=>{this.pendingReset&&(this.pendingReset=!1,null===this.anchorElement&&(this.anchorElement=this.getAnchor()),null===this.viewportElement&&(this.viewportElement=this.getViewport()),this.currentDirection=Ni(this),this.startObservers())},this.updateLayout=()=>{let t,e;if("uncontrolled"!==this.horizontalPositioningMode){const t=this.getPositioningOptions(this.horizontalInset);if("center"===this.horizontalDefaultPosition)e="center";else if("unset"!==this.horizontalDefaultPosition){let t=this.horizontalDefaultPosition;if("start"===t||"end"===t){const e=Ni(this);if(e!==this.currentDirection)return this.currentDirection=e,void this.initialize();t=this.currentDirection===Oi.ltr?"start"===t?"left":"right":"start"===t?"right":"left"}switch(t){case"left":e=this.horizontalInset?"insetStart":"start";break;case"right":e=this.horizontalInset?"insetEnd":"end"}}const i=void 0!==this.horizontalThreshold?this.horizontalThreshold:void 0!==this.regionRect?this.regionRect.width:0,s=void 0!==this.anchorRect?this.anchorRect.left:0,o=void 0!==this.anchorRect?this.anchorRect.right:0,n=void 0!==this.anchorRect?this.anchorRect.width:0,r=void 0!==this.viewportRect?this.viewportRect.left:0,a=void 0!==this.viewportRect?this.viewportRect.right:0;(void 0===e||"locktodefault"!==this.horizontalPositioningMode&&this.getAvailableSpace(e,s,o,n,r,a)<i)&&(e=this.getAvailableSpace(t[0],s,o,n,r,a)>this.getAvailableSpace(t[1],s,o,n,r,a)?t[0]:t[1])}if("uncontrolled"!==this.verticalPositioningMode){const e=this.getPositioningOptions(this.verticalInset);if("center"===this.verticalDefaultPosition)t="center";else if("unset"!==this.verticalDefaultPosition)switch(this.verticalDefaultPosition){case"top":t=this.verticalInset?"insetStart":"start";break;case"bottom":t=this.verticalInset?"insetEnd":"end"}const i=void 0!==this.verticalThreshold?this.verticalThreshold:void 0!==this.regionRect?this.regionRect.height:0,s=void 0!==this.anchorRect?this.anchorRect.top:0,o=void 0!==this.anchorRect?this.anchorRect.bottom:0,n=void 0!==this.anchorRect?this.anchorRect.height:0,r=void 0!==this.viewportRect?this.viewportRect.top:0,a=void 0!==this.viewportRect?this.viewportRect.bottom:0;(void 0===t||"locktodefault"!==this.verticalPositioningMode&&this.getAvailableSpace(t,s,o,n,r,a)<i)&&(t=this.getAvailableSpace(e[0],s,o,n,r,a)>this.getAvailableSpace(e[1],s,o,n,r,a)?e[0]:e[1])}const i=this.getNextRegionDimension(e,t),s=this.horizontalPosition!==e||this.verticalPosition!==t;if(this.setHorizontalPosition(e,i),this.setVerticalPosition(t,i),this.updateRegionStyle(),!this.initialLayoutComplete)return this.initialLayoutComplete=!0,void this.requestPositionUpdates();this.regionVisible||(this.regionVisible=!0,this.style.removeProperty("pointer-events"),this.style.removeProperty("opacity"),this.classList.toggle("loaded",!0),this.$emit("loaded",this,{bubbles:!1})),this.updatePositionClasses(),s&&this.$emit("positionchange",this,{bubbles:!1})},this.updateRegionStyle=()=>{this.style.width=this.regionWidth,this.style.height=this.regionHeight,this.style.transform=`translate(${this.translateX}px, ${this.translateY}px)`},this.updatePositionClasses=()=>{this.classList.toggle("top","start"===this.verticalPosition),this.classList.toggle("bottom","end"===this.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.verticalPosition),this.classList.toggle("vertical-center","center"===this.verticalPosition),this.classList.toggle("left","start"===this.horizontalPosition),this.classList.toggle("right","end"===this.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.horizontalPosition),this.classList.toggle("horizontal-center","center"===this.horizontalPosition)},this.setHorizontalPosition=(t,e)=>{if(void 0===t||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.horizontalScaling){case"anchor":case"fill":i=this.horizontalViewportLock?this.viewportRect.width:e.width,this.regionWidth=`${i}px`;break;case"content":i=this.regionRect.width,this.regionWidth="unset"}let s=0;switch(t){case"start":this.translateX=this.baseHorizontalOffset-i,this.horizontalViewportLock&&this.anchorRect.left>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.right));break;case"insetStart":this.translateX=this.baseHorizontalOffset-i+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.right));break;case"insetEnd":this.translateX=this.baseHorizontalOffset,this.horizontalViewportLock&&this.anchorRect.left<this.viewportRect.left&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.left));break;case"end":this.translateX=this.baseHorizontalOffset+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right<this.viewportRect.left&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.left));break;case"center":if(s=(this.anchorRect.width-i)/2,this.translateX=this.baseHorizontalOffset+s,this.horizontalViewportLock){const t=this.anchorRect.left+s,e=this.anchorRect.right-s;t<this.viewportRect.left&&!(e>this.viewportRect.right)?this.translateX=this.translateX-(t-this.viewportRect.left):e>this.viewportRect.right&&!(t<this.viewportRect.left)&&(this.translateX=this.translateX-(e-this.viewportRect.right))}}this.horizontalPosition=t},this.setVerticalPosition=(t,e)=>{if(void 0===t||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.verticalScaling){case"anchor":case"fill":i=this.verticalViewportLock?this.viewportRect.height:e.height,this.regionHeight=`${i}px`;break;case"content":i=this.regionRect.height,this.regionHeight="unset"}let s=0;switch(t){case"start":this.translateY=this.baseVerticalOffset-i,this.verticalViewportLock&&this.anchorRect.top>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.bottom));break;case"insetStart":this.translateY=this.baseVerticalOffset-i+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.bottom));break;case"insetEnd":this.translateY=this.baseVerticalOffset,this.verticalViewportLock&&this.anchorRect.top<this.viewportRect.top&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.top));break;case"end":this.translateY=this.baseVerticalOffset+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom<this.viewportRect.top&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.top));break;case"center":if(s=(this.anchorRect.height-i)/2,this.translateY=this.baseVerticalOffset+s,this.verticalViewportLock){const t=this.anchorRect.top+s,e=this.anchorRect.bottom-s;t<this.viewportRect.top&&!(e>this.viewportRect.bottom)?this.translateY=this.translateY-(t-this.viewportRect.top):e>this.viewportRect.bottom&&!(t<this.viewportRect.top)&&(this.translateY=this.translateY-(e-this.viewportRect.bottom))}}this.verticalPosition=t},this.getPositioningOptions=t=>t?["insetStart","insetEnd"]:["start","end"],this.getAvailableSpace=(t,e,i,s,o,n)=>{const r=e-o,a=n-(e+s);switch(t){case"start":return r;case"insetStart":return r+s;case"insetEnd":return a+s;case"end":return a;case"center":return 2*Math.min(r,a)+s}},this.getNextRegionDimension=(t,e)=>{const i={height:void 0!==this.regionRect?this.regionRect.height:0,width:void 0!==this.regionRect?this.regionRect.width:0};return void 0!==t&&"fill"===this.horizontalScaling?i.width=this.getAvailableSpace(t,void 0!==this.anchorRect?this.anchorRect.left:0,void 0!==this.anchorRect?this.anchorRect.right:0,void 0!==this.anchorRect?this.anchorRect.width:0,void 0!==this.viewportRect?this.viewportRect.left:0,void 0!==this.viewportRect?this.viewportRect.right:0):"anchor"===this.horizontalScaling&&(i.width=void 0!==this.anchorRect?this.anchorRect.width:0),void 0!==e&&"fill"===this.verticalScaling?i.height=this.getAvailableSpace(e,void 0!==this.anchorRect?this.anchorRect.top:0,void 0!==this.anchorRect?this.anchorRect.bottom:0,void 0!==this.anchorRect?this.anchorRect.height:0,void 0!==this.viewportRect?this.viewportRect.top:0,void 0!==this.viewportRect?this.viewportRect.bottom:0):"anchor"===this.verticalScaling&&(i.height=void 0!==this.anchorRect?this.anchorRect.height:0),i},this.startAutoUpdateEventListeners=()=>{window.addEventListener(mi,this.update,{passive:!0}),window.addEventListener(fi,this.update,{passive:!0,capture:!0}),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.observe(this.viewportElement)},this.stopAutoUpdateEventListeners=()=>{window.removeEventListener(mi,this.update),window.removeEventListener(fi,this.update),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.unobserve(this.viewportElement)}}anchorChanged(){this.initialLayoutComplete&&(this.anchorElement=this.getAnchor())}viewportChanged(){this.initialLayoutComplete&&(this.viewportElement=this.getViewport())}horizontalPositioningModeChanged(){this.requestReset()}horizontalDefaultPositionChanged(){this.updateForAttributeChange()}horizontalViewportLockChanged(){this.updateForAttributeChange()}horizontalInsetChanged(){this.updateForAttributeChange()}horizontalThresholdChanged(){this.updateForAttributeChange()}horizontalScalingChanged(){this.updateForAttributeChange()}verticalPositioningModeChanged(){this.requestReset()}verticalDefaultPositionChanged(){this.updateForAttributeChange()}verticalViewportLockChanged(){this.updateForAttributeChange()}verticalInsetChanged(){this.updateForAttributeChange()}verticalThresholdChanged(){this.updateForAttributeChange()}verticalScalingChanged(){this.updateForAttributeChange()}fixedPlacementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}autoUpdateModeChanged(t,e){this.$fastController.isConnected&&this.initialLayoutComplete&&("auto"===t&&this.stopAutoUpdateEventListeners(),"auto"===e&&this.startAutoUpdateEventListeners())}anchorElementChanged(){this.requestReset()}viewportElementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}static{this.intersectionService=new Bi}connectedCallback(){super.connectedCallback(),"auto"===this.autoUpdateMode&&this.startAutoUpdateEventListeners(),this.initialize()}disconnectedCallback(){super.disconnectedCallback(),"auto"===this.autoUpdateMode&&this.stopAutoUpdateEventListeners(),this.stopObservers(),this.disconnectResizeDetector()}adoptedCallback(){this.initialize()}disconnectResizeDetector(){null!==this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.handleResize)}updateForAttributeChange(){this.$fastController.isConnected&&this.initialLayoutComplete&&(this.forceUpdate=!0,this.update())}initialize(){this.initializeResizeDetector(),null===this.anchorElement&&(this.anchorElement=this.getAnchor()),this.requestReset()}requestReset(){this.$fastController.isConnected&&!1===this.pendingReset&&(this.setInitialState(),c.queueUpdate((()=>this.reset())),this.pendingReset=!0)}setInitialState(){this.initialLayoutComplete=!1,this.regionVisible=!1,this.translateX=0,this.translateY=0,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.viewportRect=void 0,this.regionRect=void 0,this.anchorRect=void 0,this.verticalPosition=void 0,this.horizontalPosition=void 0,this.style.opacity="0",this.style.pointerEvents="none",this.forceUpdate=!1,this.style.position=this.fixedPlacement?"fixed":"absolute",this.updatePositionClasses(),this.updateRegionStyle()}}se([at],qi.prototype,"anchor",void 0),se([at],qi.prototype,"viewport",void 0),se([at({attribute:"horizontal-positioning-mode"})],qi.prototype,"horizontalPositioningMode",void 0),se([at({attribute:"horizontal-default-position"})],qi.prototype,"horizontalDefaultPosition",void 0),se([at({attribute:"horizontal-viewport-lock",mode:"boolean"})],qi.prototype,"horizontalViewportLock",void 0),se([at({attribute:"horizontal-inset",mode:"boolean"})],qi.prototype,"horizontalInset",void 0),se([at({attribute:"horizontal-threshold"})],qi.prototype,"horizontalThreshold",void 0),se([at({attribute:"horizontal-scaling"})],qi.prototype,"horizontalScaling",void 0),se([at({attribute:"vertical-positioning-mode"})],qi.prototype,"verticalPositioningMode",void 0),se([at({attribute:"vertical-default-position"})],qi.prototype,"verticalDefaultPosition",void 0),se([at({attribute:"vertical-viewport-lock",mode:"boolean"})],qi.prototype,"verticalViewportLock",void 0),se([at({attribute:"vertical-inset",mode:"boolean"})],qi.prototype,"verticalInset",void 0),se([at({attribute:"vertical-threshold"})],qi.prototype,"verticalThreshold",void 0),se([at({attribute:"vertical-scaling"})],qi.prototype,"verticalScaling",void 0),se([at({attribute:"fixed-placement",mode:"boolean"})],qi.prototype,"fixedPlacement",void 0),se([at({attribute:"auto-update-mode"})],qi.prototype,"autoUpdateMode",void 0),se([f],qi.prototype,"anchorElement",void 0),se([f],qi.prototype,"viewportElement",void 0),se([f],qi.prototype,"initialLayoutComplete",void 0);const Ui={horizontalDefaultPosition:"center",horizontalPositioningMode:"locktodefault",horizontalInset:!1,horizontalScaling:"anchor"},_i={...Ui,verticalDefaultPosition:"top",verticalPositioningMode:"locktodefault",verticalInset:!1,verticalScaling:"content"},ji={...Ui,verticalDefaultPosition:"bottom",verticalPositioningMode:"locktodefault",verticalInset:!1,verticalScaling:"content"},Wi={...Ui,verticalPositioningMode:"dynamic",verticalInset:!1,verticalScaling:"content"},Ki={..._i,verticalScaling:"fill"},Yi={...ji,verticalScaling:"fill"},Xi={...Wi,verticalScaling:"fill"},Gi=(t,e)=>W`
135
135
  <div
136
136
  class="backplate ${t=>t.shape}"
137
137
  part="backplate"
@@ -148,37 +148,37 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
148
148
  </a>
149
149
  </div>
150
150
  <slot name="badge" part="badge"></slot>
151
- `;class Zi extends ei{connectedCallback(){super.connectedCallback(),this.shape||(this.shape="circle")}}oe([lt],Zi.prototype,"fill",void 0),oe([lt],Zi.prototype,"color",void 0),oe([lt],Zi.prototype,"link",void 0),oe([lt],Zi.prototype,"shape",void 0);const Ji=(t,e)=>K`
151
+ `;class Qi extends ti{connectedCallback(){super.connectedCallback(),this.shape||(this.shape="circle")}}se([at],Qi.prototype,"fill",void 0),se([at],Qi.prototype,"color",void 0),se([at],Qi.prototype,"link",void 0),se([at],Qi.prototype,"shape",void 0);const Zi=(t,e)=>W`
152
152
  <template class="${t=>t.circular?"circular":""}">
153
153
  <div class="control" part="control" style="${t=>t.generateBadgeStyle()}">
154
154
  <slot></slot>
155
155
  </div>
156
156
  </template>
157
- `;class ts extends ei{constructor(){super(...arguments),this.generateBadgeStyle=()=>{if(!this.fill&&!this.color)return;const t=`background-color: var(--badge-fill-${this.fill});`,e=`color: var(--badge-color-${this.color});`;return this.fill&&!this.color?t:this.color&&!this.fill?e:`${e} ${t}`}}}oe([lt({attribute:"fill"})],ts.prototype,"fill",void 0),oe([lt({attribute:"color"})],ts.prototype,"color",void 0),oe([lt({mode:"boolean"})],ts.prototype,"circular",void 0);const es=(t,e)=>K`
157
+ `;class Ji extends ti{constructor(){super(...arguments),this.generateBadgeStyle=()=>{if(!this.fill&&!this.color)return;const t=`background-color: var(--badge-fill-${this.fill});`,e=`color: var(--badge-color-${this.color});`;return this.fill&&!this.color?t:this.color&&!this.fill?e:`${e} ${t}`}}}se([at({attribute:"fill"})],Ji.prototype,"fill",void 0),se([at({attribute:"color"})],Ji.prototype,"color",void 0),se([at({mode:"boolean"})],Ji.prototype,"circular",void 0);const ts=(t,e)=>W`
158
158
  <div role="listitem" class="listitem" part="listitem">
159
- ${zt((t=>t.href&&t.href.length>0),K`
160
- ${Mi(0,e)}
159
+ ${Ht((t=>t.href&&t.href.length>0),W`
160
+ ${Pi(0,e)}
161
161
  `)}
162
- ${zt((t=>!t.href),K`
163
- ${te(0,e)}
164
- <slot></slot>
162
+ ${Ht((t=>!t.href),W`
165
163
  ${Jt(0,e)}
164
+ <slot></slot>
165
+ ${Zt(0,e)}
166
166
  `)}
167
- ${zt((t=>t.separator),K`
167
+ ${Ht((t=>t.separator),W`
168
168
  <span class="separator" part="separator" aria-hidden="true">
169
169
  <slot name="separator">${e.separator||""}</slot>
170
170
  </span>
171
171
  `)}
172
172
  </div>
173
- `;class is extends Hi{constructor(){super(...arguments),this.separator=!0}}oe([f],is.prototype,"separator",void 0),oi(is,Zt,zi);const ss=(t,e)=>K`
173
+ `;class es extends Vi{constructor(){super(...arguments),this.separator=!0}}se([f],es.prototype,"separator",void 0),si(es,Qt,Hi);const is=(t,e)=>W`
174
174
  <template role="navigation">
175
175
  <div role="list" class="list" part="list">
176
176
  <slot
177
- ${Xt({property:"slottedBreadcrumbItems",filter:Wt()})}
177
+ ${Yt({property:"slottedBreadcrumbItems",filter:jt()})}
178
178
  ></slot>
179
179
  </div>
180
180
  </template>
181
- `;class os extends ei{slottedBreadcrumbItemsChanged(){if(this.$fastController.isConnected){if(void 0===this.slottedBreadcrumbItems||0===this.slottedBreadcrumbItems.length)return;const t=this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length-1];this.slottedBreadcrumbItems.forEach((e=>{const i=e===t;this.setItemSeparator(e,i),this.setAriaCurrent(e,i)}))}}setItemSeparator(t,e){t instanceof is&&(t.separator=!e)}findChildWithHref(t){return t.childElementCount>0?t.querySelector("a[href]"):t.shadowRoot?.childElementCount?t.shadowRoot?.querySelector("a[href]"):null}setAriaCurrent(t,e){const i=this.findChildWithHref(t);null===i&&t.hasAttribute("href")&&t instanceof is?e?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current"):null!==i&&(e?i.setAttribute("aria-current","page"):i.removeAttribute("aria-current"))}}oe([f],os.prototype,"slottedBreadcrumbItems",void 0);const ns=(t,e)=>K`
181
+ `;class ss extends ti{slottedBreadcrumbItemsChanged(){if(this.$fastController.isConnected){if(void 0===this.slottedBreadcrumbItems||0===this.slottedBreadcrumbItems.length)return;const t=this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length-1];this.slottedBreadcrumbItems.forEach((e=>{const i=e===t;this.setItemSeparator(e,i),this.setAriaCurrent(e,i)}))}}setItemSeparator(t,e){t instanceof es&&(t.separator=!e)}findChildWithHref(t){return t.childElementCount>0?t.querySelector("a[href]"):t.shadowRoot?.childElementCount?t.shadowRoot?.querySelector("a[href]"):null}setAriaCurrent(t,e){const i=this.findChildWithHref(t);null===i&&t.hasAttribute("href")&&t instanceof es?e?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current"):null!==i&&(e?i.setAttribute("aria-current","page"):i.removeAttribute("aria-current"))}}se([f],ss.prototype,"slottedBreadcrumbItems",void 0);const os=(t,e)=>W`
182
182
  <button
183
183
  class="control"
184
184
  part="control"
@@ -214,62 +214,62 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
214
214
  aria-pressed="${t=>t.ariaPressed}"
215
215
  aria-relevant="${t=>t.ariaRelevant}"
216
216
  aria-roledescription="${t=>t.ariaRoledescription}"
217
- ${Pt("control")}
217
+ ${Lt("control")}
218
218
  >
219
- ${te(0,e)}
219
+ ${Jt(0,e)}
220
220
  <span class="content" part="content">
221
- <slot ${Xt("defaultSlottedContent")}></slot>
221
+ <slot ${Yt("defaultSlottedContent")}></slot>
222
222
  </span>
223
- ${Jt(0,e)}
223
+ ${Zt(0,e)}
224
224
  </button>
225
- `,rs="form-associated-proxy",as="ElementInternals",ls=as in window&&"setFormValue"in window[as].prototype,hs=new WeakMap;function ds(t){const e=class extends t{static get formAssociated(){return ls}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const t=this.proxy.labels,e=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),i=t?e.concat(Array.from(t)):e;return Object.freeze(i)}return s}valueChanged(t,e){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(t,e){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),c.queueUpdate((()=>this.classList.toggle("disabled",this.disabled)))}nameChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),c.queueUpdate((()=>this.classList.toggle("required",this.required))),this.validate()}get elementInternals(){if(!ls)return null;let t=hs.get(this);return t||(t=this.attachInternals(),hs.set(this,t)),t}constructor(...t){super(...t),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach((t=>this.proxy.removeEventListener(t,this.stopPropagation))),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(t,e,i){this.elementInternals?this.elementInternals.setValidity(t,e,i):"string"==typeof e&&this.proxy.setCustomValidity(e)}formDisabledCallback(t){this.disabled=t}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach((t=>this.proxy.addEventListener(t,this.stopPropagation))),this.proxy.disabled=this.disabled,this.proxy.required=this.required,"string"==typeof this.name&&(this.proxy.name=this.name),"string"==typeof this.value&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",rs),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",rs)),this.shadowRoot?.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){this.removeChild(this.proxy),this.shadowRoot?.removeChild(this.proxySlot)}validate(t){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,t)}setFormValue(t,e){this.elementInternals&&this.elementInternals.setFormValue(t,e||t)}_keypressHandler(t){if(t.key===wi)if(this.form instanceof HTMLFormElement){const t=this.form.querySelector("[type=submit]");t?.click()}}stopPropagation(t){t.stopPropagation()}};return lt({mode:"boolean"})(e.prototype,"disabled"),lt({mode:"fromView",attribute:"value"})(e.prototype,"initialValue"),lt({attribute:"current-value"})(e.prototype,"currentValue"),lt(e.prototype,"name"),lt({mode:"boolean"})(e.prototype,"required"),f(e.prototype,"value"),e}function cs(t){class e extends(ds(t)){}class i extends e{checkedAttributeChanged(){this.defaultChecked=this.checkedAttribute}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(t,e){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),void 0!==t&&this.$emit("change"),this.validate()}currentCheckedChanged(t,e){this.checked=this.currentChecked}constructor(...t){super(t),this.dirtyChecked=!1,this.checkedAttribute=!1,this.checked=!1,this.dirtyChecked=!1}updateForm(){const t=this.checked?this.value:null;this.setFormValue(t,t)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return lt({attribute:"checked",mode:"boolean"})(i.prototype,"checkedAttribute"),lt({attribute:"current-checked",converter:nt})(i.prototype,"currentChecked"),f(i.prototype,"defaultChecked"),f(i.prototype,"checked"),i}class us extends ei{}class ps extends(ds(us)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class ms extends ps{constructor(){super(...arguments),this.handleClick=t=>{this.disabled&&this.defaultSlottedContent?.length<=1&&t.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;const t=this.proxy.isConnected;t||this.attachProxy(),"function"==typeof this.form.requestSubmit?this.form.requestSubmit(this.proxy):this.proxy.click(),t||this.detachProxy()},this.handleFormReset=()=>{this.form?.reset()},this.handleUnsupportedDelegatesFocus=()=>{window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&this.$fastController.definition.shadowOptions?.delegatesFocus&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(t,e){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),"submit"===e&&this.addEventListener("click",this.handleSubmission),"submit"===t&&this.removeEventListener("click",this.handleSubmission),"reset"===e&&this.addEventListener("click",this.handleFormReset),"reset"===t&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();const t=Array.from(this.control?.children);t&&t.forEach((t=>{t.addEventListener("click",this.handleClick)}))}disconnectedCallback(){super.disconnectedCallback();const t=Array.from(this.control?.children);t&&t.forEach((t=>{t.removeEventListener("click",this.handleClick)}))}}oe([lt({mode:"boolean"})],ms.prototype,"autofocus",void 0),oe([lt({attribute:"form"})],ms.prototype,"formId",void 0),oe([lt],ms.prototype,"formaction",void 0),oe([lt],ms.prototype,"formenctype",void 0),oe([lt],ms.prototype,"formmethod",void 0),oe([lt({mode:"boolean"})],ms.prototype,"formnovalidate",void 0),oe([lt],ms.prototype,"formtarget",void 0),oe([lt],ms.prototype,"type",void 0),oe([f],ms.prototype,"defaultSlottedContent",void 0);class fs{}oe([lt({attribute:"aria-expanded"})],fs.prototype,"ariaExpanded",void 0),oe([lt({attribute:"aria-pressed"})],fs.prototype,"ariaPressed",void 0),oi(fs,Vi),oi(ms,Zt,fs);class vs{constructor(t){if(this.dayFormat="numeric",this.weekdayFormat="long",this.monthFormat="long",this.yearFormat="numeric",this.date=new Date,t)for(const e in t){const i=t[e];"date"===e?this.date=this.getDateObject(i):this[e]=i}}getDateObject(t){if("string"==typeof t){const e=t.split(/[/-]/);return e.length<3?new Date:new Date(parseInt(e[2],10),parseInt(e[0],10)-1,parseInt(e[1],10))}if("day"in t&&"month"in t&&"year"in t){const{day:e,month:i,year:s}=t;return new Date(s,i-1,e)}return t}getDate(t=this.date,e={weekday:this.weekdayFormat,month:this.monthFormat,day:this.dayFormat,year:this.yearFormat},i=this.locale){const s=this.getDateObject(t);if(!s.getTime())return"";const o={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,...e};return new Intl.DateTimeFormat(i,o).format(s)}getDay(t=this.date.getDate(),e=this.dayFormat,i=this.locale){return this.getDate({month:1,day:t,year:2020},{day:e},i)}getMonth(t=this.date.getMonth()+1,e=this.monthFormat,i=this.locale){return this.getDate({month:t,day:2,year:2020},{month:e},i)}getYear(t=this.date.getFullYear(),e=this.yearFormat,i=this.locale){return this.getDate({month:2,day:2,year:t},{year:e},i)}getWeekday(t=0,e=this.weekdayFormat,i=this.locale){const s=`1-${t+1}-2017`;return this.getDate(s,{weekday:e},i)}getWeekdays(t=this.weekdayFormat,e=this.locale){return Array(7).fill(null).map(((i,s)=>this.getWeekday(s,t,e)))}}class gs extends ei{constructor(){super(...arguments),this.dateFormatter=new vs,this.readonly=!1,this.locale="en-US",this.month=(new Date).getMonth()+1,this.year=(new Date).getFullYear(),this.dayFormat="numeric",this.weekdayFormat="short",this.monthFormat="long",this.yearFormat="numeric",this.minWeeks=0,this.disabledDates="",this.selectedDates="",this.oneDayInMs=864e5}localeChanged(){this.dateFormatter.locale=this.locale}dayFormatChanged(){this.dateFormatter.dayFormat=this.dayFormat}weekdayFormatChanged(){this.dateFormatter.weekdayFormat=this.weekdayFormat}monthFormatChanged(){this.dateFormatter.monthFormat=this.monthFormat}yearFormatChanged(){this.dateFormatter.yearFormat=this.yearFormat}getMonthInfo(t=this.month,e=this.year){const i=t=>new Date(t.getFullYear(),t.getMonth(),1).getDay(),s=t=>{const e=new Date(t.getFullYear(),t.getMonth()+1,1);return new Date(e.getTime()-this.oneDayInMs).getDate()},o=new Date(e,t-1),n=new Date(e,t),r=new Date(e,t-2);return{length:s(o),month:t,start:i(o),year:e,previous:{length:s(r),month:r.getMonth()+1,start:i(r),year:r.getFullYear()},next:{length:s(n),month:n.getMonth()+1,start:i(n),year:n.getFullYear()}}}getDays(t=this.getMonthInfo(),e=this.minWeeks){e=e>10?10:e;const{start:i,length:s,previous:o,next:n}=t,r=[];let a=1-i;for(;a<s+1||r.length<e||r[r.length-1].length%7!=0;){const{month:e,year:i}=a<1?o:a>s?n:t,l=a<1?o.length+a:a>s?a-s:a,h=`${e}-${l}-${i}`,d={day:l,month:e,year:i,disabled:this.dateInString(h,this.disabledDates),selected:this.dateInString(h,this.selectedDates)},c=r[r.length-1];0===r.length||c.length%7==0?r.push([d]):c.push(d),a++}return r}dateInString(t,e){const i=e.split(",").map((t=>t.trim()));return t="string"==typeof t?t:`${t.getMonth()+1}-${t.getDate()}-${t.getFullYear()}`,i.some((e=>e===t))}getDayClassNames(t,e){const{day:i,month:s,year:o,disabled:n,selected:r}=t;return["day",e===`${s}-${i}-${o}`&&"today",this.month!==s&&"inactive",n&&"disabled",r&&"selected"].filter(Boolean).join(" ")}getWeekdayText(){const t=this.dateFormatter.getWeekdays().map((t=>({text:t})));if("long"!==this.weekdayFormat){const e=this.dateFormatter.getWeekdays("long");t.forEach(((t,i)=>{t.abbr=e[i]}))}return t}handleDateSelect(t,e){t.preventDefault(),this.$emit("dateselected",e)}handleKeydown(t,e){return t.key===wi&&this.handleDateSelect(t,e),!0}}oe([lt({mode:"boolean"})],gs.prototype,"readonly",void 0),oe([lt],gs.prototype,"locale",void 0),oe([lt({converter:rt})],gs.prototype,"month",void 0),oe([lt({converter:rt})],gs.prototype,"year",void 0),oe([lt({attribute:"day-format",mode:"fromView"})],gs.prototype,"dayFormat",void 0),oe([lt({attribute:"weekday-format",mode:"fromView"})],gs.prototype,"weekdayFormat",void 0),oe([lt({attribute:"month-format",mode:"fromView"})],gs.prototype,"monthFormat",void 0),oe([lt({attribute:"year-format",mode:"fromView"})],gs.prototype,"yearFormat",void 0),oe([lt({attribute:"min-weeks",converter:rt})],gs.prototype,"minWeeks",void 0),oe([lt({attribute:"disabled-dates"})],gs.prototype,"disabledDates",void 0),oe([lt({attribute:"selected-dates"})],gs.prototype,"selectedDates",void 0);const bs={none:"none",default:"default",sticky:"sticky"},ys={default:"default",columnHeader:"columnheader",rowHeader:"rowheader"},Cs={default:"default",header:"header",stickyHeader:"sticky-header"};class xs extends ei{constructor(){super(...arguments),this.rowType=Cs.default,this.rowData=null,this.columnDefinitions=null,this.isActiveRow=!1,this.cellsRepeatBehavior=null,this.cellsPlaceholder=null,this.focusColumnIndex=0,this.refocusOnLoad=!1,this.updateRowStyle=()=>{this.style.gridTemplateColumns=this.gridTemplateColumns}}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowStyle()}rowTypeChanged(){this.$fastController.isConnected&&this.updateItemTemplate()}rowDataChanged(){null!==this.rowData&&this.isActiveRow&&(this.refocusOnLoad=!0)}cellItemTemplateChanged(){this.updateItemTemplate()}headerCellItemTemplateChanged(){this.updateItemTemplate()}connectedCallback(){super.connectedCallback(),null===this.cellsRepeatBehavior&&(this.cellsPlaceholder=document.createComment(""),this.appendChild(this.cellsPlaceholder),this.updateItemTemplate(),this.cellsRepeatBehavior=new _t((t=>t.columnDefinitions),(t=>t.activeCellItemTemplate),{positioning:!0}).createBehavior(this.cellsPlaceholder),this.$fastController.addBehaviors([this.cellsRepeatBehavior])),this.addEventListener("cell-focused",this.handleCellFocus),this.addEventListener(pi,this.handleFocusout),this.addEventListener(mi,this.handleKeydown),this.updateRowStyle(),this.refocusOnLoad&&(this.refocusOnLoad=!1,this.cellElements.length>this.focusColumnIndex&&this.cellElements[this.focusColumnIndex].focus())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("cell-focused",this.handleCellFocus),this.removeEventListener(pi,this.handleFocusout),this.removeEventListener(mi,this.handleKeydown)}handleFocusout(t){this.contains(t.target)||(this.isActiveRow=!1,this.focusColumnIndex=0)}handleCellFocus(t){this.isActiveRow=!0,this.focusColumnIndex=this.cellElements.indexOf(t.target),this.$emit("row-focused",this)}handleKeydown(t){if(t.defaultPrevented)return;let e=0;switch(t.key){case yi:e=Math.max(0,this.focusColumnIndex-1),this.cellElements[e].focus(),t.preventDefault();break;case Ci:e=Math.min(this.cellElements.length-1,this.focusColumnIndex+1),this.cellElements[e].focus(),t.preventDefault();break;case Ii:t.ctrlKey||(this.cellElements[0].focus(),t.preventDefault());break;case ki:t.ctrlKey||(this.cellElements[this.cellElements.length-1].focus(),t.preventDefault())}}updateItemTemplate(){this.activeCellItemTemplate=this.rowType===Cs.default&&void 0!==this.cellItemTemplate?this.cellItemTemplate:this.rowType===Cs.default&&void 0===this.cellItemTemplate?this.defaultCellItemTemplate:void 0!==this.headerCellItemTemplate?this.headerCellItemTemplate:this.defaultHeaderCellItemTemplate}}oe([lt({attribute:"grid-template-columns"})],xs.prototype,"gridTemplateColumns",void 0),oe([lt({attribute:"row-type"})],xs.prototype,"rowType",void 0),oe([f],xs.prototype,"rowData",void 0),oe([f],xs.prototype,"columnDefinitions",void 0),oe([f],xs.prototype,"cellItemTemplate",void 0),oe([f],xs.prototype,"headerCellItemTemplate",void 0),oe([f],xs.prototype,"rowIndex",void 0),oe([f],xs.prototype,"isActiveRow",void 0),oe([f],xs.prototype,"activeCellItemTemplate",void 0),oe([f],xs.prototype,"defaultCellItemTemplate",void 0),oe([f],xs.prototype,"defaultHeaderCellItemTemplate",void 0),oe([f],xs.prototype,"cellElements",void 0);const ws=(t,e)=>{const i=function(t){const e=t.tagFor(xs);return K`
225
+ `,ns="form-associated-proxy",rs="ElementInternals",as=rs in window&&"setFormValue"in window[rs].prototype,ls=new WeakMap;function hs(t){const e=class extends t{static get formAssociated(){return as}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const t=this.proxy.labels,e=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),i=t?e.concat(Array.from(t)):e;return Object.freeze(i)}return s}valueChanged(t,e){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(t,e){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),c.queueUpdate((()=>this.classList.toggle("disabled",this.disabled)))}nameChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(t,e){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),c.queueUpdate((()=>this.classList.toggle("required",this.required))),this.validate()}get elementInternals(){if(!as)return null;let t=ls.get(this);return t||(t=this.attachInternals(),ls.set(this,t)),t}constructor(...t){super(...t),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach((t=>this.proxy.removeEventListener(t,this.stopPropagation))),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(t,e,i){this.elementInternals?this.elementInternals.setValidity(t,e,i):"string"==typeof e&&this.proxy.setCustomValidity(e)}formDisabledCallback(t){this.disabled=t}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach((t=>this.proxy.addEventListener(t,this.stopPropagation))),this.proxy.disabled=this.disabled,this.proxy.required=this.required,"string"==typeof this.name&&(this.proxy.name=this.name),"string"==typeof this.value&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",ns),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",ns)),this.shadowRoot?.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){this.removeChild(this.proxy),this.shadowRoot?.removeChild(this.proxySlot)}validate(t){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,t)}setFormValue(t,e){this.elementInternals&&this.elementInternals.setFormValue(t,e||t)}_keypressHandler(t){if(t.key===xi)if(this.form instanceof HTMLFormElement){const t=this.form.querySelector("[type=submit]");t?.click()}}stopPropagation(t){t.stopPropagation()}};return at({mode:"boolean"})(e.prototype,"disabled"),at({mode:"fromView",attribute:"value"})(e.prototype,"initialValue"),at({attribute:"current-value"})(e.prototype,"currentValue"),at(e.prototype,"name"),at({mode:"boolean"})(e.prototype,"required"),f(e.prototype,"value"),e}function ds(t){class e extends(hs(t)){}class i extends e{checkedAttributeChanged(){this.defaultChecked=this.checkedAttribute}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(t,e){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),void 0!==t&&this.$emit("change"),this.validate()}currentCheckedChanged(t,e){this.checked=this.currentChecked}constructor(...t){super(t),this.dirtyChecked=!1,this.checkedAttribute=!1,this.checked=!1,this.dirtyChecked=!1}updateForm(){const t=this.checked?this.value:null;this.setFormValue(t,t)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return at({attribute:"checked",mode:"boolean"})(i.prototype,"checkedAttribute"),at({attribute:"current-checked",converter:ot})(i.prototype,"currentChecked"),f(i.prototype,"defaultChecked"),f(i.prototype,"checked"),i}class cs extends ti{}class us extends(hs(cs)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class ps extends us{constructor(){super(...arguments),this.handleClick=t=>{this.disabled&&this.defaultSlottedContent?.length<=1&&t.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;const t=this.proxy.isConnected;t||this.attachProxy(),"function"==typeof this.form.requestSubmit?this.form.requestSubmit(this.proxy):this.proxy.click(),t||this.detachProxy()},this.handleFormReset=()=>{this.form?.reset()},this.handleUnsupportedDelegatesFocus=()=>{window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&this.$fastController.definition.shadowOptions?.delegatesFocus&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(t,e){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),"submit"===e&&this.addEventListener("click",this.handleSubmission),"submit"===t&&this.removeEventListener("click",this.handleSubmission),"reset"===e&&this.addEventListener("click",this.handleFormReset),"reset"===t&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();const t=Array.from(this.control?.children);t&&t.forEach((t=>{t.addEventListener("click",this.handleClick)}))}disconnectedCallback(){super.disconnectedCallback();const t=Array.from(this.control?.children);t&&t.forEach((t=>{t.removeEventListener("click",this.handleClick)}))}}se([at({mode:"boolean"})],ps.prototype,"autofocus",void 0),se([at({attribute:"form"})],ps.prototype,"formId",void 0),se([at],ps.prototype,"formaction",void 0),se([at],ps.prototype,"formenctype",void 0),se([at],ps.prototype,"formmethod",void 0),se([at({mode:"boolean"})],ps.prototype,"formnovalidate",void 0),se([at],ps.prototype,"formtarget",void 0),se([at],ps.prototype,"type",void 0),se([f],ps.prototype,"defaultSlottedContent",void 0);class ms{}se([at({attribute:"aria-expanded"})],ms.prototype,"ariaExpanded",void 0),se([at({attribute:"aria-pressed"})],ms.prototype,"ariaPressed",void 0),si(ms,Mi),si(ps,Qt,ms);class fs{constructor(t){if(this.dayFormat="numeric",this.weekdayFormat="long",this.monthFormat="long",this.yearFormat="numeric",this.date=new Date,t)for(const e in t){const i=t[e];"date"===e?this.date=this.getDateObject(i):this[e]=i}}getDateObject(t){if("string"==typeof t){const e=t.split(/[/-]/);return e.length<3?new Date:new Date(parseInt(e[2],10),parseInt(e[0],10)-1,parseInt(e[1],10))}if("day"in t&&"month"in t&&"year"in t){const{day:e,month:i,year:s}=t;return new Date(s,i-1,e)}return t}getDate(t=this.date,e={weekday:this.weekdayFormat,month:this.monthFormat,day:this.dayFormat,year:this.yearFormat},i=this.locale){const s=this.getDateObject(t);if(!s.getTime())return"";const o={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,...e};return new Intl.DateTimeFormat(i,o).format(s)}getDay(t=this.date.getDate(),e=this.dayFormat,i=this.locale){return this.getDate({month:1,day:t,year:2020},{day:e},i)}getMonth(t=this.date.getMonth()+1,e=this.monthFormat,i=this.locale){return this.getDate({month:t,day:2,year:2020},{month:e},i)}getYear(t=this.date.getFullYear(),e=this.yearFormat,i=this.locale){return this.getDate({month:2,day:2,year:t},{year:e},i)}getWeekday(t=0,e=this.weekdayFormat,i=this.locale){const s=`1-${t+1}-2017`;return this.getDate(s,{weekday:e},i)}getWeekdays(t=this.weekdayFormat,e=this.locale){return Array(7).fill(null).map(((i,s)=>this.getWeekday(s,t,e)))}}class vs extends ti{constructor(){super(...arguments),this.dateFormatter=new fs,this.readonly=!1,this.locale="en-US",this.month=(new Date).getMonth()+1,this.year=(new Date).getFullYear(),this.dayFormat="numeric",this.weekdayFormat="short",this.monthFormat="long",this.yearFormat="numeric",this.minWeeks=0,this.disabledDates="",this.selectedDates="",this.oneDayInMs=864e5}localeChanged(){this.dateFormatter.locale=this.locale}dayFormatChanged(){this.dateFormatter.dayFormat=this.dayFormat}weekdayFormatChanged(){this.dateFormatter.weekdayFormat=this.weekdayFormat}monthFormatChanged(){this.dateFormatter.monthFormat=this.monthFormat}yearFormatChanged(){this.dateFormatter.yearFormat=this.yearFormat}getMonthInfo(t=this.month,e=this.year){const i=t=>new Date(t.getFullYear(),t.getMonth(),1).getDay(),s=t=>{const e=new Date(t.getFullYear(),t.getMonth()+1,1);return new Date(e.getTime()-this.oneDayInMs).getDate()},o=new Date(e,t-1),n=new Date(e,t),r=new Date(e,t-2);return{length:s(o),month:t,start:i(o),year:e,previous:{length:s(r),month:r.getMonth()+1,start:i(r),year:r.getFullYear()},next:{length:s(n),month:n.getMonth()+1,start:i(n),year:n.getFullYear()}}}getDays(t=this.getMonthInfo(),e=this.minWeeks){e=e>10?10:e;const{start:i,length:s,previous:o,next:n}=t,r=[];let a=1-i;for(;a<s+1||r.length<e||r[r.length-1].length%7!=0;){const{month:e,year:i}=a<1?o:a>s?n:t,l=a<1?o.length+a:a>s?a-s:a,h=`${e}-${l}-${i}`,d={day:l,month:e,year:i,disabled:this.dateInString(h,this.disabledDates),selected:this.dateInString(h,this.selectedDates)},c=r[r.length-1];0===r.length||c.length%7==0?r.push([d]):c.push(d),a++}return r}dateInString(t,e){const i=e.split(",").map((t=>t.trim()));return t="string"==typeof t?t:`${t.getMonth()+1}-${t.getDate()}-${t.getFullYear()}`,i.some((e=>e===t))}getDayClassNames(t,e){const{day:i,month:s,year:o,disabled:n,selected:r}=t;return["day",e===`${s}-${i}-${o}`&&"today",this.month!==s&&"inactive",n&&"disabled",r&&"selected"].filter(Boolean).join(" ")}getWeekdayText(){const t=this.dateFormatter.getWeekdays().map((t=>({text:t})));if("long"!==this.weekdayFormat){const e=this.dateFormatter.getWeekdays("long");t.forEach(((t,i)=>{t.abbr=e[i]}))}return t}handleDateSelect(t,e){t.preventDefault(),this.$emit("dateselected",e)}handleKeydown(t,e){return t.key===xi&&this.handleDateSelect(t,e),!0}}se([at({mode:"boolean"})],vs.prototype,"readonly",void 0),se([at],vs.prototype,"locale",void 0),se([at({converter:nt})],vs.prototype,"month",void 0),se([at({converter:nt})],vs.prototype,"year",void 0),se([at({attribute:"day-format",mode:"fromView"})],vs.prototype,"dayFormat",void 0),se([at({attribute:"weekday-format",mode:"fromView"})],vs.prototype,"weekdayFormat",void 0),se([at({attribute:"month-format",mode:"fromView"})],vs.prototype,"monthFormat",void 0),se([at({attribute:"year-format",mode:"fromView"})],vs.prototype,"yearFormat",void 0),se([at({attribute:"min-weeks",converter:nt})],vs.prototype,"minWeeks",void 0),se([at({attribute:"disabled-dates"})],vs.prototype,"disabledDates",void 0),se([at({attribute:"selected-dates"})],vs.prototype,"selectedDates",void 0);const gs={none:"none",default:"default",sticky:"sticky"},bs={default:"default",columnHeader:"columnheader",rowHeader:"rowheader"},ys={default:"default",header:"header",stickyHeader:"sticky-header"};class Cs extends ti{constructor(){super(...arguments),this.rowType=ys.default,this.rowData=null,this.columnDefinitions=null,this.isActiveRow=!1,this.cellsRepeatBehavior=null,this.cellsPlaceholder=null,this.focusColumnIndex=0,this.refocusOnLoad=!1,this.updateRowStyle=()=>{this.style.gridTemplateColumns=this.gridTemplateColumns}}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowStyle()}rowTypeChanged(){this.$fastController.isConnected&&this.updateItemTemplate()}rowDataChanged(){null!==this.rowData&&this.isActiveRow&&(this.refocusOnLoad=!0)}cellItemTemplateChanged(){this.updateItemTemplate()}headerCellItemTemplateChanged(){this.updateItemTemplate()}connectedCallback(){super.connectedCallback(),null===this.cellsRepeatBehavior&&(this.cellsPlaceholder=document.createComment(""),this.appendChild(this.cellsPlaceholder),this.updateItemTemplate(),this.cellsRepeatBehavior=new Ut((t=>t.columnDefinitions),(t=>t.activeCellItemTemplate),{positioning:!0}).createBehavior(this.cellsPlaceholder),this.$fastController.addBehaviors([this.cellsRepeatBehavior])),this.addEventListener("cell-focused",this.handleCellFocus),this.addEventListener(ui,this.handleFocusout),this.addEventListener(pi,this.handleKeydown),this.updateRowStyle(),this.refocusOnLoad&&(this.refocusOnLoad=!1,this.cellElements.length>this.focusColumnIndex&&this.cellElements[this.focusColumnIndex].focus())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("cell-focused",this.handleCellFocus),this.removeEventListener(ui,this.handleFocusout),this.removeEventListener(pi,this.handleKeydown)}handleFocusout(t){this.contains(t.target)||(this.isActiveRow=!1,this.focusColumnIndex=0)}handleCellFocus(t){this.isActiveRow=!0,this.focusColumnIndex=this.cellElements.indexOf(t.target),this.$emit("row-focused",this)}handleKeydown(t){if(t.defaultPrevented)return;let e=0;switch(t.key){case bi:e=Math.max(0,this.focusColumnIndex-1),this.cellElements[e].focus(),t.preventDefault();break;case yi:e=Math.min(this.cellElements.length-1,this.focusColumnIndex+1),this.cellElements[e].focus(),t.preventDefault();break;case $i:t.ctrlKey||(this.cellElements[0].focus(),t.preventDefault());break;case Ii:t.ctrlKey||(this.cellElements[this.cellElements.length-1].focus(),t.preventDefault())}}updateItemTemplate(){this.activeCellItemTemplate=this.rowType===ys.default&&void 0!==this.cellItemTemplate?this.cellItemTemplate:this.rowType===ys.default&&void 0===this.cellItemTemplate?this.defaultCellItemTemplate:void 0!==this.headerCellItemTemplate?this.headerCellItemTemplate:this.defaultHeaderCellItemTemplate}}se([at({attribute:"grid-template-columns"})],Cs.prototype,"gridTemplateColumns",void 0),se([at({attribute:"row-type"})],Cs.prototype,"rowType",void 0),se([f],Cs.prototype,"rowData",void 0),se([f],Cs.prototype,"columnDefinitions",void 0),se([f],Cs.prototype,"cellItemTemplate",void 0),se([f],Cs.prototype,"headerCellItemTemplate",void 0),se([f],Cs.prototype,"rowIndex",void 0),se([f],Cs.prototype,"isActiveRow",void 0),se([f],Cs.prototype,"activeCellItemTemplate",void 0),se([f],Cs.prototype,"defaultCellItemTemplate",void 0),se([f],Cs.prototype,"defaultHeaderCellItemTemplate",void 0),se([f],Cs.prototype,"cellElements",void 0);const xs=(t,e)=>{const i=function(t){const e=t.tagFor(Cs);return W`
226
226
  <${e}
227
227
  :rowData="${t=>t}"
228
228
  :cellItemTemplate="${(t,e)=>e.parent.cellItemTemplate}"
229
229
  :headerCellItemTemplate="${(t,e)=>e.parent.headerCellItemTemplate}"
230
230
  ></${e}>
231
- `}(t),s=t.tagFor(xs);return K`
231
+ `}(t),s=t.tagFor(Cs);return W`
232
232
  <template
233
233
  role="grid"
234
234
  tabindex="0"
235
235
  :rowElementTag="${()=>s}"
236
236
  :defaultRowItemTemplate="${i}"
237
- ${Qt({property:"rowElements",filter:Wt("[role=row]")})}
237
+ ${Gt({property:"rowElements",filter:jt("[role=row]")})}
238
238
  >
239
239
  <slot></slot>
240
240
  </template>
241
- `};class $s extends ei{static{this.generateColumns=t=>Object.getOwnPropertyNames(t).map(((t,e)=>({columnDataKey:t,gridColumn:`${e}`})))}static generateTemplateColumns(t){let e="";return t.forEach((t=>{e=`${e}${""===e?"":" "}1fr`})),e}noTabbingChanged(){this.$fastController.isConnected&&(this.noTabbing?this.setAttribute("tabIndex","-1"):this.setAttribute("tabIndex",this.contains(document.activeElement)||this===document.activeElement?"-1":"0"))}generateHeaderChanged(){this.$fastController.isConnected&&this.toggleGeneratedHeader()}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowIndexes()}rowsDataChanged(){null===this.columnDefinitions&&this.rowsData.length>0&&(this.columnDefinitions=$s.generateColumns(this.rowsData[0])),this.$fastController.isConnected&&this.toggleGeneratedHeader()}columnDefinitionsChanged(){null!==this.columnDefinitions?(this.generatedGridTemplateColumns=$s.generateTemplateColumns(this.columnDefinitions),this.$fastController.isConnected&&(this.columnDefinitionsStale=!0,this.queueRowIndexUpdate())):this.generatedGridTemplateColumns=""}headerCellItemTemplateChanged(){this.$fastController.isConnected&&null!==this.generatedHeader&&(this.generatedHeader.headerCellItemTemplate=this.headerCellItemTemplate)}focusRowIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}focusColumnIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}constructor(){super(),this.noTabbing=!1,this.generateHeader=bs.default,this.rowsData=[],this.columnDefinitions=null,this.focusRowIndex=0,this.focusColumnIndex=0,this.rowsPlaceholder=null,this.generatedHeader=null,this.isUpdatingFocus=!1,this.pendingFocusUpdate=!1,this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!0,this.generatedGridTemplateColumns="",this.focusOnCell=(t,e,i)=>{if(0===this.rowElements.length)return this.focusRowIndex=0,void(this.focusColumnIndex=0);const s=Math.max(0,Math.min(this.rowElements.length-1,t)),o=this.rowElements[s].querySelectorAll('[role="cell"], [role="gridcell"], [role="columnheader"], [role="rowheader"]'),n=o[Math.max(0,Math.min(o.length-1,e))];i&&this.scrollHeight!==this.clientHeight&&(s<this.focusRowIndex&&this.scrollTop>0||s>this.focusRowIndex&&this.scrollTop<this.scrollHeight-this.clientHeight)&&n.scrollIntoView({block:"center",inline:"center"}),n.focus()},this.onChildListChange=(t,e)=>{t&&t.length&&(t.forEach((t=>{t.addedNodes.forEach((t=>{1===t.nodeType&&"row"===t.getAttribute("role")&&(t.columnDefinitions=this.columnDefinitions)}))})),this.queueRowIndexUpdate())},this.queueRowIndexUpdate=()=>{this.rowindexUpdateQueued||(this.rowindexUpdateQueued=!0,c.queueUpdate(this.updateRowIndexes))},this.updateRowIndexes=()=>{let t=this.gridTemplateColumns;if(void 0===t){if(""===this.generatedGridTemplateColumns&&this.rowElements.length>0){const t=this.rowElements[0];this.generatedGridTemplateColumns=new Array(t.cellElements.length).fill("1fr").join(" ")}t=this.generatedGridTemplateColumns}this.rowElements.forEach(((e,i)=>{const s=e;s.rowIndex=i,s.gridTemplateColumns=t,this.columnDefinitionsStale&&(s.columnDefinitions=this.columnDefinitions)})),this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!1}}connectedCallback(){super.connectedCallback(),void 0===this.rowItemTemplate&&(this.rowItemTemplate=this.defaultRowItemTemplate),this.rowsPlaceholder=document.createComment(""),this.appendChild(this.rowsPlaceholder),this.toggleGeneratedHeader(),this.rowsRepeatBehavior=new _t((t=>t.rowsData),(t=>t.rowItemTemplate),{positioning:!0}).createBehavior(this.rowsPlaceholder),this.$fastController.addBehaviors([this.rowsRepeatBehavior]),this.addEventListener("row-focused",this.handleRowFocus),this.addEventListener(ci,this.handleFocus),this.addEventListener(mi,this.handleKeydown),this.addEventListener(pi,this.handleFocusOut),this.observer=new MutationObserver(this.onChildListChange),this.observer.observe(this,{childList:!0}),this.noTabbing&&this.setAttribute("tabindex","-1"),c.queueUpdate(this.queueRowIndexUpdate)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("row-focused",this.handleRowFocus),this.removeEventListener(ci,this.handleFocus),this.removeEventListener(mi,this.handleKeydown),this.removeEventListener(pi,this.handleFocusOut),this.observer.disconnect(),this.rowsPlaceholder=null,this.generatedHeader=null}handleRowFocus(t){this.isUpdatingFocus=!0;const e=t.target;this.focusRowIndex=this.rowElements.indexOf(e),this.focusColumnIndex=e.focusColumnIndex,this.setAttribute("tabIndex","-1"),this.isUpdatingFocus=!1}handleFocus(t){this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}handleFocusOut(t){null!==t.relatedTarget&&this.contains(t.relatedTarget)||this.setAttribute("tabIndex",this.noTabbing?"-1":"0")}handleKeydown(t){if(t.defaultPrevented)return;let e;const i=this.rowElements.length-1,s=this.offsetHeight+this.scrollTop,o=this.rowElements[i];switch(t.key){case xi:t.preventDefault(),this.focusOnCell(this.focusRowIndex-1,this.focusColumnIndex,!0);break;case bi:t.preventDefault(),this.focusOnCell(this.focusRowIndex+1,this.focusColumnIndex,!0);break;case"PageUp":if(t.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(0===this.focusRowIndex)return void this.focusOnCell(0,this.focusColumnIndex,!1);for(e=this.focusRowIndex-1;e>=0;e--){const t=this.rowElements[e];if(t.offsetTop<this.scrollTop){this.scrollTop=t.offsetTop+t.clientHeight-this.clientHeight;break}}this.focusOnCell(e,this.focusColumnIndex,!1);break;case"PageDown":if(t.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(this.focusRowIndex>=i||o.offsetTop+o.offsetHeight<=s)return void this.focusOnCell(i,this.focusColumnIndex,!1);for(e=this.focusRowIndex+1;e<=i;e++){const t=this.rowElements[e];if(t.offsetTop+t.offsetHeight>s){let e=0;this.generateHeader===bs.sticky&&null!==this.generatedHeader&&(e=this.generatedHeader.clientHeight),this.scrollTop=t.offsetTop-e;break}}this.focusOnCell(e,this.focusColumnIndex,!1);break;case Ii:t.ctrlKey&&(t.preventDefault(),this.focusOnCell(0,0,!0));break;case ki:t.ctrlKey&&null!==this.columnDefinitions&&(t.preventDefault(),this.focusOnCell(this.rowElements.length-1,this.columnDefinitions.length-1,!0))}}queueFocusUpdate(){this.isUpdatingFocus&&(this.contains(document.activeElement)||this===document.activeElement)||!1===this.pendingFocusUpdate&&(this.pendingFocusUpdate=!0,c.queueUpdate((()=>this.updateFocus())))}updateFocus(){this.pendingFocusUpdate=!1,this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}toggleGeneratedHeader(){if(null!==this.generatedHeader&&(this.removeChild(this.generatedHeader),this.generatedHeader=null),this.generateHeader!==bs.none&&this.rowsData.length>0){const t=document.createElement(this.rowElementTag);return this.generatedHeader=t,this.generatedHeader.columnDefinitions=this.columnDefinitions,this.generatedHeader.gridTemplateColumns=this.gridTemplateColumns,this.generatedHeader.rowType=this.generateHeader===bs.sticky?Cs.stickyHeader:Cs.header,void(null===this.firstChild&&null===this.rowsPlaceholder||this.insertBefore(t,null!==this.firstChild?this.firstChild:this.rowsPlaceholder))}}}oe([lt({attribute:"no-tabbing",mode:"boolean"})],$s.prototype,"noTabbing",void 0),oe([lt({attribute:"generate-header"})],$s.prototype,"generateHeader",void 0),oe([lt({attribute:"grid-template-columns"})],$s.prototype,"gridTemplateColumns",void 0),oe([f],$s.prototype,"rowsData",void 0),oe([f],$s.prototype,"columnDefinitions",void 0),oe([f],$s.prototype,"rowItemTemplate",void 0),oe([f],$s.prototype,"cellItemTemplate",void 0),oe([f],$s.prototype,"headerCellItemTemplate",void 0),oe([f],$s.prototype,"focusRowIndex",void 0),oe([f],$s.prototype,"focusColumnIndex",void 0),oe([f],$s.prototype,"defaultRowItemTemplate",void 0),oe([f],$s.prototype,"rowElementTag",void 0),oe([f],$s.prototype,"rowElements",void 0);const Is=K`
241
+ `};class ws extends ti{static{this.generateColumns=t=>Object.getOwnPropertyNames(t).map(((t,e)=>({columnDataKey:t,gridColumn:`${e}`})))}static generateTemplateColumns(t){let e="";return t.forEach((t=>{e=`${e}${""===e?"":" "}1fr`})),e}noTabbingChanged(){this.$fastController.isConnected&&(this.noTabbing?this.setAttribute("tabIndex","-1"):this.setAttribute("tabIndex",this.contains(document.activeElement)||this===document.activeElement?"-1":"0"))}generateHeaderChanged(){this.$fastController.isConnected&&this.toggleGeneratedHeader()}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowIndexes()}rowsDataChanged(){null===this.columnDefinitions&&this.rowsData.length>0&&(this.columnDefinitions=ws.generateColumns(this.rowsData[0])),this.$fastController.isConnected&&this.toggleGeneratedHeader()}columnDefinitionsChanged(){null!==this.columnDefinitions?(this.generatedGridTemplateColumns=ws.generateTemplateColumns(this.columnDefinitions),this.$fastController.isConnected&&(this.columnDefinitionsStale=!0,this.queueRowIndexUpdate())):this.generatedGridTemplateColumns=""}headerCellItemTemplateChanged(){this.$fastController.isConnected&&null!==this.generatedHeader&&(this.generatedHeader.headerCellItemTemplate=this.headerCellItemTemplate)}focusRowIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}focusColumnIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}constructor(){super(),this.noTabbing=!1,this.generateHeader=gs.default,this.rowsData=[],this.columnDefinitions=null,this.focusRowIndex=0,this.focusColumnIndex=0,this.rowsPlaceholder=null,this.generatedHeader=null,this.isUpdatingFocus=!1,this.pendingFocusUpdate=!1,this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!0,this.generatedGridTemplateColumns="",this.focusOnCell=(t,e,i)=>{if(0===this.rowElements.length)return this.focusRowIndex=0,void(this.focusColumnIndex=0);const s=Math.max(0,Math.min(this.rowElements.length-1,t)),o=this.rowElements[s].querySelectorAll('[role="cell"], [role="gridcell"], [role="columnheader"], [role="rowheader"]'),n=o[Math.max(0,Math.min(o.length-1,e))];i&&this.scrollHeight!==this.clientHeight&&(s<this.focusRowIndex&&this.scrollTop>0||s>this.focusRowIndex&&this.scrollTop<this.scrollHeight-this.clientHeight)&&n.scrollIntoView({block:"center",inline:"center"}),n.focus()},this.onChildListChange=(t,e)=>{t&&t.length&&(t.forEach((t=>{t.addedNodes.forEach((t=>{1===t.nodeType&&"row"===t.getAttribute("role")&&(t.columnDefinitions=this.columnDefinitions)}))})),this.queueRowIndexUpdate())},this.queueRowIndexUpdate=()=>{this.rowindexUpdateQueued||(this.rowindexUpdateQueued=!0,c.queueUpdate(this.updateRowIndexes))},this.updateRowIndexes=()=>{let t=this.gridTemplateColumns;if(void 0===t){if(""===this.generatedGridTemplateColumns&&this.rowElements.length>0){const t=this.rowElements[0];this.generatedGridTemplateColumns=new Array(t.cellElements.length).fill("1fr").join(" ")}t=this.generatedGridTemplateColumns}this.rowElements.forEach(((e,i)=>{const s=e;s.rowIndex=i,s.gridTemplateColumns=t,this.columnDefinitionsStale&&(s.columnDefinitions=this.columnDefinitions)})),this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!1}}connectedCallback(){super.connectedCallback(),void 0===this.rowItemTemplate&&(this.rowItemTemplate=this.defaultRowItemTemplate),this.rowsPlaceholder=document.createComment(""),this.appendChild(this.rowsPlaceholder),this.toggleGeneratedHeader(),this.rowsRepeatBehavior=new Ut((t=>t.rowsData),(t=>t.rowItemTemplate),{positioning:!0}).createBehavior(this.rowsPlaceholder),this.$fastController.addBehaviors([this.rowsRepeatBehavior]),this.addEventListener("row-focused",this.handleRowFocus),this.addEventListener(di,this.handleFocus),this.addEventListener(pi,this.handleKeydown),this.addEventListener(ui,this.handleFocusOut),this.observer=new MutationObserver(this.onChildListChange),this.observer.observe(this,{childList:!0}),this.noTabbing&&this.setAttribute("tabindex","-1"),c.queueUpdate(this.queueRowIndexUpdate)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("row-focused",this.handleRowFocus),this.removeEventListener(di,this.handleFocus),this.removeEventListener(pi,this.handleKeydown),this.removeEventListener(ui,this.handleFocusOut),this.observer.disconnect(),this.rowsPlaceholder=null,this.generatedHeader=null}handleRowFocus(t){this.isUpdatingFocus=!0;const e=t.target;this.focusRowIndex=this.rowElements.indexOf(e),this.focusColumnIndex=e.focusColumnIndex,this.setAttribute("tabIndex","-1"),this.isUpdatingFocus=!1}handleFocus(t){this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}handleFocusOut(t){null!==t.relatedTarget&&this.contains(t.relatedTarget)||this.setAttribute("tabIndex",this.noTabbing?"-1":"0")}handleKeydown(t){if(t.defaultPrevented)return;let e;const i=this.rowElements.length-1,s=this.offsetHeight+this.scrollTop,o=this.rowElements[i];switch(t.key){case Ci:t.preventDefault(),this.focusOnCell(this.focusRowIndex-1,this.focusColumnIndex,!0);break;case gi:t.preventDefault(),this.focusOnCell(this.focusRowIndex+1,this.focusColumnIndex,!0);break;case"PageUp":if(t.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(0===this.focusRowIndex)return void this.focusOnCell(0,this.focusColumnIndex,!1);for(e=this.focusRowIndex-1;e>=0;e--){const t=this.rowElements[e];if(t.offsetTop<this.scrollTop){this.scrollTop=t.offsetTop+t.clientHeight-this.clientHeight;break}}this.focusOnCell(e,this.focusColumnIndex,!1);break;case"PageDown":if(t.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(this.focusRowIndex>=i||o.offsetTop+o.offsetHeight<=s)return void this.focusOnCell(i,this.focusColumnIndex,!1);for(e=this.focusRowIndex+1;e<=i;e++){const t=this.rowElements[e];if(t.offsetTop+t.offsetHeight>s){let e=0;this.generateHeader===gs.sticky&&null!==this.generatedHeader&&(e=this.generatedHeader.clientHeight),this.scrollTop=t.offsetTop-e;break}}this.focusOnCell(e,this.focusColumnIndex,!1);break;case $i:t.ctrlKey&&(t.preventDefault(),this.focusOnCell(0,0,!0));break;case Ii:t.ctrlKey&&null!==this.columnDefinitions&&(t.preventDefault(),this.focusOnCell(this.rowElements.length-1,this.columnDefinitions.length-1,!0))}}queueFocusUpdate(){this.isUpdatingFocus&&(this.contains(document.activeElement)||this===document.activeElement)||!1===this.pendingFocusUpdate&&(this.pendingFocusUpdate=!0,c.queueUpdate((()=>this.updateFocus())))}updateFocus(){this.pendingFocusUpdate=!1,this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}toggleGeneratedHeader(){if(null!==this.generatedHeader&&(this.removeChild(this.generatedHeader),this.generatedHeader=null),this.generateHeader!==gs.none&&this.rowsData.length>0){const t=document.createElement(this.rowElementTag);return this.generatedHeader=t,this.generatedHeader.columnDefinitions=this.columnDefinitions,this.generatedHeader.gridTemplateColumns=this.gridTemplateColumns,this.generatedHeader.rowType=this.generateHeader===gs.sticky?ys.stickyHeader:ys.header,void(null===this.firstChild&&null===this.rowsPlaceholder||this.insertBefore(t,null!==this.firstChild?this.firstChild:this.rowsPlaceholder))}}}se([at({attribute:"no-tabbing",mode:"boolean"})],ws.prototype,"noTabbing",void 0),se([at({attribute:"generate-header"})],ws.prototype,"generateHeader",void 0),se([at({attribute:"grid-template-columns"})],ws.prototype,"gridTemplateColumns",void 0),se([f],ws.prototype,"rowsData",void 0),se([f],ws.prototype,"columnDefinitions",void 0),se([f],ws.prototype,"rowItemTemplate",void 0),se([f],ws.prototype,"cellItemTemplate",void 0),se([f],ws.prototype,"headerCellItemTemplate",void 0),se([f],ws.prototype,"focusRowIndex",void 0),se([f],ws.prototype,"focusColumnIndex",void 0),se([f],ws.prototype,"defaultRowItemTemplate",void 0),se([f],ws.prototype,"rowElementTag",void 0),se([f],ws.prototype,"rowElements",void 0);const $s=W`
242
242
  <template>
243
243
  ${t=>null===t.rowData||null===t.columnDefinition||null===t.columnDefinition.columnDataKey?null:t.rowData[t.columnDefinition.columnDataKey]}
244
244
  </template>
245
- `,ks=K`
245
+ `,Is=W`
246
246
  <template>
247
247
  ${t=>null===t.columnDefinition?null:void 0===t.columnDefinition.title?t.columnDefinition.columnDataKey:t.columnDefinition.title}
248
248
  </template>
249
- `;class Es extends ei{constructor(){super(...arguments),this.cellType=ys.default,this.rowData=null,this.columnDefinition=null,this.isActiveCell=!1,this.customCellView=null,this.updateCellStyle=()=>{this.style.gridColumn=this.gridColumn}}cellTypeChanged(){this.$fastController.isConnected&&this.updateCellView()}gridColumnChanged(){this.$fastController.isConnected&&this.updateCellStyle()}columnDefinitionChanged(t,e){this.$fastController.isConnected&&this.updateCellView()}connectedCallback(){super.connectedCallback(),this.addEventListener(ui,this.handleFocusin),this.addEventListener(pi,this.handleFocusout),this.addEventListener(mi,this.handleKeydown),this.style.gridColumn=`${void 0===this.columnDefinition?.gridColumn?0:this.columnDefinition.gridColumn}`,this.updateCellView(),this.updateCellStyle()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(ui,this.handleFocusin),this.removeEventListener(pi,this.handleFocusout),this.removeEventListener(mi,this.handleKeydown),this.disconnectCellView()}handleFocusin(t){if(!this.isActiveCell){if(this.isActiveCell=!0,this.cellType===ys.columnHeader){if(null!==this.columnDefinition&&!0!==this.columnDefinition.headerCellInternalFocusQueue&&"function"==typeof this.columnDefinition.headerCellFocusTargetCallback){const t=this.columnDefinition.headerCellFocusTargetCallback(this);null!==t&&t.focus()}}else if(null!==this.columnDefinition&&!0!==this.columnDefinition.cellInternalFocusQueue&&"function"==typeof this.columnDefinition.cellFocusTargetCallback){const t=this.columnDefinition.cellFocusTargetCallback(this);null!==t&&t.focus()}this.$emit("cell-focused",this)}}handleFocusout(t){this===document.activeElement||this.contains(document.activeElement)||(this.isActiveCell=!1)}handleKeydown(t){if(!(t.defaultPrevented||null===this.columnDefinition||this.cellType===ys.default&&!0!==this.columnDefinition.cellInternalFocusQueue||this.cellType===ys.columnHeader&&!0!==this.columnDefinition.headerCellInternalFocusQueue))switch(t.key){case wi:case"F2":if(this.contains(document.activeElement)&&document.activeElement!==this)return;if(this.cellType===ys.columnHeader){if(void 0!==this.columnDefinition.headerCellFocusTargetCallback){const e=this.columnDefinition.headerCellFocusTargetCallback(this);null!==e&&e.focus(),t.preventDefault()}}else if(void 0!==this.columnDefinition.cellFocusTargetCallback){const e=this.columnDefinition.cellFocusTargetCallback(this);null!==e&&e.focus(),t.preventDefault()}break;case $i:this.contains(document.activeElement)&&document.activeElement!==this&&(this.focus(),t.preventDefault())}}updateCellView(){if(this.disconnectCellView(),null!==this.columnDefinition)switch(this.cellType){case ys.columnHeader:void 0!==this.columnDefinition.headerCellTemplate?this.customCellView=this.columnDefinition.headerCellTemplate.render(this,this):this.customCellView=ks.render(this,this);break;case void 0:case ys.rowHeader:case ys.default:void 0!==this.columnDefinition.cellTemplate?this.customCellView=this.columnDefinition.cellTemplate.render(this,this):this.customCellView=Is.render(this,this)}}disconnectCellView(){null!==this.customCellView&&(this.customCellView.dispose(),this.customCellView=null)}}oe([lt({attribute:"cell-type"})],Es.prototype,"cellType",void 0),oe([lt({attribute:"grid-column"})],Es.prototype,"gridColumn",void 0),oe([f],Es.prototype,"rowData",void 0),oe([f],Es.prototype,"columnDefinition",void 0);const Ts=(t,e)=>{const i=function(t){const e=t.tagFor(Es);return K`
249
+ `;class ks extends ti{constructor(){super(...arguments),this.cellType=bs.default,this.rowData=null,this.columnDefinition=null,this.isActiveCell=!1,this.customCellView=null,this.updateCellStyle=()=>{this.style.gridColumn=this.gridColumn}}cellTypeChanged(){this.$fastController.isConnected&&this.updateCellView()}gridColumnChanged(){this.$fastController.isConnected&&this.updateCellStyle()}columnDefinitionChanged(t,e){this.$fastController.isConnected&&this.updateCellView()}connectedCallback(){super.connectedCallback(),this.addEventListener(ci,this.handleFocusin),this.addEventListener(ui,this.handleFocusout),this.addEventListener(pi,this.handleKeydown),this.style.gridColumn=`${void 0===this.columnDefinition?.gridColumn?0:this.columnDefinition.gridColumn}`,this.updateCellView(),this.updateCellStyle()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(ci,this.handleFocusin),this.removeEventListener(ui,this.handleFocusout),this.removeEventListener(pi,this.handleKeydown),this.disconnectCellView()}handleFocusin(t){if(!this.isActiveCell){if(this.isActiveCell=!0,this.cellType===bs.columnHeader){if(null!==this.columnDefinition&&!0!==this.columnDefinition.headerCellInternalFocusQueue&&"function"==typeof this.columnDefinition.headerCellFocusTargetCallback){const t=this.columnDefinition.headerCellFocusTargetCallback(this);null!==t&&t.focus()}}else if(null!==this.columnDefinition&&!0!==this.columnDefinition.cellInternalFocusQueue&&"function"==typeof this.columnDefinition.cellFocusTargetCallback){const t=this.columnDefinition.cellFocusTargetCallback(this);null!==t&&t.focus()}this.$emit("cell-focused",this)}}handleFocusout(t){this===document.activeElement||this.contains(document.activeElement)||(this.isActiveCell=!1)}handleKeydown(t){if(!(t.defaultPrevented||null===this.columnDefinition||this.cellType===bs.default&&!0!==this.columnDefinition.cellInternalFocusQueue||this.cellType===bs.columnHeader&&!0!==this.columnDefinition.headerCellInternalFocusQueue))switch(t.key){case xi:case"F2":if(this.contains(document.activeElement)&&document.activeElement!==this)return;if(this.cellType===bs.columnHeader){if(void 0!==this.columnDefinition.headerCellFocusTargetCallback){const e=this.columnDefinition.headerCellFocusTargetCallback(this);null!==e&&e.focus(),t.preventDefault()}}else if(void 0!==this.columnDefinition.cellFocusTargetCallback){const e=this.columnDefinition.cellFocusTargetCallback(this);null!==e&&e.focus(),t.preventDefault()}break;case wi:this.contains(document.activeElement)&&document.activeElement!==this&&(this.focus(),t.preventDefault())}}updateCellView(){if(this.disconnectCellView(),null!==this.columnDefinition)switch(this.cellType){case bs.columnHeader:void 0!==this.columnDefinition.headerCellTemplate?this.customCellView=this.columnDefinition.headerCellTemplate.render(this,this):this.customCellView=Is.render(this,this);break;case void 0:case bs.rowHeader:case bs.default:void 0!==this.columnDefinition.cellTemplate?this.customCellView=this.columnDefinition.cellTemplate.render(this,this):this.customCellView=$s.render(this,this)}}disconnectCellView(){null!==this.customCellView&&(this.customCellView.dispose(),this.customCellView=null)}}se([at({attribute:"cell-type"})],ks.prototype,"cellType",void 0),se([at({attribute:"grid-column"})],ks.prototype,"gridColumn",void 0),se([f],ks.prototype,"rowData",void 0),se([f],ks.prototype,"columnDefinition",void 0);const Es=(t,e)=>{const i=function(t){const e=t.tagFor(ks);return W`
250
250
  <${e}
251
251
  cell-type="${t=>t.isRowHeader?"rowheader":void 0}"
252
252
  grid-column="${(t,e)=>e.index+1}"
253
253
  :rowData="${(t,e)=>e.parent.rowData}"
254
254
  :columnDefinition="${t=>t}"
255
255
  ></${e}>
256
- `}(t),s=function(t){const e=t.tagFor(Es);return K`
256
+ `}(t),s=function(t){const e=t.tagFor(ks);return W`
257
257
  <${e}
258
258
  cell-type="columnheader"
259
259
  grid-column="${(t,e)=>e.index+1}"
260
260
  :columnDefinition="${t=>t}"
261
261
  ></${e}>
262
- `}(t);return K`
262
+ `}(t);return W`
263
263
  <template
264
264
  role="row"
265
265
  class="${t=>"default"!==t.rowType?t.rowType:""}"
266
266
  :defaultCellItemTemplate="${i}"
267
267
  :defaultHeaderCellItemTemplate="${s}"
268
- ${Qt({property:"cellElements",filter:Wt('[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"]')})}
268
+ ${Gt({property:"cellElements",filter:jt('[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"]')})}
269
269
  >
270
- <slot ${Xt("slottedCellElements")}></slot>
270
+ <slot ${Yt("slottedCellElements")}></slot>
271
271
  </template>
272
- `},Os=(t,e)=>K`
272
+ `},Ts=(t,e)=>W`
273
273
  <template
274
274
  tabindex="-1"
275
275
  role="${t=>t.cellType&&"default"!==t.cellType?t.cellType:"gridcell"}"
@@ -279,7 +279,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
279
279
  >
280
280
  <slot></slot>
281
281
  </template>
282
- `,Ss=K`
282
+ `,Os=W`
283
283
  <div
284
284
  class="title"
285
285
  part="title"
@@ -290,7 +290,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
290
290
  </span>
291
291
  <span part="year">${t=>t.dateFormatter.getYear(t.year)}</span>
292
292
  </div>
293
- `,Rs=t=>{const e=t.tagFor(Es);return K`
293
+ `,Ss=t=>{const e=t.tagFor(ks);return W`
294
294
  <${e}
295
295
  class="week-day"
296
296
  part="week-day"
@@ -300,7 +300,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
300
300
  >
301
301
  ${t=>t.text}
302
302
  </${e}>
303
- `},As=(t,e)=>{const i=t.tagFor(Es);return K`
303
+ `},Rs=(t,e)=>{const i=t.tagFor(ks);return W`
304
304
  <${i}
305
305
  class="${(t,i)=>i.parentContext.parent.getDayClassNames(t,e)}"
306
306
  part="day"
@@ -319,7 +319,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
319
319
  </div>
320
320
  <slot name="${t=>t.month}-${t=>t.day}-${t=>t.year}"></slot>
321
321
  </${i}>
322
- `},Ds=(t,e)=>{const i=t.tagFor(xs);return K`
322
+ `},Ds=(t,e)=>{const i=t.tagFor(Cs);return W`
323
323
  <${i}
324
324
  class="week"
325
325
  part="week"
@@ -327,9 +327,9 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
327
327
  role-type="default"
328
328
  grid-template-columns="1fr 1fr 1fr 1fr 1fr 1fr 1fr"
329
329
  >
330
- ${jt((t=>t),As(t,e),{positioning:!0})}
330
+ ${_t((t=>t),Rs(t,e),{positioning:!0})}
331
331
  </${i}>
332
- `},Fs=(t,e)=>{const i=t.tagFor($s),s=t.tagFor(xs);return K`
332
+ `},As=(t,e)=>{const i=t.tagFor(ws),s=t.tagFor(Cs);return W`
333
333
  <${i} class="days interact" part="days" generate-header="none">
334
334
  <${s}
335
335
  class="week-days"
@@ -338,22 +338,22 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
338
338
  row-type="header"
339
339
  grid-template-columns="1fr 1fr 1fr 1fr 1fr 1fr 1fr"
340
340
  >
341
- ${jt((t=>t.getWeekdayText()),Rs(t),{positioning:!0})}
341
+ ${_t((t=>t.getWeekdayText()),Ss(t),{positioning:!0})}
342
342
  </${s}>
343
- ${jt((t=>t.getDays()),Ds(t,e))}
343
+ ${_t((t=>t.getDays()),Ds(t,e))}
344
344
  </${i}>
345
- `},Ls=t=>K`
345
+ `},Fs=t=>W`
346
346
  <div class="days" part="days">
347
347
  <div class="week-days" part="week-days">
348
- ${jt((t=>t.getWeekdayText()),K`
348
+ ${_t((t=>t.getWeekdayText()),W`
349
349
  <div class="week-day" part="week-day" abbr="${t=>t.abbr}">
350
350
  ${t=>t.text}
351
351
  </div>
352
352
  `)}
353
353
  </div>
354
- ${jt((t=>t.getDays()),K`
354
+ ${_t((t=>t.getDays()),W`
355
355
  <div class="week">
356
- ${jt((t=>t),K`
356
+ ${_t((t=>t),W`
357
357
  <div
358
358
  class="${(e,i)=>i.parentContext.parent.getDayClassNames(e,t)}"
359
359
  part="day"
@@ -373,17 +373,17 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
373
373
  </div>
374
374
  `)}
375
375
  </div>
376
- `,Ps=(t,e)=>{const i=new Date,s=`${i.getMonth()+1}-${i.getDate()}-${i.getFullYear()}`;return K`
376
+ `,Ls=(t,e)=>{const i=new Date,s=`${i.getMonth()+1}-${i.getDate()}-${i.getFullYear()}`;return W`
377
377
  <template>
378
- ${ie}
378
+ ${ee}
379
379
  ${e.title instanceof Function?e.title(t,e):e.title??""}
380
380
  <slot></slot>
381
- ${zt((t=>t.readonly),Ls(s),Fs(t,s))}
382
- ${ee}
381
+ ${Ht((t=>t.readonly),Fs(s),As(t,s))}
382
+ ${te}
383
383
  </template>
384
- `},Ms=(t,e)=>K`
384
+ `},Ps=(t,e)=>W`
385
385
  <slot></slot>
386
- `;class Vs extends ei{}const Hs=(t,e)=>K`
386
+ `;class Ms extends ti{}const Vs=(t,e)=>W`
387
387
  <template
388
388
  role="checkbox"
389
389
  aria-checked="${t=>t.checked}"
@@ -407,10 +407,10 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
407
407
  part="label"
408
408
  class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
409
409
  >
410
- <slot ${Xt("defaultSlottedNodes")}></slot>
410
+ <slot ${Yt("defaultSlottedNodes")}></slot>
411
411
  </label>
412
412
  </template>
413
- `;class zs extends ei{}class Ns extends(cs(zs)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Bs extends Ns{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=t=>{if(!this.readOnly&&t.key===Ei)this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked},this.clickHandler=t=>{this.disabled||this.readOnly||(this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}}function qs(t){return hi(t)&&("option"===t.getAttribute("role")||t instanceof HTMLOptionElement)}oe([lt({attribute:"readonly",mode:"boolean"})],Bs.prototype,"readOnly",void 0),oe([f],Bs.prototype,"defaultSlottedNodes",void 0),oe([f],Bs.prototype,"indeterminate",void 0);class Us extends ei{checkedChanged(t,e){this.ariaChecked="boolean"!=typeof e?null:e?"true":"false"}contentChanged(t,e){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(t,e){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(t,e){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){return this.value??this.text}get text(){return this.textContent?.replace(/\s+/g," ").trim()??""}set value(t){const e=`${t??""}`;this._value=e,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=e),m.notify(this,"value")}get value(){return m.track(this,"value"),this._value??this.text}get form(){return this.proxy?this.proxy.form:null}constructor(t,e,i,s){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,t&&(this.textContent=t),e&&(this.initialValue=e),i&&(this.defaultSelected=i),s&&(this.selected=s),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}}oe([f],Us.prototype,"checked",void 0),oe([f],Us.prototype,"content",void 0),oe([f],Us.prototype,"defaultSelected",void 0),oe([lt({mode:"boolean"})],Us.prototype,"disabled",void 0),oe([lt({attribute:"selected",mode:"boolean"})],Us.prototype,"selectedAttribute",void 0),oe([f],Us.prototype,"selected",void 0),oe([lt({attribute:"value",mode:"fromView"})],Us.prototype,"initialValue",void 0);class _s{}oe([f],_s.prototype,"ariaChecked",void 0),oe([f],_s.prototype,"ariaPosInSet",void 0),oe([f],_s.prototype,"ariaSelected",void 0),oe([f],_s.prototype,"ariaSetSize",void 0),oi(_s,Vi),oi(Us,Zt,_s);class js extends ei{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){return this.selectedOptions[0]??null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every((t=>t.disabled))}get length(){return this.options?.length??0}get options(){return m.track(this,"options"),this._options}set options(t){this._options=t,m.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(t){this.typeaheadExpired=t}static{this.slottedOptionFilter=t=>qs(t)&&!t.hidden}static{this.TYPE_AHEAD_TIMEOUT_MS=1e3}clickHandler(t){const e=t.target.closest("option,[role=option]");if(e&&!e.disabled)return this.selectedIndex=this.options.indexOf(e),!0}focusAndScrollOptionIntoView(t=this.firstSelectedOption){this.contains(document.activeElement)&&null!==t&&(t.focus(),requestAnimationFrame((()=>{t.scrollIntoView({block:"nearest"})})))}focusinHandler(t){this.shouldSkipFocus||t.target!==t.currentTarget||(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const t=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),e=new RegExp(`^${t}`,"gi");return this.options.filter((t=>t.text.trim().match(e)))}getSelectableIndex(t=this.selectedIndex,e){const i=t>e?-1:t<e?1:0,s=t+i;let o=null;switch(i){case-1:o=this.options.reduceRight(((t,e,i)=>!t&&!e.disabled&&i<s?e:t),o);break;case 1:o=this.options.reduce(((t,e,i)=>!t&&!e.disabled&&i>s?e:t),o)}return this.options.indexOf(o)}handleChange(t,e){if("selected"===e)js.slottedOptionFilter(t)&&(this.selectedIndex=this.options.indexOf(t)),this.setSelectedOptions()}handleTypeAhead(t){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout((()=>this.typeaheadExpired=!0),js.TYPE_AHEAD_TIMEOUT_MS),t.length>1||(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${t}`)}keydownHandler(t){if(this.disabled)return!0;this.shouldSkipFocus=!1;const e=t.key;switch(e){case Ii:t.shiftKey||(t.preventDefault(),this.selectFirstOption());break;case bi:t.shiftKey||(t.preventDefault(),this.selectNextOption());break;case xi:t.shiftKey||(t.preventDefault(),this.selectPreviousOption());break;case ki:t.preventDefault(),this.selectLastOption();break;case Ti:return this.focusAndScrollOptionIntoView(),!0;case wi:case $i:return!0;case Ei:if(this.typeaheadExpired)return!0;default:return 1===e.length&&this.handleTypeAhead(`${e}`),!0}}mousedownHandler(t){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(t,e){this.ariaMultiSelectable=e?"true":null}selectedIndexChanged(t,e){if(this.hasSelectableOptions){if(this.options[this.selectedIndex]?.disabled&&"number"==typeof t){const i=this.getSelectableIndex(t,e),s=i>-1?i:t;return this.selectedIndex=s,void(e===s&&this.selectedIndexChanged(e,s))}this.setSelectedOptions()}else this.selectedIndex=-1}selectedOptionsChanged(t,e){const i=e.filter(js.slottedOptionFilter);this.options?.forEach((t=>{const e=m.getNotifier(t);e.unsubscribe(this,"selected"),t.selected=i.includes(t),e.subscribe(this,"selected")}))}selectFirstOption(){this.disabled||(this.selectedIndex=this.options?.findIndex((t=>!t.disabled))??-1)}selectLastOption(){this.disabled||(this.selectedIndex=function(t,e){let i=t.length;for(;i--;)if(e(t[i],i,t))return i;return-1}(this.options,(t=>!t.disabled)))}selectNextOption(){!this.disabled&&this.selectedIndex<this.options.length-1&&(this.selectedIndex+=1)}selectPreviousOption(){!this.disabled&&this.selectedIndex>0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){this.selectedIndex=this.options?.findIndex((t=>t.defaultSelected))??-1}setSelectedOptions(){this.options?.length&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=this.firstSelectedOption?.id??"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(t,e){this.options=e.reduce(((t,e)=>(qs(e)&&t.push(e),t)),[]);const i=`${this.options.length}`;this.options.forEach(((t,e)=>{t.id||(t.id=Fi("option-")),t.ariaPosInSet=`${e+1}`,t.ariaSetSize=i})),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(t,e){if(this.$fastController.isConnected){const t=this.getTypeaheadMatches();if(t.length){const e=this.options.indexOf(t[0]);e>-1&&(this.selectedIndex=e)}this.typeaheadExpired=!1}}}oe([lt({mode:"boolean"})],js.prototype,"disabled",void 0),oe([f],js.prototype,"selectedIndex",void 0),oe([f],js.prototype,"selectedOptions",void 0),oe([f],js.prototype,"slottedOptions",void 0),oe([f],js.prototype,"typeaheadBuffer",void 0);class Ws{}oe([f],Ws.prototype,"ariaActiveDescendant",void 0),oe([f],Ws.prototype,"ariaDisabled",void 0),oe([f],Ws.prototype,"ariaExpanded",void 0),oe([f],Ws.prototype,"ariaMultiSelectable",void 0),oi(Ws,Vi),oi(js,Ws);const Ks={above:"above",below:"below"};class Ys extends js{}class Xs extends(ds(Ys)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const Gs={inline:"inline",list:"list",both:"both",none:"none"};class Qs extends Xs{constructor(){super(...arguments),this._value="",this.filteredOptions=[],this.filter="",this.forcedPosition=!1,this.listboxId=Fi("listbox-"),this.maxHeight=0,this.open=!1}formResetCallback(){super.formResetCallback(),this.setDefaultSelectedOption(),this.updateValue()}validate(){super.validate(this.control)}get isAutocompleteInline(){return this.autocomplete===Gs.inline||this.isAutocompleteBoth}get isAutocompleteList(){return this.autocomplete===Gs.list||this.isAutocompleteBoth}get isAutocompleteBoth(){return this.autocomplete===Gs.both}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),void c.queueUpdate((()=>this.focus()));this.ariaControls="",this.ariaExpanded="false"}get options(){return m.track(this,"options"),this.filteredOptions.length?this.filteredOptions:this._options}set options(t){this._options=t,m.notify(this,"options")}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}get value(){return m.track(this,"value"),this._value}set value(t){const e=`${this._value}`;if(this.$fastController.isConnected&&this.options){const e=this.options.findIndex((e=>e.text.toLowerCase()===t.toLowerCase())),i=this.options[this.selectedIndex]?.text,s=this.options[e]?.text;this.selectedIndex=i!==s?e:this.selectedIndex,t=this.firstSelectedOption?.text||t}e!==t&&(this._value=t,super.valueChanged(e,t),m.notify(this,"value"))}clickHandler(t){const e=t.target.closest("option,[role=option]");if(!this.disabled&&!e?.disabled){if(this.open){if(t.composedPath()[0]===this.control)return;e&&(this.selectedOptions=[e],this.control.value=e.text,this.clearSelectionRange(),this.updateValue(!0))}return this.open=!this.open,this.open&&this.control.focus(),!0}}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.value&&(this.initialValue=this.value)}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}filterOptions(){this.autocomplete&&this.autocomplete!==Gs.none||(this.filter="");const t=this.filter.toLowerCase();this.filteredOptions=this._options.filter((t=>t.text.toLowerCase().startsWith(this.filter.toLowerCase()))),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach((t=>{t.hidden=!this.filteredOptions.includes(t)})))}focusAndScrollOptionIntoView(){this.contains(document.activeElement)&&(this.control.focus(),this.firstSelectedOption&&requestAnimationFrame((()=>{this.firstSelectedOption?.scrollIntoView({block:"nearest"})})))}focusoutHandler(t){if(this.syncValue(),!this.open)return!0;const e=t.relatedTarget;this.isSameNode(e)?this.focus():this.options&&this.options.includes(e)||(this.open=!1)}inputHandler(t){if(this.filter=this.control.value,this.filterOptions(),this.isAutocompleteInline||(this.selectedIndex=this.options.map((t=>t.text)).indexOf(this.control.value)),t.inputType.includes("deleteContent")||!this.filter.length)return!0;this.isAutocompleteList&&!this.open&&(this.open=!0),this.isAutocompleteInline&&(this.filteredOptions.length?(this.selectedOptions=[this.filteredOptions[0]],this.selectedIndex=this.options.indexOf(this.firstSelectedOption),this.setInlineSelection()):this.selectedIndex=-1)}keydownHandler(t){const e=t.key;if(t.ctrlKey||t.shiftKey)return!0;switch(e){case"Enter":this.syncValue(),this.isAutocompleteInline&&(this.filter=this.value),this.open=!1,this.clearSelectionRange();break;case"Escape":if(this.isAutocompleteInline||(this.selectedIndex=-1),this.open){this.open=!1;break}this.value="",this.control.value="",this.filter="",this.filterOptions();break;case"Tab":if(this.setInputToSelection(),!this.open)return!0;t.preventDefault(),this.open=!1;break;case"ArrowUp":case"ArrowDown":if(this.filterOptions(),!this.open){this.open=!0;break}this.filteredOptions.length>0&&super.keydownHandler(t),this.isAutocompleteInline&&this.setInlineSelection();break;default:return!0}}keyupHandler(t){switch(t.key){case"ArrowLeft":case"ArrowRight":case"Backspace":case"Delete":case"Home":case"End":this.filter=this.control.value,this.selectedIndex=-1,this.filterOptions()}}selectedIndexChanged(t,e){if(this.$fastController.isConnected){if((e=Ri(-1,this.options.length-1,e))!==this.selectedIndex)return void(this.selectedIndex=e);super.selectedIndexChanged(t,e)}}selectPreviousOption(){!this.disabled&&this.selectedIndex>=0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){if(this.$fastController.isConnected&&this.options){const t=this.options.findIndex((t=>null!==t.getAttribute("selected")||t.selected));this.selectedIndex=t,!this.dirtyValue&&this.firstSelectedOption&&(this.value=this.firstSelectedOption.text),this.setSelectedOptions()}}setInputToSelection(){this.firstSelectedOption&&(this.control.value=this.firstSelectedOption.text,this.control.focus())}setInlineSelection(){this.firstSelectedOption&&(this.setInputToSelection(),this.control.setSelectionRange(this.filter.length,this.control.value.length,"backward"))}syncValue(){const t=this.selectedIndex>-1?this.firstSelectedOption?.text:this.control.value;this.updateValue(this.value!==t)}setPositioning(){const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom;this.position=this.forcedPosition?this.positionAttribute:t.top>e?Ks.above:Ks.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Ks.above?~~t.top:~~e}selectedOptionsChanged(t,e){this.$fastController.isConnected&&this._options.forEach((t=>{t.selected=e.includes(t)}))}slottedOptionsChanged(t,e){super.slottedOptionsChanged(t,e),this.updateValue()}updateValue(t){this.$fastController.isConnected&&(this.value=this.firstSelectedOption?.text||this.control.value,this.control.value=this.value),t&&this.$emit("change")}clearSelectionRange(){const t=this.control.value.length;this.control.setSelectionRange(t,t)}}oe([lt({attribute:"autocomplete",mode:"fromView"})],Qs.prototype,"autocomplete",void 0),oe([f],Qs.prototype,"maxHeight",void 0),oe([lt({attribute:"open",mode:"boolean"})],Qs.prototype,"open",void 0),oe([lt],Qs.prototype,"placeholder",void 0),oe([lt({attribute:"position"})],Qs.prototype,"positionAttribute",void 0),oe([f],Qs.prototype,"position",void 0);class Zs{}oe([f],Zs.prototype,"ariaAutoComplete",void 0),oe([f],Zs.prototype,"ariaControls",void 0),oi(Zs,Ws),oi(Qs,Zt,Zs);const Js=(t,e)=>K`
413
+ `;class Hs extends ti{}class zs extends(ds(Hs)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Ns extends zs{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=t=>{if(!this.readOnly&&t.key===ki)this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked},this.clickHandler=t=>{this.disabled||this.readOnly||(this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}}function Bs(t){return li(t)&&("option"===t.getAttribute("role")||t instanceof HTMLOptionElement)}se([at({attribute:"readonly",mode:"boolean"})],Ns.prototype,"readOnly",void 0),se([f],Ns.prototype,"defaultSlottedNodes",void 0),se([f],Ns.prototype,"indeterminate",void 0);class qs extends ti{checkedChanged(t,e){this.ariaChecked="boolean"!=typeof e?null:e?"true":"false"}contentChanged(t,e){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(t,e){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(t,e){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){return this.value??this.text}get text(){return this.textContent?.replace(/\s+/g," ").trim()??""}set value(t){const e=`${t??""}`;this._value=e,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=e),m.notify(this,"value")}get value(){return m.track(this,"value"),this._value??this.text}get form(){return this.proxy?this.proxy.form:null}constructor(t,e,i,s){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,t&&(this.textContent=t),e&&(this.initialValue=e),i&&(this.defaultSelected=i),s&&(this.selected=s),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}}se([f],qs.prototype,"checked",void 0),se([f],qs.prototype,"content",void 0),se([f],qs.prototype,"defaultSelected",void 0),se([at({mode:"boolean"})],qs.prototype,"disabled",void 0),se([at({attribute:"selected",mode:"boolean"})],qs.prototype,"selectedAttribute",void 0),se([f],qs.prototype,"selected",void 0),se([at({attribute:"value",mode:"fromView"})],qs.prototype,"initialValue",void 0);class Us{}se([f],Us.prototype,"ariaChecked",void 0),se([f],Us.prototype,"ariaPosInSet",void 0),se([f],Us.prototype,"ariaSelected",void 0),se([f],Us.prototype,"ariaSetSize",void 0),si(Us,Mi),si(qs,Qt,Us);class _s extends ti{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){return this.selectedOptions[0]??null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every((t=>t.disabled))}get length(){return this.options?.length??0}get options(){return m.track(this,"options"),this._options}set options(t){this._options=t,m.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(t){this.typeaheadExpired=t}static{this.slottedOptionFilter=t=>Bs(t)&&!t.hidden}static{this.TYPE_AHEAD_TIMEOUT_MS=1e3}clickHandler(t){const e=t.target.closest("option,[role=option]");if(e&&!e.disabled)return this.selectedIndex=this.options.indexOf(e),!0}focusAndScrollOptionIntoView(t=this.firstSelectedOption){this.contains(document.activeElement)&&null!==t&&(t.focus(),requestAnimationFrame((()=>{t.scrollIntoView({block:"nearest"})})))}focusinHandler(t){this.shouldSkipFocus||t.target!==t.currentTarget||(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const t=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),e=new RegExp(`^${t}`,"gi");return this.options.filter((t=>t.text.trim().match(e)))}getSelectableIndex(t=this.selectedIndex,e){const i=t>e?-1:t<e?1:0,s=t+i;let o=null;switch(i){case-1:o=this.options.reduceRight(((t,e,i)=>!t&&!e.disabled&&i<s?e:t),o);break;case 1:o=this.options.reduce(((t,e,i)=>!t&&!e.disabled&&i>s?e:t),o)}return this.options.indexOf(o)}handleChange(t,e){if("selected"===e)_s.slottedOptionFilter(t)&&(this.selectedIndex=this.options.indexOf(t)),this.setSelectedOptions()}handleTypeAhead(t){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout((()=>this.typeaheadExpired=!0),_s.TYPE_AHEAD_TIMEOUT_MS),t.length>1||(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${t}`)}keydownHandler(t){if(this.disabled)return!0;this.shouldSkipFocus=!1;const e=t.key;switch(e){case $i:t.shiftKey||(t.preventDefault(),this.selectFirstOption());break;case gi:t.shiftKey||(t.preventDefault(),this.selectNextOption());break;case Ci:t.shiftKey||(t.preventDefault(),this.selectPreviousOption());break;case Ii:t.preventDefault(),this.selectLastOption();break;case Ei:return this.focusAndScrollOptionIntoView(),!0;case xi:case wi:return!0;case ki:if(this.typeaheadExpired)return!0;default:return 1===e.length&&this.handleTypeAhead(`${e}`),!0}}mousedownHandler(t){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(t,e){this.ariaMultiSelectable=e?"true":null}selectedIndexChanged(t,e){if(this.hasSelectableOptions){if(this.options[this.selectedIndex]?.disabled&&"number"==typeof t){const i=this.getSelectableIndex(t,e),s=i>-1?i:t;return this.selectedIndex=s,void(e===s&&this.selectedIndexChanged(e,s))}this.setSelectedOptions()}else this.selectedIndex=-1}selectedOptionsChanged(t,e){const i=e.filter(_s.slottedOptionFilter);this.options?.forEach((t=>{const e=m.getNotifier(t);e.unsubscribe(this,"selected"),t.selected=i.includes(t),e.subscribe(this,"selected")}))}selectFirstOption(){this.disabled||(this.selectedIndex=this.options?.findIndex((t=>!t.disabled))??-1)}selectLastOption(){this.disabled||(this.selectedIndex=function(t,e){let i=t.length;for(;i--;)if(e(t[i],i,t))return i;return-1}(this.options,(t=>!t.disabled)))}selectNextOption(){!this.disabled&&this.selectedIndex<this.options.length-1&&(this.selectedIndex+=1)}selectPreviousOption(){!this.disabled&&this.selectedIndex>0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){this.selectedIndex=this.options?.findIndex((t=>t.defaultSelected))??-1}setSelectedOptions(){this.options?.length&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=this.firstSelectedOption?.id??"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(t,e){this.options=e.reduce(((t,e)=>(Bs(e)&&t.push(e),t)),[]);const i=`${this.options.length}`;this.options.forEach(((t,e)=>{t.id||(t.id=Ai("option-")),t.ariaPosInSet=`${e+1}`,t.ariaSetSize=i})),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(t,e){if(this.$fastController.isConnected){const t=this.getTypeaheadMatches();if(t.length){const e=this.options.indexOf(t[0]);e>-1&&(this.selectedIndex=e)}this.typeaheadExpired=!1}}}se([at({mode:"boolean"})],_s.prototype,"disabled",void 0),se([f],_s.prototype,"selectedIndex",void 0),se([f],_s.prototype,"selectedOptions",void 0),se([f],_s.prototype,"slottedOptions",void 0),se([f],_s.prototype,"typeaheadBuffer",void 0);class js{}se([f],js.prototype,"ariaActiveDescendant",void 0),se([f],js.prototype,"ariaDisabled",void 0),se([f],js.prototype,"ariaExpanded",void 0),se([f],js.prototype,"ariaMultiSelectable",void 0),si(js,Mi),si(_s,js);const Ws={above:"above",below:"below"};class Ks extends _s{}class Ys extends(hs(Ks)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const Xs={inline:"inline",list:"list",both:"both",none:"none"};class Gs extends Ys{constructor(){super(...arguments),this._value="",this.filteredOptions=[],this.filter="",this.forcedPosition=!1,this.listboxId=Ai("listbox-"),this.maxHeight=0,this.open=!1}formResetCallback(){super.formResetCallback(),this.setDefaultSelectedOption(),this.updateValue()}validate(){super.validate(this.control)}get isAutocompleteInline(){return this.autocomplete===Xs.inline||this.isAutocompleteBoth}get isAutocompleteList(){return this.autocomplete===Xs.list||this.isAutocompleteBoth}get isAutocompleteBoth(){return this.autocomplete===Xs.both}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),void c.queueUpdate((()=>this.focus()));this.ariaControls="",this.ariaExpanded="false"}get options(){return m.track(this,"options"),this.filteredOptions.length?this.filteredOptions:this._options}set options(t){this._options=t,m.notify(this,"options")}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}get value(){return m.track(this,"value"),this._value}set value(t){const e=`${this._value}`;if(this.$fastController.isConnected&&this.options){const e=this.options.findIndex((e=>e.text.toLowerCase()===t.toLowerCase())),i=this.options[this.selectedIndex]?.text,s=this.options[e]?.text;this.selectedIndex=i!==s?e:this.selectedIndex,t=this.firstSelectedOption?.text||t}e!==t&&(this._value=t,super.valueChanged(e,t),m.notify(this,"value"))}clickHandler(t){const e=t.target.closest("option,[role=option]");if(!this.disabled&&!e?.disabled){if(this.open){if(t.composedPath()[0]===this.control)return;e&&(this.selectedOptions=[e],this.control.value=e.text,this.clearSelectionRange(),this.updateValue(!0))}return this.open=!this.open,this.open&&this.control.focus(),!0}}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.value&&(this.initialValue=this.value)}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}filterOptions(){this.autocomplete&&this.autocomplete!==Xs.none||(this.filter="");const t=this.filter.toLowerCase();this.filteredOptions=this._options.filter((t=>t.text.toLowerCase().startsWith(this.filter.toLowerCase()))),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach((t=>{t.hidden=!this.filteredOptions.includes(t)})))}focusAndScrollOptionIntoView(){this.contains(document.activeElement)&&(this.control.focus(),this.firstSelectedOption&&requestAnimationFrame((()=>{this.firstSelectedOption?.scrollIntoView({block:"nearest"})})))}focusoutHandler(t){if(this.syncValue(),!this.open)return!0;const e=t.relatedTarget;this.isSameNode(e)?this.focus():this.options&&this.options.includes(e)||(this.open=!1)}inputHandler(t){if(this.filter=this.control.value,this.filterOptions(),this.isAutocompleteInline||(this.selectedIndex=this.options.map((t=>t.text)).indexOf(this.control.value)),t.inputType.includes("deleteContent")||!this.filter.length)return!0;this.isAutocompleteList&&!this.open&&(this.open=!0),this.isAutocompleteInline&&(this.filteredOptions.length?(this.selectedOptions=[this.filteredOptions[0]],this.selectedIndex=this.options.indexOf(this.firstSelectedOption),this.setInlineSelection()):this.selectedIndex=-1)}keydownHandler(t){const e=t.key;if(t.ctrlKey||t.shiftKey)return!0;switch(e){case"Enter":this.syncValue(),this.isAutocompleteInline&&(this.filter=this.value),this.open=!1,this.clearSelectionRange();break;case"Escape":if(this.isAutocompleteInline||(this.selectedIndex=-1),this.open){this.open=!1;break}this.value="",this.control.value="",this.filter="",this.filterOptions();break;case"Tab":if(this.setInputToSelection(),!this.open)return!0;t.preventDefault(),this.open=!1;break;case"ArrowUp":case"ArrowDown":if(this.filterOptions(),!this.open){this.open=!0;break}this.filteredOptions.length>0&&super.keydownHandler(t),this.isAutocompleteInline&&this.setInlineSelection();break;default:return!0}}keyupHandler(t){switch(t.key){case"ArrowLeft":case"ArrowRight":case"Backspace":case"Delete":case"Home":case"End":this.filter=this.control.value,this.selectedIndex=-1,this.filterOptions()}}selectedIndexChanged(t,e){if(this.$fastController.isConnected){if((e=Si(-1,this.options.length-1,e))!==this.selectedIndex)return void(this.selectedIndex=e);super.selectedIndexChanged(t,e)}}selectPreviousOption(){!this.disabled&&this.selectedIndex>=0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){if(this.$fastController.isConnected&&this.options){const t=this.options.findIndex((t=>null!==t.getAttribute("selected")||t.selected));this.selectedIndex=t,!this.dirtyValue&&this.firstSelectedOption&&(this.value=this.firstSelectedOption.text),this.setSelectedOptions()}}setInputToSelection(){this.firstSelectedOption&&(this.control.value=this.firstSelectedOption.text,this.control.focus())}setInlineSelection(){this.firstSelectedOption&&(this.setInputToSelection(),this.control.setSelectionRange(this.filter.length,this.control.value.length,"backward"))}syncValue(){const t=this.selectedIndex>-1?this.firstSelectedOption?.text:this.control.value;this.updateValue(this.value!==t)}setPositioning(){const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom;this.position=this.forcedPosition?this.positionAttribute:t.top>e?Ws.above:Ws.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Ws.above?~~t.top:~~e}selectedOptionsChanged(t,e){this.$fastController.isConnected&&this._options.forEach((t=>{t.selected=e.includes(t)}))}slottedOptionsChanged(t,e){super.slottedOptionsChanged(t,e),this.updateValue()}updateValue(t){this.$fastController.isConnected&&(this.value=this.firstSelectedOption?.text||this.control.value,this.control.value=this.value),t&&this.$emit("change")}clearSelectionRange(){const t=this.control.value.length;this.control.setSelectionRange(t,t)}}se([at({attribute:"autocomplete",mode:"fromView"})],Gs.prototype,"autocomplete",void 0),se([f],Gs.prototype,"maxHeight",void 0),se([at({attribute:"open",mode:"boolean"})],Gs.prototype,"open",void 0),se([at],Gs.prototype,"placeholder",void 0),se([at({attribute:"position"})],Gs.prototype,"positionAttribute",void 0),se([f],Gs.prototype,"position",void 0);class Qs{}se([f],Qs.prototype,"ariaAutoComplete",void 0),se([f],Qs.prototype,"ariaControls",void 0),si(Qs,js),si(Gs,Qt,Qs);const Zs=(t,e)=>W`
414
414
  <template
415
415
  aria-disabled="${t=>t.ariaDisabled}"
416
416
  autocomplete="${t=>t.autocomplete}"
@@ -422,7 +422,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
422
422
  @keydown="${(t,e)=>t.keydownHandler(e.event)}"
423
423
  >
424
424
  <div class="control" part="control">
425
- ${te(0,e)}
425
+ ${Jt(0,e)}
426
426
  <slot name="control">
427
427
  <input
428
428
  aria-activedescendant="${t=>t.open?t.ariaActiveDescendant:null}"
@@ -440,7 +440,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
440
440
  :value="${t=>t.value}"
441
441
  @input="${(t,e)=>t.inputHandler(e.event)}"
442
442
  @keyup="${(t,e)=>t.keyupHandler(e.event)}"
443
- ${Pt("control")}
443
+ ${Lt("control")}
444
444
  />
445
445
  <div class="indicator" part="indicator" aria-hidden="true">
446
446
  <slot name="indicator">
@@ -448,7 +448,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
448
448
  </slot>
449
449
  </div>
450
450
  </slot>
451
- ${Jt(0,e)}
451
+ ${Zt(0,e)}
452
452
  </div>
453
453
  <div
454
454
  class="listbox"
@@ -457,16 +457,16 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
457
457
  role="listbox"
458
458
  ?disabled="${t=>t.disabled}"
459
459
  ?hidden="${t=>!t.open}"
460
- ${Pt("listbox")}
460
+ ${Lt("listbox")}
461
461
  >
462
462
  <slot
463
- ${Xt({filter:js.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
463
+ ${Yt({filter:_s.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
464
464
  ></slot>
465
465
  </div>
466
466
  </template>
467
- `;function to(t){const e=t.parentElement;if(e)return e;{const e=t.getRootNode();if(e.host instanceof HTMLElement)return e.host}return null}function eo(t,e){let i=e;for(;null!==i;){if(i===t)return!0;i=to(i)}return!1}const io=document.createElement("div");class so{setProperty(t,e){c.queueUpdate((()=>this.target.setProperty(t,e)))}removeProperty(t){c.queueUpdate((()=>this.target.removeProperty(t)))}}class oo extends so{constructor(){super();const t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}}class no extends so{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:t}=this.style;if(t){const e=t.insertRule(":root{}",t.cssRules.length);this.target=t.cssRules[e].style}}}class ro{targetChanged(){if(null!==this.target)for(const[t,e]of this.store.entries())this.target.setProperty(t,e)}constructor(t){this.store=new Map,this.target=null;const e=t.$fastController;this.style=document.createElement("style"),e.addStyles(this.style),m.getNotifier(e).subscribe(this,"isConnected"),this.handleChange(e,"isConnected")}setProperty(t,e){this.store.set(t,e),c.queueUpdate((()=>{null!==this.target&&this.target.setProperty(t,e)}))}removeProperty(t){this.store.delete(t),c.queueUpdate((()=>{null!==this.target&&this.target.removeProperty(t)}))}handleChange(t,e){const{sheet:i}=this.style;if(i){const t=i.insertRule(":host{}",i.cssRules.length);this.target=i.cssRules[t].style}else this.target=null}}oe([f],ro.prototype,"target",void 0);class ao{constructor(t){this.target=t.style}setProperty(t,e){c.queueUpdate((()=>this.target.setProperty(t,e)))}removeProperty(t){c.queueUpdate((()=>this.target.removeProperty(t)))}}class lo{static{this.roots=new Set}static{this.properties={}}setProperty(t,e){lo.properties[t]=e;for(const i of lo.roots.values())uo.getOrCreate(lo.normalizeRoot(i)).setProperty(t,e)}removeProperty(t){delete lo.properties[t];for(const e of lo.roots.values())uo.getOrCreate(lo.normalizeRoot(e)).removeProperty(t)}static registerRoot(t){const{roots:e}=lo;if(!e.has(t)){e.add(t);const i=uo.getOrCreate(this.normalizeRoot(t));for(const t in lo.properties)i.setProperty(t,lo.properties[t])}}static unregisterRoot(t){const{roots:e}=lo;if(e.has(t)){e.delete(t);const i=uo.getOrCreate(lo.normalizeRoot(t));for(const t in lo.properties)i.removeProperty(t)}}static normalizeRoot(t){return t===io?document:t}}const ho=new WeakMap,co=c.supportsAdoptedStyleSheets?class extends so{constructor(t){super();const e=new CSSStyleSheet;e[Q]=!0,this.target=e.cssRules[e.insertRule(":host{}")].style,t.$fastController.addStyles(Y.create([e]))}}:ro,uo=Object.freeze({getOrCreate(t){if(ho.has(t))return ho.get(t);let e;return t===io?e=new lo:t instanceof Document?e=c.supportsAdoptedStyleSheets?new oo:new no:e=t instanceof bt?new co(t):new ao(t),ho.set(t,e),e}});class po extends Ct{get appliedTo(){return[...this._appliedTo]}static from(t){return new po({name:"string"==typeof t?t:t.name,cssCustomPropertyName:"string"==typeof t?t:void 0===t.cssCustomPropertyName?t.name:t.cssCustomPropertyName})}static isCSSDesignToken(t){return"string"==typeof t.cssCustomProperty}static isDerivedDesignTokenValue(t){return"function"==typeof t}static{this.uniqueId=(()=>{let t=0;return()=>(t++,t.toString(16))})()}static getTokenById(t){return po.tokensById.get(t)}static{this.tokensById=new Map}getOrCreateSubscriberSet(t=this){return this.subscribers.get(t)||this.subscribers.set(t,new Set)&&this.subscribers.get(t)}constructor(t){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=t.name,null!==t.cssCustomPropertyName&&(this.cssCustomProperty=`--${t.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=po.uniqueId(),po.tokensById.set(this.id,this)}createCSS(){return this.cssVar||""}getValueFor(t){const e=yo.getOrCreate(t).get(this);if(void 0!==e)return e;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${t} or an ancestor of ${t}.`)}setValueFor(t,e){return this._appliedTo.add(t),e instanceof po&&(e=this.alias(e)),yo.getOrCreate(t).set(this,e),this}deleteValueFor(t){return this._appliedTo.delete(t),yo.existsFor(t)&&yo.getOrCreate(t).delete(this),this}withDefault(t){return this.setValueFor(io,t),this}subscribe(t,e){const i=this.getOrCreateSubscriberSet(e);e&&!yo.existsFor(e)&&yo.getOrCreate(e),i.has(t)||i.add(t)}unsubscribe(t,e){const i=this.subscribers.get(e||this);i&&i.has(t)&&i.delete(t)}notify(t){const e=Object.freeze({token:this,target:t});this.subscribers.has(this)&&this.subscribers.get(this).forEach((t=>t.handleChange(e))),this.subscribers.has(t)&&this.subscribers.get(t).forEach((t=>t.handleChange(e)))}alias(t){return e=>t.getValueFor(e)}}class mo{startReflection(t,e){t.subscribe(this,e),this.handleChange({token:t,target:e})}stopReflection(t,e){t.unsubscribe(this,e),this.remove(t,e)}handleChange(t){const{token:e,target:i}=t;this.add(e,i)}add(t,e){uo.getOrCreate(e).setProperty(t.cssCustomProperty,this.resolveCSSValue(yo.getOrCreate(e).get(t)))}remove(t,e){uo.getOrCreate(e).removeProperty(t.cssCustomProperty)}resolveCSSValue(t){return t&&"function"==typeof t.createCSS?t.createCSS():t}}class fo{constructor(t,e,i){this.source=t,this.token=e,this.node=i,this.dependencies=new Set,this.observer=m.binding(t,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,y))}catch(t){console.error(t)}}}class vo{constructor(){this.values=new Map}set(t,e){this.values.get(t)!==e&&(this.values.set(t,e),m.getNotifier(this).notify(t.id))}get(t){return m.track(this,t.id),this.values.get(t)}delete(t){this.values.delete(t),m.getNotifier(this).notify(t.id)}all(){return this.values.entries()}}const go=new WeakMap,bo=new WeakMap;class yo{static getOrCreate(t){return go.get(t)||new yo(t)}static existsFor(t){return go.has(t)}static findParent(t){if(io!==t.target){let e=to(t.target);for(;null!==e;){if(go.has(e))return go.get(e);e=to(e)}return yo.getOrCreate(io)}return null}static findClosestAssignedNode(t,e){let i=e;do{if(i.has(t))return i;i=i.parent?i.parent:i.target!==io?yo.getOrCreate(io):null}while(null!==i);return null}static{this.cssCustomPropertyReflector=new mo}get parent(){return bo.get(this)||null}updateCSSTokenReflection(t,e){if(po.isCSSDesignToken(e)){const i=this.parent,s=this.isReflecting(e);if(i){const o=i.get(e),n=t.get(e);o===n||s?o===n&&s&&this.stopReflectToCSS(e):this.reflectToCSS(e)}else s||this.reflectToCSS(e)}}constructor(t){this.target=t,this.store=new vo,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(t,e)=>{const i=po.getTokenById(e);i&&(i.notify(this.target),this.updateCSSTokenReflection(t,i))}},go.set(t,this),m.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),t instanceof bt?t.$fastController.addBehaviors([this]):t.isConnected&&this.bind()}has(t){return this.assignedValues.has(t)}get(t){const e=this.store.get(t);if(void 0!==e)return e;const i=this.getRaw(t);return void 0!==i?(this.hydrate(t,i),this.get(t)):void 0}getRaw(t){return this.assignedValues.has(t)?this.assignedValues.get(t):yo.findClosestAssignedNode(t,this)?.getRaw(t)}set(t,e){po.isDerivedDesignTokenValue(this.assignedValues.get(t))&&this.tearDownBindingObserver(t),this.assignedValues.set(t,e),po.isDerivedDesignTokenValue(e)?this.setupBindingObserver(t,e):this.store.set(t,e)}delete(t){this.assignedValues.delete(t),this.tearDownBindingObserver(t);const e=this.getRaw(t);e?this.hydrate(t,e):this.store.delete(t)}bind(){const t=yo.findParent(this);t&&t.appendChild(this);for(const t of this.assignedValues.keys())t.notify(this.target)}unbind(){if(this.parent){bo.get(this).removeChild(this)}for(const t of this.bindingObservers.keys())this.tearDownBindingObserver(t)}appendChild(t){t.parent&&bo.get(t).removeChild(t);const e=this.children.filter((e=>t.contains(e)));bo.set(t,this),this.children.push(t),e.forEach((e=>t.appendChild(e))),m.getNotifier(this.store).subscribe(t);for(const[e,i]of this.store.all())t.hydrate(e,this.bindingObservers.has(e)?this.getRaw(e):i),t.updateCSSTokenReflection(t.store,e)}removeChild(t){const e=this.children.indexOf(t);if(-1!==e&&this.children.splice(e,1),m.getNotifier(this.store).unsubscribe(t),t.parent!==this)return!1;const i=bo.delete(t);for(const[e]of this.store.all())t.hydrate(e,t.getRaw(e)),t.updateCSSTokenReflection(t.store,e);return i}contains(t){return eo(this.target,t.target)}reflectToCSS(t){this.isReflecting(t)||(this.reflecting.add(t),yo.cssCustomPropertyReflector.startReflection(t,this.target))}stopReflectToCSS(t){this.isReflecting(t)&&(this.reflecting.delete(t),yo.cssCustomPropertyReflector.stopReflection(t,this.target))}isReflecting(t){return this.reflecting.has(t)}handleChange(t,e){const i=po.getTokenById(e);i&&(this.hydrate(i,this.getRaw(i)),this.updateCSSTokenReflection(this.store,i))}hydrate(t,e){if(!this.has(t)){const i=this.bindingObservers.get(t);po.isDerivedDesignTokenValue(e)?i?i.source!==e&&(this.tearDownBindingObserver(t),this.setupBindingObserver(t,e)):this.setupBindingObserver(t,e):(i&&this.tearDownBindingObserver(t),this.store.set(t,e))}}setupBindingObserver(t,e){const i=new fo(e,t,this);return this.bindingObservers.set(t,i),i}tearDownBindingObserver(t){return!!this.bindingObservers.has(t)&&(this.bindingObservers.get(t).disconnect(),this.bindingObservers.delete(t),!0)}}oe([f],yo.prototype,"children",void 0);const Co=Object.freeze({create:function(t){return po.from(t)},notifyConnection:t=>!(!t.isConnected||!yo.existsFor(t))&&(yo.getOrCreate(t).bind(),!0),notifyDisconnection:t=>!(t.isConnected||!yo.existsFor(t))&&(yo.getOrCreate(t).unbind(),!0),registerRoot(t=io){lo.registerRoot(t)},unregisterRoot(t=io){lo.unregisterRoot(t)}}),xo=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),wo=new Map,$o=new Map;let Io=null;const ko=pe.createInterface((t=>t.cachedCallback((t=>(null===Io&&(Io=new To(null,t)),Io))))),Eo=Object.freeze({tagFor:t=>$o.get(t),responsibleFor(t){const e=t.$$designSystem$$;if(e)return e;return pe.findResponsibleContainer(t).get(ko)},getOrCreate(t){if(!t)return null===Io&&(Io=pe.getOrCreateDOMContainer().get(ko)),Io;const e=t.$$designSystem$$;if(e)return e;const i=pe.getOrCreateDOMContainer(t);if(i.has(ko,!1))return i.get(ko);{const e=new To(t,i);return i.register(Ue.instance(ko,e)),e}}});class To{constructor(t,e){this.owner=t,this.container=e,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>xo.definitionCallbackOnly,null!==t&&(t.$$designSystem$$=this)}withPrefix(t){return this.prefix=t,this}withShadowRootMode(t){return this.shadowRootMode=t,this}withElementDisambiguation(t){return this.disambiguate=t,this}withDesignTokenRoot(t){return this.designTokenRoot=t,this}register(...t){const e=this.container,i=[],s=this.disambiguate,o=this.shadowRootMode,n={elementPrefix:this.prefix,tryDefineElement(t,n,r){const a=function(t,e,i){return"string"==typeof t?{name:t,type:e,callback:i}:t}(t,n,r),{name:l,callback:h,baseClass:d}=a;let{type:c}=a,u=l,p=wo.get(u),m=!0;for(;p;){const t=s(u,c,p);switch(t){case xo.ignoreDuplicate:return;case xo.definitionCallbackOnly:m=!1,p=void 0;break;default:u=t,p=wo.get(u)}}m&&(($o.has(c)||c===ei)&&(c=class extends c{}),wo.set(u,c),$o.set(c,u),d&&$o.set(d,u)),i.push(new Oo(e,u,c,o,h,m))}};this.designTokensInitialized||(this.designTokensInitialized=!0,null!==this.designTokenRoot&&Co.registerRoot(this.designTokenRoot)),e.registerWithContext(n,...t);for(const t of i)t.callback(t),t.willDefine&&null!==t.definition&&t.definition.define();return this}}class Oo{constructor(t,e,i,s,o,n){this.container=t,this.name=e,this.type=i,this.shadowRootMode=s,this.callback=o,this.willDefine=n,this.definition=null}definePresentation(t){Je.define(this.name,t,this.container)}defineElement(t){this.definition=new ut(this.type,{...t,name:this.name})}tagFor(t){return Eo.tagFor(t)}}const So=(t,e)=>K`
467
+ `;function Js(t){const e=t.parentElement;if(e)return e;{const e=t.getRootNode();if(e.host instanceof HTMLElement)return e.host}return null}function to(t,e){let i=e;for(;null!==i;){if(i===t)return!0;i=Js(i)}return!1}const eo=document.createElement("div");class io{setProperty(t,e){c.queueUpdate((()=>this.target.setProperty(t,e)))}removeProperty(t){c.queueUpdate((()=>this.target.removeProperty(t)))}}class so extends io{constructor(){super();const t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}}class oo extends io{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:t}=this.style;if(t){const e=t.insertRule(":root{}",t.cssRules.length);this.target=t.cssRules[e].style}}}class no{targetChanged(){if(null!==this.target)for(const[t,e]of this.store.entries())this.target.setProperty(t,e)}constructor(t){this.store=new Map,this.target=null;const e=t.$fastController;this.style=document.createElement("style"),e.addStyles(this.style),m.getNotifier(e).subscribe(this,"isConnected"),this.handleChange(e,"isConnected")}setProperty(t,e){this.store.set(t,e),c.queueUpdate((()=>{null!==this.target&&this.target.setProperty(t,e)}))}removeProperty(t){this.store.delete(t),c.queueUpdate((()=>{null!==this.target&&this.target.removeProperty(t)}))}handleChange(t,e){const{sheet:i}=this.style;if(i){const t=i.insertRule(":host{}",i.cssRules.length);this.target=i.cssRules[t].style}else this.target=null}}se([f],no.prototype,"target",void 0);class ro{constructor(t){this.target=t.style}setProperty(t,e){c.queueUpdate((()=>this.target.setProperty(t,e)))}removeProperty(t){c.queueUpdate((()=>this.target.removeProperty(t)))}}class ao{static{this.roots=new Set}static{this.properties={}}setProperty(t,e){ao.properties[t]=e;for(const i of ao.roots.values())co.getOrCreate(ao.normalizeRoot(i)).setProperty(t,e)}removeProperty(t){delete ao.properties[t];for(const e of ao.roots.values())co.getOrCreate(ao.normalizeRoot(e)).removeProperty(t)}static registerRoot(t){const{roots:e}=ao;if(!e.has(t)){e.add(t);const i=co.getOrCreate(this.normalizeRoot(t));for(const t in ao.properties)i.setProperty(t,ao.properties[t])}}static unregisterRoot(t){const{roots:e}=ao;if(e.has(t)){e.delete(t);const i=co.getOrCreate(ao.normalizeRoot(t));for(const t in ao.properties)i.removeProperty(t)}}static normalizeRoot(t){return t===eo?document:t}}const lo=new WeakMap,ho=c.supportsAdoptedStyleSheets?class extends io{constructor(t){super();const e=new CSSStyleSheet;e[G]=!0,this.target=e.cssRules[e.insertRule(":host{}")].style,t.$fastController.addStyles(K.create([e]))}}:no,co=Object.freeze({getOrCreate(t){if(lo.has(t))return lo.get(t);let e;return t===eo?e=new ao:t instanceof Document?e=c.supportsAdoptedStyleSheets?new so:new oo:e=t instanceof gt?new ho(t):new ro(t),lo.set(t,e),e}});class uo extends yt{get appliedTo(){return[...this._appliedTo]}static from(t){return new uo({name:"string"==typeof t?t:t.name,cssCustomPropertyName:"string"==typeof t?t:void 0===t.cssCustomPropertyName?t.name:t.cssCustomPropertyName})}static isCSSDesignToken(t){return"string"==typeof t.cssCustomProperty}static isDerivedDesignTokenValue(t){return"function"==typeof t}static{this.uniqueId=(()=>{let t=0;return()=>(t++,t.toString(16))})()}static getTokenById(t){return uo.tokensById.get(t)}static{this.tokensById=new Map}getOrCreateSubscriberSet(t=this){return this.subscribers.get(t)||this.subscribers.set(t,new Set)&&this.subscribers.get(t)}constructor(t){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=t.name,null!==t.cssCustomPropertyName&&(this.cssCustomProperty=`--${t.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=uo.uniqueId(),uo.tokensById.set(this.id,this)}createCSS(){return this.cssVar||""}getValueFor(t){const e=bo.getOrCreate(t).get(this);if(void 0!==e)return e;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${t} or an ancestor of ${t}.`)}setValueFor(t,e){return this._appliedTo.add(t),e instanceof uo&&(e=this.alias(e)),bo.getOrCreate(t).set(this,e),this}deleteValueFor(t){return this._appliedTo.delete(t),bo.existsFor(t)&&bo.getOrCreate(t).delete(this),this}withDefault(t){return this.setValueFor(eo,t),this}subscribe(t,e){const i=this.getOrCreateSubscriberSet(e);e&&!bo.existsFor(e)&&bo.getOrCreate(e),i.has(t)||i.add(t)}unsubscribe(t,e){const i=this.subscribers.get(e||this);i&&i.has(t)&&i.delete(t)}notify(t){const e=Object.freeze({token:this,target:t});this.subscribers.has(this)&&this.subscribers.get(this).forEach((t=>t.handleChange(e))),this.subscribers.has(t)&&this.subscribers.get(t).forEach((t=>t.handleChange(e)))}alias(t){return e=>t.getValueFor(e)}}class po{startReflection(t,e){t.subscribe(this,e),this.handleChange({token:t,target:e})}stopReflection(t,e){t.unsubscribe(this,e),this.remove(t,e)}handleChange(t){const{token:e,target:i}=t;this.add(e,i)}add(t,e){co.getOrCreate(e).setProperty(t.cssCustomProperty,this.resolveCSSValue(bo.getOrCreate(e).get(t)))}remove(t,e){co.getOrCreate(e).removeProperty(t.cssCustomProperty)}resolveCSSValue(t){return t&&"function"==typeof t.createCSS?t.createCSS():t}}class mo{constructor(t,e,i){this.source=t,this.token=e,this.node=i,this.dependencies=new Set,this.observer=m.binding(t,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){try{this.node.store.set(this.token,this.observer.observe(this.node.target,y))}catch(t){console.error(t)}}}class fo{constructor(){this.values=new Map}set(t,e){this.values.get(t)!==e&&(this.values.set(t,e),m.getNotifier(this).notify(t.id))}get(t){return m.track(this,t.id),this.values.get(t)}delete(t){this.values.delete(t),m.getNotifier(this).notify(t.id)}all(){return this.values.entries()}}const vo=new WeakMap,go=new WeakMap;class bo{static getOrCreate(t){return vo.get(t)||new bo(t)}static existsFor(t){return vo.has(t)}static findParent(t){if(eo!==t.target){let e=Js(t.target);for(;null!==e;){if(vo.has(e))return vo.get(e);e=Js(e)}return bo.getOrCreate(eo)}return null}static findClosestAssignedNode(t,e){let i=e;do{if(i.has(t))return i;i=i.parent?i.parent:i.target!==eo?bo.getOrCreate(eo):null}while(null!==i);return null}static{this.cssCustomPropertyReflector=new po}get parent(){return go.get(this)||null}updateCSSTokenReflection(t,e){if(uo.isCSSDesignToken(e)){const i=this.parent,s=this.isReflecting(e);if(i){const o=i.get(e),n=t.get(e);o===n||s?o===n&&s&&this.stopReflectToCSS(e):this.reflectToCSS(e)}else s||this.reflectToCSS(e)}}constructor(t){this.target=t,this.store=new fo,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(t,e)=>{const i=uo.getTokenById(e);i&&(i.notify(this.target),this.updateCSSTokenReflection(t,i))}},vo.set(t,this),m.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),t instanceof gt?t.$fastController.addBehaviors([this]):t.isConnected&&this.bind()}has(t){return this.assignedValues.has(t)}get(t){const e=this.store.get(t);if(void 0!==e)return e;const i=this.getRaw(t);return void 0!==i?(this.hydrate(t,i),this.get(t)):void 0}getRaw(t){return this.assignedValues.has(t)?this.assignedValues.get(t):bo.findClosestAssignedNode(t,this)?.getRaw(t)}set(t,e){uo.isDerivedDesignTokenValue(this.assignedValues.get(t))&&this.tearDownBindingObserver(t),this.assignedValues.set(t,e),uo.isDerivedDesignTokenValue(e)?this.setupBindingObserver(t,e):this.store.set(t,e)}delete(t){this.assignedValues.delete(t),this.tearDownBindingObserver(t);const e=this.getRaw(t);e?this.hydrate(t,e):this.store.delete(t)}bind(){const t=bo.findParent(this);t&&t.appendChild(this);for(const t of this.assignedValues.keys())t.notify(this.target)}unbind(){if(this.parent){go.get(this).removeChild(this)}for(const t of this.bindingObservers.keys())this.tearDownBindingObserver(t)}appendChild(t){t.parent&&go.get(t).removeChild(t);const e=this.children.filter((e=>t.contains(e)));go.set(t,this),this.children.push(t),e.forEach((e=>t.appendChild(e))),m.getNotifier(this.store).subscribe(t);for(const[e,i]of this.store.all())t.hydrate(e,this.bindingObservers.has(e)?this.getRaw(e):i),t.updateCSSTokenReflection(t.store,e)}removeChild(t){const e=this.children.indexOf(t);if(-1!==e&&this.children.splice(e,1),m.getNotifier(this.store).unsubscribe(t),t.parent!==this)return!1;const i=go.delete(t);for(const[e]of this.store.all())t.hydrate(e,t.getRaw(e)),t.updateCSSTokenReflection(t.store,e);return i}contains(t){return to(this.target,t.target)}reflectToCSS(t){this.isReflecting(t)||(this.reflecting.add(t),bo.cssCustomPropertyReflector.startReflection(t,this.target))}stopReflectToCSS(t){this.isReflecting(t)&&(this.reflecting.delete(t),bo.cssCustomPropertyReflector.stopReflection(t,this.target))}isReflecting(t){return this.reflecting.has(t)}handleChange(t,e){const i=uo.getTokenById(e);i&&(this.hydrate(i,this.getRaw(i)),this.updateCSSTokenReflection(this.store,i))}hydrate(t,e){if(!this.has(t)){const i=this.bindingObservers.get(t);uo.isDerivedDesignTokenValue(e)?i?i.source!==e&&(this.tearDownBindingObserver(t),this.setupBindingObserver(t,e)):this.setupBindingObserver(t,e):(i&&this.tearDownBindingObserver(t),this.store.set(t,e))}}setupBindingObserver(t,e){const i=new mo(e,t,this);return this.bindingObservers.set(t,i),i}tearDownBindingObserver(t){return!!this.bindingObservers.has(t)&&(this.bindingObservers.get(t).disconnect(),this.bindingObservers.delete(t),!0)}}se([f],bo.prototype,"children",void 0);const yo=Object.freeze({create:function(t){return uo.from(t)},notifyConnection:t=>!(!t.isConnected||!bo.existsFor(t))&&(bo.getOrCreate(t).bind(),!0),notifyDisconnection:t=>!(t.isConnected||!bo.existsFor(t))&&(bo.getOrCreate(t).unbind(),!0),registerRoot(t=eo){ao.registerRoot(t)},unregisterRoot(t=eo){ao.unregisterRoot(t)}}),Co=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),xo=new Map,wo=new Map;let $o=null;const Io=ue.createInterface((t=>t.cachedCallback((t=>(null===$o&&($o=new Eo(null,t)),$o))))),ko=Object.freeze({tagFor:t=>wo.get(t),responsibleFor(t){const e=t.$$designSystem$$;if(e)return e;return ue.findResponsibleContainer(t).get(Io)},getOrCreate(t){if(!t)return null===$o&&($o=ue.getOrCreateDOMContainer().get(Io)),$o;const e=t.$$designSystem$$;if(e)return e;const i=ue.getOrCreateDOMContainer(t);if(i.has(Io,!1))return i.get(Io);{const e=new Eo(t,i);return i.register(qe.instance(Io,e)),e}}});class Eo{constructor(t,e){this.owner=t,this.container=e,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>Co.definitionCallbackOnly,null!==t&&(t.$$designSystem$$=this)}withPrefix(t){return this.prefix=t,this}withShadowRootMode(t){return this.shadowRootMode=t,this}withElementDisambiguation(t){return this.disambiguate=t,this}withDesignTokenRoot(t){return this.designTokenRoot=t,this}register(...t){const e=this.container,i=[],s=this.disambiguate,o=this.shadowRootMode,n={elementPrefix:this.prefix,tryDefineElement(t,n,r){const a=function(t,e,i){return"string"==typeof t?{name:t,type:e,callback:i}:t}(t,n,r),{name:l,callback:h,baseClass:d}=a;let{type:c}=a,u=l,p=xo.get(u),m=!0;for(;p;){const t=s(u,c,p);switch(t){case Co.ignoreDuplicate:return;case Co.definitionCallbackOnly:m=!1,p=void 0;break;default:u=t,p=xo.get(u)}}m&&((wo.has(c)||c===ti)&&(c=class extends c{}),xo.set(u,c),wo.set(c,u),d&&wo.set(d,u)),i.push(new To(e,u,c,o,h,m))}};this.designTokensInitialized||(this.designTokensInitialized=!0,null!==this.designTokenRoot&&yo.registerRoot(this.designTokenRoot)),e.registerWithContext(n,...t);for(const t of i)t.callback(t),t.willDefine&&null!==t.definition&&t.definition.define();return this}}class To{constructor(t,e,i,s,o,n){this.container=t,this.name=e,this.type=i,this.shadowRootMode=s,this.callback=o,this.willDefine=n,this.definition=null}definePresentation(t){Ze.define(this.name,t,this.container)}defineElement(t){this.definition=new ct(this.type,{...t,name:this.name})}tagFor(t){return ko.tagFor(t)}}const Oo=(t,e)=>W`
468
468
  <div class="positioning-region" part="positioning-region">
469
- ${zt((t=>t.modal),K`
469
+ ${Ht((t=>t.modal),W`
470
470
  <div
471
471
  class="overlay"
472
472
  part="overlay"
@@ -483,7 +483,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
483
483
  aria-describedby="${t=>t.ariaDescribedby}"
484
484
  aria-labelledby="${t=>t.ariaLabelledby}"
485
485
  aria-label="${t=>t.ariaLabel}"
486
- ${Pt("dialog")}
486
+ ${Lt("dialog")}
487
487
  >
488
488
  <slot></slot>
489
489
  </div>
@@ -492,8 +492,8 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
492
492
  /*!
493
493
  * tabbable 6.2.0
494
494
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
495
- */var Ro=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ao=Ro.join(","),Do="undefined"==typeof Element,Fo=Do?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Lo=!Do&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},Po=function t(e,i){var s;void 0===i&&(i=!0);var o=null==e||null===(s=e.getAttribute)||void 0===s?void 0:s.call(e,"inert");return""===o||"true"===o||i&&e&&t(e.parentNode)},Mo=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,i=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===i||"true"===i}(t))&&!function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))}(t)?0:t.tabIndex},Vo=function(t){return"INPUT"===t.tagName},Ho=function(t){return function(t){return Vo(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,i=t.form||Lo(t),s=function(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=s(window.CSS.escape(t.name));else try{e=s(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var o=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]}(e,t.form);return!o||o===t}(t)},zo=function(t){var e=t.getBoundingClientRect(),i=e.width,s=e.height;return 0===i&&0===s},No=function(t,e){var i=e.displayCheck,s=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var o=Fo.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Fo.call(o,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return zo(t)}else{if("function"==typeof s){for(var n=t;t;){var r=t.parentElement,a=Lo(t);if(r&&!r.shadowRoot&&!0===s(r))return zo(t);t=t.assignedSlot?t.assignedSlot:r||a===t.ownerDocument?r:a.host}t=n}if(function(t){var e,i,s,o,n=t&&Lo(t),r=null===(e=n)||void 0===e?void 0:e.host,a=!1;if(n&&n!==t)for(a=!!(null!==(i=r)&&void 0!==i&&null!==(s=i.ownerDocument)&&void 0!==s&&s.contains(r)||null!=t&&null!==(o=t.ownerDocument)&&void 0!==o&&o.contains(t));!a&&r;){var l,h,d;a=!(null===(h=r=null===(l=n=Lo(r))||void 0===l?void 0:l.host)||void 0===h||null===(d=h.ownerDocument)||void 0===d||!d.contains(r))}return a}(t))return!t.getClientRects().length;if("legacy-full"!==i)return!0}return!1},Bo=function(t,e){return!(e.disabled||Po(e)||function(t){return Vo(t)&&"hidden"===t.type}(e)||No(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var s=e.children.item(i);if("LEGEND"===s.tagName)return!!Fo.call(e,"fieldset[disabled] *")||!s.contains(t)}return!0}e=e.parentElement}return!1}(e))},qo=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Fo.call(t,Ao)&&function(t,e){return!(Ho(e)||Mo(e)<0||!Bo(t,e))}(e,t)},Uo=Ro.concat("iframe").join(","),_o=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Fo.call(t,Uo)&&Bo(e,t)};class jo extends ei{constructor(){super(...arguments),this.modal=!0,this.hidden=!1,this.trapFocus=!0,this.trapFocusChanged=()=>{this.$fastController.isConnected&&this.updateTrapFocus()},this.isTrappingFocus=!1,this.handleDocumentKeydown=t=>{if(!t.defaultPrevented&&!this.hidden)switch(t.key){case $i:this.dismiss(),t.preventDefault();break;case Ti:this.handleTabKeyDown(t)}},this.handleDocumentFocus=t=>{!t.defaultPrevented&&this.shouldForceFocus(t.target)&&(this.focusFirstElement(),t.preventDefault())},this.handleTabKeyDown=t=>{if(!this.trapFocus||this.hidden)return;const e=this.getTabQueueBounds();return 0!==e.length?1===e.length?(e[0].focus(),void t.preventDefault()):void(t.shiftKey&&t.target===e[0]?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(e[0].focus(),t.preventDefault())):void 0},this.getTabQueueBounds=()=>jo.reduceTabbableItems([],this),this.focusFirstElement=()=>{const t=this.getTabQueueBounds();t.length>0?t[0].focus():this.dialog instanceof HTMLElement&&this.dialog.focus()},this.shouldForceFocus=t=>this.isTrappingFocus&&!this.contains(t),this.shouldTrapFocus=()=>this.trapFocus&&!this.hidden,this.updateTrapFocus=t=>{const e=void 0===t?this.shouldTrapFocus():t;e&&!this.isTrappingFocus?(this.isTrappingFocus=!0,document.addEventListener("focusin",this.handleDocumentFocus),c.queueUpdate((()=>{this.shouldForceFocus(document.activeElement)&&this.focusFirstElement()}))):!e&&this.isTrappingFocus&&(this.isTrappingFocus=!1,document.removeEventListener("focusin",this.handleDocumentFocus))}}dismiss(){this.$emit("dismiss"),this.$emit("cancel")}show(){this.hidden=!1}hide(){this.hidden=!0,this.$emit("close")}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleDocumentKeydown),this.notifier=m.getNotifier(this),this.notifier.subscribe(this,"hidden"),this.updateTrapFocus()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeydown),this.updateTrapFocus(!1),this.notifier.unsubscribe(this,"hidden")}handleChange(t,e){if("hidden"===e)this.updateTrapFocus()}static reduceTabbableItems(t,e){return"-1"===e.getAttribute("tabindex")?t:qo(e)||jo.isFocusableFastElement(e)&&jo.hasTabbableShadow(e)?(t.push(e),t):e.childElementCount?t.concat(Array.from(e.children).reduce(jo.reduceTabbableItems,[])):t}static isFocusableFastElement(t){return!!t.$fastController?.definition.shadowOptions?.delegatesFocus}static hasTabbableShadow(t){return Array.from(t.shadowRoot?.querySelectorAll("*")??[]).some((t=>qo(t)))}}oe([lt({mode:"boolean"})],jo.prototype,"modal",void 0),oe([lt({mode:"boolean"})],jo.prototype,"hidden",void 0),oe([lt({attribute:"trap-focus",mode:"boolean"})],jo.prototype,"trapFocus",void 0),oe([lt({attribute:"aria-describedby"})],jo.prototype,"ariaDescribedby",void 0),oe([lt({attribute:"aria-labelledby"})],jo.prototype,"ariaLabelledby",void 0),oe([lt({attribute:"aria-label"})],jo.prototype,"ariaLabel",void 0);const Wo=new MutationObserver((t=>{for(const e of t)Ko.getOrCreateFor(e.target).notify(e.attributeName)}));class Ko extends u{static{this.subscriberCache=new WeakMap}subscribe(t){super.subscribe(t),this.watchedAttributes.has(t.attributes)||(this.watchedAttributes.add(t.attributes),this.observe())}constructor(t){super(t),this.watchedAttributes=new Set,Ko.subscriberCache.set(t,this)}unsubscribe(t){super.unsubscribe(t),this.watchedAttributes.has(t.attributes)&&(this.watchedAttributes.delete(t.attributes),this.observe())}static getOrCreateFor(t){return this.subscriberCache.get(t)||new Ko(t)}observe(){const t=[];for(const e of this.watchedAttributes.values())for(let i=0;i<e.length;i++)t.push(e[i]);Wo.observe(this.source,{attributeFilter:t})}}class Yo{constructor(t,e){this.target=t,this.attributes=Object.freeze(e)}bind(t){if(Ko.getOrCreateFor(t).subscribe(this),t.hasAttributes())for(let e=0;e<t.attributes.length;e++)this.handleChange(t,t.attributes[e].name)}unbind(t){Ko.getOrCreateFor(t).unsubscribe(this)}handleChange(t,e){this.attributes.includes(e)&&c.setAttribute(this.target,e,t.getAttribute(e))}}function Xo(...t){return new w("fast-reflect-attr",Yo,t)}const Go=(t,e)=>K`
496
- <details class="disclosure" ${Pt("details")}>
495
+ */var So=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ro=So.join(","),Do="undefined"==typeof Element,Ao=Do?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fo=!Do&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},Lo=function t(e,i){var s;void 0===i&&(i=!0);var o=null==e||null===(s=e.getAttribute)||void 0===s?void 0:s.call(e,"inert");return""===o||"true"===o||i&&e&&t(e.parentNode)},Po=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,i=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===i||"true"===i}(t))&&!function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))}(t)?0:t.tabIndex},Mo=function(t){return"INPUT"===t.tagName},Vo=function(t){return function(t){return Mo(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,i=t.form||Fo(t),s=function(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=s(window.CSS.escape(t.name));else try{e=s(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var o=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]}(e,t.form);return!o||o===t}(t)},Ho=function(t){var e=t.getBoundingClientRect(),i=e.width,s=e.height;return 0===i&&0===s},zo=function(t,e){var i=e.displayCheck,s=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var o=Ao.call(t,"details>summary:first-of-type")?t.parentElement:t;if(Ao.call(o,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return Ho(t)}else{if("function"==typeof s){for(var n=t;t;){var r=t.parentElement,a=Fo(t);if(r&&!r.shadowRoot&&!0===s(r))return Ho(t);t=t.assignedSlot?t.assignedSlot:r||a===t.ownerDocument?r:a.host}t=n}if(function(t){var e,i,s,o,n=t&&Fo(t),r=null===(e=n)||void 0===e?void 0:e.host,a=!1;if(n&&n!==t)for(a=!!(null!==(i=r)&&void 0!==i&&null!==(s=i.ownerDocument)&&void 0!==s&&s.contains(r)||null!=t&&null!==(o=t.ownerDocument)&&void 0!==o&&o.contains(t));!a&&r;){var l,h,d;a=!(null===(h=r=null===(l=n=Fo(r))||void 0===l?void 0:l.host)||void 0===h||null===(d=h.ownerDocument)||void 0===d||!d.contains(r))}return a}(t))return!t.getClientRects().length;if("legacy-full"!==i)return!0}return!1},No=function(t,e){return!(e.disabled||Lo(e)||function(t){return Mo(t)&&"hidden"===t.type}(e)||zo(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var s=e.children.item(i);if("LEGEND"===s.tagName)return!!Ao.call(e,"fieldset[disabled] *")||!s.contains(t)}return!0}e=e.parentElement}return!1}(e))},Bo=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Ao.call(t,Ro)&&function(t,e){return!(Vo(e)||Po(e)<0||!No(t,e))}(e,t)},qo=So.concat("iframe").join(","),Uo=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==Ao.call(t,qo)&&No(e,t)};class _o extends ti{constructor(){super(...arguments),this.modal=!0,this.hidden=!1,this.trapFocus=!0,this.trapFocusChanged=()=>{this.$fastController.isConnected&&this.updateTrapFocus()},this.isTrappingFocus=!1,this.handleDocumentKeydown=t=>{if(!t.defaultPrevented&&!this.hidden)switch(t.key){case wi:this.dismiss(),t.preventDefault();break;case Ei:this.handleTabKeyDown(t)}},this.handleDocumentFocus=t=>{!t.defaultPrevented&&this.shouldForceFocus(t.target)&&(this.focusFirstElement(),t.preventDefault())},this.handleTabKeyDown=t=>{if(!this.trapFocus||this.hidden)return;const e=this.getTabQueueBounds();return 0!==e.length?1===e.length?(e[0].focus(),void t.preventDefault()):void(t.shiftKey&&t.target===e[0]?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(e[0].focus(),t.preventDefault())):void 0},this.getTabQueueBounds=()=>_o.reduceTabbableItems([],this),this.focusFirstElement=()=>{const t=this.getTabQueueBounds();t.length>0?t[0].focus():this.dialog instanceof HTMLElement&&this.dialog.focus()},this.shouldForceFocus=t=>this.isTrappingFocus&&!this.contains(t),this.shouldTrapFocus=()=>this.trapFocus&&!this.hidden,this.updateTrapFocus=t=>{const e=void 0===t?this.shouldTrapFocus():t;e&&!this.isTrappingFocus?(this.isTrappingFocus=!0,document.addEventListener("focusin",this.handleDocumentFocus),c.queueUpdate((()=>{this.shouldForceFocus(document.activeElement)&&this.focusFirstElement()}))):!e&&this.isTrappingFocus&&(this.isTrappingFocus=!1,document.removeEventListener("focusin",this.handleDocumentFocus))}}dismiss(){this.$emit("dismiss"),this.$emit("cancel")}show(){this.hidden=!1}hide(){this.hidden=!0,this.$emit("close")}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleDocumentKeydown),this.notifier=m.getNotifier(this),this.notifier.subscribe(this,"hidden"),this.updateTrapFocus()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeydown),this.updateTrapFocus(!1),this.notifier.unsubscribe(this,"hidden")}handleChange(t,e){if("hidden"===e)this.updateTrapFocus()}static reduceTabbableItems(t,e){return"-1"===e.getAttribute("tabindex")?t:Bo(e)||_o.isFocusableFastElement(e)&&_o.hasTabbableShadow(e)?(t.push(e),t):e.childElementCount?t.concat(Array.from(e.children).reduce(_o.reduceTabbableItems,[])):t}static isFocusableFastElement(t){return!!t.$fastController?.definition.shadowOptions?.delegatesFocus}static hasTabbableShadow(t){return Array.from(t.shadowRoot?.querySelectorAll("*")??[]).some((t=>Bo(t)))}}se([at({mode:"boolean"})],_o.prototype,"modal",void 0),se([at({mode:"boolean"})],_o.prototype,"hidden",void 0),se([at({attribute:"trap-focus",mode:"boolean"})],_o.prototype,"trapFocus",void 0),se([at({attribute:"aria-describedby"})],_o.prototype,"ariaDescribedby",void 0),se([at({attribute:"aria-labelledby"})],_o.prototype,"ariaLabelledby",void 0),se([at({attribute:"aria-label"})],_o.prototype,"ariaLabel",void 0);const jo=new MutationObserver((t=>{for(const e of t)Wo.getOrCreateFor(e.target).notify(e.attributeName)}));class Wo extends u{static{this.subscriberCache=new WeakMap}subscribe(t){super.subscribe(t),this.watchedAttributes.has(t.attributes)||(this.watchedAttributes.add(t.attributes),this.observe())}constructor(t){super(t),this.watchedAttributes=new Set,Wo.subscriberCache.set(t,this)}unsubscribe(t){super.unsubscribe(t),this.watchedAttributes.has(t.attributes)&&(this.watchedAttributes.delete(t.attributes),this.observe())}static getOrCreateFor(t){return this.subscriberCache.get(t)||new Wo(t)}observe(){const t=[];for(const e of this.watchedAttributes.values())for(let i=0;i<e.length;i++)t.push(e[i]);jo.observe(this.source,{attributeFilter:t})}}class Ko{constructor(t,e){this.target=t,this.attributes=Object.freeze(e)}bind(t){if(Wo.getOrCreateFor(t).subscribe(this),t.hasAttributes())for(let e=0;e<t.attributes.length;e++)this.handleChange(t,t.attributes[e].name)}unbind(t){Wo.getOrCreateFor(t).unsubscribe(this)}handleChange(t,e){this.attributes.includes(e)&&c.setAttribute(this.target,e,t.getAttribute(e))}}function Yo(...t){return new w("fast-reflect-attr",Ko,t)}const Xo=(t,e)=>W`
496
+ <details class="disclosure" ${Lt("details")}>
497
497
  <summary
498
498
  class="invoker"
499
499
  role="button"
@@ -506,9 +506,9 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
506
506
  </summary>
507
507
  <div id="disclosure-content"><slot></slot></div>
508
508
  </details>
509
- `;class Qo extends ei{connectedCallback(){super.connectedCallback(),this.setup()}disconnectedCallback(){super.disconnectedCallback(),this.details.removeEventListener("toggle",this.onToggle)}show(){this.details.open=!0}hide(){this.details.open=!1}toggle(){this.details.open=!this.details.open}setup(){this.onToggle=this.onToggle.bind(this),this.details.addEventListener("toggle",this.onToggle),this.expanded&&this.show()}onToggle(){this.expanded=this.details.open,this.$emit("toggle")}}oe([lt({mode:"boolean"})],Qo.prototype,"expanded",void 0),oe([lt],Qo.prototype,"title",void 0);const Zo=(t,e)=>K`
509
+ `;class Go extends ti{connectedCallback(){super.connectedCallback(),this.setup()}disconnectedCallback(){super.disconnectedCallback(),this.details.removeEventListener("toggle",this.onToggle)}show(){this.details.open=!0}hide(){this.details.open=!1}toggle(){this.details.open=!this.details.open}setup(){this.onToggle=this.onToggle.bind(this),this.details.addEventListener("toggle",this.onToggle),this.expanded&&this.show()}onToggle(){this.expanded=this.details.open,this.$emit("toggle")}}se([at({mode:"boolean"})],Go.prototype,"expanded",void 0),se([at],Go.prototype,"title",void 0);const Qo=(t,e)=>W`
510
510
  <template role="${t=>t.role}" aria-orientation="${t=>t.orientation}"></template>
511
- `,Jo={separator:"separator",presentation:"presentation"};class tn extends ei{constructor(){super(...arguments),this.role=Jo.separator,this.orientation=ai}}oe([lt],tn.prototype,"role",void 0),oe([lt],tn.prototype,"orientation",void 0);const en={next:"next",previous:"previous"},sn=(t,e)=>K`
511
+ `,Zo={separator:"separator",presentation:"presentation"};class Jo extends ti{constructor(){super(...arguments),this.role=Zo.separator,this.orientation=ri}}se([at],Jo.prototype,"role",void 0),se([at],Jo.prototype,"orientation",void 0);const tn={next:"next",previous:"previous"},en=(t,e)=>W`
512
512
  <template
513
513
  role="button"
514
514
  aria-disabled="${t=>!!t.disabled||void 0}"
@@ -516,14 +516,14 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
516
516
  class="${t=>t.direction} ${t=>t.disabled?"disabled":""}"
517
517
  @keyup="${(t,e)=>t.keyupHandler(e.event)}"
518
518
  >
519
- ${zt((t=>t.direction===en.next),K`
519
+ ${Ht((t=>t.direction===tn.next),W`
520
520
  <span part="next" class="next">
521
521
  <slot name="next">
522
522
  ${e.next||""}
523
523
  </slot>
524
524
  </span>
525
525
  `)}
526
- ${zt((t=>t.direction===en.previous),K`
526
+ ${Ht((t=>t.direction===tn.previous),W`
527
527
  <span part="previous" class="previous">
528
528
  <slot name="previous">
529
529
  ${e.previous||""}
@@ -531,7 +531,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
531
531
  </span>
532
532
  `)}
533
533
  </template>
534
- `;class on extends ei{constructor(){super(...arguments),this.hiddenFromAT=!0,this.direction=en.next}keyupHandler(t){if(!this.hiddenFromAT){const e=t.key;"Enter"!==e&&"Space"!==e||this.$emit("click",t),"Escape"===e&&this.blur()}}}oe([lt({mode:"boolean"})],on.prototype,"disabled",void 0),oe([lt({attribute:"aria-hidden",converter:nt})],on.prototype,"hiddenFromAT",void 0),oe([lt],on.prototype,"direction",void 0);const nn=(t,e)=>K`
534
+ `;class sn extends ti{constructor(){super(...arguments),this.hiddenFromAT=!0,this.direction=tn.next}keyupHandler(t){if(!this.hiddenFromAT){const e=t.key;"Enter"!==e&&"Space"!==e||this.$emit("click",t),"Escape"===e&&this.blur()}}}se([at({mode:"boolean"})],sn.prototype,"disabled",void 0),se([at({attribute:"aria-hidden",converter:ot})],sn.prototype,"hiddenFromAT",void 0),se([at],sn.prototype,"direction",void 0);const on=(t,e)=>W`
535
535
  <template
536
536
  aria-checked="${t=>t.ariaChecked}"
537
537
  aria-disabled="${t=>t.ariaDisabled}"
@@ -541,13 +541,13 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
541
541
  class="${t=>[t.checked&&"checked",t.selected&&"selected",t.disabled&&"disabled"].filter(Boolean).join(" ")}"
542
542
  role="option"
543
543
  >
544
- ${te(0,e)}
544
+ ${Jt(0,e)}
545
545
  <span class="content" part="content">
546
- <slot ${Xt("content")}></slot>
546
+ <slot ${Yt("content")}></slot>
547
547
  </span>
548
- ${Jt(0,e)}
548
+ ${Zt(0,e)}
549
549
  </template>
550
- `;class rn extends js{constructor(){super(...arguments),this.activeIndex=-1,this.rangeStartIndex=-1}get activeOption(){return this.options[this.activeIndex]}get checkedOptions(){return this.options?.filter((t=>t.checked))}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(t,e){this.ariaActiveDescendant=this.options[e]?.id??"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;const t=this.activeOption;t&&(t.checked=!0)}checkFirstOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach(((t,e)=>{t.checked=Ai(e,this.rangeStartIndex)}))):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach(((t,e)=>{t.checked=Ai(e,this.rangeStartIndex,this.options.length)}))):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach(((t,e)=>{t.checked=Ai(e,this.rangeStartIndex,this.activeIndex+1)}))):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex<this.options.length-1?1:0,this.checkActiveIndex()}checkPreviousOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),1===this.checkedOptions.length&&(this.rangeStartIndex+=1),this.options.forEach(((t,e)=>{t.checked=Ai(e,this.activeIndex,this.rangeStartIndex)}))):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(t){if(!this.multiple)return super.clickHandler(t);const e=t.target?.closest("[role=option]");return e&&!e.disabled?(this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(e),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0):void 0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}focusinHandler(t){if(!this.multiple)return super.focusinHandler(t);this.shouldSkipFocus||t.target!==t.currentTarget||(this.uncheckAllOptions(),-1===this.activeIndex&&(this.activeIndex=-1!==this.firstSelectedOptionIndex?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(t){this.multiple&&this.uncheckAllOptions()}keydownHandler(t){if(!this.multiple)return super.keydownHandler(t);if(this.disabled)return!0;const{key:e,shiftKey:i}=t;switch(this.shouldSkipFocus=!1,e){case Ii:return void this.checkFirstOption(i);case bi:return void this.checkNextOption(i);case xi:return void this.checkPreviousOption(i);case ki:return void this.checkLastOption(i);case Ti:return this.focusAndScrollOptionIntoView(),!0;case $i:return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case Ei:if(t.preventDefault(),this.typeAheadExpired)return void this.toggleSelectedForAllCheckedOptions();default:return 1===e.length&&this.handleTypeAhead(`${e}`),!0}}mousedownHandler(t){if(t.offsetX>=0&&t.offsetX<=this.scrollWidth)return super.mousedownHandler(t)}multipleChanged(t,e){this.ariaMultiSelectable=e?"true":null,this.options?.forEach((t=>{t.checked=!e&&void 0})),this.setSelectedOptions()}setSelectedOptions(){this.multiple?this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter((t=>t.selected)),this.focusAndScrollOptionIntoView()):super.setSelectedOptions()}sizeChanged(t,e){const i=Math.max(0,parseInt(e?.toFixed()??"",10));i!==e&&c.queueUpdate((()=>{this.size=i}))}toggleSelectedForAllCheckedOptions(){const t=this.checkedOptions.filter((t=>!t.disabled)),e=!t.every((t=>t.selected));t.forEach((t=>t.selected=e)),this.selectedIndex=this.options.indexOf(t[t.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(t,e){if(this.multiple){if(this.$fastController.isConnected){const t=this.getTypeaheadMatches(),e=this.options.indexOf(t[0]);e>-1&&(this.activeIndex=e,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}else super.typeaheadBufferChanged(t,e)}uncheckAllOptions(t=!1){this.options.forEach((t=>t.checked=!this.multiple&&void 0)),t||(this.rangeStartIndex=-1)}}oe([f],rn.prototype,"activeIndex",void 0),oe([lt({mode:"boolean"})],rn.prototype,"multiple",void 0),oe([lt({converter:rt})],rn.prototype,"size",void 0);const an=(t,e)=>K`
550
+ `;class nn extends _s{constructor(){super(...arguments),this.activeIndex=-1,this.rangeStartIndex=-1}get activeOption(){return this.options[this.activeIndex]}get checkedOptions(){return this.options?.filter((t=>t.checked))}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(t,e){this.ariaActiveDescendant=this.options[e]?.id??"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;const t=this.activeOption;t&&(t.checked=!0)}checkFirstOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach(((t,e)=>{t.checked=Ri(e,this.rangeStartIndex)}))):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach(((t,e)=>{t.checked=Ri(e,this.rangeStartIndex,this.options.length)}))):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach(((t,e)=>{t.checked=Ri(e,this.rangeStartIndex,this.activeIndex+1)}))):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex<this.options.length-1?1:0,this.checkActiveIndex()}checkPreviousOption(t=!1){t?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),1===this.checkedOptions.length&&(this.rangeStartIndex+=1),this.options.forEach(((t,e)=>{t.checked=Ri(e,this.activeIndex,this.rangeStartIndex)}))):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(t){if(!this.multiple)return super.clickHandler(t);const e=t.target?.closest("[role=option]");return e&&!e.disabled?(this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(e),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0):void 0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}focusinHandler(t){if(!this.multiple)return super.focusinHandler(t);this.shouldSkipFocus||t.target!==t.currentTarget||(this.uncheckAllOptions(),-1===this.activeIndex&&(this.activeIndex=-1!==this.firstSelectedOptionIndex?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(t){this.multiple&&this.uncheckAllOptions()}keydownHandler(t){if(!this.multiple)return super.keydownHandler(t);if(this.disabled)return!0;const{key:e,shiftKey:i}=t;switch(this.shouldSkipFocus=!1,e){case $i:return void this.checkFirstOption(i);case gi:return void this.checkNextOption(i);case Ci:return void this.checkPreviousOption(i);case Ii:return void this.checkLastOption(i);case Ei:return this.focusAndScrollOptionIntoView(),!0;case wi:return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case ki:if(t.preventDefault(),this.typeAheadExpired)return void this.toggleSelectedForAllCheckedOptions();default:return 1===e.length&&this.handleTypeAhead(`${e}`),!0}}mousedownHandler(t){if(t.offsetX>=0&&t.offsetX<=this.scrollWidth)return super.mousedownHandler(t)}multipleChanged(t,e){this.ariaMultiSelectable=e?"true":null,this.options?.forEach((t=>{t.checked=!e&&void 0})),this.setSelectedOptions()}setSelectedOptions(){this.multiple?this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter((t=>t.selected)),this.focusAndScrollOptionIntoView()):super.setSelectedOptions()}sizeChanged(t,e){const i=Math.max(0,parseInt(e?.toFixed()??"",10));i!==e&&c.queueUpdate((()=>{this.size=i}))}toggleSelectedForAllCheckedOptions(){const t=this.checkedOptions.filter((t=>!t.disabled)),e=!t.every((t=>t.selected));t.forEach((t=>t.selected=e)),this.selectedIndex=this.options.indexOf(t[t.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(t,e){if(this.multiple){if(this.$fastController.isConnected){const t=this.getTypeaheadMatches(),e=this.options.indexOf(t[0]);e>-1&&(this.activeIndex=e,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}else super.typeaheadBufferChanged(t,e)}uncheckAllOptions(t=!1){this.options.forEach((t=>t.checked=!this.multiple&&void 0)),t||(this.rangeStartIndex=-1)}}se([f],nn.prototype,"activeIndex",void 0),se([at({mode:"boolean"})],nn.prototype,"multiple",void 0),se([at({converter:nt})],nn.prototype,"size",void 0);const rn=(t,e)=>W`
551
551
  <template
552
552
  aria-activedescendant="${t=>t.ariaActiveDescendant}"
553
553
  aria-multiselectable="${t=>t.ariaMultiSelectable}"
@@ -560,30 +560,30 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
560
560
  @mousedown="${(t,e)=>t.mousedownHandler(e.event)}"
561
561
  >
562
562
  <slot
563
- ${Xt({filter:rn.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
563
+ ${Yt({filter:nn.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
564
564
  ></slot>
565
565
  </template>
566
- `;class ln extends ei{constructor(){super(...arguments),this.optionElements=[]}menuElementsChanged(){this.updateOptions()}headerElementsChanged(){this.updateOptions()}footerElementsChanged(){this.updateOptions()}updateOptions(){this.optionElements.splice(0,this.optionElements.length),this.addSlottedListItems(this.headerElements),this.addSlottedListItems(this.menuElements),this.addSlottedListItems(this.footerElements),this.$emit("optionsupdated",{bubbles:!1})}addSlottedListItems(t){void 0!==t&&t.forEach((t=>{1===t.nodeType&&"listitem"===t.getAttribute("role")&&(t.id=t.id||Fi("option-"),this.optionElements.push(t))}))}}oe([f],ln.prototype,"menuElements",void 0),oe([f],ln.prototype,"headerElements",void 0),oe([f],ln.prototype,"footerElements",void 0),oe([f],ln.prototype,"suggestionsAvailableText",void 0);const hn=K`
566
+ `;class an extends ti{constructor(){super(...arguments),this.optionElements=[]}menuElementsChanged(){this.updateOptions()}headerElementsChanged(){this.updateOptions()}footerElementsChanged(){this.updateOptions()}updateOptions(){this.optionElements.splice(0,this.optionElements.length),this.addSlottedListItems(this.headerElements),this.addSlottedListItems(this.menuElements),this.addSlottedListItems(this.footerElements),this.$emit("optionsupdated",{bubbles:!1})}addSlottedListItems(t){void 0!==t&&t.forEach((t=>{1===t.nodeType&&"listitem"===t.getAttribute("role")&&(t.id=t.id||Ai("option-"),this.optionElements.push(t))}))}}se([f],an.prototype,"menuElements",void 0),se([f],an.prototype,"headerElements",void 0),se([f],an.prototype,"footerElements",void 0),se([f],an.prototype,"suggestionsAvailableText",void 0);const ln=W`
567
567
  <template>
568
568
  ${t=>t.value}
569
569
  </template>
570
- `;class dn extends ei{contentsTemplateChanged(){this.$fastController.isConnected&&this.updateView()}connectedCallback(){super.connectedCallback(),this.updateView()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectView()}handleClick(t){return t.defaultPrevented||this.handleInvoked(),!1}handleInvoked(){this.$emit("pickeroptioninvoked")}updateView(){this.disconnectView(),this.customView=this.contentsTemplate?.render(this,this)??hn.render(this,this)}disconnectView(){this.customView?.dispose(),this.customView=void 0}}oe([lt({attribute:"value"})],dn.prototype,"value",void 0),oe([f],dn.prototype,"contentsTemplate",void 0);class cn extends ei{}const un=K`
570
+ `;class hn extends ti{contentsTemplateChanged(){this.$fastController.isConnected&&this.updateView()}connectedCallback(){super.connectedCallback(),this.updateView()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectView()}handleClick(t){return t.defaultPrevented||this.handleInvoked(),!1}handleInvoked(){this.$emit("pickeroptioninvoked")}updateView(){this.disconnectView(),this.customView=this.contentsTemplate?.render(this,this)??ln.render(this,this)}disconnectView(){this.customView?.dispose(),this.customView=void 0}}se([at({attribute:"value"})],hn.prototype,"value",void 0),se([f],hn.prototype,"contentsTemplate",void 0);class dn extends ti{}const cn=W`
571
571
  <template>
572
572
  ${t=>t.value}
573
573
  </template>
574
- `;class pn extends ei{contentsTemplateChanged(){this.$fastController.isConnected&&this.updateView()}connectedCallback(){super.connectedCallback(),this.updateView()}disconnectedCallback(){this.disconnectView(),super.disconnectedCallback()}handleKeyDown(t){return!t.defaultPrevented&&(t.key!==wi||(this.handleInvoke(),!1))}handleClick(t){return t.defaultPrevented||this.handleInvoke(),!1}handleInvoke(){this.$emit("pickeriteminvoked")}updateView(){this.disconnectView(),this.customView=this.contentsTemplate?.render(this,this)??un.render(this,this)}disconnectView(){this.customView?.dispose(),this.customView=void 0}}oe([lt({attribute:"value"})],pn.prototype,"value",void 0),oe([f],pn.prototype,"contentsTemplate",void 0);const mn=(t,e)=>{const i=t.tagFor(Ui),s=t.tagFor(ln),o=t.tagFor(cn),n=t.tagFor(cn),r=function(t){const e=t.tagFor(pn);return K`
574
+ `;class un extends ti{contentsTemplateChanged(){this.$fastController.isConnected&&this.updateView()}connectedCallback(){super.connectedCallback(),this.updateView()}disconnectedCallback(){this.disconnectView(),super.disconnectedCallback()}handleKeyDown(t){return!t.defaultPrevented&&(t.key!==xi||(this.handleInvoke(),!1))}handleClick(t){return t.defaultPrevented||this.handleInvoke(),!1}handleInvoke(){this.$emit("pickeriteminvoked")}updateView(){this.disconnectView(),this.customView=this.contentsTemplate?.render(this,this)??cn.render(this,this)}disconnectView(){this.customView?.dispose(),this.customView=void 0}}se([at({attribute:"value"})],un.prototype,"value",void 0),se([f],un.prototype,"contentsTemplate",void 0);const pn=(t,e)=>{const i=t.tagFor(qi),s=t.tagFor(an),o=t.tagFor(dn),n=t.tagFor(dn),r=function(t){const e=t.tagFor(un);return W`
575
575
  <${e}
576
576
  value="${t=>t}"
577
577
  :contentsTemplate="${(t,e)=>e.parent.listItemContentsTemplate}"
578
578
  >
579
579
  </${e}>
580
- `}(t),a=function(t){const e=t.tagFor(dn);return K`
580
+ `}(t),a=function(t){const e=t.tagFor(hn);return W`
581
581
  <${e}
582
582
  value="${t=>t}"
583
583
  :contentsTemplate="${(t,e)=>e.parent.menuOptionContentsTemplate}"
584
584
  >
585
585
  </${e}>
586
- `}(t);return K`
586
+ `}(t);return W`
587
587
  <template
588
588
  :selectedListTag="${()=>o}"
589
589
  :menuTag="${()=>s}"
@@ -597,7 +597,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
597
597
  >
598
598
  <slot name="list-region"></slot>
599
599
 
600
- ${zt((t=>t.flyoutOpen),K`
600
+ ${Ht((t=>t.flyoutOpen),W`
601
601
  <${i}
602
602
  class="region"
603
603
  part="region"
@@ -614,19 +614,19 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
614
614
  horizontal-inset="${t=>t.menuConfig.horizontalInset}"
615
615
  horizontal-viewport-lock="${t=>t.menuConfig.horizontalViewportLock}"
616
616
  @loaded="${(t,e)=>t.handleRegionLoaded(e.event)}"
617
- ${Pt("region")}
617
+ ${Lt("region")}
618
618
  >
619
- ${zt((t=>!t.showNoOptions&&!t.showLoading),K`
619
+ ${Ht((t=>!t.showNoOptions&&!t.showLoading),W`
620
620
  <slot name="menu-region"></slot>
621
621
  `)}
622
- ${zt((t=>t.showNoOptions&&!t.showLoading),K`
622
+ ${Ht((t=>t.showNoOptions&&!t.showLoading),W`
623
623
  <div class="no-options-display" part="no-options-display">
624
624
  <slot name="no-options-region">
625
625
  ${t=>t.noSuggestionsText}
626
626
  </slot>
627
627
  </div>
628
628
  `)}
629
- ${zt((t=>t.showLoading),K`
629
+ ${Ht((t=>t.showLoading),W`
630
630
  <div class="loading-display" part="loading-display">
631
631
  <slot name="loading-region">
632
632
  <${n}
@@ -641,7 +641,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
641
641
  </${i}>
642
642
  `)}
643
643
  </template>
644
- `};class fn extends ei{}class vn extends(ds(fn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const gn=K`
644
+ `};class mn extends ti{}class fn extends(hs(mn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const vn=W`
645
645
  <input
646
646
  slot="input-region"
647
647
  role="combobox"
@@ -652,18 +652,18 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
652
652
  aria-label="${t=>t.label}"
653
653
  aria-labelledby="${t=>t.labelledBy}"
654
654
  placeholder="${t=>t.placeholder}"
655
- ${Pt("inputElement")}
655
+ ${Lt("inputElement")}
656
656
  ></input>
657
- `;class bn extends vn{constructor(){super(...arguments),this.selection="",this.filterSelected=!0,this.filterQuery=!0,this.noSuggestionsText="No suggestions available",this.suggestionsAvailableText="Suggestions available",this.loadingText="Loading suggestions",this.menuPlacement="bottom-fill",this.showLoading=!1,this.optionsList=[],this.filteredOptionsList=[],this.flyoutOpen=!1,this.menuFocusIndex=-1,this.showNoOptions=!1,this.selectedItems=[],this.inputElementView=null,this.handleTextInput=t=>{this.query=this.inputElement.value},this.handleInputClick=t=>{t.preventDefault(),this.toggleFlyout(!0)},this.setRegionProps=()=>{this.flyoutOpen&&(null!==this.region&&void 0!==this.region?this.region.anchorElement=this.inputElement:c.queueUpdate(this.setRegionProps))},this.configLookup={top:ji,bottom:Wi,tallest:Ki,"top-fill":Yi,"bottom-fill":Xi,"tallest-fill":Gi}}selectionChanged(){this.$fastController.isConnected&&(this.handleSelectionChange(),this.proxy instanceof HTMLInputElement&&(this.proxy.value=this.selection,this.validate()))}optionsChanged(){this.optionsList=this.options.split(",").map((t=>t.trim())).filter((t=>""!==t))}menuPlacementChanged(){this.$fastController.isConnected&&this.updateMenuConfig()}showLoadingChanged(){this.$fastController.isConnected&&c.queueUpdate((()=>{this.setFocusedOption(0)}))}listItemTemplateChanged(){this.updateListItemTemplate()}defaultListItemTemplateChanged(){this.updateListItemTemplate()}menuOptionTemplateChanged(){this.updateOptionTemplate()}defaultMenuOptionTemplateChanged(){this.updateOptionTemplate()}optionsListChanged(){this.updateFilteredOptions()}queryChanged(){this.$fastController.isConnected&&(this.inputElement.value!==this.query&&(this.inputElement.value=this.query),this.updateFilteredOptions(),this.$emit("querychange",{bubbles:!1}))}filteredOptionsListChanged(){this.$fastController.isConnected&&(this.showNoOptions=0===this.filteredOptionsList.length&&0===this.menuElement.querySelectorAll('[role="listitem"]').length,this.setFocusedOption(this.showNoOptions?-1:0))}flyoutOpenChanged(){this.flyoutOpen?(c.queueUpdate(this.setRegionProps),this.$emit("menuopening",{bubbles:!1})):this.$emit("menuclosing",{bubbles:!1})}showNoOptionsChanged(){this.$fastController.isConnected&&c.queueUpdate((()=>{this.setFocusedOption(0)}))}connectedCallback(){super.connectedCallback(),this.listElement=document.createElement(this.selectedListTag),this.appendChild(this.listElement),this.itemsPlaceholderElement=document.createComment(""),this.listElement.append(this.itemsPlaceholderElement),this.inputElementView=gn.render(this,this.listElement);const t=this.menuTag.toUpperCase();this.menuElement=Array.from(this.children).find((e=>e.tagName===t)),void 0===this.menuElement&&(this.menuElement=document.createElement(this.menuTag),this.appendChild(this.menuElement)),""===this.menuElement.id&&(this.menuElement.id=Fi("listbox-")),this.menuId=this.menuElement.id,this.optionsPlaceholder=document.createComment(""),this.menuElement.append(this.optionsPlaceholder),this.updateMenuConfig(),c.queueUpdate((()=>this.initialize()))}disconnectedCallback(){super.disconnectedCallback(),this.toggleFlyout(!1),this.inputElement.removeEventListener("input",this.handleTextInput),this.inputElement.removeEventListener("click",this.handleInputClick),null!==this.inputElementView&&(this.inputElementView.dispose(),this.inputElementView=null)}focus(){this.inputElement.focus()}initialize(){this.updateListItemTemplate(),this.updateOptionTemplate(),this.itemsRepeatBehavior=new _t((t=>t.selectedItems),(t=>t.activeListItemTemplate),{positioning:!0}).createBehavior(this.itemsPlaceholderElement),this.inputElement.addEventListener("input",this.handleTextInput),this.inputElement.addEventListener("click",this.handleInputClick),this.$fastController.addBehaviors([this.itemsRepeatBehavior]),this.menuElement.suggestionsAvailableText=this.suggestionsAvailableText,this.menuElement.addEventListener("optionsupdated",this.handleMenuOptionsUpdated),this.optionsRepeatBehavior=new _t((t=>t.filteredOptionsList),(t=>t.activeMenuOptionTemplate),{positioning:!0}).createBehavior(this.optionsPlaceholder),this.$fastController.addBehaviors([this.optionsRepeatBehavior]),this.handleSelectionChange()}toggleFlyout(t){if(this.flyoutOpen!==t){if(t&&document.activeElement===this.inputElement)return this.flyoutOpen=t,void c.queueUpdate((()=>{void 0!==this.menuElement?this.setFocusedOption(0):this.disableMenu()}));this.flyoutOpen=!1,this.disableMenu()}}handleMenuOptionsUpdated(t){t.preventDefault(),this.flyoutOpen&&this.setFocusedOption(0)}handleKeyDown(t){if(t.defaultPrevented)return!1;switch(t.key){case bi:if(this.flyoutOpen){const t=this.flyoutOpen?Math.min(this.menuFocusIndex+1,this.menuElement.optionElements.length-1):0;this.setFocusedOption(t)}else this.toggleFlyout(!0);return!1;case xi:if(this.flyoutOpen){const t=this.flyoutOpen?Math.max(this.menuFocusIndex-1,0):0;this.setFocusedOption(t)}else this.toggleFlyout(!0);return!1;case $i:return this.toggleFlyout(!1),!1;case wi:return-1!==this.menuFocusIndex&&this.menuElement.optionElements.length>this.menuFocusIndex&&this.menuElement.optionElements[this.menuFocusIndex].click(),!1;case Ci:return document.activeElement===this.inputElement||(this.incrementFocusedItem(1),!1);case yi:return 0!==this.inputElement.selectionStart||(this.incrementFocusedItem(-1),!1);case"Delete":case"Backspace":{if(null===document.activeElement)return!0;if(document.activeElement===this.inputElement)return 0!==this.inputElement.selectionStart||(this.selection=this.selectedItems.slice(0,this.selectedItems.length-1).toString(),this.toggleFlyout(!1),!1);const t=Array.from(this.listElement.children),e=t.indexOf(document.activeElement);return!(e>-1)||(this.selection=this.selectedItems.splice(e,1).toString(),c.queueUpdate((()=>{t[Math.min(t.length,e)].focus()})),!1)}}return this.toggleFlyout(!0),!0}handleFocusIn(t){return!1}handleFocusOut(t){return void 0!==this.menuElement&&this.menuElement.contains(t.relatedTarget)||this.toggleFlyout(!1),!1}handleSelectionChange(){this.selectedItems.toString()!==this.selection&&(this.selectedItems=""===this.selection?[]:this.selection.split(","),this.updateFilteredOptions(),c.queueUpdate((()=>{this.checkMaxItems()})),this.$emit("selectionchange",{bubbles:!1}))}handleRegionLoaded(t){c.queueUpdate((()=>{this.setFocusedOption(0),this.$emit("menuloaded",{bubbles:!1})}))}checkMaxItems(){if(void 0!==this.inputElement)if(void 0!==this.maxSelected&&this.selectedItems.length>=this.maxSelected){if(document.activeElement===this.inputElement){const t=Array.from(this.listElement.querySelectorAll("[role='listitem']"));t[t.length-1].focus()}this.inputElement.hidden=!0}else this.inputElement.hidden=!1}handleItemInvoke(t){if(t.defaultPrevented)return!1;if(t.target instanceof pn){const e=Array.from(this.listElement.querySelectorAll("[role='listitem']")).indexOf(t.target);if(-1!==e){const t=this.selectedItems.slice();t.splice(e,1),this.selection=t.toString(),c.queueUpdate((()=>this.incrementFocusedItem(0)))}return!1}return!0}handleOptionInvoke(t){return!t.defaultPrevented&&(!(t.target instanceof dn)||(void 0!==t.target.value&&(this.selection=`${this.selection}${""===this.selection?"":","}${t.target.value}`),this.inputElement.value="",this.query="",this.inputElement.focus(),this.toggleFlyout(!1),!1))}incrementFocusedItem(t){if(0===this.selectedItems.length)return void this.inputElement.focus();const e=Array.from(this.listElement.querySelectorAll("[role='listitem']"));if(null!==document.activeElement){let i=e.indexOf(document.activeElement);-1===i&&(i=e.length);const s=Math.min(e.length,Math.max(0,i+t));s===e.length?void 0!==this.maxSelected&&this.selectedItems.length>=this.maxSelected?e[s-1].focus():this.inputElement.focus():e[s].focus()}}disableMenu(){this.menuFocusIndex=-1,this.menuFocusOptionId=void 0,this.inputElement?.removeAttribute("aria-activedescendant"),this.inputElement?.removeAttribute("aria-owns"),this.inputElement?.removeAttribute("aria-expanded")}setFocusedOption(t){if(!this.flyoutOpen||-1===t||this.showNoOptions||this.showLoading)return void this.disableMenu();if(0===this.menuElement.optionElements.length)return;this.menuElement.optionElements.forEach((t=>{t.setAttribute("aria-selected","false")})),this.menuFocusIndex=t,this.menuFocusIndex>this.menuElement.optionElements.length-1&&(this.menuFocusIndex=this.menuElement.optionElements.length-1),this.menuFocusOptionId=this.menuElement.optionElements[this.menuFocusIndex].id,this.inputElement.setAttribute("aria-owns",this.menuId),this.inputElement.setAttribute("aria-expanded","true"),this.inputElement.setAttribute("aria-activedescendant",this.menuFocusOptionId);const e=this.menuElement.optionElements[this.menuFocusIndex];e.setAttribute("aria-selected","true"),this.menuElement.scrollTo(0,e.offsetTop)}updateListItemTemplate(){this.activeListItemTemplate=this.listItemTemplate??this.defaultListItemTemplate}updateOptionTemplate(){this.activeMenuOptionTemplate=this.menuOptionTemplate??this.defaultMenuOptionTemplate}updateFilteredOptions(){this.filteredOptionsList=this.optionsList.slice(0),this.filterSelected&&(this.filteredOptionsList=this.filteredOptionsList.filter((t=>-1===this.selectedItems.indexOf(t)))),this.filterQuery&&""!==this.query&&void 0!==this.query&&(this.filteredOptionsList=this.filteredOptionsList.filter((t=>-1!==t.indexOf(this.query))))}updateMenuConfig(){let t=this.configLookup[this.menuPlacement];null===t&&(t=Xi),this.menuConfig={...t,autoUpdateMode:"auto",fixedPlacement:!0,horizontalViewportLock:!1,verticalViewportLock:!1}}}oe([lt({attribute:"selection"})],bn.prototype,"selection",void 0),oe([lt({attribute:"options"})],bn.prototype,"options",void 0),oe([lt({attribute:"filter-selected",mode:"boolean"})],bn.prototype,"filterSelected",void 0),oe([lt({attribute:"filter-query",mode:"boolean"})],bn.prototype,"filterQuery",void 0),oe([lt({attribute:"max-selected"})],bn.prototype,"maxSelected",void 0),oe([lt({attribute:"no-suggestions-text"})],bn.prototype,"noSuggestionsText",void 0),oe([lt({attribute:"suggestions-available-text"})],bn.prototype,"suggestionsAvailableText",void 0),oe([lt({attribute:"loading-text"})],bn.prototype,"loadingText",void 0),oe([lt({attribute:"label"})],bn.prototype,"label",void 0),oe([lt({attribute:"labelledby"})],bn.prototype,"labelledBy",void 0),oe([lt({attribute:"placeholder"})],bn.prototype,"placeholder",void 0),oe([lt({attribute:"menu-placement"})],bn.prototype,"menuPlacement",void 0),oe([f],bn.prototype,"showLoading",void 0),oe([f],bn.prototype,"listItemTemplate",void 0),oe([f],bn.prototype,"defaultListItemTemplate",void 0),oe([f],bn.prototype,"activeListItemTemplate",void 0),oe([f],bn.prototype,"menuOptionTemplate",void 0),oe([f],bn.prototype,"defaultMenuOptionTemplate",void 0),oe([f],bn.prototype,"activeMenuOptionTemplate",void 0),oe([f],bn.prototype,"listItemContentsTemplate",void 0),oe([f],bn.prototype,"menuOptionContentsTemplate",void 0),oe([f],bn.prototype,"optionsList",void 0),oe([f],bn.prototype,"query",void 0),oe([f],bn.prototype,"filteredOptionsList",void 0),oe([f],bn.prototype,"flyoutOpen",void 0),oe([f],bn.prototype,"menuId",void 0),oe([f],bn.prototype,"selectedListTag",void 0),oe([f],bn.prototype,"menuTag",void 0),oe([f],bn.prototype,"menuFocusIndex",void 0),oe([f],bn.prototype,"menuFocusOptionId",void 0),oe([f],bn.prototype,"showNoOptions",void 0),oe([f],bn.prototype,"menuConfig",void 0),oe([f],bn.prototype,"selectedItems",void 0);const yn=(t,e)=>K`
657
+ `;class gn extends fn{constructor(){super(...arguments),this.selection="",this.filterSelected=!0,this.filterQuery=!0,this.noSuggestionsText="No suggestions available",this.suggestionsAvailableText="Suggestions available",this.loadingText="Loading suggestions",this.menuPlacement="bottom-fill",this.showLoading=!1,this.optionsList=[],this.filteredOptionsList=[],this.flyoutOpen=!1,this.menuFocusIndex=-1,this.showNoOptions=!1,this.selectedItems=[],this.inputElementView=null,this.handleTextInput=t=>{this.query=this.inputElement.value},this.handleInputClick=t=>{t.preventDefault(),this.toggleFlyout(!0)},this.setRegionProps=()=>{this.flyoutOpen&&(null!==this.region&&void 0!==this.region?this.region.anchorElement=this.inputElement:c.queueUpdate(this.setRegionProps))},this.configLookup={top:_i,bottom:ji,tallest:Wi,"top-fill":Ki,"bottom-fill":Yi,"tallest-fill":Xi}}selectionChanged(){this.$fastController.isConnected&&(this.handleSelectionChange(),this.proxy instanceof HTMLInputElement&&(this.proxy.value=this.selection,this.validate()))}optionsChanged(){this.optionsList=this.options.split(",").map((t=>t.trim())).filter((t=>""!==t))}menuPlacementChanged(){this.$fastController.isConnected&&this.updateMenuConfig()}showLoadingChanged(){this.$fastController.isConnected&&c.queueUpdate((()=>{this.setFocusedOption(0)}))}listItemTemplateChanged(){this.updateListItemTemplate()}defaultListItemTemplateChanged(){this.updateListItemTemplate()}menuOptionTemplateChanged(){this.updateOptionTemplate()}defaultMenuOptionTemplateChanged(){this.updateOptionTemplate()}optionsListChanged(){this.updateFilteredOptions()}queryChanged(){this.$fastController.isConnected&&(this.inputElement.value!==this.query&&(this.inputElement.value=this.query),this.updateFilteredOptions(),this.$emit("querychange",{bubbles:!1}))}filteredOptionsListChanged(){this.$fastController.isConnected&&(this.showNoOptions=0===this.filteredOptionsList.length&&0===this.menuElement.querySelectorAll('[role="listitem"]').length,this.setFocusedOption(this.showNoOptions?-1:0))}flyoutOpenChanged(){this.flyoutOpen?(c.queueUpdate(this.setRegionProps),this.$emit("menuopening",{bubbles:!1})):this.$emit("menuclosing",{bubbles:!1})}showNoOptionsChanged(){this.$fastController.isConnected&&c.queueUpdate((()=>{this.setFocusedOption(0)}))}connectedCallback(){super.connectedCallback(),this.listElement=document.createElement(this.selectedListTag),this.appendChild(this.listElement),this.itemsPlaceholderElement=document.createComment(""),this.listElement.append(this.itemsPlaceholderElement),this.inputElementView=vn.render(this,this.listElement);const t=this.menuTag.toUpperCase();this.menuElement=Array.from(this.children).find((e=>e.tagName===t)),void 0===this.menuElement&&(this.menuElement=document.createElement(this.menuTag),this.appendChild(this.menuElement)),""===this.menuElement.id&&(this.menuElement.id=Ai("listbox-")),this.menuId=this.menuElement.id,this.optionsPlaceholder=document.createComment(""),this.menuElement.append(this.optionsPlaceholder),this.updateMenuConfig(),c.queueUpdate((()=>this.initialize()))}disconnectedCallback(){super.disconnectedCallback(),this.toggleFlyout(!1),this.inputElement.removeEventListener("input",this.handleTextInput),this.inputElement.removeEventListener("click",this.handleInputClick),null!==this.inputElementView&&(this.inputElementView.dispose(),this.inputElementView=null)}focus(){this.inputElement.focus()}initialize(){this.updateListItemTemplate(),this.updateOptionTemplate(),this.itemsRepeatBehavior=new Ut((t=>t.selectedItems),(t=>t.activeListItemTemplate),{positioning:!0}).createBehavior(this.itemsPlaceholderElement),this.inputElement.addEventListener("input",this.handleTextInput),this.inputElement.addEventListener("click",this.handleInputClick),this.$fastController.addBehaviors([this.itemsRepeatBehavior]),this.menuElement.suggestionsAvailableText=this.suggestionsAvailableText,this.menuElement.addEventListener("optionsupdated",this.handleMenuOptionsUpdated),this.optionsRepeatBehavior=new Ut((t=>t.filteredOptionsList),(t=>t.activeMenuOptionTemplate),{positioning:!0}).createBehavior(this.optionsPlaceholder),this.$fastController.addBehaviors([this.optionsRepeatBehavior]),this.handleSelectionChange()}toggleFlyout(t){if(this.flyoutOpen!==t){if(t&&document.activeElement===this.inputElement)return this.flyoutOpen=t,void c.queueUpdate((()=>{void 0!==this.menuElement?this.setFocusedOption(0):this.disableMenu()}));this.flyoutOpen=!1,this.disableMenu()}}handleMenuOptionsUpdated(t){t.preventDefault(),this.flyoutOpen&&this.setFocusedOption(0)}handleKeyDown(t){if(t.defaultPrevented)return!1;switch(t.key){case gi:if(this.flyoutOpen){const t=this.flyoutOpen?Math.min(this.menuFocusIndex+1,this.menuElement.optionElements.length-1):0;this.setFocusedOption(t)}else this.toggleFlyout(!0);return!1;case Ci:if(this.flyoutOpen){const t=this.flyoutOpen?Math.max(this.menuFocusIndex-1,0):0;this.setFocusedOption(t)}else this.toggleFlyout(!0);return!1;case wi:return this.toggleFlyout(!1),!1;case xi:return-1!==this.menuFocusIndex&&this.menuElement.optionElements.length>this.menuFocusIndex&&this.menuElement.optionElements[this.menuFocusIndex].click(),!1;case yi:return document.activeElement===this.inputElement||(this.incrementFocusedItem(1),!1);case bi:return 0!==this.inputElement.selectionStart||(this.incrementFocusedItem(-1),!1);case"Delete":case"Backspace":{if(null===document.activeElement)return!0;if(document.activeElement===this.inputElement)return 0!==this.inputElement.selectionStart||(this.selection=this.selectedItems.slice(0,this.selectedItems.length-1).toString(),this.toggleFlyout(!1),!1);const t=Array.from(this.listElement.children),e=t.indexOf(document.activeElement);return!(e>-1)||(this.selection=this.selectedItems.splice(e,1).toString(),c.queueUpdate((()=>{t[Math.min(t.length,e)].focus()})),!1)}}return this.toggleFlyout(!0),!0}handleFocusIn(t){return!1}handleFocusOut(t){return void 0!==this.menuElement&&this.menuElement.contains(t.relatedTarget)||this.toggleFlyout(!1),!1}handleSelectionChange(){this.selectedItems.toString()!==this.selection&&(this.selectedItems=""===this.selection?[]:this.selection.split(","),this.updateFilteredOptions(),c.queueUpdate((()=>{this.checkMaxItems()})),this.$emit("selectionchange",{bubbles:!1}))}handleRegionLoaded(t){c.queueUpdate((()=>{this.setFocusedOption(0),this.$emit("menuloaded",{bubbles:!1})}))}checkMaxItems(){if(void 0!==this.inputElement)if(void 0!==this.maxSelected&&this.selectedItems.length>=this.maxSelected){if(document.activeElement===this.inputElement){const t=Array.from(this.listElement.querySelectorAll("[role='listitem']"));t[t.length-1].focus()}this.inputElement.hidden=!0}else this.inputElement.hidden=!1}handleItemInvoke(t){if(t.defaultPrevented)return!1;if(t.target instanceof un){const e=Array.from(this.listElement.querySelectorAll("[role='listitem']")).indexOf(t.target);if(-1!==e){const t=this.selectedItems.slice();t.splice(e,1),this.selection=t.toString(),c.queueUpdate((()=>this.incrementFocusedItem(0)))}return!1}return!0}handleOptionInvoke(t){return!t.defaultPrevented&&(!(t.target instanceof hn)||(void 0!==t.target.value&&(this.selection=`${this.selection}${""===this.selection?"":","}${t.target.value}`),this.inputElement.value="",this.query="",this.inputElement.focus(),this.toggleFlyout(!1),!1))}incrementFocusedItem(t){if(0===this.selectedItems.length)return void this.inputElement.focus();const e=Array.from(this.listElement.querySelectorAll("[role='listitem']"));if(null!==document.activeElement){let i=e.indexOf(document.activeElement);-1===i&&(i=e.length);const s=Math.min(e.length,Math.max(0,i+t));s===e.length?void 0!==this.maxSelected&&this.selectedItems.length>=this.maxSelected?e[s-1].focus():this.inputElement.focus():e[s].focus()}}disableMenu(){this.menuFocusIndex=-1,this.menuFocusOptionId=void 0,this.inputElement?.removeAttribute("aria-activedescendant"),this.inputElement?.removeAttribute("aria-owns"),this.inputElement?.removeAttribute("aria-expanded")}setFocusedOption(t){if(!this.flyoutOpen||-1===t||this.showNoOptions||this.showLoading)return void this.disableMenu();if(0===this.menuElement.optionElements.length)return;this.menuElement.optionElements.forEach((t=>{t.setAttribute("aria-selected","false")})),this.menuFocusIndex=t,this.menuFocusIndex>this.menuElement.optionElements.length-1&&(this.menuFocusIndex=this.menuElement.optionElements.length-1),this.menuFocusOptionId=this.menuElement.optionElements[this.menuFocusIndex].id,this.inputElement.setAttribute("aria-owns",this.menuId),this.inputElement.setAttribute("aria-expanded","true"),this.inputElement.setAttribute("aria-activedescendant",this.menuFocusOptionId);const e=this.menuElement.optionElements[this.menuFocusIndex];e.setAttribute("aria-selected","true"),this.menuElement.scrollTo(0,e.offsetTop)}updateListItemTemplate(){this.activeListItemTemplate=this.listItemTemplate??this.defaultListItemTemplate}updateOptionTemplate(){this.activeMenuOptionTemplate=this.menuOptionTemplate??this.defaultMenuOptionTemplate}updateFilteredOptions(){this.filteredOptionsList=this.optionsList.slice(0),this.filterSelected&&(this.filteredOptionsList=this.filteredOptionsList.filter((t=>-1===this.selectedItems.indexOf(t)))),this.filterQuery&&""!==this.query&&void 0!==this.query&&(this.filteredOptionsList=this.filteredOptionsList.filter((t=>-1!==t.indexOf(this.query))))}updateMenuConfig(){let t=this.configLookup[this.menuPlacement];null===t&&(t=Yi),this.menuConfig={...t,autoUpdateMode:"auto",fixedPlacement:!0,horizontalViewportLock:!1,verticalViewportLock:!1}}}se([at({attribute:"selection"})],gn.prototype,"selection",void 0),se([at({attribute:"options"})],gn.prototype,"options",void 0),se([at({attribute:"filter-selected",mode:"boolean"})],gn.prototype,"filterSelected",void 0),se([at({attribute:"filter-query",mode:"boolean"})],gn.prototype,"filterQuery",void 0),se([at({attribute:"max-selected"})],gn.prototype,"maxSelected",void 0),se([at({attribute:"no-suggestions-text"})],gn.prototype,"noSuggestionsText",void 0),se([at({attribute:"suggestions-available-text"})],gn.prototype,"suggestionsAvailableText",void 0),se([at({attribute:"loading-text"})],gn.prototype,"loadingText",void 0),se([at({attribute:"label"})],gn.prototype,"label",void 0),se([at({attribute:"labelledby"})],gn.prototype,"labelledBy",void 0),se([at({attribute:"placeholder"})],gn.prototype,"placeholder",void 0),se([at({attribute:"menu-placement"})],gn.prototype,"menuPlacement",void 0),se([f],gn.prototype,"showLoading",void 0),se([f],gn.prototype,"listItemTemplate",void 0),se([f],gn.prototype,"defaultListItemTemplate",void 0),se([f],gn.prototype,"activeListItemTemplate",void 0),se([f],gn.prototype,"menuOptionTemplate",void 0),se([f],gn.prototype,"defaultMenuOptionTemplate",void 0),se([f],gn.prototype,"activeMenuOptionTemplate",void 0),se([f],gn.prototype,"listItemContentsTemplate",void 0),se([f],gn.prototype,"menuOptionContentsTemplate",void 0),se([f],gn.prototype,"optionsList",void 0),se([f],gn.prototype,"query",void 0),se([f],gn.prototype,"filteredOptionsList",void 0),se([f],gn.prototype,"flyoutOpen",void 0),se([f],gn.prototype,"menuId",void 0),se([f],gn.prototype,"selectedListTag",void 0),se([f],gn.prototype,"menuTag",void 0),se([f],gn.prototype,"menuFocusIndex",void 0),se([f],gn.prototype,"menuFocusOptionId",void 0),se([f],gn.prototype,"showNoOptions",void 0),se([f],gn.prototype,"menuConfig",void 0),se([f],gn.prototype,"selectedItems",void 0);const bn=(t,e)=>W`
658
658
  <template role="list" slot="menu-region">
659
659
  <div class="options-display" part="options-display">
660
660
  <div class="header-region" part="header-region">
661
- <slot name="header-region" ${Xt("headerElements")}></slot>
661
+ <slot name="header-region" ${Yt("headerElements")}></slot>
662
662
  </div>
663
663
 
664
- <slot ${Xt("menuElements")}></slot>
664
+ <slot ${Yt("menuElements")}></slot>
665
665
  <div class="footer-region" part="footer-region">
666
- <slot name="footer-region" ${Xt("footerElements")}></slot>
666
+ <slot name="footer-region" ${Yt("footerElements")}></slot>
667
667
  </div>
668
668
  <div
669
669
  role="alert"
@@ -675,7 +675,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
675
675
  </div>
676
676
  </div>
677
677
  </template>
678
- `,Cn=(t,e)=>K`
678
+ `,yn=(t,e)=>W`
679
679
  <template
680
680
  role="listitem"
681
681
  tabindex="-1"
@@ -683,12 +683,12 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
683
683
  >
684
684
  <slot></slot>
685
685
  </template>
686
- `,xn=(t,e)=>K`
686
+ `,Cn=(t,e)=>W`
687
687
  <template slot="list-region" role="list" class="picker-list">
688
688
  <slot></slot>
689
689
  <slot name="input-region"></slot>
690
690
  </template>
691
- `,wn=(t,e)=>K`
691
+ `,xn=(t,e)=>W`
692
692
  <template
693
693
  role="listitem"
694
694
  tabindex="0"
@@ -697,11 +697,11 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
697
697
  >
698
698
  <slot></slot>
699
699
  </template>
700
- `,$n={menuitem:"menuitem",menuitemcheckbox:"menuitemcheckbox",menuitemradio:"menuitemradio"},In={[$n.menuitem]:"menuitem",[$n.menuitemcheckbox]:"menuitemcheckbox",[$n.menuitemradio]:"menuitemradio"};class kn extends ei{constructor(){super(...arguments),this.role=$n.menuitem,this.hasSubmenu=!1,this.currentDirection=Si.ltr,this.focusSubmenuOnLoad=!1,this.handleMenuItemKeyDown=t=>{if(t.defaultPrevented)return!1;switch(t.key){case wi:case Ei:return this.invoke(),!1;case Ci:return this.expandAndFocus(),!1;case yi:if(this.expanded)return this.expanded=!1,this.focus(),!1}return!0},this.handleMenuItemClick=t=>(t.defaultPrevented||this.disabled||this.invoke(),!1),this.submenuLoaded=()=>{this.focusSubmenuOnLoad&&(this.focusSubmenuOnLoad=!1,this.hasSubmenu&&(this.submenu.focus(),this.setAttribute("tabindex","-1")))},this.handleMouseOver=t=>(this.disabled||!this.hasSubmenu||this.expanded||(this.expanded=!0),!1),this.handleMouseOut=t=>(!this.expanded||this.contains(document.activeElement)||(this.expanded=!1),!1),this.expandAndFocus=()=>{this.hasSubmenu&&(this.focusSubmenuOnLoad=!0,this.expanded=!0)},this.invoke=()=>{if(!this.disabled)switch(this.role){case $n.menuitemcheckbox:this.checked=!this.checked;break;case $n.menuitem:this.updateSubmenu(),this.hasSubmenu?this.expandAndFocus():this.$emit("change");break;case $n.menuitemradio:this.checked||(this.checked=!0)}},this.updateSubmenu=()=>{this.submenu=this.domChildren().find((t=>"menu"===t.getAttribute("role"))),this.hasSubmenu=void 0!==this.submenu}}expandedChanged(t){if(this.$fastController.isConnected){if(void 0===this.submenu)return;!1===this.expanded?this.submenu.collapseExpandedItem():this.currentDirection=Bi(this),this.$emit("expanded-change",this,{bubbles:!1})}}checkedChanged(t,e){this.$fastController.isConnected&&this.$emit("change")}connectedCallback(){super.connectedCallback(),c.queueUpdate((()=>{this.updateSubmenu()})),this.startColumnCount||(this.startColumnCount=1),this.observer=new MutationObserver(this.updateSubmenu)}disconnectedCallback(){super.disconnectedCallback(),this.submenu=void 0,void 0!==this.observer&&(this.observer.disconnect(),this.observer=void 0)}domChildren(){return Array.from(this.children).filter((t=>!t.hasAttribute("hidden")))}}oe([lt({mode:"boolean"})],kn.prototype,"disabled",void 0),oe([lt({mode:"boolean"})],kn.prototype,"expanded",void 0),oe([f],kn.prototype,"startColumnCount",void 0),oe([lt],kn.prototype,"role",void 0),oe([lt({mode:"boolean"})],kn.prototype,"checked",void 0),oe([f],kn.prototype,"submenuRegion",void 0),oe([f],kn.prototype,"hasSubmenu",void 0),oe([f],kn.prototype,"currentDirection",void 0),oe([f],kn.prototype,"submenu",void 0),oi(kn,Zt);const En=(t,e)=>K`
700
+ `,wn={menuitem:"menuitem",menuitemcheckbox:"menuitemcheckbox",menuitemradio:"menuitemradio"},$n={[wn.menuitem]:"menuitem",[wn.menuitemcheckbox]:"menuitemcheckbox",[wn.menuitemradio]:"menuitemradio"};class In extends ti{constructor(){super(...arguments),this.role=wn.menuitem,this.hasSubmenu=!1,this.currentDirection=Oi.ltr,this.focusSubmenuOnLoad=!1,this.handleMenuItemKeyDown=t=>{if(t.defaultPrevented)return!1;switch(t.key){case xi:case ki:return this.invoke(),!1;case yi:return this.expandAndFocus(),!1;case bi:if(this.expanded)return this.expanded=!1,this.focus(),!1}return!0},this.handleMenuItemClick=t=>(t.defaultPrevented||this.disabled||this.invoke(),!1),this.submenuLoaded=()=>{this.focusSubmenuOnLoad&&(this.focusSubmenuOnLoad=!1,this.hasSubmenu&&(this.submenu.focus(),this.setAttribute("tabindex","-1")))},this.handleMouseOver=t=>(this.disabled||!this.hasSubmenu||this.expanded||(this.expanded=!0),!1),this.handleMouseOut=t=>(!this.expanded||this.contains(document.activeElement)||(this.expanded=!1),!1),this.expandAndFocus=()=>{this.hasSubmenu&&(this.focusSubmenuOnLoad=!0,this.expanded=!0)},this.invoke=()=>{if(!this.disabled)switch(this.role){case wn.menuitemcheckbox:this.checked=!this.checked;break;case wn.menuitem:this.updateSubmenu(),this.hasSubmenu?this.expandAndFocus():this.$emit("change");break;case wn.menuitemradio:this.checked||(this.checked=!0)}},this.updateSubmenu=()=>{this.submenu=this.domChildren().find((t=>"menu"===t.getAttribute("role"))),this.hasSubmenu=void 0!==this.submenu}}expandedChanged(t){if(this.$fastController.isConnected){if(void 0===this.submenu)return;!1===this.expanded?this.submenu.collapseExpandedItem():this.currentDirection=Ni(this),this.$emit("expanded-change",this,{bubbles:!1})}}checkedChanged(t,e){this.$fastController.isConnected&&this.$emit("change")}connectedCallback(){super.connectedCallback(),c.queueUpdate((()=>{this.updateSubmenu()})),this.startColumnCount||(this.startColumnCount=1),this.observer=new MutationObserver(this.updateSubmenu)}disconnectedCallback(){super.disconnectedCallback(),this.submenu=void 0,void 0!==this.observer&&(this.observer.disconnect(),this.observer=void 0)}domChildren(){return Array.from(this.children).filter((t=>!t.hasAttribute("hidden")))}}se([at({mode:"boolean"})],In.prototype,"disabled",void 0),se([at({mode:"boolean"})],In.prototype,"expanded",void 0),se([f],In.prototype,"startColumnCount",void 0),se([at],In.prototype,"role",void 0),se([at({mode:"boolean"})],In.prototype,"checked",void 0),se([f],In.prototype,"submenuRegion",void 0),se([f],In.prototype,"hasSubmenu",void 0),se([f],In.prototype,"currentDirection",void 0),se([f],In.prototype,"submenu",void 0),si(In,Qt);const kn=(t,e)=>W`
701
701
  <template
702
702
  role="${t=>t.role}"
703
703
  aria-haspopup="${t=>t.hasSubmenu?"menu":void 0}"
704
- aria-checked="${t=>t.role!==$n.menuitem?t.checked:void 0}"
704
+ aria-checked="${t=>t.role!==wn.menuitem?t.checked:void 0}"
705
705
  aria-disabled="${t=>t.disabled}"
706
706
  aria-expanded="${t=>t.expanded}"
707
707
  @keydown="${(t,e)=>t.handleMenuItemKeyDown(e.event)}"
@@ -710,7 +710,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
710
710
  @mouseout="${(t,e)=>t.handleMouseOut(e.event)}"
711
711
  class="${t=>t.disabled?"disabled":""} ${t=>t.expanded?"expanded":""} ${t=>`indent-${t.startColumnCount}`}"
712
712
  >
713
- ${zt((t=>t.role===$n.menuitemcheckbox),K`
713
+ ${Ht((t=>t.role===wn.menuitemcheckbox),W`
714
714
  <div part="input-container" class="input-container">
715
715
  <span part="checkbox" class="checkbox">
716
716
  <slot name="checkbox-indicator">
@@ -719,7 +719,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
719
719
  </span>
720
720
  </div>
721
721
  `)}
722
- ${zt((t=>t.role===$n.menuitemradio),K`
722
+ ${Ht((t=>t.role===wn.menuitemradio),W`
723
723
  <div part="input-container" class="input-container">
724
724
  <span part="radio" class="radio">
725
725
  <slot name="radio-indicator">
@@ -729,12 +729,12 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
729
729
  </div>
730
730
  `)}
731
731
  </div>
732
- ${te(0,e)}
732
+ ${Jt(0,e)}
733
733
  <span class="content" part="content">
734
734
  <slot></slot>
735
735
  </span>
736
- ${Jt(0,e)}
737
- ${zt((t=>t.hasSubmenu),K`
736
+ ${Zt(0,e)}
737
+ ${Ht((t=>t.hasSubmenu),W`
738
738
  <div
739
739
  part="expand-collapse-glyph-container"
740
740
  class="expand-collapse-glyph-container"
@@ -746,8 +746,8 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
746
746
  </span>
747
747
  </div>
748
748
  `)}
749
- ${zt((t=>t.expanded),K`
750
- <${t.tagFor(Ui)}
749
+ ${Ht((t=>t.expanded),W`
750
+ <${t.tagFor(qi)}
751
751
  :anchorElement="${t=>t}"
752
752
  vertical-positioning-mode="dynamic"
753
753
  vertical-default-position="bottom"
@@ -757,33 +757,33 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
757
757
  class="submenu-region"
758
758
  dir="${t=>t.currentDirection}"
759
759
  @loaded="${t=>t.submenuLoaded()}"
760
- ${Pt("submenuRegion")}
760
+ ${Lt("submenuRegion")}
761
761
  part="submenu-region"
762
762
  >
763
763
  <slot name="submenu"></slot>
764
- </${t.tagFor(Ui)}>
764
+ </${t.tagFor(qi)}>
765
765
  `)}
766
766
  </template>
767
- `,Tn=(t,e)=>K`
767
+ `,En=(t,e)=>W`
768
768
  <template
769
769
  slot="${t=>t.slot?t.slot:t.isNestedMenu()?"submenu":void 0}"
770
770
  role="menu"
771
771
  @keydown="${(t,e)=>t.handleMenuKeyDown(e.event)}"
772
772
  @focusout="${(t,e)=>t.handleFocusOut(e.event)}"
773
773
  >
774
- <slot ${Xt("items")}></slot>
774
+ <slot ${Yt("items")}></slot>
775
775
  </template>
776
- `;class On extends ei{constructor(){super(...arguments),this.expandedItem=null,this.focusIndex=-1,this.isNestedMenu=()=>null!==this.parentElement&&hi(this.parentElement)&&"menuitem"===this.parentElement.getAttribute("role"),this.handleFocusOut=t=>{if(!this.contains(t.relatedTarget)&&void 0!==this.menuItems){this.collapseExpandedItem();const t=this.menuItems.findIndex(this.isFocusableElement);this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.menuItems[t].setAttribute("tabindex","0"),this.focusIndex=t}},this.handleItemFocus=t=>{const e=t.target;void 0!==this.menuItems&&e!==this.menuItems[this.focusIndex]&&(this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=this.menuItems.indexOf(e),e.setAttribute("tabindex","0"))},this.handleExpandedChanged=t=>{if(t.defaultPrevented||null===t.target||void 0===this.menuItems||this.menuItems.indexOf(t.target)<0)return;t.preventDefault();const e=t.target;null===this.expandedItem||e!==this.expandedItem||!1!==e.expanded?e.expanded&&(null!==this.expandedItem&&this.expandedItem!==e&&(this.expandedItem.expanded=!1),this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.expandedItem=e,this.focusIndex=this.menuItems.indexOf(e),e.setAttribute("tabindex","0")):this.expandedItem=null},this.removeItemListeners=()=>{void 0!==this.menuItems&&this.menuItems.forEach((t=>{t.removeEventListener("expanded-change",this.handleExpandedChanged),t.removeEventListener("focus",this.handleItemFocus)}))},this.setItems=()=>{const t=this.domChildren();this.removeItemListeners(),this.menuItems=t;const e=this.menuItems.filter(this.isMenuItemElement);e.length&&(this.focusIndex=0);const i=e.reduce(((t,e)=>{const i=function(t){const e=t.getAttribute("role"),i=t.querySelector("[slot=start]");return e!==$n.menuitem&&null===i||e===$n.menuitem&&null!==i?1:e!==$n.menuitem&&null!==i?2:0}(e);return t>i?t:i}),0);e.forEach(((t,e)=>{t.setAttribute("tabindex",0===e?"0":"-1"),t.addEventListener("expanded-change",this.handleExpandedChanged),t.addEventListener("focus",this.handleItemFocus),(t instanceof kn||"startColumnCount"in t)&&(t.startColumnCount=i)}))},this.changeHandler=t=>{if(void 0===this.menuItems)return;const e=t.target,i=this.menuItems.indexOf(e);if(-1!==i&&"menuitemradio"===e.role&&!0===e.checked){for(let t=i-1;t>=0;--t){const e=this.menuItems[t],i=e.getAttribute("role");if(i===$n.menuitemradio&&(e.checked=!1),"separator"===i)break}const t=this.menuItems.length-1;for(let e=i+1;e<=t;++e){const t=this.menuItems[e],i=t.getAttribute("role");if(i===$n.menuitemradio&&(t.checked=!1),"separator"===i)break}}},this.isMenuItemElement=t=>hi(t)&&On.focusableElementRoles.hasOwnProperty(t.getAttribute("role")),this.isFocusableElement=t=>this.isMenuItemElement(t)}itemsChanged(t,e){this.$fastController.isConnected&&void 0!==this.menuItems&&this.setItems()}static{this.focusableElementRoles=In}connectedCallback(){super.connectedCallback(),c.queueUpdate((()=>{this.setItems()})),this.addEventListener("change",this.changeHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeItemListeners(),this.menuItems=void 0,this.removeEventListener("change",this.changeHandler)}focus(){this.setFocus(0,1)}collapseExpandedItem(){null!==this.expandedItem&&(this.expandedItem.expanded=!1,this.expandedItem=null)}handleMenuKeyDown(t){if(!t.defaultPrevented&&void 0!==this.menuItems)switch(t.key){case bi:return void this.setFocus(this.focusIndex+1,1);case xi:return void this.setFocus(this.focusIndex-1,-1);case ki:return void this.setFocus(this.menuItems.length-1,-1);case Ii:return void this.setFocus(0,1);default:return!0}}domChildren(){return Array.from(this.children).filter((t=>!t.hasAttribute("hidden")))}setFocus(t,e){if(void 0!==this.menuItems)for(;t>=0&&t<this.menuItems.length;){const i=this.menuItems[t];if(this.isFocusableElement(i)){this.focusIndex>-1&&this.menuItems.length>=this.focusIndex-1&&this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=t,i.setAttribute("tabindex","0"),i.focus();break}t+=e}}}oe([f],On.prototype,"items",void 0);const Sn=(t,e)=>K`
776
+ `;class Tn extends ti{constructor(){super(...arguments),this.expandedItem=null,this.focusIndex=-1,this.isNestedMenu=()=>null!==this.parentElement&&li(this.parentElement)&&"menuitem"===this.parentElement.getAttribute("role"),this.handleFocusOut=t=>{if(!this.contains(t.relatedTarget)&&void 0!==this.menuItems){this.collapseExpandedItem();const t=this.menuItems.findIndex(this.isFocusableElement);this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.menuItems[t].setAttribute("tabindex","0"),this.focusIndex=t}},this.handleItemFocus=t=>{const e=t.target;void 0!==this.menuItems&&e!==this.menuItems[this.focusIndex]&&(this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=this.menuItems.indexOf(e),e.setAttribute("tabindex","0"))},this.handleExpandedChanged=t=>{if(t.defaultPrevented||null===t.target||void 0===this.menuItems||this.menuItems.indexOf(t.target)<0)return;t.preventDefault();const e=t.target;null===this.expandedItem||e!==this.expandedItem||!1!==e.expanded?e.expanded&&(null!==this.expandedItem&&this.expandedItem!==e&&(this.expandedItem.expanded=!1),this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.expandedItem=e,this.focusIndex=this.menuItems.indexOf(e),e.setAttribute("tabindex","0")):this.expandedItem=null},this.removeItemListeners=()=>{void 0!==this.menuItems&&this.menuItems.forEach((t=>{t.removeEventListener("expanded-change",this.handleExpandedChanged),t.removeEventListener("focus",this.handleItemFocus)}))},this.setItems=()=>{const t=this.domChildren();this.removeItemListeners(),this.menuItems=t;const e=this.menuItems.filter(this.isMenuItemElement);e.length&&(this.focusIndex=0);const i=e.reduce(((t,e)=>{const i=function(t){const e=t.getAttribute("role"),i=t.querySelector("[slot=start]");return e!==wn.menuitem&&null===i||e===wn.menuitem&&null!==i?1:e!==wn.menuitem&&null!==i?2:0}(e);return t>i?t:i}),0);e.forEach(((t,e)=>{t.setAttribute("tabindex",0===e?"0":"-1"),t.addEventListener("expanded-change",this.handleExpandedChanged),t.addEventListener("focus",this.handleItemFocus),(t instanceof In||"startColumnCount"in t)&&(t.startColumnCount=i)}))},this.changeHandler=t=>{if(void 0===this.menuItems)return;const e=t.target,i=this.menuItems.indexOf(e);if(-1!==i&&"menuitemradio"===e.role&&!0===e.checked){for(let t=i-1;t>=0;--t){const e=this.menuItems[t],i=e.getAttribute("role");if(i===wn.menuitemradio&&(e.checked=!1),"separator"===i)break}const t=this.menuItems.length-1;for(let e=i+1;e<=t;++e){const t=this.menuItems[e],i=t.getAttribute("role");if(i===wn.menuitemradio&&(t.checked=!1),"separator"===i)break}}},this.isMenuItemElement=t=>li(t)&&Tn.focusableElementRoles.hasOwnProperty(t.getAttribute("role")),this.isFocusableElement=t=>this.isMenuItemElement(t)}itemsChanged(t,e){this.$fastController.isConnected&&void 0!==this.menuItems&&this.setItems()}static{this.focusableElementRoles=$n}connectedCallback(){super.connectedCallback(),c.queueUpdate((()=>{this.setItems()})),this.addEventListener("change",this.changeHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeItemListeners(),this.menuItems=void 0,this.removeEventListener("change",this.changeHandler)}focus(){this.setFocus(0,1)}collapseExpandedItem(){null!==this.expandedItem&&(this.expandedItem.expanded=!1,this.expandedItem=null)}handleMenuKeyDown(t){if(!t.defaultPrevented&&void 0!==this.menuItems)switch(t.key){case gi:return void this.setFocus(this.focusIndex+1,1);case Ci:return void this.setFocus(this.focusIndex-1,-1);case Ii:return void this.setFocus(this.menuItems.length-1,-1);case $i:return void this.setFocus(0,1);default:return!0}}domChildren(){return Array.from(this.children).filter((t=>!t.hasAttribute("hidden")))}setFocus(t,e){if(void 0!==this.menuItems)for(;t>=0&&t<this.menuItems.length;){const i=this.menuItems[t];if(this.isFocusableElement(i)){this.focusIndex>-1&&this.menuItems.length>=this.focusIndex-1&&this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=t,i.setAttribute("tabindex","0"),i.focus();break}t+=e}}}se([f],Tn.prototype,"items",void 0);const On=(t,e)=>W`
777
777
  <template class="${t=>t.readOnly?"readonly":""}">
778
778
  <label
779
779
  part="label"
780
780
  for="control"
781
781
  class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
782
782
  >
783
- <slot ${Xt("defaultSlottedNodes")}></slot>
783
+ <slot ${Yt("defaultSlottedNodes")}></slot>
784
784
  </label>
785
785
  <div class="root" part="root">
786
- ${te(0,e)}
786
+ ${Jt(0,e)}
787
787
  <input
788
788
  class="control"
789
789
  part="control"
@@ -825,9 +825,9 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
825
825
  aria-owns="${t=>t.ariaOwns}"
826
826
  aria-relevant="${t=>t.ariaRelevant}"
827
827
  aria-roledescription="${t=>t.ariaRoledescription}"
828
- ${Pt("control")}
828
+ ${Lt("control")}
829
829
  />
830
- ${zt((t=>!t.hideStep&&!t.readOnly&&!t.disabled),K`
830
+ ${Ht((t=>!t.hideStep&&!t.readOnly&&!t.disabled),W`
831
831
  <div class="controls" part="controls">
832
832
  <div class="step-up" part="step-up" @click="${t=>t.stepUp()}">
833
833
  <slot name="step-up-glyph">
@@ -845,10 +845,10 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
845
845
  </div>
846
846
  </div>
847
847
  `)}
848
- ${Jt(0,e)}
848
+ ${Zt(0,e)}
849
849
  </div>
850
850
  </template>
851
- `;class Rn extends ei{}class An extends(ds(Rn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const Dn={email:"email",password:"password",tel:"tel",text:"text",url:"url"};class Fn extends An{constructor(){super(...arguments),this.type=Dn.text}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&c.queueUpdate((()=>{this.focus()}))}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}oe([lt({attribute:"readonly",mode:"boolean"})],Fn.prototype,"readOnly",void 0),oe([lt({mode:"boolean"})],Fn.prototype,"autofocus",void 0),oe([lt],Fn.prototype,"placeholder",void 0),oe([lt],Fn.prototype,"type",void 0),oe([lt],Fn.prototype,"list",void 0),oe([lt({converter:rt})],Fn.prototype,"maxlength",void 0),oe([lt({converter:rt})],Fn.prototype,"minlength",void 0),oe([lt],Fn.prototype,"pattern",void 0),oe([lt({converter:rt})],Fn.prototype,"size",void 0),oe([lt({mode:"boolean"})],Fn.prototype,"spellcheck",void 0),oe([f],Fn.prototype,"defaultSlottedNodes",void 0);class Ln{}oi(Ln,Vi),oi(Fn,Zt,Ln);class Pn extends ei{}class Mn extends(ds(Pn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Vn extends Mn{constructor(){super(...arguments),this.hideStep=!1,this.step=1,this.isUserInput=!1}maxChanged(t,e){this.max=Math.max(e,this.min??e);const i=Math.min(this.min,this.max);void 0!==this.min&&this.min!==i&&(this.min=i),this.value=this.getValidValue(this.value)}minChanged(t,e){this.min=Math.min(e,this.max??e);const i=Math.max(this.min,this.max);void 0!==this.max&&this.max!==i&&(this.max=i),this.value=this.getValidValue(this.value)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(t){this.value=t.toString()}valueChanged(t,e){this.value=this.getValidValue(e),e===this.value&&(this.control&&!this.isUserInput&&this.syncValueToInnerControl(),super.valueChanged(t,this.value),void 0===t||this.isUserInput||(this.$emit("input"),this.$emit("change")),this.isUserInput=!1)}validate(){super.validate(this.control)}limitPrecision(t){return parseFloat(t.toPrecision(15))}getValidValue(t){let e=this.limitPrecision(parseFloat(t));return isNaN(e)?"":(void 0!==this.max&&(e=Math.min(e,this.limitPrecision(this.max))),void 0!==this.min&&(e=Math.max(e,this.limitPrecision(this.min))),e.toString())}stepUp(){const t=parseFloat(this.value),e=isNaN(t)?this.min>0?this.min:this.max<0?this.max:this.min?0:this.step:t+this.step;this.value=e.toString()}stepDown(){const t=parseFloat(this.value),e=isNaN(t)?this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step:t-this.step;this.value=e.toString()}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","number"),this.validate(),this.syncValueToInnerControl(),this.autofocus&&c.queueUpdate((()=>{this.focus()}))}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.control.value=this.sanitizeInput(this.control.value),this.isUserInput=!0,this.syncValueFromInnerControl()}handleChange(){this.$emit("change")}handleKeyDown(t){switch(t.key){case xi:return this.stepUp(),!1;case bi:return this.stepDown(),!1}return!0}handleBlur(){this.syncValueToInnerControl()}sanitizeInput(t){return t.replace(/[^0-9\-+e.]/g,"")}syncValueFromInnerControl(){this.value=this.control.value}syncValueToInnerControl(){this.control.value=this.value}}oe([lt({attribute:"readonly",mode:"boolean"})],Vn.prototype,"readOnly",void 0),oe([lt({mode:"boolean"})],Vn.prototype,"autofocus",void 0),oe([lt({attribute:"hide-step",mode:"boolean"})],Vn.prototype,"hideStep",void 0),oe([lt],Vn.prototype,"placeholder",void 0),oe([lt],Vn.prototype,"list",void 0),oe([lt({converter:rt})],Vn.prototype,"maxlength",void 0),oe([lt({converter:rt})],Vn.prototype,"minlength",void 0),oe([lt({converter:rt})],Vn.prototype,"size",void 0),oe([lt({converter:rt})],Vn.prototype,"step",void 0),oe([lt({converter:rt})],Vn.prototype,"max",void 0),oe([lt({converter:rt})],Vn.prototype,"min",void 0),oe([f],Vn.prototype,"defaultSlottedNodes",void 0),oi(Vn,Zt,Ln);const Hn=(t,e)=>K`
851
+ `;class Sn extends ti{}class Rn extends(hs(Sn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const Dn={email:"email",password:"password",tel:"tel",text:"text",url:"url"};class An extends Rn{constructor(){super(...arguments),this.type=Dn.text}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&c.queueUpdate((()=>{this.focus()}))}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}se([at({attribute:"readonly",mode:"boolean"})],An.prototype,"readOnly",void 0),se([at({mode:"boolean"})],An.prototype,"autofocus",void 0),se([at],An.prototype,"placeholder",void 0),se([at],An.prototype,"type",void 0),se([at],An.prototype,"list",void 0),se([at({converter:nt})],An.prototype,"maxlength",void 0),se([at({converter:nt})],An.prototype,"minlength",void 0),se([at],An.prototype,"pattern",void 0),se([at({converter:nt})],An.prototype,"size",void 0),se([at({mode:"boolean"})],An.prototype,"spellcheck",void 0),se([f],An.prototype,"defaultSlottedNodes",void 0);class Fn{}si(Fn,Mi),si(An,Qt,Fn);class Ln extends ti{}class Pn extends(hs(Ln)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Mn extends Pn{constructor(){super(...arguments),this.hideStep=!1,this.step=1,this.isUserInput=!1}maxChanged(t,e){this.max=Math.max(e,this.min??e);const i=Math.min(this.min,this.max);void 0!==this.min&&this.min!==i&&(this.min=i),this.value=this.getValidValue(this.value)}minChanged(t,e){this.min=Math.min(e,this.max??e);const i=Math.max(this.min,this.max);void 0!==this.max&&this.max!==i&&(this.max=i),this.value=this.getValidValue(this.value)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(t){this.value=t.toString()}valueChanged(t,e){this.value=this.getValidValue(e),e===this.value&&(this.control&&!this.isUserInput&&this.syncValueToInnerControl(),super.valueChanged(t,this.value),void 0===t||this.isUserInput||(this.$emit("input"),this.$emit("change")),this.isUserInput=!1)}validate(){super.validate(this.control)}limitPrecision(t){return parseFloat(t.toPrecision(15))}getValidValue(t){let e=this.limitPrecision(parseFloat(t));return isNaN(e)?"":(void 0!==this.max&&(e=Math.min(e,this.limitPrecision(this.max))),void 0!==this.min&&(e=Math.max(e,this.limitPrecision(this.min))),e.toString())}stepUp(){const t=parseFloat(this.value),e=isNaN(t)?this.min>0?this.min:this.max<0?this.max:this.min?0:this.step:t+this.step;this.value=e.toString()}stepDown(){const t=parseFloat(this.value),e=isNaN(t)?this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step:t-this.step;this.value=e.toString()}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","number"),this.validate(),this.syncValueToInnerControl(),this.autofocus&&c.queueUpdate((()=>{this.focus()}))}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.control.value=this.sanitizeInput(this.control.value),this.isUserInput=!0,this.syncValueFromInnerControl()}handleChange(){this.$emit("change")}handleKeyDown(t){switch(t.key){case Ci:return this.stepUp(),!1;case gi:return this.stepDown(),!1}return!0}handleBlur(){this.syncValueToInnerControl()}sanitizeInput(t){return t.replace(/[^0-9\-+e.]/g,"")}syncValueFromInnerControl(){this.value=this.control.value}syncValueToInnerControl(){this.control.value=this.value}}se([at({attribute:"readonly",mode:"boolean"})],Mn.prototype,"readOnly",void 0),se([at({mode:"boolean"})],Mn.prototype,"autofocus",void 0),se([at({attribute:"hide-step",mode:"boolean"})],Mn.prototype,"hideStep",void 0),se([at],Mn.prototype,"placeholder",void 0),se([at],Mn.prototype,"list",void 0),se([at({converter:nt})],Mn.prototype,"maxlength",void 0),se([at({converter:nt})],Mn.prototype,"minlength",void 0),se([at({converter:nt})],Mn.prototype,"size",void 0),se([at({converter:nt})],Mn.prototype,"step",void 0),se([at({converter:nt})],Mn.prototype,"max",void 0),se([at({converter:nt})],Mn.prototype,"min",void 0),se([f],Mn.prototype,"defaultSlottedNodes",void 0),si(Mn,Qt,Fn);const Vn=(t,e)=>W`
852
852
  <template
853
853
  role="progressbar"
854
854
  aria-valuenow="${t=>t.value}"
@@ -856,7 +856,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
856
856
  aria-valuemax="${t=>t.max}"
857
857
  class="${t=>t.paused?"paused":""}"
858
858
  >
859
- ${zt((t=>"number"==typeof t.value),K`
859
+ ${Ht((t=>"number"==typeof t.value),W`
860
860
  <svg
861
861
  class="progress"
862
862
  part="progress"
@@ -879,13 +879,13 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
879
879
  r="7px"
880
880
  ></circle>
881
881
  </svg>
882
- `,K`
882
+ `,W`
883
883
  <slot name="indeterminate" slot="indeterminate">
884
884
  ${e.indeterminateIndicator||""}
885
885
  </slot>
886
886
  `)}
887
887
  </template>
888
- `;class zn extends ei{constructor(){super(...arguments),this.percentComplete=0}valueChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}minChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}maxChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}connectedCallback(){super.connectedCallback(),this.updatePercentComplete()}updatePercentComplete(){const t="number"==typeof this.min?this.min:0,e="number"==typeof this.max?this.max:100,i="number"==typeof this.value?this.value:0,s=e-t;this.percentComplete=0===s?0:Math.fround((i-t)/s*100)}}oe([lt({converter:rt})],zn.prototype,"value",void 0),oe([lt({converter:rt})],zn.prototype,"min",void 0),oe([lt({converter:rt})],zn.prototype,"max",void 0),oe([lt({mode:"boolean"})],zn.prototype,"paused",void 0),oe([f],zn.prototype,"percentComplete",void 0);const Nn=(t,e)=>K`
888
+ `;class Hn extends ti{constructor(){super(...arguments),this.percentComplete=0}valueChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}minChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}maxChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}connectedCallback(){super.connectedCallback(),this.updatePercentComplete()}updatePercentComplete(){const t="number"==typeof this.min?this.min:0,e="number"==typeof this.max?this.max:100,i="number"==typeof this.value?this.value:0,s=e-t;this.percentComplete=0===s?0:Math.fround((i-t)/s*100)}}se([at({converter:nt})],Hn.prototype,"value",void 0),se([at({converter:nt})],Hn.prototype,"min",void 0),se([at({converter:nt})],Hn.prototype,"max",void 0),se([at({mode:"boolean"})],Hn.prototype,"paused",void 0),se([f],Hn.prototype,"percentComplete",void 0);const zn=(t,e)=>W`
889
889
  <template
890
890
  role="progressbar"
891
891
  aria-valuenow="${t=>t.value}"
@@ -893,7 +893,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
893
893
  aria-valuemax="${t=>t.max}"
894
894
  class="${t=>t.paused?"paused":""}"
895
895
  >
896
- ${zt((t=>"number"==typeof t.value),K`
896
+ ${Ht((t=>"number"==typeof t.value),W`
897
897
  <div class="progress" part="progress" slot="determinate">
898
898
  <div
899
899
  class="determinate"
@@ -901,7 +901,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
901
901
  style="width: ${t=>t.percentComplete}%"
902
902
  ></div>
903
903
  </div>
904
- `,K`
904
+ `,W`
905
905
  <div class="progress" part="progress" slot="indeterminate">
906
906
  <slot class="indeterminate" name="indeterminate">
907
907
  ${e.indeterminateIndicator1||""}
@@ -910,7 +910,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
910
910
  </div>
911
911
  `)}
912
912
  </template>
913
- `,Bn=(t,e)=>K`
913
+ `,Nn=(t,e)=>W`
914
914
  <template
915
915
  role="radiogroup"
916
916
  aria-disabled="${t=>t.disabled}"
@@ -921,15 +921,15 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
921
921
  >
922
922
  <slot name="label"></slot>
923
923
  <div
924
- class="positioning-region ${t=>t.orientation===ai?"horizontal":"vertical"}"
924
+ class="positioning-region ${t=>t.orientation===ri?"horizontal":"vertical"}"
925
925
  part="positioning-region"
926
926
  >
927
927
  <slot
928
- ${Xt({property:"slottedRadioButtons",filter:Wt("[role=radio]")})}
928
+ ${Yt({property:"slottedRadioButtons",filter:jt("[role=radio]")})}
929
929
  ></slot>
930
930
  </div>
931
931
  </template>
932
- `;class qn extends ei{constructor(){super(...arguments),this.orientation=ai,this.radioChangeHandler=t=>{const e=t.target;e.checked&&(this.slottedRadioButtons.forEach((t=>{t!==e&&(t.checked=!1,this.isInsideFoundationToolbar||t.setAttribute("tabindex","-1"))})),this.selectedRadio=e,this.value=e.value,e.setAttribute("tabindex","0"),this.focusedRadio=e),t.stopPropagation()},this.moveToRadioByIndex=(t,e)=>{const i=t[e];this.isInsideToolbar||(i.setAttribute("tabindex","0"),i.readOnly?this.slottedRadioButtons.forEach((t=>{t!==i&&t.setAttribute("tabindex","-1")})):(i.checked=!0,this.selectedRadio=i)),this.focusedRadio=i,i.focus()},this.moveRightOffGroup=()=>{this.nextElementSibling?.focus()},this.moveLeftOffGroup=()=>{this.previousElementSibling?.focus()},this.focusOutHandler=t=>{const e=this.slottedRadioButtons,i=t.target,s=null!==i?e.indexOf(i):0,o=this.focusedRadio?e.indexOf(this.focusedRadio):-1;return(0===o&&s===o||o===e.length-1&&o===s)&&(this.selectedRadio?(this.focusedRadio=this.selectedRadio,this.isInsideFoundationToolbar||(this.selectedRadio.setAttribute("tabindex","0"),e.forEach((t=>{t!==this.selectedRadio&&t.setAttribute("tabindex","-1")})))):(this.focusedRadio=e[0],this.focusedRadio.setAttribute("tabindex","0"),e.forEach((t=>{t!==this.focusedRadio&&t.setAttribute("tabindex","-1")})))),!0},this.clickHandler=t=>{const e=t.target;if(e){const t=this.slottedRadioButtons;e.checked||0===t.indexOf(e)?(e.setAttribute("tabindex","0"),this.selectedRadio=e):(e.setAttribute("tabindex","-1"),this.selectedRadio=null),this.focusedRadio=e}t.preventDefault()},this.shouldMoveOffGroupToTheRight=(t,e,i)=>t===e.length&&this.isInsideToolbar&&i===Ci,this.shouldMoveOffGroupToTheLeft=(t,e)=>(this.focusedRadio?t.indexOf(this.focusedRadio)-1:0)<0&&this.isInsideToolbar&&e===yi,this.checkFocusedRadio=()=>{null===this.focusedRadio||this.focusedRadio.readOnly||this.focusedRadio.checked||(this.focusedRadio.checked=!0,this.focusedRadio.setAttribute("tabindex","0"),this.focusedRadio.focus(),this.selectedRadio=this.focusedRadio)},this.moveRight=t=>{const e=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?e.indexOf(this.focusedRadio)+1:1,this.shouldMoveOffGroupToTheRight(i,e,t.key))this.moveRightOffGroup();else for(i===e.length&&(i=0);i<e.length&&e.length>1;){if(!e[i].disabled){this.moveToRadioByIndex(e,i);break}if(this.focusedRadio&&i===e.indexOf(this.focusedRadio))break;if(i+1>=e.length){if(this.isInsideToolbar)break;i=0}else i+=1}},this.moveLeft=t=>{const e=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?e.indexOf(this.focusedRadio)-1:0,i=i<0?e.length-1:i,this.shouldMoveOffGroupToTheLeft(e,t.key))this.moveLeftOffGroup();else for(;i>=0&&e.length>1;){if(!e[i].disabled){this.moveToRadioByIndex(e,i);break}if(this.focusedRadio&&i===e.indexOf(this.focusedRadio))break;i-1<0?i=e.length-1:i-=1}},this.keydownHandler=t=>{const e=t.key;if(e in Oi&&this.isInsideFoundationToolbar)return!0;switch(e){case wi:this.checkFocusedRadio();break;case Ci:case bi:this.direction===Si.ltr?this.moveRight(t):this.moveLeft(t);break;case yi:case xi:this.direction===Si.ltr?this.moveLeft(t):this.moveRight(t);break;default:return!0}}}readOnlyChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((t=>{this.readOnly?t.readOnly=!0:t.readOnly=!1}))}disabledChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((t=>{this.disabled?t.disabled=!0:t.disabled=!1}))}nameChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((t=>{t.setAttribute("name",this.name)}))}valueChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((t=>{t.value===this.value&&(t.checked=!0,this.selectedRadio=t)})),this.$emit("change")}slottedRadioButtonsChanged(t,e){this.slottedRadioButtons&&this.slottedRadioButtons.length>0&&this.setupRadioButtons()}get parentToolbar(){return this.closest('[role="toolbar"]')}get isInsideToolbar(){return this.parentToolbar??!1}get isInsideFoundationToolbar(){return!!this.parentToolbar?.$fastController}connectedCallback(){super.connectedCallback(),this.direction=Bi(this),this.setupRadioButtons()}disconnectedCallback(){this.slottedRadioButtons.forEach((t=>{t.removeEventListener("change",this.radioChangeHandler)}))}setupRadioButtons(){const t=this.slottedRadioButtons.filter((t=>t.hasAttribute("checked"))),e=t?t.length:0;if(e>1){t[e-1].checked=!0}let i=!1;if(this.slottedRadioButtons.forEach((t=>{void 0!==this.name&&t.setAttribute("name",this.name),this.disabled&&(t.disabled=!0),this.readOnly&&(t.readOnly=!0),this.value&&this.value===t.value?(this.selectedRadio=t,this.focusedRadio=t,t.checked=!0,t.setAttribute("tabindex","0"),i=!0):(this.isInsideFoundationToolbar||t.setAttribute("tabindex","-1"),t.checked=!1),t.addEventListener("change",this.radioChangeHandler)})),void 0===this.value&&this.slottedRadioButtons.length>0){const t=this.slottedRadioButtons.filter((t=>t.hasAttribute("checked"))),e=null!==t?t.length:0;if(e>0&&!i){const i=t[e-1];i.checked=!0,this.focusedRadio=i,i.setAttribute("tabindex","0")}else this.slottedRadioButtons[0].setAttribute("tabindex","0"),this.focusedRadio=this.slottedRadioButtons[0]}}}oe([lt({attribute:"readonly",mode:"boolean"})],qn.prototype,"readOnly",void 0),oe([lt({attribute:"disabled",mode:"boolean"})],qn.prototype,"disabled",void 0),oe([lt],qn.prototype,"name",void 0),oe([lt],qn.prototype,"value",void 0),oe([lt],qn.prototype,"orientation",void 0),oe([f],qn.prototype,"childItems",void 0),oe([f],qn.prototype,"slottedRadioButtons",void 0);const Un=(t,e)=>K`
932
+ `;class Bn extends ti{constructor(){super(...arguments),this.orientation=ri,this.radioChangeHandler=t=>{const e=t.target;e.checked&&(this.slottedRadioButtons.forEach((t=>{t!==e&&(t.checked=!1,this.isInsideFoundationToolbar||t.setAttribute("tabindex","-1"))})),this.selectedRadio=e,this.value=e.value,e.setAttribute("tabindex","0"),this.focusedRadio=e),t.stopPropagation()},this.moveToRadioByIndex=(t,e)=>{const i=t[e];this.isInsideToolbar||(i.setAttribute("tabindex","0"),i.readOnly?this.slottedRadioButtons.forEach((t=>{t!==i&&t.setAttribute("tabindex","-1")})):(i.checked=!0,this.selectedRadio=i)),this.focusedRadio=i,i.focus()},this.moveRightOffGroup=()=>{this.nextElementSibling?.focus()},this.moveLeftOffGroup=()=>{this.previousElementSibling?.focus()},this.focusOutHandler=t=>{const e=this.slottedRadioButtons,i=t.target,s=null!==i?e.indexOf(i):0,o=this.focusedRadio?e.indexOf(this.focusedRadio):-1;return(0===o&&s===o||o===e.length-1&&o===s)&&(this.selectedRadio?(this.focusedRadio=this.selectedRadio,this.isInsideFoundationToolbar||(this.selectedRadio.setAttribute("tabindex","0"),e.forEach((t=>{t!==this.selectedRadio&&t.setAttribute("tabindex","-1")})))):(this.focusedRadio=e[0],this.focusedRadio.setAttribute("tabindex","0"),e.forEach((t=>{t!==this.focusedRadio&&t.setAttribute("tabindex","-1")})))),!0},this.clickHandler=t=>{const e=t.target;if(e){const t=this.slottedRadioButtons;e.checked||0===t.indexOf(e)?(e.setAttribute("tabindex","0"),this.selectedRadio=e):(e.setAttribute("tabindex","-1"),this.selectedRadio=null),this.focusedRadio=e}t.preventDefault()},this.shouldMoveOffGroupToTheRight=(t,e,i)=>t===e.length&&this.isInsideToolbar&&i===yi,this.shouldMoveOffGroupToTheLeft=(t,e)=>(this.focusedRadio?t.indexOf(this.focusedRadio)-1:0)<0&&this.isInsideToolbar&&e===bi,this.checkFocusedRadio=()=>{null===this.focusedRadio||this.focusedRadio.readOnly||this.focusedRadio.checked||(this.focusedRadio.checked=!0,this.focusedRadio.setAttribute("tabindex","0"),this.focusedRadio.focus(),this.selectedRadio=this.focusedRadio)},this.moveRight=t=>{const e=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?e.indexOf(this.focusedRadio)+1:1,this.shouldMoveOffGroupToTheRight(i,e,t.key))this.moveRightOffGroup();else for(i===e.length&&(i=0);i<e.length&&e.length>1;){if(!e[i].disabled){this.moveToRadioByIndex(e,i);break}if(this.focusedRadio&&i===e.indexOf(this.focusedRadio))break;if(i+1>=e.length){if(this.isInsideToolbar)break;i=0}else i+=1}},this.moveLeft=t=>{const e=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?e.indexOf(this.focusedRadio)-1:0,i=i<0?e.length-1:i,this.shouldMoveOffGroupToTheLeft(e,t.key))this.moveLeftOffGroup();else for(;i>=0&&e.length>1;){if(!e[i].disabled){this.moveToRadioByIndex(e,i);break}if(this.focusedRadio&&i===e.indexOf(this.focusedRadio))break;i-1<0?i=e.length-1:i-=1}},this.keydownHandler=t=>{const e=t.key;if(e in Ti&&this.isInsideFoundationToolbar)return!0;switch(e){case xi:this.checkFocusedRadio();break;case yi:case gi:this.direction===Oi.ltr?this.moveRight(t):this.moveLeft(t);break;case bi:case Ci:this.direction===Oi.ltr?this.moveLeft(t):this.moveRight(t);break;default:return!0}}}readOnlyChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((t=>{this.readOnly?t.readOnly=!0:t.readOnly=!1}))}disabledChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((t=>{this.disabled?t.disabled=!0:t.disabled=!1}))}nameChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((t=>{t.setAttribute("name",this.name)}))}valueChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((t=>{t.value===this.value&&(t.checked=!0,this.selectedRadio=t)})),this.$emit("change")}slottedRadioButtonsChanged(t,e){this.slottedRadioButtons&&this.slottedRadioButtons.length>0&&this.setupRadioButtons()}get parentToolbar(){return this.closest('[role="toolbar"]')}get isInsideToolbar(){return this.parentToolbar??!1}get isInsideFoundationToolbar(){return!!this.parentToolbar?.$fastController}connectedCallback(){super.connectedCallback(),this.direction=Ni(this),this.setupRadioButtons()}disconnectedCallback(){this.slottedRadioButtons.forEach((t=>{t.removeEventListener("change",this.radioChangeHandler)}))}setupRadioButtons(){const t=this.slottedRadioButtons.filter((t=>t.hasAttribute("checked"))),e=t?t.length:0;if(e>1){t[e-1].checked=!0}let i=!1;if(this.slottedRadioButtons.forEach((t=>{void 0!==this.name&&t.setAttribute("name",this.name),this.disabled&&(t.disabled=!0),this.readOnly&&(t.readOnly=!0),this.value&&this.value===t.value?(this.selectedRadio=t,this.focusedRadio=t,t.checked=!0,t.setAttribute("tabindex","0"),i=!0):(this.isInsideFoundationToolbar||t.setAttribute("tabindex","-1"),t.checked=!1),t.addEventListener("change",this.radioChangeHandler)})),void 0===this.value&&this.slottedRadioButtons.length>0){const t=this.slottedRadioButtons.filter((t=>t.hasAttribute("checked"))),e=null!==t?t.length:0;if(e>0&&!i){const i=t[e-1];i.checked=!0,this.focusedRadio=i,i.setAttribute("tabindex","0")}else this.slottedRadioButtons[0].setAttribute("tabindex","0"),this.focusedRadio=this.slottedRadioButtons[0]}}}se([at({attribute:"readonly",mode:"boolean"})],Bn.prototype,"readOnly",void 0),se([at({attribute:"disabled",mode:"boolean"})],Bn.prototype,"disabled",void 0),se([at],Bn.prototype,"name",void 0),se([at],Bn.prototype,"value",void 0),se([at],Bn.prototype,"orientation",void 0),se([f],Bn.prototype,"childItems",void 0),se([f],Bn.prototype,"slottedRadioButtons",void 0);const qn=(t,e)=>W`
933
933
  <template
934
934
  role="radio"
935
935
  class="${t=>t.checked?"checked":""} ${t=>t.readOnly?"readonly":""}"
@@ -949,33 +949,33 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
949
949
  part="label"
950
950
  class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
951
951
  >
952
- <slot ${Xt("defaultSlottedNodes")}></slot>
952
+ <slot ${Yt("defaultSlottedNodes")}></slot>
953
953
  </label>
954
954
  </template>
955
- `;class _n extends ei{}class jn extends(cs(_n)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Wn extends jn{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}defaultCheckedChanged(){this.$fastController.isConnected&&!this.dirtyChecked&&(this.isInsideRadioGroup()||(this.checked=this.defaultChecked??!1,this.dirtyChecked=!1))}constructor(){super(),this.initialValue="on",this.keypressHandler=t=>{if(t.key!==Ei)return!0;this.checked||this.readOnly||(this.checked=!0)},this.proxy.setAttribute("type","radio")}connectedCallback(){super.connectedCallback(),this.validate(),"radiogroup"!==this.parentElement?.getAttribute("role")&&null===this.getAttribute("tabindex")&&(this.disabled||this.setAttribute("tabindex","0")),this.checkedAttribute&&(this.dirtyChecked||this.isInsideRadioGroup()||(this.checked=this.defaultChecked??!1,this.dirtyChecked=!1))}isInsideRadioGroup(){return null!==this.closest("[role=radiogroup]")}clickHandler(t){this.disabled||this.readOnly||this.checked||(this.checked=!0)}}oe([lt({attribute:"readonly",mode:"boolean"})],Wn.prototype,"readOnly",void 0),oe([f],Wn.prototype,"name",void 0),oe([f],Wn.prototype,"defaultSlottedNodes",void 0);class Kn extends ei{constructor(){super(...arguments),this.framesPerSecond=60,this.updatingItems=!1,this.speed=600,this.easing="ease-in-out",this.flippersHiddenFromAT=!1,this.scrolling=!1,this.resizeDetector=null}get frameTime(){return 1e3/this.framesPerSecond}scrollingChanged(t,e){if(this.scrollContainer){const t=1==this.scrolling?"scrollstart":"scrollend";this.$emit(t,this.scrollContainer.scrollLeft)}}get isRtl(){return this.scrollItems.length>1&&this.scrollItems[0].offsetLeft>this.scrollItems[1].offsetLeft}connectedCallback(){super.connectedCallback(),this.initializeResizeDetector()}disconnectedCallback(){this.disconnectResizeDetector(),super.disconnectedCallback()}scrollItemsChanged(t,e){e&&!this.updatingItems&&c.queueUpdate((()=>this.setStops()))}disconnectResizeDetector(){this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.resized.bind(this)),this.resizeDetector.observe(this)}updateScrollStops(){this.updatingItems=!0;const t=this.scrollItems.reduce(((t,e)=>e instanceof HTMLSlotElement?t.concat(e.assignedElements()):(t.push(e),t)),[]);this.scrollItems=t,this.updatingItems=!1}setStops(){this.updateScrollStops();const{scrollContainer:t}=this,{scrollLeft:e}=t,{width:i,left:s}=t.getBoundingClientRect();this.width=i;let o=0,n=this.scrollItems.map(((t,i)=>{const{left:n,width:r}=t.getBoundingClientRect(),a=Math.round(n+e-s),l=Math.round(a+r);return this.isRtl?-l:(o=l,0===i?0:a)})).concat(o);n=this.fixScrollMisalign(n),n.sort(((t,e)=>Math.abs(t)-Math.abs(e))),this.scrollStops=n,this.setFlippers()}validateStops(t=!0){const e=()=>!!this.scrollStops.find((t=>t>0));return!e()&&t&&this.setStops(),e()}fixScrollMisalign(t){if(this.isRtl&&t.some((t=>t>0))){t.sort(((t,e)=>e-t));const e=t[0];t=t.map((t=>t-e))}return t}setFlippers(){const t=this.scrollContainer.scrollLeft;if(this.previousFlipperContainer?.classList.toggle("disabled",0===t),this.scrollStops){const e=Math.abs(this.scrollStops[this.scrollStops.length-1]);this.nextFlipperContainer?.classList.toggle("disabled",this.validateStops(!1)&&Math.abs(t)+this.width>=e)}}scrollInView(t,e=0,i){if("number"!=typeof t&&t&&(t=this.scrollItems.findIndex((e=>e===t||e.contains(t)))),void 0!==t){i=i??e;const{scrollContainer:s,scrollStops:o,scrollItems:n}=this,{scrollLeft:r}=this.scrollContainer,{width:a}=s.getBoundingClientRect(),l=o[t],{width:h}=n[t].getBoundingClientRect(),d=l+h,c=r+e>l;if(c||r+a-i<d){const t=[...o].sort(((t,e)=>c?e-t:t-e)).find((t=>c?t+e<l:t+a-(i??0)>d))??0;this.scrollToPosition(t)}}}keyupHandler(t){switch(t.key){case"ArrowLeft":this.scrollToPrevious();break;case"ArrowRight":this.scrollToNext()}}scrollToPrevious(){this.validateStops();const t=this.scrollContainer.scrollLeft,e=this.scrollStops.findIndex(((e,i)=>e>=t&&(this.isRtl||i===this.scrollStops.length-1||this.scrollStops[i+1]>t))),i=Math.abs(this.scrollStops[e+1]);let s=this.scrollStops.findIndex((t=>Math.abs(t)+this.width>i));(s>=e||-1===s)&&(s=e>0?e-1:0),this.scrollToPosition(this.scrollStops[s],t)}scrollToNext(){this.validateStops();const t=this.scrollContainer.scrollLeft,e=this.scrollStops.findIndex((e=>Math.abs(e)>=Math.abs(t))),i=this.scrollStops.findIndex((e=>Math.abs(t)+this.width<=Math.abs(e)));let s=e;i>e+2?s=i-2:e<this.scrollStops.length-2&&(s=e+1),this.scrollToPosition(this.scrollStops[s],t)}scrollToPosition(t,e=this.scrollContainer.scrollLeft){if(this.scrolling)return;this.scrolling=!0;const i=this.duration??Math.abs(t-e)/this.speed+"s";this.content.style.setProperty("transition-duration",i);const s=parseFloat(getComputedStyle(this.content).getPropertyValue("transition-duration")),o=e=>{e&&e.target!==e.currentTarget||(this.content.style.setProperty("transition-duration","0s"),this.content.style.removeProperty("transform"),this.scrollContainer.style.setProperty("scroll-behavior","auto"),this.scrollContainer.scrollLeft=t,this.setFlippers(),this.content.removeEventListener("transitionend",o),this.scrolling=!1)};if(0===s)return void o();this.content.addEventListener("transitionend",o);const n=this.scrollContainer.scrollWidth-this.scrollContainer.clientWidth;let r=this.scrollContainer.scrollLeft-Math.min(t,n);this.isRtl&&(r=this.scrollContainer.scrollLeft+Math.min(Math.abs(t),n)),this.content.style.setProperty("transition-property","transform"),this.content.style.setProperty("transition-timing-function",this.easing),this.content.style.setProperty("transform",`translateX(${r}px)`)}resized(){this.resizeTimeout&&(this.resizeTimeout=clearTimeout(this.resizeTimeout)),this.resizeTimeout=setTimeout((()=>{this.width=this.scrollContainer.offsetWidth,this.setFlippers()}),this.frameTime)}scrolled(){this.scrollTimeout&&(this.scrollTimeout=clearTimeout(this.scrollTimeout)),this.scrollTimeout=setTimeout((()=>{this.setFlippers()}),this.frameTime)}}oe([lt({converter:rt})],Kn.prototype,"speed",void 0),oe([lt],Kn.prototype,"duration",void 0),oe([lt],Kn.prototype,"easing",void 0),oe([lt({attribute:"flippers-hidden-from-at",converter:nt})],Kn.prototype,"flippersHiddenFromAT",void 0),oe([f],Kn.prototype,"scrolling",void 0),oe([f],Kn.prototype,"scrollItems",void 0),oe([lt({attribute:"view"})],Kn.prototype,"view",void 0);const Yn=(t,e)=>K`
955
+ `;class Un extends ti{}class _n extends(ds(Un)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class jn extends _n{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}defaultCheckedChanged(){this.$fastController.isConnected&&!this.dirtyChecked&&(this.isInsideRadioGroup()||(this.checked=this.defaultChecked??!1,this.dirtyChecked=!1))}constructor(){super(),this.initialValue="on",this.keypressHandler=t=>{if(t.key!==ki)return!0;this.checked||this.readOnly||(this.checked=!0)},this.proxy.setAttribute("type","radio")}connectedCallback(){super.connectedCallback(),this.validate(),"radiogroup"!==this.parentElement?.getAttribute("role")&&null===this.getAttribute("tabindex")&&(this.disabled||this.setAttribute("tabindex","0")),this.checkedAttribute&&(this.dirtyChecked||this.isInsideRadioGroup()||(this.checked=this.defaultChecked??!1,this.dirtyChecked=!1))}isInsideRadioGroup(){return null!==this.closest("[role=radiogroup]")}clickHandler(t){this.disabled||this.readOnly||this.checked||(this.checked=!0)}}se([at({attribute:"readonly",mode:"boolean"})],jn.prototype,"readOnly",void 0),se([f],jn.prototype,"name",void 0),se([f],jn.prototype,"defaultSlottedNodes",void 0);class Wn extends ti{constructor(){super(...arguments),this.framesPerSecond=60,this.updatingItems=!1,this.speed=600,this.easing="ease-in-out",this.flippersHiddenFromAT=!1,this.scrolling=!1,this.resizeDetector=null}get frameTime(){return 1e3/this.framesPerSecond}scrollingChanged(t,e){if(this.scrollContainer){const t=1==this.scrolling?"scrollstart":"scrollend";this.$emit(t,this.scrollContainer.scrollLeft)}}get isRtl(){return this.scrollItems.length>1&&this.scrollItems[0].offsetLeft>this.scrollItems[1].offsetLeft}connectedCallback(){super.connectedCallback(),this.initializeResizeDetector()}disconnectedCallback(){this.disconnectResizeDetector(),super.disconnectedCallback()}scrollItemsChanged(t,e){e&&!this.updatingItems&&c.queueUpdate((()=>this.setStops()))}disconnectResizeDetector(){this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.resized.bind(this)),this.resizeDetector.observe(this)}updateScrollStops(){this.updatingItems=!0;const t=this.scrollItems.reduce(((t,e)=>e instanceof HTMLSlotElement?t.concat(e.assignedElements()):(t.push(e),t)),[]);this.scrollItems=t,this.updatingItems=!1}setStops(){this.updateScrollStops();const{scrollContainer:t}=this,{scrollLeft:e}=t,{width:i,left:s}=t.getBoundingClientRect();this.width=i;let o=0,n=this.scrollItems.map(((t,i)=>{const{left:n,width:r}=t.getBoundingClientRect(),a=Math.round(n+e-s),l=Math.round(a+r);return this.isRtl?-l:(o=l,0===i?0:a)})).concat(o);n=this.fixScrollMisalign(n),n.sort(((t,e)=>Math.abs(t)-Math.abs(e))),this.scrollStops=n,this.setFlippers()}validateStops(t=!0){const e=()=>!!this.scrollStops.find((t=>t>0));return!e()&&t&&this.setStops(),e()}fixScrollMisalign(t){if(this.isRtl&&t.some((t=>t>0))){t.sort(((t,e)=>e-t));const e=t[0];t=t.map((t=>t-e))}return t}setFlippers(){const t=this.scrollContainer.scrollLeft;if(this.previousFlipperContainer?.classList.toggle("disabled",0===t),this.scrollStops){const e=Math.abs(this.scrollStops[this.scrollStops.length-1]);this.nextFlipperContainer?.classList.toggle("disabled",this.validateStops(!1)&&Math.abs(t)+this.width>=e)}}scrollInView(t,e=0,i){if("number"!=typeof t&&t&&(t=this.scrollItems.findIndex((e=>e===t||e.contains(t)))),void 0!==t){i=i??e;const{scrollContainer:s,scrollStops:o,scrollItems:n}=this,{scrollLeft:r}=this.scrollContainer,{width:a}=s.getBoundingClientRect(),l=o[t],{width:h}=n[t].getBoundingClientRect(),d=l+h,c=r+e>l;if(c||r+a-i<d){const t=[...o].sort(((t,e)=>c?e-t:t-e)).find((t=>c?t+e<l:t+a-(i??0)>d))??0;this.scrollToPosition(t)}}}keyupHandler(t){switch(t.key){case"ArrowLeft":this.scrollToPrevious();break;case"ArrowRight":this.scrollToNext()}}scrollToPrevious(){this.validateStops();const t=this.scrollContainer.scrollLeft,e=this.scrollStops.findIndex(((e,i)=>e>=t&&(this.isRtl||i===this.scrollStops.length-1||this.scrollStops[i+1]>t))),i=Math.abs(this.scrollStops[e+1]);let s=this.scrollStops.findIndex((t=>Math.abs(t)+this.width>i));(s>=e||-1===s)&&(s=e>0?e-1:0),this.scrollToPosition(this.scrollStops[s],t)}scrollToNext(){this.validateStops();const t=this.scrollContainer.scrollLeft,e=this.scrollStops.findIndex((e=>Math.abs(e)>=Math.abs(t))),i=this.scrollStops.findIndex((e=>Math.abs(t)+this.width<=Math.abs(e)));let s=e;i>e+2?s=i-2:e<this.scrollStops.length-2&&(s=e+1),this.scrollToPosition(this.scrollStops[s],t)}scrollToPosition(t,e=this.scrollContainer.scrollLeft){if(this.scrolling)return;this.scrolling=!0;const i=this.duration??Math.abs(t-e)/this.speed+"s";this.content.style.setProperty("transition-duration",i);const s=parseFloat(getComputedStyle(this.content).getPropertyValue("transition-duration")),o=e=>{e&&e.target!==e.currentTarget||(this.content.style.setProperty("transition-duration","0s"),this.content.style.removeProperty("transform"),this.scrollContainer.style.setProperty("scroll-behavior","auto"),this.scrollContainer.scrollLeft=t,this.setFlippers(),this.content.removeEventListener("transitionend",o),this.scrolling=!1)};if(0===s)return void o();this.content.addEventListener("transitionend",o);const n=this.scrollContainer.scrollWidth-this.scrollContainer.clientWidth;let r=this.scrollContainer.scrollLeft-Math.min(t,n);this.isRtl&&(r=this.scrollContainer.scrollLeft+Math.min(Math.abs(t),n)),this.content.style.setProperty("transition-property","transform"),this.content.style.setProperty("transition-timing-function",this.easing),this.content.style.setProperty("transform",`translateX(${r}px)`)}resized(){this.resizeTimeout&&(this.resizeTimeout=clearTimeout(this.resizeTimeout)),this.resizeTimeout=setTimeout((()=>{this.width=this.scrollContainer.offsetWidth,this.setFlippers()}),this.frameTime)}scrolled(){this.scrollTimeout&&(this.scrollTimeout=clearTimeout(this.scrollTimeout)),this.scrollTimeout=setTimeout((()=>{this.setFlippers()}),this.frameTime)}}se([at({converter:nt})],Wn.prototype,"speed",void 0),se([at],Wn.prototype,"duration",void 0),se([at],Wn.prototype,"easing",void 0),se([at({attribute:"flippers-hidden-from-at",converter:ot})],Wn.prototype,"flippersHiddenFromAT",void 0),se([f],Wn.prototype,"scrolling",void 0),se([f],Wn.prototype,"scrollItems",void 0),se([at({attribute:"view"})],Wn.prototype,"view",void 0);const Kn=(t,e)=>W`
956
956
  <template
957
957
  class="horizontal-scroll"
958
958
  @keyup="${(t,e)=>t.keyupHandler(e.event)}"
959
959
  >
960
- ${te(0,e)}
960
+ ${Jt(0,e)}
961
961
  <div class="scroll-area" part="scroll-area">
962
962
  <div
963
963
  class="scroll-view"
964
964
  part="scroll-view"
965
965
  @scroll="${t=>t.scrolled()}"
966
- ${Pt("scrollContainer")}
966
+ ${Lt("scrollContainer")}
967
967
  >
968
- <div class="content-container" part="content-container" ${Pt("content")}>
968
+ <div class="content-container" part="content-container" ${Lt("content")}>
969
969
  <slot
970
- ${Xt({property:"scrollItems",filter:Wt()})}
970
+ ${Yt({property:"scrollItems",filter:jt()})}
971
971
  ></slot>
972
972
  </div>
973
973
  </div>
974
- ${zt((t=>"mobile"!==t.view),K`
974
+ ${Ht((t=>"mobile"!==t.view),W`
975
975
  <div
976
976
  class="scroll scroll-prev"
977
977
  part="scroll-prev"
978
- ${Pt("previousFlipperContainer")}
978
+ ${Lt("previousFlipperContainer")}
979
979
  >
980
980
  <div class="scroll-action" part="scroll-action-previous">
981
981
  <slot name="previous-flipper">
@@ -986,7 +986,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
986
986
  <div
987
987
  class="scroll scroll-next"
988
988
  part="scroll-next"
989
- ${Pt("nextFlipperContainer")}
989
+ ${Lt("nextFlipperContainer")}
990
990
  >
991
991
  <div class="scroll-action" part="scroll-action-next">
992
992
  <slot name="next-flipper">
@@ -996,9 +996,9 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
996
996
  </div>
997
997
  `)}
998
998
  </div>
999
- ${Jt(0,e)}
999
+ ${Zt(0,e)}
1000
1000
  </template>
1001
- `;function Xn(t,e,i){return t.nodeType!==Node.TEXT_NODE||"string"==typeof t.nodeValue&&!!t.nodeValue.trim().length}const Gn=(t,e)=>K`
1001
+ `;function Yn(t,e,i){return t.nodeType!==Node.TEXT_NODE||"string"==typeof t.nodeValue&&!!t.nodeValue.trim().length}const Xn=(t,e)=>W`
1002
1002
  <template
1003
1003
  class="
1004
1004
  ${t=>t.readOnly?"readonly":""}
@@ -1010,11 +1010,11 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1010
1010
  class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
1011
1011
  >
1012
1012
  <slot
1013
- ${Xt({property:"defaultSlottedNodes",filter:Xn})}
1013
+ ${Yt({property:"defaultSlottedNodes",filter:Yn})}
1014
1014
  ></slot>
1015
1015
  </label>
1016
- <div class="root" part="root" ${Pt("root")}>
1017
- ${te(0,e)}
1016
+ <div class="root" part="root" ${Lt("root")}>
1017
+ ${Jt(0,e)}
1018
1018
  <div class="input-wrapper" part="input-wrapper">
1019
1019
  <input
1020
1020
  class="control"
@@ -1054,7 +1054,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1054
1054
  aria-owns="${t=>t.ariaOwns}"
1055
1055
  aria-relevant="${t=>t.ariaRelevant}"
1056
1056
  aria-roledescription="${t=>t.ariaRoledescription}"
1057
- ${Pt("control")}
1057
+ ${Lt("control")}
1058
1058
  />
1059
1059
  <slot name="close-button">
1060
1060
  <button
@@ -1078,10 +1078,10 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1078
1078
  </button>
1079
1079
  </slot>
1080
1080
  </div>
1081
- ${Jt(0,e)}
1081
+ ${Zt(0,e)}
1082
1082
  </div>
1083
1083
  </template>
1084
- `;class Qn extends ei{}class Zn extends(ds(Qn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Jn extends Zn{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.validate(),this.autofocus&&c.queueUpdate((()=>{this.focus()}))}validate(){super.validate(this.control)}handleTextInput(){this.value=this.control.value}handleClearInput(){this.value="",this.control.focus(),this.handleChange()}handleChange(){this.$emit("change")}}oe([lt({attribute:"readonly",mode:"boolean"})],Jn.prototype,"readOnly",void 0),oe([lt({mode:"boolean"})],Jn.prototype,"autofocus",void 0),oe([lt],Jn.prototype,"placeholder",void 0),oe([lt],Jn.prototype,"list",void 0),oe([lt({converter:rt})],Jn.prototype,"maxlength",void 0),oe([lt({converter:rt})],Jn.prototype,"minlength",void 0),oe([lt],Jn.prototype,"pattern",void 0),oe([lt({converter:rt})],Jn.prototype,"size",void 0),oe([lt({mode:"boolean"})],Jn.prototype,"spellcheck",void 0),oe([f],Jn.prototype,"defaultSlottedNodes",void 0);class tr{}oi(tr,Vi),oi(Jn,Zt,tr);class er extends rn{}class ir extends(ds(er)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}class sr extends ir{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=Fi("listbox-"),this.maxHeight=0}openChanged(t,e){if(this.collapsible){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void c.queueUpdate((()=>this.focus()));this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||"number"==typeof this.size)}get value(){return m.track(this,"value"),this._value}set value(t){const e=`${this._value}`;if(this._options?.length){const e=this._options.findIndex((e=>e.value===t)),i=this._options[this.selectedIndex]?.value??null,s=this._options[e]?.value??null;-1!==e&&i===s||(t="",this.selectedIndex=e),t=this.firstSelectedOption?.value??t}e!==t&&(this._value=t,super.valueChanged(e,t),m.notify(this,"value"),this.updateDisplayValue())}updateValue(t){this.$fastController.isConnected&&(this.value=this.firstSelectedOption?.value??""),t&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(t,e){super.selectedIndexChanged(t,e),this.updateValue()}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}setPositioning(){const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom;this.position=this.forcedPosition?this.positionAttribute:t.top>e?Ks.above:Ks.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Ks.above?~~t.top:~~e}get displayValue(){return m.track(this,"displayValue"),this.firstSelectedOption?.text??""}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}clickHandler(t){if(!this.disabled){if(this.open){const e=t.target.closest("option,[role=option]");if(e&&e.disabled)return}return super.clickHandler(t),this.open=this.collapsible&&!this.open,this.open||this.indexWhenOpened===this.selectedIndex||this.updateValue(!0),!0}}focusoutHandler(t){if(super.focusoutHandler(t),!this.open)return!0;const e=t.relatedTarget;this.isSameNode(e)?this.focus():this.options?.includes(e)||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(t,e){super.handleChange(t,e),"value"===e&&this.updateValue()}slottedOptionsChanged(t,e){this.options.forEach((t=>{m.getNotifier(t).unsubscribe(this,"value")})),super.slottedOptionsChanged(t,e),this.options.forEach((t=>{m.getNotifier(t).subscribe(this,"value")})),this.setProxyOptions(),this.updateValue()}mousedownHandler(t){return t.offsetX>=0&&t.offsetX<=this.listbox?.scrollWidth?super.mousedownHandler(t):this.collapsible}multipleChanged(t,e){super.multipleChanged(t,e),this.proxy&&(this.proxy.multiple=e)}selectedOptionsChanged(t,e){super.selectedOptionsChanged(t,e),this.options?.forEach(((t,e)=>{const i=this.proxy?.options.item(e);i&&(i.selected=t.selected)}))}setDefaultSelectedOption(){const t=this.options??Array.from(this.children).filter(js.slottedOptionFilter),e=t?.findIndex((t=>t.hasAttribute("selected")||t.selected||t.value===this.value));this.selectedIndex=-1===e?0:e}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach((t=>{const e=t.proxy||(t instanceof HTMLOptionElement?t.cloneNode():null);e&&this.proxy.options.add(e)})))}keydownHandler(t){super.keydownHandler(t);const e=t.key||t.key.charCodeAt(0);switch(e){case Ei:t.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break;case Ii:case ki:t.preventDefault();break;case wi:t.preventDefault(),this.open=!this.open;break;case $i:this.collapsible&&this.open&&(t.preventDefault(),this.open=!1);break;case Ti:return this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(e===bi||e===xi)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(t,e){super.sizeChanged(t,e),this.proxy&&(this.proxy.size=e)}updateDisplayValue(){this.collapsible&&m.notify(this,"displayValue")}}oe([lt({attribute:"open",mode:"boolean"})],sr.prototype,"open",void 0),oe([v],sr.prototype,"collapsible",null),oe([f],sr.prototype,"control",void 0),oe([lt({attribute:"position"})],sr.prototype,"positionAttribute",void 0),oe([f],sr.prototype,"position",void 0),oe([f],sr.prototype,"maxHeight",void 0);class or{}oe([f],or.prototype,"ariaControls",void 0),oi(or,Ws),oi(sr,Zt,or);const nr=(t,e)=>K`
1084
+ `;class Gn extends ti{}class Qn extends(hs(Gn)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Zn extends Qn{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.validate(),this.autofocus&&c.queueUpdate((()=>{this.focus()}))}validate(){super.validate(this.control)}handleTextInput(){this.value=this.control.value}handleClearInput(){this.value="",this.control.focus(),this.handleChange()}handleChange(){this.$emit("change")}}se([at({attribute:"readonly",mode:"boolean"})],Zn.prototype,"readOnly",void 0),se([at({mode:"boolean"})],Zn.prototype,"autofocus",void 0),se([at],Zn.prototype,"placeholder",void 0),se([at],Zn.prototype,"list",void 0),se([at({converter:nt})],Zn.prototype,"maxlength",void 0),se([at({converter:nt})],Zn.prototype,"minlength",void 0),se([at],Zn.prototype,"pattern",void 0),se([at({converter:nt})],Zn.prototype,"size",void 0),se([at({mode:"boolean"})],Zn.prototype,"spellcheck",void 0),se([f],Zn.prototype,"defaultSlottedNodes",void 0);class Jn{}si(Jn,Mi),si(Zn,Qt,Jn);class tr extends nn{}class er extends(hs(tr)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}class ir extends er{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=Ai("listbox-"),this.maxHeight=0}openChanged(t,e){if(this.collapsible){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void c.queueUpdate((()=>this.focus()));this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||"number"==typeof this.size)}get value(){return m.track(this,"value"),this._value}set value(t){const e=`${this._value}`;if(this._options?.length){const e=this._options.findIndex((e=>e.value===t)),i=this._options[this.selectedIndex]?.value??null,s=this._options[e]?.value??null;-1!==e&&i===s||(t="",this.selectedIndex=e),t=this.firstSelectedOption?.value??t}e!==t&&(this._value=t,super.valueChanged(e,t),m.notify(this,"value"),this.updateDisplayValue())}updateValue(t){this.$fastController.isConnected&&(this.value=this.firstSelectedOption?.value??""),t&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(t,e){super.selectedIndexChanged(t,e),this.updateValue()}positionChanged(t,e){this.positionAttribute=e,this.setPositioning()}setPositioning(){const t=this.getBoundingClientRect(),e=window.innerHeight-t.bottom;this.position=this.forcedPosition?this.positionAttribute:t.top>e?Ws.above:Ws.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Ws.above?~~t.top:~~e}get displayValue(){return m.track(this,"displayValue"),this.firstSelectedOption?.text??""}disabledChanged(t,e){super.disabledChanged&&super.disabledChanged(t,e),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}clickHandler(t){if(!this.disabled){if(this.open){const e=t.target.closest("option,[role=option]");if(e&&e.disabled)return}return super.clickHandler(t),this.open=this.collapsible&&!this.open,this.open||this.indexWhenOpened===this.selectedIndex||this.updateValue(!0),!0}}focusoutHandler(t){if(super.focusoutHandler(t),!this.open)return!0;const e=t.relatedTarget;this.isSameNode(e)?this.focus():this.options?.includes(e)||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(t,e){super.handleChange(t,e),"value"===e&&this.updateValue()}slottedOptionsChanged(t,e){this.options.forEach((t=>{m.getNotifier(t).unsubscribe(this,"value")})),super.slottedOptionsChanged(t,e),this.options.forEach((t=>{m.getNotifier(t).subscribe(this,"value")})),this.setProxyOptions(),this.updateValue()}mousedownHandler(t){return t.offsetX>=0&&t.offsetX<=this.listbox?.scrollWidth?super.mousedownHandler(t):this.collapsible}multipleChanged(t,e){super.multipleChanged(t,e),this.proxy&&(this.proxy.multiple=e)}selectedOptionsChanged(t,e){super.selectedOptionsChanged(t,e),this.options?.forEach(((t,e)=>{const i=this.proxy?.options.item(e);i&&(i.selected=t.selected)}))}setDefaultSelectedOption(){const t=this.options??Array.from(this.children).filter(_s.slottedOptionFilter),e=t?.findIndex((t=>t.hasAttribute("selected")||t.selected||t.value===this.value));this.selectedIndex=-1===e?0:e}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach((t=>{const e=t.proxy||(t instanceof HTMLOptionElement?t.cloneNode():null);e&&this.proxy.options.add(e)})))}keydownHandler(t){super.keydownHandler(t);const e=t.key||t.key.charCodeAt(0);switch(e){case ki:t.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break;case $i:case Ii:t.preventDefault();break;case xi:t.preventDefault(),this.open=!this.open;break;case wi:this.collapsible&&this.open&&(t.preventDefault(),this.open=!1);break;case Ei:return this.collapsible&&this.open&&(t.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(e===gi||e===Ci)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(t,e){super.sizeChanged(t,e),this.proxy&&(this.proxy.size=e)}updateDisplayValue(){this.collapsible&&m.notify(this,"displayValue")}}se([at({attribute:"open",mode:"boolean"})],ir.prototype,"open",void 0),se([v],ir.prototype,"collapsible",null),se([f],ir.prototype,"control",void 0),se([at({attribute:"position"})],ir.prototype,"positionAttribute",void 0),se([f],ir.prototype,"position",void 0),se([f],ir.prototype,"maxHeight",void 0);class sr{}se([f],sr.prototype,"ariaControls",void 0),si(sr,js),si(ir,Qt,sr);const or=(t,e)=>W`
1085
1085
  <template
1086
1086
  class="${t=>[t.collapsible&&"collapsible",t.collapsible&&t.open&&"open",t.disabled&&"disabled",t.collapsible&&t.position].filter(Boolean).join(" ")}"
1087
1087
  aria-activedescendant="${t=>t.ariaActiveDescendant}"
@@ -1099,14 +1099,14 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1099
1099
  @keydown="${(t,e)=>t.keydownHandler(e.event)}"
1100
1100
  @mousedown="${(t,e)=>t.mousedownHandler(e.event)}"
1101
1101
  >
1102
- ${zt((t=>t.collapsible),K`
1102
+ ${Ht((t=>t.collapsible),W`
1103
1103
  <div
1104
1104
  class="control"
1105
1105
  part="control"
1106
1106
  ?disabled="${t=>t.disabled}"
1107
- ${Pt("control")}
1107
+ ${Lt("control")}
1108
1108
  >
1109
- ${te(0,e)}
1109
+ ${Jt(0,e)}
1110
1110
  <slot name="button-container">
1111
1111
  <div class="selected-value" part="selected-value">
1112
1112
  <slot name="selected-value">${t=>t.displayValue}</slot>
@@ -1117,7 +1117,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1117
1117
  </slot>
1118
1118
  </div>
1119
1119
  </slot>
1120
- ${Jt(0,e)}
1120
+ ${Zt(0,e)}
1121
1121
  </div>
1122
1122
  `)}
1123
1123
  <div
@@ -1127,20 +1127,20 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1127
1127
  role="listbox"
1128
1128
  ?disabled="${t=>t.disabled}"
1129
1129
  ?hidden="${t=>!!t.collapsible&&!t.open}"
1130
- ${Pt("listbox")}
1130
+ ${Lt("listbox")}
1131
1131
  >
1132
1132
  <slot
1133
- ${Xt({filter:js.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
1133
+ ${Yt({filter:_s.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
1134
1134
  ></slot>
1135
1135
  </div>
1136
1136
  </template>
1137
- `,rr=(t,e)=>K`
1137
+ `,nr=(t,e)=>W`
1138
1138
  <template
1139
1139
  class="${t=>"circle"===t.shape?"circle":"rect"}"
1140
1140
  pattern="${t=>t.pattern}"
1141
1141
  ?shimmer="${t=>t.shimmer}"
1142
1142
  >
1143
- ${zt((t=>!0===t.shimmer),K`
1143
+ ${Ht((t=>!0===t.shimmer),W`
1144
1144
  <span class="shimmer"></span>
1145
1145
  `)}
1146
1146
  <object type="image/svg+xml" data="${t=>t.pattern}" role="presentation">
@@ -1148,15 +1148,15 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1148
1148
  </object>
1149
1149
  <slot></slot>
1150
1150
  </template>
1151
- `;class ar extends ei{constructor(){super(...arguments),this.shape="rect"}}oe([lt],ar.prototype,"fill",void 0),oe([lt],ar.prototype,"shape",void 0),oe([lt],ar.prototype,"pattern",void 0),oe([lt({mode:"boolean"})],ar.prototype,"shimmer",void 0);const lr=(t,e)=>K`
1151
+ `;class rr extends ti{constructor(){super(...arguments),this.shape="rect"}}se([at],rr.prototype,"fill",void 0),se([at],rr.prototype,"shape",void 0),se([at],rr.prototype,"pattern",void 0),se([at({mode:"boolean"})],rr.prototype,"shimmer",void 0);const ar=(t,e)=>W`
1152
1152
  <template
1153
1153
  aria-disabled="${t=>t.disabled}"
1154
- class="${t=>t.sliderOrientation||ai}
1154
+ class="${t=>t.sliderOrientation||ri}
1155
1155
  ${t=>t.disabled?"disabled":""}"
1156
1156
  >
1157
- <div ${Pt("root")} part="root" class="root" style="${t=>t.positionStyle}">
1157
+ <div ${Lt("root")} part="root" class="root" style="${t=>t.positionStyle}">
1158
1158
  <div class="container">
1159
- ${zt((t=>!t.hideMark),K`
1159
+ ${Ht((t=>!t.hideMark),W`
1160
1160
  <div class="mark"></div>
1161
1161
  `)}
1162
1162
  <div class="label">
@@ -1165,11 +1165,11 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1165
1165
  </div>
1166
1166
  </div>
1167
1167
  </template>
1168
- `;function hr(t,e,i,s){let o=Ri(0,1,(t-e)/(i-e));return s===Si.rtl&&(o=1-o),o}const dr={min:0,max:0,direction:Si.ltr,orientation:ai};class cr extends ei{constructor(){super(...arguments),this.hideMark=!1,this.sliderDirection=Si.ltr,this.getSliderConfiguration=()=>{if(this.isSliderConfig(this.parentNode)){const t=this.parentNode,{min:e,max:i,direction:s,orientation:o,disabled:n}=t;void 0!==n&&(this.disabled=n),this.sliderDirection=s||Si.ltr,this.sliderOrientation=o||ai,this.sliderMaxPosition=i,this.sliderMinPosition=e}else this.sliderDirection=dr.direction||Si.ltr,this.sliderOrientation=dr.orientation,this.sliderMaxPosition=dr.max,this.sliderMinPosition=dr.min},this.positionAsStyle=()=>{const t=this.sliderDirection?this.sliderDirection:Si.ltr,e=hr(Number(this.position),Number(this.sliderMinPosition),Number(this.sliderMaxPosition));let i=Math.round(100*(1-e)),s=Math.round(100*e);return Number.isNaN(s)&&Number.isNaN(i)&&(i=50,s=50),this.sliderOrientation===ai?t===Si.rtl?`right: ${s}%; left: ${i}%;`:`left: ${s}%; right: ${i}%;`:`top: ${s}%; bottom: ${i}%;`}}positionChanged(){this.positionStyle=this.positionAsStyle()}sliderOrientationChanged(){}connectedCallback(){super.connectedCallback(),this.getSliderConfiguration(),this.positionStyle=this.positionAsStyle(),this.notifier=m.getNotifier(this.parentNode),this.notifier.subscribe(this,"orientation"),this.notifier.subscribe(this,"direction"),this.notifier.subscribe(this,"max"),this.notifier.subscribe(this,"min")}disconnectedCallback(){super.disconnectedCallback(),this.notifier.unsubscribe(this,"orientation"),this.notifier.unsubscribe(this,"direction"),this.notifier.unsubscribe(this,"max"),this.notifier.unsubscribe(this,"min")}handleChange(t,e){switch(e){case"direction":this.sliderDirection=t.direction;break;case"orientation":this.sliderOrientation=t.orientation;break;case"max":this.sliderMaxPosition=t.max;break;case"min":this.sliderMinPosition=t.min}this.positionStyle=this.positionAsStyle()}isSliderConfig(t){return void 0!==t.max&&void 0!==t.min}}oe([f],cr.prototype,"positionStyle",void 0),oe([lt],cr.prototype,"position",void 0),oe([lt({attribute:"hide-mark",mode:"boolean"})],cr.prototype,"hideMark",void 0),oe([lt({attribute:"disabled",mode:"boolean"})],cr.prototype,"disabled",void 0),oe([f],cr.prototype,"sliderOrientation",void 0),oe([f],cr.prototype,"sliderMinPosition",void 0),oe([f],cr.prototype,"sliderMaxPosition",void 0),oe([f],cr.prototype,"sliderDirection",void 0);const ur=(t,e)=>K`
1168
+ `;function lr(t,e,i,s){let o=Si(0,1,(t-e)/(i-e));return s===Oi.rtl&&(o=1-o),o}const hr={min:0,max:0,direction:Oi.ltr,orientation:ri};class dr extends ti{constructor(){super(...arguments),this.hideMark=!1,this.sliderDirection=Oi.ltr,this.getSliderConfiguration=()=>{if(this.isSliderConfig(this.parentNode)){const t=this.parentNode,{min:e,max:i,direction:s,orientation:o,disabled:n}=t;void 0!==n&&(this.disabled=n),this.sliderDirection=s||Oi.ltr,this.sliderOrientation=o||ri,this.sliderMaxPosition=i,this.sliderMinPosition=e}else this.sliderDirection=hr.direction||Oi.ltr,this.sliderOrientation=hr.orientation,this.sliderMaxPosition=hr.max,this.sliderMinPosition=hr.min},this.positionAsStyle=()=>{const t=this.sliderDirection?this.sliderDirection:Oi.ltr,e=lr(Number(this.position),Number(this.sliderMinPosition),Number(this.sliderMaxPosition));let i=Math.round(100*(1-e)),s=Math.round(100*e);return Number.isNaN(s)&&Number.isNaN(i)&&(i=50,s=50),this.sliderOrientation===ri?t===Oi.rtl?`right: ${s}%; left: ${i}%;`:`left: ${s}%; right: ${i}%;`:`top: ${s}%; bottom: ${i}%;`}}positionChanged(){this.positionStyle=this.positionAsStyle()}sliderOrientationChanged(){}connectedCallback(){super.connectedCallback(),this.getSliderConfiguration(),this.positionStyle=this.positionAsStyle(),this.notifier=m.getNotifier(this.parentNode),this.notifier.subscribe(this,"orientation"),this.notifier.subscribe(this,"direction"),this.notifier.subscribe(this,"max"),this.notifier.subscribe(this,"min")}disconnectedCallback(){super.disconnectedCallback(),this.notifier.unsubscribe(this,"orientation"),this.notifier.unsubscribe(this,"direction"),this.notifier.unsubscribe(this,"max"),this.notifier.unsubscribe(this,"min")}handleChange(t,e){switch(e){case"direction":this.sliderDirection=t.direction;break;case"orientation":this.sliderOrientation=t.orientation;break;case"max":this.sliderMaxPosition=t.max;break;case"min":this.sliderMinPosition=t.min}this.positionStyle=this.positionAsStyle()}isSliderConfig(t){return void 0!==t.max&&void 0!==t.min}}se([f],dr.prototype,"positionStyle",void 0),se([at],dr.prototype,"position",void 0),se([at({attribute:"hide-mark",mode:"boolean"})],dr.prototype,"hideMark",void 0),se([at({attribute:"disabled",mode:"boolean"})],dr.prototype,"disabled",void 0),se([f],dr.prototype,"sliderOrientation",void 0),se([f],dr.prototype,"sliderMinPosition",void 0),se([f],dr.prototype,"sliderMaxPosition",void 0),se([f],dr.prototype,"sliderDirection",void 0);const cr=(t,e)=>W`
1169
1169
  <template
1170
1170
  role="slider"
1171
1171
  class="${t=>t.readOnly?"readonly":""}
1172
- ${t=>t.orientation||ai}"
1172
+ ${t=>t.orientation||ri}"
1173
1173
  tabindex="${t=>t.disabled?null:0}"
1174
1174
  aria-valuetext="${t=>t.valueTextFormatter(t.value)}"
1175
1175
  aria-valuenow="${t=>t.value}"
@@ -1181,7 +1181,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1181
1181
  class="${t=>t.orientation}"
1182
1182
  >
1183
1183
  <div part="positioning-region" class="positioning-region">
1184
- <div ${Pt("track")} part="track-container" class="track">
1184
+ <div ${Lt("track")} part="track-container" class="track">
1185
1185
  <slot name="track"></slot>
1186
1186
  <div part="track-start" class="track-start" style="${t=>t.position}">
1187
1187
  <slot name="track-start"></slot>
@@ -1189,7 +1189,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1189
1189
  </div>
1190
1190
  <slot></slot>
1191
1191
  <div
1192
- ${Pt("thumb")}
1192
+ ${Lt("thumb")}
1193
1193
  part="thumb-container"
1194
1194
  class="thumb-container"
1195
1195
  style="${t=>t.position}"
@@ -1198,7 +1198,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1198
1198
  </div>
1199
1199
  </div>
1200
1200
  </template>
1201
- `;class pr extends ei{}class mr extends(ds(pr)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const fr={singleValue:"single-value"};class vr extends mr{constructor(){super(...arguments),this.direction=Si.ltr,this.isDragging=!1,this.trackWidth=0,this.trackMinWidth=0,this.trackHeight=0,this.trackLeft=0,this.trackMinHeight=0,this.valueTextFormatter=()=>null,this.min=0,this.max=10,this.step=1,this.orientation=ai,this.mode=fr.singleValue,this.keypressHandler=t=>{if(!this.readOnly)if(t.key===Ii)t.preventDefault(),this.value=`${this.min}`;else if(t.key===ki)t.preventDefault(),this.value=`${this.max}`;else if(!t.shiftKey)switch(t.key){case Ci:case xi:t.preventDefault(),this.increment();break;case yi:case bi:t.preventDefault(),this.decrement()}},this.setupTrackConstraints=()=>{const t=this.track.getBoundingClientRect();this.trackWidth=this.track.clientWidth,this.trackMinWidth=this.track.clientLeft,this.trackHeight=t.bottom,this.trackMinHeight=t.top,this.trackLeft=this.getBoundingClientRect().left,0===this.trackWidth&&(this.trackWidth=1)},this.setupListeners=(t=!1)=>{const e=(t?"remove":"add")+"EventListener";this[e]("keydown",this.keypressHandler),this[e]("mousedown",this.handleMouseDown),this.thumb[e]("mousedown",this.handleThumbMouseDown,{passive:!0}),this.thumb[e]("touchstart",this.handleThumbMouseDown,{passive:!0}),t&&(this.handleMouseDown(null),this.handleThumbMouseDown(null))},this.initialValue="",this.handleThumbMouseDown=t=>{if(t){if(this.readOnly||this.disabled||t.defaultPrevented)return;t.target.focus()}const e=(null!==t?"add":"remove")+"EventListener";window[e]("mouseup",this.handleWindowMouseUp),window[e]("mousemove",this.handleMouseMove,{passive:!0}),window[e]("touchmove",this.handleMouseMove,{passive:!0}),window[e]("touchend",this.handleWindowMouseUp),this.isDragging=null!==t},this.handleMouseMove=t=>{if(this.readOnly||this.disabled||t.defaultPrevented)return;const e=window.TouchEvent&&t instanceof TouchEvent?t.touches[0]:t,i=this.orientation===ai?e.pageX-document.documentElement.scrollLeft-this.trackLeft:e.pageY-document.documentElement.scrollTop;this.value=`${this.calculateNewValue(i)}`},this.calculateNewValue=t=>{const e=hr(t,this.orientation===ai?this.trackMinWidth:this.trackMinHeight,this.orientation===ai?this.trackWidth:this.trackHeight,this.direction),i=(this.max-this.min)*e+this.min;return this.convertToConstrainedValue(i)},this.handleWindowMouseUp=t=>{this.stopDragging()},this.stopDragging=()=>{this.isDragging=!1,this.handleMouseDown(null),this.handleThumbMouseDown(null)},this.handleMouseDown=t=>{const e=(null!==t?"add":"remove")+"EventListener";if((null===t||!this.disabled&&!this.readOnly)&&(window[e]("mouseup",this.handleWindowMouseUp),window.document[e]("mouseleave",this.handleWindowMouseUp),window[e]("mousemove",this.handleMouseMove),t)){t.preventDefault(),this.setupTrackConstraints(),t.target.focus();const e=this.orientation===ai?t.pageX-document.documentElement.scrollLeft-this.trackLeft:t.pageY-document.documentElement.scrollTop;this.value=`${this.calculateNewValue(e)}`}},this.convertToConstrainedValue=t=>{isNaN(t)&&(t=this.min);let e=t-this.min;const i=e-Math.round(e/this.step)*(this.stepMultiplier*this.step)/this.stepMultiplier;return e=i>=Number(this.step)/2?e-i+Number(this.step):e-i,e+this.min}}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(t){this.value=t.toString()}valueChanged(t,e){super.valueChanged(t,e),this.$fastController.isConnected&&this.setThumbPositionForOrientation(this.direction),this.$emit("change")}minChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.min=`${this.min}`),this.validate()}maxChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.max=`${this.max}`),this.validate()}stepChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.step=`${this.step}`),this.updateStepMultiplier(),this.validate()}orientationChanged(){this.$fastController.isConnected&&this.setThumbPositionForOrientation(this.direction)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","range"),this.direction=Bi(this),this.updateStepMultiplier(),this.setupTrackConstraints(),this.setupListeners(),this.setupDefaultValue(),this.setThumbPositionForOrientation(this.direction)}disconnectedCallback(){this.setupListeners(!0)}increment(){const t=this.direction!==Si.rtl&&this.orientation!==li?Number(this.value)+Number(this.step):Number(this.value)-Number(this.step),e=this.convertToConstrainedValue(t),i=e<Number(this.max)?`${e}`:`${this.max}`;this.value=i}decrement(){const t=this.direction!==Si.rtl&&this.orientation!==li?Number(this.value)-Number(this.step):Number(this.value)+Number(this.step),e=this.convertToConstrainedValue(t),i=e>Number(this.min)?`${e}`:`${this.min}`;this.value=i}setThumbPositionForOrientation(t){const e=100*(1-hr(Number(this.value),Number(this.min),Number(this.max),t));this.orientation===ai?this.position=this.isDragging?`right: ${e}%; transition: none;`:`right: ${e}%; transition: all 0.2s ease;`:this.position=this.isDragging?`bottom: ${e}%; transition: none;`:`bottom: ${e}%; transition: all 0.2s ease;`}updateStepMultiplier(){const t=this.step+"",e=this.step%1?t.length-t.indexOf(".")-1:0;this.stepMultiplier=Math.pow(10,e)}get midpoint(){return`${this.convertToConstrainedValue((this.max+this.min)/2)}`}setupDefaultValue(){if("string"==typeof this.value)if(0===this.value.length)this.initialValue=this.midpoint;else{const t=parseFloat(this.value);!Number.isNaN(t)&&(t<this.min||t>this.max)&&(this.value=this.midpoint)}}}oe([lt({attribute:"readonly",mode:"boolean"})],vr.prototype,"readOnly",void 0),oe([f],vr.prototype,"direction",void 0),oe([f],vr.prototype,"isDragging",void 0),oe([f],vr.prototype,"position",void 0),oe([f],vr.prototype,"trackWidth",void 0),oe([f],vr.prototype,"trackMinWidth",void 0),oe([f],vr.prototype,"trackHeight",void 0),oe([f],vr.prototype,"trackLeft",void 0),oe([f],vr.prototype,"trackMinHeight",void 0),oe([f],vr.prototype,"valueTextFormatter",void 0),oe([lt({converter:rt})],vr.prototype,"min",void 0),oe([lt({converter:rt})],vr.prototype,"max",void 0),oe([lt({converter:rt})],vr.prototype,"step",void 0),oe([lt],vr.prototype,"orientation",void 0),oe([lt],vr.prototype,"mode",void 0);const gr=(t,e)=>K`
1201
+ `;class ur extends ti{}class pr extends(hs(ur)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const mr={singleValue:"single-value"};class fr extends pr{constructor(){super(...arguments),this.direction=Oi.ltr,this.isDragging=!1,this.trackWidth=0,this.trackMinWidth=0,this.trackHeight=0,this.trackLeft=0,this.trackMinHeight=0,this.valueTextFormatter=()=>null,this.min=0,this.max=10,this.step=1,this.orientation=ri,this.mode=mr.singleValue,this.keypressHandler=t=>{if(!this.readOnly)if(t.key===$i)t.preventDefault(),this.value=`${this.min}`;else if(t.key===Ii)t.preventDefault(),this.value=`${this.max}`;else if(!t.shiftKey)switch(t.key){case yi:case Ci:t.preventDefault(),this.increment();break;case bi:case gi:t.preventDefault(),this.decrement()}},this.setupTrackConstraints=()=>{const t=this.track.getBoundingClientRect();this.trackWidth=this.track.clientWidth,this.trackMinWidth=this.track.clientLeft,this.trackHeight=t.bottom,this.trackMinHeight=t.top,this.trackLeft=this.getBoundingClientRect().left,0===this.trackWidth&&(this.trackWidth=1)},this.setupListeners=(t=!1)=>{const e=(t?"remove":"add")+"EventListener";this[e]("keydown",this.keypressHandler),this[e]("mousedown",this.handleMouseDown),this.thumb[e]("mousedown",this.handleThumbMouseDown,{passive:!0}),this.thumb[e]("touchstart",this.handleThumbMouseDown,{passive:!0}),t&&(this.handleMouseDown(null),this.handleThumbMouseDown(null))},this.initialValue="",this.handleThumbMouseDown=t=>{if(t){if(this.readOnly||this.disabled||t.defaultPrevented)return;t.target.focus()}const e=(null!==t?"add":"remove")+"EventListener";window[e]("mouseup",this.handleWindowMouseUp),window[e]("mousemove",this.handleMouseMove,{passive:!0}),window[e]("touchmove",this.handleMouseMove,{passive:!0}),window[e]("touchend",this.handleWindowMouseUp),this.isDragging=null!==t},this.handleMouseMove=t=>{if(this.readOnly||this.disabled||t.defaultPrevented)return;const e=window.TouchEvent&&t instanceof TouchEvent?t.touches[0]:t,i=this.orientation===ri?e.pageX-document.documentElement.scrollLeft-this.trackLeft:e.pageY-document.documentElement.scrollTop;this.value=`${this.calculateNewValue(i)}`},this.calculateNewValue=t=>{const e=lr(t,this.orientation===ri?this.trackMinWidth:this.trackMinHeight,this.orientation===ri?this.trackWidth:this.trackHeight,this.direction),i=(this.max-this.min)*e+this.min;return this.convertToConstrainedValue(i)},this.handleWindowMouseUp=t=>{this.stopDragging()},this.stopDragging=()=>{this.isDragging=!1,this.handleMouseDown(null),this.handleThumbMouseDown(null)},this.handleMouseDown=t=>{const e=(null!==t?"add":"remove")+"EventListener";if((null===t||!this.disabled&&!this.readOnly)&&(window[e]("mouseup",this.handleWindowMouseUp),window.document[e]("mouseleave",this.handleWindowMouseUp),window[e]("mousemove",this.handleMouseMove),t)){t.preventDefault(),this.setupTrackConstraints(),t.target.focus();const e=this.orientation===ri?t.pageX-document.documentElement.scrollLeft-this.trackLeft:t.pageY-document.documentElement.scrollTop;this.value=`${this.calculateNewValue(e)}`}},this.convertToConstrainedValue=t=>{isNaN(t)&&(t=this.min);let e=t-this.min;const i=e-Math.round(e/this.step)*(this.stepMultiplier*this.step)/this.stepMultiplier;return e=i>=Number(this.step)/2?e-i+Number(this.step):e-i,e+this.min}}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(t){this.value=t.toString()}valueChanged(t,e){super.valueChanged(t,e),this.$fastController.isConnected&&this.setThumbPositionForOrientation(this.direction),this.$emit("change")}minChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.min=`${this.min}`),this.validate()}maxChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.max=`${this.max}`),this.validate()}stepChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.step=`${this.step}`),this.updateStepMultiplier(),this.validate()}orientationChanged(){this.$fastController.isConnected&&this.setThumbPositionForOrientation(this.direction)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","range"),this.direction=Ni(this),this.updateStepMultiplier(),this.setupTrackConstraints(),this.setupListeners(),this.setupDefaultValue(),this.setThumbPositionForOrientation(this.direction)}disconnectedCallback(){this.setupListeners(!0)}increment(){const t=this.direction!==Oi.rtl&&this.orientation!==ai?Number(this.value)+Number(this.step):Number(this.value)-Number(this.step),e=this.convertToConstrainedValue(t),i=e<Number(this.max)?`${e}`:`${this.max}`;this.value=i}decrement(){const t=this.direction!==Oi.rtl&&this.orientation!==ai?Number(this.value)-Number(this.step):Number(this.value)+Number(this.step),e=this.convertToConstrainedValue(t),i=e>Number(this.min)?`${e}`:`${this.min}`;this.value=i}setThumbPositionForOrientation(t){const e=100*(1-lr(Number(this.value),Number(this.min),Number(this.max),t));this.orientation===ri?this.position=this.isDragging?`right: ${e}%; transition: none;`:`right: ${e}%; transition: all 0.2s ease;`:this.position=this.isDragging?`bottom: ${e}%; transition: none;`:`bottom: ${e}%; transition: all 0.2s ease;`}updateStepMultiplier(){const t=this.step+"",e=this.step%1?t.length-t.indexOf(".")-1:0;this.stepMultiplier=Math.pow(10,e)}get midpoint(){return`${this.convertToConstrainedValue((this.max+this.min)/2)}`}setupDefaultValue(){if("string"==typeof this.value)if(0===this.value.length)this.initialValue=this.midpoint;else{const t=parseFloat(this.value);!Number.isNaN(t)&&(t<this.min||t>this.max)&&(this.value=this.midpoint)}}}se([at({attribute:"readonly",mode:"boolean"})],fr.prototype,"readOnly",void 0),se([f],fr.prototype,"direction",void 0),se([f],fr.prototype,"isDragging",void 0),se([f],fr.prototype,"position",void 0),se([f],fr.prototype,"trackWidth",void 0),se([f],fr.prototype,"trackMinWidth",void 0),se([f],fr.prototype,"trackHeight",void 0),se([f],fr.prototype,"trackLeft",void 0),se([f],fr.prototype,"trackMinHeight",void 0),se([f],fr.prototype,"valueTextFormatter",void 0),se([at({converter:nt})],fr.prototype,"min",void 0),se([at({converter:nt})],fr.prototype,"max",void 0),se([at({converter:nt})],fr.prototype,"step",void 0),se([at],fr.prototype,"orientation",void 0),se([at],fr.prototype,"mode",void 0);const vr=(t,e)=>W`
1202
1202
  <template
1203
1203
  role="switch"
1204
1204
  aria-checked="${t=>t.checked}"
@@ -1213,7 +1213,7 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1213
1213
  part="label"
1214
1214
  class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
1215
1215
  >
1216
- <slot ${Xt("defaultSlottedNodes")}></slot>
1216
+ <slot ${Yt("defaultSlottedNodes")}></slot>
1217
1217
  </label>
1218
1218
  <div part="switch" class="switch">
1219
1219
  <slot name="switch">${e.switch||""}</slot>
@@ -1227,45 +1227,45 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1227
1227
  </span>
1228
1228
  </span>
1229
1229
  </template>
1230
- `;class br extends ei{}class yr extends(cs(br)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Cr extends yr{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly),this.readOnly?this.classList.add("readonly"):this.classList.remove("readonly")}constructor(){super(),this.initialValue="on",this.keypressHandler=t=>{if(!this.readOnly)switch(t.key){case wi:case Ei:this.checked=!this.checked}},this.clickHandler=t=>{this.disabled||this.readOnly||(this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}checkedChanged(t,e){super.checkedChanged(t,e),this.checked?this.classList.add("checked"):this.classList.remove("checked")}}oe([lt({attribute:"readonly",mode:"boolean"})],Cr.prototype,"readOnly",void 0),oe([f],Cr.prototype,"defaultSlottedNodes",void 0);const xr=(t,e)=>K`
1230
+ `;class gr extends ti{}class br extends(ds(gr)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class yr extends br{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly),this.readOnly?this.classList.add("readonly"):this.classList.remove("readonly")}constructor(){super(),this.initialValue="on",this.keypressHandler=t=>{if(!this.readOnly)switch(t.key){case xi:case ki:this.checked=!this.checked}},this.clickHandler=t=>{this.disabled||this.readOnly||(this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}checkedChanged(t,e){super.checkedChanged(t,e),this.checked?this.classList.add("checked"):this.classList.remove("checked")}}se([at({attribute:"readonly",mode:"boolean"})],yr.prototype,"readOnly",void 0),se([f],yr.prototype,"defaultSlottedNodes",void 0);const Cr=(t,e)=>W`
1231
1231
  <template slot="tabpanel" role="tabpanel">
1232
1232
  <slot></slot>
1233
1233
  </template>
1234
- `;class wr extends ei{}const $r=(t,e)=>K`
1234
+ `;class xr extends ti{}const wr=(t,e)=>W`
1235
1235
  <template slot="tab" role="tab" aria-disabled="${t=>t.disabled}">
1236
1236
  <slot></slot>
1237
1237
  </template>
1238
- `;class Ir extends ei{}oe([lt({mode:"boolean"})],Ir.prototype,"disabled",void 0);const kr=(t,e)=>K`
1238
+ `;class $r extends ti{}se([at({mode:"boolean"})],$r.prototype,"disabled",void 0);const Ir=(t,e)=>W`
1239
1239
  <template class="${t=>t.orientation}">
1240
- ${te(0,e)}
1240
+ ${Jt(0,e)}
1241
1241
  <div class="tablist" part="tablist" role="tablist">
1242
- <slot class="tab" name="tab" part="tab" ${Xt("tabs")}></slot>
1242
+ <slot class="tab" name="tab" part="tab" ${Yt("tabs")}></slot>
1243
1243
 
1244
- ${zt((t=>t.showActiveIndicator),K`
1244
+ ${Ht((t=>t.showActiveIndicator),W`
1245
1245
  <div
1246
- ${Pt("activeIndicatorRef")}
1246
+ ${Lt("activeIndicatorRef")}
1247
1247
  class="activeIndicator"
1248
1248
  part="activeIndicator"
1249
1249
  ></div>
1250
1250
  `)}
1251
1251
  </div>
1252
- ${Jt(0,e)}
1252
+ ${Zt(0,e)}
1253
1253
  <div class="tabpanel" part="tabpanel">
1254
- <slot name="tabpanel" ${Xt("tabpanels")}></slot>
1254
+ <slot name="tabpanel" ${Yt("tabpanels")}></slot>
1255
1255
  </div>
1256
1256
  </template>
1257
- `,Er={vertical:"vertical",horizontal:"horizontal"};class Tr extends ei{constructor(){super(...arguments),this.orientation=Er.horizontal,this.activeindicator=!0,this.showActiveIndicator=!0,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.ticking=!1,this.change=()=>{this.$emit("change",this.activetab)},this.isDisabledElement=t=>"true"===t.getAttribute("aria-disabled"),this.isHiddenElement=t=>t.hasAttribute("hidden"),this.isFocusableElement=t=>!this.isDisabledElement(t)&&!this.isHiddenElement(t),this.setTabs=()=>{const t="gridColumn",e="gridRow",i=this.isHorizontal()?t:e;this.activeTabIndex=this.getActiveIndex(),this.showActiveIndicator=!1,this.tabs.forEach(((s,o)=>{if("tab"===s.slot){const t=this.activeTabIndex===o&&this.isFocusableElement(s);this.activeindicator&&this.isFocusableElement(s)&&(this.showActiveIndicator=!0);const e=this.tabIds[o],i=this.tabpanelIds[o];s.setAttribute("id",e),s.setAttribute("aria-selected",t?"true":"false"),s.setAttribute("aria-controls",i),s.addEventListener("click",this.handleTabClick),s.addEventListener("keydown",this.handleTabKeyDown),s.setAttribute("tabindex",t?"0":"-1"),t&&(this.activetab=s,this.activeid=e)}s.style[t]="",s.style[e]="",s.style[i]=`${o+1}`,this.isHorizontal()?s.classList.remove("vertical"):s.classList.add("vertical")}))},this.setTabPanels=()=>{this.tabpanels.forEach(((t,e)=>{const i=this.tabIds[e],s=this.tabpanelIds[e];t.setAttribute("id",s),t.setAttribute("aria-labelledby",i),this.activeTabIndex!==e?t.setAttribute("hidden",""):t.removeAttribute("hidden")}))},this.handleTabClick=t=>{const e=t.currentTarget;1===e.nodeType&&this.isFocusableElement(e)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(e),this.setComponent())},this.handleTabKeyDown=t=>{if(this.isHorizontal())switch(t.key){case yi:t.preventDefault(),this.adjustBackward(t);break;case Ci:t.preventDefault(),this.adjustForward(t)}else switch(t.key){case xi:t.preventDefault(),this.adjustBackward(t);break;case bi:t.preventDefault(),this.adjustForward(t)}switch(t.key){case Ii:t.preventDefault(),this.adjust(-this.activeTabIndex);break;case ki:t.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1)}},this.adjustForward=t=>{const e=this.tabs;let i=0;for(i=this.activetab?e.indexOf(this.activetab)+1:1,i===e.length&&(i=0);i<e.length&&e.length>1;){if(this.isFocusableElement(e[i])){this.moveToTabByIndex(e,i);break}if(this.activetab&&i===e.indexOf(this.activetab))break;i+1>=e.length?i=0:i+=1}},this.adjustBackward=t=>{const e=this.tabs;let i=0;for(i=this.activetab?e.indexOf(this.activetab)-1:0,i=i<0?e.length-1:i;i>=0&&e.length>1;){if(this.isFocusableElement(e[i])){this.moveToTabByIndex(e,i);break}i-1<0?i=e.length-1:i-=1}},this.moveToTabByIndex=(t,e)=>{const i=t[e];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=e,i.focus(),this.setComponent()}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}activeidChanged(t,e){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.prevActiveTabIndex=this.tabs.findIndex((e=>e.id===t)),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}getTabIds(){return this.tabs.map((t=>t.getAttribute("id")??`tab-${Fi()}`))}getTabPanelIds(){return this.tabpanels.map((t=>t.getAttribute("id")??`panel-${Fi()}`))}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab(),this.change())}isHorizontal(){return this.orientation===Er.horizontal}handleActiveIndicatorPosition(){this.showActiveIndicator&&this.activeindicator&&this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;const t=this.isHorizontal()?"gridColumn":"gridRow",e=this.isHorizontal()?"translateX":"translateY",i=this.isHorizontal()?"offsetLeft":"offsetTop",s=this.activeIndicatorRef[i];this.activeIndicatorRef.style[t]=`${this.activeTabIndex+1}`;const o=this.activeIndicatorRef[i];this.activeIndicatorRef.style[t]=`${this.prevActiveTabIndex+1}`;const n=o-s;this.activeIndicatorRef.style.transform=`${e}(${n}px)`,this.activeIndicatorRef.classList.add("activeIndicatorTransition"),this.activeIndicatorRef.addEventListener("transitionend",(()=>{this.ticking=!1,this.activeIndicatorRef.style[t]=`${this.activeTabIndex+1}`,this.activeIndicatorRef.style.transform=`${e}(0px)`,this.activeIndicatorRef.classList.remove("activeIndicatorTransition")}))}adjust(t){const e=this.tabs.filter((t=>this.isFocusableElement(t))),i=e.indexOf(this.activetab),s=Ri(0,e.length-1,i+t),o=this.tabs.indexOf(e[s]);o>-1&&this.moveToTabByIndex(this.tabs,o)}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}}oe([lt],Tr.prototype,"orientation",void 0),oe([lt],Tr.prototype,"activeid",void 0),oe([f],Tr.prototype,"tabs",void 0),oe([f],Tr.prototype,"tabpanels",void 0),oe([lt({mode:"boolean"})],Tr.prototype,"activeindicator",void 0),oe([f],Tr.prototype,"activeIndicatorRef",void 0),oe([f],Tr.prototype,"showActiveIndicator",void 0),oi(Tr,Zt);class Or extends ei{}class Sr extends(ds(Or)){constructor(){super(...arguments),this.proxy=document.createElement("textarea")}}const Rr={none:"none",both:"both",horizontal:"horizontal",vertical:"vertical"};class Ar extends Sr{constructor(){super(...arguments),this.resize=Rr.none,this.cols=20,this.handleTextInput=()=>{this.value=this.control.value}}readOnlyChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.readOnly=this.readOnly)}autofocusChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.autofocus=this.autofocus)}listChanged(){this.proxy instanceof HTMLTextAreaElement&&this.proxy.setAttribute("list",this.list)}maxlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.maxLength=this.maxlength)}minlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.minLength=this.minlength)}spellcheckChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.spellcheck=this.spellcheck)}select(){this.control.select(),this.$emit("select")}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}oe([lt({mode:"boolean"})],Ar.prototype,"readOnly",void 0),oe([lt],Ar.prototype,"resize",void 0),oe([lt({mode:"boolean"})],Ar.prototype,"autofocus",void 0),oe([lt({attribute:"form"})],Ar.prototype,"formId",void 0),oe([lt],Ar.prototype,"list",void 0),oe([lt({converter:rt})],Ar.prototype,"maxlength",void 0),oe([lt({converter:rt})],Ar.prototype,"minlength",void 0),oe([lt],Ar.prototype,"name",void 0),oe([lt],Ar.prototype,"placeholder",void 0),oe([lt({converter:rt,mode:"fromView"})],Ar.prototype,"cols",void 0),oe([lt({converter:rt,mode:"fromView"})],Ar.prototype,"rows",void 0),oe([lt({mode:"boolean"})],Ar.prototype,"spellcheck",void 0),oe([f],Ar.prototype,"defaultSlottedNodes",void 0),oi(Ar,Ln);const Dr=(t,e)=>K`
1257
+ `,kr={vertical:"vertical",horizontal:"horizontal"};class Er extends ti{constructor(){super(...arguments),this.orientation=kr.horizontal,this.activeindicator=!0,this.showActiveIndicator=!0,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.ticking=!1,this.change=()=>{this.$emit("change",this.activetab)},this.isDisabledElement=t=>"true"===t.getAttribute("aria-disabled"),this.isHiddenElement=t=>t.hasAttribute("hidden"),this.isFocusableElement=t=>!this.isDisabledElement(t)&&!this.isHiddenElement(t),this.setTabs=()=>{const t="gridColumn",e="gridRow",i=this.isHorizontal()?t:e;this.activeTabIndex=this.getActiveIndex(),this.showActiveIndicator=!1,this.tabs.forEach(((s,o)=>{if("tab"===s.slot){const t=this.activeTabIndex===o&&this.isFocusableElement(s);this.activeindicator&&this.isFocusableElement(s)&&(this.showActiveIndicator=!0);const e=this.tabIds[o],i=this.tabpanelIds[o];s.setAttribute("id",e),s.setAttribute("aria-selected",t?"true":"false"),s.setAttribute("aria-controls",i),s.addEventListener("click",this.handleTabClick),s.addEventListener("keydown",this.handleTabKeyDown),s.setAttribute("tabindex",t?"0":"-1"),t&&(this.activetab=s,this.activeid=e)}s.style[t]="",s.style[e]="",s.style[i]=`${o+1}`,this.isHorizontal()?s.classList.remove("vertical"):s.classList.add("vertical")}))},this.setTabPanels=()=>{this.tabpanels.forEach(((t,e)=>{const i=this.tabIds[e],s=this.tabpanelIds[e];t.setAttribute("id",s),t.setAttribute("aria-labelledby",i),this.activeTabIndex!==e?t.setAttribute("hidden",""):t.removeAttribute("hidden")}))},this.handleTabClick=t=>{const e=t.currentTarget;1===e.nodeType&&this.isFocusableElement(e)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(e),this.setComponent())},this.handleTabKeyDown=t=>{if(this.isHorizontal())switch(t.key){case bi:t.preventDefault(),this.adjustBackward(t);break;case yi:t.preventDefault(),this.adjustForward(t)}else switch(t.key){case Ci:t.preventDefault(),this.adjustBackward(t);break;case gi:t.preventDefault(),this.adjustForward(t)}switch(t.key){case $i:t.preventDefault(),this.adjust(-this.activeTabIndex);break;case Ii:t.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1)}},this.adjustForward=t=>{const e=this.tabs;let i=0;for(i=this.activetab?e.indexOf(this.activetab)+1:1,i===e.length&&(i=0);i<e.length&&e.length>1;){if(this.isFocusableElement(e[i])){this.moveToTabByIndex(e,i);break}if(this.activetab&&i===e.indexOf(this.activetab))break;i+1>=e.length?i=0:i+=1}},this.adjustBackward=t=>{const e=this.tabs;let i=0;for(i=this.activetab?e.indexOf(this.activetab)-1:0,i=i<0?e.length-1:i;i>=0&&e.length>1;){if(this.isFocusableElement(e[i])){this.moveToTabByIndex(e,i);break}i-1<0?i=e.length-1:i-=1}},this.moveToTabByIndex=(t,e)=>{const i=t[e];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=e,i.focus(),this.setComponent()}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}activeidChanged(t,e){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.prevActiveTabIndex=this.tabs.findIndex((e=>e.id===t)),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}getTabIds(){return this.tabs.map((t=>t.getAttribute("id")??`tab-${Ai()}`))}getTabPanelIds(){return this.tabpanels.map((t=>t.getAttribute("id")??`panel-${Ai()}`))}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab(),this.change())}isHorizontal(){return this.orientation===kr.horizontal}handleActiveIndicatorPosition(){this.showActiveIndicator&&this.activeindicator&&this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;const t=this.isHorizontal()?"gridColumn":"gridRow",e=this.isHorizontal()?"translateX":"translateY",i=this.isHorizontal()?"offsetLeft":"offsetTop",s=this.activeIndicatorRef[i];this.activeIndicatorRef.style[t]=`${this.activeTabIndex+1}`;const o=this.activeIndicatorRef[i];this.activeIndicatorRef.style[t]=`${this.prevActiveTabIndex+1}`;const n=o-s;this.activeIndicatorRef.style.transform=`${e}(${n}px)`,this.activeIndicatorRef.classList.add("activeIndicatorTransition"),this.activeIndicatorRef.addEventListener("transitionend",(()=>{this.ticking=!1,this.activeIndicatorRef.style[t]=`${this.activeTabIndex+1}`,this.activeIndicatorRef.style.transform=`${e}(0px)`,this.activeIndicatorRef.classList.remove("activeIndicatorTransition")}))}adjust(t){const e=this.tabs.filter((t=>this.isFocusableElement(t))),i=e.indexOf(this.activetab),s=Si(0,e.length-1,i+t),o=this.tabs.indexOf(e[s]);o>-1&&this.moveToTabByIndex(this.tabs,o)}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}}se([at],Er.prototype,"orientation",void 0),se([at],Er.prototype,"activeid",void 0),se([f],Er.prototype,"tabs",void 0),se([f],Er.prototype,"tabpanels",void 0),se([at({mode:"boolean"})],Er.prototype,"activeindicator",void 0),se([f],Er.prototype,"activeIndicatorRef",void 0),se([f],Er.prototype,"showActiveIndicator",void 0),si(Er,Qt);class Tr extends ti{}class Or extends(hs(Tr)){constructor(){super(...arguments),this.proxy=document.createElement("textarea")}}const Sr={none:"none",both:"both",horizontal:"horizontal",vertical:"vertical"};class Rr extends Or{constructor(){super(...arguments),this.resize=Sr.none,this.cols=20,this.handleTextInput=()=>{this.value=this.control.value}}readOnlyChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.readOnly=this.readOnly)}autofocusChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.autofocus=this.autofocus)}listChanged(){this.proxy instanceof HTMLTextAreaElement&&this.proxy.setAttribute("list",this.list)}maxlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.maxLength=this.maxlength)}minlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.minLength=this.minlength)}spellcheckChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.spellcheck=this.spellcheck)}select(){this.control.select(),this.$emit("select")}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}se([at({mode:"boolean"})],Rr.prototype,"readOnly",void 0),se([at],Rr.prototype,"resize",void 0),se([at({mode:"boolean"})],Rr.prototype,"autofocus",void 0),se([at({attribute:"form"})],Rr.prototype,"formId",void 0),se([at],Rr.prototype,"list",void 0),se([at({converter:nt})],Rr.prototype,"maxlength",void 0),se([at({converter:nt})],Rr.prototype,"minlength",void 0),se([at],Rr.prototype,"name",void 0),se([at],Rr.prototype,"placeholder",void 0),se([at({converter:nt,mode:"fromView"})],Rr.prototype,"cols",void 0),se([at({converter:nt,mode:"fromView"})],Rr.prototype,"rows",void 0),se([at({mode:"boolean"})],Rr.prototype,"spellcheck",void 0),se([f],Rr.prototype,"defaultSlottedNodes",void 0),si(Rr,Fn);const Dr=(t,e)=>W`
1258
1258
  <template
1259
1259
  class="
1260
1260
  ${t=>t.readOnly?"readonly":""}
1261
- ${t=>t.resize!==Rr.none?`resize-${t.resize}`:""}"
1261
+ ${t=>t.resize!==Sr.none?`resize-${t.resize}`:""}"
1262
1262
  >
1263
1263
  <label
1264
1264
  part="label"
1265
1265
  for="control"
1266
1266
  class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
1267
1267
  >
1268
- <slot ${Xt("defaultSlottedNodes")}></slot>
1268
+ <slot ${Yt("defaultSlottedNodes")}></slot>
1269
1269
  </label>
1270
1270
  <textarea
1271
1271
  part="control"
@@ -1306,10 +1306,10 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1306
1306
  aria-roledescription="${t=>t.ariaRoledescription}"
1307
1307
  @input="${(t,e)=>t.handleTextInput()}"
1308
1308
  @change="${t=>t.handleChange()}"
1309
- ${Pt("control")}
1309
+ ${Lt("control")}
1310
1310
  ></textarea>
1311
1311
  </template>
1312
- `,Fr=(t,e)=>K`
1312
+ `,Ar=(t,e)=>W`
1313
1313
  <template
1314
1314
  class="
1315
1315
  ${t=>t.readOnly?"readonly":""}
@@ -1321,11 +1321,11 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1321
1321
  class="${t=>t.defaultSlottedNodes&&t.defaultSlottedNodes.length?"label":"label label__hidden"}"
1322
1322
  >
1323
1323
  <slot
1324
- ${Xt({property:"defaultSlottedNodes",filter:Xn})}
1324
+ ${Yt({property:"defaultSlottedNodes",filter:Yn})}
1325
1325
  ></slot>
1326
1326
  </label>
1327
1327
  <div class="root" part="root">
1328
- ${te(0,e)}
1328
+ ${Jt(0,e)}
1329
1329
  <input
1330
1330
  class="control"
1331
1331
  part="control"
@@ -1364,12 +1364,12 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1364
1364
  aria-owns="${t=>t.ariaOwns}"
1365
1365
  aria-relevant="${t=>t.ariaRelevant}"
1366
1366
  aria-roledescription="${t=>t.ariaRoledescription}"
1367
- ${Pt("control")}
1367
+ ${Lt("control")}
1368
1368
  />
1369
- ${Jt(0,e)}
1369
+ ${Zt(0,e)}
1370
1370
  </div>
1371
1371
  </template>
1372
- `,Lr=(t,e)=>K`
1372
+ `,Fr=(t,e)=>W`
1373
1373
  <template
1374
1374
  aria-label="${t=>t.ariaLabel}"
1375
1375
  aria-labelledby="${t=>t.ariaLabelledby}"
@@ -1379,20 +1379,20 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1379
1379
  @mousedown="${(t,e)=>t.mouseDownHandler(e.event)}"
1380
1380
  @focusin="${(t,e)=>t.focusinHandler(e.event)}"
1381
1381
  @keydown="${(t,e)=>t.keydownHandler(e.event)}"
1382
- ${Qt({property:"childItems",attributeFilter:["disabled","hidden"],filter:Wt(),subtree:!0})}
1382
+ ${Gt({property:"childItems",attributeFilter:["disabled","hidden"],filter:jt(),subtree:!0})}
1383
1383
  >
1384
1384
  <slot name="label"></slot>
1385
1385
  <div class="positioning-region" part="positioning-region">
1386
- ${te(0,e)}
1386
+ ${Jt(0,e)}
1387
1387
  <slot
1388
- ${Xt({filter:Wt(),property:"slottedItems"})}
1388
+ ${Yt({filter:jt(),property:"slottedItems"})}
1389
1389
  ></slot>
1390
- ${Jt(0,e)}
1390
+ ${Zt(0,e)}
1391
1391
  </div>
1392
1392
  </template>
1393
- `;const Pr=Object.freeze({[Oi.ArrowUp]:{[li]:-1},[Oi.ArrowDown]:{[li]:1},[Oi.ArrowLeft]:{[ai]:{[Si.ltr]:-1,[Si.rtl]:1}},[Oi.ArrowRight]:{[ai]:{[Si.ltr]:1,[Si.rtl]:-1}}});class Mr extends ei{constructor(){super(...arguments),this._activeIndex=0,this.direction=Si.ltr,this.orientation=ai}get activeIndex(){return m.track(this,"activeIndex"),this._activeIndex}set activeIndex(t){this.$fastController.isConnected&&(this._activeIndex=Ri(0,this.focusableElements.length-1,t),m.notify(this,"activeIndex"))}slottedItemsChanged(){this.$fastController.isConnected&&this.reduceFocusableElements()}mouseDownHandler(t){const e=this.focusableElements?.findIndex((e=>e.contains(t.target)));return e>-1&&this.activeIndex!==e&&this.setFocusedElement(e),!0}childItemsChanged(t,e){this.$fastController.isConnected&&this.reduceFocusableElements()}connectedCallback(){super.connectedCallback(),this.direction=Bi(this)}focusinHandler(t){const e=t.relatedTarget;e&&!this.contains(e)&&this.setFocusedElement()}getDirectionalIncrementer(t){return Pr[t]?.[this.orientation]?.[this.direction]??Pr[t]?.[this.orientation]??0}keydownHandler(t){const e=t.key;if(!(e in Oi)||t.defaultPrevented||t.shiftKey)return!0;const i=this.getDirectionalIncrementer(e);if(!i)return!t.target.closest("[role=radiogroup]");const s=this.activeIndex+i;return this.focusableElements[s]&&t.preventDefault(),this.setFocusedElement(s),!0}get allSlottedItems(){return[...this.start.assignedElements(),...this.slottedItems,...this.end.assignedElements()]}reduceFocusableElements(){const t=this.focusableElements?.[this.activeIndex];this.focusableElements=this.allSlottedItems.reduce(Mr.reduceFocusableItems,[]);const e=this.focusableElements.indexOf(t);this.activeIndex=Math.max(0,e),this.setFocusableElements()}setFocusedElement(t=this.activeIndex){this.activeIndex=t,this.setFocusableElements(),this.focusableElements[this.activeIndex]&&this.contains(function(t){const e=t.getRootNode();return e instanceof ShadowRoot?e.activeElement:document.activeElement}(this))&&this.focusableElements[this.activeIndex].focus()}static reduceFocusableItems(t,e){const i="radio"===e.getAttribute("role"),s=e.$fastController?.definition.shadowOptions?.delegatesFocus,o=Array.from(e.shadowRoot?.querySelectorAll("*")??[]).some((t=>_o(t)));return e.hasAttribute("disabled")||e.hasAttribute("hidden")||!(_o(e)||i||s||o)?e.childElementCount?t.concat(Array.from(e.children).reduce(Mr.reduceFocusableItems,[])):t:(t.push(e),t)}setFocusableElements(){this.$fastController.isConnected&&this.focusableElements.length>0&&this.focusableElements.forEach(((t,e)=>{t.tabIndex=this.activeIndex===e?0:-1}))}}oe([f],Mr.prototype,"direction",void 0),oe([lt],Mr.prototype,"orientation",void 0),oe([f],Mr.prototype,"slottedItems",void 0),oe([f],Mr.prototype,"slottedLabel",void 0),oe([f],Mr.prototype,"childItems",void 0);class Vr{}oe([lt({attribute:"aria-labelledby"})],Vr.prototype,"ariaLabelledby",void 0),oe([lt({attribute:"aria-label"})],Vr.prototype,"ariaLabel",void 0),oi(Vr,Vi),oi(Mr,Zt,Vr);const Hr=(t,e)=>K`
1394
- ${zt((t=>t.tooltipVisible),K`
1395
- <${t.tagFor(Ui)}
1393
+ `;const Lr=Object.freeze({[Ti.ArrowUp]:{[ai]:-1},[Ti.ArrowDown]:{[ai]:1},[Ti.ArrowLeft]:{[ri]:{[Oi.ltr]:-1,[Oi.rtl]:1}},[Ti.ArrowRight]:{[ri]:{[Oi.ltr]:1,[Oi.rtl]:-1}}});class Pr extends ti{constructor(){super(...arguments),this._activeIndex=0,this.direction=Oi.ltr,this.focusableElements=[],this.orientation=ri}get activeIndex(){return m.track(this,"activeIndex"),this._activeIndex}set activeIndex(t){this.$fastController.isConnected&&(this._activeIndex=Si(0,this.focusableElements.length>0?this.focusableElements.length-1:0,t),m.notify(this,"activeIndex"))}slottedItemsChanged(){this.$fastController.isConnected&&this.reduceFocusableElements()}mouseDownHandler(t){const e=this.focusableElements.findIndex((e=>e.contains(t.target)));return e>-1&&this.activeIndex!==e&&this.setFocusedElement(e),!0}childItemsChanged(t,e){this.$fastController.isConnected&&this.reduceFocusableElements()}connectedCallback(){super.connectedCallback(),this.direction=Ni(this)}focusinHandler(t){const e=t.relatedTarget;e&&!this.contains(e)&&this.setFocusedElement()}getDirectionalIncrementer(t){return Lr[t]?.[this.orientation]?.[this.direction]??Lr[t]?.[this.orientation]??0}keydownHandler(t){const e=t.key;if(!(e in Ti)||t.defaultPrevented||t.shiftKey)return!0;const i=this.getDirectionalIncrementer(e);if(!i)return!t.target.closest("[role=radiogroup]");const s=this.activeIndex+i;return this.focusableElements.length>0&&this.focusableElements[s]&&t.preventDefault(),this.setFocusedElement(s),!0}get allSlottedItems(){return[...this.start.assignedElements(),...this.slottedItems,...this.end.assignedElements()]}reduceFocusableElements(){const t=this.focusableElements[this.activeIndex];this.focusableElements=this.allSlottedItems.reduce(Pr.reduceFocusableItems,[]);const e=this.focusableElements.indexOf(t);this.activeIndex=Math.max(0,e),this.setFocusableElements()}setFocusedElement(t=this.activeIndex){this.activeIndex=t,this.setFocusableElements(),this.focusableElements.length>0&&this.focusableElements[this.activeIndex]&&this.contains(function(t){const e=t.getRootNode();return e instanceof ShadowRoot?e.activeElement:document.activeElement}(this))&&this.focusableElements[this.activeIndex].focus()}static reduceFocusableItems(t,e){const i="radio"===e.getAttribute("role"),s=e.$fastController?.definition.shadowOptions?.delegatesFocus,o=Array.from(e.shadowRoot?.querySelectorAll("*")??[]).some((t=>Uo(t)));return e.hasAttribute("disabled")||e.hasAttribute("hidden")||!(Uo(e)||i||s||o)?e.childElementCount?t.concat(Array.from(e.children).reduce(Pr.reduceFocusableItems,[])):t:(t.push(e),t)}setFocusableElements(){this.$fastController.isConnected&&this.focusableElements.length>0&&this.focusableElements.forEach(((t,e)=>{t.tabIndex=this.activeIndex===e?0:-1}))}}se([f],Pr.prototype,"direction",void 0),se([at],Pr.prototype,"orientation",void 0),se([f],Pr.prototype,"slottedItems",void 0),se([f],Pr.prototype,"slottedLabel",void 0),se([f],Pr.prototype,"childItems",void 0);class Mr{}se([at({attribute:"aria-labelledby"})],Mr.prototype,"ariaLabelledby",void 0),se([at({attribute:"aria-label"})],Mr.prototype,"ariaLabel",void 0),si(Mr,Mi),si(Pr,Qt,Mr);const Vr=(t,e)=>W`
1394
+ ${Ht((t=>t.tooltipVisible),W`
1395
+ <${t.tagFor(qi)}
1396
1396
  fixed-placement="true"
1397
1397
  auto-update-mode="${t=>t.autoUpdateMode}"
1398
1398
  vertical-positioning-mode="${t=>t.verticalPositioningMode}"
@@ -1406,14 +1406,14 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1406
1406
  vertical-viewport-lock="${t=>t.horizontalViewportLock}"
1407
1407
  horizontal-viewport-lock="${t=>t.verticalViewportLock}"
1408
1408
  dir="${t=>t.currentDirection}"
1409
- ${Pt("region")}
1409
+ ${Lt("region")}
1410
1410
  >
1411
1411
  <div class="tooltip" part="tooltip" role="tooltip">
1412
1412
  <slot></slot>
1413
1413
  </div>
1414
- </${t.tagFor(Ui)}>
1414
+ </${t.tagFor(qi)}>
1415
1415
  `)}
1416
- `,zr={top:"top",right:"right",bottom:"bottom",left:"left",start:"start",end:"end",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",topStart:"top-start",topEnd:"top-end",bottomStart:"bottom-start",bottomEnd:"bottom-end"};class Nr extends ei{constructor(){super(...arguments),this.anchor="",this.delay=300,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.verticalPositioningMode="dynamic",this.horizontalPositioningMode="dynamic",this.horizontalInset="false",this.verticalInset="false",this.horizontalScaling="content",this.verticalScaling="content",this.verticalDefaultPosition=void 0,this.horizontalDefaultPosition=void 0,this.tooltipVisible=!1,this.currentDirection=Si.ltr,this.showDelayTimer=null,this.hideDelayTimer=null,this.isAnchorHoveredFocused=!1,this.isRegionHovered=!1,this.handlePositionChange=t=>{this.classList.toggle("top","start"===this.region.verticalPosition),this.classList.toggle("bottom","end"===this.region.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.region.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.region.verticalPosition),this.classList.toggle("center-vertical","center"===this.region.verticalPosition),this.classList.toggle("left","start"===this.region.horizontalPosition),this.classList.toggle("right","end"===this.region.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.region.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.region.horizontalPosition),this.classList.toggle("center-horizontal","center"===this.region.horizontalPosition)},this.handleRegionMouseOver=t=>{this.isRegionHovered=!0},this.handleRegionMouseOut=t=>{this.isRegionHovered=!1,this.startHideDelayTimer()},this.handleAnchorMouseOver=t=>{this.tooltipVisible?this.isAnchorHoveredFocused=!0:this.startShowDelayTimer()},this.handleAnchorMouseOut=t=>{this.isAnchorHoveredFocused=!1,this.clearShowDelayTimer(),this.startHideDelayTimer()},this.handleAnchorFocusIn=t=>{this.startShowDelayTimer()},this.handleAnchorFocusOut=t=>{this.isAnchorHoveredFocused=!1,this.clearShowDelayTimer(),this.startHideDelayTimer()},this.startHideDelayTimer=()=>{this.clearHideDelayTimer(),this.tooltipVisible&&(this.hideDelayTimer=window.setTimeout((()=>{this.updateTooltipVisibility()}),60))},this.clearHideDelayTimer=()=>{null!==this.hideDelayTimer&&(clearTimeout(this.hideDelayTimer),this.hideDelayTimer=null)},this.startShowDelayTimer=()=>{this.isAnchorHoveredFocused||(this.delay>1?null===this.showDelayTimer&&(this.showDelayTimer=window.setTimeout((()=>{this.startHover()}),this.delay)):this.startHover())},this.startHover=()=>{this.isAnchorHoveredFocused=!0,this.updateTooltipVisibility()},this.clearShowDelayTimer=()=>{null!==this.showDelayTimer&&(clearTimeout(this.showDelayTimer),this.showDelayTimer=null)},this.getAnchor=()=>{const t=this.getRootNode();return t instanceof ShadowRoot?t.getElementById(this.anchor):document.getElementById(this.anchor)},this.handleDocumentKeydown=t=>{if(!t.defaultPrevented&&this.tooltipVisible&&t.key===$i)this.isAnchorHoveredFocused=!1,this.updateTooltipVisibility(),this.$emit("dismiss")},this.updateTooltipVisibility=()=>{if(!1===this.visible)this.hideTooltip();else{if(!0===this.visible)return void this.showTooltip();if(this.isAnchorHoveredFocused||this.isRegionHovered)return void this.showTooltip();this.hideTooltip()}},this.showTooltip=()=>{this.tooltipVisible||(this.currentDirection=Bi(this),this.tooltipVisible=!0,document.addEventListener("keydown",this.handleDocumentKeydown),c.queueUpdate(this.setRegionProps))},this.hideTooltip=()=>{this.tooltipVisible&&(this.clearHideDelayTimer(),null!==this.region&&void 0!==this.region&&(this.region.removeEventListener("positionchange",this.handlePositionChange),this.region.viewportElement=null,this.region.anchorElement=null,this.region.removeEventListener("mouseover",this.handleRegionMouseOver),this.region.removeEventListener("mouseout",this.handleRegionMouseOut)),document.removeEventListener("keydown",this.handleDocumentKeydown),this.tooltipVisible=!1)},this.setRegionProps=()=>{this.tooltipVisible&&(this.region.viewportElement=this.viewportElement,this.region.anchorElement=this.anchorElement,this.region.addEventListener("positionchange",this.handlePositionChange),this.region.addEventListener("mouseover",this.handleRegionMouseOver,{passive:!0}),this.region.addEventListener("mouseout",this.handleRegionMouseOut,{passive:!0}))}}visibleChanged(){this.$fastController.isConnected&&(this.updateTooltipVisibility(),this.updateLayout())}anchorChanged(){this.$fastController.isConnected&&(this.anchorElement=this.getAnchor())}positionChanged(){this.$fastController.isConnected&&this.updateLayout()}anchorElementChanged(t){if(this.$fastController.isConnected){if(null!=t&&(t.removeEventListener("mouseover",this.handleAnchorMouseOver),t.removeEventListener("mouseout",this.handleAnchorMouseOut),t.removeEventListener("focusin",this.handleAnchorFocusIn),t.removeEventListener("focusout",this.handleAnchorFocusOut)),null!==this.anchorElement&&void 0!==this.anchorElement){this.anchorElement.addEventListener("mouseover",this.handleAnchorMouseOver,{passive:!0}),this.anchorElement.addEventListener("mouseout",this.handleAnchorMouseOut,{passive:!0}),this.anchorElement.addEventListener("focusin",this.handleAnchorFocusIn,{passive:!0}),this.anchorElement.addEventListener("focusout",this.handleAnchorFocusOut,{passive:!0});const t=this.anchorElement.id;null!==this.anchorElement.parentElement&&this.anchorElement.parentElement.querySelectorAll(":hover").forEach((e=>{e.id===t&&this.startShowDelayTimer()}))}null!==this.region&&void 0!==this.region&&this.tooltipVisible&&(this.region.anchorElement=this.anchorElement),this.updateLayout()}}viewportElementChanged(){null!==this.region&&void 0!==this.region&&(this.region.viewportElement=this.viewportElement),this.updateLayout()}connectedCallback(){super.connectedCallback(),this.anchorElement=this.getAnchor(),this.updateTooltipVisibility()}disconnectedCallback(){this.hideTooltip(),this.clearShowDelayTimer(),this.clearHideDelayTimer(),super.disconnectedCallback()}updateLayout(){switch(this.verticalPositioningMode="locktodefault",this.horizontalPositioningMode="locktodefault",this.position){case zr.top:case zr.bottom:this.verticalDefaultPosition=this.position,this.horizontalDefaultPosition="center";break;case zr.right:case zr.left:case zr.start:case zr.end:this.verticalDefaultPosition="center",this.horizontalDefaultPosition=this.position;break;case zr.topLeft:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="left";break;case zr.topRight:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="right";break;case zr.bottomLeft:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="left";break;case zr.bottomRight:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="right";break;case zr.topStart:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="start";break;case zr.topEnd:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="end";break;case zr.bottomStart:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="start";break;case zr.bottomEnd:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="end";break;default:this.verticalPositioningMode="dynamic",this.horizontalPositioningMode="dynamic",this.verticalDefaultPosition=void 0,this.horizontalDefaultPosition="center"}}}oe([lt({mode:"boolean"})],Nr.prototype,"visible",void 0),oe([lt],Nr.prototype,"anchor",void 0),oe([lt],Nr.prototype,"delay",void 0),oe([lt],Nr.prototype,"position",void 0),oe([lt({attribute:"auto-update-mode"})],Nr.prototype,"autoUpdateMode",void 0),oe([lt({attribute:"horizontal-viewport-lock"})],Nr.prototype,"horizontalViewportLock",void 0),oe([lt({attribute:"vertical-viewport-lock"})],Nr.prototype,"verticalViewportLock",void 0),oe([f],Nr.prototype,"anchorElement",void 0),oe([f],Nr.prototype,"viewportElement",void 0),oe([f],Nr.prototype,"verticalPositioningMode",void 0),oe([f],Nr.prototype,"horizontalPositioningMode",void 0),oe([f],Nr.prototype,"horizontalInset",void 0),oe([f],Nr.prototype,"verticalInset",void 0),oe([f],Nr.prototype,"horizontalScaling",void 0),oe([f],Nr.prototype,"verticalScaling",void 0),oe([f],Nr.prototype,"verticalDefaultPosition",void 0),oe([f],Nr.prototype,"horizontalDefaultPosition",void 0),oe([f],Nr.prototype,"tooltipVisible",void 0),oe([f],Nr.prototype,"currentDirection",void 0);const Br=(t,e)=>K`
1416
+ `,Hr={top:"top",right:"right",bottom:"bottom",left:"left",start:"start",end:"end",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",topStart:"top-start",topEnd:"top-end",bottomStart:"bottom-start",bottomEnd:"bottom-end"};class zr extends ti{constructor(){super(...arguments),this.anchor="",this.delay=300,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.verticalPositioningMode="dynamic",this.horizontalPositioningMode="dynamic",this.horizontalInset="false",this.verticalInset="false",this.horizontalScaling="content",this.verticalScaling="content",this.verticalDefaultPosition=void 0,this.horizontalDefaultPosition=void 0,this.tooltipVisible=!1,this.currentDirection=Oi.ltr,this.showDelayTimer=null,this.hideDelayTimer=null,this.isAnchorHoveredFocused=!1,this.isRegionHovered=!1,this.handlePositionChange=t=>{this.classList.toggle("top","start"===this.region.verticalPosition),this.classList.toggle("bottom","end"===this.region.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.region.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.region.verticalPosition),this.classList.toggle("center-vertical","center"===this.region.verticalPosition),this.classList.toggle("left","start"===this.region.horizontalPosition),this.classList.toggle("right","end"===this.region.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.region.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.region.horizontalPosition),this.classList.toggle("center-horizontal","center"===this.region.horizontalPosition)},this.handleRegionMouseOver=t=>{this.isRegionHovered=!0},this.handleRegionMouseOut=t=>{this.isRegionHovered=!1,this.startHideDelayTimer()},this.handleAnchorMouseOver=t=>{this.tooltipVisible?this.isAnchorHoveredFocused=!0:this.startShowDelayTimer()},this.handleAnchorMouseOut=t=>{this.isAnchorHoveredFocused=!1,this.clearShowDelayTimer(),this.startHideDelayTimer()},this.handleAnchorFocusIn=t=>{this.startShowDelayTimer()},this.handleAnchorFocusOut=t=>{this.isAnchorHoveredFocused=!1,this.clearShowDelayTimer(),this.startHideDelayTimer()},this.startHideDelayTimer=()=>{this.clearHideDelayTimer(),this.tooltipVisible&&(this.hideDelayTimer=window.setTimeout((()=>{this.updateTooltipVisibility()}),60))},this.clearHideDelayTimer=()=>{null!==this.hideDelayTimer&&(clearTimeout(this.hideDelayTimer),this.hideDelayTimer=null)},this.startShowDelayTimer=()=>{this.isAnchorHoveredFocused||(this.delay>1?null===this.showDelayTimer&&(this.showDelayTimer=window.setTimeout((()=>{this.startHover()}),this.delay)):this.startHover())},this.startHover=()=>{this.isAnchorHoveredFocused=!0,this.updateTooltipVisibility()},this.clearShowDelayTimer=()=>{null!==this.showDelayTimer&&(clearTimeout(this.showDelayTimer),this.showDelayTimer=null)},this.getAnchor=()=>{const t=this.getRootNode();return t instanceof ShadowRoot?t.getElementById(this.anchor):document.getElementById(this.anchor)},this.handleDocumentKeydown=t=>{if(!t.defaultPrevented&&this.tooltipVisible&&t.key===wi)this.isAnchorHoveredFocused=!1,this.updateTooltipVisibility(),this.$emit("dismiss")},this.updateTooltipVisibility=()=>{if(!1===this.visible)this.hideTooltip();else{if(!0===this.visible)return void this.showTooltip();if(this.isAnchorHoveredFocused||this.isRegionHovered)return void this.showTooltip();this.hideTooltip()}},this.showTooltip=()=>{this.tooltipVisible||(this.currentDirection=Ni(this),this.tooltipVisible=!0,document.addEventListener("keydown",this.handleDocumentKeydown),c.queueUpdate(this.setRegionProps))},this.hideTooltip=()=>{this.tooltipVisible&&(this.clearHideDelayTimer(),null!==this.region&&void 0!==this.region&&(this.region.removeEventListener("positionchange",this.handlePositionChange),this.region.viewportElement=null,this.region.anchorElement=null,this.region.removeEventListener("mouseover",this.handleRegionMouseOver),this.region.removeEventListener("mouseout",this.handleRegionMouseOut)),document.removeEventListener("keydown",this.handleDocumentKeydown),this.tooltipVisible=!1)},this.setRegionProps=()=>{this.tooltipVisible&&(this.region.viewportElement=this.viewportElement,this.region.anchorElement=this.anchorElement,this.region.addEventListener("positionchange",this.handlePositionChange),this.region.addEventListener("mouseover",this.handleRegionMouseOver,{passive:!0}),this.region.addEventListener("mouseout",this.handleRegionMouseOut,{passive:!0}))}}visibleChanged(){this.$fastController.isConnected&&(this.updateTooltipVisibility(),this.updateLayout())}anchorChanged(){this.$fastController.isConnected&&(this.anchorElement=this.getAnchor())}positionChanged(){this.$fastController.isConnected&&this.updateLayout()}anchorElementChanged(t){if(this.$fastController.isConnected){if(null!=t&&(t.removeEventListener("mouseover",this.handleAnchorMouseOver),t.removeEventListener("mouseout",this.handleAnchorMouseOut),t.removeEventListener("focusin",this.handleAnchorFocusIn),t.removeEventListener("focusout",this.handleAnchorFocusOut)),null!==this.anchorElement&&void 0!==this.anchorElement){this.anchorElement.addEventListener("mouseover",this.handleAnchorMouseOver,{passive:!0}),this.anchorElement.addEventListener("mouseout",this.handleAnchorMouseOut,{passive:!0}),this.anchorElement.addEventListener("focusin",this.handleAnchorFocusIn,{passive:!0}),this.anchorElement.addEventListener("focusout",this.handleAnchorFocusOut,{passive:!0});const t=this.anchorElement.id;null!==this.anchorElement.parentElement&&this.anchorElement.parentElement.querySelectorAll(":hover").forEach((e=>{e.id===t&&this.startShowDelayTimer()}))}null!==this.region&&void 0!==this.region&&this.tooltipVisible&&(this.region.anchorElement=this.anchorElement),this.updateLayout()}}viewportElementChanged(){null!==this.region&&void 0!==this.region&&(this.region.viewportElement=this.viewportElement),this.updateLayout()}connectedCallback(){super.connectedCallback(),this.anchorElement=this.getAnchor(),this.updateTooltipVisibility()}disconnectedCallback(){this.hideTooltip(),this.clearShowDelayTimer(),this.clearHideDelayTimer(),super.disconnectedCallback()}updateLayout(){switch(this.verticalPositioningMode="locktodefault",this.horizontalPositioningMode="locktodefault",this.position){case Hr.top:case Hr.bottom:this.verticalDefaultPosition=this.position,this.horizontalDefaultPosition="center";break;case Hr.right:case Hr.left:case Hr.start:case Hr.end:this.verticalDefaultPosition="center",this.horizontalDefaultPosition=this.position;break;case Hr.topLeft:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="left";break;case Hr.topRight:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="right";break;case Hr.bottomLeft:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="left";break;case Hr.bottomRight:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="right";break;case Hr.topStart:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="start";break;case Hr.topEnd:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="end";break;case Hr.bottomStart:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="start";break;case Hr.bottomEnd:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="end";break;default:this.verticalPositioningMode="dynamic",this.horizontalPositioningMode="dynamic",this.verticalDefaultPosition=void 0,this.horizontalDefaultPosition="center"}}}se([at({mode:"boolean"})],zr.prototype,"visible",void 0),se([at],zr.prototype,"anchor",void 0),se([at],zr.prototype,"delay",void 0),se([at],zr.prototype,"position",void 0),se([at({attribute:"auto-update-mode"})],zr.prototype,"autoUpdateMode",void 0),se([at({attribute:"horizontal-viewport-lock"})],zr.prototype,"horizontalViewportLock",void 0),se([at({attribute:"vertical-viewport-lock"})],zr.prototype,"verticalViewportLock",void 0),se([f],zr.prototype,"anchorElement",void 0),se([f],zr.prototype,"viewportElement",void 0),se([f],zr.prototype,"verticalPositioningMode",void 0),se([f],zr.prototype,"horizontalPositioningMode",void 0),se([f],zr.prototype,"horizontalInset",void 0),se([f],zr.prototype,"verticalInset",void 0),se([f],zr.prototype,"horizontalScaling",void 0),se([f],zr.prototype,"verticalScaling",void 0),se([f],zr.prototype,"verticalDefaultPosition",void 0),se([f],zr.prototype,"horizontalDefaultPosition",void 0),se([f],zr.prototype,"tooltipVisible",void 0),se([f],zr.prototype,"currentDirection",void 0);const Nr=(t,e)=>W`
1417
1417
  <template
1418
1418
  role="treeitem"
1419
1419
  slot="${t=>t.isNestedItem()?"item":void 0}"
@@ -1425,44 +1425,44 @@ const t=function(){if("undefined"!=typeof globalThis)return globalThis;if("undef
1425
1425
  aria-disabled="${t=>t.disabled}"
1426
1426
  @focusin="${(t,e)=>t.handleFocus(e.event)}"
1427
1427
  @focusout="${(t,e)=>t.handleBlur(e.event)}"
1428
- ${Qt({property:"childItems",filter:Wt()})}
1428
+ ${Gt({property:"childItems",filter:jt()})}
1429
1429
  >
1430
1430
  <div class="positioning-region" part="positioning-region">
1431
1431
  <div class="content-region" part="content-region">
1432
- ${zt((t=>t.childItems&&t.childItemLength()>0),K`
1432
+ ${Ht((t=>t.childItems&&t.childItemLength()>0),W`
1433
1433
  <div
1434
1434
  aria-hidden="true"
1435
1435
  class="expand-collapse-button"
1436
1436
  part="expand-collapse-button"
1437
1437
  @click="${(t,e)=>t.handleExpandCollapseButtonClick(e.event)}"
1438
- ${Pt("expandCollapseButton")}
1438
+ ${Lt("expandCollapseButton")}
1439
1439
  >
1440
1440
  <slot name="expand-collapse-glyph">
1441
1441
  ${e.expandCollapseGlyph||""}
1442
1442
  </slot>
1443
1443
  </div>
1444
1444
  `)}
1445
- ${te(0,e)}
1446
- <slot></slot>
1447
1445
  ${Jt(0,e)}
1446
+ <slot></slot>
1447
+ ${Zt(0,e)}
1448
1448
  </div>
1449
1449
  </div>
1450
- ${zt((t=>t.childItems&&t.childItemLength()>0&&(t.expanded||t.renderCollapsedChildren)),K`
1450
+ ${Ht((t=>t.childItems&&t.childItemLength()>0&&(t.expanded||t.renderCollapsedChildren)),W`
1451
1451
  <div role="group" class="items" part="items">
1452
- <slot name="item" ${Xt("items")}></slot>
1452
+ <slot name="item" ${Yt("items")}></slot>
1453
1453
  </div>
1454
1454
  `)}
1455
1455
  </template>
1456
- `;function qr(t){return hi(t)&&"treeitem"===t.getAttribute("role")}class Ur extends ei{constructor(){super(...arguments),this.expanded=!1,this.focusable=!1,this.isNestedItem=()=>qr(this.parentElement),this.handleExpandCollapseButtonClick=t=>{this.disabled||t.defaultPrevented||(this.expanded=!this.expanded)},this.handleFocus=t=>{this.setAttribute("tabindex","0")},this.handleBlur=t=>{this.setAttribute("tabindex","-1")}}expandedChanged(){this.$fastController.isConnected&&this.$emit("expanded-change",this)}selectedChanged(){this.$fastController.isConnected&&this.$emit("selected-change",this)}itemsChanged(t,e){this.$fastController.isConnected&&this.items.forEach((t=>{qr(t)&&(t.nested=!0)}))}static focusItem(t){t.focusable=!0,t.focus()}childItemLength(){const t=this.childItems.filter((t=>qr(t)));return t?t.length:0}}oe([lt({mode:"boolean"})],Ur.prototype,"expanded",void 0),oe([lt({mode:"boolean"})],Ur.prototype,"selected",void 0),oe([lt({mode:"boolean"})],Ur.prototype,"disabled",void 0),oe([f],Ur.prototype,"focusable",void 0),oe([f],Ur.prototype,"childItems",void 0),oe([f],Ur.prototype,"items",void 0),oe([f],Ur.prototype,"nested",void 0),oe([f],Ur.prototype,"renderCollapsedChildren",void 0),oi(Ur,Zt);const _r=(t,e)=>K`
1456
+ `;function Br(t){return li(t)&&"treeitem"===t.getAttribute("role")}class qr extends ti{constructor(){super(...arguments),this.expanded=!1,this.focusable=!1,this.isNestedItem=()=>Br(this.parentElement),this.handleExpandCollapseButtonClick=t=>{this.disabled||t.defaultPrevented||(this.expanded=!this.expanded)},this.handleFocus=t=>{this.setAttribute("tabindex","0")},this.handleBlur=t=>{this.setAttribute("tabindex","-1")}}expandedChanged(){this.$fastController.isConnected&&this.$emit("expanded-change",this)}selectedChanged(){this.$fastController.isConnected&&this.$emit("selected-change",this)}itemsChanged(t,e){this.$fastController.isConnected&&this.items.forEach((t=>{Br(t)&&(t.nested=!0)}))}static focusItem(t){t.focusable=!0,t.focus()}childItemLength(){const t=this.childItems.filter((t=>Br(t)));return t?t.length:0}}se([at({mode:"boolean"})],qr.prototype,"expanded",void 0),se([at({mode:"boolean"})],qr.prototype,"selected",void 0),se([at({mode:"boolean"})],qr.prototype,"disabled",void 0),se([f],qr.prototype,"focusable",void 0),se([f],qr.prototype,"childItems",void 0),se([f],qr.prototype,"items",void 0),se([f],qr.prototype,"nested",void 0),se([f],qr.prototype,"renderCollapsedChildren",void 0),si(qr,Qt);const Ur=(t,e)=>W`
1457
1457
  <template
1458
1458
  role="tree"
1459
- ${Pt("treeView")}
1459
+ ${Lt("treeView")}
1460
1460
  @keydown="${(t,e)=>t.handleKeyDown(e.event)}"
1461
1461
  @focusin="${(t,e)=>t.handleFocus(e.event)}"
1462
1462
  @focusout="${(t,e)=>t.handleBlur(e.event)}"
1463
1463
  @click="${(t,e)=>t.handleClick(e.event)}"
1464
1464
  @selected-change="${(t,e)=>t.handleSelectedChange(e.event)}"
1465
1465
  >
1466
- <slot ${Xt("slottedTreeItems")}></slot>
1466
+ <slot ${Yt("slottedTreeItems")}></slot>
1467
1467
  </template>
1468
- `;class jr extends ei{constructor(){super(...arguments),this.currentFocused=null,this.handleFocus=t=>{if(!(this.slottedTreeItems.length<1))return t.target===this?(null===this.currentFocused&&(this.currentFocused=this.getValidFocusableItem()),void(null!==this.currentFocused&&Ur.focusItem(this.currentFocused))):void(this.contains(t.target)&&(this.setAttribute("tabindex","-1"),this.currentFocused=t.target))},this.handleBlur=t=>{t.target instanceof HTMLElement&&(null===t.relatedTarget||!this.contains(t.relatedTarget))&&this.setAttribute("tabindex","0")},this.handleKeyDown=t=>{if(t.defaultPrevented)return;if(this.slottedTreeItems.length<1)return!0;const e=this.getVisibleNodes();switch(t.key){case Ii:return void(e.length&&Ur.focusItem(e[0]));case ki:return void(e.length&&Ur.focusItem(e[e.length-1]));case yi:if(t.target&&this.isFocusableElement(t.target)){const e=t.target;e instanceof Ur&&e.childItemLength()>0&&e.expanded?e.expanded=!1:e instanceof Ur&&e.parentElement instanceof Ur&&Ur.focusItem(e.parentElement)}return!1;case Ci:if(t.target&&this.isFocusableElement(t.target)){const e=t.target;e instanceof Ur&&e.childItemLength()>0&&!e.expanded?e.expanded=!0:e instanceof Ur&&e.childItemLength()>0&&this.focusNextNode(1,t.target)}return;case bi:return void(t.target&&this.isFocusableElement(t.target)&&this.focusNextNode(1,t.target));case xi:return void(t.target&&this.isFocusableElement(t.target)&&this.focusNextNode(-1,t.target));case wi:return void this.handleClick(t)}return!0},this.handleSelectedChange=t=>{if(t.defaultPrevented)return;if(!(t.target instanceof Element&&qr(t.target)))return!0;const e=t.target;e.selected?(this.currentSelected&&this.currentSelected!==e&&(this.currentSelected.selected=!1),this.currentSelected=e):e.selected||this.currentSelected!==e||(this.currentSelected=null)},this.setItems=()=>{const t=this.treeView.querySelector("[aria-selected='true']");this.currentSelected=t,null!==this.currentFocused&&this.contains(this.currentFocused)||(this.currentFocused=this.getValidFocusableItem()),this.nested=this.checkForNestedItems();this.getVisibleNodes().forEach((t=>{qr(t)&&(t.nested=this.nested)}))},this.isFocusableElement=t=>qr(t),this.isSelectedElement=t=>t.selected}slottedTreeItemsChanged(){this.$fastController.isConnected&&this.setItems()}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),c.queueUpdate((()=>{this.setItems()}))}handleClick(t){if(t.defaultPrevented)return;if(!(t.target instanceof Element&&qr(t.target)))return!0;const e=t.target;e.disabled||(e.selected=!e.selected)}focusNextNode(t,e){const i=this.getVisibleNodes();if(!i)return;const s=i[i.indexOf(e)+t];hi(s)&&Ur.focusItem(s)}getValidFocusableItem(){const t=this.getVisibleNodes();let e=t.findIndex(this.isSelectedElement);return-1===e&&(e=t.findIndex(this.isFocusableElement)),-1!==e?t[e]:null}checkForNestedItems(){return this.slottedTreeItems.some((t=>qr(t)&&t.querySelector("[role='treeitem']")))}getVisibleNodes(){return function(t,e){if(!t||!e||!hi(t))return;return Array.from(t.querySelectorAll(e)).filter((t=>null!==t.offsetParent))}(this,"[role='treeitem']")||[]}}oe([lt({attribute:"render-collapsed-nodes"})],jr.prototype,"renderCollapsedNodes",void 0),oe([f],jr.prototype,"currentSelected",void 0),oe([f],jr.prototype,"slottedTreeItems",void 0);class Wr{constructor(t){this.listenerCache=new WeakMap,this.query=t}bind(t){const{query:e}=this,i=this.constructListener(t);i.bind(e)(),e.addListener(i),this.listenerCache.set(t,i)}unbind(t){const e=this.listenerCache.get(t);e&&(this.query.removeListener(e),this.listenerCache.delete(t))}}class Kr extends Wr{constructor(t,e){super(t),this.styles=e}static with(t){return e=>new Kr(t,e)}constructListener(t){let e=!1;const i=this.styles;return function(){const{matches:s}=this;s&&!e?(t.$fastController.addStyles(i),e=s):!s&&e&&(t.$fastController.removeStyles(i),e=s)}}unbind(t){super.unbind(t),t.$fastController.removeStyles(this.styles)}}const Yr=Kr.with(window.matchMedia("(forced-colors)")),Xr=Kr.with(window.matchMedia("(prefers-color-scheme: dark)")),Gr=Kr.with(window.matchMedia("(prefers-color-scheme: light)"));class Qr{constructor(t,e,i){this.propertyName=t,this.value=e,this.styles=i}bind(t){m.getNotifier(t).subscribe(this,this.propertyName),this.handleChange(t,this.propertyName)}unbind(t){m.getNotifier(t).unsubscribe(this,this.propertyName),t.$fastController.removeStyles(this.styles)}handleChange(t,e){t[e]===this.value?t.$fastController.addStyles(this.styles):t.$fastController.removeStyles(this.styles)}}const Zr="not-allowed",Jr=":host([hidden]){display:none}";function ta(t){return`${Jr}:host{display:${t}}`}const ea=function(){if("boolean"==typeof di)return di;if("undefined"==typeof window||!window.document||!window.document.createElement)return di=!1,di;const t=document.createElement("style"),e=function(){const t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}();null!==e&&t.setAttribute("nonce",e),document.head.appendChild(t);try{t.sheet.insertRule("foo:focus-visible {color:inherit}",0),di=!0}catch{di=!1}finally{document.head.removeChild(t)}return di}()?"focus-visible":"focus";export{t as $global,Vi as ARIAGlobalStatesAndProperties,Pi as Accordion,Li as AccordionExpandMode,ni as AccordionItem,Hi as Anchor,Ui as AnchoredRegion,w as AttachedBehaviorHTMLDirective,ot as AttributeConfiguration,at as AttributeDefinition,Zi as Avatar,ts as Badge,zn as BaseProgress,L as BindingBehavior,os as Breadcrumb,is as BreadcrumbItem,ms as Button,Ct as CSSDirective,gs as Calendar,Ss as CalendarTitleTemplate,Vs as Card,cs as CheckableFormAssociated,Bs as Checkbox,Gt as ChildrenBehavior,Qs as Combobox,Gs as ComboboxAutocomplete,Je as ComponentPresentation,me as Container,he as ContainerConfiguration,Ne as ContainerImpl,vt as Controller,pe as DI,c as DOM,$s as DataGrid,Es as DataGridCell,ys as DataGridCellTypes,xs as DataGridRow,Cs as DataGridRowTypes,vs as DateFormatter,ti as DefaultComponentPresentation,le as DefaultResolver,fs as DelegatesARIAButton,Zs as DelegatesARIACombobox,zi as DelegatesARIALink,Ws as DelegatesARIAListbox,_s as DelegatesARIAListboxOption,tr as DelegatesARIASearch,or as DelegatesARIASelect,Ln as DelegatesARIATextbox,Vr as DelegatesARIAToolbar,Eo as DesignSystem,Co as DesignToken,jo as Dialog,Qo as Disclosure,tn as Divider,Jo as DividerRole,xo as ElementDisambiguation,Y as ElementStyles,b as ExecutionContext,i as FAST,bt as FASTElement,ut as FASTElementDefinition,Fe as FactoryImpl,on as Flipper,en as FlipperDirection,Wi as FlyoutPosBottom,Xi as FlyoutPosBottomFill,Ki as FlyoutPosTallest,Gi as FlyoutPosTallestFill,ji as FlyoutPosTop,Yi as FlyoutPosTopFill,ds as FormAssociated,ei as FoundationElement,si as FoundationElementRegistry,bs as GenerateHeaderOptions,F as HTMLBindingDirective,C as HTMLDirective,_ as HTMLView,Kn as HorizontalScroll,js as Listbox,rn as ListboxElement,Us as ListboxOption,Wr as MatchMediaBehavior,Kr as MatchMediaStyleSheetBehavior,On as Menu,kn as MenuItem,$n as MenuItemRole,Vn as NumberField,m as Observable,bn as Picker,cn as PickerList,pn as PickerListItem,ln as PickerMenu,dn as PickerMenuOption,p as PropertyChangeNotifier,Qr as PropertyStyleSheetBehavior,Wn as Radio,qn as RadioGroup,Lt as RefBehavior,Ue as Registration,Ut as RepeatBehavior,_t as RepeatDirective,re as ResolverBuilder,Re as ResolverImpl,Jn as Search,sr as Select,Ks as SelectPosition,fe as ServiceLocator,ar as Skeleton,vr as Slider,cr as SliderLabel,fr as SliderMode,Yt as SlottedBehavior,Zt as StartEnd,u as SubscriberSet,Cr as Switch,Ir as Tab,wr as TabPanel,Tr as Tabs,Er as TabsOrientation,x as TargetedHTMLDirective,Ar as TextArea,Rr as TextAreaResize,Fn as TextField,Dn as TextFieldType,Mr as Toolbar,Nr as Tooltip,zr as TooltipPosition,Ur as TreeItem,jr as TreeView,j as ViewTemplate,se as accordionItemTemplate,ri as accordionTemplate,we as all,Mi as anchorTemplate,Ni as anchoredRegionTemplate,oi as applyMixins,lt as attr,Qi as avatarTemplate,Ji as badgeTemplate,nt as booleanConverter,es as breadcrumbItemTemplate,ss as breadcrumbTemplate,ns as buttonTemplate,As as calendarCellTemplate,Ds as calendarRowTemplate,Ps as calendarTemplate,Rs as calendarWeekdayTemplate,Ms as cardTemplate,Hs as checkboxTemplate,Qt as children,Js as comboboxTemplate,q as compileTemplate,eo as composedContains,to as composedParent,o as createMetadataLocator,wt as css,It as cssPartial,yt as customElement,Xr as darkModeStylesheetBehavior,Os as dataGridCellTemplate,Ts as dataGridRowTemplate,ws as dataGridTemplate,y as defaultExecutionContext,So as dialogTemplate,Zr as disabledCursor,Go as disclosureTemplate,ta as display,Zo as dividerTemplate,Wt as elements,s as emptyArray,Ft as enableArrayObservation,Jt as endSlotTemplate,ee as endTemplate,sn as flipperTemplate,ea as focusVisible,Yr as forcedColorsStylesheetBehavior,Bi as getDirection,Jr as hidden,Yn as horizontalScrollTemplate,K as html,Ee as ignore,ge as inject,Fs as interactiveCalendarGridTemplate,qs as isListboxOption,qr as isTreeItemElement,Ie as lazy,Gr as lightModeStylesheetBehavior,nn as listboxOptionTemplate,an as listboxTemplate,En as menuItemTemplate,Tn as menuTemplate,Te as newInstanceForScope,Oe as newInstanceOf,Ls as noninteractiveCalendarTemplate,rt as nullableNumberConverter,Sn as numberFieldTemplate,f as observable,ke as optional,wn as pickerListItemTemplate,xn as pickerListTemplate,Cn as pickerMenuOptionTemplate,yn as pickerMenuTemplate,mn as pickerTemplate,Q as prependToAdoptedStyleSheetsSymbol,Hn as progressRingTemplate,Nn as progressTemplate,Bn as radioGroupTemplate,Un as radioTemplate,Pt as ref,Xo as reflectAttributes,jt as repeat,In as roleForMenuItem,Gn as searchTemplate,nr as selectTemplate,xe as singleton,rr as skeletonTemplate,lr as sliderLabelTemplate,ur as sliderTemplate,Xt as slotted,te as startSlotTemplate,ie as startTemplate,ls as supportsElementInternals,gr as switchTemplate,xr as tabPanelTemplate,$r as tabTemplate,kr as tabsTemplate,Dr as textAreaTemplate,Fr as textFieldTemplate,Lr as toolbarTemplate,Hr as tooltipTemplate,ye as transient,Br as treeItemTemplate,_r as treeViewTemplate,_e as validateKey,v as volatile,zt as when,Xn as whitespaceFilter};
1468
+ `;class _r extends ti{constructor(){super(...arguments),this.currentFocused=null,this.handleFocus=t=>{if(!(this.slottedTreeItems.length<1))return t.target===this?(null===this.currentFocused&&(this.currentFocused=this.getValidFocusableItem()),void(null!==this.currentFocused&&qr.focusItem(this.currentFocused))):void(this.contains(t.target)&&(this.setAttribute("tabindex","-1"),this.currentFocused=t.target))},this.handleBlur=t=>{t.target instanceof HTMLElement&&(null===t.relatedTarget||!this.contains(t.relatedTarget))&&this.setAttribute("tabindex","0")},this.handleKeyDown=t=>{if(t.defaultPrevented)return;if(this.slottedTreeItems.length<1)return!0;const e=this.getVisibleNodes();switch(t.key){case $i:return void(e.length&&qr.focusItem(e[0]));case Ii:return void(e.length&&qr.focusItem(e[e.length-1]));case bi:if(t.target&&this.isFocusableElement(t.target)){const e=t.target;e instanceof qr&&e.childItemLength()>0&&e.expanded?e.expanded=!1:e instanceof qr&&e.parentElement instanceof qr&&qr.focusItem(e.parentElement)}return!1;case yi:if(t.target&&this.isFocusableElement(t.target)){const e=t.target;e instanceof qr&&e.childItemLength()>0&&!e.expanded?e.expanded=!0:e instanceof qr&&e.childItemLength()>0&&this.focusNextNode(1,t.target)}return;case gi:return void(t.target&&this.isFocusableElement(t.target)&&this.focusNextNode(1,t.target));case Ci:return void(t.target&&this.isFocusableElement(t.target)&&this.focusNextNode(-1,t.target));case xi:return void this.handleClick(t)}return!0},this.handleSelectedChange=t=>{if(t.defaultPrevented)return;if(!(t.target instanceof Element&&Br(t.target)))return!0;const e=t.target;e.selected?(this.currentSelected&&this.currentSelected!==e&&(this.currentSelected.selected=!1),this.currentSelected=e):e.selected||this.currentSelected!==e||(this.currentSelected=null)},this.setItems=()=>{const t=this.treeView.querySelector("[aria-selected='true']");this.currentSelected=t,null!==this.currentFocused&&this.contains(this.currentFocused)||(this.currentFocused=this.getValidFocusableItem()),this.nested=this.checkForNestedItems();this.getVisibleNodes().forEach((t=>{Br(t)&&(t.nested=this.nested)}))},this.isFocusableElement=t=>Br(t),this.isSelectedElement=t=>t.selected}slottedTreeItemsChanged(){this.$fastController.isConnected&&this.setItems()}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),c.queueUpdate((()=>{this.setItems()}))}handleClick(t){if(t.defaultPrevented)return;if(!(t.target instanceof Element&&Br(t.target)))return!0;const e=t.target;e.disabled||(e.selected=!e.selected)}focusNextNode(t,e){const i=this.getVisibleNodes();if(!i)return;const s=i[i.indexOf(e)+t];li(s)&&qr.focusItem(s)}getValidFocusableItem(){const t=this.getVisibleNodes();let e=t.findIndex(this.isSelectedElement);return-1===e&&(e=t.findIndex(this.isFocusableElement)),-1!==e?t[e]:null}checkForNestedItems(){return this.slottedTreeItems.some((t=>Br(t)&&t.querySelector("[role='treeitem']")))}getVisibleNodes(){return function(t,e){if(!t||!e||!li(t))return;return Array.from(t.querySelectorAll(e)).filter((t=>null!==t.offsetParent))}(this,"[role='treeitem']")||[]}}se([at({attribute:"render-collapsed-nodes"})],_r.prototype,"renderCollapsedNodes",void 0),se([f],_r.prototype,"currentSelected",void 0),se([f],_r.prototype,"slottedTreeItems",void 0);class jr{constructor(t){this.listenerCache=new WeakMap,this.query=t}bind(t){const{query:e}=this,i=this.constructListener(t);i.bind(e)(),e.addListener(i),this.listenerCache.set(t,i)}unbind(t){const e=this.listenerCache.get(t);e&&(this.query.removeListener(e),this.listenerCache.delete(t))}}class Wr extends jr{constructor(t,e){super(t),this.styles=e}static with(t){return e=>new Wr(t,e)}constructListener(t){let e=!1;const i=this.styles;return function(){const{matches:s}=this;s&&!e?(t.$fastController.addStyles(i),e=s):!s&&e&&(t.$fastController.removeStyles(i),e=s)}}unbind(t){super.unbind(t),t.$fastController.removeStyles(this.styles)}}const Kr=Wr.with(window.matchMedia("(forced-colors)")),Yr=Wr.with(window.matchMedia("(prefers-color-scheme: dark)")),Xr=Wr.with(window.matchMedia("(prefers-color-scheme: light)"));class Gr{constructor(t,e,i){this.propertyName=t,this.value=e,this.styles=i}bind(t){m.getNotifier(t).subscribe(this,this.propertyName),this.handleChange(t,this.propertyName)}unbind(t){m.getNotifier(t).unsubscribe(this,this.propertyName),t.$fastController.removeStyles(this.styles)}handleChange(t,e){t[e]===this.value?t.$fastController.addStyles(this.styles):t.$fastController.removeStyles(this.styles)}}const Qr="not-allowed",Zr=":host([hidden]){display:none}";function Jr(t){return`${Zr}:host{display:${t}}`}const ta=function(){if("boolean"==typeof hi)return hi;if("undefined"==typeof window||!window.document||!window.document.createElement)return hi=!1,hi;const t=document.createElement("style"),e=function(){const t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}();null!==e&&t.setAttribute("nonce",e),document.head.appendChild(t);try{t.sheet.insertRule("foo:focus-visible {color:inherit}",0),hi=!0}catch{hi=!1}finally{document.head.removeChild(t)}return hi}()?"focus-visible":"focus";export{t as $global,Mi as ARIAGlobalStatesAndProperties,Li as Accordion,Fi as AccordionExpandMode,oi as AccordionItem,Vi as Anchor,qi as AnchoredRegion,w as AttachedBehaviorHTMLDirective,st as AttributeConfiguration,rt as AttributeDefinition,Qi as Avatar,Ji as Badge,Hn as BaseProgress,L as BindingBehavior,ss as Breadcrumb,es as BreadcrumbItem,ps as Button,yt as CSSDirective,vs as Calendar,Os as CalendarTitleTemplate,Ms as Card,ds as CheckableFormAssociated,Ns as Checkbox,Xt as ChildrenBehavior,Gs as Combobox,Xs as ComboboxAutocomplete,Ze as ComponentPresentation,pe as Container,le as ContainerConfiguration,ze as ContainerImpl,ft as Controller,ue as DI,c as DOM,ws as DataGrid,ks as DataGridCell,bs as DataGridCellTypes,Cs as DataGridRow,ys as DataGridRowTypes,fs as DateFormatter,Je as DefaultComponentPresentation,ae as DefaultResolver,ms as DelegatesARIAButton,Qs as DelegatesARIACombobox,Hi as DelegatesARIALink,js as DelegatesARIAListbox,Us as DelegatesARIAListboxOption,Jn as DelegatesARIASearch,sr as DelegatesARIASelect,Fn as DelegatesARIATextbox,Mr as DelegatesARIAToolbar,ko as DesignSystem,yo as DesignToken,_o as Dialog,Go as Disclosure,Jo as Divider,Zo as DividerRole,Co as ElementDisambiguation,K as ElementStyles,b as ExecutionContext,i as FAST,gt as FASTElement,ct as FASTElementDefinition,Ae as FactoryImpl,sn as Flipper,tn as FlipperDirection,ji as FlyoutPosBottom,Yi as FlyoutPosBottomFill,Wi as FlyoutPosTallest,Xi as FlyoutPosTallestFill,_i as FlyoutPosTop,Ki as FlyoutPosTopFill,hs as FormAssociated,ti as FoundationElement,ii as FoundationElementRegistry,gs as GenerateHeaderOptions,F as HTMLBindingDirective,C as HTMLDirective,U as HTMLView,Wn as HorizontalScroll,_s as Listbox,nn as ListboxElement,qs as ListboxOption,jr as MatchMediaBehavior,Wr as MatchMediaStyleSheetBehavior,Tn as Menu,In as MenuItem,wn as MenuItemRole,Mn as NumberField,m as Observable,gn as Picker,dn as PickerList,un as PickerListItem,an as PickerMenu,hn as PickerMenuOption,p as PropertyChangeNotifier,Gr as PropertyStyleSheetBehavior,jn as Radio,Bn as RadioGroup,Ft as RefBehavior,qe as Registration,qt as RepeatBehavior,Ut as RepeatDirective,ne as ResolverBuilder,Se as ResolverImpl,Zn as Search,ir as Select,Ws as SelectPosition,me as ServiceLocator,rr as Skeleton,fr as Slider,dr as SliderLabel,mr as SliderMode,Kt as SlottedBehavior,Qt as StartEnd,u as SubscriberSet,yr as Switch,$r as Tab,xr as TabPanel,Er as Tabs,kr as TabsOrientation,x as TargetedHTMLDirective,Rr as TextArea,Sr as TextAreaResize,An as TextField,Dn as TextFieldType,Pr as Toolbar,zr as Tooltip,Hr as TooltipPosition,qr as TreeItem,_r as TreeView,_ as ViewTemplate,ie as accordionItemTemplate,ni as accordionTemplate,xe as all,Pi as anchorTemplate,zi as anchoredRegionTemplate,si as applyMixins,at as attr,Gi as avatarTemplate,Zi as badgeTemplate,ot as booleanConverter,ts as breadcrumbItemTemplate,is as breadcrumbTemplate,os as buttonTemplate,Rs as calendarCellTemplate,Ds as calendarRowTemplate,Ls as calendarTemplate,Ss as calendarWeekdayTemplate,Ps as cardTemplate,Vs as checkboxTemplate,Gt as children,Zs as comboboxTemplate,q as compileTemplate,to as composedContains,Js as composedParent,o as createMetadataLocator,xt as css,$t as cssPartial,bt as customElement,Yr as darkModeStylesheetBehavior,Ts as dataGridCellTemplate,Es as dataGridRowTemplate,xs as dataGridTemplate,y as defaultExecutionContext,Oo as dialogTemplate,Qr as disabledCursor,Xo as disclosureTemplate,Jr as display,Qo as dividerTemplate,jt as elements,s as emptyArray,At as enableArrayObservation,Zt as endSlotTemplate,te as endTemplate,en as flipperTemplate,ta as focusVisible,Kr as forcedColorsStylesheetBehavior,Ni as getDirection,Zr as hidden,Kn as horizontalScrollTemplate,W as html,ke as ignore,ve as inject,As as interactiveCalendarGridTemplate,Bs as isListboxOption,Br as isTreeItemElement,$e as lazy,Xr as lightModeStylesheetBehavior,on as listboxOptionTemplate,rn as listboxTemplate,kn as menuItemTemplate,En as menuTemplate,Ee as newInstanceForScope,Te as newInstanceOf,Fs as noninteractiveCalendarTemplate,nt as nullableNumberConverter,On as numberFieldTemplate,f as observable,Ie as optional,xn as pickerListItemTemplate,Cn as pickerListTemplate,yn as pickerMenuOptionTemplate,bn as pickerMenuTemplate,pn as pickerTemplate,G as prependToAdoptedStyleSheetsSymbol,Vn as progressRingTemplate,zn as progressTemplate,Nn as radioGroupTemplate,qn as radioTemplate,Lt as ref,Yo as reflectAttributes,_t as repeat,$n as roleForMenuItem,Xn as searchTemplate,or as selectTemplate,Ce as singleton,nr as skeletonTemplate,ar as sliderLabelTemplate,cr as sliderTemplate,Yt as slotted,Jt as startSlotTemplate,ee as startTemplate,as as supportsElementInternals,vr as switchTemplate,Cr as tabPanelTemplate,wr as tabTemplate,Ir as tabsTemplate,Dr as textAreaTemplate,Ar as textFieldTemplate,Fr as toolbarTemplate,Vr as tooltipTemplate,be as transient,Nr as treeItemTemplate,Ur as treeViewTemplate,Ue as validateKey,v as volatile,Ht as when,Yn as whitespaceFilter};