@fluentui/web-components 3.0.0-beta.128 → 3.0.0-beta.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -2
- package/dist/esm/menu/menu.js +3 -1
- package/dist/esm/menu/menu.js.map +1 -1
- package/dist/web-components.js +3 -1
- package/dist/web-components.min.js +44 -44
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElements});let Ho;const is="fast-kernel";try{if(document.currentScript)Ho=document.currentScript.getAttribute(is);else{const o=document.getElementsByTagName("script");Ho=o[o.length-1].getAttribute(is)}}catch{Ho="isolate"}let dt;switch(Ho){case"share":dt=Object.freeze({updateQueue:1,observable:2,contextEvent:3,elementRegistry:4});break;case"share-v2":dt=Object.freeze({updateQueue:1.2,observable:2.2,contextEvent:3.2,elementRegistry:4.2});break;default:const o=`-${Math.random().toString(36).substring(2,8)}`;dt=Object.freeze({updateQueue:`1.2${o}`,observable:`2.2${o}`,contextEvent:`3.2${o}`,elementRegistry:`4.2${o}`});break}const Ot=o=>typeof o=="function",Ge=o=>typeof o=="string",Ba=()=>{};var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};(function(){if(!(typeof globalThis<"u"))if(typeof Xi<"u")Xi.globalThis=Xi;else if(typeof self<"u")self.globalThis=self;else if(typeof window<"u")window.globalThis=window;else{const e=new Function("return this")();e.globalThis=e}})();const rs={configurable:!1,enumerable:!1,writable:!1};globalThis.FAST===void 0&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},rs));const ie=globalThis.FAST;if(ie.getById===void 0){const o=Object.create(null);Reflect.defineProperty(ie,"getById",Object.assign({value(e,t){let i=o[e];return i===void 0&&(i=t?o[e]=t():null),i}},rs))}ie.error===void 0&&Object.assign(ie,{warn(){},error(o){return new Error(`Error ${o}`)},addMessages(){}});const Oa=Object.freeze([]);function Ki(){const o=new Map;return Object.freeze({register(e){return o.has(e.type)?!1:(o.set(e.type,e),!0)},getByType(e){return o.get(e)},getForInstance(e){if(e!=null)return o.get(e.constructor)}})}function ss(){const o=new WeakMap;return function(e){let t=o.get(e);if(t===void 0){let i=Reflect.getPrototypeOf(e);for(;t===void 0&&i!==null;)t=o.get(i),i=Reflect.getPrototypeOf(i);t=t===void 0?[]:t.slice(0),o.set(e,t)}return t}}function ht(o){o.prototype.toJSON=Ba}const Y=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),ns=o=>o,_a=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:ns}):{createHTML:ns};let Vo=Object.freeze({createHTML(o){return _a.createHTML(o)},protect(o,e,t,i){return i}});const Aa=Vo,ut=Object.freeze({get policy(){return Vo},setPolicy(o){if(Vo!==Aa)throw ie.error(1201);Vo=o},setAttribute(o,e,t){t==null?o.removeAttribute(e):o.setAttribute(e,t)},setBooleanAttribute(o,e,t){t?o.setAttribute(e,""):o.removeAttribute(e)}}),Q=ie.getById(dt.updateQueue,()=>{const o=[],e=[],t=globalThis.requestAnimationFrame;let i=!0;function r(){if(e.length)throw e.shift()}function s(h){try{h.call()}catch(d){if(i)e.push(d),setTimeout(r,0);else throw o.length=0,d}}function n(){let d=0;for(;d<o.length;)if(s(o[d]),d++,d>1024){for(let l=0,f=o.length-d;l<f;l++)o[l]=o[l+d];o.length-=d,d=0}o.length=0}function c(h){o.push(h),o.length<2&&(i?t(n):n())}return Object.freeze({enqueue:c,next:()=>new Promise(c),process:n,setMode:h=>i=h})});class Yi{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return this.spillover===void 0?this.sub1===e||this.sub2===e:this.spillover.indexOf(e)!==-1}subscribe(e){const t=this.spillover;if(t===void 0){if(this.has(e))return;if(this.sub1===void 0){this.sub1=e;return}if(this.sub2===void 0){this.sub2=e;return}this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else t.indexOf(e)===-1&&t.push(e)}unsubscribe(e){const t=this.spillover;if(t===void 0)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const i=t.indexOf(e);i!==-1&&t.splice(i,1)}}notify(e){const t=this.spillover,i=this.subject;if(t===void 0){const r=this.sub1,s=this.sub2;r!==void 0&&r.handleChange(i,e),s!==void 0&&s.handleChange(i,e)}else for(let r=0,s=t.length;r<s;++r)t[r].handleChange(i,e)}}class as{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,i;(t=this.subscribers[e])===null||t===void 0||t.notify(e),(i=this.subjectSubscribers)===null||i===void 0||i.notify(e)}subscribe(e,t){var i,r;let s;t?s=(i=this.subscribers[t])!==null&&i!==void 0?i:this.subscribers[t]=new Yi(this.subject):s=(r=this.subjectSubscribers)!==null&&r!==void 0?r:this.subjectSubscribers=new Yi(this.subject),s.subscribe(e)}unsubscribe(e,t){var i,r;t?(i=this.subscribers[t])===null||i===void 0||i.unsubscribe(e):(r=this.subjectSubscribers)===null||r===void 0||r.unsubscribe(e)}}const Lo=Object.freeze({unknown:void 0,coupled:1}),m=ie.getById(dt.observable,()=>{const o=Q.enqueue,e=/(:|&&|\|\||if|\?\.)/,t=new WeakMap;let i,r=d=>{throw ie.error(1101)};function s(d){var l;let f=(l=d.$fastController)!==null&&l!==void 0?l:t.get(d);return f===void 0&&(Array.isArray(d)?f=r(d):t.set(d,f=new as(d))),f}const n=ss();class c{constructor(l){this.name=l,this.field=`_${l}`,this.callback=`${l}Changed`}getValue(l){return i!==void 0&&i.watch(l,this.name),l[this.field]}setValue(l,f){const w=this.field,be=l[w];if(be!==f){l[w]=f;const et=l[this.callback];Ot(et)&&et.call(l,be,f),s(l).notify(this.name)}}}class h extends Yi{constructor(l,f,w=!1){super(l,f),this.expression=l,this.isVolatileBinding=w,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(l){this.isAsync=this.needsQueue=l}bind(l){this.controller=l;const f=this.observe(l.source,l.context);return!l.isBound&&this.requiresUnbind(l)&&l.onUnbind(this),f}requiresUnbind(l){return l.sourceLifetime!==Lo.coupled||this.first!==this.last||this.first.propertySource!==l.source}unbind(l){this.dispose()}observe(l,f){this.needsRefresh&&this.last!==null&&this.dispose();const w=i;i=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let be;try{be=this.expression(l,f)}finally{i=w}return be}disconnect(){this.dispose()}dispose(){if(this.last!==null){let l=this.first;for(;l!==void 0;)l.notifier.unsubscribe(this,l.propertyName),l=l.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(l,f){const w=this.last,be=s(l),et=w===null?this.first:{};if(et.propertySource=l,et.propertyName=f,et.notifier=be,be.subscribe(this,f),w!==null){if(!this.needsRefresh){let os;i=void 0,os=w.propertySource[w.propertyName],i=this,l===os&&(this.needsRefresh=!0)}w.next=et}this.last=et}handleChange(){this.needsQueue?(this.needsQueue=!1,o(this)):this.isAsync||this.call()}call(){this.last!==null&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let l=this.first;for(;l!==void 0;)yield l,l=l.next}}return ht(h),Object.freeze({setArrayObserverFactory(d){r=d},getNotifier:s,track(d,l){i&&i.watch(d,l)},trackVolatile(){i&&(i.needsRefresh=!0)},notify(d,l){s(d).notify(l)},defineProperty(d,l){Ge(l)&&(l=new c(l)),n(d).push(l),Reflect.defineProperty(d,l.name,{enumerable:!0,get(){return l.getValue(this)},set(f){l.setValue(this,f)}})},getAccessors:n,binding(d,l,f=this.isVolatileBinding(d)){return new h(d,l,f)},isVolatileBinding(d){return e.test(d.toString())}})});function g(o,e){m.defineProperty(o,e)}function ls(o,e,t){return Object.assign({},t,{get(){return m.trackVolatile(),t.get.apply(this)}})}const cs=ie.getById(dt.contextEvent,()=>{let o=null;return{get(){return o},set(e){o=e}}}),_t=Object.freeze({default:{index:0,length:0,get event(){return _t.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent(){return cs.get()},setEvent(o){cs.set(o)}});class jo{constructor(e,t,i=!1){this.evaluate=e,this.policy=t,this.isVolatile=i}}class Ea extends jo{createObserver(e){return m.binding(this.evaluate,e,this.isVolatile)}}function Qi(o,e,t=m.isVolatileBinding(o)){return new Ea(o,e,t)}class ds extends jo{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}ht(ds);function hs(o,e){return new ds(o,e)}let us;function ps(o){return o.map(e=>e instanceof we?ps(e.styles):[e]).reduce((e,t)=>e.concat(t),[])}class we{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map(t=>t instanceof we?t.behaviors:null).reduce((t,i)=>i===null?t:t===null?i:t.concat(i),null)}get strategy(){return this._strategy===null&&this.withStrategy(us),this._strategy}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=this.behaviors===null?e:this.behaviors.concat(e),this}withStrategy(e){return this._strategy=new e(ps(this.styles)),this}static setDefaultStrategy(e){us=e}static normalize(e){return e===void 0?void 0:Array.isArray(e)?new we(e):e instanceof we?e:new we([e])}}we.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const Zi=Ki(),Ji=Object.freeze({getForInstance:Zi.getForInstance,getByType:Zi.getByType,define(o){return Zi.register({type:o}),o}});function er(o,e,t){e.source.style.setProperty(o.targetAspect,t.bind(e))}class tr{constructor(e,t){this.dataBinding=e,this.targetAspect=t}createCSS(e){return e(this),`var(${this.targetAspect})`}addedCallback(e){var t;const i=e.source;if(!i.$cssBindings){i.$cssBindings=new Map;const s=i.setAttribute;i.setAttribute=(n,c)=>{s.call(i,n,c),n==="style"&&i.$cssBindings.forEach((h,d)=>er(d,h.controller,h.observer))}}const r=(t=e[this.targetAspect])!==null&&t!==void 0?t:e[this.targetAspect]=this.dataBinding.createObserver(this,this);r.controller=e,e.source.$cssBindings.set(this,{controller:e,observer:r})}connectedCallback(e){er(this,e,e[this.targetAspect])}removedCallback(e){e.source.$cssBindings&&e.source.$cssBindings.delete(this)}handleChange(e,t){er(this,t.controller,t)}}Ji.define(tr);const Na=`${Math.random().toString(36).substring(2,8)}`;let Fa=0;const bs=()=>`--v${Na}${++Fa}`;function gs(o,e){const t=[];let i="";const r=[],s=n=>{r.push(n)};for(let n=0,c=o.length-1;n<c;++n){i+=o[n];let h=e[n];Ot(h)?h=new tr(Qi(h),bs()).createCSS(s):h instanceof jo?h=new tr(h,bs()).createCSS(s):Ji.getForInstance(h)!==void 0&&(h=h.createCSS(s)),h instanceof we||h instanceof CSSStyleSheet?(i.trim()!==""&&(t.push(i),i=""),t.push(h)):i+=h}return i+=o[o.length-1],i.trim()!==""&&t.push(i),{styles:t,behaviors:r}}const u=(o,...e)=>{const{styles:t,behaviors:i}=gs(o,e),r=new we(t);return i.length?r.withBehaviors(...i):r};class fs{constructor(e,t){this.behaviors=t,this.css="";const i=e.reduce((r,s)=>(Ge(s)?this.css+=s:r.push(s),r),[]);i.length&&(this.styles=new we(i))}createCSS(e){return this.behaviors.forEach(e),this.styles&&e(this),this.css}addedCallback(e){e.addStyles(this.styles)}removedCallback(e){e.removeStyles(this.styles)}}Ji.define(fs),u.partial=(o,...e)=>{const{styles:t,behaviors:i}=gs(o,e);return new fs(t,i)};const ms=/fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/,vs=/fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/,$s=/fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/,ys=/fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/,xs=/^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/,ks=/fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;function ws(o){return o&&o.nodeType===Node.COMMENT_NODE}const Ne=Object.freeze({attributeMarkerName:"data-fe-b",attributeBindingSeparator:" ",contentBindingStartMarker(o,e){return`fe-b$$start$$${o}$$${e}$$fe-b`},contentBindingEndMarker(o,e){return`fe-b$$end$$${o}$$${e}$$fe-b`},repeatStartMarker(o){return`fe-repeat$$start$$${o}$$fe-repeat`},repeatEndMarker(o){return`fe-repeat$$end$$${o}$$fe-repeat`},isContentBindingStartMarker(o){return ms.test(o)},isContentBindingEndMarker(o){return vs.test(o)},isRepeatViewStartMarker(o){return $s.test(o)},isRepeatViewEndMarker(o){return ys.test(o)},isElementBoundaryStartMarker(o){return ws(o)&&xs.test(o.data.trim())},isElementBoundaryEndMarker(o){return ws(o)&&ks.test(o.data)},parseAttributeBinding(o){const e=o.getAttribute(this.attributeMarkerName);return e===null?e:e.split(this.attributeBindingSeparator).map(t=>parseInt(t))},parseContentBindingStartMarker(o){return Is(ms,o)},parseContentBindingEndMarker(o){return Is(vs,o)},parseRepeatStartMarker(o){return Cs($s,o)},parseRepeatEndMarker(o){return Cs(ys,o)},parseElementBoundaryStartMarker(o){return Ss(xs,o.trim())},parseElementBoundaryEndMarker(o){return Ss(ks,o)}});function Cs(o,e){const t=o.exec(e);return t===null?t:parseInt(t[1])}function Ss(o,e){const t=o.exec(e);return t===null?t:t[1]}function Is(o,e){const t=o.exec(e);return t===null?t:[parseInt(t[1]),t[2]]}const Ro=Symbol.for("fe-hydration");function qo(o){return o[Ro]===Ro}const or=`fast-${Math.random().toString(36).substring(2,8)}`,Wo=`${or}{`,no=`}${or}`,Ma=no.length;let Da=0;const ao=()=>`${or}-${++Da}`,Ps=Object.freeze({interpolation:o=>`${Wo}${o}${no}`,attribute:o=>`${ao()}="${Wo}${o}${no}"`,comment:o=>`<!--${Wo}${o}${no}-->`}),Go=Object.freeze({parse(o,e){const t=o.split(Wo);if(t.length===1)return null;const i=[];for(let r=0,s=t.length;r<s;++r){const n=t[r],c=n.indexOf(no);let h;if(c===-1)h=n;else{const d=n.substring(0,c);i.push(e[d]),h=n.substring(c+Ma)}h!==""&&i.push(h)}return i}}),ir=Ki(),Fe=Object.freeze({getForInstance:ir.getForInstance,getByType:ir.getByType,define(o,e){return e=e||{},e.type=o,ir.register(e),o},assignAspect(o,e){if(!e){o.aspectType=Y.content;return}switch(o.sourceAspect=e,e[0]){case":":o.targetAspect=e.substring(1),o.aspectType=o.targetAspect==="classList"?Y.tokenList:Y.property;break;case"?":o.targetAspect=e.substring(1),o.aspectType=Y.booleanAttribute;break;case"@":o.targetAspect=e.substring(1),o.aspectType=Y.event;break;default:o.targetAspect=e,o.aspectType=Y.attribute;break}}});class rr{constructor(e){this.options=e}createHTML(e){return Ps.attribute(e(this))}createBehavior(){return this}}ht(rr);class zs extends Error{constructor(e,t,i){super(e),this.factories=t,this.node=i}}function sr(o){return o.nodeType===Node.COMMENT_NODE}function Ts(o){return o.nodeType===Node.TEXT_NODE}function Bs(o,e){const t=document.createRange();return t.setStart(o,0),t.setEnd(e,sr(e)||Ts(e)?e.data.length:e.childNodes.length),t}function Ha(o){return o instanceof DocumentFragment&&"mode"in o}function Va(o,e,t){const i=Bs(o,e),r=i.commonAncestorContainer,s=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode(d){return i.comparePoint(d,0)===0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),n={},c={};let h=s.currentNode=o;for(;h!==null;){switch(h.nodeType){case Node.ELEMENT_NODE:{La(h,t,n);break}case Node.COMMENT_NODE:{ja(h,s,t,n,c);break}}h=s.nextNode()}return i.detach(),{targets:n,boundaries:c}}function La(o,e,t){const i=Ne.parseAttributeBinding(o);if(i!==null){for(const r of i){if(!e[r])throw new zs(`HydrationView was unable to successfully target factory on ${o.nodeName} inside ${o.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`,e,o);Uo(e[r],o,t)}o.removeAttribute(Ne.attributeMarkerName)}}function ja(o,e,t,i,r){if(Ne.isElementBoundaryStartMarker(o)){Ra(o,e);return}if(Ne.isContentBindingStartMarker(o.data)){const s=Ne.parseContentBindingStartMarker(o.data);if(s===null)return;const[n,c]=s,h=t[n],d=[];let l=e.nextSibling();o.data="";const f=l;for(;l!==null;){if(sr(l)){const w=Ne.parseContentBindingEndMarker(l.data);if(w&&w[1]===c)break}d.push(l),l=e.nextSibling()}if(l===null){const w=o.getRootNode();throw new Error(`Error hydrating Comment node inside "${Ha(w)?w.host.nodeName:w.nodeName}".`)}if(l.data="",d.length===1&&Ts(d[0]))Uo(h,d[0],i);else{l!==f&&l.previousSibling!==null&&(r[h.targetNodeId]={first:f,last:l.previousSibling});const w=l.parentNode.insertBefore(document.createTextNode(""),l);Uo(h,w,i)}}}function Ra(o,e){const t=Ne.parseElementBoundaryStartMarker(o.data);let i=e.nextSibling();for(;i!==null;){if(sr(i)){const r=Ne.parseElementBoundaryEndMarker(i.data);if(r&&r===t)break}i=e.nextSibling()}}function Uo(o,e,t){if(o.targetNodeId===void 0)throw new Error("Factory could not be target to the node");t[o.targetNodeId]=e}var Os;function nr(o,e){const t=o.parentNode;let i=o,r;for(;i!==e;){if(r=i.nextSibling,!r)throw new Error(`Unmatched first/last child inside "${e.getRootNode().host.nodeName}".`);t.removeChild(i),i=r}t.removeChild(e)}class _s{constructor(){this.index=0,this.length=0}get event(){return _t.getEvent()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}}class Xo extends _s{constructor(e,t,i){super(),this.fragment=e,this.factories=t,this.targets=i,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=Lo.unknown,this.context=this,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const i=e.parentNode;let r=this.firstChild,s;for(;r!==t;)s=r.nextSibling,i.insertBefore(r,e),r=s;i.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let i=this.firstChild,r;for(;i!==t;)r=i.nextSibling,e.appendChild(i),i=r;e.appendChild(t)}dispose(){nr(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let i=this.behaviors;if(i===null){this.source=e,this.context=t,this.behaviors=i=new Array(this.factories.length);const r=this.factories;for(let s=0,n=r.length;s<n;++s){const c=r[s].createBehavior();c.bind(this),i[s]=c}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let r=0,s=i.length;r<s;++r)i[r].bind(this)}this.isBound=!0}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,i=e.length;t<i;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(e.length!==0){nr(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,i=e.length;t<i;++t)e[t].unbind()}}}ht(Xo),m.defineProperty(Xo.prototype,"index"),m.defineProperty(Xo.prototype,"length");const At={unhydrated:"unhydrated",hydrating:"hydrating",hydrated:"hydrated"};class qa extends Error{constructor(e,t,i,r){super(e),this.factory=t,this.fragment=i,this.templateString=r}}class Wa extends _s{constructor(e,t,i,r){super(),this.firstChild=e,this.lastChild=t,this.sourceTemplate=i,this.hostBindingTarget=r,this[Os]=Ro,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=Lo.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=At.unhydrated,this._bindingViewBoundaries={},this._targets={},this.factories=i.compile().factories}get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}insertBefore(e){if(this.fragment!==null)if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const i=e.parentNode;let r=this.firstChild,s;for(;r!==t;)s=r.nextSibling,i.insertBefore(r,e),r=s;i.insertBefore(t,e)}}appendTo(e){this.fragment!==null&&e.appendChild(this.fragment)}remove(){const e=this.fragment||(this.fragment=document.createDocumentFragment()),t=this.lastChild;let i=this.firstChild,r;for(;i!==t;){if(r=i.nextSibling,!r)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);e.appendChild(i),i=r}e.appendChild(t)}bind(e,t=this){var i,r;if(this.hydrationStage!==At.hydrated&&(this._hydrationStage=At.hydrating),this.source===e)return;let s=this.behaviors;if(s===null){this.source=e,this.context=t;try{const{targets:c,boundaries:h}=Va(this.firstChild,this.lastChild,this.factories);this._targets=c,this._bindingViewBoundaries=h}catch(c){if(c instanceof zs){let h=this.sourceTemplate.html;typeof h!="string"&&(h=h.innerHTML),c.templateString=h}throw c}this.behaviors=s=new Array(this.factories.length);const n=this.factories;for(let c=0,h=n.length;c<h;++c){const d=n[c];if(d.targetNodeId==="h"&&this.hostBindingTarget&&Uo(d,this.hostBindingTarget,this._targets),d.targetNodeId in this.targets){const l=d.createBehavior();l.bind(this),s[c]=l}else{let l=this.sourceTemplate.html;throw typeof l!="string"&&(l=l.innerHTML),new qa(`HydrationView was unable to successfully target bindings inside "${(r=((i=this.firstChild)===null||i===void 0?void 0:i.getRootNode()).host)===null||r===void 0?void 0:r.nodeName}".`,d,Bs(this.firstChild,this.lastChild).cloneContents(),l)}}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let n=0,c=s.length;n<c;++n)s[n].bind(this)}this.isBound=!0,this._hydrationStage=At.hydrated}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){nr(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,i=e.length;t<i;++t)e[t].unbind(this);e.length=0}}Os=Ro,ht(Wa);function Ga(o){return o.create!==void 0}function Ua(o,e,t,i){if(t==null&&(t=""),Ga(t)){o.textContent="";let r=o.$fastView;if(r===void 0)if(qo(i)&&qo(t)&&i.bindingViewBoundaries[this.targetNodeId]!==void 0&&i.hydrationStage!==At.hydrated){const s=i.bindingViewBoundaries[this.targetNodeId];r=t.hydrate(s.first,s.last)}else r=t.create();else o.$fastTemplate!==t&&(r.isComposed&&(r.remove(),r.unbind()),r=t.create());r.isComposed?r.needsBindOnly&&(r.needsBindOnly=!1,r.bind(i.source,i.context)):(r.isComposed=!0,r.bind(i.source,i.context),r.insertBefore(o),o.$fastView=r,o.$fastTemplate=t)}else{const r=o.$fastView;r!==void 0&&r.isComposed&&(r.isComposed=!1,r.remove(),r.needsBindOnly?r.needsBindOnly=!1:r.unbind()),o.textContent=t}}function Xa(o,e,t){var i;const r=`${this.id}-t`,s=(i=o[r])!==null&&i!==void 0?i:o[r]={v:0,cv:Object.create(null)},n=s.cv;let c=s.v;const h=o[e];if(t!=null&&t.length){const d=t.split(/\s+/);for(let l=0,f=d.length;l<f;++l){const w=d[l];w!==""&&(n[w]=c,h.add(w))}}if(s.v=c+1,c!==0){c-=1;for(const d in n)n[d]===c&&h.remove(d)}}const Ka={[Y.attribute]:ut.setAttribute,[Y.booleanAttribute]:ut.setBooleanAttribute,[Y.property]:(o,e,t)=>o[e]=t,[Y.content]:Ua,[Y.tokenList]:Xa,[Y.event]:()=>{}};class Et{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=Y.content}createHTML(e){return Ps.interpolation(e(this))}createBehavior(){var e;if(this.updateTarget===null){const t=Ka[this.aspectType],i=(e=this.dataBinding.policy)!==null&&e!==void 0?e:this.policy;if(!t)throw ie.error(1205);this.data=`${this.id}-d`,this.updateTarget=i.protect(this.targetTagName,this.aspectType,this.targetAspect,t)}return this}bind(e){var t;const i=e.targets[this.targetNodeId],r=qo(e)&&e.hydrationStage&&e.hydrationStage!==At.hydrated;switch(this.aspectType){case Y.event:i[this.data]=e,i.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case Y.content:e.onUnbind(this);default:const s=(t=i[this.data])!==null&&t!==void 0?t:i[this.data]=this.dataBinding.createObserver(this,this);if(s.target=i,s.controller=e,r&&(this.aspectType===Y.attribute||this.aspectType===Y.booleanAttribute)){s.bind(e);break}this.updateTarget(i,this.targetAspect,s.bind(e),e);break}}unbind(e){const i=e.targets[this.targetNodeId].$fastView;i!==void 0&&i.isComposed&&(i.unbind(),i.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){_t.setEvent(e);const i=this.dataBinding.evaluate(t.source,t.context);_t.setEvent(null),i!==!0&&e.preventDefault()}}handleChange(e,t){const i=t.target,r=t.controller;this.updateTarget(i,this.targetAspect,t.bind(r),r)}}Fe.define(Et,{aspected:!0});const As=(o,e)=>`${o}.${e}`,Es={},Me={index:0,node:null};function Ns(o){o.startsWith("fast-")||ie.warn(1204,{name:o})}const Ya=new Proxy(document.createElement("div"),{get(o,e){Ns(e);const t=Reflect.get(o,e);return Ot(t)?t.bind(o):t},set(o,e,t){return Ns(e),Reflect.set(o,e,t)}});class Qa{constructor(e,t,i){this.fragment=e,this.directives=t,this.policy=i,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,i,r,s){var n,c;this.nodeIds.has(i)||(this.nodeIds.add(i),this.addTargetDescriptor(t,i,r)),e.id=(n=e.id)!==null&&n!==void 0?n:ao(),e.targetNodeId=i,e.targetTagName=s,e.policy=(c=e.policy)!==null&&c!==void 0?c:this.policy,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,i){const r=this.descriptors;if(t==="r"||t==="h"||r[t])return;if(!r[e]){const n=e.lastIndexOf("."),c=e.substring(0,n),h=parseInt(e.substring(n+1));this.addTargetDescriptor(c,e,h)}let s=Es[t];if(!s){const n=`_${t}`;Es[t]=s={get(){var c;return(c=this[n])!==null&&c!==void 0?c:this[n]=this[e].childNodes[i]}}}r[t]=s}createView(e){const t=this.fragment.cloneNode(!0),i=Object.create(this.proto);i.r=t,i.h=e??Ya;for(const r of this.nodeIds)i[r];return new Xo(t,this.factories,i)}}function Fs(o,e,t,i,r,s=!1){const n=t.attributes,c=o.directives;for(let h=0,d=n.length;h<d;++h){const l=n[h],f=l.value,w=Go.parse(f,c);let be=null;w===null?s&&(be=new Et(hs(()=>f,o.policy)),Fe.assignAspect(be,l.name)):be=ar.aggregate(w,o.policy),be!==null&&(t.removeAttributeNode(l),h--,d--,o.addFactory(be,e,i,r,t.tagName))}}function Za(o,e,t,i,r){const s=Go.parse(e.textContent,o.directives);if(s===null)return Me.node=e.nextSibling,Me.index=r+1,Me;let n,c=n=e;for(let h=0,d=s.length;h<d;++h){const l=s[h];h!==0&&(r++,i=As(t,r),n=c.parentNode.insertBefore(document.createTextNode(""),c.nextSibling)),Ge(l)?n.textContent=l:(n.textContent=" ",Fe.assignAspect(l),o.addFactory(l,t,i,r,null)),c=n}return Me.index=r+1,Me.node=c.nextSibling,Me}function Ms(o,e,t){let i=0,r=e.firstChild;for(;r;){const s=Ja(o,t,r,i);r=s.node,i=s.index}}function Ja(o,e,t,i){const r=As(e,i);switch(t.nodeType){case 1:Fs(o,e,t,r,i),Ms(o,t,r);break;case 3:return Za(o,t,e,r,i);case 8:const s=Go.parse(t.data,o.directives);s!==null&&o.addFactory(ar.aggregate(s),e,r,i,null);break}return Me.index=i+1,Me.node=t.nextSibling,Me}function el(o,e){return o&&o.nodeType==8&&Go.parse(o.data,e)!==null}const Ds="TEMPLATE",ar={compile(o,e,t=ut.policy){let i;if(Ge(o)){i=document.createElement(Ds),i.innerHTML=t.createHTML(o);const n=i.content.firstElementChild;n!==null&&n.tagName===Ds&&(i=n)}else i=o;!i.content.firstChild&&!i.content.lastChild&&i.content.appendChild(document.createComment(""));const r=document.adoptNode(i.content),s=new Qa(r,e,t);return Fs(s,"",i,"h",0,!0),(el(r.firstChild,e)||r.childNodes.length===1&&Object.keys(e).length>0)&&r.insertBefore(document.createComment(""),r.firstChild),Ms(s,r,"r"),Me.node=null,s.freeze()},setDefaultStrategy(o){this.compile=o},aggregate(o,e=ut.policy){if(o.length===1)return o[0];let t,i=!1,r;const s=o.length,n=o.map(d=>Ge(d)?()=>d:(t=d.sourceAspect||t,i=i||d.dataBinding.isVolatile,r=r||d.dataBinding.policy,d.dataBinding.evaluate)),c=(d,l)=>{let f="";for(let w=0;w<s;++w)f+=n[w](d,l);return f},h=new Et(Qi(c,r??e,i));return Fe.assignAspect(h,t),h}},tl=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,ol=Object.create(null);class pt{constructor(e,t=ol){this.html=e,this.factories=t}createHTML(e){const t=this.factories;for(const i in t)e(t[i]);return this.html}}pt.empty=new pt(""),Fe.define(pt);function il(o,e,t,i=Fe.getForInstance(o)){if(i.aspected){const r=tl.exec(e);r!==null&&Fe.assignAspect(o,r[2])}return o.createHTML(t)}class Wi{constructor(e,t={},i){this.policy=i,this.result=null,this.html=e,this.factories=t}compile(){return this.result===null&&(this.result=ar.compile(this.html,this.factories,this.policy)),this.result}create(e){return this.compile().createView(e)}inline(){return new pt(Ge(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(e){if(this.result)throw ie.error(1208);if(this.policy)throw ie.error(1207);return this.policy=e,this}render(e,t,i){const r=this.create(i);return r.bind(e),r.appendTo(t),r}static create(e,t,i){let r="";const s=Object.create(null),n=c=>{var h;const d=(h=c.id)!==null&&h!==void 0?h:c.id=ao();return s[d]=c,d};for(let c=0,h=e.length-1;c<h;++c){const d=e[c];let l=t[c],f;if(r+=d,Ot(l))l=new Et(Qi(l));else if(l instanceof jo)l=new Et(l);else if(!(f=Fe.getForInstance(l))){const w=l;l=new Et(hs(()=>w))}r+=il(l,d,n,f)}return new Wi(r+e[e.length-1],s,i)}}ht(Wi);const b=(o,...e)=>{if(Array.isArray(o)&&Array.isArray(o.raw))return Wi.create(o,e);throw ie.error(1206)};b.partial=o=>new pt(o);class Hs extends rr{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}Fe.define(Hs);const E=o=>new Hs(o),rl=o=>o.nodeType===1,lo=o=>o?e=>e.nodeType===1&&e.matches(o):rl;class sl extends rr{get id(){return this._id}set id(e){this._id=e,this._controllerProperty=`${e}-c`}bind(e){const t=e.targets[this.targetNodeId];t[this._controllerProperty]=e,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.targetNodeId];this.updateTarget(e.source,Oa),this.disconnect(t),t[this._controllerProperty]=null}getSource(e){return e[this._controllerProperty].source}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}const Vs="slotchange";class Ls extends sl{observe(e){e.addEventListener(Vs,this)}disconnect(e){e.removeEventListener(Vs,this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}Fe.define(Ls);function G(o){return Ge(o)&&(o={property:o}),new Ls(o)}const js="boolean",Rs="reflect",Ko=Object.freeze({locate:ss()}),nl={toView(o){return o?"true":"false"},fromView(o){return!(o==null||o==="false"||o===!1||o===0)}};function qs(o){if(o==null)return null;const e=o*1;return isNaN(e)?null:e}const re={toView(o){const e=qs(o);return e&&e.toString()},fromView:qs};class Gi{constructor(e,t,i=t.toLowerCase(),r=Rs,s){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=i,this.mode=r,this.converter=s,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,r===js&&s===void 0&&(this.converter=nl)}setValue(e,t){const i=e[this.fieldName],r=this.converter;r!==void 0&&(t=r.fromView(t)),i!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](i,t),e.$fastController.notify(this.name))}getValue(e){return m.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,i=this.guards;i.has(e)||t==="fromView"||Q.enqueue(()=>{i.add(e);const r=e[this.fieldName];switch(t){case Rs:const s=this.converter;ut.setAttribute(e,this.attribute,s!==void 0?s.toView(r):r);break;case js:ut.setBooleanAttribute(e,this.attribute,r);break}i.delete(e)})}static collect(e,...t){const i=[];t.push(Ko.locate(e));for(let r=0,s=t.length;r<s;++r){const n=t[r];if(n!==void 0)for(let c=0,h=n.length;c<h;++c){const d=n[c];Ge(d)?i.push(new Gi(e,d)):i.push(new Gi(e,d.property,d.attribute,d.mode,d.converter))}}return i}}function a(o,e){let t;function i(r,s){arguments.length>1&&(t.property=s),Ko.locate(r.constructor).push(t)}if(arguments.length>1){t={},i(o,e);return}return t=o===void 0?{}:o,i}const Ws={mode:"open"},Gs={},Us=new Set,Yo=ie.getById(dt.elementRegistry,()=>Ki());class Ee{constructor(e,t=e.definition){var i;this.platformDefined=!1,Ge(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=(i=t.registry)!==null&&i!==void 0?i:customElements;const r=e.prototype,s=Gi.collect(e,t.attributes),n=new Array(s.length),c={},h={};for(let d=0,l=s.length;d<l;++d){const f=s[d];n[d]=f.attribute,c[f.name]=f,h[f.attribute]=f,m.defineProperty(r,f)}Reflect.defineProperty(e,"observedAttributes",{value:n,enumerable:!0}),this.attributes=s,this.propertyLookup=c,this.attributeLookup=h,this.shadowOptions=t.shadowOptions===void 0?Ws:t.shadowOptions===null?void 0:Object.assign(Object.assign({},Ws),t.shadowOptions),this.elementOptions=t.elementOptions===void 0?Gs:Object.assign(Object.assign({},Gs),t.elementOptions),this.styles=we.normalize(t.styles),Yo.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return Us.has(e)||Yo.getByType(e)?new Ee(class extends e{},t):new Ee(e,t)}static registerBaseType(e){Us.add(e)}}Ee.getByType=Yo.getByType,Ee.getForInstance=Yo.getForInstance;class al extends MutationObserver{constructor(e){function t(i){this.callback.call(null,i.filter(r=>this.observedNodes.has(r.target)))}super(t),this.callback=e,this.observedNodes=new Set}observe(e,t){this.observedNodes.add(e),super.observe(e,t)}unobserve(e){this.observedNodes.delete(e),this.observedNodes.size<1&&this.disconnect()}}Object.freeze({create(o){const e=[],t={};let i=null,r=!1;return{source:o,context:_t.default,targets:t,get isBound(){return r},addBehaviorFactory(s,n){var c,h,d,l;const f=s;f.id=(c=f.id)!==null&&c!==void 0?c:ao(),f.targetNodeId=(h=f.targetNodeId)!==null&&h!==void 0?h:ao(),f.targetTagName=(d=n.tagName)!==null&&d!==void 0?d:null,f.policy=(l=f.policy)!==null&&l!==void 0?l:ut.policy,this.addTarget(f.targetNodeId,n),this.addBehavior(f.createBehavior())},addTarget(s,n){t[s]=n},addBehavior(s){e.push(s),r&&s.bind(this)},onUnbind(s){i===null&&(i=[]),i.push(s)},connectedCallback(s){r||(r=!0,e.forEach(n=>n.bind(this)))},disconnectedCallback(s){r&&(r=!1,i!==null&&i.forEach(n=>n.unbind(this)))}}}});const ll={bubbles:!0,composed:!0,cancelable:!0},Qo="isConnected",Xs=new WeakMap;function co(o){var e,t;return(t=(e=o.shadowRoot)!==null&&e!==void 0?e:Xs.get(o))!==null&&t!==void 0?t:null}let Ks;class Nt extends as{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=e,this.definition=t;const i=t.shadowOptions;if(i!==void 0){let s=e.shadowRoot;s?this.hasExistingShadowRoot=!0:(s=e.attachShadow(i),i.mode==="closed"&&Xs.set(e,s))}const r=m.getAccessors(e);if(r.length>0){const s=this.boundObservables=Object.create(null);for(let n=0,c=r.length;n<c;++n){const h=r[n].name,d=e[h];d!==void 0&&(delete e[h],s[h]=d)}}}get isConnected(){return m.track(this,Qo),this.stage===1}get context(){var e,t;return(t=(e=this.view)===null||e===void 0?void 0:e.context)!==null&&t!==void 0?t:_t.default}get isBound(){var e,t;return(t=(e=this.view)===null||e===void 0?void 0:e.isBound)!==null&&t!==void 0?t:!1}get sourceLifetime(){var e;return(e=this.view)===null||e===void 0?void 0:e.sourceLifetime}get template(){var e;if(this._template===null){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=(e=t.template)!==null&&e!==void 0?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get mainStyles(){var e;if(this._mainStyles===null){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=(e=t.styles)!==null&&e!==void 0?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(this._mainStyles!==null&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}onUnbind(e){var t;(t=this.view)===null||t===void 0||t.onUnbind(e)}addBehavior(e){var t,i;const r=(t=this.behaviors)!==null&&t!==void 0?t:this.behaviors=new Map,s=(i=r.get(e))!==null&&i!==void 0?i:0;s===0?(r.set(e,1),e.addedCallback&&e.addedCallback(this),e.connectedCallback&&!this.guardBehaviorConnection&&(this.stage===1||this.stage===0)&&e.connectedCallback(this)):r.set(e,s+1)}removeBehavior(e,t=!1){const i=this.behaviors;if(i===null)return;const r=i.get(e);r!==void 0&&(r===1||t?(i.delete(e),e.disconnectedCallback&&this.stage!==3&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):i.set(e,r-1))}addStyles(e){var t;if(!e)return;const i=this.source;if(e instanceof HTMLElement)((t=co(i))!==null&&t!==void 0?t:this.source).append(e);else if(!e.isAttachedTo(i)){const r=e.behaviors;if(e.addStylesTo(i),r!==null)for(let s=0,n=r.length;s<n;++s)this.addBehavior(r[s])}}removeStyles(e){var t;if(!e)return;const i=this.source;if(e instanceof HTMLElement)((t=co(i))!==null&&t!==void 0?t:i).removeChild(e);else if(e.isAttachedTo(i)){const r=e.behaviors;if(e.removeStylesFrom(i),r!==null)for(let s=0,n=r.length;s<n;++s)this.removeBehavior(r[s])}}connect(){this.stage===3&&(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):this.view!==null&&this.view.bind(this.source),this.stage=1,m.notify(this,Qo))}bindObservables(){if(this.boundObservables!==null){const e=this.source,t=this.boundObservables,i=Object.keys(t);for(let r=0,s=i.length;r<s;++r){const n=i[r];e[n]=t[n]}this.boundObservables=null}}connectBehaviors(){if(this.behaviorsConnected===!1){const e=this.behaviors;if(e!==null){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(this.behaviorsConnected===!0){const e=this.behaviors;if(e!==null)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===1&&(this.stage=2,m.notify(this,Qo),this.view!==null&&this.view.unbind(),this.disconnectBehaviors(),this.stage=3)}onAttributeChangedCallback(e,t,i){const r=this.definition.attributeLookup[e];r!==void 0&&r.onAttributeChangedCallback(this.source,i)}emit(e,t,i){return this.stage===1?this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},ll),i))):!1}renderTemplate(e){var t;const i=this.source,r=(t=co(i))!==null&&t!==void 0?t:i;if(this.view!==null)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let s=r.firstChild;s!==null;s=r.firstChild)r.removeChild(s)}e&&(this.view=e.render(i,r,i),this.view.sourceLifetime=Lo.coupled)}static forCustomElement(e){const t=e.$fastController;if(t!==void 0)return t;const i=Ee.getForInstance(e);if(i===void 0)throw ie.error(1401);return e.$fastController=new Ks(e,i)}static setStrategy(e){Ks=e}}ht(Nt),Nt.setStrategy(Nt);function Zo(o){var e;return"adoptedStyleSheets"in o?o:(e=co(o))!==null&&e!==void 0?e:o.getRootNode()}class Ui{constructor(e){const t=Ui.styleSheetCache;this.sheets=e.map(i=>{if(i instanceof CSSStyleSheet)return i;let r=t.get(i);return r===void 0&&(r=new CSSStyleSheet,r.replaceSync(i),t.set(i,r)),r})}addStylesTo(e){Qs(Zo(e),this.sheets)}removeStylesFrom(e){Zs(Zo(e),this.sheets)}}Ui.styleSheetCache=new Map;let cl=0;const dl=()=>`fast-${++cl}`;function Ys(o){return o===document?document.body:o}class hl{constructor(e){this.styles=e,this.styleClass=dl()}addStylesTo(e){e=Ys(Zo(e));const t=this.styles,i=this.styleClass;for(let r=0;r<t.length;r++){const s=document.createElement("style");s.innerHTML=t[r],s.className=i,e.append(s)}}removeStylesFrom(e){e=Ys(Zo(e));const t=e.querySelectorAll(`.${this.styleClass}`);for(let i=0,r=t.length;i<r;++i)e.removeChild(t[i])}}let Qs=(o,e)=>{o.adoptedStyleSheets=[...o.adoptedStyleSheets,...e]},Zs=(o,e)=>{o.adoptedStyleSheets=o.adoptedStyleSheets.filter(t=>e.indexOf(t)===-1)};if(we.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Qs=(o,e)=>{o.adoptedStyleSheets.push(...e)},Zs=(o,e)=>{for(const t of e){const i=o.adoptedStyleSheets.indexOf(t);i!==-1&&o.adoptedStyleSheets.splice(i,1)}}}catch{}we.setDefaultStrategy(Ui)}else we.setDefaultStrategy(hl);const Js="defer-hydration",en="needs-hydration";class Bt extends Nt{static hydrationObserverHandler(e){for(const t of e)Bt.hydrationObserver.unobserve(t.target),t.target.$fastController.connect()}connect(){var e,t;if(this.needsHydration===void 0&&(this.needsHydration=this.source.getAttribute(en)!==null),this.source.hasAttribute(Js)){Bt.hydrationObserver.observe(this.source,{attributeFilter:[Js]});return}if(!this.needsHydration){super.connect();return}if(this.stage!==3)return;this.stage=0,this.bindObservables(),this.connectBehaviors();const i=this.source,r=(e=co(i))!==null&&e!==void 0?e:i;if(this.template)if(qo(this.template)){let s=r.firstChild,n=r.lastChild;i.shadowRoot===null&&(Ne.isElementBoundaryStartMarker(s)&&(s.data="",s=s.nextSibling),Ne.isElementBoundaryEndMarker(n)&&(n.data="",n=n.previousSibling)),this.view=this.template.hydrate(s,n,i),(t=this.view)===null||t===void 0||t.bind(this.source)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=1,this.source.removeAttribute(en),this.needsInitialization=this.needsHydration=!1,m.notify(this,Qo)}disconnect(){super.disconnect(),Bt.hydrationObserver.unobserve(this.source)}static install(){Nt.setStrategy(Bt)}}Bt.hydrationObserver=new al(Bt.hydrationObserverHandler);function tn(o){const e=class extends o{constructor(){super(),Nt.forCustomElement(this)}$emit(t,i,r){return this.$fastController.emit(t,i,r)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(t,i,r){this.$fastController.onAttributeChangedCallback(t,i,r)}};return Ee.registerBaseType(e),e}function ul(o,e){return Ot(o)?Ee.compose(o,e):Ee.compose(this,o)}function pl(o,e){return Ot(o)?Ee.compose(o,e).define().type:Ee.compose(this,o).define().type}function bl(o){return tn(o)}const $=Object.assign(tn(HTMLElement),{from:bl,define:pl,compose:ul});var gl=Object.defineProperty,fl=Object.getOwnPropertyDescriptor,j=(o,e,t,i)=>{for(var r=i>1?void 0:i?fl(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&gl(e,t,r),r};class R{}j([a({attribute:"aria-atomic"})],R.prototype,"ariaAtomic",2),j([a({attribute:"aria-busy"})],R.prototype,"ariaBusy",2),j([a({attribute:"aria-controls"})],R.prototype,"ariaControls",2),j([a({attribute:"aria-current"})],R.prototype,"ariaCurrent",2),j([a({attribute:"aria-describedby"})],R.prototype,"ariaDescribedby",2),j([a({attribute:"aria-details"})],R.prototype,"ariaDetails",2),j([a({attribute:"aria-disabled"})],R.prototype,"ariaDisabled",2),j([a({attribute:"aria-errormessage"})],R.prototype,"ariaErrormessage",2),j([a({attribute:"aria-flowto"})],R.prototype,"ariaFlowto",2),j([a({attribute:"aria-haspopup"})],R.prototype,"ariaHaspopup",2),j([a({attribute:"aria-hidden"})],R.prototype,"ariaHidden",2),j([a({attribute:"aria-invalid"})],R.prototype,"ariaInvalid",2),j([a({attribute:"aria-keyshortcuts"})],R.prototype,"ariaKeyshortcuts",2),j([a({attribute:"aria-label"})],R.prototype,"ariaLabel",2),j([a({attribute:"aria-labelledby"})],R.prototype,"ariaLabelledby",2),j([a({attribute:"aria-live"})],R.prototype,"ariaLive",2),j([a({attribute:"aria-owns"})],R.prototype,"ariaOwns",2),j([a({attribute:"aria-relevant"})],R.prototype,"ariaRelevant",2),j([a({attribute:"aria-roledescription"})],R.prototype,"ariaRoledescription",2);const lr={fromView(o){const e=parseFloat(o);return Number.isNaN(e)?"":e.toString()},toView(o){const e=parseFloat(o);return Number.isNaN(e)?void 0:e.toString()}},ge={horizontal:"horizontal",vertical:"vertical"};function ml(o,e){let t=o.length;for(;t--;)if(e(o[t],t,o))return t;return-1}function cr(...o){return o.every(e=>e instanceof HTMLElement)}const ho="ArrowDown",uo="ArrowLeft",po="ArrowRight",bo="ArrowUp",go="End",fo="Enter",vl="Escape",mo="Home",Jo=" ",$l="Tab";var De;(function(o){o.ltr="ltr",o.rtl="rtl"})(De||(De={}));function yl(o,e,t){return t<o?e:t>e?o:t}function dr(o,e,t){return Math.min(Math.max(t,o),e)}let xl=0;function Ft(o=""){return`${o}${xl++}`}const ei=o=>o.closest("[dir]")?.dir==="rtl"?De.rtl:De.ltr;function fe(o){return o?typeof o=="string"?new pt(o):"inline"in o?o.inline():o:pt.empty}const on=o=>o.nodeType!==Node.TEXT_NODE||!!o.nodeValue?.trim().length,kl=":host([hidden]){display:none}";function k(o){return`${kl}:host{display:${o}}`}class wl{constructor(e){this.listenerCache=new WeakMap,this.query=e}connectedCallback(e){const{query:t}=this;let i=this.listenerCache.get(e);i||(i=this.constructListener(e),this.listenerCache.set(e,i)),i.bind(t)(),t.addEventListener("change",i)}disconnectedCallback(e){const t=this.listenerCache.get(e);t&&this.query.removeEventListener("change",t)}}class Do extends wl{constructor(e,t){super(e),this.styles=t}static with(e){return t=>new Do(e,t)}constructListener(e){let t=!1;const i=this.styles;return function(){const{matches:s}=this;s&&!t?(e.addStyles(i),t=s):!s&&t&&(e.removeStyles(i),t=s)}}removedCallback(e){e.removeStyles(this.styles)}}const U=Do.with(window.matchMedia("(forced-colors)"));Do.with(window.matchMedia("(prefers-color-scheme: dark)")),Do.with(window.matchMedia("(prefers-color-scheme: light)"));const ti=CSS.supports("anchor-name: --a"),Cl="anchor"in HTMLElement.prototype,rn=CSS.supports("selector(:state(g))");class Ue{}function tt(o){return b`<slot name="end" ${E("end")}>${fe(o.end)}</slot>`.inline()}function He(o){return b`<slot name="start" ${E("start")}>${fe(o.start)}</slot>`.inline()}function Xe(o,...e){const t=Ko.locate(o);e.forEach(i=>{Object.getOwnPropertyNames(i.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(o.prototype,s,Object.getOwnPropertyDescriptor(i.prototype,s))}),Ko.locate(i).forEach(s=>t.push(s))})}var Sl=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,oi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Il(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Sl(e,t,r),r};class ot extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.headinglevel=2,this.expanded=!1,this.disabled=!1,this.id=Ft("accordion-")}}oi([a({attribute:"heading-level",mode:"fromView",converter:re})],ot.prototype,"headinglevel",2),oi([a({mode:"boolean"})],ot.prototype,"expanded",2),oi([a({mode:"boolean"})],ot.prototype,"disabled",2),oi([a],ot.prototype,"id",2);var Pl=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,hr=(o,e,t,i)=>{for(var r=i>1?void 0:i?zl(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Pl(e,t,r),r};class vo extends ot{constructor(){super(...arguments),this.block=!1}}hr([a],vo.prototype,"size",2),hr([a({attribute:"marker-position"})],vo.prototype,"markerPosition",2),hr([a({mode:"boolean"})],vo.prototype,"block",2),Xe(vo,Ue);const z="var(--colorNeutralForeground1)",ur="var(--colorNeutralForeground1Hover)",Tl="var(--colorNeutralForeground1Pressed)",Ie="var(--colorNeutralForeground2)",Mt="var(--colorNeutralForeground2Hover)",Dt="var(--colorNeutralForeground2Pressed)",ii="var(--colorNeutralForeground2Selected)",ri="var(--colorNeutralForeground2BrandHover)",si="var(--colorNeutralForeground2BrandPressed)",Bl="var(--colorNeutralForeground2BrandSelected)",Z="var(--colorNeutralForeground3)",Ol="var(--colorNeutralForeground3Hover)",_l="var(--colorNeutralForeground3Pressed)",Al="var(--colorNeutralForeground3Selected)",pr="var(--colorNeutralForeground4)",S="var(--colorNeutralForegroundDisabled)",El="var(--colorBrandForegroundLink)",Nl="var(--colorBrandForegroundLinkHover)",Fl="var(--colorBrandForegroundLinkPressed)",Ml="var(--colorNeutralForeground2Link)",Dl="var(--colorNeutralForeground2LinkHover)",Hl="var(--colorNeutralForeground2LinkPressed)",sn="var(--colorCompoundBrandForeground1Hover)",Vl="var(--colorCompoundBrandForeground1Pressed)",Ke="var(--colorNeutralForegroundOnBrand)",bt="var(--colorNeutralForegroundInverted)",Ll="var(--colorNeutralForegroundInvertedHover)",jl="var(--colorNeutralForegroundInvertedPressed)",nn="var(--colorNeutralForegroundStaticInverted)",ni="var(--colorBrandForeground1)",Rl="var(--colorBrandForeground2)",ql="var(--colorNeutralForeground1Static)",I="var(--colorNeutralBackground1)",ai="var(--colorNeutralBackground1Hover)",br="var(--colorNeutralBackground1Pressed)",an="var(--colorNeutralBackground1Selected)",$o="var(--colorNeutralBackground3)",Wl="var(--colorNeutralBackground4)",Gl="var(--colorNeutralBackground5)",yo="var(--colorNeutralBackground6)",ln="var(--colorNeutralBackgroundInverted)",cn="var(--colorSubtleBackground)",xo="var(--colorSubtleBackgroundHover)",gt="var(--colorSubtleBackgroundPressed)",dn="var(--colorSubtleBackgroundSelected)",Ul="var(--colorSubtleBackgroundLightAlphaHover)",Xl="var(--colorSubtleBackgroundLightAlphaPressed)",Kl="var(--colorSubtleBackgroundLightAlphaSelected)",me="var(--colorTransparentBackground)",li="var(--colorTransparentBackgroundHover)",ci="var(--colorTransparentBackgroundPressed)",hn="var(--colorTransparentBackgroundSelected)",it="var(--colorNeutralBackgroundDisabled)",gr="var(--colorBackgroundOverlay)",un="var(--colorBrandBackground)",pn="var(--colorBrandBackgroundHover)",bn="var(--colorBrandBackgroundPressed)",Yl="var(--colorBrandBackgroundSelected)",ft="var(--colorCompoundBrandBackground)",Ht="var(--colorCompoundBrandBackgroundHover)",Vt="var(--colorCompoundBrandBackgroundPressed)",gn="var(--colorBrandBackgroundStatic)",fn="var(--colorBrandBackground2)",Ve="var(--colorNeutralStrokeAccessible)",mt="var(--colorNeutralStrokeAccessibleHover)",vt="var(--colorNeutralStrokeAccessiblePressed)",Le="var(--colorNeutralStroke1)",Lt="var(--colorNeutralStroke1Hover)",ko="var(--colorNeutralStroke1Pressed)",wo="var(--colorNeutralStroke2)",Ql="var(--colorNeutralStroke3)",Zl="var(--colorNeutralStrokeOnBrand2)",mn="var(--colorBrandStroke1)",vn="var(--colorBrandStroke2)",$t="var(--colorCompoundBrandStroke)",Jl="var(--colorCompoundBrandStrokeHover)",$n="var(--colorCompoundBrandStrokePressed)",Ce="var(--colorNeutralStrokeDisabled)",J="var(--colorTransparentStroke)",fr="var(--colorTransparentStrokeInteractive)",di="var(--colorStrokeFocus1)",ve="var(--colorStrokeFocus2)",ec="var(--colorNeutralShadowAmbient)",tc="var(--colorNeutralShadowKey)",yn="var(--colorPaletteRedBackground1)",oc="var(--colorPaletteRedBackground2)",xn="var(--colorPaletteRedBackground3)",kn="var(--colorPaletteRedBorder1)",mr="var(--colorPaletteRedBorder2)",vr="var(--colorPaletteRedForeground1)",ic="var(--colorPaletteRedForeground2)",wn="var(--colorPaletteRedForeground3)",Cn="var(--colorPaletteGreenBackground1)",Sn="var(--colorPaletteGreenBackground3)",rc="var(--colorPaletteGreenBorder1)",sc="var(--colorPaletteGreenBorder2)",nc="var(--colorPaletteGreenForeground1)",ac="var(--colorPaletteGreenForeground2)",lc="var(--colorPaletteGreenForeground3)",In="var(--colorPaletteDarkOrangeBackground1)",Pn="var(--colorPaletteDarkOrangeBackground3)",zn="var(--colorPaletteDarkOrangeBorder1)",cc="var(--colorPaletteDarkOrangeForeground1)",Tn="var(--colorPaletteDarkOrangeForeground3)",dc="var(--colorPaletteYellowBackground1)",hc="var(--colorPaletteYellowBackground3)",uc="var(--colorPaletteYellowBorder1)",$r="var(--colorPaletteYellowForeground2)",Bn="var(--colorPaletteMarigoldBackground2)",pc="var(--colorPaletteMarigoldBorderActive)",bc="var(--colorPaletteMarigoldForeground2)",gc="var(--colorPaletteAnchorBackground2)",fc="var(--colorPaletteAnchorForeground2)",mc="var(--colorPaletteBeigeBackground2)",vc="var(--colorPaletteBeigeForeground2)",$c="var(--colorPaletteBlueBackground2)",yc="var(--colorPaletteBlueForeground2)",xc="var(--colorPaletteBrassBackground2)",kc="var(--colorPaletteBrassForeground2)",wc="var(--colorPaletteBrownBackground2)",Cc="var(--colorPaletteBrownForeground2)",Sc="var(--colorPaletteCornflowerBackground2)",Ic="var(--colorPaletteCornflowerForeground2)",Pc="var(--colorPaletteCranberryBackground2)",zc="var(--colorPaletteCranberryForeground2)",Tc="var(--colorPaletteDarkGreenBackground2)",Bc="var(--colorPaletteDarkGreenForeground2)",Oc="var(--colorPaletteDarkRedBackground2)",_c="var(--colorPaletteDarkRedForeground2)",Ac="var(--colorPaletteForestBackground2)",Ec="var(--colorPaletteForestForeground2)",Nc="var(--colorPaletteGoldBackground2)",Fc="var(--colorPaletteGoldForeground2)",Mc="var(--colorPaletteGrapeBackground2)",Dc="var(--colorPaletteGrapeForeground2)",Hc="var(--colorPaletteLavenderBackground2)",Vc="var(--colorPaletteLavenderForeground2)",Lc="var(--colorPaletteLightTealBackground2)",jc="var(--colorPaletteLightTealForeground2)",Rc="var(--colorPaletteLilacBackground2)",qc="var(--colorPaletteLilacForeground2)",Wc="var(--colorPaletteMagentaBackground2)",Gc="var(--colorPaletteMagentaForeground2)",Uc="var(--colorPaletteMinkBackground2)",Xc="var(--colorPaletteMinkForeground2)",Kc="var(--colorPaletteNavyBackground2)",Yc="var(--colorPaletteNavyForeground2)",Qc="var(--colorPalettePeachBackground2)",Zc="var(--colorPalettePeachForeground2)",Jc="var(--colorPalettePinkBackground2)",ed="var(--colorPalettePinkForeground2)",td="var(--colorPalettePlatinumBackground2)",od="var(--colorPalettePlatinumForeground2)",id="var(--colorPalettePlumBackground2)",rd="var(--colorPalettePlumForeground2)",sd="var(--colorPalettePumpkinBackground2)",nd="var(--colorPalettePumpkinForeground2)",ad="var(--colorPalettePurpleBackground2)",ld="var(--colorPalettePurpleForeground2)",cd="var(--colorPaletteRoyalBlueBackground2)",dd="var(--colorPaletteRoyalBlueForeground2)",hd="var(--colorPaletteSeafoamBackground2)",ud="var(--colorPaletteSeafoamForeground2)",pd="var(--colorPaletteSteelBackground2)",bd="var(--colorPaletteSteelForeground2)",gd="var(--colorPaletteTealBackground2)",fd="var(--colorPaletteTealForeground2)",hi="var(--borderRadiusNone)",Be="var(--borderRadiusSmall)",C="var(--borderRadiusMedium)",On="var(--borderRadiusLarge)",_n="var(--borderRadiusXLarge)",$e="var(--borderRadiusCircular)",v="var(--fontFamilyBase)",md="var(--fontFamilyMonospace)",vd="var(--fontFamilyNumeric)",Co="var(--fontSizeBase100)",F="var(--fontSizeBase200)",B="var(--fontSizeBase300)",he="var(--fontSizeBase400)",jt="var(--fontSizeBase500)",ui="var(--fontSizeBase600)",An="var(--fontSizeHero700)",En="var(--fontSizeHero800)",Nn="var(--fontSizeHero900)",Fn="var(--fontSizeHero1000)",_="var(--fontWeightRegular)",$d="var(--fontWeightMedium)",D="var(--fontWeightSemibold)",pi="var(--fontWeightBold)",bi="var(--lineHeightBase100)",q="var(--lineHeightBase200)",A="var(--lineHeightBase300)",ye="var(--lineHeightBase400)",gi="var(--lineHeightBase500)",Mn="var(--lineHeightBase600)",Dn="var(--lineHeightHero700)",Hn="var(--lineHeightHero800)",Vn="var(--lineHeightHero900)",Ln="var(--lineHeightHero1000)",yr="var(--shadow2)",fi="var(--shadow4)",yd="var(--shadow8)",xr="var(--shadow16)",xd="var(--shadow28)",jn="var(--shadow64)",T="var(--strokeWidthThin)",ue="var(--strokeWidthThick)",se="var(--strokeWidthThicker)",kr="var(--strokeWidthThickest)",H="var(--spacingHorizontalXXS)",ne="var(--spacingHorizontalXS)",ee="var(--spacingHorizontalSNudge)",Oe="var(--spacingHorizontalS)",ae="var(--spacingHorizontalMNudge)",le="var(--spacingHorizontalM)",kd="var(--spacingHorizontalL)",wd="var(--spacingHorizontalXL)",wr="var(--spacingHorizontalXXL)",Cr="var(--spacingVerticalNone)",Rt="var(--spacingVerticalXXS)",qt="var(--spacingVerticalXS)",je="var(--spacingVerticalSNudge)",V="var(--spacingVerticalS)",Wt="var(--spacingVerticalMNudge)",Cd="var(--spacingVerticalM)",mi="var(--spacingVerticalL)",yt="var(--spacingVerticalXXL)",Sd="var(--spacingVerticalXXXL)",Sr="var(--durationUltraFast)",vi="var(--durationFaster)",$i="var(--durationNormal)",Ir="var(--durationGentle)",Rn="var(--durationSlow)",qn="var(--durationSlower)",yi="var(--durationUltraSlow)",Id="var(--curveAccelerateMax)",xt="var(--curveAccelerateMid)",Pd="var(--curveAccelerateMin)",Pr="var(--curveDecelerateMax)",kt="var(--curveDecelerateMid)",zd="var(--curveDecelerateMin)",Wn="var(--curveEasyEaseMax)",xi="var(--curveEasyEase)",zr="var(--curveLinear)",Td=u`
|
|
1
|
+
const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElements});let Ho;const is="fast-kernel";try{if(document.currentScript)Ho=document.currentScript.getAttribute(is);else{const o=document.getElementsByTagName("script");Ho=o[o.length-1].getAttribute(is)}}catch{Ho="isolate"}let dt;switch(Ho){case"share":dt=Object.freeze({updateQueue:1,observable:2,contextEvent:3,elementRegistry:4});break;case"share-v2":dt=Object.freeze({updateQueue:1.2,observable:2.2,contextEvent:3.2,elementRegistry:4.2});break;default:const o=`-${Math.random().toString(36).substring(2,8)}`;dt=Object.freeze({updateQueue:`1.2${o}`,observable:`2.2${o}`,contextEvent:`3.2${o}`,elementRegistry:`4.2${o}`});break}const Ot=o=>typeof o=="function",Ge=o=>typeof o=="string",Ba=()=>{};var Xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};(function(){if(!(typeof globalThis<"u"))if(typeof Xi<"u")Xi.globalThis=Xi;else if(typeof self<"u")self.globalThis=self;else if(typeof window<"u")window.globalThis=window;else{const e=new Function("return this")();e.globalThis=e}})();const rs={configurable:!1,enumerable:!1,writable:!1};globalThis.FAST===void 0&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},rs));const oe=globalThis.FAST;if(oe.getById===void 0){const o=Object.create(null);Reflect.defineProperty(oe,"getById",Object.assign({value(e,t){let i=o[e];return i===void 0&&(i=t?o[e]=t():null),i}},rs))}oe.error===void 0&&Object.assign(oe,{warn(){},error(o){return new Error(`Error ${o}`)},addMessages(){}});const Oa=Object.freeze([]);function Ki(){const o=new Map;return Object.freeze({register(e){return o.has(e.type)?!1:(o.set(e.type,e),!0)},getByType(e){return o.get(e)},getForInstance(e){if(e!=null)return o.get(e.constructor)}})}function ss(){const o=new WeakMap;return function(e){let t=o.get(e);if(t===void 0){let i=Reflect.getPrototypeOf(e);for(;t===void 0&&i!==null;)t=o.get(i),i=Reflect.getPrototypeOf(i);t=t===void 0?[]:t.slice(0),o.set(e,t)}return t}}function ht(o){o.prototype.toJSON=Ba}const Y=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),ns=o=>o,_a=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:ns}):{createHTML:ns};let Vo=Object.freeze({createHTML(o){return _a.createHTML(o)},protect(o,e,t,i){return i}});const Aa=Vo,ut=Object.freeze({get policy(){return Vo},setPolicy(o){if(Vo!==Aa)throw oe.error(1201);Vo=o},setAttribute(o,e,t){t==null?o.removeAttribute(e):o.setAttribute(e,t)},setBooleanAttribute(o,e,t){t?o.setAttribute(e,""):o.removeAttribute(e)}}),ie=oe.getById(dt.updateQueue,()=>{const o=[],e=[],t=globalThis.requestAnimationFrame;let i=!0;function r(){if(e.length)throw e.shift()}function s(h){try{h.call()}catch(d){if(i)e.push(d),setTimeout(r,0);else throw o.length=0,d}}function n(){let d=0;for(;d<o.length;)if(s(o[d]),d++,d>1024){for(let l=0,f=o.length-d;l<f;l++)o[l]=o[l+d];o.length-=d,d=0}o.length=0}function c(h){o.push(h),o.length<2&&(i?t(n):n())}return Object.freeze({enqueue:c,next:()=>new Promise(c),process:n,setMode:h=>i=h})});class Yi{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return this.spillover===void 0?this.sub1===e||this.sub2===e:this.spillover.indexOf(e)!==-1}subscribe(e){const t=this.spillover;if(t===void 0){if(this.has(e))return;if(this.sub1===void 0){this.sub1=e;return}if(this.sub2===void 0){this.sub2=e;return}this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else t.indexOf(e)===-1&&t.push(e)}unsubscribe(e){const t=this.spillover;if(t===void 0)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const i=t.indexOf(e);i!==-1&&t.splice(i,1)}}notify(e){const t=this.spillover,i=this.subject;if(t===void 0){const r=this.sub1,s=this.sub2;r!==void 0&&r.handleChange(i,e),s!==void 0&&s.handleChange(i,e)}else for(let r=0,s=t.length;r<s;++r)t[r].handleChange(i,e)}}class as{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,i;(t=this.subscribers[e])===null||t===void 0||t.notify(e),(i=this.subjectSubscribers)===null||i===void 0||i.notify(e)}subscribe(e,t){var i,r;let s;t?s=(i=this.subscribers[t])!==null&&i!==void 0?i:this.subscribers[t]=new Yi(this.subject):s=(r=this.subjectSubscribers)!==null&&r!==void 0?r:this.subjectSubscribers=new Yi(this.subject),s.subscribe(e)}unsubscribe(e,t){var i,r;t?(i=this.subscribers[t])===null||i===void 0||i.unsubscribe(e):(r=this.subjectSubscribers)===null||r===void 0||r.unsubscribe(e)}}const Lo=Object.freeze({unknown:void 0,coupled:1}),m=oe.getById(dt.observable,()=>{const o=ie.enqueue,e=/(:|&&|\|\||if|\?\.)/,t=new WeakMap;let i,r=d=>{throw oe.error(1101)};function s(d){var l;let f=(l=d.$fastController)!==null&&l!==void 0?l:t.get(d);return f===void 0&&(Array.isArray(d)?f=r(d):t.set(d,f=new as(d))),f}const n=ss();class c{constructor(l){this.name=l,this.field=`_${l}`,this.callback=`${l}Changed`}getValue(l){return i!==void 0&&i.watch(l,this.name),l[this.field]}setValue(l,f){const w=this.field,be=l[w];if(be!==f){l[w]=f;const et=l[this.callback];Ot(et)&&et.call(l,be,f),s(l).notify(this.name)}}}class h extends Yi{constructor(l,f,w=!1){super(l,f),this.expression=l,this.isVolatileBinding=w,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(l){this.isAsync=this.needsQueue=l}bind(l){this.controller=l;const f=this.observe(l.source,l.context);return!l.isBound&&this.requiresUnbind(l)&&l.onUnbind(this),f}requiresUnbind(l){return l.sourceLifetime!==Lo.coupled||this.first!==this.last||this.first.propertySource!==l.source}unbind(l){this.dispose()}observe(l,f){this.needsRefresh&&this.last!==null&&this.dispose();const w=i;i=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let be;try{be=this.expression(l,f)}finally{i=w}return be}disconnect(){this.dispose()}dispose(){if(this.last!==null){let l=this.first;for(;l!==void 0;)l.notifier.unsubscribe(this,l.propertyName),l=l.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(l,f){const w=this.last,be=s(l),et=w===null?this.first:{};if(et.propertySource=l,et.propertyName=f,et.notifier=be,be.subscribe(this,f),w!==null){if(!this.needsRefresh){let os;i=void 0,os=w.propertySource[w.propertyName],i=this,l===os&&(this.needsRefresh=!0)}w.next=et}this.last=et}handleChange(){this.needsQueue?(this.needsQueue=!1,o(this)):this.isAsync||this.call()}call(){this.last!==null&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let l=this.first;for(;l!==void 0;)yield l,l=l.next}}return ht(h),Object.freeze({setArrayObserverFactory(d){r=d},getNotifier:s,track(d,l){i&&i.watch(d,l)},trackVolatile(){i&&(i.needsRefresh=!0)},notify(d,l){s(d).notify(l)},defineProperty(d,l){Ge(l)&&(l=new c(l)),n(d).push(l),Reflect.defineProperty(d,l.name,{enumerable:!0,get(){return l.getValue(this)},set(f){l.setValue(this,f)}})},getAccessors:n,binding(d,l,f=this.isVolatileBinding(d)){return new h(d,l,f)},isVolatileBinding(d){return e.test(d.toString())}})});function g(o,e){m.defineProperty(o,e)}function ls(o,e,t){return Object.assign({},t,{get(){return m.trackVolatile(),t.get.apply(this)}})}const cs=oe.getById(dt.contextEvent,()=>{let o=null;return{get(){return o},set(e){o=e}}}),_t=Object.freeze({default:{index:0,length:0,get event(){return _t.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent(){return cs.get()},setEvent(o){cs.set(o)}});class jo{constructor(e,t,i=!1){this.evaluate=e,this.policy=t,this.isVolatile=i}}class Ea extends jo{createObserver(e){return m.binding(this.evaluate,e,this.isVolatile)}}function Qi(o,e,t=m.isVolatileBinding(o)){return new Ea(o,e,t)}class ds extends jo{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}ht(ds);function hs(o,e){return new ds(o,e)}let us;function ps(o){return o.map(e=>e instanceof we?ps(e.styles):[e]).reduce((e,t)=>e.concat(t),[])}class we{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map(t=>t instanceof we?t.behaviors:null).reduce((t,i)=>i===null?t:t===null?i:t.concat(i),null)}get strategy(){return this._strategy===null&&this.withStrategy(us),this._strategy}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=this.behaviors===null?e:this.behaviors.concat(e),this}withStrategy(e){return this._strategy=new e(ps(this.styles)),this}static setDefaultStrategy(e){us=e}static normalize(e){return e===void 0?void 0:Array.isArray(e)?new we(e):e instanceof we?e:new we([e])}}we.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const Zi=Ki(),Ji=Object.freeze({getForInstance:Zi.getForInstance,getByType:Zi.getByType,define(o){return Zi.register({type:o}),o}});function er(o,e,t){e.source.style.setProperty(o.targetAspect,t.bind(e))}class tr{constructor(e,t){this.dataBinding=e,this.targetAspect=t}createCSS(e){return e(this),`var(${this.targetAspect})`}addedCallback(e){var t;const i=e.source;if(!i.$cssBindings){i.$cssBindings=new Map;const s=i.setAttribute;i.setAttribute=(n,c)=>{s.call(i,n,c),n==="style"&&i.$cssBindings.forEach((h,d)=>er(d,h.controller,h.observer))}}const r=(t=e[this.targetAspect])!==null&&t!==void 0?t:e[this.targetAspect]=this.dataBinding.createObserver(this,this);r.controller=e,e.source.$cssBindings.set(this,{controller:e,observer:r})}connectedCallback(e){er(this,e,e[this.targetAspect])}removedCallback(e){e.source.$cssBindings&&e.source.$cssBindings.delete(this)}handleChange(e,t){er(this,t.controller,t)}}Ji.define(tr);const Na=`${Math.random().toString(36).substring(2,8)}`;let Fa=0;const bs=()=>`--v${Na}${++Fa}`;function gs(o,e){const t=[];let i="";const r=[],s=n=>{r.push(n)};for(let n=0,c=o.length-1;n<c;++n){i+=o[n];let h=e[n];Ot(h)?h=new tr(Qi(h),bs()).createCSS(s):h instanceof jo?h=new tr(h,bs()).createCSS(s):Ji.getForInstance(h)!==void 0&&(h=h.createCSS(s)),h instanceof we||h instanceof CSSStyleSheet?(i.trim()!==""&&(t.push(i),i=""),t.push(h)):i+=h}return i+=o[o.length-1],i.trim()!==""&&t.push(i),{styles:t,behaviors:r}}const u=(o,...e)=>{const{styles:t,behaviors:i}=gs(o,e),r=new we(t);return i.length?r.withBehaviors(...i):r};class fs{constructor(e,t){this.behaviors=t,this.css="";const i=e.reduce((r,s)=>(Ge(s)?this.css+=s:r.push(s),r),[]);i.length&&(this.styles=new we(i))}createCSS(e){return this.behaviors.forEach(e),this.styles&&e(this),this.css}addedCallback(e){e.addStyles(this.styles)}removedCallback(e){e.removeStyles(this.styles)}}Ji.define(fs),u.partial=(o,...e)=>{const{styles:t,behaviors:i}=gs(o,e);return new fs(t,i)};const ms=/fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/,vs=/fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/,$s=/fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/,ys=/fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/,xs=/^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/,ks=/fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;function ws(o){return o&&o.nodeType===Node.COMMENT_NODE}const Ne=Object.freeze({attributeMarkerName:"data-fe-b",attributeBindingSeparator:" ",contentBindingStartMarker(o,e){return`fe-b$$start$$${o}$$${e}$$fe-b`},contentBindingEndMarker(o,e){return`fe-b$$end$$${o}$$${e}$$fe-b`},repeatStartMarker(o){return`fe-repeat$$start$$${o}$$fe-repeat`},repeatEndMarker(o){return`fe-repeat$$end$$${o}$$fe-repeat`},isContentBindingStartMarker(o){return ms.test(o)},isContentBindingEndMarker(o){return vs.test(o)},isRepeatViewStartMarker(o){return $s.test(o)},isRepeatViewEndMarker(o){return ys.test(o)},isElementBoundaryStartMarker(o){return ws(o)&&xs.test(o.data.trim())},isElementBoundaryEndMarker(o){return ws(o)&&ks.test(o.data)},parseAttributeBinding(o){const e=o.getAttribute(this.attributeMarkerName);return e===null?e:e.split(this.attributeBindingSeparator).map(t=>parseInt(t))},parseContentBindingStartMarker(o){return Is(ms,o)},parseContentBindingEndMarker(o){return Is(vs,o)},parseRepeatStartMarker(o){return Cs($s,o)},parseRepeatEndMarker(o){return Cs(ys,o)},parseElementBoundaryStartMarker(o){return Ss(xs,o.trim())},parseElementBoundaryEndMarker(o){return Ss(ks,o)}});function Cs(o,e){const t=o.exec(e);return t===null?t:parseInt(t[1])}function Ss(o,e){const t=o.exec(e);return t===null?t:t[1]}function Is(o,e){const t=o.exec(e);return t===null?t:[parseInt(t[1]),t[2]]}const Ro=Symbol.for("fe-hydration");function qo(o){return o[Ro]===Ro}const or=`fast-${Math.random().toString(36).substring(2,8)}`,Wo=`${or}{`,no=`}${or}`,Ma=no.length;let Da=0;const ao=()=>`${or}-${++Da}`,Ps=Object.freeze({interpolation:o=>`${Wo}${o}${no}`,attribute:o=>`${ao()}="${Wo}${o}${no}"`,comment:o=>`<!--${Wo}${o}${no}-->`}),Go=Object.freeze({parse(o,e){const t=o.split(Wo);if(t.length===1)return null;const i=[];for(let r=0,s=t.length;r<s;++r){const n=t[r],c=n.indexOf(no);let h;if(c===-1)h=n;else{const d=n.substring(0,c);i.push(e[d]),h=n.substring(c+Ma)}h!==""&&i.push(h)}return i}}),ir=Ki(),Fe=Object.freeze({getForInstance:ir.getForInstance,getByType:ir.getByType,define(o,e){return e=e||{},e.type=o,ir.register(e),o},assignAspect(o,e){if(!e){o.aspectType=Y.content;return}switch(o.sourceAspect=e,e[0]){case":":o.targetAspect=e.substring(1),o.aspectType=o.targetAspect==="classList"?Y.tokenList:Y.property;break;case"?":o.targetAspect=e.substring(1),o.aspectType=Y.booleanAttribute;break;case"@":o.targetAspect=e.substring(1),o.aspectType=Y.event;break;default:o.targetAspect=e,o.aspectType=Y.attribute;break}}});class rr{constructor(e){this.options=e}createHTML(e){return Ps.attribute(e(this))}createBehavior(){return this}}ht(rr);class zs extends Error{constructor(e,t,i){super(e),this.factories=t,this.node=i}}function sr(o){return o.nodeType===Node.COMMENT_NODE}function Ts(o){return o.nodeType===Node.TEXT_NODE}function Bs(o,e){const t=document.createRange();return t.setStart(o,0),t.setEnd(e,sr(e)||Ts(e)?e.data.length:e.childNodes.length),t}function Ha(o){return o instanceof DocumentFragment&&"mode"in o}function Va(o,e,t){const i=Bs(o,e),r=i.commonAncestorContainer,s=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode(d){return i.comparePoint(d,0)===0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),n={},c={};let h=s.currentNode=o;for(;h!==null;){switch(h.nodeType){case Node.ELEMENT_NODE:{La(h,t,n);break}case Node.COMMENT_NODE:{ja(h,s,t,n,c);break}}h=s.nextNode()}return i.detach(),{targets:n,boundaries:c}}function La(o,e,t){const i=Ne.parseAttributeBinding(o);if(i!==null){for(const r of i){if(!e[r])throw new zs(`HydrationView was unable to successfully target factory on ${o.nodeName} inside ${o.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`,e,o);Uo(e[r],o,t)}o.removeAttribute(Ne.attributeMarkerName)}}function ja(o,e,t,i,r){if(Ne.isElementBoundaryStartMarker(o)){Ra(o,e);return}if(Ne.isContentBindingStartMarker(o.data)){const s=Ne.parseContentBindingStartMarker(o.data);if(s===null)return;const[n,c]=s,h=t[n],d=[];let l=e.nextSibling();o.data="";const f=l;for(;l!==null;){if(sr(l)){const w=Ne.parseContentBindingEndMarker(l.data);if(w&&w[1]===c)break}d.push(l),l=e.nextSibling()}if(l===null){const w=o.getRootNode();throw new Error(`Error hydrating Comment node inside "${Ha(w)?w.host.nodeName:w.nodeName}".`)}if(l.data="",d.length===1&&Ts(d[0]))Uo(h,d[0],i);else{l!==f&&l.previousSibling!==null&&(r[h.targetNodeId]={first:f,last:l.previousSibling});const w=l.parentNode.insertBefore(document.createTextNode(""),l);Uo(h,w,i)}}}function Ra(o,e){const t=Ne.parseElementBoundaryStartMarker(o.data);let i=e.nextSibling();for(;i!==null;){if(sr(i)){const r=Ne.parseElementBoundaryEndMarker(i.data);if(r&&r===t)break}i=e.nextSibling()}}function Uo(o,e,t){if(o.targetNodeId===void 0)throw new Error("Factory could not be target to the node");t[o.targetNodeId]=e}var Os;function nr(o,e){const t=o.parentNode;let i=o,r;for(;i!==e;){if(r=i.nextSibling,!r)throw new Error(`Unmatched first/last child inside "${e.getRootNode().host.nodeName}".`);t.removeChild(i),i=r}t.removeChild(e)}class _s{constructor(){this.index=0,this.length=0}get event(){return _t.getEvent()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}}class Xo extends _s{constructor(e,t,i){super(),this.fragment=e,this.factories=t,this.targets=i,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=Lo.unknown,this.context=this,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const i=e.parentNode;let r=this.firstChild,s;for(;r!==t;)s=r.nextSibling,i.insertBefore(r,e),r=s;i.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let i=this.firstChild,r;for(;i!==t;)r=i.nextSibling,e.appendChild(i),i=r;e.appendChild(t)}dispose(){nr(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let i=this.behaviors;if(i===null){this.source=e,this.context=t,this.behaviors=i=new Array(this.factories.length);const r=this.factories;for(let s=0,n=r.length;s<n;++s){const c=r[s].createBehavior();c.bind(this),i[s]=c}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let r=0,s=i.length;r<s;++r)i[r].bind(this)}this.isBound=!0}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,i=e.length;t<i;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(e.length!==0){nr(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,i=e.length;t<i;++t)e[t].unbind()}}}ht(Xo),m.defineProperty(Xo.prototype,"index"),m.defineProperty(Xo.prototype,"length");const At={unhydrated:"unhydrated",hydrating:"hydrating",hydrated:"hydrated"};class qa extends Error{constructor(e,t,i,r){super(e),this.factory=t,this.fragment=i,this.templateString=r}}class Wa extends _s{constructor(e,t,i,r){super(),this.firstChild=e,this.lastChild=t,this.sourceTemplate=i,this.hostBindingTarget=r,this[Os]=Ro,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=Lo.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=At.unhydrated,this._bindingViewBoundaries={},this._targets={},this.factories=i.compile().factories}get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}insertBefore(e){if(this.fragment!==null)if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const i=e.parentNode;let r=this.firstChild,s;for(;r!==t;)s=r.nextSibling,i.insertBefore(r,e),r=s;i.insertBefore(t,e)}}appendTo(e){this.fragment!==null&&e.appendChild(this.fragment)}remove(){const e=this.fragment||(this.fragment=document.createDocumentFragment()),t=this.lastChild;let i=this.firstChild,r;for(;i!==t;){if(r=i.nextSibling,!r)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);e.appendChild(i),i=r}e.appendChild(t)}bind(e,t=this){var i,r;if(this.hydrationStage!==At.hydrated&&(this._hydrationStage=At.hydrating),this.source===e)return;let s=this.behaviors;if(s===null){this.source=e,this.context=t;try{const{targets:c,boundaries:h}=Va(this.firstChild,this.lastChild,this.factories);this._targets=c,this._bindingViewBoundaries=h}catch(c){if(c instanceof zs){let h=this.sourceTemplate.html;typeof h!="string"&&(h=h.innerHTML),c.templateString=h}throw c}this.behaviors=s=new Array(this.factories.length);const n=this.factories;for(let c=0,h=n.length;c<h;++c){const d=n[c];if(d.targetNodeId==="h"&&this.hostBindingTarget&&Uo(d,this.hostBindingTarget,this._targets),d.targetNodeId in this.targets){const l=d.createBehavior();l.bind(this),s[c]=l}else{let l=this.sourceTemplate.html;throw typeof l!="string"&&(l=l.innerHTML),new qa(`HydrationView was unable to successfully target bindings inside "${(r=((i=this.firstChild)===null||i===void 0?void 0:i.getRootNode()).host)===null||r===void 0?void 0:r.nodeName}".`,d,Bs(this.firstChild,this.lastChild).cloneContents(),l)}}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let n=0,c=s.length;n<c;++n)s[n].bind(this)}this.isBound=!0,this._hydrationStage=At.hydrated}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){nr(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,i=e.length;t<i;++t)e[t].unbind(this);e.length=0}}Os=Ro,ht(Wa);function Ga(o){return o.create!==void 0}function Ua(o,e,t,i){if(t==null&&(t=""),Ga(t)){o.textContent="";let r=o.$fastView;if(r===void 0)if(qo(i)&&qo(t)&&i.bindingViewBoundaries[this.targetNodeId]!==void 0&&i.hydrationStage!==At.hydrated){const s=i.bindingViewBoundaries[this.targetNodeId];r=t.hydrate(s.first,s.last)}else r=t.create();else o.$fastTemplate!==t&&(r.isComposed&&(r.remove(),r.unbind()),r=t.create());r.isComposed?r.needsBindOnly&&(r.needsBindOnly=!1,r.bind(i.source,i.context)):(r.isComposed=!0,r.bind(i.source,i.context),r.insertBefore(o),o.$fastView=r,o.$fastTemplate=t)}else{const r=o.$fastView;r!==void 0&&r.isComposed&&(r.isComposed=!1,r.remove(),r.needsBindOnly?r.needsBindOnly=!1:r.unbind()),o.textContent=t}}function Xa(o,e,t){var i;const r=`${this.id}-t`,s=(i=o[r])!==null&&i!==void 0?i:o[r]={v:0,cv:Object.create(null)},n=s.cv;let c=s.v;const h=o[e];if(t!=null&&t.length){const d=t.split(/\s+/);for(let l=0,f=d.length;l<f;++l){const w=d[l];w!==""&&(n[w]=c,h.add(w))}}if(s.v=c+1,c!==0){c-=1;for(const d in n)n[d]===c&&h.remove(d)}}const Ka={[Y.attribute]:ut.setAttribute,[Y.booleanAttribute]:ut.setBooleanAttribute,[Y.property]:(o,e,t)=>o[e]=t,[Y.content]:Ua,[Y.tokenList]:Xa,[Y.event]:()=>{}};class Et{constructor(e){this.dataBinding=e,this.updateTarget=null,this.aspectType=Y.content}createHTML(e){return Ps.interpolation(e(this))}createBehavior(){var e;if(this.updateTarget===null){const t=Ka[this.aspectType],i=(e=this.dataBinding.policy)!==null&&e!==void 0?e:this.policy;if(!t)throw oe.error(1205);this.data=`${this.id}-d`,this.updateTarget=i.protect(this.targetTagName,this.aspectType,this.targetAspect,t)}return this}bind(e){var t;const i=e.targets[this.targetNodeId],r=qo(e)&&e.hydrationStage&&e.hydrationStage!==At.hydrated;switch(this.aspectType){case Y.event:i[this.data]=e,i.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case Y.content:e.onUnbind(this);default:const s=(t=i[this.data])!==null&&t!==void 0?t:i[this.data]=this.dataBinding.createObserver(this,this);if(s.target=i,s.controller=e,r&&(this.aspectType===Y.attribute||this.aspectType===Y.booleanAttribute)){s.bind(e);break}this.updateTarget(i,this.targetAspect,s.bind(e),e);break}}unbind(e){const i=e.targets[this.targetNodeId].$fastView;i!==void 0&&i.isComposed&&(i.unbind(),i.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){_t.setEvent(e);const i=this.dataBinding.evaluate(t.source,t.context);_t.setEvent(null),i!==!0&&e.preventDefault()}}handleChange(e,t){const i=t.target,r=t.controller;this.updateTarget(i,this.targetAspect,t.bind(r),r)}}Fe.define(Et,{aspected:!0});const As=(o,e)=>`${o}.${e}`,Es={},Me={index:0,node:null};function Ns(o){o.startsWith("fast-")||oe.warn(1204,{name:o})}const Ya=new Proxy(document.createElement("div"),{get(o,e){Ns(e);const t=Reflect.get(o,e);return Ot(t)?t.bind(o):t},set(o,e,t){return Ns(e),Reflect.set(o,e,t)}});class Qa{constructor(e,t,i){this.fragment=e,this.directives=t,this.policy=i,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,i,r,s){var n,c;this.nodeIds.has(i)||(this.nodeIds.add(i),this.addTargetDescriptor(t,i,r)),e.id=(n=e.id)!==null&&n!==void 0?n:ao(),e.targetNodeId=i,e.targetTagName=s,e.policy=(c=e.policy)!==null&&c!==void 0?c:this.policy,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,i){const r=this.descriptors;if(t==="r"||t==="h"||r[t])return;if(!r[e]){const n=e.lastIndexOf("."),c=e.substring(0,n),h=parseInt(e.substring(n+1));this.addTargetDescriptor(c,e,h)}let s=Es[t];if(!s){const n=`_${t}`;Es[t]=s={get(){var c;return(c=this[n])!==null&&c!==void 0?c:this[n]=this[e].childNodes[i]}}}r[t]=s}createView(e){const t=this.fragment.cloneNode(!0),i=Object.create(this.proto);i.r=t,i.h=e??Ya;for(const r of this.nodeIds)i[r];return new Xo(t,this.factories,i)}}function Fs(o,e,t,i,r,s=!1){const n=t.attributes,c=o.directives;for(let h=0,d=n.length;h<d;++h){const l=n[h],f=l.value,w=Go.parse(f,c);let be=null;w===null?s&&(be=new Et(hs(()=>f,o.policy)),Fe.assignAspect(be,l.name)):be=ar.aggregate(w,o.policy),be!==null&&(t.removeAttributeNode(l),h--,d--,o.addFactory(be,e,i,r,t.tagName))}}function Za(o,e,t,i,r){const s=Go.parse(e.textContent,o.directives);if(s===null)return Me.node=e.nextSibling,Me.index=r+1,Me;let n,c=n=e;for(let h=0,d=s.length;h<d;++h){const l=s[h];h!==0&&(r++,i=As(t,r),n=c.parentNode.insertBefore(document.createTextNode(""),c.nextSibling)),Ge(l)?n.textContent=l:(n.textContent=" ",Fe.assignAspect(l),o.addFactory(l,t,i,r,null)),c=n}return Me.index=r+1,Me.node=c.nextSibling,Me}function Ms(o,e,t){let i=0,r=e.firstChild;for(;r;){const s=Ja(o,t,r,i);r=s.node,i=s.index}}function Ja(o,e,t,i){const r=As(e,i);switch(t.nodeType){case 1:Fs(o,e,t,r,i),Ms(o,t,r);break;case 3:return Za(o,t,e,r,i);case 8:const s=Go.parse(t.data,o.directives);s!==null&&o.addFactory(ar.aggregate(s),e,r,i,null);break}return Me.index=i+1,Me.node=t.nextSibling,Me}function el(o,e){return o&&o.nodeType==8&&Go.parse(o.data,e)!==null}const Ds="TEMPLATE",ar={compile(o,e,t=ut.policy){let i;if(Ge(o)){i=document.createElement(Ds),i.innerHTML=t.createHTML(o);const n=i.content.firstElementChild;n!==null&&n.tagName===Ds&&(i=n)}else i=o;!i.content.firstChild&&!i.content.lastChild&&i.content.appendChild(document.createComment(""));const r=document.adoptNode(i.content),s=new Qa(r,e,t);return Fs(s,"",i,"h",0,!0),(el(r.firstChild,e)||r.childNodes.length===1&&Object.keys(e).length>0)&&r.insertBefore(document.createComment(""),r.firstChild),Ms(s,r,"r"),Me.node=null,s.freeze()},setDefaultStrategy(o){this.compile=o},aggregate(o,e=ut.policy){if(o.length===1)return o[0];let t,i=!1,r;const s=o.length,n=o.map(d=>Ge(d)?()=>d:(t=d.sourceAspect||t,i=i||d.dataBinding.isVolatile,r=r||d.dataBinding.policy,d.dataBinding.evaluate)),c=(d,l)=>{let f="";for(let w=0;w<s;++w)f+=n[w](d,l);return f},h=new Et(Qi(c,r??e,i));return Fe.assignAspect(h,t),h}},tl=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,ol=Object.create(null);class pt{constructor(e,t=ol){this.html=e,this.factories=t}createHTML(e){const t=this.factories;for(const i in t)e(t[i]);return this.html}}pt.empty=new pt(""),Fe.define(pt);function il(o,e,t,i=Fe.getForInstance(o)){if(i.aspected){const r=tl.exec(e);r!==null&&Fe.assignAspect(o,r[2])}return o.createHTML(t)}class Wi{constructor(e,t={},i){this.policy=i,this.result=null,this.html=e,this.factories=t}compile(){return this.result===null&&(this.result=ar.compile(this.html,this.factories,this.policy)),this.result}create(e){return this.compile().createView(e)}inline(){return new pt(Ge(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(e){if(this.result)throw oe.error(1208);if(this.policy)throw oe.error(1207);return this.policy=e,this}render(e,t,i){const r=this.create(i);return r.bind(e),r.appendTo(t),r}static create(e,t,i){let r="";const s=Object.create(null),n=c=>{var h;const d=(h=c.id)!==null&&h!==void 0?h:c.id=ao();return s[d]=c,d};for(let c=0,h=e.length-1;c<h;++c){const d=e[c];let l=t[c],f;if(r+=d,Ot(l))l=new Et(Qi(l));else if(l instanceof jo)l=new Et(l);else if(!(f=Fe.getForInstance(l))){const w=l;l=new Et(hs(()=>w))}r+=il(l,d,n,f)}return new Wi(r+e[e.length-1],s,i)}}ht(Wi);const b=(o,...e)=>{if(Array.isArray(o)&&Array.isArray(o.raw))return Wi.create(o,e);throw oe.error(1206)};b.partial=o=>new pt(o);class Hs extends rr{bind(e){e.source[this.options]=e.targets[this.targetNodeId]}}Fe.define(Hs);const E=o=>new Hs(o),rl=o=>o.nodeType===1,lo=o=>o?e=>e.nodeType===1&&e.matches(o):rl;class sl extends rr{get id(){return this._id}set id(e){this._id=e,this._controllerProperty=`${e}-c`}bind(e){const t=e.targets[this.targetNodeId];t[this._controllerProperty]=e,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.targetNodeId];this.updateTarget(e.source,Oa),this.disconnect(t),t[this._controllerProperty]=null}getSource(e){return e[this._controllerProperty].source}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}const Vs="slotchange";class Ls extends sl{observe(e){e.addEventListener(Vs,this)}disconnect(e){e.removeEventListener(Vs,this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}Fe.define(Ls);function G(o){return Ge(o)&&(o={property:o}),new Ls(o)}const js="boolean",Rs="reflect",Ko=Object.freeze({locate:ss()}),nl={toView(o){return o?"true":"false"},fromView(o){return!(o==null||o==="false"||o===!1||o===0)}};function qs(o){if(o==null)return null;const e=o*1;return isNaN(e)?null:e}const re={toView(o){const e=qs(o);return e&&e.toString()},fromView:qs};class Gi{constructor(e,t,i=t.toLowerCase(),r=Rs,s){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=i,this.mode=r,this.converter=s,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,r===js&&s===void 0&&(this.converter=nl)}setValue(e,t){const i=e[this.fieldName],r=this.converter;r!==void 0&&(t=r.fromView(t)),i!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](i,t),e.$fastController.notify(this.name))}getValue(e){return m.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,i=this.guards;i.has(e)||t==="fromView"||ie.enqueue(()=>{i.add(e);const r=e[this.fieldName];switch(t){case Rs:const s=this.converter;ut.setAttribute(e,this.attribute,s!==void 0?s.toView(r):r);break;case js:ut.setBooleanAttribute(e,this.attribute,r);break}i.delete(e)})}static collect(e,...t){const i=[];t.push(Ko.locate(e));for(let r=0,s=t.length;r<s;++r){const n=t[r];if(n!==void 0)for(let c=0,h=n.length;c<h;++c){const d=n[c];Ge(d)?i.push(new Gi(e,d)):i.push(new Gi(e,d.property,d.attribute,d.mode,d.converter))}}return i}}function a(o,e){let t;function i(r,s){arguments.length>1&&(t.property=s),Ko.locate(r.constructor).push(t)}if(arguments.length>1){t={},i(o,e);return}return t=o===void 0?{}:o,i}const Ws={mode:"open"},Gs={},Us=new Set,Yo=oe.getById(dt.elementRegistry,()=>Ki());class Ee{constructor(e,t=e.definition){var i;this.platformDefined=!1,Ge(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=(i=t.registry)!==null&&i!==void 0?i:customElements;const r=e.prototype,s=Gi.collect(e,t.attributes),n=new Array(s.length),c={},h={};for(let d=0,l=s.length;d<l;++d){const f=s[d];n[d]=f.attribute,c[f.name]=f,h[f.attribute]=f,m.defineProperty(r,f)}Reflect.defineProperty(e,"observedAttributes",{value:n,enumerable:!0}),this.attributes=s,this.propertyLookup=c,this.attributeLookup=h,this.shadowOptions=t.shadowOptions===void 0?Ws:t.shadowOptions===null?void 0:Object.assign(Object.assign({},Ws),t.shadowOptions),this.elementOptions=t.elementOptions===void 0?Gs:Object.assign(Object.assign({},Gs),t.elementOptions),this.styles=we.normalize(t.styles),Yo.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return Us.has(e)||Yo.getByType(e)?new Ee(class extends e{},t):new Ee(e,t)}static registerBaseType(e){Us.add(e)}}Ee.getByType=Yo.getByType,Ee.getForInstance=Yo.getForInstance;class al extends MutationObserver{constructor(e){function t(i){this.callback.call(null,i.filter(r=>this.observedNodes.has(r.target)))}super(t),this.callback=e,this.observedNodes=new Set}observe(e,t){this.observedNodes.add(e),super.observe(e,t)}unobserve(e){this.observedNodes.delete(e),this.observedNodes.size<1&&this.disconnect()}}Object.freeze({create(o){const e=[],t={};let i=null,r=!1;return{source:o,context:_t.default,targets:t,get isBound(){return r},addBehaviorFactory(s,n){var c,h,d,l;const f=s;f.id=(c=f.id)!==null&&c!==void 0?c:ao(),f.targetNodeId=(h=f.targetNodeId)!==null&&h!==void 0?h:ao(),f.targetTagName=(d=n.tagName)!==null&&d!==void 0?d:null,f.policy=(l=f.policy)!==null&&l!==void 0?l:ut.policy,this.addTarget(f.targetNodeId,n),this.addBehavior(f.createBehavior())},addTarget(s,n){t[s]=n},addBehavior(s){e.push(s),r&&s.bind(this)},onUnbind(s){i===null&&(i=[]),i.push(s)},connectedCallback(s){r||(r=!0,e.forEach(n=>n.bind(this)))},disconnectedCallback(s){r&&(r=!1,i!==null&&i.forEach(n=>n.unbind(this)))}}}});const ll={bubbles:!0,composed:!0,cancelable:!0},Qo="isConnected",Xs=new WeakMap;function co(o){var e,t;return(t=(e=o.shadowRoot)!==null&&e!==void 0?e:Xs.get(o))!==null&&t!==void 0?t:null}let Ks;class Nt extends as{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=e,this.definition=t;const i=t.shadowOptions;if(i!==void 0){let s=e.shadowRoot;s?this.hasExistingShadowRoot=!0:(s=e.attachShadow(i),i.mode==="closed"&&Xs.set(e,s))}const r=m.getAccessors(e);if(r.length>0){const s=this.boundObservables=Object.create(null);for(let n=0,c=r.length;n<c;++n){const h=r[n].name,d=e[h];d!==void 0&&(delete e[h],s[h]=d)}}}get isConnected(){return m.track(this,Qo),this.stage===1}get context(){var e,t;return(t=(e=this.view)===null||e===void 0?void 0:e.context)!==null&&t!==void 0?t:_t.default}get isBound(){var e,t;return(t=(e=this.view)===null||e===void 0?void 0:e.isBound)!==null&&t!==void 0?t:!1}get sourceLifetime(){var e;return(e=this.view)===null||e===void 0?void 0:e.sourceLifetime}get template(){var e;if(this._template===null){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=(e=t.template)!==null&&e!==void 0?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get mainStyles(){var e;if(this._mainStyles===null){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=(e=t.styles)!==null&&e!==void 0?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(this._mainStyles!==null&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}onUnbind(e){var t;(t=this.view)===null||t===void 0||t.onUnbind(e)}addBehavior(e){var t,i;const r=(t=this.behaviors)!==null&&t!==void 0?t:this.behaviors=new Map,s=(i=r.get(e))!==null&&i!==void 0?i:0;s===0?(r.set(e,1),e.addedCallback&&e.addedCallback(this),e.connectedCallback&&!this.guardBehaviorConnection&&(this.stage===1||this.stage===0)&&e.connectedCallback(this)):r.set(e,s+1)}removeBehavior(e,t=!1){const i=this.behaviors;if(i===null)return;const r=i.get(e);r!==void 0&&(r===1||t?(i.delete(e),e.disconnectedCallback&&this.stage!==3&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):i.set(e,r-1))}addStyles(e){var t;if(!e)return;const i=this.source;if(e instanceof HTMLElement)((t=co(i))!==null&&t!==void 0?t:this.source).append(e);else if(!e.isAttachedTo(i)){const r=e.behaviors;if(e.addStylesTo(i),r!==null)for(let s=0,n=r.length;s<n;++s)this.addBehavior(r[s])}}removeStyles(e){var t;if(!e)return;const i=this.source;if(e instanceof HTMLElement)((t=co(i))!==null&&t!==void 0?t:i).removeChild(e);else if(e.isAttachedTo(i)){const r=e.behaviors;if(e.removeStylesFrom(i),r!==null)for(let s=0,n=r.length;s<n;++s)this.removeBehavior(r[s])}}connect(){this.stage===3&&(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):this.view!==null&&this.view.bind(this.source),this.stage=1,m.notify(this,Qo))}bindObservables(){if(this.boundObservables!==null){const e=this.source,t=this.boundObservables,i=Object.keys(t);for(let r=0,s=i.length;r<s;++r){const n=i[r];e[n]=t[n]}this.boundObservables=null}}connectBehaviors(){if(this.behaviorsConnected===!1){const e=this.behaviors;if(e!==null){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(this.behaviorsConnected===!0){const e=this.behaviors;if(e!==null)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===1&&(this.stage=2,m.notify(this,Qo),this.view!==null&&this.view.unbind(),this.disconnectBehaviors(),this.stage=3)}onAttributeChangedCallback(e,t,i){const r=this.definition.attributeLookup[e];r!==void 0&&r.onAttributeChangedCallback(this.source,i)}emit(e,t,i){return this.stage===1?this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},ll),i))):!1}renderTemplate(e){var t;const i=this.source,r=(t=co(i))!==null&&t!==void 0?t:i;if(this.view!==null)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let s=r.firstChild;s!==null;s=r.firstChild)r.removeChild(s)}e&&(this.view=e.render(i,r,i),this.view.sourceLifetime=Lo.coupled)}static forCustomElement(e){const t=e.$fastController;if(t!==void 0)return t;const i=Ee.getForInstance(e);if(i===void 0)throw oe.error(1401);return e.$fastController=new Ks(e,i)}static setStrategy(e){Ks=e}}ht(Nt),Nt.setStrategy(Nt);function Zo(o){var e;return"adoptedStyleSheets"in o?o:(e=co(o))!==null&&e!==void 0?e:o.getRootNode()}class Ui{constructor(e){const t=Ui.styleSheetCache;this.sheets=e.map(i=>{if(i instanceof CSSStyleSheet)return i;let r=t.get(i);return r===void 0&&(r=new CSSStyleSheet,r.replaceSync(i),t.set(i,r)),r})}addStylesTo(e){Qs(Zo(e),this.sheets)}removeStylesFrom(e){Zs(Zo(e),this.sheets)}}Ui.styleSheetCache=new Map;let cl=0;const dl=()=>`fast-${++cl}`;function Ys(o){return o===document?document.body:o}class hl{constructor(e){this.styles=e,this.styleClass=dl()}addStylesTo(e){e=Ys(Zo(e));const t=this.styles,i=this.styleClass;for(let r=0;r<t.length;r++){const s=document.createElement("style");s.innerHTML=t[r],s.className=i,e.append(s)}}removeStylesFrom(e){e=Ys(Zo(e));const t=e.querySelectorAll(`.${this.styleClass}`);for(let i=0,r=t.length;i<r;++i)e.removeChild(t[i])}}let Qs=(o,e)=>{o.adoptedStyleSheets=[...o.adoptedStyleSheets,...e]},Zs=(o,e)=>{o.adoptedStyleSheets=o.adoptedStyleSheets.filter(t=>e.indexOf(t)===-1)};if(we.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Qs=(o,e)=>{o.adoptedStyleSheets.push(...e)},Zs=(o,e)=>{for(const t of e){const i=o.adoptedStyleSheets.indexOf(t);i!==-1&&o.adoptedStyleSheets.splice(i,1)}}}catch{}we.setDefaultStrategy(Ui)}else we.setDefaultStrategy(hl);const Js="defer-hydration",en="needs-hydration";class Bt extends Nt{static hydrationObserverHandler(e){for(const t of e)Bt.hydrationObserver.unobserve(t.target),t.target.$fastController.connect()}connect(){var e,t;if(this.needsHydration===void 0&&(this.needsHydration=this.source.getAttribute(en)!==null),this.source.hasAttribute(Js)){Bt.hydrationObserver.observe(this.source,{attributeFilter:[Js]});return}if(!this.needsHydration){super.connect();return}if(this.stage!==3)return;this.stage=0,this.bindObservables(),this.connectBehaviors();const i=this.source,r=(e=co(i))!==null&&e!==void 0?e:i;if(this.template)if(qo(this.template)){let s=r.firstChild,n=r.lastChild;i.shadowRoot===null&&(Ne.isElementBoundaryStartMarker(s)&&(s.data="",s=s.nextSibling),Ne.isElementBoundaryEndMarker(n)&&(n.data="",n=n.previousSibling)),this.view=this.template.hydrate(s,n,i),(t=this.view)===null||t===void 0||t.bind(this.source)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=1,this.source.removeAttribute(en),this.needsInitialization=this.needsHydration=!1,m.notify(this,Qo)}disconnect(){super.disconnect(),Bt.hydrationObserver.unobserve(this.source)}static install(){Nt.setStrategy(Bt)}}Bt.hydrationObserver=new al(Bt.hydrationObserverHandler);function tn(o){const e=class extends o{constructor(){super(),Nt.forCustomElement(this)}$emit(t,i,r){return this.$fastController.emit(t,i,r)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(t,i,r){this.$fastController.onAttributeChangedCallback(t,i,r)}};return Ee.registerBaseType(e),e}function ul(o,e){return Ot(o)?Ee.compose(o,e):Ee.compose(this,o)}function pl(o,e){return Ot(o)?Ee.compose(o,e).define().type:Ee.compose(this,o).define().type}function bl(o){return tn(o)}const $=Object.assign(tn(HTMLElement),{from:bl,define:pl,compose:ul});var gl=Object.defineProperty,fl=Object.getOwnPropertyDescriptor,j=(o,e,t,i)=>{for(var r=i>1?void 0:i?fl(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&gl(e,t,r),r};class R{}j([a({attribute:"aria-atomic"})],R.prototype,"ariaAtomic",2),j([a({attribute:"aria-busy"})],R.prototype,"ariaBusy",2),j([a({attribute:"aria-controls"})],R.prototype,"ariaControls",2),j([a({attribute:"aria-current"})],R.prototype,"ariaCurrent",2),j([a({attribute:"aria-describedby"})],R.prototype,"ariaDescribedby",2),j([a({attribute:"aria-details"})],R.prototype,"ariaDetails",2),j([a({attribute:"aria-disabled"})],R.prototype,"ariaDisabled",2),j([a({attribute:"aria-errormessage"})],R.prototype,"ariaErrormessage",2),j([a({attribute:"aria-flowto"})],R.prototype,"ariaFlowto",2),j([a({attribute:"aria-haspopup"})],R.prototype,"ariaHaspopup",2),j([a({attribute:"aria-hidden"})],R.prototype,"ariaHidden",2),j([a({attribute:"aria-invalid"})],R.prototype,"ariaInvalid",2),j([a({attribute:"aria-keyshortcuts"})],R.prototype,"ariaKeyshortcuts",2),j([a({attribute:"aria-label"})],R.prototype,"ariaLabel",2),j([a({attribute:"aria-labelledby"})],R.prototype,"ariaLabelledby",2),j([a({attribute:"aria-live"})],R.prototype,"ariaLive",2),j([a({attribute:"aria-owns"})],R.prototype,"ariaOwns",2),j([a({attribute:"aria-relevant"})],R.prototype,"ariaRelevant",2),j([a({attribute:"aria-roledescription"})],R.prototype,"ariaRoledescription",2);const lr={fromView(o){const e=parseFloat(o);return Number.isNaN(e)?"":e.toString()},toView(o){const e=parseFloat(o);return Number.isNaN(e)?void 0:e.toString()}},ge={horizontal:"horizontal",vertical:"vertical"};function ml(o,e){let t=o.length;for(;t--;)if(e(o[t],t,o))return t;return-1}function cr(...o){return o.every(e=>e instanceof HTMLElement)}const ho="ArrowDown",uo="ArrowLeft",po="ArrowRight",bo="ArrowUp",go="End",fo="Enter",vl="Escape",mo="Home",Jo=" ",$l="Tab";var De;(function(o){o.ltr="ltr",o.rtl="rtl"})(De||(De={}));function yl(o,e,t){return t<o?e:t>e?o:t}function dr(o,e,t){return Math.min(Math.max(t,o),e)}let xl=0;function Ft(o=""){return`${o}${xl++}`}const ei=o=>o.closest("[dir]")?.dir==="rtl"?De.rtl:De.ltr;function fe(o){return o?typeof o=="string"?new pt(o):"inline"in o?o.inline():o:pt.empty}const on=o=>o.nodeType!==Node.TEXT_NODE||!!o.nodeValue?.trim().length,kl=":host([hidden]){display:none}";function k(o){return`${kl}:host{display:${o}}`}class wl{constructor(e){this.listenerCache=new WeakMap,this.query=e}connectedCallback(e){const{query:t}=this;let i=this.listenerCache.get(e);i||(i=this.constructListener(e),this.listenerCache.set(e,i)),i.bind(t)(),t.addEventListener("change",i)}disconnectedCallback(e){const t=this.listenerCache.get(e);t&&this.query.removeEventListener("change",t)}}class Do extends wl{constructor(e,t){super(e),this.styles=t}static with(e){return t=>new Do(e,t)}constructListener(e){let t=!1;const i=this.styles;return function(){const{matches:s}=this;s&&!t?(e.addStyles(i),t=s):!s&&t&&(e.removeStyles(i),t=s)}}removedCallback(e){e.removeStyles(this.styles)}}const U=Do.with(window.matchMedia("(forced-colors)"));Do.with(window.matchMedia("(prefers-color-scheme: dark)")),Do.with(window.matchMedia("(prefers-color-scheme: light)"));const ti=CSS.supports("anchor-name: --a"),Cl="anchor"in HTMLElement.prototype,rn=CSS.supports("selector(:state(g))");class Ue{}function tt(o){return b`<slot name="end" ${E("end")}>${fe(o.end)}</slot>`.inline()}function He(o){return b`<slot name="start" ${E("start")}>${fe(o.start)}</slot>`.inline()}function Xe(o,...e){const t=Ko.locate(o);e.forEach(i=>{Object.getOwnPropertyNames(i.prototype).forEach(s=>{s!=="constructor"&&Object.defineProperty(o.prototype,s,Object.getOwnPropertyDescriptor(i.prototype,s))}),Ko.locate(i).forEach(s=>t.push(s))})}var Sl=Object.defineProperty,Il=Object.getOwnPropertyDescriptor,oi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Il(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Sl(e,t,r),r};class ot extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.headinglevel=2,this.expanded=!1,this.disabled=!1,this.id=Ft("accordion-")}}oi([a({attribute:"heading-level",mode:"fromView",converter:re})],ot.prototype,"headinglevel",2),oi([a({mode:"boolean"})],ot.prototype,"expanded",2),oi([a({mode:"boolean"})],ot.prototype,"disabled",2),oi([a],ot.prototype,"id",2);var Pl=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,hr=(o,e,t,i)=>{for(var r=i>1?void 0:i?zl(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Pl(e,t,r),r};class vo extends ot{constructor(){super(...arguments),this.block=!1}}hr([a],vo.prototype,"size",2),hr([a({attribute:"marker-position"})],vo.prototype,"markerPosition",2),hr([a({mode:"boolean"})],vo.prototype,"block",2),Xe(vo,Ue);const z="var(--colorNeutralForeground1)",ur="var(--colorNeutralForeground1Hover)",Tl="var(--colorNeutralForeground1Pressed)",Ie="var(--colorNeutralForeground2)",Mt="var(--colorNeutralForeground2Hover)",Dt="var(--colorNeutralForeground2Pressed)",ii="var(--colorNeutralForeground2Selected)",ri="var(--colorNeutralForeground2BrandHover)",si="var(--colorNeutralForeground2BrandPressed)",Bl="var(--colorNeutralForeground2BrandSelected)",Q="var(--colorNeutralForeground3)",Ol="var(--colorNeutralForeground3Hover)",_l="var(--colorNeutralForeground3Pressed)",Al="var(--colorNeutralForeground3Selected)",pr="var(--colorNeutralForeground4)",S="var(--colorNeutralForegroundDisabled)",El="var(--colorBrandForegroundLink)",Nl="var(--colorBrandForegroundLinkHover)",Fl="var(--colorBrandForegroundLinkPressed)",Ml="var(--colorNeutralForeground2Link)",Dl="var(--colorNeutralForeground2LinkHover)",Hl="var(--colorNeutralForeground2LinkPressed)",sn="var(--colorCompoundBrandForeground1Hover)",Vl="var(--colorCompoundBrandForeground1Pressed)",Ke="var(--colorNeutralForegroundOnBrand)",bt="var(--colorNeutralForegroundInverted)",Ll="var(--colorNeutralForegroundInvertedHover)",jl="var(--colorNeutralForegroundInvertedPressed)",nn="var(--colorNeutralForegroundStaticInverted)",ni="var(--colorBrandForeground1)",Rl="var(--colorBrandForeground2)",ql="var(--colorNeutralForeground1Static)",I="var(--colorNeutralBackground1)",ai="var(--colorNeutralBackground1Hover)",br="var(--colorNeutralBackground1Pressed)",an="var(--colorNeutralBackground1Selected)",$o="var(--colorNeutralBackground3)",Wl="var(--colorNeutralBackground4)",Gl="var(--colorNeutralBackground5)",yo="var(--colorNeutralBackground6)",ln="var(--colorNeutralBackgroundInverted)",cn="var(--colorSubtleBackground)",xo="var(--colorSubtleBackgroundHover)",gt="var(--colorSubtleBackgroundPressed)",dn="var(--colorSubtleBackgroundSelected)",Ul="var(--colorSubtleBackgroundLightAlphaHover)",Xl="var(--colorSubtleBackgroundLightAlphaPressed)",Kl="var(--colorSubtleBackgroundLightAlphaSelected)",me="var(--colorTransparentBackground)",li="var(--colorTransparentBackgroundHover)",ci="var(--colorTransparentBackgroundPressed)",hn="var(--colorTransparentBackgroundSelected)",it="var(--colorNeutralBackgroundDisabled)",gr="var(--colorBackgroundOverlay)",un="var(--colorBrandBackground)",pn="var(--colorBrandBackgroundHover)",bn="var(--colorBrandBackgroundPressed)",Yl="var(--colorBrandBackgroundSelected)",ft="var(--colorCompoundBrandBackground)",Ht="var(--colorCompoundBrandBackgroundHover)",Vt="var(--colorCompoundBrandBackgroundPressed)",gn="var(--colorBrandBackgroundStatic)",fn="var(--colorBrandBackground2)",Ve="var(--colorNeutralStrokeAccessible)",mt="var(--colorNeutralStrokeAccessibleHover)",vt="var(--colorNeutralStrokeAccessiblePressed)",Le="var(--colorNeutralStroke1)",Lt="var(--colorNeutralStroke1Hover)",ko="var(--colorNeutralStroke1Pressed)",wo="var(--colorNeutralStroke2)",Ql="var(--colorNeutralStroke3)",Zl="var(--colorNeutralStrokeOnBrand2)",mn="var(--colorBrandStroke1)",vn="var(--colorBrandStroke2)",$t="var(--colorCompoundBrandStroke)",Jl="var(--colorCompoundBrandStrokeHover)",$n="var(--colorCompoundBrandStrokePressed)",Ce="var(--colorNeutralStrokeDisabled)",Z="var(--colorTransparentStroke)",fr="var(--colorTransparentStrokeInteractive)",di="var(--colorStrokeFocus1)",ve="var(--colorStrokeFocus2)",ec="var(--colorNeutralShadowAmbient)",tc="var(--colorNeutralShadowKey)",yn="var(--colorPaletteRedBackground1)",oc="var(--colorPaletteRedBackground2)",xn="var(--colorPaletteRedBackground3)",kn="var(--colorPaletteRedBorder1)",mr="var(--colorPaletteRedBorder2)",vr="var(--colorPaletteRedForeground1)",ic="var(--colorPaletteRedForeground2)",wn="var(--colorPaletteRedForeground3)",Cn="var(--colorPaletteGreenBackground1)",Sn="var(--colorPaletteGreenBackground3)",rc="var(--colorPaletteGreenBorder1)",sc="var(--colorPaletteGreenBorder2)",nc="var(--colorPaletteGreenForeground1)",ac="var(--colorPaletteGreenForeground2)",lc="var(--colorPaletteGreenForeground3)",In="var(--colorPaletteDarkOrangeBackground1)",Pn="var(--colorPaletteDarkOrangeBackground3)",zn="var(--colorPaletteDarkOrangeBorder1)",cc="var(--colorPaletteDarkOrangeForeground1)",Tn="var(--colorPaletteDarkOrangeForeground3)",dc="var(--colorPaletteYellowBackground1)",hc="var(--colorPaletteYellowBackground3)",uc="var(--colorPaletteYellowBorder1)",$r="var(--colorPaletteYellowForeground2)",Bn="var(--colorPaletteMarigoldBackground2)",pc="var(--colorPaletteMarigoldBorderActive)",bc="var(--colorPaletteMarigoldForeground2)",gc="var(--colorPaletteAnchorBackground2)",fc="var(--colorPaletteAnchorForeground2)",mc="var(--colorPaletteBeigeBackground2)",vc="var(--colorPaletteBeigeForeground2)",$c="var(--colorPaletteBlueBackground2)",yc="var(--colorPaletteBlueForeground2)",xc="var(--colorPaletteBrassBackground2)",kc="var(--colorPaletteBrassForeground2)",wc="var(--colorPaletteBrownBackground2)",Cc="var(--colorPaletteBrownForeground2)",Sc="var(--colorPaletteCornflowerBackground2)",Ic="var(--colorPaletteCornflowerForeground2)",Pc="var(--colorPaletteCranberryBackground2)",zc="var(--colorPaletteCranberryForeground2)",Tc="var(--colorPaletteDarkGreenBackground2)",Bc="var(--colorPaletteDarkGreenForeground2)",Oc="var(--colorPaletteDarkRedBackground2)",_c="var(--colorPaletteDarkRedForeground2)",Ac="var(--colorPaletteForestBackground2)",Ec="var(--colorPaletteForestForeground2)",Nc="var(--colorPaletteGoldBackground2)",Fc="var(--colorPaletteGoldForeground2)",Mc="var(--colorPaletteGrapeBackground2)",Dc="var(--colorPaletteGrapeForeground2)",Hc="var(--colorPaletteLavenderBackground2)",Vc="var(--colorPaletteLavenderForeground2)",Lc="var(--colorPaletteLightTealBackground2)",jc="var(--colorPaletteLightTealForeground2)",Rc="var(--colorPaletteLilacBackground2)",qc="var(--colorPaletteLilacForeground2)",Wc="var(--colorPaletteMagentaBackground2)",Gc="var(--colorPaletteMagentaForeground2)",Uc="var(--colorPaletteMinkBackground2)",Xc="var(--colorPaletteMinkForeground2)",Kc="var(--colorPaletteNavyBackground2)",Yc="var(--colorPaletteNavyForeground2)",Qc="var(--colorPalettePeachBackground2)",Zc="var(--colorPalettePeachForeground2)",Jc="var(--colorPalettePinkBackground2)",ed="var(--colorPalettePinkForeground2)",td="var(--colorPalettePlatinumBackground2)",od="var(--colorPalettePlatinumForeground2)",id="var(--colorPalettePlumBackground2)",rd="var(--colorPalettePlumForeground2)",sd="var(--colorPalettePumpkinBackground2)",nd="var(--colorPalettePumpkinForeground2)",ad="var(--colorPalettePurpleBackground2)",ld="var(--colorPalettePurpleForeground2)",cd="var(--colorPaletteRoyalBlueBackground2)",dd="var(--colorPaletteRoyalBlueForeground2)",hd="var(--colorPaletteSeafoamBackground2)",ud="var(--colorPaletteSeafoamForeground2)",pd="var(--colorPaletteSteelBackground2)",bd="var(--colorPaletteSteelForeground2)",gd="var(--colorPaletteTealBackground2)",fd="var(--colorPaletteTealForeground2)",hi="var(--borderRadiusNone)",Be="var(--borderRadiusSmall)",C="var(--borderRadiusMedium)",On="var(--borderRadiusLarge)",_n="var(--borderRadiusXLarge)",$e="var(--borderRadiusCircular)",v="var(--fontFamilyBase)",md="var(--fontFamilyMonospace)",vd="var(--fontFamilyNumeric)",Co="var(--fontSizeBase100)",F="var(--fontSizeBase200)",B="var(--fontSizeBase300)",he="var(--fontSizeBase400)",jt="var(--fontSizeBase500)",ui="var(--fontSizeBase600)",An="var(--fontSizeHero700)",En="var(--fontSizeHero800)",Nn="var(--fontSizeHero900)",Fn="var(--fontSizeHero1000)",_="var(--fontWeightRegular)",$d="var(--fontWeightMedium)",D="var(--fontWeightSemibold)",pi="var(--fontWeightBold)",bi="var(--lineHeightBase100)",q="var(--lineHeightBase200)",A="var(--lineHeightBase300)",ye="var(--lineHeightBase400)",gi="var(--lineHeightBase500)",Mn="var(--lineHeightBase600)",Dn="var(--lineHeightHero700)",Hn="var(--lineHeightHero800)",Vn="var(--lineHeightHero900)",Ln="var(--lineHeightHero1000)",yr="var(--shadow2)",fi="var(--shadow4)",yd="var(--shadow8)",xr="var(--shadow16)",xd="var(--shadow28)",jn="var(--shadow64)",T="var(--strokeWidthThin)",ue="var(--strokeWidthThick)",se="var(--strokeWidthThicker)",kr="var(--strokeWidthThickest)",H="var(--spacingHorizontalXXS)",ne="var(--spacingHorizontalXS)",J="var(--spacingHorizontalSNudge)",Oe="var(--spacingHorizontalS)",ae="var(--spacingHorizontalMNudge)",le="var(--spacingHorizontalM)",kd="var(--spacingHorizontalL)",wd="var(--spacingHorizontalXL)",wr="var(--spacingHorizontalXXL)",Cr="var(--spacingVerticalNone)",Rt="var(--spacingVerticalXXS)",qt="var(--spacingVerticalXS)",je="var(--spacingVerticalSNudge)",V="var(--spacingVerticalS)",Wt="var(--spacingVerticalMNudge)",Cd="var(--spacingVerticalM)",mi="var(--spacingVerticalL)",yt="var(--spacingVerticalXXL)",Sd="var(--spacingVerticalXXXL)",Sr="var(--durationUltraFast)",vi="var(--durationFaster)",$i="var(--durationNormal)",Ir="var(--durationGentle)",Rn="var(--durationSlow)",qn="var(--durationSlower)",yi="var(--durationUltraSlow)",Id="var(--curveAccelerateMax)",xt="var(--curveAccelerateMid)",Pd="var(--curveAccelerateMin)",Pr="var(--curveDecelerateMax)",kt="var(--curveDecelerateMid)",zd="var(--curveDecelerateMin)",Wn="var(--curveEasyEaseMax)",xi="var(--curveEasyEase)",zr="var(--curveLinear)",Td=u`
|
|
2
2
|
${k("block")}
|
|
3
3
|
|
|
4
4
|
:host{max-width:fit-content;contain:content}.heading{height:44px;display:grid;position:relative;padding-inline:${le} ${ae};border-radius:${C};font-family:${v};font-size:${B};font-weight:${_};line-height:${A};grid-template-columns:auto auto 1fr auto}.button{appearance:none;background:${me};border:none;box-sizing:border-box;color:${z};cursor:pointer;font:inherit;grid-column:auto / span 2;grid-row:1;height:44px;outline:none;padding:0;text-align:start}.button::before{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${Be}}:where(.default-marker-collapsed,.default-marker-expanded),::slotted(:is([slot='marker-collapsed'],[slot='marker-expanded'])){display:flex;align-items:center;justify-content:center;pointer-events:none;position:relative;height:100%;padding-inline-end:${Oe};grid-column:1 / span 1;grid-row:1}.content{margin:0 ${le}}::slotted([slot='start']){display:flex;justify-content:center;align-items:center;padding-right:${Oe};grid-column:2 / span 1;grid-row:1}button:focus-visible::after{content:'';position:absolute;inset:0px;cursor:pointer;border-radius:${Be};outline:none;border:2px solid ${di};box-shadow:inset 0 0 0 1px ${ve}}:host([disabled]) .button{color:${S}}:host([disabled]) svg{filter:invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%)}:host([expanded]) .content{display:block}:host([expanded]) .default-marker-collapsed,:host([expanded]) ::slotted([slot='marker-collapsed']),:host(:not([expanded])) :is(.default-marker-expanded,.content),:host(:not([expanded])) ::slotted([slot='marker-expanded']){display:none}:host([expanded]) ::slotted([slot='marker-expanded']),:host(:not([expanded])) ::slotted([slot='marker-collapsed']){display:flex}.heading{font-size:${B};line-height:${A}}:host([size='small']) .heading{font-size:${F};line-height:${q}}:host([size='large']) .heading{font-size:${he};line-height:${ye}}:host([size='extra-large']) .heading{font-size:${jt};line-height:${gi}}:host([marker-position='end']) ::slotted([slot='start']){grid-column:1 / span 1}:host([marker-position='end']) :is(.default-marker-collapsed,.default-marker-expanded){grid-column:4 / span 1;padding-inline-start:${Oe};padding-inline-end:0}:host([marker-position='end']) .button{grid-column:2 / span 3}:host([block]){max-width:100%}:host([marker-position='end']) .heading{grid-template-columns:auto auto 28px;padding-inline:${le}}:host([marker-position='end']:has([slot='start'])) .heading{padding-inline:${ae} ${le}}:host([block][marker-position='end']) .heading{grid-template-columns:auto 1fr}:host([marker-position='end']) :is(.default-marker-collapsed,.default-marker-expanded){grid-column:5 / span 1}`,Bd=b.partial(`<svg
|
|
@@ -33,7 +33,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
33
33
|
:host{flex-direction:column;width:100%;contain:content}`;function Dd(){return b`<template><slot ${G({property:"slottedAccordionItems",filter:lo()})}></slot></template>`}const Hd=Dd(),Vd=Br.compose({name:`${p.prefix}-accordion`,template:Hd,styles:Md});Vd.define(p.registry);const Un=new Map;function P(o){return Un.get(o)??Un.set(o,rn?`:state(${o})`:`[state--${o}]`).get(o)}function y(o,e,t){if(!(!e||!o)){if(!rn){o.shadowRoot.host.toggleAttribute(`state--${e}`,t);return}if(t??!o.states.has(e)){o.states.add(e);return}o.states.delete(e)}}const Or=new WeakMap;function Xn(o,e){if(!o||!e)return!1;if(Or.has(o))return Or.get(o).has(e);const t=new Set(Object.values(o));return Or.set(o,t),t.has(e)}function wt(o,e="",t="",i,r=""){y(o,`${r}${e}`,!1),(!i||Xn(i,t))&&y(o,`${r}${t}`,!0)}const Ld={primary:"primary",outline:"outline",subtle:"subtle",transparent:"transparent"},jd={circular:"circular",rounded:"rounded",square:"square"},Rd={small:"small",medium:"medium",large:"large"},ki={submit:"submit",reset:"reset",button:"button"},qd=Ld,Wd=jd,Gd=Rd,Ud={download:"download",href:"href",hreflang:"hreflang",ping:"ping",referrerpolicy:"referrerpolicy",rel:"rel",target:"target",type:"type"};var Xd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,rt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Kd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Xd(e,t,r),r};class Re extends ${constructor(){super(),this.isMac=navigator.userAgent.includes("Mac"),this.elementInternals=this.attachInternals(),this.internalProxyAnchor=this.createProxyElement(),this.elementInternals.role="link"}connectedCallback(){super.connectedCallback(),m.getNotifier(this).subscribe(this),Object.keys(this.$fastController.definition.attributeLookup).forEach(e=>{this.handleChange(this,e)}),this.append(this.internalProxyAnchor)}disconnectedCallback(){super.disconnectedCallback(),m.getNotifier(this).unsubscribe(this)}handleChange(e,t){if(t in Ud){const i=this.$fastController.definition.attributeLookup[t]?.attribute;i&&this.handleProxyAttributeChange(i,this[t])}}clickHandler(e){if(this.href){const t=this.isMac?e.metaKey:e.ctrlKey;this.handleNavigation(t)}return!0}keydownHandler(e){if(this.href&&e.key===fo){const t=this.isMac&&e.metaKey||e.ctrlKey;this.handleNavigation(t);return}return!0}handleNavigation(e){e?window.open(this.href,"_blank"):this.internalProxyAnchor.click()}handleProxyAttributeChange(e,t){t?this.internalProxyAnchor.setAttribute(e,t):this.internalProxyAnchor.removeAttribute(e)}createProxyElement(){const e=this.internalProxyAnchor??document.createElement("a");return e.ariaHidden="true",e.tabIndex=-1,e}}rt([a],Re.prototype,"download",2),rt([a],Re.prototype,"href",2),rt([a],Re.prototype,"hreflang",2),rt([a],Re.prototype,"ping",2),rt([a],Re.prototype,"referrerpolicy",2),rt([a],Re.prototype,"rel",2),rt([a],Re.prototype,"target",2),rt([a],Re.prototype,"type",2);var Yd=Object.defineProperty,Qd=Object.getOwnPropertyDescriptor,wi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Qd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Yd(e,t,r),r};class Gt extends Re{constructor(){super(...arguments),this.iconOnly=!1}appearanceChanged(e,t){wt(this.elementInternals,e,t,qd)}shapeChanged(e,t){wt(this.elementInternals,e,t,Wd)}sizeChanged(e,t){wt(this.elementInternals,e,t,Gd)}iconOnlyChanged(e,t){y(this.elementInternals,"icon",!!t)}}wi([a],Gt.prototype,"appearance",2),wi([a],Gt.prototype,"shape",2),wi([a],Gt.prototype,"size",2),wi([a({attribute:"icon-only",mode:"boolean"})],Gt.prototype,"iconOnly",2),Xe(Gt,Ue);const Kn=u`
|
|
34
34
|
${k("inline-flex")}
|
|
35
35
|
|
|
36
|
-
:host{--icon-spacing:${
|
|
36
|
+
:host{--icon-spacing:${J};position:relative;contain:layout style;vertical-align:middle;align-items:center;box-sizing:border-box;justify-content:center;text-align:center;text-decoration-line:none;margin:0;min-height:32px;outline-style:none;background-color:${I};color:${z};border:${T} solid ${Le};padding:0 ${le};min-width:96px;border-radius:${C};font-size:${B};font-family:${v};font-weight:${D};line-height:${A};transition-duration:${vi};transition-property:background,border,color;transition-timing-function:${xi};cursor:pointer;user-select:none}.content{display:inherit}:host(:hover){background-color:${ai};color:${ur};border-color:${Lt}}:host(:hover:active){background-color:${br};border-color:${ko};color:${Tl};outline-style:none}:host(:focus-visible){border-color:${Z};outline:${ue} solid ${Z};box-shadow:${fi},0 0 0 2px ${ve}}@media screen and (prefers-reduced-motion:reduce){:host{transition-duration:0.01ms}}::slotted(svg){font-size:20px;height:20px;width:20px;fill:currentColor}::slotted([slot='start']){margin-inline-end:var(--icon-spacing)}::slotted([slot='end']),[slot='end']{flex-shrink:0;margin-inline-start:var(--icon-spacing)}:host([icon-only]){min-width:32px;max-width:32px}:host([size='small']){--icon-spacing:${ne};min-height:24px;min-width:64px;padding:0 ${Oe};border-radius:${Be};font-size:${F};line-height:${q};font-weight:${_}}:host([size='small'][icon-only]){min-width:24px;max-width:24px}:host([size='large']){min-height:40px;border-radius:${On};padding:0 ${kd};font-size:${he};line-height:${ye}}:host([size='large'][icon-only]){min-width:40px;max-width:40px}:host([size='large']) ::slotted(svg){font-size:24px;height:24px;width:24px}:host(:is([shape='circular'],[shape='circular']:focus-visible)){border-radius:${$e}}:host(:is([shape='square'],[shape='square']:focus-visible)){border-radius:${hi}}:host([appearance='primary']){background-color:${un};color:${Ke};border-color:transparent}:host([appearance='primary']:hover){background-color:${pn}}:host([appearance='primary']:is(:hover,:hover:active):not(:focus-visible)){border-color:transparent}:host([appearance='primary']:is(:hover,:hover:active)){color:${Ke}}:host([appearance='primary']:hover:active){background-color:${bn}}:host([appearance='primary']:focus-visible){border-color:${Ke};box-shadow:${yr},0 0 0 2px ${ve}}:host([appearance='outline']){background-color:${me}}:host([appearance='outline']:hover){background-color:${li}}:host([appearance='outline']:hover:active){background-color:${ci}}:host([appearance='subtle']){background-color:${cn};color:${Ie};border-color:transparent}:host([appearance='subtle']:hover){background-color:${xo};color:${Mt};border-color:transparent}:host([appearance='subtle']:hover:active){background-color:${gt};color:${Dt};border-color:transparent}:host([appearance='subtle']:hover) ::slotted(svg){fill:${ri}}:host([appearance='subtle']:hover:active) ::slotted(svg){fill:${si}}:host([appearance='transparent']){background-color:${me};color:${Ie}}:host([appearance='transparent']:hover){background-color:${li};color:${ri}}:host([appearance='transparent']:hover:active){background-color:${ci};color:${si}}:host(:is([appearance='transparent'],[appearance='transparent']:is(:hover,:active))){border-color:transparent}`,Ci=u`
|
|
37
37
|
${Kn}
|
|
38
38
|
|
|
39
39
|
:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable])),:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable]):hover),:host(:is(:disabled,[disabled-focusable],[appearance]:disabled,[appearance][disabled-focusable]):hover:active){background-color:${it};border-color:${Ce};color:${S};cursor:not-allowed}:host([appearance='primary']:is(:disabled,[disabled-focusable])),:host([appearance='primary']:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){border-color:transparent}:host([appearance='outline']:is(:disabled,[disabled-focusable])),:host([appearance='outline']:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){background-color:${me}}:host([appearance='subtle']:is(:disabled,[disabled-focusable])),:host([appearance='subtle']:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){background-color:${me};border-color:transparent}:host([appearance='transparent']:is(:disabled,[disabled-focusable])),:host([appearance='transparent']:is(:disabled,[disabled-focusable]):is(:hover,:hover:active)){border-color:transparent;background-color:${me}}`.withBehaviors(U(u`
|
|
@@ -42,7 +42,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
42
42
|
|
|
43
43
|
::slotted(a){position:absolute;inset:0}`.withBehaviors(U(u`
|
|
44
44
|
:host{border-color:LinkText;color:LinkText}`));function Jd(o={}){return b`<template tabindex="0" @click="${(e,t)=>e.clickHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}">${He(o)}<span class="content" part="content"><slot></slot></span>${tt(o)}</template>`}const eh=Jd(),th=Gt.compose({name:`${p.prefix}-anchor-button`,template:eh,styles:Zd});th.define(p.registry);const oh=/[\(\[\{][^\)\]\}]*[\)\]\}]/g,ih=/[\0-\u001F\!-/:-@\[-`\{-\u00BF\u0250-\u036F\uD800-\uFFFF]/g,rh=/^\d+[\d\s]*(:?ext|x|)\s*\d+$/i,sh=/\s+/g,nh=/[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\u1100-\u11FF\u3130-\u318F\uA960-\uA97F\uAC00-\uD7AF\uD7B0-\uD7FF\u3040-\u309F\u30A0-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF]|[\uD840-\uD869][\uDC00-\uDED6]/;function ah(o,e,t){let i="";const r=o.split(" ");return r.length!==0&&(i+=r[0].charAt(0).toUpperCase()),t||(r.length===2?i+=r[1].charAt(0).toUpperCase():r.length===3&&(i+=r[2].charAt(0).toUpperCase())),e&&i.length>1?i.charAt(1)+i.charAt(0):i}function lh(o){return o=o.replace(oh,""),o=o.replace(ih,""),o=o.replace(sh," "),o=o.trim(),o}function ch(o,e,t){return!o||(o=lh(o),nh.test(o)||!t?.allowPhoneInitials&&rh.test(o))?"":ah(o,e,t?.firstInitialOnly)}var dh=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,Yn=(o,e,t,i)=>{for(var r=i>1?void 0:i?hh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&dh(e,t,r),r};class _r extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.elementInternals.role="img"}}Yn([a],_r.prototype,"name",2),Yn([a],_r.prototype,"initials",2);const Qn={darkRed:"dark-red",cranberry:"cranberry",red:"red",pumpkin:"pumpkin",peach:"peach",marigold:"marigold",gold:"gold",brass:"brass",brown:"brown",forest:"forest",seafoam:"seafoam",darkGreen:"dark-green",lightTeal:"light-teal",teal:"teal",steel:"steel",blue:"blue",royalBlue:"royal-blue",cornflower:"cornflower",navy:"navy",lavender:"lavender",purple:"purple",grape:"grape",lilac:"lilac",pink:"pink",magenta:"magenta",plum:"plum",beige:"beige",mink:"mink",platinum:"platinum",anchor:"anchor"},Zn={neutral:"neutral",brand:"brand",colorful:"colorful",...Qn};var uh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,Ut=(o,e,t,i)=>{for(var r=i>1?void 0:i?ph(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&uh(e,t,r),r};const st=class es extends _r{handleChange(e,t){switch(t){case"color":case"colorId":this.generateColor();break}}generateInitials(){if(!this.name&&!this.initials)return;const e=this.size??32;return this.initials??ch(this.name,window.getComputedStyle(this).direction==="rtl",{firstInitialOnly:e<=16})}generateColor(){const e=this.color===Zn.colorful;this.currentColor,this.currentColor=e&&this.colorId?this.colorId:e?es.colors[gh(this.name??"")%es.colors.length]:this.color??Zn.neutral,this.setAttribute("data-color",this.currentColor)}connectedCallback(){super.connectedCallback(),m.getNotifier(this).subscribe(this),this.generateColor()}disconnectedCallback(){super.disconnectedCallback(),m.getNotifier(this).unsubscribe(this)}};st.colors=Object.values(Qn),Ut([a],st.prototype,"active",2),Ut([a],st.prototype,"shape",2),Ut([a],st.prototype,"appearance",2),Ut([a({converter:re})],st.prototype,"size",2),Ut([a],st.prototype,"color",2),Ut([a({attribute:"color-id"})],st.prototype,"colorId",2);let bh=st;const gh=o=>{let e=0;for(let t=o.length-1;t>=0;t--){const i=o.charCodeAt(t),r=t%8;e^=(i<<r)+(i>>8-r)}return e},nt={fastOutSlowInMax:Pr,fastOutSlowInMid:kt,fastOutSlowInMin:zd,slowOutFastInMax:Id,slowOutFastInMid:xt,slowOutFastInMin:Pd,fastEase:Wn,normalEase:xi,nullEasing:zr},fh=u`
|
|
45
|
-
${k("inline-flex")} :host{position:relative;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;font-family:${v};font-weight:${D};font-size:${B};border-radius:${$e};color:${
|
|
45
|
+
${k("inline-flex")} :host{position:relative;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;font-family:${v};font-weight:${D};font-size:${B};border-radius:${$e};color:${Q};background-color:${yo};contain:layout style}.default-icon,::slotted(svg){width:20px;height:20px;font-size:20px}::slotted(img){box-sizing:border-box;width:100%;height:100%;border-radius:${$e}}::slotted([slot='badge']){position:absolute;bottom:0;right:0;box-shadow:0 0 0 ${T}) ${I}}:host([size='64']) ::slotted([slot='badge']),:host([size='72']) ::slotted([slot='badge']),:host([size='96']) ::slotted([slot='badge']),:host([size='120']) ::slotted([slot='badge']),:host([size='128']) ::slotted([slot='badge']){box-shadow:0 0 0 ${ue}) ${I}}:host([size='16']),:host([size='20']),:host([size='24']){font-size:${Co};font-weight:${_}}:host([size='16']){width:16px;height:16px}:host([size='20']){width:20px;height:20px}:host([size='24']){width:24px;height:24px}:host([size='16']) .default-icon,:host([size='16']) ::slotted(svg){width:12px;height:12px;font-size:12px}:host([size='20']) .default-icon,:host([size='24']) .default-icon,:host([size='20']) ::slotted(svg),:host([size='24']) ::slotted(svg){width:16px;height:16px;font-size:16px}:host([size='28']){width:28px;height:28px;font-size:${F}}:host([size='36']){width:36px;height:36px}:host([size='40']){width:40px;height:40px}:host([size='48']),:host([size='56']){font-size:${he}}:host([size='48']){width:48px;height:48px}:host([size='48']) .default-icon,:host([size='48']) ::slotted(svg){width:24px;height:24px;font-size:24px}:host([size='56']){width:56px;height:56px}:host([size='56']) .default-icon,:host([size='56']) ::slotted(svg){width:28px;height:28px;font-size:28px}:host([size='64']),:host([size='72']),:host([size='96']){font-size:${jt}}:host([size='64']) .default-icon,:host([size='72']) .default-icon,:host([size='64']) ::slotted(svg),:host([size='72']) ::slotted(svg){width:32px;height:32px;font-size:32px}:host([size='64']){width:64px;height:64px}:host([size='72']){width:72px;height:72px}:host([size='96']){width:96px;height:96px}:host([size='96']) .default-icon,:host([size='120']) .default-icon,:host([size='128']) .default-icon,:host([size='96']) ::slotted(svg),:host([size='120']) ::slotted(svg),:host([size='128']) ::slotted(svg){width:48px;height:48px;font-size:48px}:host([size='120']),:host([size='128']){font-size:${ui}}:host([size='120']){width:120px;height:120px}:host([size='128']){width:128px;height:128px}:host([shape='square']){border-radius:${C}}:host([shape='square'][size='20']),:host([shape='square'][size='24']){border-radius:${Be}}:host([shape='square'][size='56']),:host([shape='square'][size='64']),:host([shape='square'][size='72']){border-radius:${On}}:host([shape='square'][size='96']),:host([shape='square'][size='120']),:host([shape='square'][size='128']){border-radius:${_n}}:host([data-color='brand']){color:${nn};background-color:${gn}}:host([data-color='dark-red']){color:${_c};background-color:${Oc}}:host([data-color='cranberry']){color:${zc};background-color:${Pc}}:host([data-color='red']){color:${ic};background-color:${oc}}:host([data-color='pumpkin']){color:${nd};background-color:${sd}}:host([data-color='peach']){color:${Zc};background-color:${Qc}}:host([data-color='marigold']){color:${bc};background-color:${Bn}}:host([data-color='gold']){color:${Fc};background-color:${Nc}}:host([data-color='brass']){color:${kc};background-color:${xc}}:host([data-color='brown']){color:${Cc};background-color:${wc}}:host([data-color='forest']){color:${Ec};background-color:${Ac}}:host([data-color='seafoam']){color:${ud};background-color:${hd}}:host([data-color='dark-green']){color:${Bc};background-color:${Tc}}:host([data-color='light-teal']){color:${jc};background-color:${Lc}}:host([data-color='teal']){color:${fd};background-color:${gd}}:host([data-color='steel']){color:${bd};background-color:${pd}}:host([data-color='blue']){color:${yc};background-color:${$c}}:host([data-color='royal-blue']){color:${dd};background-color:${cd}}:host([data-color='cornflower']){color:${Ic};background-color:${Sc}}:host([data-color='navy']){color:${Yc};background-color:${Kc}}:host([data-color='lavender']){color:${Vc};background-color:${Hc}}:host([data-color='purple']){color:${ld};background-color:${ad}}:host([data-color='grape']){color:${Dc};background-color:${Mc}}:host([data-color='lilac']){color:${qc};background-color:${Rc}}:host([data-color='pink']){color:${ed};background-color:${Jc}}:host([data-color='magenta']){color:${Gc};background-color:${Wc}}:host([data-color='plum']){color:${rd};background-color:${id}}:host([data-color='beige']){color:${vc};background-color:${mc}}:host([data-color='mink']){color:${Xc};background-color:${Uc}}:host([data-color='platinum']){color:${od};background-color:${td}}:host([data-color='anchor']){color:${fc};background-color:${gc}}:host([active]){transform:perspective(1px);transition-property:transform,opacity;transition-duration:${yi},${vi};transition-delay:${nt.fastEase},${nt.nullEasing}}:host([active])::before{content:'';position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;transition-property:margin,opacity;transition-duration:${yi}),${qn};transition-delay:${nt.fastEase}),${nt.nullEasing})}:host([active])::before{box-shadow:${yd};border-style:solid;border-color:${gn}}:host([active][appearance='shadow'])::before{border-style:none;border-color:none}:host([active]:not([appearance='shadow']))::before{margin:calc(-2 * ${ue});border-width:${ue}}:host([size='56'][active]:not([appearance='shadow']))::before,:host([size='64'][active]:not([appearance='shadow']))::before{margin:calc(-2 * ${se});border-width:${se}}:host([size='72'][active]:not([appearance='shadow']))::before,:host([size='96'][active]:not([appearance='shadow']))::before,:host([size='120'][active]:not([appearance='shadow']))::before,:host([size='128'][active]:not([appearance='shadow']))::before{margin:calc(-2 * ${kr});border-width:${kr}}:host([size='20'][active][appearance])::before,:host([size='24'][active][appearance])::before,:host([size='28'][active][appearance])::before{box-shadow:${fi}}:host([size='56'][active][appearance])::before,:host([size='64'][active][appearance])::before{box-shadow:${xr}}:host([size='72'][active][appearance])::before,:host([size='96'][active][appearance])::before,:host([size='120'][active][appearance])::before,:host([size='128'][active][appearance])::before{box-shadow:${xd}}:host([active][appearance='ring'])::before{box-shadow:none}:host([active='inactive']){opacity:0.8;transform:scale(0.875);transition-property:transform,opacity;transition-duration:${yi},${vi};transition-delay:${nt.fastOutSlowInMin},${nt.nullEasing}}:host([active='inactive'])::before{margin:0;opacity:0;transition-property:margin,opacity;transition-duration:${yi},${qn};transition-delay:${nt.fastOutSlowInMin},${nt.nullEasing}}@media screen and (prefers-reduced-motion:reduce){:host([active]){transition-duration:0.01ms}:host([active])::before{transition-duration:0.01ms;transition-delay:0.01ms}}`,mh=b`<svg width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="default-icon" fill="currentcolor" aria-hidden="true"><path d="M10 2a4 4 0 100 8 4 4 0 000-8zM7 6a3 3 0 116 0 3 3 0 01-6 0zm-2 5a2 2 0 00-2 2c0 1.7.83 2.97 2.13 3.8A9.14 9.14 0 0010 18c1.85 0 3.58-.39 4.87-1.2A4.35 4.35 0 0017 13a2 2 0 00-2-2H5zm-1 2a1 1 0 011-1h10a1 1 0 011 1c0 1.3-.62 2.28-1.67 2.95A8.16 8.16 0 0110 17a8.16 8.16 0 01-4.33-1.05A3.36 3.36 0 014 13z"></path></svg>`;function vh(){return b`<slot>${o=>o.name||o.initials?o.generateInitials():mh}</slot><slot name="badge"></slot>`}const $h=vh(),yh=bh.compose({name:`${p.prefix}-avatar`,template:$h,styles:fh});yh.define(p.registry);const xh={filled:"filled",ghost:"ghost",outline:"outline",tint:"tint"},kh={brand:"brand",danger:"danger",important:"important",informative:"informative",severe:"severe",subtle:"subtle",success:"success",warning:"warning"};var wh=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,Si=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ch(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&wh(e,t,r),r};class Xt extends ${constructor(){super(...arguments),this.appearance=xh.filled,this.color=kh.brand}}Si([a],Xt.prototype,"appearance",2),Si([a],Xt.prototype,"color",2),Si([a],Xt.prototype,"shape",2),Si([a],Xt.prototype,"size",2),Xe(Xt,Ue);const Jn=u.partial`
|
|
46
46
|
${k("inline-flex")} :host {
|
|
47
47
|
position: relative;
|
|
48
48
|
box-sizing: border-box;
|
|
@@ -56,7 +56,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
56
56
|
height: 20px;
|
|
57
57
|
padding-inline: calc(${ne} + ${H});
|
|
58
58
|
border-radius: ${$e};
|
|
59
|
-
border-color: ${
|
|
59
|
+
border-color: ${Z};
|
|
60
60
|
background-color: ${un};
|
|
61
61
|
color: ${Ke};
|
|
62
62
|
contain: content;
|
|
@@ -126,7 +126,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
126
126
|
height: 32px;
|
|
127
127
|
font-size: ${F};
|
|
128
128
|
line-height: ${q};
|
|
129
|
-
padding-inline: calc(${
|
|
129
|
+
padding-inline: calc(${J} + ${H});
|
|
130
130
|
}
|
|
131
131
|
:host([size='extra-large']) ::slotted(svg) {
|
|
132
132
|
font-size: 20px;
|
|
@@ -144,7 +144,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
144
144
|
|
|
145
145
|
:host([color='informative']) {
|
|
146
146
|
background-color: ${Gl};
|
|
147
|
-
color: ${
|
|
147
|
+
color: ${Q};
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
:host([color='severe']) {
|
|
@@ -181,7 +181,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
:host([appearance='ghost'][color='informative']) {
|
|
184
|
-
color: ${
|
|
184
|
+
color: ${Q};
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
:host([appearance='ghost'][color='severe']) {
|
|
@@ -211,12 +211,12 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
:host([appearance='outline'][color='important']) {
|
|
214
|
-
color: ${
|
|
214
|
+
color: ${Q};
|
|
215
215
|
border-color: ${Ve};
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
:host([appearance='outline'][color='informative']) {
|
|
219
|
-
color: ${
|
|
219
|
+
color: ${Q};
|
|
220
220
|
border-color: ${wo};
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -249,14 +249,14 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
:host([appearance='tint'][color='important']) {
|
|
252
|
-
background-color: ${
|
|
252
|
+
background-color: ${Q};
|
|
253
253
|
color: ${I};
|
|
254
|
-
border-color: ${
|
|
254
|
+
border-color: ${Z};
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
:host([appearance='tint'][color='informative']) {
|
|
258
258
|
background-color: ${Wl};
|
|
259
|
-
color: ${
|
|
259
|
+
color: ${Q};
|
|
260
260
|
border-color: ${wo};
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -268,7 +268,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
268
268
|
|
|
269
269
|
:host([appearance='tint'][color='subtle']) {
|
|
270
270
|
background-color: ${I};
|
|
271
|
-
color: ${
|
|
271
|
+
color: ${Q};
|
|
272
272
|
border-color: ${wo};
|
|
273
273
|
}
|
|
274
274
|
|
|
@@ -379,7 +379,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
379
379
|
:host,:host([appearance='outline']),:host([appearance='tint']){border-color:CanvasText}`));function sa(o={}){return b` ${He(o)}<slot>${fe(o.defaultContent)}</slot>${tt(o)} `}const Bh=sa(),Oh=Xt.compose({name:`${p.prefix}-badge`,template:Bh,styles:Th});Oh.define(p.registry);var _h=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Se=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ah(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&_h(e,t,r),r};class pe extends ${constructor(){super(),this.disabled=!1,this.disabledFocusable=!1,this.elementInternals=this.attachInternals(),this.elementInternals.role="button"}disabledChanged(){this.$fastController.isConnected&&(this.disabled?this.removeAttribute("tabindex"):this.tabIndex=Number(this.getAttribute("tabindex")??0)<0?-1:0)}disabledFocusableChanged(e,t){this.$fastController.isConnected&&(this.elementInternals.ariaDisabled=`${!!t}`)}get form(){return this.elementInternals.form}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}typeChanged(e,t){t!==ki.submit&&(this.formSubmissionFallbackControl?.remove(),this.shadowRoot?.querySelector('slot[name="internal"]')?.remove())}clickHandler(e){if(e&&this.disabledFocusable){e.stopImmediatePropagation();return}return this.press(),!0}connectedCallback(){super.connectedCallback(),this.elementInternals.ariaDisabled=`${!!this.disabledFocusable}`,this.disabledChanged()}createAndInsertFormSubmissionFallbackControl(){const e=this.formSubmissionFallbackControlSlot??document.createElement("slot");e.setAttribute("name","internal"),this.shadowRoot?.appendChild(e),this.formSubmissionFallbackControlSlot=e;const t=this.formSubmissionFallbackControl??document.createElement("button");t.style.display="none",t.setAttribute("type","submit"),t.setAttribute("slot","internal"),this.formNoValidate&&t.toggleAttribute("formnovalidate",!0),this.elementInternals.form?.id&&t.setAttribute("form",this.elementInternals.form.id),this.name&&t.setAttribute("name",this.name),this.value&&t.setAttribute("value",this.value),this.formAction&&t.setAttribute("formaction",this.formAction??""),this.formEnctype&&t.setAttribute("formenctype",this.formEnctype??""),this.formMethod&&t.setAttribute("formmethod",this.formMethod??""),this.formTarget&&t.setAttribute("formtarget",this.formTarget??""),this.append(t),this.formSubmissionFallbackControl=t}formDisabledCallback(e){this.disabled=e}keypressHandler(e){if(e&&this.disabledFocusable){e.stopImmediatePropagation();return}if(e.key===fo||e.key===Jo){this.click();return}return!0}press(){switch(this.type){case ki.reset:{this.resetForm();break}case ki.submit:{this.submitForm();break}}}resetForm(){this.elementInternals.form?.reset()}submitForm(){if(!(!this.elementInternals.form||this.disabled||this.type!==ki.submit)){if(!this.name&&!this.formAction&&!this.formEnctype&&!this.formAttribute&&!this.formMethod&&!this.formNoValidate&&!this.formTarget){this.elementInternals.form.requestSubmit();return}try{this.elementInternals.setFormValue(this.value??""),this.elementInternals.form.requestSubmit(this)}catch{this.createAndInsertFormSubmissionFallbackControl(),this.elementInternals.setFormValue(null),this.elementInternals.form.requestSubmit(this.formSubmissionFallbackControl)}}}}pe.formAssociated=!0,Se([a({mode:"boolean"})],pe.prototype,"autofocus",2),Se([g],pe.prototype,"defaultSlottedContent",2),Se([a({mode:"boolean"})],pe.prototype,"disabled",2),Se([a({attribute:"disabled-focusable",mode:"boolean"})],pe.prototype,"disabledFocusable",2),Se([a({attribute:"formaction"})],pe.prototype,"formAction",2),Se([a({attribute:"form"})],pe.prototype,"formAttribute",2),Se([a({attribute:"formenctype"})],pe.prototype,"formEnctype",2),Se([a({attribute:"formmethod"})],pe.prototype,"formMethod",2),Se([a({attribute:"formnovalidate",mode:"boolean"})],pe.prototype,"formNoValidate",2),Se([a({attribute:"formtarget"})],pe.prototype,"formTarget",2),Se([a],pe.prototype,"name",2),Se([a],pe.prototype,"type",2),Se([a],pe.prototype,"value",2);var Eh=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,Ii=(o,e,t,i)=>{for(var r=i>1?void 0:i?Nh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Eh(e,t,r),r};class Ye extends pe{constructor(){super(...arguments),this.iconOnly=!1}}Ii([a],Ye.prototype,"appearance",2),Ii([a],Ye.prototype,"shape",2),Ii([a],Ye.prototype,"size",2),Ii([a({attribute:"icon-only",mode:"boolean"})],Ye.prototype,"iconOnly",2),Xe(Ye,Ue);function Ar(o={}){return b`<template @click="${(e,t)=>e.clickHandler(t.event)}" @keypress="${(e,t)=>e.keypressHandler(t.event)}">${He(o)}<span class="content" part="content"><slot ${G("defaultSlottedContent")}></slot></span>${tt(o)}</template>`}const Fh=Ar(),Mh=Ye.compose({name:`${p.prefix}-button`,template:Fh,styles:Ci});Mh.define(p.registry);var Dh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,at=(o,e,t,i)=>{for(var r=i>1?void 0:i?Hh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Dh(e,t,r),r};class Pe extends ${constructor(){super(...arguments),this.initialValue="on",this._keydownPressed=!1,this.dirtyChecked=!1,this.elementInternals=this.attachInternals(),this._validationFallbackMessage="",this._value=this.initialValue}get checked(){return m.track(this,"checked"),!!this._checked}set checked(e){this._checked=e,this.setFormValue(e?this.value:null),this.setValidity(),this.setAriaChecked(),y(this.elementInternals,"checked",e),m.notify(this,"checked")}disabledChanged(e,t){this.disabled?this.removeAttribute("tabindex"):this.tabIndex=Number(this.getAttribute("tabindex")??0)<0?-1:0,this.elementInternals.ariaDisabled=this.disabled?"true":"false",y(this.elementInternals,"disabled",this.disabled)}disabledAttributeChanged(e,t){this.disabled=!!t}initialCheckedChanged(e,t){this.dirtyChecked||(this.checked=!!t)}initialValueChanged(e,t){this._value=t}requiredChanged(e,t){this.$fastController.isConnected&&(this.setValidity(),this.elementInternals.ariaRequired=this.required?"true":"false")}get form(){return this.elementInternals.form}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}get validationMessage(){if(this.elementInternals.validationMessage)return this.elementInternals.validationMessage;if(!this._validationFallbackMessage){const e=document.createElement("input");e.type="checkbox",e.required=!0,e.checked=!1,this._validationFallbackMessage=e.validationMessage}return this._validationFallbackMessage}get validity(){return this.elementInternals.validity}get value(){return m.track(this,"value"),this._value}set value(e){this._value=e,this.$fastController.isConnected&&(this.setFormValue(e),this.setValidity(),m.notify(this,"value"))}get willValidate(){return this.elementInternals.willValidate}checkValidity(){return this.elementInternals.checkValidity()}clickHandler(e){if(this.disabled)return;this.dirtyChecked=!0;const t=this.checked;return this.toggleChecked(),t!==this.checked&&(this.$emit("change"),this.$emit("input")),!0}connectedCallback(){super.connectedCallback(),this.disabled=!!this.disabledAttribute,this.setAriaChecked(),this.setValidity()}inputHandler(e){return this.setFormValue(this.value),this.setValidity(),!0}keydownHandler(e){if(e.key!==" ")return!0;this._keydownPressed=!0}keyupHandler(e){if(!this._keydownPressed||e.key!==" ")return!0;this._keydownPressed=!1,this.click()}formResetCallback(){this.checked=this.initialChecked??!1,this.dirtyChecked=!1,this.setValidity()}reportValidity(){return this.elementInternals.reportValidity()}setAriaChecked(e=this.checked){this.elementInternals.ariaChecked=e?"true":"false"}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}setCustomValidity(e){this.elementInternals.setValidity({customError:!0},e),this.setValidity()}setValidity(e,t,i){if(this.$fastController.isConnected){if(this.disabled||!this.required){this.elementInternals.setValidity({});return}this.elementInternals.setValidity({valueMissing:!!this.required&&!this.checked,...e},t??this.validationMessage,i)}}toggleChecked(e=!this.checked){this.checked=e}}Pe.formAssociated=!0,at([a({mode:"boolean"})],Pe.prototype,"autofocus",2),at([g],Pe.prototype,"disabled",2),at([a({attribute:"disabled",mode:"boolean"})],Pe.prototype,"disabledAttribute",2),at([a({attribute:"form"})],Pe.prototype,"formAttribute",2),at([a({attribute:"checked",mode:"boolean"})],Pe.prototype,"initialChecked",2),at([a({attribute:"value",mode:"fromView"})],Pe.prototype,"initialValue",2),at([a],Pe.prototype,"name",2),at([a({mode:"boolean"})],Pe.prototype,"required",2);var Vh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,Er=(o,e,t,i)=>{for(var r=i>1?void 0:i?Lh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Vh(e,t,r),r};class Pi extends Pe{indeterminateChanged(e,t){this.setAriaChecked(),y(this.elementInternals,"indeterminate",t)}constructor(){super(),this.elementInternals.role="checkbox"}setAriaChecked(e=this.checked){if(this.indeterminate){this.elementInternals.ariaChecked="mixed";return}super.setAriaChecked(e)}toggleChecked(e=!this.checked){this.indeterminate=!1,super.toggleChecked(e)}}Er([g],Pi.prototype,"indeterminate",2),Er([a],Pi.prototype,"shape",2),Er([a],Pi.prototype,"size",2);const jh=P("active"),Rh=P("bad-input"),x=P("checked"),qh=P("custom-error"),Wh=P("description"),xe=P("disabled");P("error");const Gh=P("flip-block"),Uh=P("focus-visible");P("has-message");const Ct=P("indeterminate"),Kt=P("multiple"),Xh=P("open"),Kh=P("pattern-mismatch"),Yh=P("placeholder-shown"),M=P("pressed"),Qh=P("range-overflow"),Zh=P("range-underflow"),Jh=P("required"),Nr=P("selected"),eu=P("step-mismatch"),zi=P("submenu"),tu=P("too-long"),ou=P("too-short"),iu=P("type-mismatch"),ru=P("user-invalid"),su=P("valid"),nu=P("value-missing"),au=u`
|
|
380
380
|
${k("inline-flex")}
|
|
381
381
|
|
|
382
|
-
:host{--size:16px;background-color:${I};border-radius:${Be};border:${T} solid ${Ve};box-sizing:border-box;cursor:pointer;position:relative;width:var(--size)}:host,.indeterminate-indicator,.checked-indicator{aspect-ratio:1}:host(:hover){border-color:${mt}}:host(:active){border-color:${vt}}:host(${x}:hover){background-color:${Ht};border-color:${Jl}}:host(${x}:active){background-color:${Vt};border-color:${$n}}:host(:focus-visible){outline:none}:host(:not([slot='input']))::after{content:'';position:absolute;inset:-8px;box-sizing:border-box;outline:none;border:${ue} solid ${
|
|
382
|
+
:host{--size:16px;background-color:${I};border-radius:${Be};border:${T} solid ${Ve};box-sizing:border-box;cursor:pointer;position:relative;width:var(--size)}:host,.indeterminate-indicator,.checked-indicator{aspect-ratio:1}:host(:hover){border-color:${mt}}:host(:active){border-color:${vt}}:host(${x}:hover){background-color:${Ht};border-color:${Jl}}:host(${x}:active){background-color:${Vt};border-color:${$n}}:host(:focus-visible){outline:none}:host(:not([slot='input']))::after{content:'';position:absolute;inset:-8px;box-sizing:border-box;outline:none;border:${ue} solid ${Z};border-radius:${C}}:host(:not([slot='input']):focus-visible)::after{border-color:${ve}}.indeterminate-indicator,.checked-indicator{color:${bt};inset:0;margin:auto;position:absolute}::slotted([slot='checked-indicator']),.checked-indicator{fill:currentColor;display:inline-flex;flex:1 0 auto;width:12px}:host(:not(${x})) *:is(::slotted([slot='checked-indicator']),.checked-indicator){display:none}:host(${x}),:host(${Ct}){border-color:${$t}}:host(${x}),:host(${Ct}) .indeterminate-indicator{background-color:${ft}}:host(${Ct}) .indeterminate-indicator{border-radius:${Be};position:absolute;width:calc(var(--size) / 2);inset:0}:host([size='large']){--size:20px}:host([size='large']) ::slotted([slot='checked-indicator']),:host([size='large']) .checked-indicator{width:16px}:host([shape='circular']),:host([shape='circular']) .indeterminate-indicator{border-radius:${$e}}:host([disabled]),:host([disabled]${x}){background-color:${it};border-color:${Ce}}:host([disabled]){cursor:unset}:host([disabled]${Ct}) .indeterminate-indicator{background-color:${Ce}}:host([disabled]${x}) .checked-indicator{color:${Ce}}`.withBehaviors(U(u`
|
|
383
383
|
:host{border-color:FieldText}:host(:not([slot='input']:focus-visible))::after{border-color:Canvas}:host(:not([disabled]):hover),:host(${x}:not([disabled]):hover),:host(:not([slot='input']):focus-visible)::after{border-color:Highlight}.indeterminate-indicator,.checked-indicator{color:HighlightText}:host(${x}),:host(${Ct}) .indeterminate-indicator{background-color:FieldText}:host(${x}:not([disabled]):hover),:host(${Ct}:not([disabled]):hover) .indeterminate-indicator{background-color:Highlight}:host([disabled]){border-color:GrayText}:host([disabled]${Ct}) .indeterminate-indicator{background-color:GrayText}:host([disabled]),:host([disabled]${x}) .checked-indicator{color:GrayText}`)),lu=b.partial(`
|
|
384
384
|
<svg
|
|
385
385
|
fill="currentColor"
|
|
@@ -398,7 +398,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
398
398
|
|
|
399
399
|
:host,:host(:is([size])){gap:12px;height:auto;padding-top:14px;padding-inline:12px;padding-bottom:16px;font-size:${B};line-height:${A}}.content{display:flex;flex-direction:column;text-align:start}::slotted([slot='description']){color:${Ie};line-height:100%;font-size:${F};font-weight:${_}}::slotted(svg),:host([size='large']) ::slotted(svg){font-size:40px;height:40px;width:40px}:host(:hover) ::slotted([slot='description']){color:${Mt}}:host(:active) ::slotted([slot='description']){color:${Dt}}:host(:is([appearance='primary'],[appearance='primary']:is(:hover,:active))) ::slotted([slot='description']){color:${Ke}}:host(:is([appearance='transparent'],[appearance='subtle'],[appearance='subtle']:is(:hover,:active)))
|
|
400
400
|
::slotted([slot='description']){color:${Ie}}:host([appearance='transparent']:hover) ::slotted([slot='description']){color:${ri}}:host([appearance='transparent']:active) ::slotted([slot='description']){color:${si}}:host(:is(:disabled,:disabled[appearance],[disabled-focusable],[disabled-focusable][appearance]))
|
|
401
|
-
::slotted([slot='description']){color:${S}}:host([size='small']){padding:8px;padding-bottom:10px}:host([icon-only]){min-width:52px;max-width:52px;padding:${
|
|
401
|
+
::slotted([slot='description']){color:${S}}:host([size='small']){padding:8px;padding-bottom:10px}:host([icon-only]){min-width:52px;max-width:52px;padding:${J}}:host([icon-only][size='small']){min-width:48px;max-width:48px;padding:${ne}}:host([icon-only][size='large']){min-width:56px;max-width:56px;padding:${Oe}}:host([size='large']){padding-top:18px;padding-inline:16px;padding-bottom:20px;font-size:${he};line-height:${ye}}:host([size='large']) ::slotted([slot='description']){font-size:${B}}`.withBehaviors(U(u`
|
|
402
402
|
:host([appearance='primary']:not(:hover,:focus-visible,:disabled,[disabled-focusable]))
|
|
403
403
|
::slotted([slot='description']){color:HighlightText}`));function gu(o={}){return b`<template ?disabled="${e=>e.disabled}" tabindex="${e=>e.disabled?null:e.tabIndex??0}">${He(o)}<span class="content" part="content"><slot ${G("defaultSlottedContent")}></slot><slot name="description"></slot></span>${tt(o)}</template>`}const fu=gu(),mu=pu.compose({name:`${p.prefix}-compound-button`,template:fu,styles:bu});mu.define(p.registry);var vu=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,lt=(o,e,t,i)=>{for(var r=i>1?void 0:i?$u(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&vu(e,t,r),r};class qe extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.count=0,this.overflowCount=99,this.showZero=!1,this.dot=!1}countChanged(){this.setCount()}overflowCountChanged(){this.setCount()}setCount(){const e=this.count??0;if((e!==0||this.showZero)&&!this.dot)return e>this.overflowCount?`${this.overflowCount}+`:`${e}`}}lt([a],qe.prototype,"appearance",2),lt([a],qe.prototype,"color",2),lt([a],qe.prototype,"shape",2),lt([a],qe.prototype,"size",2),lt([a({converter:re})],qe.prototype,"count",2),lt([a({attribute:"overflow-count",converter:re})],qe.prototype,"overflowCount",2),lt([a({attribute:"show-zero",mode:"boolean"})],qe.prototype,"showZero",2),lt([a({mode:"boolean"})],qe.prototype,"dot",2),Xe(qe,Ue);const yu=u`
|
|
404
404
|
:host([shape='rounded']){border-radius:${C}}:host([shape='rounded']:is([size='tiny'],[size='extra-small'],[size='small'])){border-radius:${Be}}${ea}
|
|
@@ -406,27 +406,27 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
406
406
|
${oa}
|
|
407
407
|
${Jn}
|
|
408
408
|
|
|
409
|
-
:host(:is([dot],[dot][appearance][size])){min-width:auto;width:6px;height:6px;padding:0}`;function xu(o={}){return sa({defaultContent:b`${e=>e.setCount()}`})}const ku=xu(),wu=qe.compose({name:`${p.prefix}-counter-badge`,template:ku,styles:yu});wu.define(p.registry);const St={modal:"modal",nonModal:"non-modal",alert:"alert"};function na(o,e="-dialog"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}var Cu=Object.defineProperty,Su=Object.getOwnPropertyDescriptor,Ti=(o,e,t,i)=>{for(var r=i>1?void 0:i?Su(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Cu(e,t,r),r};class So extends ${constructor(){super(...arguments),this.type=St.modal,this.emitBeforeToggle=()=>{this.$emit("beforetoggle",{oldState:this.dialog.open?"open":"closed",newState:this.dialog.open?"closed":"open"})},this.emitToggle=()=>{this.$emit("toggle",{oldState:this.dialog.open?"closed":"open",newState:this.dialog.open?"open":"closed"})}}typeChanged(e,t){this.dialog&&(t===St.alert?this.dialog.setAttribute("role","alertdialog"):this.dialog.removeAttribute("role"),t!==St.nonModal?this.dialog.setAttribute("aria-modal","true"):this.dialog.removeAttribute("aria-modal"))}connectedCallback(){super.connectedCallback(),this.typeChanged(void 0,this.type)}show(){
|
|
409
|
+
:host(:is([dot],[dot][appearance][size])){min-width:auto;width:6px;height:6px;padding:0}`;function xu(o={}){return sa({defaultContent:b`${e=>e.setCount()}`})}const ku=xu(),wu=qe.compose({name:`${p.prefix}-counter-badge`,template:ku,styles:yu});wu.define(p.registry);const St={modal:"modal",nonModal:"non-modal",alert:"alert"};function na(o,e="-dialog"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}var Cu=Object.defineProperty,Su=Object.getOwnPropertyDescriptor,Ti=(o,e,t,i)=>{for(var r=i>1?void 0:i?Su(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Cu(e,t,r),r};class So extends ${constructor(){super(...arguments),this.type=St.modal,this.emitBeforeToggle=()=>{this.$emit("beforetoggle",{oldState:this.dialog.open?"open":"closed",newState:this.dialog.open?"closed":"open"})},this.emitToggle=()=>{this.$emit("toggle",{oldState:this.dialog.open?"closed":"open",newState:this.dialog.open?"open":"closed"})}}typeChanged(e,t){this.dialog&&(t===St.alert?this.dialog.setAttribute("role","alertdialog"):this.dialog.removeAttribute("role"),t!==St.nonModal?this.dialog.setAttribute("aria-modal","true"):this.dialog.removeAttribute("aria-modal"))}connectedCallback(){super.connectedCallback(),this.typeChanged(void 0,this.type)}show(){ie.enqueue(()=>{this.emitBeforeToggle(),this.type===St.alert||this.type===St.modal?this.dialog.showModal():this.type===St.nonModal&&this.dialog.show(),this.emitToggle()})}hide(){this.emitBeforeToggle(),this.dialog.close(),this.emitToggle()}clickHandler(e){return this.dialog.open&&this.type!==St.alert&&e.target===this.dialog&&this.hide(),!0}}Ti([g],So.prototype,"dialog",2),Ti([a({attribute:"aria-describedby"})],So.prototype,"ariaDescribedby",2),Ti([a({attribute:"aria-labelledby"})],So.prototype,"ariaLabelledby",2),Ti([a],So.prototype,"type",2);const Iu=b`<dialog class="dialog" part="dialog" aria-describedby="${o=>o.ariaDescribedby}" aria-labelledby="${o=>o.ariaLabelledby}" aria-label="${o=>o.ariaLabel}" @click="${(o,e)=>o.clickHandler(e.event)}" @cancel="${o=>o.hide()}" ${E("dialog")}><slot></slot></dialog>`,Pu=u`
|
|
410
410
|
@layer base{:host{--dialog-backdrop:${gr};--dialog-starting-scale:0.85}::backdrop{background:var(--dialog-backdrop,rgba(0,0,0,0.4))}dialog{background:${I};border-radius:${_n};border:none;box-shadow:${jn};color:${z};max-height:100vh;padding:0;width:100%;max-width:600px}:host([type='non-modal']) dialog{inset:0;position:fixed;z-index:2;overflow:auto}@supports (max-height:1dvh){dialog{max-height:100dvh}}}@layer animations{@media (prefers-reduced-motion:no-preference){dialog,::backdrop{transition:display allow-discrete,opacity,overlay allow-discrete,scale;transition-duration:${Ir};transition-timing-function:${kt};opacity:0}::backdrop{transition-timing-function:${zr}}[open],[open]::backdrop{opacity:1}dialog:not([open]){scale:var(--dialog-starting-scale);transition-timing-function:${xt}}}@starting-style{[open],[open]::backdrop{opacity:0}dialog{scale:var(--dialog-starting-scale)}}}`.withBehaviors(U(u`
|
|
411
|
-
@layer base{dialog{border:${T} solid ${
|
|
411
|
+
@layer base{dialog{border:${T} solid ${Z}}}`)),zu=So.compose({name:`${p.prefix}-dialog`,template:Iu,styles:Pu});zu.define(p.registry);class Tu extends ${clickHandler(e){if(!e.defaultPrevented){const t=this.parentElement;na(t)&&t.hide()}return!0}}const Bu=b`<template><div class="title" part="title"><slot name="title"></slot><slot name="title-action"></slot><slot name="close" @click="${(o,e)=>o.clickHandler(e.event)}"></slot></div><div class="content" part="content"><slot></slot></div><div class="actions" part="actions"><slot name="action"></slot></div></template>`,Ou=u`
|
|
412
412
|
${k("grid")}
|
|
413
413
|
|
|
414
414
|
:host{background:${I};box-sizing:border-box;gap:${V};padding:${yt} ${wr};container:dialog-body / inline-size}.title{box-sizing:border-box;align-items:flex-start;background:${I};color:${z};column-gap:8px;display:flex;font-family:${v};font-size:${jt};font-weight:${D};inset-block-start:0;justify-content:space-between;line-height:${gi};margin-block-end:calc(${V} * -1);margin-block-start:calc(${yt} * -1);padding-block-end:${V};padding-block-start:${yt}}.content{box-sizing:border-box;color:${z};font-family:${v};font-size:${B};font-weight:${_};line-height:${A};min-height:32px}.actions{box-sizing:border-box;background:${I};display:flex;flex-direction:column;gap:${V};inset-block-end:0;margin-block-end:calc(${yt} * -1);padding-block-end:${yt};padding-block-start:${mi}}::slotted([slot='title-action']){margin-inline-start:auto}::slotted([slot='title']){font:inherit;padding:0;margin:0}:not(:has(:is([slot='title'],[slot='title-action']))) .title{justify-content:end}@container (min-width:480px){.actions{align-items:center;flex-direction:row;justify-content:flex-end;margin-block-start:calc(${V} * -1);padding-block-start:${V}}}@media (min-height:480px){.title{position:sticky;z-index:1}.actions{position:sticky;z-index:2}`,_u=Tu.compose({name:`${p.prefix}-dialog-body`,template:Bu,styles:Ou});_u.define(p.registry);const Io={separator:"separator",presentation:"presentation"},aa=ge;var Au=Object.defineProperty,Eu=Object.getOwnPropertyDescriptor,la=(o,e,t,i)=>{for(var r=i>1?void 0:i?Eu(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Au(e,t,r),r};class Fr extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this.elementInternals.role=this.role??Io.separator,this.role!==Io.presentation&&(this.elementInternals.ariaOrientation=this.orientation??aa.horizontal)}roleChanged(e,t){this.$fastController.isConnected&&(this.elementInternals.role=`${t??Io.separator}`),t===Io.presentation&&(this.elementInternals.ariaOrientation=null)}orientationChanged(e,t){this.elementInternals.ariaOrientation=this.role!==Io.presentation?t??null:null,wt(this.elementInternals,e,t,aa)}}la([a],Fr.prototype,"role",2),la([a],Fr.prototype,"orientation",2);var Nu=Object.defineProperty,Fu=Object.getOwnPropertyDescriptor,Mr=(o,e,t,i)=>{for(var r=i>1?void 0:i?Fu(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Nu(e,t,r),r};class Bi extends Fr{}Mr([a({attribute:"align-content"})],Bi.prototype,"alignContent",2),Mr([a],Bi.prototype,"appearance",2),Mr([a({mode:"boolean"})],Bi.prototype,"inset",2);function Mu(){return b`<slot></slot>`}const Du=Mu(),Hu=u`
|
|
415
415
|
${k("flex")}
|
|
416
416
|
|
|
417
|
-
:host{contain:content}:host::after,:host::before{align-self:center;background:${wo};box-sizing:border-box;content:'';display:flex;flex-grow:1;height:${T}}:host([inset]){padding:0 12px}:host ::slotted(*){color:${Ie};font-family:${v};font-size:${F};font-weight:${_};margin:0;padding:0 12px}:host([align-content='start'])::before,:host([align-content='end'])::after{flex-basis:12px;flex-grow:0;flex-shrink:0}:host([orientation='vertical']){align-items:center;flex-direction:column;height:100%;min-height:84px}:host([orientation='vertical']):empty{min-height:20px}:host([orientation='vertical'][inset])::before{margin-top:12px}:host([orientation='vertical'][inset])::after{margin-bottom:12px}:host([orientation='vertical']):empty::before,:host([orientation='vertical']):empty::after{height:10px;min-height:10px;flex-grow:0}:host([orientation='vertical'])::before,:host([orientation='vertical'])::after{width:${T};min-height:20px;height:100%}:host([orientation='vertical']) ::slotted(*){display:flex;flex-direction:column;padding:12px 0;line-height:20px}:host([orientation='vertical'][align-content='start'])::before{min-height:8px}:host([orientation='vertical'][align-content='end'])::after{min-height:8px}:host([appearance='strong'])::before,:host([appearance='strong'])::after{background:${Le}}:host([appearance='strong']) ::slotted(*){color:${z}}:host([appearance='brand'])::before,:host([appearance='brand'])::after{background:${mn}}:host([appearance='brand']) ::slotted(*){color:${ni}}:host([appearance='subtle'])::before,:host([appearance='subtle'])::after{background:${Ql}}:host([appearance='subtle']) ::slotted(*){color:${
|
|
418
|
-
:host([appearance='strong'])::before,:host([appearance='strong'])::after,:host([appearance='brand'])::before,:host([appearance='brand'])::after,:host([appearance='subtle'])::before,:host([appearance='subtle'])::after,:host::after,:host::before{background:WindowText;color:WindowText}`)),Vu=Bi.compose({name:`${p.prefix}-divider`,template:Du,styles:Hu});Vu.define(p.registry);const Lu={start:"start",end:"end"},ju={small:"small",medium:"medium",large:"large",full:"full"},Po={nonModal:"non-modal",modal:"modal",inline:"inline"};var Ru=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,Yt=(o,e,t,i)=>{for(var r=i>1?void 0:i?qu(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Ru(e,t,r),r};class It extends ${constructor(){super(...arguments),this.type=Po.modal,this.position=Lu.start,this.size=ju.medium,this.emitToggle=()=>{this.$emit("toggle",{oldState:this.dialog.open?"closed":"open",newState:this.dialog.open?"open":"closed"})},this.emitBeforeToggle=()=>{this.$emit("beforetoggle",{oldState:this.dialog.open?"open":"closed",newState:this.dialog.open?"closed":"open"})}}typeChanged(){this.dialog&&(this.updateDialogRole(),this.type===Po.modal?this.dialog.setAttribute("aria-modal","true"):this.dialog.removeAttribute("aria-modal"))}connectedCallback(){super.connectedCallback(),this.typeChanged(),this.observeRoleAttr()}disconnectedCallback(){super.disconnectedCallback(),this.roleAttrObserver.disconnect()}show(){
|
|
417
|
+
:host{contain:content}:host::after,:host::before{align-self:center;background:${wo};box-sizing:border-box;content:'';display:flex;flex-grow:1;height:${T}}:host([inset]){padding:0 12px}:host ::slotted(*){color:${Ie};font-family:${v};font-size:${F};font-weight:${_};margin:0;padding:0 12px}:host([align-content='start'])::before,:host([align-content='end'])::after{flex-basis:12px;flex-grow:0;flex-shrink:0}:host([orientation='vertical']){align-items:center;flex-direction:column;height:100%;min-height:84px}:host([orientation='vertical']):empty{min-height:20px}:host([orientation='vertical'][inset])::before{margin-top:12px}:host([orientation='vertical'][inset])::after{margin-bottom:12px}:host([orientation='vertical']):empty::before,:host([orientation='vertical']):empty::after{height:10px;min-height:10px;flex-grow:0}:host([orientation='vertical'])::before,:host([orientation='vertical'])::after{width:${T};min-height:20px;height:100%}:host([orientation='vertical']) ::slotted(*){display:flex;flex-direction:column;padding:12px 0;line-height:20px}:host([orientation='vertical'][align-content='start'])::before{min-height:8px}:host([orientation='vertical'][align-content='end'])::after{min-height:8px}:host([appearance='strong'])::before,:host([appearance='strong'])::after{background:${Le}}:host([appearance='strong']) ::slotted(*){color:${z}}:host([appearance='brand'])::before,:host([appearance='brand'])::after{background:${mn}}:host([appearance='brand']) ::slotted(*){color:${ni}}:host([appearance='subtle'])::before,:host([appearance='subtle'])::after{background:${Ql}}:host([appearance='subtle']) ::slotted(*){color:${Q}}`.withBehaviors(U(u`
|
|
418
|
+
:host([appearance='strong'])::before,:host([appearance='strong'])::after,:host([appearance='brand'])::before,:host([appearance='brand'])::after,:host([appearance='subtle'])::before,:host([appearance='subtle'])::after,:host::after,:host::before{background:WindowText;color:WindowText}`)),Vu=Bi.compose({name:`${p.prefix}-divider`,template:Du,styles:Hu});Vu.define(p.registry);const Lu={start:"start",end:"end"},ju={small:"small",medium:"medium",large:"large",full:"full"},Po={nonModal:"non-modal",modal:"modal",inline:"inline"};var Ru=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,Yt=(o,e,t,i)=>{for(var r=i>1?void 0:i?qu(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Ru(e,t,r),r};class It extends ${constructor(){super(...arguments),this.type=Po.modal,this.position=Lu.start,this.size=ju.medium,this.emitToggle=()=>{this.$emit("toggle",{oldState:this.dialog.open?"closed":"open",newState:this.dialog.open?"open":"closed"})},this.emitBeforeToggle=()=>{this.$emit("beforetoggle",{oldState:this.dialog.open?"open":"closed",newState:this.dialog.open?"closed":"open"})}}typeChanged(){this.dialog&&(this.updateDialogRole(),this.type===Po.modal?this.dialog.setAttribute("aria-modal","true"):this.dialog.removeAttribute("aria-modal"))}connectedCallback(){super.connectedCallback(),this.typeChanged(),this.observeRoleAttr()}disconnectedCallback(){super.disconnectedCallback(),this.roleAttrObserver.disconnect()}show(){ie.enqueue(()=>{this.emitBeforeToggle(),this.type===Po.inline||this.type===Po.nonModal?this.dialog.show():this.dialog.showModal(),this.emitToggle()})}hide(){this.emitBeforeToggle(),this.dialog.close(),this.emitToggle()}clickHandler(e){return e.preventDefault(),this.dialog.open&&e.target===this.dialog&&this.hide(),!0}cancelHandler(){this.hide()}observeRoleAttr(){this.roleAttrObserver||(this.roleAttrObserver=new MutationObserver(()=>{this.updateDialogRole()}),this.roleAttrObserver.observe(this,{attributes:!0,attributeFilter:["role"]}))}updateDialogRole(){console.log(this.role),this.dialog&&(this.dialog.role=this.type===Po.modal?"dialog":this.role)}}Yt([a],It.prototype,"type",2),Yt([a({attribute:"aria-labelledby"})],It.prototype,"ariaLabelledby",2),Yt([a({attribute:"aria-describedby"})],It.prototype,"ariaDescribedby",2),Yt([a],It.prototype,"position",2),Yt([a({attribute:"size"})],It.prototype,"size",2),Yt([g],It.prototype,"dialog",2);const Wu=u`
|
|
419
419
|
${k("block")}
|
|
420
420
|
|
|
421
|
-
:host{--dialog-backdrop:${gr}}:host([type='non-modal']) dialog[open]::backdrop{display:none}:host([type='non-modal']) dialog{position:fixed;top:0;bottom:0}:host([type='inline']){height:100%;width:fit-content}:host([type='inline']) dialog[open]{box-shadow:none;position:relative}:host([size='small']) dialog{width:320px;max-width:320px}:host([size='large']) dialog{width:940px;max-width:940px}:host([size='full']) dialog{width:100%;max-width:100%}:host([position='end']) dialog{margin-inline-start:auto;margin-inline-end:0}dialog{box-sizing:border-box;z-index:var(--drawer-elevation,1000);font-size:${B};line-height:${A};font-family:${v};font-weight:${_};color:${z};max-width:var(--drawer-width,592px);max-height:100vh;height:100%;margin-inline-start:0;margin-inline-end:auto;border-inline-end-color:${
|
|
421
|
+
:host{--dialog-backdrop:${gr}}:host([type='non-modal']) dialog[open]::backdrop{display:none}:host([type='non-modal']) dialog{position:fixed;top:0;bottom:0}:host([type='inline']){height:100%;width:fit-content}:host([type='inline']) dialog[open]{box-shadow:none;position:relative}:host([size='small']) dialog{width:320px;max-width:320px}:host([size='large']) dialog{width:940px;max-width:940px}:host([size='full']) dialog{width:100%;max-width:100%}:host([position='end']) dialog{margin-inline-start:auto;margin-inline-end:0}dialog{box-sizing:border-box;z-index:var(--drawer-elevation,1000);font-size:${B};line-height:${A};font-family:${v};font-weight:${_};color:${z};max-width:var(--drawer-width,592px);max-height:100vh;height:100%;margin-inline-start:0;margin-inline-end:auto;border-inline-end-color:${Z};border-inline-start-color:var(--drawer-separator,${Z});outline:none;top:0;bottom:0;width:var(--drawer-width,592px);border-radius:0;padding:0;max-width:var(--drawer-width,592px);box-shadow:${jn};border:${T} solid ${Z};background:${I}}dialog::backdrop{background:var(--dialog-backdrop)}@layer animations{@media (prefers-reduced-motion:no-preference){dialog{transition:display allow-discrete,opacity,overlay allow-discrete,transform;transition-duration:${Ir};transition-timing-function:${kt}}:host dialog:not([open]){transform:translateX(-100%);transition-timing-function:${xt}}:host([position='end']) dialog:not([open]){transform:translateX(100%);transition-timing-function:${xt}}dialog[open]{transform:translateX(0)}dialog::backdrop{transition:display allow-discrete,opacity,overlay allow-discrete,scale;transition-duration:${Ir};transition-timing-function:${kt};background:var(--dialog-backdrop,${gr});opacity:0}dialog[open]::backdrop{opacity:1}dialog::backdrop{transition-timing-function:${zr}}}@starting-style{dialog[open]{transform:translateX(-100%)}:host([position='end']) dialog[open]{transform:translateX(100%)}dialog[open]::backdrop{opacity:0}}}`;function Gu(){return b`<dialog class="dialog" part="dialog" aria-describedby="${o=>o.ariaDescribedby}" aria-labelledby="${o=>o.ariaLabelledby}" aria-label="${o=>o.ariaLabel}" size="${o=>o.size}" position="${o=>o.position}" @click="${(o,e)=>o.clickHandler(e.event)}" @cancel="${o=>o.cancelHandler()}" ${E("dialog")}><slot></slot></dialog>`}const Uu=Gu(),Xu=It.compose({name:`${p.prefix}-drawer`,template:Uu,styles:Wu});Xu.define(p.registry);class Ku extends ${clickHandler(e){if(!e.defaultPrevented){const t=this.parentElement;na(t,"-drawer")&&t.hide()}return!0}}const Yu=u`
|
|
422
422
|
${k("grid")}
|
|
423
|
-
:host{box-sizing:border-box;grid-template-rows:min-content auto min-content;position:relative;height:100%;padding:${wd};max-height:100svh}.header{display:flex;justify-content:space-between;align-items:center;${zh}}.footer{display:flex;justify-content:flex-start;gap:${le}}::slotted([slot='title']){font:inherit;padding:0;margin:0}`;function Qu(){return b`<div class="header" part="header"><slot name="title"></slot><slot name="close" @click="${(o,e)=>o.clickHandler(e.event)}"></slot></div><div class="content" part="content"><slot></slot></div><div class="footer" part="footer"><slot name="footer"></slot></div>`}const Zu=Qu(),Ju=Ku.compose({name:`${p.prefix}-drawer-body`,template:Zu,styles:Yu});Ju.define(p.registry);function ca(o,e="-listbox"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}function Oi(o,e="-option"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}function da(o){return o.closest("[lang]")?.lang??"en"}let ep=0;function Qt(o="id-"){const e=`${o}${ep++}`;return document.getElementById(e)?Qt(o):e}function tp(o,e){if("requestIdleCallback"in globalThis)return globalThis.requestIdleCallback(o,e);const t=Date.now();return setTimeout(()=>{o({didTimeout:e?.timeout?Date.now()-t>=e.timeout:!1,timeRemaining:()=>0})},1)}function op(o){"cancelIdleCallback"in globalThis?globalThis.cancelIdleCallback(o):clearTimeout(o)}function ha(o,e,t){let i;const s=`${t?.shallow??!1?":scope > ":""}:not(:defined)`,n=t?.timeout??50,c=h=>{if(i&&(op(i),i=void 0),!o.querySelector(s)||h&&h.timeRemaining()<=0){e();return}i=tp(c,{timeout:n})};c()}const ip={filledDarker:"filled-darker",filledLighter:"filled-lighter",outline:"outline",transparent:"transparent"},Dr={combobox:"combobox",dropdown:"dropdown",select:"select"},rp=b`<svg class="chevron-down-20-regular" role="button" slot="indicator" viewBox="0 0 20 20" ${E("indicator")}><path d="M15.85 7.65a.5.5 0 0 1 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16a.5.5 0 0 1 .7 0" fill="currentColor" /></svg>`,sp=b`<input @input="${(o,e)=>o.inputHandler(e.event)}" @change="${(o,e)=>o.changeHandler(e.event)}" aria-activedescendant="${o=>o.activeDescendant}" aria-controls="${o=>o.listbox?.id??null}" aria-labelledby="${o=>o.ariaLabelledBy}" aria-expanded="${o=>o.open}" aria-haspopup="listbox" placeholder="${o=>o.placeholder}" role="combobox" ?disabled="${o=>o.disabled}" type="${o=>o.type}" value="${o=>o.valueAttribute}" slot="control" ${E("control")} />`,np=b`<button aria-activedescendant="${o=>o.activeDescendant}" aria-controls="${o=>o.listbox?.id??null}" aria-expanded="${o=>o.open}" aria-haspopup="listbox" role="combobox" ?disabled="${o=>o.disabled}" type="button" slot="control" ${E("control")}>${o=>o.displayValue}</button>`;function ap(o={}){return b`<template @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}" @mousedown="${(e,t)=>e.mousedownHandler(t.event)}"><div class="control"><slot name="control" ${E("controlSlot")}></slot><slot name="indicator" ${E("indicatorSlot")}>${fe(o.indicator)}</slot></div><slot @slotchange="${(e,t)=>e.slotchangeHandler(t.event)}"></slot></template>`}const lp=ap({indicator:rp});var cp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,X=(o,e,t,i)=>{for(var r=i>1?void 0:i?dp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&cp(e,t,r),r};const L=class so extends ${constructor(){super(),this.activeIndex=0,this.id=Qt("dropdown-"),this.required=!1,this.type=Dr.dropdown,this.valueAttribute="",this.repositionListbox=()=>{this.frameId&&cancelAnimationFrame(this.frameId),this.frameId=requestAnimationFrame(()=>{const e=this.getBoundingClientRect(),t=window.innerWidth-e.right,i=e.left;this.listbox.style.minWidth=`${e.width}px`,this.listbox.style.top=`${e.top}px`,i+e.width>window.innerWidth||ei(this)==="rtl"&&t-e.width>0?(this.listbox.style.right=`${t}px`,this.listbox.style.left="unset"):(this.listbox.style.left=`${i}px`,this.listbox.style.right="unset")})},this.elementInternals=this.attachInternals(),this.elementInternals.role="presentation",Q.enqueue(()=>{this.insertControl()})}get activeDescendant(){if(this.open)return this.enabledOptions[this.activeIndex]?.id}activeIndexChanged(e,t){if(typeof t=="number"){const i=this.matches(":has(:focus-visible)")?t:-1;this.enabledOptions.forEach((r,s)=>{r.active=s===i}),this.open&&this.enabledOptions[i]?.scrollIntoView({block:"nearest"})}}controlChanged(e,t){t&&(t.id=t.id||Qt("input-"))}disabledChanged(e,t){Q.enqueue(()=>{this.options.forEach(i=>{i.disabled=i.disabledAttribute||this.disabled})})}get displayValue(){if(!this.$fastController.isConnected||!this.control||this.isCombobox&&this.multiple)return y(this.elementInternals,"placeholder-shown",!1),"";this.listFormatter=this.listFormatter??new Intl.ListFormat(da(this),{type:"conjunction",style:"narrow"});const e=this.listFormatter.format(this.selectedOptions.map(t=>t.text));return y(this.elementInternals,"placeholder-shown",!e),this.isCombobox?e:e||this.placeholder}listboxChanged(e,t){if(e&&m.getNotifier(this).unsubscribe(e),t){t.dropdown=this,t.popover="manual",t.tabIndex=-1;const i=m.getNotifier(this);i.subscribe(t);for(const r of["disabled","multiple"])i.notify(r);if(Q.enqueue(()=>{this.enabledOptions.filter(r=>r.defaultSelected).forEach((r,s)=>{r.selected=this.multiple||s===0}),this.setValidity()}),ti){const r=Qt("--dropdown-anchor-");this.style.setProperty("anchor-name",r),this.listbox.style.setProperty("position-anchor",r)}}}multipleChanged(e,t){this.elementInternals.ariaMultiSelectable=t?"true":"false",y(this.elementInternals,"multiple",t),this.value=null}nameChanged(e,t){Q.enqueue(()=>{this.options.forEach(i=>{i.name=t})})}openChanged(e,t){y(this.elementInternals,"open",t),this.elementInternals.ariaExpanded=t?"true":"false",this.activeIndex=this.selectedIndex??-1,ti||this.anchorPositionFallback(t)}typeChanged(e,t){this.$fastController.isConnected&&this.insertControl()}get enabledOptions(){return this.listbox?.enabledOptions??[]}get freeformOption(){return this.enabledOptions.find(e=>e.freeform)}get isCombobox(){return this.type===Dr.combobox}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}get options(){return this.listbox?.options??[]}get selectedIndex(){return this.enabledOptions.findIndex(e=>e.selected)??-1}get selectedOptions(){return this.listbox?.selectedOptions??[]}get validationMessage(){if(this.elementInternals.validationMessage)return this.elementInternals.validationMessage;if(!this._validationFallbackMessage){const e=document.createElement("input");e.type="radio",e.name="validation-message-fallback",e.required=!0,e.checked=!1,this._validationFallbackMessage=e.validationMessage}return!this.disabled&&this.required&&this.listbox.selectedOptions.length===0?this._validationFallbackMessage:""}get validity(){return this.elementInternals.validity}get value(){return m.notify(this,"value"),this.enabledOptions.find(e=>e.selected)?.value??null}set value(e){this.multiple||(this.selectOption(this.enabledOptions.findIndex(t=>t.value===e)),m.track(this,"value"))}get willValidate(){return this.elementInternals.willValidate}changeHandler(e){if(this===e.target)return!0;const t=this.isCombobox?this.enabledOptions.findIndex(i=>i.text===this.control.value):this.enabledOptions.indexOf(e.target);return this.selectOption(t,!0),!0}checkValidity(){return this.elementInternals.checkValidity()}clickHandler(e){if(this.disabled)return;const t=e.target;if(this.focus(),t===this.control&&!this.isCombobox)return this.listbox.togglePopover(),!0;if(!this.open)return this.listbox.showPopover(),!0;if(Oi(t)){if(t.disabled)return;this.selectOption(this.enabledOptions.indexOf(t),!0),this.multiple||(this.isCombobox&&(this.control.value=t.text,this.updateFreeformOption()),this.listbox.hidePopover())}return!0}filterOptions(e,t=this.enabledOptions){return this.listCollator||(this.listCollator=new Intl.Collator(da(this),{usage:"search",sensitivity:"base"})),t.filter(i=>this.listCollator.compare(i.text.substring(0,Math.min(i.text.length,e.length)),e)===0)}focus(e){this.disabled||this.control.focus(e)}focusoutHandler(e){const t=e.relatedTarget;return this.open&&!this.contains(t)&&this.listbox.togglePopover(),!0}formResetCallback(){this.enabledOptions.forEach((e,t)=>{if(this.multiple){e.selected=!!e.defaultSelected;return}if(!e.defaultSelected){e.selected=!1;return}this.selectOption(t)}),this.setValidity()}getEnabledIndexInBounds(e,t=this.enabledOptions.length||0){return t===0?-1:(e+t)%t}inputHandler(e){this.open||this.listbox.showPopover(),this.updateFreeformOption();const t=this.control.value,i=this.enabledOptions.indexOf(this.filterOptions(t)[0]??null);return this.activeIndex=i,!0}insertControl(){if(this.controlSlot?.assignedNodes().forEach(e=>this.removeChild(e)),this.type===Dr.combobox){sp.render(this,this);return}np.render(this,this)}keydownHandler(e){let t=0;switch(e.key){case"ArrowUp":{e.preventDefault(),t=-1;break}case"ArrowDown":{e.preventDefault(),t=1;break}case" ":{if(this.isCombobox)break;e.preventDefault()}case"Enter":case"Tab":{if(this.open){if(this.selectOption(this.activeIndex,!0),this.multiple)break;return this.listbox.hidePopover(),e.key==="Tab"}this.listbox.showPopover();break}case"Escape":{this.activeIndex=this.multiple?0:this.selectedIndex,this.listbox.hidePopover();break}}if(!t)return!0;if(!this.open){this.listbox.showPopover();return}let i=this.activeIndex;i+=t;let r=this.getEnabledIndexInBounds(i);return r===0&&this.freeformOption?.hidden&&(r=this.getEnabledIndexInBounds(i+t)),this.activeIndex=r,!0}mousedownHandler(e){if(!(this.disabled||e.target===this.control&&!this.isCombobox))return!Oi(e.target)}reportValidity(){return this.elementInternals.reportValidity()}selectOption(e=this.selectedIndex,t=!1){this.listbox.selectOption(e),this.control.value=this.displayValue,this.setValidity(),this.updateFreeformOption(),t&&this.$emit("change")}setValidity(e,t,i){if(this.$fastController.isConnected){if(this.disabled||!this.required){this.elementInternals.setValidity({});return}const r=this.required&&this.listbox.selectedOptions.length===0;this.elementInternals.setValidity({valueMissing:r,...e},t??this.validationMessage,i??this.control)}}slotchangeHandler(e){const t=e.target;ha(this,()=>{const i=t.assignedElements().find(r=>ca(r));i&&(this.listbox=i)})}updateFreeformOption(e=this.control.value){if(this.freeformOption){if(e===""||this.filterOptions(e,this.enabledOptions.filter(t=>!t.freeform)).length){this.freeformOption.value="",this.freeformOption.selected=!1,this.freeformOption.hidden=!0;return}this.freeformOption.value=e,this.freeformOption.hidden=!1}}disconnectedCallback(){so.AnchorPositionFallbackObserver?.disconnect(),this.debounceController?.abort(),super.disconnectedCallback()}anchorPositionFallback(e){if(so.AnchorPositionFallbackObserver||(so.AnchorPositionFallbackObserver=new IntersectionObserver(t=>{t.forEach(({boundingClientRect:i,isIntersecting:r,target:s})=>{if(ca(s)){if(i.bottom>window.innerHeight){y(s.elementInternals,"flip-block",!0);return}i.top<0&&y(s.elementInternals,"flip-block",!1)}})},{threshold:1})),e){this.debounceController=new AbortController,so.AnchorPositionFallbackObserver.observe(this.listbox),window.addEventListener("scroll",this.repositionListbox,{passive:!0,capture:!0,signal:this.debounceController.signal}),window.addEventListener("resize",this.repositionListbox,{passive:!0,signal:this.debounceController.signal}),this.repositionListbox();return}so.AnchorPositionFallbackObserver.unobserve(this.listbox),this.debounceController?.abort(),this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=void 0)}};L.formAssociated=!0,X([ls],L.prototype,"activeDescendant",1),X([g],L.prototype,"activeIndex",2),X([a({attribute:"aria-labelledby",mode:"fromView"})],L.prototype,"ariaLabelledBy",2),X([g],L.prototype,"control",2),X([a({mode:"boolean"})],L.prototype,"disabled",2),X([ls],L.prototype,"displayValue",1),X([a({attribute:"id"})],L.prototype,"id",2),X([g],L.prototype,"indicator",2),X([g],L.prototype,"indicatorSlot",2),X([a({attribute:"value",mode:"fromView"})],L.prototype,"initialValue",2),X([g],L.prototype,"listbox",2),X([a({mode:"boolean"})],L.prototype,"multiple",2),X([a],L.prototype,"name",2),X([g],L.prototype,"open",2),X([a],L.prototype,"placeholder",2),X([a({mode:"boolean"})],L.prototype,"required",2),X([a],L.prototype,"type",2),X([a({attribute:"value"})],L.prototype,"valueAttribute",2);let hp=L;var up=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,ua=(o,e,t,i)=>{for(var r=i>1?void 0:i?pp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&up(e,t,r),r};class Hr extends hp{constructor(){super(...arguments),this.appearance=ip.outline}}ua([a],Hr.prototype,"appearance",2),ua([a],Hr.prototype,"size",2);const bp=u`
|
|
423
|
+
:host{box-sizing:border-box;grid-template-rows:min-content auto min-content;position:relative;height:100%;padding:${wd};max-height:100svh}.header{display:flex;justify-content:space-between;align-items:center;${zh}}.footer{display:flex;justify-content:flex-start;gap:${le}}::slotted([slot='title']){font:inherit;padding:0;margin:0}`;function Qu(){return b`<div class="header" part="header"><slot name="title"></slot><slot name="close" @click="${(o,e)=>o.clickHandler(e.event)}"></slot></div><div class="content" part="content"><slot></slot></div><div class="footer" part="footer"><slot name="footer"></slot></div>`}const Zu=Qu(),Ju=Ku.compose({name:`${p.prefix}-drawer-body`,template:Zu,styles:Yu});Ju.define(p.registry);function ca(o,e="-listbox"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}function Oi(o,e="-option"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}function da(o){return o.closest("[lang]")?.lang??"en"}let ep=0;function Qt(o="id-"){const e=`${o}${ep++}`;return document.getElementById(e)?Qt(o):e}function tp(o,e){if("requestIdleCallback"in globalThis)return globalThis.requestIdleCallback(o,e);const t=Date.now();return setTimeout(()=>{o({didTimeout:e?.timeout?Date.now()-t>=e.timeout:!1,timeRemaining:()=>0})},1)}function op(o){"cancelIdleCallback"in globalThis?globalThis.cancelIdleCallback(o):clearTimeout(o)}function ha(o,e,t){let i;const s=`${t?.shallow??!1?":scope > ":""}:not(:defined)`,n=t?.timeout??50,c=h=>{if(i&&(op(i),i=void 0),!o.querySelector(s)||h&&h.timeRemaining()<=0){e();return}i=tp(c,{timeout:n})};c()}const ip={filledDarker:"filled-darker",filledLighter:"filled-lighter",outline:"outline",transparent:"transparent"},Dr={combobox:"combobox",dropdown:"dropdown",select:"select"},rp=b`<svg class="chevron-down-20-regular" role="button" slot="indicator" viewBox="0 0 20 20" ${E("indicator")}><path d="M15.85 7.65a.5.5 0 0 1 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16a.5.5 0 0 1 .7 0" fill="currentColor" /></svg>`,sp=b`<input @input="${(o,e)=>o.inputHandler(e.event)}" @change="${(o,e)=>o.changeHandler(e.event)}" aria-activedescendant="${o=>o.activeDescendant}" aria-controls="${o=>o.listbox?.id??null}" aria-labelledby="${o=>o.ariaLabelledBy}" aria-expanded="${o=>o.open}" aria-haspopup="listbox" placeholder="${o=>o.placeholder}" role="combobox" ?disabled="${o=>o.disabled}" type="${o=>o.type}" value="${o=>o.valueAttribute}" slot="control" ${E("control")} />`,np=b`<button aria-activedescendant="${o=>o.activeDescendant}" aria-controls="${o=>o.listbox?.id??null}" aria-expanded="${o=>o.open}" aria-haspopup="listbox" role="combobox" ?disabled="${o=>o.disabled}" type="button" slot="control" ${E("control")}>${o=>o.displayValue}</button>`;function ap(o={}){return b`<template @click="${(e,t)=>e.clickHandler(t.event)}" @focusout="${(e,t)=>e.focusoutHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}" @mousedown="${(e,t)=>e.mousedownHandler(t.event)}"><div class="control"><slot name="control" ${E("controlSlot")}></slot><slot name="indicator" ${E("indicatorSlot")}>${fe(o.indicator)}</slot></div><slot @slotchange="${(e,t)=>e.slotchangeHandler(t.event)}"></slot></template>`}const lp=ap({indicator:rp});var cp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,X=(o,e,t,i)=>{for(var r=i>1?void 0:i?dp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&cp(e,t,r),r};const L=class so extends ${constructor(){super(),this.activeIndex=0,this.id=Qt("dropdown-"),this.required=!1,this.type=Dr.dropdown,this.valueAttribute="",this.repositionListbox=()=>{this.frameId&&cancelAnimationFrame(this.frameId),this.frameId=requestAnimationFrame(()=>{const e=this.getBoundingClientRect(),t=window.innerWidth-e.right,i=e.left;this.listbox.style.minWidth=`${e.width}px`,this.listbox.style.top=`${e.top}px`,i+e.width>window.innerWidth||ei(this)==="rtl"&&t-e.width>0?(this.listbox.style.right=`${t}px`,this.listbox.style.left="unset"):(this.listbox.style.left=`${i}px`,this.listbox.style.right="unset")})},this.elementInternals=this.attachInternals(),this.elementInternals.role="presentation",ie.enqueue(()=>{this.insertControl()})}get activeDescendant(){if(this.open)return this.enabledOptions[this.activeIndex]?.id}activeIndexChanged(e,t){if(typeof t=="number"){const i=this.matches(":has(:focus-visible)")?t:-1;this.enabledOptions.forEach((r,s)=>{r.active=s===i}),this.open&&this.enabledOptions[i]?.scrollIntoView({block:"nearest"})}}controlChanged(e,t){t&&(t.id=t.id||Qt("input-"))}disabledChanged(e,t){ie.enqueue(()=>{this.options.forEach(i=>{i.disabled=i.disabledAttribute||this.disabled})})}get displayValue(){if(!this.$fastController.isConnected||!this.control||this.isCombobox&&this.multiple)return y(this.elementInternals,"placeholder-shown",!1),"";this.listFormatter=this.listFormatter??new Intl.ListFormat(da(this),{type:"conjunction",style:"narrow"});const e=this.listFormatter.format(this.selectedOptions.map(t=>t.text));return y(this.elementInternals,"placeholder-shown",!e),this.isCombobox?e:e||this.placeholder}listboxChanged(e,t){if(e&&m.getNotifier(this).unsubscribe(e),t){t.dropdown=this,t.popover="manual",t.tabIndex=-1;const i=m.getNotifier(this);i.subscribe(t);for(const r of["disabled","multiple"])i.notify(r);if(ie.enqueue(()=>{this.enabledOptions.filter(r=>r.defaultSelected).forEach((r,s)=>{r.selected=this.multiple||s===0}),this.setValidity()}),ti){const r=Qt("--dropdown-anchor-");this.style.setProperty("anchor-name",r),this.listbox.style.setProperty("position-anchor",r)}}}multipleChanged(e,t){this.elementInternals.ariaMultiSelectable=t?"true":"false",y(this.elementInternals,"multiple",t),this.value=null}nameChanged(e,t){ie.enqueue(()=>{this.options.forEach(i=>{i.name=t})})}openChanged(e,t){y(this.elementInternals,"open",t),this.elementInternals.ariaExpanded=t?"true":"false",this.activeIndex=this.selectedIndex??-1,ti||this.anchorPositionFallback(t)}typeChanged(e,t){this.$fastController.isConnected&&this.insertControl()}get enabledOptions(){return this.listbox?.enabledOptions??[]}get freeformOption(){return this.enabledOptions.find(e=>e.freeform)}get isCombobox(){return this.type===Dr.combobox}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}get options(){return this.listbox?.options??[]}get selectedIndex(){return this.enabledOptions.findIndex(e=>e.selected)??-1}get selectedOptions(){return this.listbox?.selectedOptions??[]}get validationMessage(){if(this.elementInternals.validationMessage)return this.elementInternals.validationMessage;if(!this._validationFallbackMessage){const e=document.createElement("input");e.type="radio",e.name="validation-message-fallback",e.required=!0,e.checked=!1,this._validationFallbackMessage=e.validationMessage}return!this.disabled&&this.required&&this.listbox.selectedOptions.length===0?this._validationFallbackMessage:""}get validity(){return this.elementInternals.validity}get value(){return m.notify(this,"value"),this.enabledOptions.find(e=>e.selected)?.value??null}set value(e){this.multiple||(this.selectOption(this.enabledOptions.findIndex(t=>t.value===e)),m.track(this,"value"))}get willValidate(){return this.elementInternals.willValidate}changeHandler(e){if(this===e.target)return!0;const t=this.isCombobox?this.enabledOptions.findIndex(i=>i.text===this.control.value):this.enabledOptions.indexOf(e.target);return this.selectOption(t,!0),!0}checkValidity(){return this.elementInternals.checkValidity()}clickHandler(e){if(this.disabled)return;const t=e.target;if(this.focus(),t===this.control&&!this.isCombobox)return this.listbox.togglePopover(),!0;if(!this.open)return this.listbox.showPopover(),!0;if(Oi(t)){if(t.disabled)return;this.selectOption(this.enabledOptions.indexOf(t),!0),this.multiple||(this.isCombobox&&(this.control.value=t.text,this.updateFreeformOption()),this.listbox.hidePopover())}return!0}filterOptions(e,t=this.enabledOptions){return this.listCollator||(this.listCollator=new Intl.Collator(da(this),{usage:"search",sensitivity:"base"})),t.filter(i=>this.listCollator.compare(i.text.substring(0,Math.min(i.text.length,e.length)),e)===0)}focus(e){this.disabled||this.control.focus(e)}focusoutHandler(e){const t=e.relatedTarget;return this.open&&!this.contains(t)&&this.listbox.togglePopover(),!0}formResetCallback(){this.enabledOptions.forEach((e,t)=>{if(this.multiple){e.selected=!!e.defaultSelected;return}if(!e.defaultSelected){e.selected=!1;return}this.selectOption(t)}),this.setValidity()}getEnabledIndexInBounds(e,t=this.enabledOptions.length||0){return t===0?-1:(e+t)%t}inputHandler(e){this.open||this.listbox.showPopover(),this.updateFreeformOption();const t=this.control.value,i=this.enabledOptions.indexOf(this.filterOptions(t)[0]??null);return this.activeIndex=i,!0}insertControl(){if(this.controlSlot?.assignedNodes().forEach(e=>this.removeChild(e)),this.type===Dr.combobox){sp.render(this,this);return}np.render(this,this)}keydownHandler(e){let t=0;switch(e.key){case"ArrowUp":{e.preventDefault(),t=-1;break}case"ArrowDown":{e.preventDefault(),t=1;break}case" ":{if(this.isCombobox)break;e.preventDefault()}case"Enter":case"Tab":{if(this.open){if(this.selectOption(this.activeIndex,!0),this.multiple)break;return this.listbox.hidePopover(),e.key==="Tab"}this.listbox.showPopover();break}case"Escape":{this.activeIndex=this.multiple?0:this.selectedIndex,this.listbox.hidePopover();break}}if(!t)return!0;if(!this.open){this.listbox.showPopover();return}let i=this.activeIndex;i+=t;let r=this.getEnabledIndexInBounds(i);return r===0&&this.freeformOption?.hidden&&(r=this.getEnabledIndexInBounds(i+t)),this.activeIndex=r,!0}mousedownHandler(e){if(!(this.disabled||e.target===this.control&&!this.isCombobox))return!Oi(e.target)}reportValidity(){return this.elementInternals.reportValidity()}selectOption(e=this.selectedIndex,t=!1){this.listbox.selectOption(e),this.control.value=this.displayValue,this.setValidity(),this.updateFreeformOption(),t&&this.$emit("change")}setValidity(e,t,i){if(this.$fastController.isConnected){if(this.disabled||!this.required){this.elementInternals.setValidity({});return}const r=this.required&&this.listbox.selectedOptions.length===0;this.elementInternals.setValidity({valueMissing:r,...e},t??this.validationMessage,i??this.control)}}slotchangeHandler(e){const t=e.target;ha(this,()=>{const i=t.assignedElements().find(r=>ca(r));i&&(this.listbox=i)})}updateFreeformOption(e=this.control.value){if(this.freeformOption){if(e===""||this.filterOptions(e,this.enabledOptions.filter(t=>!t.freeform)).length){this.freeformOption.value="",this.freeformOption.selected=!1,this.freeformOption.hidden=!0;return}this.freeformOption.value=e,this.freeformOption.hidden=!1}}disconnectedCallback(){so.AnchorPositionFallbackObserver?.disconnect(),this.debounceController?.abort(),super.disconnectedCallback()}anchorPositionFallback(e){if(so.AnchorPositionFallbackObserver||(so.AnchorPositionFallbackObserver=new IntersectionObserver(t=>{t.forEach(({boundingClientRect:i,isIntersecting:r,target:s})=>{if(ca(s)){if(i.bottom>window.innerHeight){y(s.elementInternals,"flip-block",!0);return}i.top<0&&y(s.elementInternals,"flip-block",!1)}})},{threshold:1})),e){this.debounceController=new AbortController,so.AnchorPositionFallbackObserver.observe(this.listbox),window.addEventListener("scroll",this.repositionListbox,{passive:!0,capture:!0,signal:this.debounceController.signal}),window.addEventListener("resize",this.repositionListbox,{passive:!0,signal:this.debounceController.signal}),this.repositionListbox();return}so.AnchorPositionFallbackObserver.unobserve(this.listbox),this.debounceController?.abort(),this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=void 0)}};L.formAssociated=!0,X([ls],L.prototype,"activeDescendant",1),X([g],L.prototype,"activeIndex",2),X([a({attribute:"aria-labelledby",mode:"fromView"})],L.prototype,"ariaLabelledBy",2),X([g],L.prototype,"control",2),X([a({mode:"boolean"})],L.prototype,"disabled",2),X([ls],L.prototype,"displayValue",1),X([a({attribute:"id"})],L.prototype,"id",2),X([g],L.prototype,"indicator",2),X([g],L.prototype,"indicatorSlot",2),X([a({attribute:"value",mode:"fromView"})],L.prototype,"initialValue",2),X([g],L.prototype,"listbox",2),X([a({mode:"boolean"})],L.prototype,"multiple",2),X([a],L.prototype,"name",2),X([g],L.prototype,"open",2),X([a],L.prototype,"placeholder",2),X([a({mode:"boolean"})],L.prototype,"required",2),X([a],L.prototype,"type",2),X([a({attribute:"value"})],L.prototype,"valueAttribute",2);let hp=L;var up=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,ua=(o,e,t,i)=>{for(var r=i>1?void 0:i?pp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&up(e,t,r),r};class Hr extends hp{constructor(){super(...arguments),this.appearance=ip.outline}}ua([a],Hr.prototype,"appearance",2),ua([a],Hr.prototype,"size",2);const bp=u`
|
|
424
424
|
${k("inline-flex")}
|
|
425
425
|
|
|
426
|
-
:host{anchor-name:--dropdown-trigger;box-sizing:border-box;color:${z};cursor:pointer}:host(${Yh}){color:${pr}}.control{appearance:none;background-color:${I};border-radius:${C};border:none;box-shadow:inset 0 0 0 ${T} var(--control-border-color);box-sizing:border-box;color:inherit;column-gap:${H};display:inline-flex;justify-content:space-between;min-width:160px;overflow:hidden;padding:${je} ${ae};position:relative;text-align:start;width:100%;z-index:1;${ia}}:host([size='small']) .control{column-gap:${H};padding:${qt} ${
|
|
426
|
+
:host{anchor-name:--dropdown-trigger;box-sizing:border-box;color:${z};cursor:pointer}:host(${Yh}){color:${pr}}.control{appearance:none;background-color:${I};border-radius:${C};border:none;box-shadow:inset 0 0 0 ${T} var(--control-border-color);box-sizing:border-box;color:inherit;column-gap:${H};display:inline-flex;justify-content:space-between;min-width:160px;overflow:hidden;padding:${je} ${ae};position:relative;text-align:start;width:100%;z-index:1;${ia}}:host([size='small']) .control{column-gap:${H};padding:${qt} ${J};${ra}}:host([size='large']) .control{column-gap:${Oe};padding:${V} ${le};${Ph}}::slotted(:is(input,button)){all:unset;flex:1 1 auto}::slotted(button){cursor:pointer}::slotted(input){cursor:text}:where(slot[name='indicator'] > *,::slotted([slot='indicator'])){all:unset;align-items:center;appearance:none;aspect-ratio:1;color:${Q};display:inline-flex;justify-content:center;width:20px}:host([size='small']) :where(slot[name='indicator'] > *,::slotted([slot='indicator'])){width:16px}:host([size='large']) :where(slot[name='indicator'] > *,::slotted([slot='indicator'])){width:24px}.control::after,.control::before{content:'' / '';inset:auto 0 0;pointer-events:none;position:absolute}.control::before{height:${T}}.control::after{background-color:${$t};height:${ue};scale:0 1;transition:scale ${Sr} ${kt}}:host(:where(:focus-within)) .control{border-radius:${C};box-shadow:inset 0 0 0 1px ${di};outline:${ue} solid ${ve}}:host(:where(${Xh},:focus-within)) .control::after{scale:1 1;transition-duration:${$i};transition-timing-function:${xt}}:host(:where([appearance='outline'],[appearance='transparent'])) .control::before{background-color:${Ve}}:host([appearance='transparent']) .control{--control-border-color:${fr};background-color:${me};border-radius:${hi}}:host([appearance='outline']) .control{--control-border-color:${Le}}:host([appearance='outline']) .control:hover{--control-border-color:${Lt}}:host(:where([appearance='outline'],[appearance='transparent'])) .control:hover::before{background-color:${mt}}:host([appearance='outline']) .control:hover::after{background-color:${Ht}}:host([appearance='outline']) .control:active{--control-border-color:${ko}}:host(:where([appearance='outline'],[appearance='transparent'])) .control:active::before{background-color:${vt}}:host(:where([appearance='outline'],[appearance='transparent'])) .control:active::after{background-color:${Vt}}:host([appearance='filled-darker']) .control{background-color:${$o}}:host(:where([appearance='filled-lighter'],[appearance='filled-darker'])) .control{--control-border-color:${Z}}:host(:disabled),:host(:disabled) ::slotted(:where(button,input)){cursor:not-allowed}:host(:disabled) .control::before,:host(:disabled) .control::after{content:none}:host(:disabled) .control:is(*,:active,:hover),:host(:disabled) :where(slot[name='indicator'] > *,::slotted([slot='indicator'])){--control-border-color:${Ce};background-color:${it};color:${S}}::slotted([popover]:not(:popover-open)){display:none}@supports not (anchor-name:--anchor){:host{--listbox-max-height:50vh;--margin-offset:calc(${A} + (${je} * 2) + ${T})}:host([size='small']){--margin-offset:calc(${q} + (${qt} * 2) + ${T})}:host([size='large']){--margin-offset:calc(${ye} + (${V} * 2) + ${T})}}`,gp=Hr.compose({name:`${p.prefix}-dropdown`,template:lp,styles:bp});gp.define(p.registry);const fp={above:"above",after:"after",before:"before"},ze={badInput:"bad-input",customError:"custom-error",patternMismatch:"pattern-mismatch",rangeOverflow:"range-overflow",rangeUnderflow:"range-underflow",stepMismatch:"step-mismatch",tooLong:"too-long",tooShort:"too-short",typeMismatch:"type-mismatch",valueMissing:"value-missing",valid:"valid"};var mp=Object.defineProperty,vp=Object.getOwnPropertyDescriptor,_i=(o,e,t,i)=>{for(var r=i>1?void 0:i?vp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&mp(e,t,r),r};class zo extends ${constructor(){super(),this.labelSlot=[],this.elementInternals=this.attachInternals(),this.elementInternals.role="presentation"}labelSlotChanged(e,t){t&&this.input&&(this.setLabelProperties(),this.setStates())}messageSlotChanged(e,t){y(this.elementInternals,"has-message",!!t.length)}slottedInputsChanged(e,t){const i=t?.filter(r=>r.nodeType===Node.ELEMENT_NODE)??[];i?.length&&(this.input=i?.[0])}inputChanged(e,t){t&&(this.setStates(),this.setLabelProperties(),this.slottedInputObserver.observe(this.input,{attributes:!0,attributeFilter:["disabled","required","readonly"],subtree:!0}))}changeHandler(e){return this.setStates(),this.setValidationStates(),!0}clickHandler(e){return this===e.target&&this.input.click(),!0}connectedCallback(){super.connectedCallback(),this.addEventListener("invalid",this.invalidHandler,{capture:!0}),this.slottedInputObserver=new MutationObserver(()=>{this.setStates()})}disconnectedCallback(){this.slottedInputObserver.disconnect(),this.removeEventListener("invalid",this.invalidHandler,{capture:!0}),super.disconnectedCallback()}focusinHandler(e){return this.matches(":focus-within:has(> :focus-visible)")&&y(this.elementInternals,"focus-visible",!0),!0}focusoutHandler(e){return y(this.elementInternals,"focus-visible",!1),!0}invalidHandler(e){this.messageSlot.length&&e.preventDefault(),this.setValidationStates()}setLabelProperties(){this.$fastController.isConnected&&(this.input.id=this.input.id||Ft("input"),this.labelSlot?.forEach(e=>{e instanceof HTMLLabelElement&&(e.htmlFor=e.htmlFor||this.input.id,e.id=e.id||`${this.input.id}--label`,this.input.setAttribute("aria-labelledby",e.id))}))}setStates(){this.elementInternals&&this.input&&(y(this.elementInternals,"disabled",!!this.input.disabled),y(this.elementInternals,"readonly",!!this.input.readOnly),y(this.elementInternals,"required",!!this.input.required),y(this.elementInternals,"checked",!!this.input.checked))}setValidationStates(){if(this.input?.validity)for(const[e,t]of Object.entries(ze))y(this.elementInternals,t,this.input.validity[e])}}_i([g],zo.prototype,"labelSlot",2),_i([g],zo.prototype,"messageSlot",2),_i([g],zo.prototype,"slottedInputs",2),_i([g],zo.prototype,"input",2);var $p=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,xp=(o,e,t,i)=>{for(var r=i>1?void 0:i?yp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&$p(e,t,r),r};class pa extends zo{constructor(){super(...arguments),this.labelPosition=fp.above}}xp([a({attribute:"label-position"})],pa.prototype,"labelPosition",2);const kp=u`
|
|
427
427
|
${k("inline-grid")}
|
|
428
428
|
|
|
429
|
-
:host{color:${z};align-items:center;gap:0 ${le};justify-items:start}:has([slot='message']){color:${z};row-gap:${V}}:not(::slotted([slot='label'])){gap:0}:host([label-position='before']){grid-template-areas:'label input' 'label message'}:host([label-position='after']){gap:0;grid-template-areas:'input label' 'message message';grid-template-columns:auto 1fr}:host([label-position='after']) ::slotted([slot='input']){margin-inline-end:${le}}:host([label-position='above']){grid-template-areas:'label' 'input' 'message';row-gap:${Rt}}:host([label-position='below']){grid-template-areas:'input' 'label' 'message';justify-items:center}:host([label-position='below']) ::slotted([slot='label']){margin-block-start:${Cd}}:host(${Jh}) ::slotted([slot='label'])::after{content:'*' / '';color:${vr};margin-inline-start:${ne}}::slotted([slot='input']){grid-area:input}::slotted([slot='message']){color:${
|
|
429
|
+
:host{color:${z};align-items:center;gap:0 ${le};justify-items:start}:has([slot='message']){color:${z};row-gap:${V}}:not(::slotted([slot='label'])){gap:0}:host([label-position='before']){grid-template-areas:'label input' 'label message'}:host([label-position='after']){gap:0;grid-template-areas:'input label' 'message message';grid-template-columns:auto 1fr}:host([label-position='after']) ::slotted([slot='input']){margin-inline-end:${le}}:host([label-position='above']){grid-template-areas:'label' 'input' 'message';row-gap:${Rt}}:host([label-position='below']){grid-template-areas:'input' 'label' 'message';justify-items:center}:host([label-position='below']) ::slotted([slot='label']){margin-block-start:${Cd}}:host(${Jh}) ::slotted([slot='label'])::after{content:'*' / '';color:${vr};margin-inline-start:${ne}}::slotted([slot='input']){grid-area:input}::slotted([slot='message']){color:${Q};font-family:${v};font-size:${F};font-weight:${_};grid-area:message;line-height:${q};margin-block-start:${Rt}}:host(${Uh}:focus-within){border-radius:${C};outline:${ue} solid ${ve}}::slotted(label),::slotted([slot='label']){cursor:inherit;display:inline-flex;font-family:${v};font-size:${B};font-weight:${_};grid-area:label;line-height:${A};justify-self:stretch;user-select:none}:host([size='small']) ::slotted(label){font-size:${F};line-height:${q}}:host([size='large']) ::slotted(label){font-size:${he};line-height:${ye}}:host([size='large']) ::slotted(label),:host([weight='semibold']) ::slotted(label){font-weight:${D}}:host(${xe}){cursor:default}::slotted([flag]){display:none}:host(${Rh}) ::slotted([flag='${ze.badInput}']),:host(${qh}) ::slotted([flag='${ze.customError}']),:host(${Kh}) ::slotted([flag='${ze.patternMismatch}']),:host(${Qh}) ::slotted([flag='${ze.rangeOverflow}']),:host(${Zh}) ::slotted([flag='${ze.rangeUnderflow}']),:host(${eu}) ::slotted([flag='${ze.stepMismatch}']),:host(${tu}) ::slotted([flag='${ze.tooLong}']),:host(${ou}) ::slotted([flag='${ze.tooShort}']),:host(${iu}) ::slotted([flag='${ze.typeMismatch}']),:host(${nu}) ::slotted([flag='${ze.valueMissing}']),:host(${su}) ::slotted([flag='${ze.valid}']){display:block}`,wp=b`<template @click="${(o,e)=>o.clickHandler(e.event)}" @change="${(o,e)=>o.changeHandler(e.event)}" @focusin="${(o,e)=>o.focusinHandler(e.event)}" @focusout="${(o,e)=>o.focusoutHandler(e.event)}"><slot name="label" part="label" ${G("labelSlot")}></slot><slot name="input" part="input" ${G("slottedInputs")}></slot><slot name="message" part="message" ${G({property:"messageSlot",filter:lo("[flag]")})}></slot></template>`,Cp=pa.compose({name:`${p.prefix}-field`,template:wp,styles:kp,shadowOptions:{delegatesFocus:!0}});Cp.define(p.registry);var Sp=Object.defineProperty,Ip=Object.getOwnPropertyDescriptor,To=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ip(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Sp(e,t,r),r};class Zt extends ${}To([a({mode:"boolean"})],Zt.prototype,"block",2),To([a({mode:"boolean"})],Zt.prototype,"bordered",2),To([a({mode:"boolean"})],Zt.prototype,"shadow",2),To([a],Zt.prototype,"fit",2),To([a],Zt.prototype,"shape",2);const Pp=b`<slot></slot>`,zp=u`
|
|
430
430
|
:host{contain:content}:host ::slotted(img){box-sizing:border-box;min-height:8px;min-width:8px;display:inline-block}:host([block]) ::slotted(img){width:100%;height:auto}:host([bordered]) ::slotted(img){border:${T} solid ${wo}}:host([fit='none']) ::slotted(img){object-fit:none;object-position:top left;height:100%;width:100%}:host([fit='center']) ::slotted(img){object-fit:none;object-position:center;height:100%;width:100%}:host([fit='contain']) ::slotted(img){object-fit:contain;object-position:center;height:100%;width:100%}:host([fit='cover']) ::slotted(img){object-fit:cover;object-position:center;height:100%;width:100%}:host([shadow]) ::slotted(img){box-shadow:${fi}}:host([shape='circular']) ::slotted(img){border-radius:${$e}}:host([shape='rounded']) ::slotted(img){border-radius:${C}}`,Tp=Zt.compose({name:`${p.prefix}-image`,template:Pp,styles:zp});Tp.define(p.registry);var Bp=Object.defineProperty,Op=Object.getOwnPropertyDescriptor,Ai=(o,e,t,i)=>{for(var r=i>1?void 0:i?Op(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Bp(e,t,r),r};class Bo extends ${constructor(){super(...arguments),this.disabled=!1,this.required=!1}}Ai([a],Bo.prototype,"size",2),Ai([a],Bo.prototype,"weight",2),Ai([a({mode:"boolean"})],Bo.prototype,"disabled",2),Ai([a({mode:"boolean"})],Bo.prototype,"required",2);const _p=u`
|
|
431
431
|
${k("inline-flex")}
|
|
432
432
|
|
|
@@ -434,31 +434,31 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
434
434
|
${k("inline")}
|
|
435
435
|
|
|
436
436
|
:host{position:relative;box-sizing:border-box;background-color:transparent;color:${El};cursor:pointer;font-family:${v};font-size:${B};font-weight:${_};overflow:inherit;text-align:start;text-decoration:none;text-decoration-thickness:${T};text-overflow:inherit;user-select:text}:host(:is(:hover,:focus-visible)){outline:none;text-decoration-line:underline}@media (hover:hover){:host(:hover){color:${Nl}}:host(:active){color:${Fl}}:host([appearance='subtle']:hover){color:${Dl}}:host([appearance='subtle']:active){color:${Hl}}}:host([appearance='subtle']){color:${Ml}}:host-context(:is(h1,h2,h3,h4,h5,h6,p,fluent-text)),:host([inline]){font:inherit;text-decoration:underline}:host(:not([href])){color:inherit;text-decoration:none}::slotted(a){position:absolute;inset:0}`.withBehaviors(U(u`
|
|
437
|
-
:host{color:LinkText}`));function Hp(){return b`<template tabindex="0" @click="${(o,e)=>o.clickHandler(e.event)}" @keydown="${(o,e)=>o.keydownHandler(e.event)}"><slot></slot></template>`}const Vp=Hp(),Lp=Vr.compose({name:`${p.prefix}-link`,template:Vp,styles:Dp});Lp.define(p.registry);var jp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,Oo=(o,e,t,i)=>{for(var r=i>1?void 0:i?Rp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&jp(e,t,r),r};class Jt extends ${constructor(){super(),this.id=Qt("listbox-"),this.elementInternals=this.attachInternals(),this.elementInternals.role="listbox"}multipleChanged(e,t){this.elementInternals.ariaMultiSelectable=t?"true":"false",y(this.elementInternals,"multiple",t),
|
|
437
|
+
:host{color:LinkText}`));function Hp(){return b`<template tabindex="0" @click="${(o,e)=>o.clickHandler(e.event)}" @keydown="${(o,e)=>o.keydownHandler(e.event)}"><slot></slot></template>`}const Vp=Hp(),Lp=Vr.compose({name:`${p.prefix}-link`,template:Vp,styles:Dp});Lp.define(p.registry);var jp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,Oo=(o,e,t,i)=>{for(var r=i>1?void 0:i?Rp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&jp(e,t,r),r};class Jt extends ${constructor(){super(),this.id=Qt("listbox-"),this.elementInternals=this.attachInternals(),this.elementInternals.role="listbox"}multipleChanged(e,t){this.elementInternals.ariaMultiSelectable=t?"true":"false",y(this.elementInternals,"multiple",t),ie.enqueue(()=>{this.options.forEach(i=>{i.multiple=!!t})})}optionsChanged(e,t){t?.forEach((i,r)=>{i.elementInternals.ariaPosInSet=`${r+1}`,i.elementInternals.ariaSetSize=`${t.length}`})}beforetoggleHandler(e){if(!this.dropdown)return!0;if(this.dropdown.disabled){this.dropdown.open=!1;return}return this.dropdown.open=e.newState==="open",!0}get enabledOptions(){return this.options?.filter(e=>!e.disabled)??[]}get selectedOptions(){return this.options?.filter(e=>e.selected)??[]}clickHandler(e){if(this.dropdown)return!0;const t=e.target;return Oi(t)&&this.selectOption(this.enabledOptions.indexOf(t)),!0}handleChange(e,t){if(t==="multiple"){this.multiple=e.multiple;return}}selectOption(e=this.selectedIndex){let t=this.selectedIndex;if(!this.multiple)this.enabledOptions.forEach((i,r)=>{const s=r===e;i.selected=s,s&&(t=r)});else{const i=this.enabledOptions[e];i&&(i.selected=!i.selected),t=e}this.selectedIndex=t}slotchangeHandler(e){const t=e.target;ha(this,()=>{const i=t.assignedElements().filter(r=>Oi(r));this.options=i})}}Oo([a({attribute:"id",mode:"fromView"})],Jt.prototype,"id",2),Oo([g],Jt.prototype,"multiple",2),Oo([g],Jt.prototype,"options",2),Oo([g],Jt.prototype,"selectedIndex",2),Oo([g],Jt.prototype,"dropdown",2);const qp=u`
|
|
438
438
|
${k("inline-flex")}
|
|
439
439
|
|
|
440
440
|
:host{background-color:${I};border-radius:${C};border:none;box-shadow:${xr};box-sizing:border-box;flex-direction:column;margin:0;min-width:160px;padding:${ne};row-gap:${H};width:auto}:host([popover]){inset:unset;overflow:auto}@supports (anchor-name:--anchor){:host([popover]){position:absolute;margin-block-start:0;max-height:var(--listbox-max-height,calc(50vh - anchor-size(self-block)));min-width:anchor-size(width);position-anchor:--dropdown;position-area:block-end span-inline-end;position-try-fallbacks:flip-inline,flip-block,--flip-block,block-start}@position-try --flip-block{bottom:anchor(top);top:unset}}@supports not (anchor-name:--anchor){:host([popover]){margin-block-start:var(--margin-offset,0);max-height:var(--listbox-max-height,50vh);position:fixed}:host([popover]${Gh}){margin-block-start:revert;translate:0 -100%}}`;function Wp(){return b`<template id="${o=>o.id}" @beforetoggle="${(o,e)=>o.beforetoggleHandler(e.event)}" @click="${(o,e)=>o.clickHandler(e.event)}"><slot @slotchange="${(o,e)=>o.slotchangeHandler(e.event)}"></slot></template>`}const Gp=Wp(),Up=Jt.compose({name:`${p.prefix}-listbox`,template:Gp,styles:qp});Up.define(p.registry);class Xp extends Ye{}const Kp=Ar({end:b.partial(`
|
|
441
441
|
<svg slot="end" fill="currentColor" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
442
442
|
<path d="M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z" fill="currentColor"></path>
|
|
443
443
|
</svg>
|
|
444
|
-
`)}),Yp=Xp.compose({name:`${p.prefix}-menu-button`,template:Kp,styles:Ci});Yp.define(p.registry);const
|
|
444
|
+
`)}),Yp=Xp.compose({name:`${p.prefix}-menu-button`,template:Kp,styles:Ci});Yp.define(p.registry);const ee={menuitem:"menuitem",menuitemcheckbox:"menuitemcheckbox",menuitemradio:"menuitemradio"};ee.menuitem+"",ee.menuitemcheckbox+"",ee.menuitemradio+"";function Qp(o,e="-menu-item"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,eo=(o,e,t,i)=>{for(var r=i>1?void 0:i?Jp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Zp(e,t,r),r};class Qe extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.role=ee.menuitem,this.checked=!1,this.handleMenuItemKeyDown=e=>{if(e.defaultPrevented)return!1;switch(e.key){case fo:case Jo:return this.invoke(),!1;case po:return this.disabled||(this.submenu?.togglePopover(!0),this.submenu?.focus()),!1;case uo:return this.parentElement?.hasAttribute("popover")&&(this.parentElement.togglePopover(!1),this.parentElement.parentElement?.focus()),!1}return!0},this.handleMenuItemClick=e=>(e.defaultPrevented||this.disabled||this.invoke(),!1),this.handleMouseOver=e=>(this.disabled||this.submenu?.togglePopover(!0),!1),this.handleMouseOut=e=>(this.contains(document.activeElement)||this.submenu?.togglePopover(!1),!1),this.toggleHandler=e=>{e instanceof ToggleEvent&&e.newState==="open"&&(this.setAttribute("tabindex","-1"),this.elementInternals.ariaExpanded="true",this.setSubmenuPosition()),e instanceof ToggleEvent&&e.newState==="closed"&&(this.elementInternals.ariaExpanded="false",this.setAttribute("tabindex","0"))},this.invoke=()=>{if(!this.disabled)switch(this.role){case ee.menuitemcheckbox:this.checked=!this.checked;break;case ee.menuitem:if(this.submenu){this.submenu.togglePopover(!0),this.submenu.focus();break}this.$emit("change");break;case ee.menuitemradio:this.checked||(this.checked=!0);break}},this.setSubmenuPosition=()=>{if(!CSS.supports("anchor-name","--anchor")&&this.submenu){const e=this.getBoundingClientRect(),t=this.submenu.getBoundingClientRect(),i=getComputedStyle(this).direction==="ltr"?"right":"left";if(e.width+t.width>window.innerWidth*.75){this.submenu.style.translate="0 -100%";return}if(e[i]+t.width>window.innerWidth){this.submenu.style.translate="-100% 0";return}this.submenu.style.translate=`${e.width-8}px 0`}}}disabledChanged(e,t){this.elementInternals.ariaDisabled=t?`${t}`:null,y(this.elementInternals,"disabled",t)}roleChanged(e,t){this.elementInternals.role=t??ee.menuitem}checkedChanged(e,t){const i=this.role!==ee.menuitem;this.elementInternals.ariaChecked=i?`${!!t}`:null,y(this.elementInternals,"checked",i?t:!1),this.$fastController.isConnected&&this.$emit("change",t,{bubbles:!0})}slottedSubmenuChanged(e,t){this.submenu?.removeEventListener("toggle",this.toggleHandler),t.length?(this.submenu=t[0],this.submenu.toggleAttribute("popover",!0),this.submenu.addEventListener("toggle",this.toggleHandler),this.elementInternals.ariaHasPopup="menu",y(this.elementInternals,"submenu",!0)):(this.elementInternals.ariaHasPopup=null,y(this.elementInternals,"submenu",!1))}connectedCallback(){super.connectedCallback(),this.elementInternals.role=this.role??ee.menuitem,this.elementInternals.ariaChecked=this.role!==ee.menuitem?`${!!this.checked}`:null}}eo([a({mode:"boolean"})],Qe.prototype,"disabled",2),eo([a],Qe.prototype,"role",2),eo([a({mode:"boolean"})],Qe.prototype,"checked",2),eo([a({mode:"boolean"})],Qe.prototype,"hidden",2),eo([g],Qe.prototype,"slottedSubmenu",2),eo([g],Qe.prototype,"submenu",2),Xe(Qe,Ue);const eb=u`
|
|
445
445
|
${k("grid")}
|
|
446
446
|
|
|
447
|
-
:host{--indent:0;align-items:center;background:${I};border-radius:${C};color:${Ie};contain:layout;cursor:pointer;flex-shrink:0;font:${_} ${B} / ${A} ${v};grid-gap:4px;grid-template-columns:20px 20px auto 20px;height:32px;overflow:visible;padding:0 10px}:host(:hover){background:${ai};color:${Mt}}:host(:active){background-color:${an};color:${Dt}}:host(:active) ::slotted([slot='start']){color:${Vl}}:host(${xe}){background-color:${it};color:${S}}:host(${xe}) ::slotted([slot='start']),:host(${xe}) ::slotted([slot='end']){color:${S}}:host(:focus-visible){border-radius:${C};outline:2px solid ${ve}}.content{white-space:nowrap;flex-grow:1;grid-column:auto / span 2;padding:0 2px}:host(:not(${x})) .indicator,:host(:not(${x})) ::slotted([slot='indicator']),:host(:not(${zi})) .submenu-glyph,:host(:not(${zi})) ::slotted([slot='submenu-glyph']){display:none}::slotted([slot='end']){color:${
|
|
448
|
-
:host(${xe}),:host(${xe}) ::slotted([slot='start']),:host(${xe}) ::slotted([slot='end']){color:GrayText}`)),tb=b.partial('<svg class="indicator" fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.05 3.49c.28.3.27.77-.04 1.06l-7.93 7.47A.85.85 0 014.9 12L2.22 9.28a.75.75 0 111.06-1.06l2.24 2.27 7.47-7.04a.75.75 0 011.06.04z" fill="currentColor"></path></svg>'),ob=b.partial('<svg class="submenu-glyph" fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.74 3.2a.75.75 0 00-.04 1.06L9.23 8 5.7 11.74a.75.75 0 101.1 1.02l4-4.25a.75.75 0 000-1.02l-4-4.25a.75.75 0 00-1.06-.04z" fill="currentColor"></path></svg>');function ib(o={}){return b`<template @keydown="${(e,t)=>e.handleMenuItemKeyDown(t.event)}" @click="${(e,t)=>e.handleMenuItemClick(t.event)}" @mouseover="${(e,t)=>e.handleMouseOver(t.event)}" @mouseout="${(e,t)=>e.handleMouseOut(t.event)}" @toggle="${(e,t)=>e.toggleHandler(t.event)}"><slot name="indicator">${fe(o.indicator)}</slot>${He(o)}<div part="content" class="content"><slot></slot></div>${tt(o)}<slot name="submenu-glyph">${fe(o.submenuGlyph)}</slot><slot name="submenu" ${G({property:"slottedSubmenu"})}></slot></template>`}const rb=ib({indicator:tb,submenuGlyph:ob}),sb=Qe.compose({name:`${p.prefix}-menu-item`,template:rb,styles:eb});sb.define(p.registry);var nb=Object.defineProperty,ab=Object.getOwnPropertyDescriptor,lb=(o,e,t,i)=>{for(var r=i>1?void 0:i?ab(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&nb(e,t,r),r};const Lr=class ts extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.focusIndex=-1,this.isNestedMenu=()=>this.parentElement!==null&&cr(this.parentElement)&&this.parentElement.getAttribute("role")==="menuitem",this.handleFocusOut=e=>{if(!this.contains(e.relatedTarget)&&this.menuItems!==void 0){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=e=>{const t=e.target;this.menuItems!==void 0&&t!==this.menuItems[this.focusIndex]&&(this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=this.menuItems.indexOf(t),t.setAttribute("tabindex","0"))},this.changedMenuItemHandler=e=>{if(this.menuItems===void 0)return;const t=e.target,i=this.menuItems.indexOf(t);if(i!==-1&&t.role==="menuitemradio"&&t.checked===!0){for(let s=i-1;s>=0;--s){const n=this.menuItems[s],c=n.getAttribute("role");if(c===
|
|
447
|
+
:host{--indent:0;align-items:center;background:${I};border-radius:${C};color:${Ie};contain:layout;cursor:pointer;flex-shrink:0;font:${_} ${B} / ${A} ${v};grid-gap:4px;grid-template-columns:20px 20px auto 20px;height:32px;overflow:visible;padding:0 10px}:host(:hover){background:${ai};color:${Mt}}:host(:active){background-color:${an};color:${Dt}}:host(:active) ::slotted([slot='start']){color:${Vl}}:host(${xe}){background-color:${it};color:${S}}:host(${xe}) ::slotted([slot='start']),:host(${xe}) ::slotted([slot='end']){color:${S}}:host(:focus-visible){border-radius:${C};outline:2px solid ${ve}}.content{white-space:nowrap;flex-grow:1;grid-column:auto / span 2;padding:0 2px}:host(:not(${x})) .indicator,:host(:not(${x})) ::slotted([slot='indicator']),:host(:not(${zi})) .submenu-glyph,:host(:not(${zi})) ::slotted([slot='submenu-glyph']){display:none}::slotted([slot='end']){color:${Q};font:${_} ${F} / ${q} ${v};white-space:nowrap}:host([data-indent='1']){--indent:1}:host([data-indent='2']){--indent:2;grid-template-columns:20px 20px auto auto}:host(${zi}){grid-template-columns:20px auto auto 20px}:host([data-indent='2']${zi}){grid-template-columns:20px 20px auto auto 20px}.indicator,::slotted([slot='indicator']){grid-column:1 / span 1;width:20px}::slotted([slot='start']){display:inline-flex;grid-column:calc(var(--indent)) / span 1}.content{grid-column:calc(var(--indent) + 1) / span 1}::slotted([slot='end']){grid-column:calc(var(--indent) + 2) / span 1;justify-self:end}.submenu-glyph,::slotted([slot='submenu-glyph']){grid-column:-2 / span 1;justify-self:end}@layer popover{:host{anchor-name:--menu-trigger;position:relative}::slotted([popover]){margin:0;max-height:var(--menu-max-height,auto);position:absolute;position-anchor:--menu-trigger;position-area:inline-end span-block-end;position-try-fallbacks:flip-inline,block-start,block-end;z-index:1}::slotted([popover]:not(:popover-open)){display:none}::slotted([popover]:popover-open){inset:unset}@supports not (anchor-name:--menu-trigger){::slotted([popover]){align-self:start}}}`.withBehaviors(U(u`
|
|
448
|
+
:host(${xe}),:host(${xe}) ::slotted([slot='start']),:host(${xe}) ::slotted([slot='end']){color:GrayText}`)),tb=b.partial('<svg class="indicator" fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.05 3.49c.28.3.27.77-.04 1.06l-7.93 7.47A.85.85 0 014.9 12L2.22 9.28a.75.75 0 111.06-1.06l2.24 2.27 7.47-7.04a.75.75 0 011.06.04z" fill="currentColor"></path></svg>'),ob=b.partial('<svg class="submenu-glyph" fill="currentColor" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5.74 3.2a.75.75 0 00-.04 1.06L9.23 8 5.7 11.74a.75.75 0 101.1 1.02l4-4.25a.75.75 0 000-1.02l-4-4.25a.75.75 0 00-1.06-.04z" fill="currentColor"></path></svg>');function ib(o={}){return b`<template @keydown="${(e,t)=>e.handleMenuItemKeyDown(t.event)}" @click="${(e,t)=>e.handleMenuItemClick(t.event)}" @mouseover="${(e,t)=>e.handleMouseOver(t.event)}" @mouseout="${(e,t)=>e.handleMouseOut(t.event)}" @toggle="${(e,t)=>e.toggleHandler(t.event)}"><slot name="indicator">${fe(o.indicator)}</slot>${He(o)}<div part="content" class="content"><slot></slot></div>${tt(o)}<slot name="submenu-glyph">${fe(o.submenuGlyph)}</slot><slot name="submenu" ${G({property:"slottedSubmenu"})}></slot></template>`}const rb=ib({indicator:tb,submenuGlyph:ob}),sb=Qe.compose({name:`${p.prefix}-menu-item`,template:rb,styles:eb});sb.define(p.registry);var nb=Object.defineProperty,ab=Object.getOwnPropertyDescriptor,lb=(o,e,t,i)=>{for(var r=i>1?void 0:i?ab(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&nb(e,t,r),r};const Lr=class ts extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.focusIndex=-1,this.isNestedMenu=()=>this.parentElement!==null&&cr(this.parentElement)&&this.parentElement.getAttribute("role")==="menuitem",this.handleFocusOut=e=>{if(!this.contains(e.relatedTarget)&&this.menuItems!==void 0){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=e=>{const t=e.target;this.menuItems!==void 0&&t!==this.menuItems[this.focusIndex]&&(this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=this.menuItems.indexOf(t),t.setAttribute("tabindex","0"))},this.changedMenuItemHandler=e=>{if(this.menuItems===void 0)return;const t=e.target,i=this.menuItems.indexOf(t);if(i!==-1&&t.role==="menuitemradio"&&t.checked===!0){for(let s=i-1;s>=0;--s){const n=this.menuItems[s],c=n.getAttribute("role");if(c===ee.menuitemradio&&(n.checked=!1),c==="separator")break}const r=this.menuItems.length-1;for(let s=i+1;s<=r;++s){const n=this.menuItems[s],c=n.getAttribute("role");if(c===ee.menuitemradio&&(n.checked=!1),c==="separator")break}}},this.isMenuItemElement=e=>Qp(e)||cr(e)&&e.getAttribute("role")in ts.focusableElementRoles,this.isFocusableElement=e=>this.isMenuItemElement(e),this.elementInternals.role="menu"}itemsChanged(e,t){this.$fastController.isConnected&&this.menuItems!==void 0&&this.setItems()}connectedCallback(){super.connectedCallback(),ie.enqueue(()=>{this.setItems()}),this.addEventListener("change",this.changedMenuItemHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeItemListeners(),this.menuItems=void 0,this.removeEventListener("change",this.changedMenuItemHandler)}focus(){this.setFocus(0,1)}handleMenuKeyDown(e){if(!(e.defaultPrevented||this.menuItems===void 0))switch(e.key){case ho:this.setFocus(this.focusIndex+1,1);return;case bo:this.setFocus(this.focusIndex-1,-1);return;case go:this.setFocus(this.menuItems.length-1,-1);return;case mo:this.setFocus(0,1);return;default:return!0}}removeItemListeners(e=this.items){e.forEach(t=>{t.removeEventListener("focus",this.handleItemFocus),m.getNotifier(t).unsubscribe(this,"hidden")})}static elementIndent(e){const t=e.getAttribute("role"),i=e.querySelector("[slot=start]");return t&&t!==ee.menuitem?i?2:1:i?1:0}setItems(){const e=Array.from(this.children);this.removeItemListeners(e),e.forEach(n=>m.getNotifier(n).subscribe(this,"hidden"));const t=e.filter(n=>!n.hasAttribute("hidden"));this.menuItems=t;const i=this.menuItems.filter(this.isMenuItemElement);i.length&&(this.focusIndex=0),i.forEach((n,c)=>{n.setAttribute("tabindex",c===0?"0":"-1"),n.addEventListener("focus",this.handleItemFocus)});const r=this.menuItems?.filter(this.isMenuItemElement),s=r?.reduce((n,c)=>{const h=ts.elementIndent(c);return Math.max(n,h)},0);r?.forEach(n=>{n.dataset.indent=`${s}`})}handleChange(e,t){t==="hidden"&&this.setItems()}setFocus(e,t){if(this.menuItems!==void 0)for(;e>=0&&e<this.menuItems.length;){const i=this.menuItems[e];if(this.isFocusableElement(i)){this.focusIndex>-1&&this.menuItems.length>=this.focusIndex-1&&this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=e,i.setAttribute("tabindex","0"),i.focus();break}e+=t}}};Lr.focusableElementRoles=ee,lb([g],Lr.prototype,"items",2);let cb=Lr;const db=u`
|
|
449
449
|
${k("flex")}
|
|
450
450
|
|
|
451
|
-
:host{flex-direction:column;height:fit-content;max-width:300px;min-width:160px;width:auto;background-color:${I};border:1px solid ${
|
|
451
|
+
:host{flex-direction:column;height:fit-content;max-width:300px;min-width:160px;width:auto;background-color:${I};border:1px solid ${Z};border-radius:${C};box-shadow:${xr};padding:4px;row-gap:2px}`;function hb(){return b`<template slot="${o=>o.slot?o.slot:o.isNestedMenu()?"submenu":void 0}" @keydown="${(o,e)=>o.handleMenuKeyDown(e.event)}" @focusout="${(o,e)=>o.handleFocusOut(e.event)}"><slot ${G("items")}></slot></template>`}const ub=hb(),pb=cb.compose({name:`${p.prefix}-menu-list`,template:ub,styles:db});pb.define(p.registry);var bb=Object.defineProperty,gb=Object.getOwnPropertyDescriptor,ct=(o,e,t,i)=>{for(var r=i>1?void 0:i?gb(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&bb(e,t,r),r};class Ze extends ${constructor(){super(...arguments),this.slottedMenuList=[],this.slottedTriggers=[],this._open=!1,this.toggleMenu=()=>{this._menuList?.togglePopover(!this._open)},this.closeMenu=e=>{e?.target instanceof Qe&&(e.target.getAttribute("role")===ee.menuitemcheckbox||e.target.getAttribute("role")===ee.menuitemradio)||(this._menuList?.togglePopover(!1),this.closeOnScroll&&document.removeEventListener("scroll",this.closeMenu))},this.openMenu=e=>{this._menuList?.togglePopover(!0),e&&this.openOnContext&&e.preventDefault(),this.closeOnScroll&&document.addEventListener("scroll",this.closeMenu)},this.toggleHandler=e=>{if(e.type==="toggle"&&e.newState){const t=e.newState==="open";this._trigger?.setAttribute("aria-expanded",`${t}`),this._open=t,this._open&&this.focusMenuList()}},this.triggerKeydownHandler=e=>{if(e.defaultPrevented)return;switch(e.key){case Jo:case fo:e.preventDefault(),this.toggleMenu();break;default:return!0}},this.documentClickHandler=e=>{e.composedPath().some(t=>t===this._trigger||t===this._menuList)||this.closeMenu()}}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>{this.setComponent()})}disconnectedCallback(){super.disconnectedCallback(),this.removeListeners()}setComponent(){this.$fastController.isConnected&&this.slottedMenuList.length&&this.slottedTriggers.length&&(this._trigger=this.slottedTriggers[0],this._menuList=this.slottedMenuList[0],this._trigger.setAttribute("aria-haspopup","true"),this._trigger.setAttribute("aria-expanded",`${this._open}`),this._menuList.setAttribute("popover",this.openOnContext?"manual":""),this.addListeners())}focusMenuList(){ie.enqueue(()=>{this._menuList.focus()})}focusTrigger(){ie.enqueue(()=>{this._trigger.focus()})}openOnHoverChanged(e,t){t?this._trigger?.addEventListener("mouseover",this.openMenu):this._trigger?.removeEventListener("mouseover",this.openMenu)}persistOnItemClickChanged(e,t){t?this._menuList?.removeEventListener("change",this.closeMenu):this._menuList?.addEventListener("change",this.closeMenu)}openOnContextChanged(e,t){t?this._trigger?.addEventListener("contextmenu",this.openMenu):this._trigger?.removeEventListener("contextmenu",this.openMenu)}closeOnScrollChanged(e,t){t?document.addEventListener("scroll",this.closeMenu):document.removeEventListener("scroll",this.closeMenu)}addListeners(){this._menuList?.addEventListener("toggle",this.toggleHandler),this._trigger?.addEventListener("keydown",this.triggerKeydownHandler),this.persistOnItemClick||this._menuList?.addEventListener("change",this.closeMenu),this.openOnHover?this._trigger?.addEventListener("mouseover",this.openMenu):this.openOnContext?(this._trigger?.addEventListener("contextmenu",this.openMenu),document.addEventListener("click",this.documentClickHandler)):this._trigger?.addEventListener("click",this.toggleMenu)}removeListeners(){this._menuList?.removeEventListener("toggle",this.toggleHandler),this._trigger?.removeEventListener("keydown",this.triggerKeydownHandler),this.persistOnItemClick||this._menuList?.removeEventListener("change",this.closeMenu),this.openOnHover&&this._trigger?.removeEventListener("mouseover",this.openMenu),this.openOnContext?(this._trigger?.removeEventListener("contextmenu",this.openMenu),document.removeEventListener("click",this.documentClickHandler)):this._trigger?.removeEventListener("click",this.toggleMenu)}menuKeydownHandler(e){if(e.defaultPrevented)return;switch(e.key){case vl:e.preventDefault(),this._open&&(this.closeMenu(),this.focusTrigger());break;case $l:if(this._open&&this.closeMenu(),e.shiftKey&&e.composedPath()[0]!==this._trigger&&e.composedPath()[0].assignedSlot!==this.primaryAction)this.focusTrigger();else if(e.shiftKey)return!0;default:return!0}}}ct([a({attribute:"open-on-hover",mode:"boolean"})],Ze.prototype,"openOnHover",2),ct([a({attribute:"open-on-context",mode:"boolean"})],Ze.prototype,"openOnContext",2),ct([a({attribute:"close-on-scroll",mode:"boolean"})],Ze.prototype,"closeOnScroll",2),ct([a({attribute:"persist-on-item-click",mode:"boolean"})],Ze.prototype,"persistOnItemClick",2),ct([a({mode:"boolean"})],Ze.prototype,"split",2),ct([g],Ze.prototype,"slottedMenuList",2),ct([g],Ze.prototype,"slottedTriggers",2),ct([g],Ze.prototype,"primaryAction",2);const fb=u`
|
|
452
452
|
${k("inline-block")}
|
|
453
453
|
|
|
454
454
|
::slotted([slot='trigger']){anchor-name:--menu-trigger}::slotted([popover]){margin:0;max-height:var(--menu-max-height,auto);position-anchor:--menu-trigger;position-area:block-end span-inline-end;position-try-fallbacks:flip-block;position:absolute;z-index:1}:host([split]) ::slotted([popover]){position-area:block-end span-inline-start}::slotted([popover]:popover-open){inset:unset}::slotted([popover]:not(:popover-open)){display:none}:host([split]){display:inline-flex}:host([split]) ::slotted([slot='primary-action']){border-inline-end:${T} solid ${Le};border-start-end-radius:0;border-end-end-radius:0}:host([split]) ::slotted([slot='primary-action']:focus-visible){z-index:1}:host([split]) ::slotted([slot='primary-action'][appearance='primary']){border-inline-end:${T} solid white}:host([split]) ::slotted([slot='trigger']){border-inline-start:0;border-start-start-radius:0;border-end-start-radius:0}`;function mb(){return b`<template ?open-on-hover="${o=>o.openOnHover}" ?open-on-context="${o=>o.openOnContext}" ?close-on-scroll="${o=>o.closeOnScroll}" ?persist-on-item-click="${o=>o.persistOnItemClick}" @keydown="${(o,e)=>o.menuKeydownHandler(e.event)}"><slot name="primary-action" ${E("primaryAction")}></slot><slot name="trigger" ${G({property:"slottedTriggers",filter:lo()})}></slot><slot ${G({property:"slottedMenuList",filter:lo()})}></slot></template>`}const vb=mb(),$b=Ze.compose({name:`${p.prefix}-menu`,template:vb,styles:fb});$b.define(p.registry);var yb=Object.defineProperty,xb=Object.getOwnPropertyDescriptor,jr=(o,e,t,i)=>{for(var r=i>1?void 0:i?xb(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&yb(e,t,r),r};class Ei extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.dismissMessageBar=()=>{this.$emit("dismiss",{})},this.elementInternals.role="status"}}jr([a],Ei.prototype,"shape",2),jr([a],Ei.prototype,"layout",2),jr([a],Ei.prototype,"intent",2);const kb=u`
|
|
455
455
|
:host{display:grid;box-sizing:border-box;font-family:${v};font-size:${F};line-height:${q};width:100%;background:${$o};border:1px solid ${Le};padding-inline:${le};border-radius:${C};min-height:36px;align-items:center;grid-template:'icon body actions dismiss' / auto 1fr auto auto;contain:layout style paint}:host([shape='square']){border-radius:0}:host([intent='success']){background-color:${Cn};border-color:${rc}}:host([intent='warning']){background-color:${In};border-color:${zn}}:host([intent='error']){background-color:${yn};border-color:${kn}}:host([layout='multiline']){grid-template-areas:'icon body dismiss'
|
|
456
|
-
'actions actions actions';grid-template-columns:auto 1fr auto;grid-template-rows:auto auto 1fr;padding-block:${Wt};padding-inline:${le}}.content{grid-area:body;max-width:520px;padding-block:${Wt};padding-inline:0}:host([layout='multiline']) .content{padding:0}::slotted([slot='icon']){display:flex;grid-area:icon;flex-direction:column;align-items:center;color:${
|
|
456
|
+
'actions actions actions';grid-template-columns:auto 1fr auto;grid-template-rows:auto auto 1fr;padding-block:${Wt};padding-inline:${le}}.content{grid-area:body;max-width:520px;padding-block:${Wt};padding-inline:0}:host([layout='multiline']) .content{padding:0}::slotted([slot='icon']){display:flex;grid-area:icon;flex-direction:column;align-items:center;color:${Q};margin-inline-end:${Oe}}:host([layout='multiline']) ::slotted([slot='icon']){align-items:start;height:100%}::slotted([slot='dismiss']){grid-area:dismiss}.actions{grid-area:actions;display:flex;justify-self:end;margin-inline-end:${Oe};gap:${Oe}}:host([layout='multiline']) .actions{margin-block-start:${Wt};margin-inline-end:0}:host([layout='multiline']) ::slotted([slot='dismiss']){align-items:start;height:100%;padding-block-start:${V}}::slotted(*){font-size:inherit}`;function wb(){return b`<slot name="icon"></slot><div class="content"><slot></slot></div><div class="actions"><slot name="actions"></slot></div><slot name="dismiss"></slot>`}const Cb=wb(),Sb=Ei.compose({name:`${p.prefix}-message-bar`,template:Cb,styles:kb,shadowOptions:{mode:p.shadowRootMode}});Sb.define(p.registry);var Ib=Object.defineProperty,Pb=Object.getOwnPropertyDescriptor,ke=(o,e,t,i)=>{for(var r=i>1?void 0:i?Pb(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Ib(e,t,r),r};class ce extends ${constructor(){super(),this.active=!1,this.id=Qt("option-"),this.initialValue="",this.multiple=!1,this.elementInternals=this.attachInternals(),this._value=this.initialValue,this.elementInternals.role="option"}activeChanged(e,t){y(this.elementInternals,"active",t)}currentSelectedChanged(e,t){this.selected=!!t}defaultSelectedChanged(e,t){this.selected=!!t}descriptionSlotChanged(e,t){y(this.elementInternals,"description",!!t?.length)}disabledChanged(e,t){this.elementInternals.ariaDisabled=this.disabled?"true":"false",y(this.elementInternals,"disabled",this.disabled),this.setFormValue(!this.disabled&&this.selected?this.value:null)}disabledAttributeChanged(e,t){this.disabled=!!t}initialValueChanged(e,t){this._value=t}multipleChanged(e,t){y(this.elementInternals,"multiple",t),this.selected=!1}get form(){return this.elementInternals.form}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}get selected(){return m.track(this,"selected"),!!this.currentSelected}set selected(e){this.currentSelected=e,ie.enqueue(()=>{this.$fastController.isConnected&&(this.setFormValue(e?this.value:null),this.elementInternals.ariaSelected=e?"true":"false",y(this.elementInternals,"selected",e))}),m.notify(this,"selected")}get text(){return this.freeform?this.value.replace(/\s+/g," ").trim():(this.textAttribute??this.textContent)?.replace(/\s+/g," ").trim()??""}get value(){return m.track(this,"value"),this._value??this.text}set value(e){this._value=e,this.$fastController.isConnected&&(this.setFormValue(this.selected?e:null),this.freeformOutputs?.forEach(t=>{t.value=e}),m.notify(this,"value"))}connectedCallback(){super.connectedCallback(),this.freeform&&(this.value="",this.hidden=!0,this.selected=!1)}setFormValue(e,t){if(this.disabled){this.elementInternals.setFormValue(null);return}this.elementInternals.setFormValue(e,e??t)}toggleSelected(e=!this.selected){this.selected=e}}ce.formAssociated=!0,ke([g],ce.prototype,"active",2),ke([a({attribute:"current-selected",mode:"boolean"})],ce.prototype,"currentSelected",2),ke([a({attribute:"selected",mode:"boolean"})],ce.prototype,"defaultSelected",2),ke([g],ce.prototype,"descriptionSlot",2),ke([g],ce.prototype,"disabled",2),ke([a({attribute:"disabled",mode:"boolean"})],ce.prototype,"disabledAttribute",2),ke([a({attribute:"form"})],ce.prototype,"formAttribute",2),ke([a({mode:"boolean"})],ce.prototype,"freeform",2),ke([a({attribute:"id"})],ce.prototype,"id",2),ke([a({attribute:"value",mode:"fromView"})],ce.prototype,"initialValue",2),ke([g],ce.prototype,"multiple",2),ke([a],ce.prototype,"name",2),ke([g],ce.prototype,"start",2),ke([a({attribute:"text",mode:"fromView"})],ce.prototype,"textAttribute",2);const zb=u`
|
|
457
457
|
${k("inline-grid")}
|
|
458
458
|
|
|
459
459
|
:host{-webkit-tap-highlight-color:transparent;${ia}
|
|
460
|
-
align-items:center;background-color:${I};border-radius:${C};border:${ue} solid ${
|
|
461
|
-
'indicator start description'}::slotted([slot='description']){color:${
|
|
460
|
+
align-items:center;background-color:${I};border-radius:${C};border:${ue} solid ${Z};box-sizing:border-box;color:${Ie};column-gap:${ne};cursor:pointer;grid-template-areas:'indicator start content';grid-template-columns:auto auto 1fr;min-height:32px;padding:${J};text-align:start}.content{grid-area:content;line-height:1}::slotted([slot='start']){grid-area:start}:host(:hover){background-color:${ai};color:${Mt}}:host(:active){background-color:${br};color:${Dt}}:host(:disabled){background-color:${I};color:${S};cursor:default}.checkmark-16-filled{fill:currentColor;width:16px}slot[name='checked-indicator'] > *,::slotted([slot='checked-indicator']){aspect-ratio:1;flex:0 0 auto;grid-area:indicator;visibility:hidden}:host(${Nr}) :is(slot[name='checked-indicator'] > *,::slotted([slot='checked-indicator'])){visibility:visible}:host(${Kt}) .checkmark-16-filled,:host(:not(${Kt})) .checkmark-12-regular{display:none}:host(${Kt}) .checkmark-12-regular{background-color:${I};border-radius:${Be};border:${T} solid ${Ve};box-sizing:border-box;cursor:pointer;fill:transparent;position:relative;visibility:visible;width:16px}:host(${Kt}${Nr}) .checkmark-12-regular{background-color:${ft};border-color:${$t};fill:${bt}}:host(:disabled${Kt}) .checkmark-12-regular{border-color:${Ce}}:host(:disabled${Kt}${Nr}) .checkmark-12-regular{background-color:${it}}:host(${jh}){border:${ue} solid ${ve}}@supports (selector(:host(:has(*)))){:host(:has([slot='start']:not([size='16']))){column-gap:${J}}}:host(${Wh}){column-gap:${J};grid-template-areas:'indicator start content'
|
|
461
|
+
'indicator start description'}::slotted([slot='description']){color:${Q};grid-area:description;${ra}}`,Tb=b.partial(`
|
|
462
462
|
<svg aria-hidden="true" class="checkmark-16-filled" viewBox="0 0 16 16">
|
|
463
463
|
<path
|
|
464
464
|
d="M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032"
|
|
@@ -475,13 +475,13 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
475
475
|
:host{width:100%;height:2px;overflow-x:hidden;background-color:${yo};border-radius:${C};contain:content;@supports (width:attr(value type(<number>))){--max:attr(max type(<number>),100);--min:attr(min type(<number>),0);--value:attr(value type(<number>),0);--indicator-width:clamp(0%,calc((var(--value) - var(--min)) / (var(--max) - var(--min)) * 100%),100%)}}:host([thickness='large']){height:4px}:host([shape='square']){border-radius:${hi}}.indicator{background-color:${ft};border-radius:inherit;height:100%}:host([value]) .indicator{transition:all 0.2s ease-in-out;@supports (width:attr(value type(<number>))){width:var(--indicator-width)}}:host(:not([value])) .indicator{position:relative;width:33%;background-image:linear-gradient(
|
|
476
476
|
to right,${yo} 0%,${me} 50%,${yo} 100%
|
|
477
477
|
);animation-name:indeterminate;animation-duration:3s;animation-timing-function:linear;animation-iteration-count:infinite}:host([validation-state='error']) .indicator{background-color:${xn}}:host([validation-state='warning']) .indicator{background-color:${Pn}}:host([validation-state='success']) .indicator{background-color:${Sn}}@layer animations{@media (prefers-reduced-motion:no-preference){:host([value]){transition:none}:host(:not([value])) .indicator{animation-duration:0.01ms;animation-iteration-count:1}}}@keyframes indeterminate{0%{inset-inline-start:-33%}100%{inset-inline-start:100%}}`.withBehaviors(U(u`
|
|
478
|
-
:host{background-color:CanvasText}.indicator,:host(:is([validation-state='success'],[validation-state='warning'],[validation-state='error'])) .indicator{background-color:Highlight}`));function Hb(){return b`<div class="indicator" part="indicator" ${E("indicator")}></div>`}const Vb=Hb(),Lb=Rr.compose({name:`${p.prefix}-progress-bar`,template:Vb,styles:Db});Lb.define(p.registry);class fa extends Pe{constructor(){super(),this.elementInternals.role="radio"}disabledChanged(e,t){super.disabledChanged(e,t),this.$emit("disabled",t,{bubbles:!0})}requiredChanged(){}setFormValue(){}setValidity(){this.elementInternals.setValidity({})}toggleChecked(e=!0){super.toggleChecked(e)}}function ma(o){const e=o.getRootNode();return e instanceof ShadowRoot?e.activeElement:document.activeElement}const va=ge;var jb=Object.defineProperty,Rb=Object.getOwnPropertyDescriptor,Pt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Rb(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&jb(e,t,r),r};class Je extends ${constructor(){super(),this.dirtyState=!1,this.disabled=!1,this.elementInternals=this.attachInternals(),this.elementInternals.role="radiogroup",this.elementInternals.ariaOrientation=this.orientation??va.horizontal}checkedIndexChanged(e,t){this.enabledRadios&&this.checkRadio(t)}disabledChanged(e,t){this.$fastController.isConnected&&(this.checkedIndex=-1,this.radios?.forEach(i=>{i.disabled=!!i.disabledAttribute||!!this.disabled}),this.restrictFocus())}initialValueChanged(e,t){this.value=t??""}nameChanged(e,t){this.isConnected&&t&&this.radios?.forEach(i=>{i.name=this.name})}orientationChanged(e,t){this.elementInternals.ariaOrientation=this.orientation??va.horizontal}radiosChanged(e,t){const i=t?.length;if(!i)return;!this.name&&t.every(n=>n.name===t[0].name)&&(this.name=t[0].name);const r=ml(this.enabledRadios,n=>n.initialChecked);t.forEach((n,c)=>{n.ariaPosInSet=`${c+1}`,n.ariaSetSize=`${i}`,this.initialValue&&!this.dirtyState?n.checked=n.value===this.initialValue:n.checked=c===r,n.name=this.name??n.name,n.disabled=!!this.disabled||!!n.disabledAttribute}),!this.dirtyState&&this.initialValue&&(this.value=this.initialValue),(!this.value||this.value&&typeof this.checkedIndex!="number"&&r>=0)&&(this.checkedIndex=r);const s=t.map(n=>n.id).join(" ").trim();s&&this.setAttribute("aria-owns",s),
|
|
478
|
+
:host{background-color:CanvasText}.indicator,:host(:is([validation-state='success'],[validation-state='warning'],[validation-state='error'])) .indicator{background-color:Highlight}`));function Hb(){return b`<div class="indicator" part="indicator" ${E("indicator")}></div>`}const Vb=Hb(),Lb=Rr.compose({name:`${p.prefix}-progress-bar`,template:Vb,styles:Db});Lb.define(p.registry);class fa extends Pe{constructor(){super(),this.elementInternals.role="radio"}disabledChanged(e,t){super.disabledChanged(e,t),this.$emit("disabled",t,{bubbles:!0})}requiredChanged(){}setFormValue(){}setValidity(){this.elementInternals.setValidity({})}toggleChecked(e=!0){super.toggleChecked(e)}}function ma(o){const e=o.getRootNode();return e instanceof ShadowRoot?e.activeElement:document.activeElement}const va=ge;var jb=Object.defineProperty,Rb=Object.getOwnPropertyDescriptor,Pt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Rb(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&jb(e,t,r),r};class Je extends ${constructor(){super(),this.dirtyState=!1,this.disabled=!1,this.elementInternals=this.attachInternals(),this.elementInternals.role="radiogroup",this.elementInternals.ariaOrientation=this.orientation??va.horizontal}checkedIndexChanged(e,t){this.enabledRadios&&this.checkRadio(t)}disabledChanged(e,t){this.$fastController.isConnected&&(this.checkedIndex=-1,this.radios?.forEach(i=>{i.disabled=!!i.disabledAttribute||!!this.disabled}),this.restrictFocus())}initialValueChanged(e,t){this.value=t??""}nameChanged(e,t){this.isConnected&&t&&this.radios?.forEach(i=>{i.name=this.name})}orientationChanged(e,t){this.elementInternals.ariaOrientation=this.orientation??va.horizontal}radiosChanged(e,t){const i=t?.length;if(!i)return;!this.name&&t.every(n=>n.name===t[0].name)&&(this.name=t[0].name);const r=ml(this.enabledRadios,n=>n.initialChecked);t.forEach((n,c)=>{n.ariaPosInSet=`${c+1}`,n.ariaSetSize=`${i}`,this.initialValue&&!this.dirtyState?n.checked=n.value===this.initialValue:n.checked=c===r,n.name=this.name??n.name,n.disabled=!!this.disabled||!!n.disabledAttribute}),!this.dirtyState&&this.initialValue&&(this.value=this.initialValue),(!this.value||this.value&&typeof this.checkedIndex!="number"&&r>=0)&&(this.checkedIndex=r);const s=t.map(n=>n.id).join(" ").trim();s&&this.setAttribute("aria-owns",s),ie.enqueue(()=>{this.restrictFocus()})}requiredChanged(e,t){this.elementInternals.ariaRequired=t?"true":null,this.setValidity()}get enabledRadios(){return this.disabled?[]:this.radios?.filter(e=>!e.disabled)??[]}get validationMessage(){if(this.elementInternals.validationMessage)return this.elementInternals.validationMessage;if(this.enabledRadios?.[0]?.validationMessage)return this.enabledRadios[0].validationMessage;if(!this._validationFallbackMessage){const e=document.createElement("input");e.type="radio",e.required=!0,e.checked=!1,this._validationFallbackMessage=e.validationMessage}return this._validationFallbackMessage}get validity(){return this.elementInternals.validity}get value(){return m.notify(this,"value"),this.enabledRadios.find(e=>e.checked)?.value??null}set value(e){const t=this.enabledRadios.findIndex(i=>i.value===e);this.checkedIndex=t,this.$fastController.isConnected&&(this.setFormValue(e),this.setValidity()),m.track(this,"value")}changeHandler(e){if(this===e.target)return!0;this.dirtyState=!0;const t=this.enabledRadios.indexOf(e.target);return this.checkRadio(t),this.radios?.filter(i=>i.disabled)?.forEach(i=>{i.checked=!1}),!0}checkRadio(e=this.checkedIndex,t=!1){let i=this.checkedIndex;this.enabledRadios.forEach((r,s)=>{const n=s===e;r.checked=n,n&&(i=s,t&&r.$emit("change"))}),this.checkedIndex=i,this.setFormValue(this.value),this.setValidity()}checkValidity(){return this.elementInternals.checkValidity()}clickHandler(e){return this===e.target&&this.enabledRadios[Math.max(0,this.checkedIndex)]?.focus(),!0}focus(){this.enabledRadios[Math.max(0,this.checkedIndex)]?.focus()}focusinHandler(e){return this.disabled||this.enabledRadios.forEach(t=>{t.tabIndex=0}),!0}focusoutHandler(e){return this.radios?.includes(e.relatedTarget)&&this.radios?.some(t=>t.checked)&&this.restrictFocus(),!0}formResetCallback(){this.dirtyState=!1,this.checkedIndex=-1,this.setFormValue(this.value),this.setValidity()}getEnabledIndexInBounds(e,t=this.enabledRadios.length){return t===0?-1:(e+t)%t}keydownHandler(e){const t=ei(this)==="rtl",i=this.enabledRadios.findIndex(n=>n===ma(this))??this.checkedIndex;let r=0;switch(e.key){case"ArrowLeft":{r=t?1:-1;break}case"ArrowUp":{r=-1;break}case"ArrowRight":{r=t?-1:1;break}case"ArrowDown":{r=1;break}case"Tab":{this.restrictFocus();break}case" ":{this.checkRadio();break}}if(!r)return!0;const s=i+r;this.checkRadio(this.getEnabledIndexInBounds(s),!0),this.enabledRadios[this.checkedIndex]?.focus()}disabledRadioHandler(e){e.detail===!0&&e.target.checked&&(this.checkedIndex=-1)}reportValidity(){return this.elementInternals.reportValidity()}restrictFocus(){let e=Math.max(this.checkedIndex,0);const t=this.enabledRadios.indexOf(ma(this));t!==-1&&(e=t),e=this.getEnabledIndexInBounds(e),this.enabledRadios.forEach((i,r)=>{i.tabIndex=r===e?0:-1})}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}setValidity(e,t,i){if(this.$fastController.isConnected){if(this.disabled||!this.required){this.elementInternals.setValidity({});return}this.elementInternals.setValidity({valueMissing:this.required&&!this.value,...e},t??this.validationMessage,i??this.enabledRadios[0])}}slotchangeHandler(e){ie.enqueue(()=>{this.radios=[...this.querySelectorAll("*")].filter(t=>t instanceof fa)})}}Je.formAssociated=!0,Pt([g],Je.prototype,"checkedIndex",2),Pt([a({attribute:"disabled",mode:"boolean"})],Je.prototype,"disabled",2),Pt([a({attribute:"value",mode:"fromView"})],Je.prototype,"initialValue",2),Pt([a],Je.prototype,"name",2),Pt([a],Je.prototype,"orientation",2),Pt([g],Je.prototype,"radios",2),Pt([a({mode:"boolean"})],Je.prototype,"required",2);const qb=u`
|
|
479
479
|
${k("flex")}
|
|
480
480
|
|
|
481
|
-
:host{-webkit-tap-highlight-color:transparent;cursor:pointer;gap:${mi}}:host([orientation='vertical']){flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']){flex-direction:row}::slotted(*){color:${
|
|
481
|
+
:host{-webkit-tap-highlight-color:transparent;cursor:pointer;gap:${mi}}:host([orientation='vertical']){flex-direction:column;justify-content:flex-start}:host([orientation='horizontal']){flex-direction:row}::slotted(*){color:${Q}}::slotted(:hover){color:${Ie}}::slotted(:active){color:${z}}::slotted(${xe}){color:${S}}::slotted(${x}){color:${z}}:host([slot='input']){margin:${V} ${Oe}}`;function Wb(){return b`<template @disabled="${(o,e)=>o.disabledRadioHandler(e.event)}" @change="${(o,e)=>o.changeHandler(e.event)}" @click="${(o,e)=>o.clickHandler(e.event)}" @focusin="${(o,e)=>o.focusinHandler(e.event)}" @focusout="${(o,e)=>o.focusoutHandler(e.event)}" @keydown="${(o,e)=>o.keydownHandler(e.event)}"><slot @slotchange="${(o,e)=>o.slotchangeHandler(e.event)}"></slot></template>`}const Gb=Wb(),Ub=Je.compose({name:`${p.prefix}-radio-group`,template:Gb,styles:qb});Ub.define(p.registry);const Xb=u`
|
|
482
482
|
${k("inline-flex")}
|
|
483
483
|
|
|
484
|
-
:host{--size:16px;aspect-ratio:1;background-color:${I};border:${T} solid ${Ve};border-radius:${$e};box-sizing:border-box;position:relative;width:var(--size)}:host([size='large']){--size:20px}.checked-indicator{aspect-ratio:1;border-radius:${$e};color:${bt};inset:0;margin:auto;position:absolute;width:calc(var(--size) * 0.625)}:host(:not([slot='input']))::after{content:'' / '';position:absolute;display:block;inset:-8px;box-sizing:border-box;outline:none;border:${ue} solid ${
|
|
484
|
+
:host{--size:16px;aspect-ratio:1;background-color:${I};border:${T} solid ${Ve};border-radius:${$e};box-sizing:border-box;position:relative;width:var(--size)}:host([size='large']){--size:20px}.checked-indicator{aspect-ratio:1;border-radius:${$e};color:${bt};inset:0;margin:auto;position:absolute;width:calc(var(--size) * 0.625)}:host(:not([slot='input']))::after{content:'' / '';position:absolute;display:block;inset:-8px;box-sizing:border-box;outline:none;border:${ue} solid ${Z};border-radius:${C}}:host(:not([slot='input']):focus-visible)::after{border-color:${ve}}:host(:hover){border-color:${mt}}:host(${x}){border-color:${$t}}:host(${x}) .checked-indicator{background-color:${ft}}:host(${x}:hover) .checked-indicator{background-color:${Ht}}:host(:active){border-color:${vt}}:host(${x}:active) .checked-indicator{background-color:${Vt}}:host(:focus-visible){outline:none}:host(${xe}){background-color:${it};border-color:${Ce}}:host(${x}${xe}) .checked-indicator{background-color:${Ce}}`.withBehaviors(U(u`
|
|
485
485
|
:host{border-color:FieldText}:host(:not([slot='input']:focus-visible))::after{border-color:Canvas}:host(:not(${xe}):hover),:host(:not([slot='input']):focus-visible)::after{border-color:Highlight}.checked-indicator{color:HighlightText}:host(${x}) .checked-indicator{background-color:FieldText}:host(${x}:not(${xe}):hover) .checked-indicator{background-color:Highlight}:host(${xe}){border-color:GrayText;color:GrayText}:host(${xe}${x}) .checked-indicator{background-color:GrayText}`)),Kb=b.partial(`
|
|
486
486
|
<span part="checked-indicator" class="checked-indicator" role="presentation"></span>
|
|
487
487
|
`);function Yb(o={}){return b`<template @click="${(e,t)=>e.clickHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}"><slot name="checked-indicator">${fe(o.checkedIndicator)}</slot></template>`}const Qb=Yb({checkedIndicator:Kb}),Zb=fa.compose({name:`${p.prefix}-radio`,template:Qb,styles:Xb});Zb.define(p.registry);var Jb=Object.defineProperty,eg=Object.getOwnPropertyDescriptor,Ni=(o,e,t,i)=>{for(var r=i>1?void 0:i?eg(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Jb(e,t,r),r};const tg=CSS.supports("width: attr(value type(<number>))"),oo={max:"--_attr-max",value:"--_attr-value",maskImageFilled:"--_mask-image-filled",maskImageOutlined:"--_mask-image-outlined"};function Fi(o){return o?["data:image/svg+xml",encodeURIComponent(o.replace(/\n/g,"").replace(/\s+/g," "))].join(","):""}class Ao extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.defaultCustomIconViewBox="0 0 20 20",this.elementInternals.role="img",this.numberFormatter=new Intl.NumberFormat}maxChanged(){this.setCustomPropertyValue("max")}valueChanged(){this.setCustomPropertyValue("value")}connectedCallback(){super.connectedCallback(),this.setCustomPropertyValue("value"),this.setCustomPropertyValue("max")}get formattedCount(){return this.count?this.numberFormatter.format(this.count):""}handleSlotChange(){const e=this.iconSlot.assignedElements()?.find(t=>t.nodeName.toLowerCase()==="svg");this.renderSlottedIcon(e??null)}renderSlottedIcon(e){if(!e){this.display.style.removeProperty(oo.maskImageFilled),this.display.style.removeProperty(oo.maskImageOutlined);return}const t=e.innerHTML,i=e.getAttribute("viewBox")??this.iconViewBox??this.defaultCustomIconViewBox,r=`
|
|
@@ -508,9 +508,9 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
508
508
|
var(--_mask-inline-size) * var(--_value) - var(--_icon-gradient-stop-visual-adjustment)
|
|
509
509
|
);background-image:linear-gradient(
|
|
510
510
|
var(--_icon-gradient-degree),var(--_icon-color-value) var(--_icon-gradient-stop),var(--_icon-color-empty) calc(var(--_icon-gradient-stop) + 0.5px)
|
|
511
|
-
);block-size:var(--_icon-size);display:grid;inline-size:calc(var(--_max) * var(--_mask-inline-size) - ${H} / 2);mask-image:var(--_mask-image-filled);mask-repeat:repeat no-repeat;mask-size:var(--_mask-inline-size) var(--_icon-size);mask-position:var(--_mask-position-x) center}.value-label,::slotted([slot='value']){display:block;margin-inline-start:${ne};font-weight:${D}}:host([size='small']) .value-label,:host([size='small']) ::slotted([slot='value']){margin-inline-start:${H}}:host([size='large']) .value-label,:host([size='large']) ::slotted([slot='value']){margin-inline-start:${
|
|
512
|
-
.display{--_icon-color-value:CanvasText;--_icon-color-empty:Canvas;--_icon-gradient-stop-visual-adjustment:0.5px;forced-color-adjust:none}.display::before{background-color:var(--_icon-color-value);content:'';grid-area:1 / 1 / -1 / -1;mask:inherit;mask-image:var(--_mask-image-outlined)}`)),cg=Mi.compose({name:`${p.prefix}-rating-display`,template:ag,styles:lg});cg.define(p.registry);const dg=ge,hg={singleValue:"single-value"};function ya(o,e,t,i){let r=dr(0,1,(o-e)/(t-e));return i===De.rtl&&(r=1-r),r}var ug=Object.defineProperty,pg=Object.getOwnPropertyDescriptor,
|
|
513
|
-
:host{--step-rate:${e}%}`,this.$fastController.addStyles(this.stepStyles)}else this.stepStyles!==void 0&&this.$fastController.removeStyles(this.stepStyles)}initialValueChanged(e,t){this.$fastController.isConnected?this.value=t:this._value=t}get validity(){return this.elementInternals.validity}get validationMessage(){return this.elementInternals.validationMessage}get willValidate(){return this.elementInternals.willValidate}checkValidity(){return this.elementInternals.checkValidity()}reportValidity(){return this.elementInternals.reportValidity()}setCustomValidity(e){this.setValidity({customError:!!e},e)}setValidity(e,t,i){if(this.$fastController.isConnected){if(this.disabled){this.elementInternals.setValidity({});return}this.elementInternals.setValidity({customError:!!t,...e},t??this.validationMessage,i)}}get value(){return m.track(this,"value"),this._value?.toString()??""}set value(e){if(!this.$fastController.isConnected){this._value=e.toString();return}const t=parseFloat(e),i=dr(this.minAsNumber,this.maxAsNumber,this.convertToConstrainedValue(t)).toString();if(i!==e){this.value=i;return}this._value=e.toString(),this.elementInternals.ariaValueNow=this._value,this.elementInternals.ariaValueText=this.valueTextFormatter(this._value),this.setSliderPosition(),this.$emit("change"),this.setFormValue(e),m.notify(this,"value")}formResetCallback(){this.value=this.initialValue??this.midpoint}formDisabledCallback(e){this.setDisabledSideEffect(e)}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}directionChanged(){this.setSliderPosition()}get valueAsNumber(){return parseFloat(this.value)}set valueAsNumber(e){this.value=e.toString()}valueTextFormatterChanged(){typeof this.valueTextFormatter=="function"?this.elementInternals.ariaValueText=this.valueTextFormatter(this._value):this.elementInternals.ariaValueText=""}disabledChanged(){this.setDisabledSideEffect(this.disabled)}minChanged(){this.elementInternals.ariaValueMin=`${this.minAsNumber}`,this.$fastController.isConnected&&this.minAsNumber>this.valueAsNumber&&(this.value=this.min)}get minAsNumber(){if(this.min!==void 0){const e=parseFloat(this.min);if(!Number.isNaN(e))return e}return 0}maxChanged(){this.elementInternals.ariaValueMax=`${this.maxAsNumber}`,this.$fastController.isConnected&&this.maxAsNumber<this.valueAsNumber&&(this.value=this.max)}get maxAsNumber(){if(this.max!==void 0){const e=parseFloat(this.max);if(!Number.isNaN(e))return e}return 100}stepChanged(){this.updateStepMultiplier(),this.$fastController.isConnected&&(this.value=this._value)}get stepAsNumber(){if(this.step!==void 0){const e=parseFloat(this.step);if(!Number.isNaN(e)&&e>0)return e}return 1}orientationChanged(e,t){this.elementInternals.ariaOrientation=t??ge.horizontal,this.$fastController.isConnected&&this.setSliderPosition()}connectedCallback(){super.connectedCallback(),this.direction=ei(this),this.setDisabledSideEffect(this.disabled),this.updateStepMultiplier(),this.setupTrackConstraints(),this.setupDefaultValue(),this.setSliderPosition(),m.getNotifier(this).subscribe(this,"max"),m.getNotifier(this).subscribe(this,"min"),m.getNotifier(this).subscribe(this,"step"),this.handleStepStyles()}disconnectedCallback(){super.disconnectedCallback(),m.getNotifier(this).unsubscribe(this,"max"),m.getNotifier(this).unsubscribe(this,"min"),m.getNotifier(this).unsubscribe(this,"step")}increment(){const e=this.direction!==De.rtl?Number(this.value)+this.stepAsNumber:Number(this.value)-this.stepAsNumber,t=this.convertToConstrainedValue(e),i=t<this.maxAsNumber?`${t}`:`${this.maxAsNumber}`;this.value=i}decrement(){const e=this.direction!==De.rtl?Number(this.value)-Number(this.stepAsNumber):Number(this.value)+Number(this.stepAsNumber),t=this.convertToConstrainedValue(e),i=t>this.minAsNumber?`${t}`:`${this.minAsNumber}`;this.value=i}handleKeydown(e){if(this.disabled)return!0;switch(e.key){case mo:e.preventDefault(),this.value=this.direction!==De.rtl&&this.orientation!==ge.vertical?`${this.minAsNumber}`:`${this.maxAsNumber}`;break;case go:e.preventDefault(),this.value=this.direction!==De.rtl&&this.orientation!==ge.vertical?`${this.maxAsNumber}`:`${this.minAsNumber}`;break;case po:case bo:e.shiftKey||(e.preventDefault(),this.increment());break;case uo:case ho:e.shiftKey||(e.preventDefault(),this.decrement());break}return!0}setSliderPosition(){const t=ya(parseFloat(this.value),this.minAsNumber,this.maxAsNumber,this.orientation===ge.vertical?void 0:this.direction)*100;this.position=`--slider-thumb: ${t}%; --slider-progress: ${t}%`}updateStepMultiplier(){const e=this.stepAsNumber+"",t=this.stepAsNumber%1?e.length-e.indexOf(".")-1:0;this.stepMultiplier=Math.pow(10,t)}get midpoint(){return`${this.convertToConstrainedValue((this.maxAsNumber+this.minAsNumber)/2)}`}setupDefaultValue(){this._value||(this.value=this.initialValue??this.midpoint),!Number.isNaN(this.valueAsNumber)&&(this.valueAsNumber<this.minAsNumber||this.valueAsNumber>this.maxAsNumber)&&(this.value=this.midpoint),this.elementInternals.ariaValueNow=this.value}calculateNewValue(e){this.setupTrackConstraints();const t=ya(e,this.orientation===ge.vertical?this.trackMinHeight:this.trackMinWidth,this.orientation===ge.vertical?this.trackHeight:this.trackWidth,this.orientation===ge.vertical?void 0:this.direction),i=(this.maxAsNumber-this.minAsNumber)*t+this.minAsNumber;return this.convertToConstrainedValue(i)}convertToConstrainedValue(e){isNaN(e)&&(e=this.minAsNumber);let t=e-this.minAsNumber;const i=Math.round(t/this.stepAsNumber),r=t-i*(this.stepMultiplier*this.stepAsNumber)/this.stepMultiplier;return t=r>=Number(this.stepAsNumber)/2?t-r+Number(this.stepAsNumber):t-r,t+this.minAsNumber}setDisabledSideEffect(e){this.$fastController.isConnected&&(this.elementInternals.ariaDisabled=e.toString(),this.tabIndex=e?-1:0)}}W.formAssociated=!0,
|
|
511
|
+
);block-size:var(--_icon-size);display:grid;inline-size:calc(var(--_max) * var(--_mask-inline-size) - ${H} / 2);mask-image:var(--_mask-image-filled);mask-repeat:repeat no-repeat;mask-size:var(--_mask-inline-size) var(--_icon-size);mask-position:var(--_mask-position-x) center}.value-label,::slotted([slot='value']){display:block;margin-inline-start:${ne};font-weight:${D}}:host([size='small']) .value-label,:host([size='small']) ::slotted([slot='value']){margin-inline-start:${H}}:host([size='large']) .value-label,:host([size='large']) ::slotted([slot='value']){margin-inline-start:${J}}:host(:not([count])) .count-label{display:none}.count-label::before,::slotted([slot='count'])::before{content:'·';margin-inline:${ne}}:host([size='small']) .count-label::before,:host([size='small']) ::slotted([slot='count'])::before{margin-inline:${H}}:host([size='large']) .count-label::before,:host([size='large']) ::slotted([slot='count'])::before{margin-inline:${J}}`.withBehaviors(U(u`
|
|
512
|
+
.display{--_icon-color-value:CanvasText;--_icon-color-empty:Canvas;--_icon-gradient-stop-visual-adjustment:0.5px;forced-color-adjust:none}.display::before{background-color:var(--_icon-color-value);content:'';grid-area:1 / 1 / -1 / -1;mask:inherit;mask-image:var(--_mask-image-outlined)}`)),cg=Mi.compose({name:`${p.prefix}-rating-display`,template:ag,styles:lg});cg.define(p.registry);const dg=ge,hg={singleValue:"single-value"};function ya(o,e,t,i){let r=dr(0,1,(o-e)/(t-e));return i===De.rtl&&(r=1-r),r}var ug=Object.defineProperty,pg=Object.getOwnPropertyDescriptor,te=(o,e,t,i)=>{for(var r=i>1?void 0:i?pg(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ug(e,t,r),r};class W extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.direction=De.ltr,this.isDragging=!1,this.trackWidth=0,this.trackMinWidth=0,this.trackHeight=0,this.trackLeft=0,this.trackMinHeight=0,this.valueTextFormatter=()=>"",this.disabled=!1,this.min="",this.max="",this.step="",this.mode=hg.singleValue,this.setupTrackConstraints=()=>{const e=this.track.getBoundingClientRect();this.trackWidth=this.track.clientWidth,this.trackMinWidth=this.track.clientLeft,this.trackHeight=e.top,this.trackMinHeight=e.bottom,this.trackLeft=this.getBoundingClientRect().left,this.trackWidth===0&&(this.trackWidth=1)},this.handleThumbPointerDown=e=>{const t=e!==null?window.addEventListener:window.removeEventListener;return t("pointerup",this.handleWindowPointerUp),t("pointermove",this.handlePointerMove,{passive:!0}),t("touchmove",this.handlePointerMove,{passive:!0}),t("touchend",this.handleWindowPointerUp),this.isDragging=e!==null,!0},this.handlePointerMove=e=>{if(this.disabled||e.defaultPrevented)return;const t=window.TouchEvent&&e instanceof TouchEvent?e.touches[0]:e,i=this.thumb.getBoundingClientRect().width,r=this.orientation===ge.vertical?t.pageY-document.documentElement.scrollTop:t.pageX-document.documentElement.scrollLeft-this.trackLeft-i/2;this.value=`${this.calculateNewValue(r)}`},this.handleWindowPointerUp=()=>{this.stopDragging()},this.stopDragging=()=>{this.isDragging=!1,this.handlePointerDown(null),this.handleThumbPointerDown(null)},this.handlePointerDown=e=>{if(e===null||!this.disabled){const t=e!==null?window.addEventListener:window.removeEventListener,i=e!==null?document.addEventListener:document.removeEventListener;t("pointerup",this.handleWindowPointerUp),i("mouseleave",this.handleWindowPointerUp),t("pointermove",this.handlePointerMove);const r=this.thumb.getBoundingClientRect().width;if(e){this.setupTrackConstraints();const s=this.orientation===ge.vertical?e.pageY-document.documentElement.scrollTop:e.pageX-document.documentElement.scrollLeft-this.trackLeft-r/2;this.value=`${this.calculateNewValue(s)}`}}return!0},this.elementInternals.role="slider",this.elementInternals.ariaOrientation=this.orientation??dg.horizontal}get labels(){return Object.freeze(Array.from(this.elementInternals.labels))}handleChange(e,t){switch(t){case"min":case"max":this.setSliderPosition();case"step":this.handleStepStyles();break}}handleStepStyles(){if(this.step){const e=100/Math.floor((this.maxAsNumber-this.minAsNumber)/this.stepAsNumber);this.stepStyles!==void 0&&this.$fastController.removeStyles(this.stepStyles),this.stepStyles=u`
|
|
513
|
+
:host{--step-rate:${e}%}`,this.$fastController.addStyles(this.stepStyles)}else this.stepStyles!==void 0&&this.$fastController.removeStyles(this.stepStyles)}initialValueChanged(e,t){this.$fastController.isConnected?this.value=t:this._value=t}get validity(){return this.elementInternals.validity}get validationMessage(){return this.elementInternals.validationMessage}get willValidate(){return this.elementInternals.willValidate}checkValidity(){return this.elementInternals.checkValidity()}reportValidity(){return this.elementInternals.reportValidity()}setCustomValidity(e){this.setValidity({customError:!!e},e)}setValidity(e,t,i){if(this.$fastController.isConnected){if(this.disabled){this.elementInternals.setValidity({});return}this.elementInternals.setValidity({customError:!!t,...e},t??this.validationMessage,i)}}get value(){return m.track(this,"value"),this._value?.toString()??""}set value(e){if(!this.$fastController.isConnected){this._value=e.toString();return}const t=parseFloat(e),i=dr(this.minAsNumber,this.maxAsNumber,this.convertToConstrainedValue(t)).toString();if(i!==e){this.value=i;return}this._value=e.toString(),this.elementInternals.ariaValueNow=this._value,this.elementInternals.ariaValueText=this.valueTextFormatter(this._value),this.setSliderPosition(),this.$emit("change"),this.setFormValue(e),m.notify(this,"value")}formResetCallback(){this.value=this.initialValue??this.midpoint}formDisabledCallback(e){this.setDisabledSideEffect(e)}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}directionChanged(){this.setSliderPosition()}get valueAsNumber(){return parseFloat(this.value)}set valueAsNumber(e){this.value=e.toString()}valueTextFormatterChanged(){typeof this.valueTextFormatter=="function"?this.elementInternals.ariaValueText=this.valueTextFormatter(this._value):this.elementInternals.ariaValueText=""}disabledChanged(){this.setDisabledSideEffect(this.disabled)}minChanged(){this.elementInternals.ariaValueMin=`${this.minAsNumber}`,this.$fastController.isConnected&&this.minAsNumber>this.valueAsNumber&&(this.value=this.min)}get minAsNumber(){if(this.min!==void 0){const e=parseFloat(this.min);if(!Number.isNaN(e))return e}return 0}maxChanged(){this.elementInternals.ariaValueMax=`${this.maxAsNumber}`,this.$fastController.isConnected&&this.maxAsNumber<this.valueAsNumber&&(this.value=this.max)}get maxAsNumber(){if(this.max!==void 0){const e=parseFloat(this.max);if(!Number.isNaN(e))return e}return 100}stepChanged(){this.updateStepMultiplier(),this.$fastController.isConnected&&(this.value=this._value)}get stepAsNumber(){if(this.step!==void 0){const e=parseFloat(this.step);if(!Number.isNaN(e)&&e>0)return e}return 1}orientationChanged(e,t){this.elementInternals.ariaOrientation=t??ge.horizontal,this.$fastController.isConnected&&this.setSliderPosition()}connectedCallback(){super.connectedCallback(),this.direction=ei(this),this.setDisabledSideEffect(this.disabled),this.updateStepMultiplier(),this.setupTrackConstraints(),this.setupDefaultValue(),this.setSliderPosition(),m.getNotifier(this).subscribe(this,"max"),m.getNotifier(this).subscribe(this,"min"),m.getNotifier(this).subscribe(this,"step"),this.handleStepStyles()}disconnectedCallback(){super.disconnectedCallback(),m.getNotifier(this).unsubscribe(this,"max"),m.getNotifier(this).unsubscribe(this,"min"),m.getNotifier(this).unsubscribe(this,"step")}increment(){const e=this.direction!==De.rtl?Number(this.value)+this.stepAsNumber:Number(this.value)-this.stepAsNumber,t=this.convertToConstrainedValue(e),i=t<this.maxAsNumber?`${t}`:`${this.maxAsNumber}`;this.value=i}decrement(){const e=this.direction!==De.rtl?Number(this.value)-Number(this.stepAsNumber):Number(this.value)+Number(this.stepAsNumber),t=this.convertToConstrainedValue(e),i=t>this.minAsNumber?`${t}`:`${this.minAsNumber}`;this.value=i}handleKeydown(e){if(this.disabled)return!0;switch(e.key){case mo:e.preventDefault(),this.value=this.direction!==De.rtl&&this.orientation!==ge.vertical?`${this.minAsNumber}`:`${this.maxAsNumber}`;break;case go:e.preventDefault(),this.value=this.direction!==De.rtl&&this.orientation!==ge.vertical?`${this.maxAsNumber}`:`${this.minAsNumber}`;break;case po:case bo:e.shiftKey||(e.preventDefault(),this.increment());break;case uo:case ho:e.shiftKey||(e.preventDefault(),this.decrement());break}return!0}setSliderPosition(){const t=ya(parseFloat(this.value),this.minAsNumber,this.maxAsNumber,this.orientation===ge.vertical?void 0:this.direction)*100;this.position=`--slider-thumb: ${t}%; --slider-progress: ${t}%`}updateStepMultiplier(){const e=this.stepAsNumber+"",t=this.stepAsNumber%1?e.length-e.indexOf(".")-1:0;this.stepMultiplier=Math.pow(10,t)}get midpoint(){return`${this.convertToConstrainedValue((this.maxAsNumber+this.minAsNumber)/2)}`}setupDefaultValue(){this._value||(this.value=this.initialValue??this.midpoint),!Number.isNaN(this.valueAsNumber)&&(this.valueAsNumber<this.minAsNumber||this.valueAsNumber>this.maxAsNumber)&&(this.value=this.midpoint),this.elementInternals.ariaValueNow=this.value}calculateNewValue(e){this.setupTrackConstraints();const t=ya(e,this.orientation===ge.vertical?this.trackMinHeight:this.trackMinWidth,this.orientation===ge.vertical?this.trackHeight:this.trackWidth,this.orientation===ge.vertical?void 0:this.direction),i=(this.maxAsNumber-this.minAsNumber)*t+this.minAsNumber;return this.convertToConstrainedValue(i)}convertToConstrainedValue(e){isNaN(e)&&(e=this.minAsNumber);let t=e-this.minAsNumber;const i=Math.round(t/this.stepAsNumber),r=t-i*(this.stepMultiplier*this.stepAsNumber)/this.stepMultiplier;return t=r>=Number(this.stepAsNumber)/2?t-r+Number(this.stepAsNumber):t-r,t+this.minAsNumber}setDisabledSideEffect(e){this.$fastController.isConnected&&(this.elementInternals.ariaDisabled=e.toString(),this.tabIndex=e?-1:0)}}W.formAssociated=!0,te([a],W.prototype,"size",2),te([a({attribute:"value",mode:"fromView"})],W.prototype,"initialValue",2),te([g],W.prototype,"direction",2),te([g],W.prototype,"isDragging",2),te([g],W.prototype,"position",2),te([g],W.prototype,"trackWidth",2),te([g],W.prototype,"trackMinWidth",2),te([g],W.prototype,"trackHeight",2),te([g],W.prototype,"trackLeft",2),te([g],W.prototype,"trackMinHeight",2),te([g],W.prototype,"valueTextFormatter",2),te([a({mode:"boolean"})],W.prototype,"disabled",2),te([a({converter:lr})],W.prototype,"min",2),te([a({converter:lr})],W.prototype,"max",2),te([a({converter:lr})],W.prototype,"step",2),te([a],W.prototype,"orientation",2),te([a],W.prototype,"mode",2);const bg=u`
|
|
514
514
|
${k("inline-grid")}
|
|
515
515
|
|
|
516
516
|
:host{--thumb-size:20px;--track-margin-inline:calc(var(--thumb-size) / 2);--track-size:4px;--track-overhang:calc(var(--track-size) / -2);--rail-color:${ft};--track-color:${Ve};--slider-direction:90deg;--border-radius:${C};--step-marker-inset:var(--track-overhang) -1px;position:relative;align-items:center;justify-content:center;box-sizing:border-box;outline:none;user-select:none;touch-action:none;min-width:120px;min-height:32px;grid-template-rows:1fr var(--thumb-size) 1fr;grid-template-columns:var(--track-margin-inline) 1fr var(--track-margin-inline)}:host(:hover){--rail-color:${Ht}}:host(:active){--rail-color:${Vt}}:host(:disabled){--rail-color:${S};--track-color:${it}}:host(:not(:disabled)){cursor:pointer}:host(:dir(rtl)){--slider-direction:-90deg}:host([size='small']){--thumb-size:16px;--track-overhang:-1px;--track-size:2px;--border-radius:${Be}}:host([orientation='vertical']){--slider-direction:0deg;--step-marker-inset:-1px var(--track-overhang);min-height:120px;grid-template-rows:var(--track-margin-inline) 1fr var(--track-margin-inline);grid-template-columns:1fr var(--thumb-size) 1fr;width:unset;min-width:32px;justify-items:center}:host(:not([slot='input']):focus-visible){box-shadow:0 0 0 2pt ${ve};outline:1px solid ${di}}:host:after,.track{height:var(--track-size);width:100%}:host:after{background-image:linear-gradient(
|
|
@@ -525,7 +525,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
525
525
|
.background{display:none}.indicator{border-color:Canvas;border-block-start-color:Highlight;border-right-color:Highlight}`)),kg=b`<slot name="indicator"><div class="background"></div><div class="progress"><div class="spinner"><div class="start"><div class="indicator"></div></div><div class="end"><div class="indicator"></div></div></div></div></slot>`,wg=Wr.compose({name:`${p.prefix}-spinner`,template:kg,styles:xg});wg.define(p.registry);class Cg extends Pe{constructor(){super(),this.elementInternals.role="switch"}}function Sg(o={}){return b`<template @click="${(e,t)=>e.clickHandler(t.event)}" @input="${(e,t)=>e.inputHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}" @keyup="${(e,t)=>e.keyupHandler(t.event)}"><slot name="switch">${fe(o.switch)}</slot></template>`}const Ig=Sg({switch:'<span class="checked-indicator" part="checked-indicator"></span>'}),Pg=u`
|
|
526
526
|
${k("inline-flex")}
|
|
527
527
|
|
|
528
|
-
:host{box-sizing:border-box;align-items:center;flex-direction:row;outline:none;user-select:none;contain:content;padding:0 ${H};width:40px;height:20px;background-color:${me};border:1px solid ${Ve};border-radius:${$e}}:host(:enabled){cursor:pointer}:host(:hover){background:none;border-color:${mt}}:host(:active){border-color:${vt}}:host(:disabled),:host([readonly]){border:1px solid ${Ce};background-color:none;pointer:default}:host(${x}){background:${ft};border-color:${ft}}:host(${x}:hover){background:${Ht};border-color:${Ht}}:host(${x}:active){background:${Vt};border-color:${Vt}}:host(${x}:disabled){background:${it};border-color:${Ce}}.checked-indicator{height:14px;width:14px;border-radius:50%;margin-inline-start:0;background-color:${
|
|
528
|
+
:host{box-sizing:border-box;align-items:center;flex-direction:row;outline:none;user-select:none;contain:content;padding:0 ${H};width:40px;height:20px;background-color:${me};border:1px solid ${Ve};border-radius:${$e}}:host(:enabled){cursor:pointer}:host(:hover){background:none;border-color:${mt}}:host(:active){border-color:${vt}}:host(:disabled),:host([readonly]){border:1px solid ${Ce};background-color:none;pointer:default}:host(${x}){background:${ft};border-color:${ft}}:host(${x}:hover){background:${Ht};border-color:${Ht}}:host(${x}:active){background:${Vt};border-color:${Vt}}:host(${x}:disabled){background:${it};border-color:${Ce}}.checked-indicator{height:14px;width:14px;border-radius:50%;margin-inline-start:0;background-color:${Q};transition-duration:${$i};transition-timing-function:${xi};transition-property:margin-inline-start}:host(${x}) .checked-indicator{background-color:${bt};margin-inline-start:calc(100% - 14px)}:host(${x}:hover) .checked-indicator{background:${Ll}}:host(${x}:active) .checked-indicator{background:${jl}}:host(:hover) .checked-indicator{background-color:${Ol}}:host(:active) .checked-indicator{background-color:${_l}}:host(:disabled) .checked-indicator,:host([readonly]) .checked-indicator{background:${S}}:host(${x}:disabled) .checked-indicator{background:${S}}:host(:focus-visible){outline:none}:host(:not([slot='input']):focus-visible){border-color:${Z};outline:${ue} solid ${Z};outline-offset:1px;box-shadow:${fi},0 0 0 2px ${ve}}`.withBehaviors(U(u`
|
|
529
529
|
:host{border-color:InactiveBorder}:host(${x}),:host(${x}:active),:host(${x}:hover){background:Highlight;border-color:Highlight}.checked-indicator,:host(:hover) .checked-indicator,:host(:active) .checked-indicator{background-color:ActiveCaption}:host(${x}) .checked-indicator,:host(${x}:hover) .checked-indicator,:host(${x}:active) .checked-indicator{background-color:ButtonFace}:host(:disabled) .checked-indicator,:host(${x}:disabled) .checked-indicator{background-color:GrayText}`)),zg=Cg.compose({name:`${p.prefix}-switch`,template:Ig,styles:Pg});zg.define(p.registry);class Tg extends ${}function Bg(){return b`<template slot="tabpanel" role="tabpanel"><slot></slot></template>`}const Og=Bg(),_g=u`
|
|
530
530
|
${k("block")}
|
|
531
531
|
|
|
@@ -539,17 +539,17 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
539
539
|
:host{--tabIndicatorScale:${this.activeTabScale.toString()}}`,this.$fastController.addStyles(this.styles)}activeidChanged(e,t){if(e&&this.tabs){const i=this.tabs.find(r=>r.id===e);i&&(this.previousActiveTabData=this.getTabPositionData(i))}super.activeidChanged(e,t),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}tabsChanged(){super.tabsChanged(),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}}Ur([a],No.prototype,"appearance",2),Ur([a({mode:"boolean"})],No.prototype,"disabled",2),Ur([a],No.prototype,"size",2),Xe(No,Ue);function Gg(o={}){return b` ${He(o)}<div class="tablist" part="tablist" role="tablist"><slot name="tab" ${G("tabs")}></slot></div>${tt(o)}<div class="tabpanel" part="tabpanel"><slot name="tabpanel" ${G("tabpanels")}></slot></div>`}const Ug=Gg({}),Xg=u`
|
|
540
540
|
${k("grid")}
|
|
541
541
|
|
|
542
|
-
:host{box-sizing:border-box;font-family:${v};font-size:${B};line-height:${A};color:${Ie};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}:host([disabled]){cursor:not-allowed;color:${S}}:host([disabled]) ::slotted(fluent-tab){pointer-events:none;cursor:not-allowed;color:${S}}:host([disabled]) ::slotted(fluent-tab:after){background-color:${S}}:host([disabled]) ::slotted(fluent-tab[aria-selected='true'])::after{background-color:${S}}:host([disabled]) ::slotted(fluent-tab:hover):before{content:unset}:host ::slotted(fluent-tab){border-radius:${C}}:host ::slotted(fluent-tab[aria-selected='true'])::before{background-color:${S}}.tablist{display:grid;grid-template-rows:auto auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end;box-sizing:border-box}::slotted([slot='start']),::slotted([slot='end']){display:flex;align-self:center}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host([orientation='vertical']){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host([orientation='vertical']) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;align-self:flex-start;width:100%}:host([orientation='vertical']) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host([orientation='vertical']) ::slotted([slot='end']){grid-row:3}:host([appearance='subtle']) ::slotted(fluent-tab:hover){background-color:${xo};color:${ur};fill:${sn}}:host([appearance='subtle']) ::slotted(fluent-tab:active){background-color:${gt};fill:${gt};color:${z}}:host([size='small']) ::slotted(fluent-tab){font-size:${B};line-height:${A};padding:${je} ${ee}}:host([size='large']) ::slotted(fluent-tab){font-size:${he};line-height:${ye};padding:${mi} ${ae}}:host ::slotted(fluent-tab[data-animate='true'])::after{transition-property:transform;transition-duration:${Rn};transition-timing-function:${Pr}}:host ::slotted(fluent-tab)::after{height:${se};margin-top:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted(fluent-tab)::after{width:${se};height:unset;margin-top:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted(fluent-tab)::before{height:${se};border-radius:${$e};content:'';inset:0;position:absolute;margin-top:auto}:host([orientation='vertical']) ::slotted(fluent-tab)::before{height:unset;width:${se};margin-inline-end:auto;transform-origin:top}:host ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:${se};margin-top:auto;transform-origin:left}:host([orientation='vertical']) ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:unset;margin-inline-end:auto;transform-origin:top;width:${se}}:host([orientation='vertical']) ::slotted(fluent-tab){align-items:flex-start;grid-column:2;padding-top:${je};padding-bottom:${je}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab){padding-top:${Rt};padding-bottom:${Rt}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab){padding-top:${V};padding-bottom:${V}}:host([size='small']) ::slotted(fluent-tab)::after,:host([size='small']) ::slotted(fluent-tab)::before,:host([size='small']) ::slotted(fluent-tab:hover)::after{right:${ee};left:${ee}}:host ::slotted(fluent-tab)::after,:host ::slotted(fluent-tab)::before,:host ::slotted(fluent-tab:hover)::after{right:${ae};left:${ae}}:host([size='large']) ::slotted(fluent-tab)::after,:host([size='large']) ::slotted(fluent-tab)::before,:host([size='large']) ::slotted(fluent-tab:hover)::after{right:${ae};left:${ae}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${je};bottom:${je}}:host([orientation='vertical']) ::slotted(fluent-tab)::after,:host([orientation='vertical']) ::slotted(fluent-tab)::before,:host([orientation='vertical']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${V};bottom:${V}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${Wt};bottom:${Wt}}`,Kg=No.compose({name:`${p.prefix}-tabs`,template:Ug,styles:Xg});Kg.define(p.registry);const Yg=o=>o.getAttribute("aria-disabled")==="true",Qg=o=>o.hasAttribute("hidden"),Vi=o=>!Yg(o)&&!Qg(o);function Zg(o,e="-tab"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}const Jg={subtle:"subtle",transparent:"transparent"},zt=ge;var ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,Fo=(o,e,t,i)=>{for(var r=i>1?void 0:i?tf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ef(e,t,r),r};class io extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.disabled=!1,this.orientation=zt.horizontal,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.tabPanelMap=new WeakMap,this.change=()=>{this.$emit("change",this.activetab)},this.handleTabClick=e=>{const t=e.currentTarget;t.nodeType===Node.ELEMENT_NODE&&Vi(t)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(t),this.setComponent())},this.handleTabKeyDown=e=>{const t=ei(this);switch(e.key){case uo:if(!this.isHorizontal())return;e.preventDefault(),this.adjust(t==="ltr"?-1:1);break;case po:if(!this.isHorizontal())return;e.preventDefault(),this.adjust(t==="ltr"?1:-1);break;case bo:if(this.isHorizontal())return;e.preventDefault(),this.adjust(-1);break;case ho:if(this.isHorizontal())return;e.preventDefault(),this.adjust(1);break;case mo:e.preventDefault(),this.adjust(-this.activeTabIndex);break;case go:e.preventDefault(),this.adjust(this.tabs.filter(i=>Vi(i)).length-this.activeTabIndex-1);break}}}disabledChanged(e,t){y(this.elementInternals,"disabled",t),this.$fastController.isConnected&&this.setTabs()}orientationChanged(e,t){this.elementInternals.ariaOrientation=t??zt.horizontal,wt(this.elementInternals,e,t,zt),this.$fastController.isConnected&&this.setTabs()}activeidChanged(e,t){if(this.$fastController.isConnected&&this.tabs.length>0){if(this.prevActiveTabIndex=this.tabs.findIndex(i=>i.id===e),this.setTabs(),e){const i=this.tabs[this.prevActiveTabIndex],r=this.tabPanelMap.get(i);r&&(r.hidden=!0)}if(t&&this.activetab){const i=this.tabPanelMap.get(this.activetab);i&&(i.hidden=!1)}e!==t&&this.change()}}slottedTabsChanged(e,t){this.tabs=t?.filter(i=>Zg(i))??[]}tabsChanged(){if(this.$fastController.isConnected&&this.tabs.length>0){this.tabIds=this.getTabIds(),this.setTabs();for(const e of this.tabs){const t=e.getAttribute("aria-controls")??"",r=this.getRootNode().getElementById(t);t&&r&&(r.role??(r.role="tabpanel"),r.hidden=this.activeid!==e.id,this.tabPanelMap.set(e,r))}}}getActiveIndex(){return this.activeid!==void 0?this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid):0}setTabs(){this.activeTabIndex=this.getActiveIndex();const e=this.tabs.some(t=>!!t.querySelector("[slot='start']"));this.tabs.forEach((t,i)=>{if(t.slot==="tab"){const r=this.activeTabIndex===i&&Vi(t),s=this.tabIds[i];console.log("disabled",this.disabled),t.disabled||(this.disabled?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")),t.setAttribute("id",s),t.setAttribute("aria-selected",r?"true":"false"),t.addEventListener("click",this.handleTabClick),t.addEventListener("keydown",this.handleTabKeyDown),t.setAttribute("tabindex",r&&!this.disabled?"0":"-1"),r&&(this.activetab=t,this.activeid=s),e&&this.orientation===zt.vertical&&t.setAttribute("data-hasIndent","")}})}getTabIds(){return this.tabs.map(e=>e.getAttribute("id")??`tab-${Ft()}`)}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab())}isHorizontal(){return this.orientation===zt.horizontal}adjust(e){const t=this.tabs.filter(n=>Vi(n)),i=t.indexOf(this.activetab),r=yl(0,t.length-1,i+e),s=this.tabs.indexOf(t[r]);s>-1&&this.activateTabByIndex(this.tabs,s)}activateTabByIndex(e,t){const i=e[t];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,i.focus(),this.setComponent()}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.activeTabIndex=this.getActiveIndex()}}Fo([a({mode:"boolean"})],io.prototype,"disabled",2),Fo([a],io.prototype,"orientation",2),Fo([a],io.prototype,"activeid",2),Fo([g],io.prototype,"slottedTabs",2),Fo([g],io.prototype,"tabs",2);var of=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,ka=(o,e,t,i)=>{for(var r=i>1?void 0:i?rf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&of(e,t,r),r};class Xr extends io{constructor(){super(...arguments),this.activeTabData={x:0,y:0,height:0,width:0},this.previousActiveTabData={x:0,y:0,height:0,width:0},this.activeTabOffset=0,this.activeTabScale=1,this.appearance=Jg.transparent}calculateAnimationProperties(e){this.activeTabOffset=this.getTabPosition(e),this.activeTabScale=this.getTabScale(e)}getTabPosition(e){return this.orientation===zt.horizontal?this.previousActiveTabData.x-(e.getBoundingClientRect().x-this.getBoundingClientRect().x):this.previousActiveTabData.y-(e.getBoundingClientRect().y-this.getBoundingClientRect().y)}getTabScale(e){return this.orientation===zt.horizontal?this.previousActiveTabData.width/e.getBoundingClientRect().width:this.previousActiveTabData.height/e.getBoundingClientRect().height}applyUpdatedCSSValues(e){this.calculateAnimationProperties(e),this.setAnimationVars()}animationLoop(e){e.setAttribute("data-animate","false"),this.applyUpdatedCSSValues(e),this.previousActiveTabData=this.activeTabData,this.applyUpdatedCSSValues(e),e.setAttribute("data-animate","true")}setTabData(){if(this.tabs&&this.tabs.length>0){const e=this.tabs,i=(this.activetab||e[0])?.getBoundingClientRect(),r=this.getBoundingClientRect();this.activeTabData={x:i.x-r.x,y:i.y-r.y,height:i.height,width:i.width},this.previousActiveTabData?.x!==this.activeTabData?.x&&this.previousActiveTabData?.y!==this.activeTabData?.y&&(this.previousActiveTabData=this.activeTabData)}}setAnimationVars(){this.style.setProperty("--tabIndicatorOffset",`${this.activeTabOffset}px`),this.style.setProperty("--tabIndicatorScale",`${this.activeTabScale}`)}activeidChanged(e,t){super.activeidChanged(e,t),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}tabsChanged(){super.tabsChanged(),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}}ka([a],Xr.prototype,"appearance",2),ka([a],Xr.prototype,"size",2);const sf=b`<template role="tablist"><slot name="tab" ${G("slottedTabs")}></slot></template>`,nf=u`
|
|
542
|
+
:host{box-sizing:border-box;font-family:${v};font-size:${B};line-height:${A};color:${Ie};grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr}:host([disabled]){cursor:not-allowed;color:${S}}:host([disabled]) ::slotted(fluent-tab){pointer-events:none;cursor:not-allowed;color:${S}}:host([disabled]) ::slotted(fluent-tab:after){background-color:${S}}:host([disabled]) ::slotted(fluent-tab[aria-selected='true'])::after{background-color:${S}}:host([disabled]) ::slotted(fluent-tab:hover):before{content:unset}:host ::slotted(fluent-tab){border-radius:${C}}:host ::slotted(fluent-tab[aria-selected='true'])::before{background-color:${S}}.tablist{display:grid;grid-template-rows:auto auto;grid-template-columns:auto;position:relative;width:max-content;align-self:end;box-sizing:border-box}::slotted([slot='start']),::slotted([slot='end']){display:flex;align-self:center}::slotted([slot='start']){margin-inline-end:11px}::slotted([slot='end']){margin-inline-start:11px}.tabpanel{grid-row:2;grid-column-start:1;grid-column-end:4;position:relative}:host([orientation='vertical']){grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr}:host([orientation='vertical']) .tablist{grid-row-start:2;grid-row-end:2;display:grid;grid-template-rows:auto;grid-template-columns:auto 1fr;position:relative;width:max-content;justify-self:end;align-self:flex-start;width:100%}:host([orientation='vertical']) .tabpanel{grid-column:2;grid-row-start:1;grid-row-end:4}:host([orientation='vertical']) ::slotted([slot='end']){grid-row:3}:host([appearance='subtle']) ::slotted(fluent-tab:hover){background-color:${xo};color:${ur};fill:${sn}}:host([appearance='subtle']) ::slotted(fluent-tab:active){background-color:${gt};fill:${gt};color:${z}}:host([size='small']) ::slotted(fluent-tab){font-size:${B};line-height:${A};padding:${je} ${J}}:host([size='large']) ::slotted(fluent-tab){font-size:${he};line-height:${ye};padding:${mi} ${ae}}:host ::slotted(fluent-tab[data-animate='true'])::after{transition-property:transform;transition-duration:${Rn};transition-timing-function:${Pr}}:host ::slotted(fluent-tab)::after{height:${se};margin-top:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted(fluent-tab)::after{width:${se};height:unset;margin-top:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted(fluent-tab)::before{height:${se};border-radius:${$e};content:'';inset:0;position:absolute;margin-top:auto}:host([orientation='vertical']) ::slotted(fluent-tab)::before{height:unset;width:${se};margin-inline-end:auto;transform-origin:top}:host ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:${se};margin-top:auto;transform-origin:left}:host([orientation='vertical']) ::slotted(fluent-tab[aria-selected='false']:hover)::after{height:unset;margin-inline-end:auto;transform-origin:top;width:${se}}:host([orientation='vertical']) ::slotted(fluent-tab){align-items:flex-start;grid-column:2;padding-top:${je};padding-bottom:${je}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab){padding-top:${Rt};padding-bottom:${Rt}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab){padding-top:${V};padding-bottom:${V}}:host([size='small']) ::slotted(fluent-tab)::after,:host([size='small']) ::slotted(fluent-tab)::before,:host([size='small']) ::slotted(fluent-tab:hover)::after{right:${J};left:${J}}:host ::slotted(fluent-tab)::after,:host ::slotted(fluent-tab)::before,:host ::slotted(fluent-tab:hover)::after{right:${ae};left:${ae}}:host([size='large']) ::slotted(fluent-tab)::after,:host([size='large']) ::slotted(fluent-tab)::before,:host([size='large']) ::slotted(fluent-tab:hover)::after{right:${ae};left:${ae}}:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='small']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${je};bottom:${je}}:host([orientation='vertical']) ::slotted(fluent-tab)::after,:host([orientation='vertical']) ::slotted(fluent-tab)::before,:host([orientation='vertical']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${V};bottom:${V}}:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::after,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab)::before,:host([orientation='vertical'][size='large']) ::slotted(fluent-tab:hover)::after{right:0;left:0;top:${Wt};bottom:${Wt}}`,Kg=No.compose({name:`${p.prefix}-tabs`,template:Ug,styles:Xg});Kg.define(p.registry);const Yg=o=>o.getAttribute("aria-disabled")==="true",Qg=o=>o.hasAttribute("hidden"),Vi=o=>!Yg(o)&&!Qg(o);function Zg(o,e="-tab"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}const Jg={subtle:"subtle",transparent:"transparent"},zt=ge;var ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,Fo=(o,e,t,i)=>{for(var r=i>1?void 0:i?tf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ef(e,t,r),r};class io extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.disabled=!1,this.orientation=zt.horizontal,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.tabPanelMap=new WeakMap,this.change=()=>{this.$emit("change",this.activetab)},this.handleTabClick=e=>{const t=e.currentTarget;t.nodeType===Node.ELEMENT_NODE&&Vi(t)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(t),this.setComponent())},this.handleTabKeyDown=e=>{const t=ei(this);switch(e.key){case uo:if(!this.isHorizontal())return;e.preventDefault(),this.adjust(t==="ltr"?-1:1);break;case po:if(!this.isHorizontal())return;e.preventDefault(),this.adjust(t==="ltr"?1:-1);break;case bo:if(this.isHorizontal())return;e.preventDefault(),this.adjust(-1);break;case ho:if(this.isHorizontal())return;e.preventDefault(),this.adjust(1);break;case mo:e.preventDefault(),this.adjust(-this.activeTabIndex);break;case go:e.preventDefault(),this.adjust(this.tabs.filter(i=>Vi(i)).length-this.activeTabIndex-1);break}}}disabledChanged(e,t){y(this.elementInternals,"disabled",t),this.$fastController.isConnected&&this.setTabs()}orientationChanged(e,t){this.elementInternals.ariaOrientation=t??zt.horizontal,wt(this.elementInternals,e,t,zt),this.$fastController.isConnected&&this.setTabs()}activeidChanged(e,t){if(this.$fastController.isConnected&&this.tabs.length>0){if(this.prevActiveTabIndex=this.tabs.findIndex(i=>i.id===e),this.setTabs(),e){const i=this.tabs[this.prevActiveTabIndex],r=this.tabPanelMap.get(i);r&&(r.hidden=!0)}if(t&&this.activetab){const i=this.tabPanelMap.get(this.activetab);i&&(i.hidden=!1)}e!==t&&this.change()}}slottedTabsChanged(e,t){this.tabs=t?.filter(i=>Zg(i))??[]}tabsChanged(){if(this.$fastController.isConnected&&this.tabs.length>0){this.tabIds=this.getTabIds(),this.setTabs();for(const e of this.tabs){const t=e.getAttribute("aria-controls")??"",r=this.getRootNode().getElementById(t);t&&r&&(r.role??(r.role="tabpanel"),r.hidden=this.activeid!==e.id,this.tabPanelMap.set(e,r))}}}getActiveIndex(){return this.activeid!==void 0?this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid):0}setTabs(){this.activeTabIndex=this.getActiveIndex();const e=this.tabs.some(t=>!!t.querySelector("[slot='start']"));this.tabs.forEach((t,i)=>{if(t.slot==="tab"){const r=this.activeTabIndex===i&&Vi(t),s=this.tabIds[i];console.log("disabled",this.disabled),t.disabled||(this.disabled?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")),t.setAttribute("id",s),t.setAttribute("aria-selected",r?"true":"false"),t.addEventListener("click",this.handleTabClick),t.addEventListener("keydown",this.handleTabKeyDown),t.setAttribute("tabindex",r&&!this.disabled?"0":"-1"),r&&(this.activetab=t,this.activeid=s),e&&this.orientation===zt.vertical&&t.setAttribute("data-hasIndent","")}})}getTabIds(){return this.tabs.map(e=>e.getAttribute("id")??`tab-${Ft()}`)}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab())}isHorizontal(){return this.orientation===zt.horizontal}adjust(e){const t=this.tabs.filter(n=>Vi(n)),i=t.indexOf(this.activetab),r=yl(0,t.length-1,i+e),s=this.tabs.indexOf(t[r]);s>-1&&this.activateTabByIndex(this.tabs,s)}activateTabByIndex(e,t){const i=e[t];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,i.focus(),this.setComponent()}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.activeTabIndex=this.getActiveIndex()}}Fo([a({mode:"boolean"})],io.prototype,"disabled",2),Fo([a],io.prototype,"orientation",2),Fo([a],io.prototype,"activeid",2),Fo([g],io.prototype,"slottedTabs",2),Fo([g],io.prototype,"tabs",2);var of=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,ka=(o,e,t,i)=>{for(var r=i>1?void 0:i?rf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&of(e,t,r),r};class Xr extends io{constructor(){super(...arguments),this.activeTabData={x:0,y:0,height:0,width:0},this.previousActiveTabData={x:0,y:0,height:0,width:0},this.activeTabOffset=0,this.activeTabScale=1,this.appearance=Jg.transparent}calculateAnimationProperties(e){this.activeTabOffset=this.getTabPosition(e),this.activeTabScale=this.getTabScale(e)}getTabPosition(e){return this.orientation===zt.horizontal?this.previousActiveTabData.x-(e.getBoundingClientRect().x-this.getBoundingClientRect().x):this.previousActiveTabData.y-(e.getBoundingClientRect().y-this.getBoundingClientRect().y)}getTabScale(e){return this.orientation===zt.horizontal?this.previousActiveTabData.width/e.getBoundingClientRect().width:this.previousActiveTabData.height/e.getBoundingClientRect().height}applyUpdatedCSSValues(e){this.calculateAnimationProperties(e),this.setAnimationVars()}animationLoop(e){e.setAttribute("data-animate","false"),this.applyUpdatedCSSValues(e),this.previousActiveTabData=this.activeTabData,this.applyUpdatedCSSValues(e),e.setAttribute("data-animate","true")}setTabData(){if(this.tabs&&this.tabs.length>0){const e=this.tabs,i=(this.activetab||e[0])?.getBoundingClientRect(),r=this.getBoundingClientRect();this.activeTabData={x:i.x-r.x,y:i.y-r.y,height:i.height,width:i.width},this.previousActiveTabData?.x!==this.activeTabData?.x&&this.previousActiveTabData?.y!==this.activeTabData?.y&&(this.previousActiveTabData=this.activeTabData)}}setAnimationVars(){this.style.setProperty("--tabIndicatorOffset",`${this.activeTabOffset}px`),this.style.setProperty("--tabIndicatorScale",`${this.activeTabScale}`)}activeidChanged(e,t){super.activeidChanged(e,t),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}tabsChanged(){super.tabsChanged(),this.setTabData(),this.activetab&&this.animationLoop(this.activetab)}}ka([a],Xr.prototype,"appearance",2),ka([a],Xr.prototype,"size",2);const sf=b`<template role="tablist"><slot name="tab" ${G("slottedTabs")}></slot></template>`,nf=u`
|
|
543
543
|
${k("flex")}
|
|
544
544
|
|
|
545
|
-
:host{--tabPaddingInline:inherit;--tabPaddingBlock:inherit;--tabIndicatorInsetInline:0;--tabIndicatorInsetBlock:0;box-sizing:border-box;color:${Ie};flex-direction:row}:host([orientation='vertical']){flex-direction:column}:host([orientation='vertical']) ::slotted([role='tab']){justify-content:flex-start}:host ::slotted([slot='tab'][data-animate='true'])::after{transition-property:transform;transition-duration:${Rn};transition-timing-function:${Pr}}:host ::slotted([slot='tab'])::after{height:${se};margin-block-start:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted([slot='tab'])::after{width:${se};height:unset;margin-block-start:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted([slot='tab'])::before{height:${se};border-radius:${$e};content:'';inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock);position:absolute;margin-top:auto}:host ::slotted([slot='tab'])::before{inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock)}:host ::slotted([slot='tab'][aria-selected='true'])::before{background-color:${S}}:host ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:${se};margin-block-start:auto;transform-origin:left}:host([orientation='vertical']) ::slotted([slot='tab'])::before,:host([orientation='vertical']) ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:unset;width:${se};margin-inline-end:auto;transform-origin:top}:host(:where([size='small'],[size='large'])) ::slotted([slot='tab']){padding-inline:var(--tabPaddingInline);padding-block:var(--tabPaddingBlock)}:host([size='small']) ::slotted([slot='tab']){--tabPaddingBlock:${je};--tabPaddingInline:${ee};font-size:${B};line-height:${A}}:host([size='large']) ::slotted([slot='tab']){--tabPaddingBlock:${mi};--tabPaddingInline:${ae};font-size:${he};line-height:${ye}}:host ::slotted([slot='tab'])::after,:host ::slotted([slot='tab'])::before,:host ::slotted([slot='tab']:hover)::after{inset-inline:var(--tabIndicatorInsetInline)}:host ::slotted([slot='tab']){--tabIndicatorInsetInline:${ae}}:host([size='small']) ::slotted([slot='tab']){--tabIndicatorInsetInline:${ee}}:host([size='large']) ::slotted([slot='tab']){--tabIndicatorInsetInline:${ae}}:host([orientation='vertical']) ::slotted([slot='tab']){padding-block:var(--tabPaddingBlock)}:host([orientation='vertical']) ::slotted([slot='tab']){--tabPaddingBlock:${V}}:host([orientation='vertical'][size='small']) ::slotted([slot='tab']){--tabPaddingBlock:${Rt}}:host([orientation='vertical'][size='large']) ::slotted([slot='tab']){--tabPaddingBlock:${V}}:host([orientation='vertical']) ::slotted([slot='tab'])::after,:host([orientation='vertical']) ::slotted([slot='tab'])::before,:host([orientation='vertical']) ::slotted([slot='tab']:hover)::after{inset-inline:0;inset-block:var(--tabIndicatorInsetBlock)}:host([orientation='vertical']){--tabIndicatorInsetBlock:${V}}:host([orientation='vertical'][size='small']){--tabIndicatorInsetBlock:${je}}:host([orientation='vertical'][size='large']){--tabIndicatorInsetBlock:${Wt}}:host([disabled]){cursor:not-allowed;color:${S}}:host([disabled]) ::slotted([slot='tab']){pointer-events:none;cursor:not-allowed;color:${S}}:host([disabled]) ::slotted([slot='tab']:after){background-color:${S}}:host([disabled]) ::slotted([slot='tab'][aria-selected='true'])::after{background-color:${S}}:host([disabled]) ::slotted([slot='tab']:hover):before{content:unset}:host([appearance='subtle']) ::slotted([slot='tab']:hover){background-color:${xo};color:${ur};fill:${sn}}:host([appearance='subtle']) ::slotted([slot='tab']:active){background-color:${gt};fill:${gt};color:${z}}`,af=Xr.compose({name:`${p.prefix}-tablist`,template:sf,styles:nf});af.define(p.registry);const lf={outline:"outline",filledLighter:"filled-lighter",filledDarker:"filled-darker"},Li={none:"none",both:"both",horizontal:"horizontal",vertical:"vertical"};var cf=Object.defineProperty,df=Object.getOwnPropertyDescriptor,de=(o,e,t,i)=>{for(var r=i>1?void 0:i?df(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&cf(e,t,r),r};class K extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.filteredLabelSlottedNodes=[],this.labelSlottedNodes=[],this.userInteracted=!1,this.preConnectControlEl=document.createElement("textarea"),this.autoResize=!1,this.disabled=!1,this.displayShadow=!1,this.readOnly=!1,this.required=!1,this.resize=Li.none,this.spellcheck=!1}defaultSlottedNodesChanged(){const e=this.getContent();this.defaultValue=e,this.value=e}labelSlottedNodesChanged(){this.filteredLabelSlottedNodes=this.labelSlottedNodes.filter(on),this.labelEl&&(this.labelEl.hidden=!this.filteredLabelSlottedNodes.length),this.filteredLabelSlottedNodes.forEach(e=>{e.disabled=this.disabled,e.required=this.required})}autoResizeChanged(){this.maybeCreateAutoSizerEl(),y(this.elementInternals,"auto-resize",this.autoResize)}disabledChanged(){this.setDisabledSideEffect(this.disabled)}get form(){return this.elementInternals.form}get labels(){return this.elementInternals.labels}readOnlyChanged(){this.elementInternals.ariaReadOnly=`${!!this.readOnly}`}requiredChanged(){this.elementInternals.ariaRequired=`${!!this.required}`,this.filteredLabelSlottedNodes?.length&&this.filteredLabelSlottedNodes.forEach(e=>e.required=this.required)}resizeChanged(e,t){wt(this.elementInternals,e,t,Li,"resize-"),y(this.elementInternals,"resize",Xn(Li,t)&&t!==Li.none)}get textLength(){return this.controlEl.textLength}get type(){return"textarea"}get validity(){return this.elementInternals.validity}get validationMessage(){return this.elementInternals.validationMessage||this.controlEl.validationMessage}get willValidate(){return this.elementInternals.willValidate}get defaultValue(){return this.controlEl?.defaultValue??this.preConnectControlEl.defaultValue}set defaultValue(e){const t=this.controlEl??this.preConnectControlEl;t.defaultValue=e,this.controlEl&&!this.userInteracted&&(this.controlEl.value=e)}get value(){return this.controlEl?.value??this.preConnectControlEl.value}set value(e){const t=this.controlEl??this.preConnectControlEl;t.value=e,this.setFormValue(e),this.setValidity()}connectedCallback(){super.connectedCallback(),this.setDefaultValue(),this.maybeCreateAutoSizerEl(),this.bindEvents(),this.observeControlElAttrs()}disconnectedCallback(){super.disconnectedCallback(),this.autoSizerObserver?.disconnect(),this.controlElAttrObserver?.disconnect()}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(e){this.setDisabledSideEffect(e),this.setValidity()}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}checkValidity(){return this.elementInternals.checkValidity()}reportValidity(){return this.elementInternals.reportValidity()}setCustomValidity(e){this.elementInternals.setValidity({customError:!!e},e?e.toString():void 0),this.reportValidity()}setValidity(e,t,i){this.$fastController.isConnected&&(this.disabled||this.readOnly?this.elementInternals.setValidity({}):this.elementInternals.setValidity(e??this.controlEl.validity,t??this.controlEl.validationMessage,i??this.controlEl),this.userInteracted&&this.toggleUserValidityState())}select(){this.controlEl.select()}setDefaultValue(){this.defaultValue=this.innerHTML.trim()||this.preConnectControlEl.defaultValue||"",this.value=this.preConnectControlEl.value||this.defaultValue,this.setFormValue(this.value),this.setValidity(),this.preConnectControlEl=null}bindEvents(){this.controlEl.addEventListener("input",()=>this.userInteracted=!0,{once:!0})}getContent(){return this.defaultSlottedNodes.map(e=>{switch(e.nodeType){case Node.ELEMENT_NODE:return e.outerHTML;case Node.TEXT_NODE:return e.textContent.trim();default:return""}}).join("")||""}observeControlElAttrs(){this.controlElAttrObserver=new MutationObserver(()=>{this.setValidity()}),this.controlElAttrObserver.observe(this.controlEl,{attributes:!0,attributeFilter:["disabled","required","readonly","maxlength","minlength"]})}setDisabledSideEffect(e){this.elementInternals.ariaDisabled=`${e}`,this.controlEl&&(this.controlEl.disabled=e),this.filteredLabelSlottedNodes?.length&&this.filteredLabelSlottedNodes.forEach(t=>t.disabled=this.disabled)}toggleUserValidityState(){y(this.elementInternals,"user-invalid",!this.validity.valid),y(this.elementInternals,"user-valid",this.validity.valid)}maybeCreateAutoSizerEl(){if(!CSS.supports("field-sizing: content")){if(!this.autoResize){this.autoSizerEl?.remove(),this.autoSizerObserver?.disconnect();return}this.autoSizerEl||(this.autoSizerEl=document.createElement("div"),this.autoSizerEl.classList.add("auto-sizer"),this.autoSizerEl.ariaHidden="true"),this.shadowRoot.prepend(this.autoSizerEl),this.autoSizerObserver||(this.autoSizerObserver=new ResizeObserver((e,t)=>{const i=window.getComputedStyle(this).writingMode.startsWith("horizontal")?"height":"width";this.style.getPropertyValue(i)!==""&&(this.autoSizerEl?.remove(),t.disconnect())})),this.autoSizerObserver.observe(this)}}handleControlInput(){this.autoResize&&this.autoSizerEl&&(this.autoSizerEl.textContent=this.value+" "),this.setFormValue(this.value),this.setValidity()}handleControlChange(){this.toggleUserValidityState(),this.$emit("change")}handleControlSelect(){this.$emit("select")}}K.formAssociated=!0,de([g],K.prototype,"defaultSlottedNodes",2),de([g],K.prototype,"labelSlottedNodes",2),de([a],K.prototype,"autocomplete",2),de([a({attribute:"auto-resize",mode:"boolean"})],K.prototype,"autoResize",2),de([a({attribute:"dirname"})],K.prototype,"dirName",2),de([a({mode:"boolean"})],K.prototype,"disabled",2),de([a({attribute:"display-shadow",mode:"boolean"})],K.prototype,"displayShadow",2),de([a({attribute:"form"})],K.prototype,"initialForm",2),de([a({attribute:"maxlength",converter:re})],K.prototype,"maxLength",2),de([a({attribute:"minlength",converter:re})],K.prototype,"minLength",2),de([a],K.prototype,"name",2),de([a],K.prototype,"placeholder",2),de([a({attribute:"readonly",mode:"boolean"})],K.prototype,"readOnly",2),de([a({mode:"boolean"})],K.prototype,"required",2),de([a({mode:"fromView"})],K.prototype,"resize",2),de([a({mode:"boolean"})],K.prototype,"spellcheck",2);var hf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,Kr=(o,e,t,i)=>{for(var r=i>1?void 0:i?uf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&hf(e,t,r),r};class ji extends K{constructor(){super(...arguments),this.appearance=lf.outline,this.block=!1}labelSlottedNodesChanged(){super.labelSlottedNodesChanged(),this.labelSlottedNodes.forEach(e=>{e.size=this.size})}handleChange(e,t){switch(t){case"size":this.labelSlottedNodes.forEach(i=>{i.size=this.size});break}}connectedCallback(){super.connectedCallback(),m.getNotifier(this).subscribe(this,"size")}disconnectedCallback(){super.disconnectedCallback(),m.getNotifier(this).unsubscribe(this,"size")}}Kr([a({mode:"fromView"})],ji.prototype,"appearance",2),Kr([a({mode:"boolean"})],ji.prototype,"block",2),Kr([a],ji.prototype,"size",2);const pf=u`
|
|
545
|
+
:host{--tabPaddingInline:inherit;--tabPaddingBlock:inherit;--tabIndicatorInsetInline:0;--tabIndicatorInsetBlock:0;box-sizing:border-box;color:${Ie};flex-direction:row}:host([orientation='vertical']){flex-direction:column}:host([orientation='vertical']) ::slotted([role='tab']){justify-content:flex-start}:host ::slotted([slot='tab'][data-animate='true'])::after{transition-property:transform;transition-duration:${Rn};transition-timing-function:${Pr}}:host ::slotted([slot='tab'])::after{height:${se};margin-block-start:auto;transform-origin:left;transform:translateX(var(--tabIndicatorOffset)) scaleX(var(--tabIndicatorScale))}:host([orientation='vertical']) ::slotted([slot='tab'])::after{width:${se};height:unset;margin-block-start:unset;transform-origin:top;transform:translateY(var(--tabIndicatorOffset)) scaleY(var(--tabIndicatorScale))}:host ::slotted([slot='tab'])::before{height:${se};border-radius:${$e};content:'';inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock);position:absolute;margin-top:auto}:host ::slotted([slot='tab'])::before{inset-inline:var(--tabIndicatorInsetInline);inset-block:var(--tabIndicatorInsetBlock)}:host ::slotted([slot='tab'][aria-selected='true'])::before{background-color:${S}}:host ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:${se};margin-block-start:auto;transform-origin:left}:host([orientation='vertical']) ::slotted([slot='tab'])::before,:host([orientation='vertical']) ::slotted([slot='tab'][aria-selected='false']:hover)::after{height:unset;width:${se};margin-inline-end:auto;transform-origin:top}:host(:where([size='small'],[size='large'])) ::slotted([slot='tab']){padding-inline:var(--tabPaddingInline);padding-block:var(--tabPaddingBlock)}:host([size='small']) ::slotted([slot='tab']){--tabPaddingBlock:${je};--tabPaddingInline:${J};font-size:${B};line-height:${A}}:host([size='large']) ::slotted([slot='tab']){--tabPaddingBlock:${mi};--tabPaddingInline:${ae};font-size:${he};line-height:${ye}}:host ::slotted([slot='tab'])::after,:host ::slotted([slot='tab'])::before,:host ::slotted([slot='tab']:hover)::after{inset-inline:var(--tabIndicatorInsetInline)}:host ::slotted([slot='tab']){--tabIndicatorInsetInline:${ae}}:host([size='small']) ::slotted([slot='tab']){--tabIndicatorInsetInline:${J}}:host([size='large']) ::slotted([slot='tab']){--tabIndicatorInsetInline:${ae}}:host([orientation='vertical']) ::slotted([slot='tab']){padding-block:var(--tabPaddingBlock)}:host([orientation='vertical']) ::slotted([slot='tab']){--tabPaddingBlock:${V}}:host([orientation='vertical'][size='small']) ::slotted([slot='tab']){--tabPaddingBlock:${Rt}}:host([orientation='vertical'][size='large']) ::slotted([slot='tab']){--tabPaddingBlock:${V}}:host([orientation='vertical']) ::slotted([slot='tab'])::after,:host([orientation='vertical']) ::slotted([slot='tab'])::before,:host([orientation='vertical']) ::slotted([slot='tab']:hover)::after{inset-inline:0;inset-block:var(--tabIndicatorInsetBlock)}:host([orientation='vertical']){--tabIndicatorInsetBlock:${V}}:host([orientation='vertical'][size='small']){--tabIndicatorInsetBlock:${je}}:host([orientation='vertical'][size='large']){--tabIndicatorInsetBlock:${Wt}}:host([disabled]){cursor:not-allowed;color:${S}}:host([disabled]) ::slotted([slot='tab']){pointer-events:none;cursor:not-allowed;color:${S}}:host([disabled]) ::slotted([slot='tab']:after){background-color:${S}}:host([disabled]) ::slotted([slot='tab'][aria-selected='true'])::after{background-color:${S}}:host([disabled]) ::slotted([slot='tab']:hover):before{content:unset}:host([appearance='subtle']) ::slotted([slot='tab']:hover){background-color:${xo};color:${ur};fill:${sn}}:host([appearance='subtle']) ::slotted([slot='tab']:active){background-color:${gt};fill:${gt};color:${z}}`,af=Xr.compose({name:`${p.prefix}-tablist`,template:sf,styles:nf});af.define(p.registry);const lf={outline:"outline",filledLighter:"filled-lighter",filledDarker:"filled-darker"},Li={none:"none",both:"both",horizontal:"horizontal",vertical:"vertical"};var cf=Object.defineProperty,df=Object.getOwnPropertyDescriptor,de=(o,e,t,i)=>{for(var r=i>1?void 0:i?df(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&cf(e,t,r),r};class K extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.filteredLabelSlottedNodes=[],this.labelSlottedNodes=[],this.userInteracted=!1,this.preConnectControlEl=document.createElement("textarea"),this.autoResize=!1,this.disabled=!1,this.displayShadow=!1,this.readOnly=!1,this.required=!1,this.resize=Li.none,this.spellcheck=!1}defaultSlottedNodesChanged(){const e=this.getContent();this.defaultValue=e,this.value=e}labelSlottedNodesChanged(){this.filteredLabelSlottedNodes=this.labelSlottedNodes.filter(on),this.labelEl&&(this.labelEl.hidden=!this.filteredLabelSlottedNodes.length),this.filteredLabelSlottedNodes.forEach(e=>{e.disabled=this.disabled,e.required=this.required})}autoResizeChanged(){this.maybeCreateAutoSizerEl(),y(this.elementInternals,"auto-resize",this.autoResize)}disabledChanged(){this.setDisabledSideEffect(this.disabled)}get form(){return this.elementInternals.form}get labels(){return this.elementInternals.labels}readOnlyChanged(){this.elementInternals.ariaReadOnly=`${!!this.readOnly}`}requiredChanged(){this.elementInternals.ariaRequired=`${!!this.required}`,this.filteredLabelSlottedNodes?.length&&this.filteredLabelSlottedNodes.forEach(e=>e.required=this.required)}resizeChanged(e,t){wt(this.elementInternals,e,t,Li,"resize-"),y(this.elementInternals,"resize",Xn(Li,t)&&t!==Li.none)}get textLength(){return this.controlEl.textLength}get type(){return"textarea"}get validity(){return this.elementInternals.validity}get validationMessage(){return this.elementInternals.validationMessage||this.controlEl.validationMessage}get willValidate(){return this.elementInternals.willValidate}get defaultValue(){return this.controlEl?.defaultValue??this.preConnectControlEl.defaultValue}set defaultValue(e){const t=this.controlEl??this.preConnectControlEl;t.defaultValue=e,this.controlEl&&!this.userInteracted&&(this.controlEl.value=e)}get value(){return this.controlEl?.value??this.preConnectControlEl.value}set value(e){const t=this.controlEl??this.preConnectControlEl;t.value=e,this.setFormValue(e),this.setValidity()}connectedCallback(){super.connectedCallback(),this.setDefaultValue(),this.maybeCreateAutoSizerEl(),this.bindEvents(),this.observeControlElAttrs()}disconnectedCallback(){super.disconnectedCallback(),this.autoSizerObserver?.disconnect(),this.controlElAttrObserver?.disconnect()}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(e){this.setDisabledSideEffect(e),this.setValidity()}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}checkValidity(){return this.elementInternals.checkValidity()}reportValidity(){return this.elementInternals.reportValidity()}setCustomValidity(e){this.elementInternals.setValidity({customError:!!e},e?e.toString():void 0),this.reportValidity()}setValidity(e,t,i){this.$fastController.isConnected&&(this.disabled||this.readOnly?this.elementInternals.setValidity({}):this.elementInternals.setValidity(e??this.controlEl.validity,t??this.controlEl.validationMessage,i??this.controlEl),this.userInteracted&&this.toggleUserValidityState())}select(){this.controlEl.select()}setDefaultValue(){this.defaultValue=this.innerHTML.trim()||this.preConnectControlEl.defaultValue||"",this.value=this.preConnectControlEl.value||this.defaultValue,this.setFormValue(this.value),this.setValidity(),this.preConnectControlEl=null}bindEvents(){this.controlEl.addEventListener("input",()=>this.userInteracted=!0,{once:!0})}getContent(){return this.defaultSlottedNodes.map(e=>{switch(e.nodeType){case Node.ELEMENT_NODE:return e.outerHTML;case Node.TEXT_NODE:return e.textContent.trim();default:return""}}).join("")||""}observeControlElAttrs(){this.controlElAttrObserver=new MutationObserver(()=>{this.setValidity()}),this.controlElAttrObserver.observe(this.controlEl,{attributes:!0,attributeFilter:["disabled","required","readonly","maxlength","minlength"]})}setDisabledSideEffect(e){this.elementInternals.ariaDisabled=`${e}`,this.controlEl&&(this.controlEl.disabled=e),this.filteredLabelSlottedNodes?.length&&this.filteredLabelSlottedNodes.forEach(t=>t.disabled=this.disabled)}toggleUserValidityState(){y(this.elementInternals,"user-invalid",!this.validity.valid),y(this.elementInternals,"user-valid",this.validity.valid)}maybeCreateAutoSizerEl(){if(!CSS.supports("field-sizing: content")){if(!this.autoResize){this.autoSizerEl?.remove(),this.autoSizerObserver?.disconnect();return}this.autoSizerEl||(this.autoSizerEl=document.createElement("div"),this.autoSizerEl.classList.add("auto-sizer"),this.autoSizerEl.ariaHidden="true"),this.shadowRoot.prepend(this.autoSizerEl),this.autoSizerObserver||(this.autoSizerObserver=new ResizeObserver((e,t)=>{const i=window.getComputedStyle(this).writingMode.startsWith("horizontal")?"height":"width";this.style.getPropertyValue(i)!==""&&(this.autoSizerEl?.remove(),t.disconnect())})),this.autoSizerObserver.observe(this)}}handleControlInput(){this.autoResize&&this.autoSizerEl&&(this.autoSizerEl.textContent=this.value+" "),this.setFormValue(this.value),this.setValidity()}handleControlChange(){this.toggleUserValidityState(),this.$emit("change")}handleControlSelect(){this.$emit("select")}}K.formAssociated=!0,de([g],K.prototype,"defaultSlottedNodes",2),de([g],K.prototype,"labelSlottedNodes",2),de([a],K.prototype,"autocomplete",2),de([a({attribute:"auto-resize",mode:"boolean"})],K.prototype,"autoResize",2),de([a({attribute:"dirname"})],K.prototype,"dirName",2),de([a({mode:"boolean"})],K.prototype,"disabled",2),de([a({attribute:"display-shadow",mode:"boolean"})],K.prototype,"displayShadow",2),de([a({attribute:"form"})],K.prototype,"initialForm",2),de([a({attribute:"maxlength",converter:re})],K.prototype,"maxLength",2),de([a({attribute:"minlength",converter:re})],K.prototype,"minLength",2),de([a],K.prototype,"name",2),de([a],K.prototype,"placeholder",2),de([a({attribute:"readonly",mode:"boolean"})],K.prototype,"readOnly",2),de([a({mode:"boolean"})],K.prototype,"required",2),de([a({mode:"fromView"})],K.prototype,"resize",2),de([a({mode:"boolean"})],K.prototype,"spellcheck",2);var hf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,Kr=(o,e,t,i)=>{for(var r=i>1?void 0:i?uf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&hf(e,t,r),r};class ji extends K{constructor(){super(...arguments),this.appearance=lf.outline,this.block=!1}labelSlottedNodesChanged(){super.labelSlottedNodesChanged(),this.labelSlottedNodes.forEach(e=>{e.size=this.size})}handleChange(e,t){switch(t){case"size":this.labelSlottedNodes.forEach(i=>{i.size=this.size});break}}connectedCallback(){super.connectedCallback(),m.getNotifier(this).subscribe(this,"size")}disconnectedCallback(){super.disconnectedCallback(),m.getNotifier(this).unsubscribe(this,"size")}}Kr([a({mode:"fromView"})],ji.prototype,"appearance",2),Kr([a({mode:"boolean"})],ji.prototype,"block",2),Kr([a],ji.prototype,"size",2);const pf=u`
|
|
546
546
|
${k("inline-block")}
|
|
547
547
|
|
|
548
|
-
:host{--font-size:${B};--line-height:${A};--padding-inline:${ae};--padding-block:${je};--min-block-size:52px;--block-size:var(--min-block-size);--inline-size:18rem;--border-width:${T};--control-padding-inline:${H};--color:${z};--background-color:${I};--border-color:${Le};--border-block-end-color:${Ve};--placeholder-color:${pr};--focus-indicator-color:${$t};--box-shadow:none;--contain-size:size;--resize:none;color:var(--color);font-family:${v};font-size:var(--font-size);font-weight:${_};line-height:var(--line-height);position:relative}:host(:hover){--border-color:${Lt};--border-block-end-color:${mt}}:host(:active){--border-color:${ko};--border-block-end-color:${vt}}:host(:focus-within){outline:none}:host([block]:not([hidden])){display:block}:host([size='small']){--font-size:${F};--line-height:${q};--min-block-size:40px;--padding-block:${qt};--padding-inline:${
|
|
548
|
+
:host{--font-size:${B};--line-height:${A};--padding-inline:${ae};--padding-block:${je};--min-block-size:52px;--block-size:var(--min-block-size);--inline-size:18rem;--border-width:${T};--control-padding-inline:${H};--color:${z};--background-color:${I};--border-color:${Le};--border-block-end-color:${Ve};--placeholder-color:${pr};--focus-indicator-color:${$t};--box-shadow:none;--contain-size:size;--resize:none;color:var(--color);font-family:${v};font-size:var(--font-size);font-weight:${_};line-height:var(--line-height);position:relative}:host(:hover){--border-color:${Lt};--border-block-end-color:${mt}}:host(:active){--border-color:${ko};--border-block-end-color:${vt}}:host(:focus-within){outline:none}:host([block]:not([hidden])){display:block}:host([size='small']){--font-size:${F};--line-height:${q};--min-block-size:40px;--padding-block:${qt};--padding-inline:${J};--control-padding-inline:${H}}:host([size='large']){--font-size:${he};--line-height:${ye};--min-block-size:64px;--padding-block:${V};--padding-inline:${le};--control-padding-inline:${J}}:host([resize='both']:not(:disabled)){--resize:both}:host([resize='horizontal']:not(:disabled)){--resize:horizontal}:host([resize='vertical']:not(:disabled)){--resize:vertical}:host([auto-resize]){--block-size:auto;--contain-size:inline-size}:host([appearance='filled-darker']){--background-color:${$o};--border-color:var(--background-color);--border-block-end-color:var(--border-color)}:host([appearance='filled-lighter']){--border-color:var(--background-color);--border-block-end-color:var(--border-color)}:host([appearance='filled-darker'][display-shadow]),:host([appearance='filled-lighter'][display-shadow]){--box-shadow:${yr}}:host(${ru}){--border-color:${mr};--border-block-end-color:${mr}}:host(:disabled){--color:${S};--background-color:${me};--border-color:${Ce};--border-block-end-color:var(--border-color);--box-shadow:none;--placeholder-color:${S};cursor:no-drop;user-select:none}.root{background-color:var(--background-color);border:var(--border-width) solid var(--border-color);border-block-end-color:var(--border-block-end-color);border-radius:${C};box-sizing:border-box;box-shadow:var(--box-shadow);contain:paint layout style var(--contain-size);display:grid;grid-template:1fr / 1fr;inline-size:var(--inline-size);min-block-size:var(--min-block-size);block-size:var(--block-size);overflow:hidden;padding:var(--padding-block) var(--padding-inline);position:relative;resize:var(--resize)}:host([block]) .root{inline-size:auto}.root::after{border-bottom:2px solid var(--focus-indicator-color);border-radius:0 0 ${C} ${C};box-sizing:border-box;clip-path:inset(calc(100% - 2px) 1px 0px);content:'';height:max(2px,${C});inset:auto -1px 0;position:absolute;transform:scaleX(0);transition-delay:${xt};transition-duration:${Sr};transition-property:transform}:host(:focus-within) .root::after{transform:scaleX(1);transition-property:transform;transition-duration:${$i};transition-delay:${kt}}:host([readonly]) .root::after,:host(:disabled) .root::after{content:none}label{color:var(--color);display:flex;inline-size:fit-content;padding-block-end:${qt};padding-inline-end:${ne}}:host(:empty) label,label[hidden]{display:none}.auto-sizer,.control{box-sizing:border-box;font:inherit;grid-column:1 / -1;grid-row:1 / -1;letter-space:inherit;padding:0 var(--control-padding-inline)}.auto-sizer{display:none;padding-block-end:2px;pointer-events:none;visibility:hidden;white-space:pre-wrap}:host([auto-resize]) .auto-sizer{display:block}.control{appearance:none;background-color:transparent;border:0;color:inherit;field-sizing:content;max-block-size:100%;outline:0;resize:none;text-align:inherit}.control:disabled{cursor:inherit}.control::placeholder{color:var(--placeholder-color)}::selection{color:${bt};background-color:${ln}}`.withBehaviors(U(u`
|
|
549
549
|
:host{--border-color:FieldText;--border-block-end-color:FieldText;--focus-indicator-color:Highlight;--placeholder-color:FieldText}:host(:hover),:host(:active),:host(:focus-within){--border-color:Highlight;--border-block-end-color:Highlight}:host(:disabled){--color:GrayText;--border-color:GrayText;--border-block-end-color:GrayText;--placeholder-color:GrayText}`));function bf(){return b`<template><label ${E("labelEl")} for="control" part="label"><slot name="label" ${G("labelSlottedNodes")}></slot></label><div class="root" part="root"><textarea ${E("controlEl")} id="control" class="control" part="control" ?required="${o=>o.required}" ?disabled="${o=>o.disabled}" ?readonly="${o=>o.readOnly}" ?spellcheck="${o=>o.spellcheck}" autocomplete="${o=>o.autocomplete}" maxlength="${o=>o.maxLength}" minlength="${o=>o.minLength}" placeholder="${o=>o.placeholder}" @change="${o=>o.handleControlChange()}" @select="${o=>o.handleControlSelect()}" @input="${o=>o.handleControlInput()}"></textarea></div><div hidden><slot ${G("defaultSlottedNodes")}></slot></div></template>`}const gf=bf(),ff=ji.compose({name:`${p.prefix}-textarea`,template:gf,styles:pf,shadowOptions:{delegatesFocus:!0}});ff.define(p.registry);const mf={email:"email",password:"password",tel:"tel",text:"text",url:"url"},vf=["date","datetime-local","email","month","number","password","search","tel","text","time","url","week"];var $f=Object.defineProperty,yf=Object.getOwnPropertyDescriptor,N=(o,e,t,i)=>{for(var r=i>1?void 0:i?yf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&$f(e,t,r),r};class O extends ${constructor(){super(...arguments),this.type=mf.text,this.dirtyValue=!1,this.elementInternals=this.attachInternals()}currentValueChanged(e,t){this.value=t}defaultSlottedNodesChanged(e,t){this.$fastController.isConnected&&(this.controlLabel.hidden=!t?.length)}initialValueChanged(){this.dirtyValue||(this.value=this.initialValue)}readOnlyChanged(){this.$fastController.isConnected&&(this.elementInternals.ariaReadOnly=`${!!this.readOnly}`)}requiredChanged(e,t){this.$fastController.isConnected&&(this.elementInternals.ariaRequired=`${!!t}`)}controlChanged(e,t){this.setValidity()}get validity(){return this.elementInternals.validity}get validationMessage(){return this.elementInternals.validationMessage||this.control.validationMessage}get value(){return m.track(this,"value"),this.currentValue}set value(e){this.currentValue=e,this.$fastController.isConnected&&(this.control.value=e??"",this.setFormValue(e),this.setValidity(),m.notify(this,"value"))}get willValidate(){return this.elementInternals.willValidate}get form(){return this.elementInternals.form}beforeinputHandler(e){return e.inputType==="insertLineBreak"&&this.implicitSubmit(),!0}changeHandler(e){return this.setValidity(),this.$emit("change",e,{bubbles:!0,composed:!0}),!0}checkValidity(){return this.elementInternals.checkValidity()}clickHandler(e){return e.target===this&&this.control?.click(),!0}connectedCallback(){super.connectedCallback(),this.setFormValue(this.value),this.setValidity()}focusinHandler(e){return e.target===this&&this.control?.focus(),!0}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}implicitSubmit(){if(!this.elementInternals.form)return;if(this.elementInternals.form.elements.length===1){this.elementInternals.form.requestSubmit();return}const e=[...this.elementInternals.form.elements],t=e.find(r=>r.getAttribute("type")==="submit");if(t){t.click();return}e.filter(r=>vf.includes(r.getAttribute("type")??"")).length>1||this.elementInternals.form.requestSubmit()}inputHandler(e){return this.dirtyValue=!0,this.value=this.control.value,!0}keydownHandler(e){return e.key==="Enter"&&this.implicitSubmit(),!0}select(){this.control.select(),this.$emit("select")}setCustomValidity(e){this.elementInternals.setValidity({customError:!0},e),this.reportValidity()}reportValidity(){return this.elementInternals.reportValidity()}setFormValue(e,t){this.elementInternals.setFormValue(e,e??t)}setValidity(e,t,i){if(this.$fastController.isConnected&&this.control){if(this.disabled){this.elementInternals.setValidity({});return}this.elementInternals.setValidity(e??this.control.validity,t??this.validationMessage,i??this.control)}}}O.formAssociated=!0,N([a],O.prototype,"autocomplete",2),N([a({mode:"boolean"})],O.prototype,"autofocus",2),N([a({attribute:"current-value"})],O.prototype,"currentValue",2),N([g],O.prototype,"defaultSlottedNodes",2),N([a],O.prototype,"dirname",2),N([a({mode:"boolean"})],O.prototype,"disabled",2),N([a({attribute:"form"})],O.prototype,"formAttribute",2),N([a({attribute:"value",mode:"fromView"})],O.prototype,"initialValue",2),N([a],O.prototype,"list",2),N([a({converter:re})],O.prototype,"maxlength",2),N([a({converter:re})],O.prototype,"minlength",2),N([a({mode:"boolean"})],O.prototype,"multiple",2),N([a],O.prototype,"name",2),N([a],O.prototype,"pattern",2),N([a],O.prototype,"placeholder",2),N([a({attribute:"readonly",mode:"boolean"})],O.prototype,"readOnly",2),N([a({mode:"boolean"})],O.prototype,"required",2),N([a({converter:re})],O.prototype,"size",2),N([a({converter:{fromView:o=>typeof o=="string"?["true",""].includes(o.trim().toLowerCase()):null,toView:o=>o.toString()}})],O.prototype,"spellcheck",2),N([a],O.prototype,"type",2),N([g],O.prototype,"control",2),N([g],O.prototype,"controlLabel",2);var xf=Object.defineProperty,kf=Object.getOwnPropertyDescriptor,wa=(o,e,t,i)=>{for(var r=i>1?void 0:i?kf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&xf(e,t,r),r};class Ri extends O{}wa([a],Ri.prototype,"appearance",2),wa([a({attribute:"control-size"})],Ri.prototype,"controlSize",2),Xe(Ri,Ue);const wf=u`
|
|
550
550
|
${k("block")}
|
|
551
551
|
|
|
552
|
-
:host{font-family:${v};font-size:${B};font-weight:${_};line-height:${A};max-width:400px}.label{display:flex;color:${z};padding-bottom:${qt};flex-shrink:0;padding-inline-end:${ne}}.label[hidden],:host(:empty) .label{display:none}.root{align-items:center;background-color:${I};border:${T} solid ${Le};border-bottom-color:${Ve};border-radius:${C};box-sizing:border-box;height:32px;display:inline-flex;flex-direction:row;gap:${H};padding:0 ${ae};position:relative;width:100%}:has(.control:user-invalid){border-color:${mr}}.root::after{box-sizing:border-box;content:'';position:absolute;left:-1px;bottom:0px;right:-1px;height:max(2px,${C});border-radius:0 0 ${C} ${C};border-bottom:2px solid ${$t};clip-path:inset(calc(100% - 2px) 1px 0px);transform:scaleX(0);transition-property:transform;transition-duration:${Sr};transition-delay:${xt}}.control{width:100%;height:100%;box-sizing:border-box;color:${z};border-radius:${C};background:${me};font-family:${v};font-weight:${_};font-size:${B};border:none;vertical-align:center}.control:focus-visible{outline:0;border:0}.control::placeholder{color:${pr}}:host ::slotted([slot='start']),:host ::slotted([slot='end']){display:flex;align-items:center;justify-content:center;color:${
|
|
552
|
+
:host{font-family:${v};font-size:${B};font-weight:${_};line-height:${A};max-width:400px}.label{display:flex;color:${z};padding-bottom:${qt};flex-shrink:0;padding-inline-end:${ne}}.label[hidden],:host(:empty) .label{display:none}.root{align-items:center;background-color:${I};border:${T} solid ${Le};border-bottom-color:${Ve};border-radius:${C};box-sizing:border-box;height:32px;display:inline-flex;flex-direction:row;gap:${H};padding:0 ${ae};position:relative;width:100%}:has(.control:user-invalid){border-color:${mr}}.root::after{box-sizing:border-box;content:'';position:absolute;left:-1px;bottom:0px;right:-1px;height:max(2px,${C});border-radius:0 0 ${C} ${C};border-bottom:2px solid ${$t};clip-path:inset(calc(100% - 2px) 1px 0px);transform:scaleX(0);transition-property:transform;transition-duration:${Sr};transition-delay:${xt}}.control{width:100%;height:100%;box-sizing:border-box;color:${z};border-radius:${C};background:${me};font-family:${v};font-weight:${_};font-size:${B};border:none;vertical-align:center}.control:focus-visible{outline:0;border:0}.control::placeholder{color:${pr}}:host ::slotted([slot='start']),:host ::slotted([slot='end']){display:flex;align-items:center;justify-content:center;color:${Q};font-size:${jt}}:host ::slotted([slot='start']){padding-right:${H}}:host ::slotted([slot='end']){padding-left:${H};gap:${ne}}:host(:hover) .root{border-color:${Lt};border-bottom-color:${mt}}:host(:active) .root{border-color:${ko}}:host(:focus-within) .root{outline:transparent solid 2px;border-bottom:0}:host(:focus-within) .root::after{transform:scaleX(1);transition-property:transform;transition-duration:${$i};transition-delay:${kt}}:host(:focus-within:active) .root:after{border-bottom-color:${$n}}:host([appearance='outline']:focus-within) .root{border:${T} solid ${Le}}:host(:focus-within) .control{color:${z}}:host([disabled]) .root{background:${me};border:${T} solid ${Ce}}:host([disabled]) .control::placeholder,:host([disabled]) ::slotted([slot='start']),:host([disabled]) ::slotted([slot='end']){color:${S}}::selection{color:${bt};background-color:${ln}}:host([control-size='small']) .control{font-size:${F};font-weight:${_};line-height:${q}}:host([control-size='small']) .root{height:24px;gap:${H};padding:0 ${J}}:host([control-size='small']) ::slotted([slot='start']),:host([control-size='small']) ::slotted([slot='end']){font-size:${he}}:host([control-size='large']) .control{font-size:${he};font-weight:${_};line-height:${ye}}:host([control-size='large']) .root{height:40px;gap:${Oe};padding:0 ${le}}:host([control-size='large']) ::slotted([slot='start']),:host([control-size='large']) ::slotted([slot='end']){font-size:${ui}}:host([appearance='underline']) .root{background:${me};border:0;border-radius:0;border-bottom:${T} solid ${Ve}}:host([appearance='underline']:hover) .root{border-bottom-color:${mt}}:host([appearance='underline']:active) .root{border-bottom-color:${vt}}:host([appearance='underline']:focus-within) .root{border:0;border-bottom-color:${vt}}:host([appearance='underline'][disabled]) .root{border-bottom-color:${Ce}}:host([appearance='filled-lighter']) .root,:host([appearance='filled-darker']) .root{border:${T} solid ${Z};box-shadow:${yr}}:host([appearance='filled-lighter']) .root{background:${I}}:host([appearance='filled-darker']) .root{background:${$o}}:host([appearance='filled-lighter']:hover) .root,:host([appearance='filled-darker']:hover) .root{border-color:${fr}}:host([appearance='filled-lighter']:active) .root,:host([appearance='filled-darker']:active) .root{border-color:${fr};background:${$o}}`;function Cf(o={}){return b`<template @beforeinput="${(e,t)=>e.beforeinputHandler(t.event)}" @focusin="${(e,t)=>e.focusinHandler(t.event)}" @keydown="${(e,t)=>e.keydownHandler(t.event)}"><label part="label" for="control" class="label" ${E("controlLabel")}><slot ${G({property:"defaultSlottedNodes",filter:on})}></slot></label><div class="root" part="root">${He(o)}<input class="control" part="control" id="control" @change="${(e,t)=>e.changeHandler(t.event)}" @input="${(e,t)=>e.inputHandler(t.event)}" ?autofocus="${e=>e.autofocus}" autocomplete="${e=>e.autocomplete}" ?disabled="${e=>e.disabled}" list="${e=>e.list}" maxlength="${e=>e.maxlength}" minlength="${e=>e.minlength}" ?multiple="${e=>e.multiple}" name="${e=>e.name}" pattern="${e=>e.pattern}" placeholder="${e=>e.placeholder}" ?readonly="${e=>e.readOnly}" ?required="${e=>e.required}" size="${e=>e.size}" spellcheck="${e=>e.spellcheck}" type="${e=>e.type}" value="${e=>e.initialValue}" ${E("control")} />${tt(o)}</div></template>`}const Sf=Cf(),If=Ri.compose({name:`${p.prefix}-text-input`,template:Sf,styles:wf,shadowOptions:{delegatesFocus:!0}});If.define(p.registry);var Pf=Object.defineProperty,zf=Object.getOwnPropertyDescriptor,We=(o,e,t,i)=>{for(var r=i>1?void 0:i?zf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Pf(e,t,r),r};class _e extends ${constructor(){super(...arguments),this.elementInternals=this.attachInternals(),this.nowrap=!1,this.truncate=!1,this.italic=!1,this.underline=!1,this.strikethrough=!1,this.block=!1}}We([a({mode:"boolean"})],_e.prototype,"nowrap",2),We([a({mode:"boolean"})],_e.prototype,"truncate",2),We([a({mode:"boolean"})],_e.prototype,"italic",2),We([a({mode:"boolean"})],_e.prototype,"underline",2),We([a({mode:"boolean"})],_e.prototype,"strikethrough",2),We([a({mode:"boolean"})],_e.prototype,"block",2),We([a],_e.prototype,"size",2),We([a],_e.prototype,"font",2),We([a],_e.prototype,"weight",2),We([a],_e.prototype,"align",2);const Tf=u`
|
|
553
553
|
${k("inline")}
|
|
554
554
|
|
|
555
555
|
:host{font-family:${v};font-size:${B};line-height:${A};font-weight:${_};text-align:start}:host([nowrap]),:host([nowrap]) ::slotted(*){white-space:nowrap;overflow:hidden}:host([truncate]),:host([truncate]) ::slotted(*){text-overflow:ellipsis}:host([block]){display:block}:host([italic]){font-style:italic}:host([underline]){text-decoration-line:underline}:host([strikethrough]){text-decoration-line:line-through}:host([underline][strikethrough]){text-decoration-line:line-through underline}:host([size='100']){font-size:${Co};line-height:${bi}}:host([size='200']){font-size:${F};line-height:${q}}:host([size='400']){font-size:${he};line-height:${ye}}:host([size='500']){font-size:${jt};line-height:${gi}}:host([size='600']){font-size:${ui};line-height:${Mn}}:host([size='700']){font-size:${An};line-height:${Dn}}:host([size='800']){font-size:${En};line-height:${Hn}}:host([size='900']){font-size:${Nn};line-height:${Vn}}:host([size='1000']){font-size:${Fn};line-height:${Ln}}:host([font='monospace']){font-family:${md}}:host([font='numeric']){font-family:${vd}}:host([weight='medium']){font-weight:${$d}}:host([weight='semibold']){font-weight:${D}}:host([weight='bold']){font-weight:${pi}}:host([align='center']){text-align:center}:host([align='end']){text-align:end}:host([align='justify']){text-align:justify}::slotted(*){font:inherit;line-height:inherit;text-decoration-line:inherit;text-align:inherit;text-decoration-line:inherit;margin:0}`,Bf=b`<slot></slot>`,Of=_e.compose({name:`${p.prefix}-text`,template:Bf,styles:Tf});Of.define(p.registry);var _f=Object.defineProperty,Af=Object.getOwnPropertyDescriptor,Ca=(o,e,t,i)=>{for(var r=i>1?void 0:i?Af(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&_f(e,t,r),r};class Yr extends Ye{pressedChanged(){this.setPressedState()}mixedChanged(){this.setPressedState()}press(){this.pressed=!this.pressed}connectedCallback(){super.connectedCallback(),this.setPressedState()}setPressedState(){if(this.$fastController.isConnected){const e=`${this.mixed?"mixed":!!this.pressed}`;this.elementInternals.ariaPressed=e,y(this.elementInternals,"pressed",!!this.pressed||!!this.mixed)}}}Ca([a({mode:"boolean"})],Yr.prototype,"pressed",2),Ca([a({mode:"boolean"})],Yr.prototype,"mixed",2);const Ef=u`
|
|
@@ -558,7 +558,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
558
558
|
:host(${M}){border-color:${Le};background-color:${an};color:${z};border-width:${T}}:host(${M}:hover){border-color:${Lt};background-color:${ai}}:host(${M}:active){border-color:${ko};background-color:${br}}:host(${M}[appearance='primary']:not(:focus-visible)){border-color:transparent}:host(${M}[appearance='primary']){background-color:${Yl};color:${Ke}}:host(${M}[appearance='primary']:hover){background-color:${pn}}:host(${M}[appearance='primary']:active){background-color:${bn}}:host(${M}[appearance='subtle']){border-color:transparent;background-color:${dn};color:${ii}}:host(${M}[appearance='subtle']:hover){background-color:${xo};color:${Mt}}:host(${M}[appearance='subtle']:active){background-color:${gt};color:${Dt}}:host(${M}[appearance='outline']),:host(${M}[appearance='transparent']){background-color:${hn}}:host(${M}[appearance='outline']:hover),:host(${M}[appearance='transparent']:hover){background-color:${li}}:host(${M}[appearance='outline']:active),:host(${M}[appearance='transparent']:active){background-color:${ci}}:host(${M}[appearance='transparent']){border-color:transparent;color:${Bl}}:host(${M}[appearance='transparent']:hover){color:${ri}}:host(${M}[appearance='transparent']:active){color:${si}}`.withBehaviors(U(u`
|
|
559
559
|
:host(${M}),:host(
|
|
560
560
|
${M}:is([appearance='primary'],[appearance='subtle'],[appearance='outline'],[appearance='transparent'])
|
|
561
|
-
){background:SelectedItem;color:SelectedItemText}`)),Nf=Ar(),Ff=Yr.compose({name:`${p.prefix}-toggle-button`,template:Nf,styles:Ef});Ff.define(p.registry);var Mf=Object.defineProperty,Df=Object.getOwnPropertyDescriptor,qi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Df(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Mf(e,t,r),r};class Mo extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.id=Ft("tooltip-"),this.defaultDelay=250,this.anchor="",this.anchorPositioningStyleElement=null,this.mouseenterAnchorHandler=()=>this.showTooltip(this.delay),this.mouseleaveAnchorHandler=()=>this.hideTooltip(this.delay),this.focusAnchorHandler=()=>this.showTooltip(0),this.blurAnchorHandler=()=>this.hideTooltip(0),this.elementInternals.role="tooltip"}positioningChanged(){ti||this.setFallbackStyles()}get anchorElement(){const e=this.getRootNode();return(e instanceof ShadowRoot?e:document).getElementById(this.anchor??"")}connectedCallback(){if(super.connectedCallback(),!this.anchorElement)return;const e=this.anchorElement.style.anchorName||`--${this.anchor}`,t=this.anchorElement.getAttribute("aria-describedby");if(this.anchorElement.setAttribute("aria-describedby",t?`${t} ${this.id}`:this.id),this.anchorElement.addEventListener("focus",this.focusAnchorHandler),this.anchorElement.addEventListener("blur",this.blurAnchorHandler),this.anchorElement.addEventListener("mouseenter",this.mouseenterAnchorHandler),this.anchorElement.addEventListener("mouseleave",this.mouseleaveAnchorHandler),ti){Cl||(this.anchorElement.style.anchorName=e,this.style.positionAnchor=e);return}
|
|
561
|
+
){background:SelectedItem;color:SelectedItemText}`)),Nf=Ar(),Ff=Yr.compose({name:`${p.prefix}-toggle-button`,template:Nf,styles:Ef});Ff.define(p.registry);var Mf=Object.defineProperty,Df=Object.getOwnPropertyDescriptor,qi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Df(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Mf(e,t,r),r};class Mo extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.id=Ft("tooltip-"),this.defaultDelay=250,this.anchor="",this.anchorPositioningStyleElement=null,this.mouseenterAnchorHandler=()=>this.showTooltip(this.delay),this.mouseleaveAnchorHandler=()=>this.hideTooltip(this.delay),this.focusAnchorHandler=()=>this.showTooltip(0),this.blurAnchorHandler=()=>this.hideTooltip(0),this.elementInternals.role="tooltip"}positioningChanged(){ti||this.setFallbackStyles()}get anchorElement(){const e=this.getRootNode();return(e instanceof ShadowRoot?e:document).getElementById(this.anchor??"")}connectedCallback(){if(super.connectedCallback(),!this.anchorElement)return;const e=this.anchorElement.style.anchorName||`--${this.anchor}`,t=this.anchorElement.getAttribute("aria-describedby");if(this.anchorElement.setAttribute("aria-describedby",t?`${t} ${this.id}`:this.id),this.anchorElement.addEventListener("focus",this.focusAnchorHandler),this.anchorElement.addEventListener("blur",this.blurAnchorHandler),this.anchorElement.addEventListener("mouseenter",this.mouseenterAnchorHandler),this.anchorElement.addEventListener("mouseleave",this.mouseleaveAnchorHandler),ti){Cl||(this.anchorElement.style.anchorName=e,this.style.positionAnchor=e);return}ie.enqueue(()=>this.setFallbackStyles())}disconnectedCallback(){super.disconnectedCallback(),this.anchorElement?.removeEventListener("focus",this.focusAnchorHandler),this.anchorElement?.removeEventListener("blur",this.blurAnchorHandler),this.anchorElement?.removeEventListener("mouseenter",this.mouseenterAnchorHandler),this.anchorElement?.removeEventListener("mouseleave",this.mouseleaveAnchorHandler)}showTooltip(e=this.defaultDelay){setTimeout(()=>{this.setAttribute("aria-hidden","false"),this.showPopover()},e)}hideTooltip(e=this.defaultDelay){setTimeout(()=>{if(this.matches(":hover")||this.anchorElement?.matches(":hover")){this.hideTooltip(e);return}this.setAttribute("aria-hidden","true"),this.hidePopover()},e)}setFallbackStyles(){if(!this.anchorElement)return;const e=this.anchorElement.style.anchorName||`--${this.anchor}`;this.anchorPositioningStyleElement||(this.anchorPositioningStyleElement=document.createElement("style"),document.head.append(this.anchorPositioningStyleElement));let[t,i]=this.positioning?.split("-")??[];i||((t==="above"||t==="below")&&(i="centerX"),(t==="before"||t==="after")&&(i="centerY"));const r={above:"bottom: anchor(top);",below:"top: anchor(bottom);",before:"right: anchor(left);",after:"left: anchor(right);"},s=r[t]??r.above,n={start:"left: anchor(left);",end:"right: anchor(right);",top:"top: anchor(top);",bottom:"bottom: anchor(bottom);",centerX:"left: anchor(center); translate: -50% 0;",centerY:"top: anchor(center); translate: 0 -50%;"},c=n[i]??n.centerX;this.anchorPositioningStyleElement.textContent=`
|
|
562
562
|
#${this.anchor} {
|
|
563
563
|
anchor-name: ${e};
|
|
564
564
|
}
|
|
@@ -572,7 +572,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
|
|
|
572
572
|
`,window.CSS_ANCHOR_POLYFILL&&window.CSS_ANCHOR_POLYFILL.call({element:this.anchorPositioningStyleElement})}}qi([a],Mo.prototype,"id",2),qi([a({converter:re})],Mo.prototype,"delay",2),qi([a],Mo.prototype,"positioning",2),qi([a],Mo.prototype,"anchor",2);const Te={"above-start":"block-start span-inline-end",above:"block-start","above-end":"block-start span-inline-start","below-start":"block-end span-inline-end",below:"block-end","below-end":"block-end span-inline-start","before-top":"inline-start span-block-end",before:"inline-start","before-bottom":"inline-start span-block-start","after-top":"inline-end span-block-end",after:"inline-end","after-bottom":"inline-end span-block-start"},Hf=u`
|
|
573
573
|
${k("inline-flex")}
|
|
574
574
|
|
|
575
|
-
:host(:not(:popover-open)){display:none}:host{--position-area:block-start;--position-try-options:flip-block;--block-offset:${qt};--inline-offset:${ne};background:${I};border-radius:${C};border:1px solid ${
|
|
575
|
+
:host(:not(:popover-open)){display:none}:host{--position-area:block-start;--position-try-options:flip-block;--block-offset:${qt};--inline-offset:${ne};background:${I};border-radius:${C};border:1px solid ${Z};box-sizing:border-box;color:${z};display:inline-flex;filter:drop-shadow(0 0 2px ${ec}) drop-shadow(0 4px 8px ${tc});font-family:${v};font-size:${F};inset:unset;line-height:${q};margin:unset;max-width:240px;overflow:visible;padding:4px ${ae} 6px;position:absolute;position-area:var(--position-area);position-try-options:var(--position-try-options);width:auto;z-index:1}@supports (inset-area:block-start){:host{inset-area:var(--position-area);position-try-fallbacks:var(--position-try-options)}}:host(:is([positioning^='above'],[positioning^='below'],:not([positioning]))){margin-block:var(--block-offset)}:host(:is([positioning^='before'],[positioning^='after'])){margin-inline:var(--inline-offset);--position-try-options:flip-inline}:host([positioning='above-start']){--position-area:${Te["above-start"]}}:host([positioning='above']){--position-area:${Te.above}}:host([positioning='above-end']){--position-area:${Te["above-end"]}}:host([positioning='below-start']){--position-area:${Te["below-start"]}}:host([positioning='below']){--position-area:${Te.below}}:host([positioning='below-end']){--position-area:${Te["below-end"]}}:host([positioning='before-top']){--position-area:${Te["before-top"]}}:host([positioning='before']){--position-area:${Te.before}}:host([positioning='before-bottom']){--position-area:${Te["before-bottom"]}}:host([positioning='after-top']){--position-area:${Te["after-top"]}}:host([positioning='after']){--position-area:${Te.after}}:host([positioning='after-bottom']){--position-area:${Te["after-bottom"]}}`,Vf=b`<template popover aria-hidden="true"><slot></slot></template>`,Lf=Mo.compose({name:`${p.prefix}-tooltip`,template:Vf,styles:Hf});Lf.define(p.registry);const Sa={subtle:"subtle",subtleAlpha:"subtle-alpha",transparent:"transparent"},Ia={small:"small",medium:"medium"};function Ae(o,e="-tree-item"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}var jf=Object.defineProperty,Rf=Object.getOwnPropertyDescriptor,Pa=(o,e,t,i)=>{for(var r=i>1?void 0:i?Rf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&jf(e,t,r),r};class Qr extends ${constructor(){super(),this.currentSelected=null,this.currentFocused=null,this.elementInternals=this.attachInternals(),this.childTreeItems=[],this.elementInternals.role="tree"}childTreeItemsChanged(){this.updateCurrentSelected()}updateCurrentSelected(){const e=this.querySelector("[selected]");this.currentSelected=e,(this.currentFocused===null||!this.contains(this.currentFocused))&&(this.currentFocused=this.getValidFocusableItem())}keydownHandler(e){if(e.defaultPrevented)return;const t=e.target;if(!Ae(t)||this.childTreeItems.length<1)return!0;const i=this.getVisibleNodes();switch(e.key){case mo:{i.length&&i[0].focus();return}case go:{i.length&&i[i.length-1].focus();return}case uo:{t?.childTreeItems?.length&&t.expanded?t.expanded=!1:Ae(t.parentElement)&&t.parentElement.focus();return}case po:{t?.childTreeItems?.length&&(t.expanded?this.focusNextNode(1,t):t.expanded=!0);return}case ho:{this.focusNextNode(1,t);return}case bo:{this.focusNextNode(-1,t);return}case fo:{this.clickHandler(e);return}case Jo:{t.selected=!0;return}}return!0}focusHandler(e){if(!(this.childTreeItems.length<1)){if(e.target===this){this.currentFocused=this.getValidFocusableItem(),this.currentFocused&&this.currentFocused.tabIndex<0&&(this.currentFocused.tabIndex=0),this.currentFocused?.focus();return}this.contains(e.target)&&(this.setAttribute("tabindex","-1"),this.currentFocused=e.target)}}blurHandler(e){e.target instanceof HTMLElement&&(e.relatedTarget===null||!this.contains(e.relatedTarget))&&this.setAttribute("tabindex","0")}clickHandler(e){if(e.defaultPrevented)return;if(!Ae(e.target))return!0;const t=e.target;t.toggleExpansion(),t.selected=!0}changeHandler(e){if(e.defaultPrevented)return;if(!Ae(e.target))return!0;const t=e.target;t.selected?(this.currentSelected&&this.currentSelected!==t&&Ae(this.currentSelected)&&(this.currentSelected.selected=!1),this.currentSelected=t):!t.selected&&this.currentSelected===t&&(this.currentSelected=null)}getValidFocusableItem(){const e=this.getVisibleNodes();let t=e.findIndex(i=>i.selected);return t===-1&&(t=e.findIndex(i=>Ae(i))),t!==-1?e[t]:null}getVisibleNodes(){return Array.from(this.querySelectorAll("*")).filter(e=>Ae(e)&&e.offsetParent!==null)}focusNextNode(e,t){const i=this.getVisibleNodes();if(!i.length)return;const r=i[i.indexOf(t)+e];cr(r)&&r.focus()}handleDefaultSlotChange(){this.childTreeItems=this.defaultSlot.assignedElements().filter(e=>Ae(e))}}Pa([g],Qr.prototype,"currentSelected",2),Pa([g],Qr.prototype,"childTreeItems",2);var qf=Object.defineProperty,Wf=Object.getOwnPropertyDescriptor,za=(o,e,t,i)=>{for(var r=i>1?void 0:i?Wf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&qf(e,t,r),r};class Zr extends Qr{constructor(){super(...arguments),this.size=Ia.small,this.appearance=Sa.subtle}sizeChanged(){this.updateSizeAndAppearance()}appearanceChanged(){this.updateSizeAndAppearance()}childTreeItemsChanged(){super.childTreeItemsChanged(),this.updateSizeAndAppearance()}updateSizeAndAppearance(){this.childTreeItems?.length&&this.childTreeItems.forEach(e=>{e.size=this.size,e.appearance=this.appearance})}}za([a],Zr.prototype,"size",2),za([a],Zr.prototype,"appearance",2);const Gf=u`
|
|
576
576
|
${k("block")}
|
|
577
577
|
|
|
578
578
|
:host{outline:none}`,Uf=b`<template tabindex="0" @click="${(o,e)=>o.clickHandler(e.event)}" @focusin="${(o,e)=>o.focusHandler(e.event)}" @focusout="${(o,e)=>o.blurHandler(e.event)}" @keydown="${(o,e)=>o.keydownHandler(e.event)}" @change="${(o,e)=>o.changeHandler(e.event)}"><slot ${E("defaultSlot")} @slotchange="${o=>o.handleDefaultSlotChange()}"></slot></template>`,Xf=Zr.compose({name:`${p.prefix}-tree`,template:Uf,styles:Gf});Xf.define(p.registry);var Kf=Object.defineProperty,Yf=Object.getOwnPropertyDescriptor,ro=(o,e,t,i)=>{for(var r=i>1?void 0:i?Yf(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Kf(e,t,r),r};class Tt extends ${constructor(){super(),this.elementInternals=this.attachInternals(),this.expanded=!1,this.selected=!1,this.empty=!1,this.childTreeItems=[],this.elementInternals.role="treeitem"}expandedChanged(e,t){this.$emit("toggle",{oldState:e?"open":"closed",newState:t?"open":"closed"}),y(this.elementInternals,"expanded",t),this.childTreeItems&&this.childTreeItems.length>0&&(this.elementInternals.ariaExpanded=t?"true":"false")}selectedChanged(e,t){this.updateTabindexBySelected(),this.$emit("change"),y(this.elementInternals,"selected",t),this.elementInternals.ariaSelected=t?"true":"false"}dataIndentChanged(e,t){this.styles!==void 0&&this.$fastController.removeStyles(this.styles),this.styles=u`
|