mtrl 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +13 -13
- package/dist/index.js.map +2 -2
- package/dist/package.json +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -2
- package/src/styles/abstract/_base.scss +2 -0
- package/src/styles/abstract/_config.scss +28 -0
- package/src/styles/abstract/_functions.scss +124 -0
- package/src/styles/abstract/_mixins.scss +401 -0
- package/src/styles/abstract/_theme.scss +269 -0
- package/src/styles/abstract/_variables.scss +338 -0
- package/src/styles/base/_reset.scss +86 -0
- package/src/styles/base/_typography.scss +155 -0
- package/src/styles/components/_badge.scss +183 -0
- package/src/styles/components/_bottom-app-bar.scss +103 -0
- package/src/styles/components/_button.scss +756 -0
- package/src/styles/components/_card.scss +401 -0
- package/src/styles/components/_carousel.scss +645 -0
- package/src/styles/components/_checkbox.scss +231 -0
- package/src/styles/components/_chips.scss +639 -0
- package/src/styles/components/_datepicker.scss +358 -0
- package/src/styles/components/_dialog.scss +259 -0
- package/src/styles/components/_divider.scss +57 -0
- package/src/styles/components/_extended-fab.scss +309 -0
- package/src/styles/components/_fab.scss +244 -0
- package/src/styles/components/_list.scss +774 -0
- package/src/styles/components/_menu.scss +245 -0
- package/src/styles/components/_navigation-mobile.scss +244 -0
- package/src/styles/components/_navigation-system.scss +151 -0
- package/src/styles/components/_navigation.scss +407 -0
- package/src/styles/components/_progress.scss +101 -0
- package/src/styles/components/_radios.scss +187 -0
- package/src/styles/components/_search.scss +306 -0
- package/src/styles/components/_segmented-button.scss +227 -0
- package/src/styles/components/_select.scss +274 -0
- package/src/styles/components/_sheet.scss +236 -0
- package/src/styles/components/_slider.scss +264 -0
- package/src/styles/components/_snackbar.scss +211 -0
- package/src/styles/components/_switch.scss +305 -0
- package/src/styles/components/_tabs.scss +421 -0
- package/src/styles/components/_textfield.scss +1024 -0
- package/src/styles/components/_timepicker.scss +451 -0
- package/src/styles/components/_tooltip.scss +241 -0
- package/src/styles/components/_top-app-bar.scss +225 -0
- package/src/styles/main.scss +129 -0
- package/src/styles/themes/_autumn.scss +105 -0
- package/src/styles/themes/_base-theme.scss +85 -0
- package/src/styles/themes/_baseline.scss +173 -0
- package/src/styles/themes/_bluekhaki.scss +125 -0
- package/src/styles/themes/_brownbeige.scss +125 -0
- package/src/styles/themes/_browngreen.scss +125 -0
- package/src/styles/themes/_forest.scss +77 -0
- package/src/styles/themes/_greenbeige.scss +125 -0
- package/src/styles/themes/_index.scss +19 -0
- package/src/styles/themes/_material.scss +125 -0
- package/src/styles/themes/_ocean.scss +77 -0
- package/src/styles/themes/_sageivory.scss +125 -0
- package/src/styles/themes/_spring.scss +77 -0
- package/src/styles/themes/_summer.scss +87 -0
- package/src/styles/themes/_sunset.scss +60 -0
- package/src/styles/themes/_tealcaramel.scss +125 -0
- package/src/styles/themes/_winter.scss +77 -0
- package/src/styles/utilities/_colors.scss +154 -0
- package/src/styles/utilities/_flexbox.scss +194 -0
- package/src/styles/utilities/_layout.scss +665 -0
- package/src/styles/utilities/_ripple.scss +79 -0
- package/src/styles/utilities/_spacing.scss +139 -0
- package/src/styles/utilities/_typography.scss +178 -0
- package/src/styles/utilities/_visibility.scss +142 -0
package/dist/index.cjs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* mtrl v0.5.
|
|
2
|
+
* mtrl v0.5.3
|
|
3
3
|
* A functional TypeScript component library based on Material Design 3
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
var{defineProperty:K8,getOwnPropertyNames:$q,getOwnPropertyDescriptor:Jq}=Object,Qq=Object.prototype.hasOwnProperty;var QQ=new WeakMap,qq=(J)=>{var $=QQ.get(J),Q;if($)return $;if($=K8({},"__esModule",{value:!0}),J&&typeof J==="object"||typeof J==="function")$q(J).map((q)=>!Qq.call($,q)&&K8($,q,{get:()=>J[q],enumerable:!(Q=Jq(J,q))||Q.enumerable}));return QQ.set(J,$),$};var Y8=(J,$)=>{for(var Q in $)K8(J,Q,{get:$[Q],enumerable:!0,configurable:!0,set:(q)=>$[Q]=()=>q})};var g=(J,$)=>()=>(J&&($=J(J=0)),$);var I=(...J)=>($)=>J.reduce((Q,q)=>q(Q),$),qQ=(...J)=>($)=>J.reduceRight((Q,q)=>q(Q),$),ZQ=(...J)=>($,Q={})=>J.reduce((q,Z)=>({...q,...Z(q,Q)}),$);var jQ=(J={})=>({element:null,config:J,setup(){return this}});var W7=(J,$={})=>{if(!$)return J;let Q=Object.keys($);if(Q.length===1){let q=$[Q[0]];if(q!=null)J.setAttribute(Q[0],String(q));return J}for(let q in $){let Z=$[q];if(Z!=null)J.setAttribute(q,String(Z))}return J},KQ=(J,$=[])=>{for(let Q=0;Q<$.length;Q++)J.removeAttribute($[Q]);return J},YQ=(J,$)=>{for(let Q=0;Q<$.length;Q++){let q=$[Q];if(q.action==="set"&&q.value!=null)J.setAttribute(q.key,String(q.value));else if(q.action==="remove")J.removeAttribute(q.key)}return J},GQ=(J,$)=>J.hasAttribute($),zQ=(J,$,Q="")=>J.getAttribute($)??Q;var u="mtrl",WQ=(J)=>`mtrl-${J}`,UQ=(J,$)=>`${J}--${$}`,XQ=(J,$)=>`${J}-${$}`,G8,z8,BQ;var w6=g(()=>{((j)=>{j.BUTTON="button";j.TEXTFIELD="textfield";j.CONTAINER="container";j.SNACKBAR="snackbar";j.SWITCH="switch"})(G8||={});((j)=>{j.DISABLED="disabled";j.FOCUSED="focused";j.ACTIVE="active";j.LOADING="loading";j.ERROR="error"})(z8||={});BQ={bem:(J,$,Q)=>{let q=J;if($)q+=`-${$}`;if(Q)q+=`--${Q}`;return q},join:(...J)=>J.filter(Boolean).join(" ")}});var L6,$$,Zq=500,V9=(...J)=>{if(J.length===0)return[];if(J.length===1&&typeof J[0]==="string"){let q=J[0];if(!q)return[];if(!q.includes(" "))return[q];if($$.has(q))return $$.get(q)}let $=new Set,Q=[];for(let q of J)if(typeof q==="string"&&q)if(!q.includes(" ")){if(!$.has(q))$.add(q),Q.push(q)}else q.split(" ").forEach((Z)=>{let j=Z.trim();if(j&&!$.has(j))$.add(j),Q.push(j)});else if(Array.isArray(q))q.forEach((Z)=>{if(typeof Z==="string"&&Z&&!$.has(Z))$.add(Z),Q.push(Z)});if(J.length===1&&typeof J[0]==="string"&&Q.length<=10){if($$.size<Zq)$$.set(J[0],Q)}return Q},p=(J,...$)=>{if($.length===0)return J;if($.length===1&&Array.isArray($[0]))return p(J,...$[0]);if($.length===1&&typeof $[0]==="string"){let q=$[0];if(q&&!q.includes(" ")){let Z=q.startsWith(L6)?q:L6+q;if(!Z.includes(" "))return J.classList.add(Z),J}}let Q=V9(...$);for(let q of Q){let Z=q.startsWith(L6)?q:L6+q;if(Z.includes(" "))Z.split(" ").forEach((j)=>{let K=j.trim();if(K)J.classList.add(K)});else J.classList.add(Z)}return J},K6=(J,...$)=>{if($.length===0)return J;if($.length===1&&Array.isArray($[0]))return K6(J,...$[0]);if($.length===1&&typeof $[0]==="string"){let q=$[0];if(q&&!q.includes(" ")){let Z=q.startsWith(L6)?q:L6+q;if(!Z.includes(" "))return J.classList.remove(Z),J}}let Q=V9(...$);for(let q of Q){let Z=q.startsWith(L6)?q:L6+q;if(Z.includes(" "))Z.split(" ").forEach((j)=>{let K=j.trim();if(K)J.classList.remove(K)});else J.classList.remove(Z)}return J},J$=(J,...$)=>{if($.length===1&&Array.isArray($[0]))return J$(J,...$[0]);if($.length===1&&typeof $[0]==="string"){let q=$[0];if(q&&!q.includes(" ")){let Z=q.startsWith(L6)?q:L6+q;if(!Z.includes(" "))return J.classList.toggle(Z),J}}let Q=V9(...$);for(let q of Q){let Z=q.startsWith(L6)?q:L6+q;if(Z.includes(" "))Z.split(" ").forEach((j)=>{let K=j.trim();if(K)J.classList.toggle(K)});else J.classList.toggle(Z)}return J},m6=(J,...$)=>{if($.length===0)return!0;if($.length===1&&Array.isArray($[0]))return m6(J,...$[0]);if($.length===1&&typeof $[0]==="string"){let q=$[0];if(q&&!q.includes(" ")){let Z=q.startsWith(L6)?q:L6+q;if(!Z.includes(" "))return J.classList.contains(Z)}}let Q=V9(...$);for(let q of Q){let Z=q.startsWith(L6)?q:L6+q;if(Z.includes(" ")){let j=Z.split(" ").map((K)=>K.trim()).filter(Boolean);for(let K of j)if(!J.classList.contains(K))return!1}else if(!J.classList.contains(Z))return!1}return!0};var u9=g(()=>{w6();L6=`${u}-`,$$=new Map});class HQ{pools=new Map;maxSize=20;acquire(J="div"){let $=this.pools.get(J);if($?.length){let Q=$.pop();return Q.className="",Q.innerHTML="",Q.removeAttribute("id"),Object.keys(Q.dataset).forEach((q)=>delete Q.dataset[q]),Q}return document.createElement(J)}release(J){let $=J.tagName.toLowerCase(),Q=this.pools.get($);if(!Q)Q=[],this.pools.set($,Q);if(Q.length<this.maxSize)this.cleanElement(J),Q.push(J)}cleanElement(J){let $=J.__eventHandlers;if($){for(let Q in $)J.removeEventListener(Q,$[Q]);delete J.__eventHandlers}J.className="",J.innerHTML="",J.removeAttribute("id"),Object.keys(J.dataset).forEach((Q)=>delete J.dataset[Q]),J.parentNode?.removeChild(J)}}var FQ=(J,$,Q)=>{if(!$||!Q?.emit&&!Q?.on)return;J.__eventHandlers={};for(let q in $){let Z=$[q],j=(K)=>{let Y=!0;if(typeof Z==="function")try{Y=Z({...Q,element:J},K)}catch(G){console.warn(`Error in event condition for ${q}:`,G),Y=!1}else Y=Boolean(Z);if(Y&&Q.emit)Q.emit(q,{event:K,element:J,originalEvent:K})};J.__eventHandlers[q]=j,J.addEventListener(q,j)}},vZ,E=(J={})=>{if(!J||Object.keys(J).length===0)return document.createElement("div");if(typeof J==="string")return document.createElement(J);let $=document.createElement(J.tag||"div");if(J.html)$.innerHTML=J.html;else if(J.text)$.textContent=J.text;if(J.id)$.id=J.id;if(J.ariaLabel)$.setAttribute("aria-label",J.ariaLabel);let Q=J.className||J.class;if(Q)p($,Q);if(J.rawClass){let q=Array.isArray(J.rawClass)?J.rawClass:J.rawClass.split(" ");$.classList.add(...q.filter(Boolean))}if(J.data)Object.assign($.dataset,J.data);if(J.attributes)W7($,J.attributes);for(let q in J)if(!["tag","container","html","text","id","ariaLabel","data","class","className","rawClass","attributes","forwardEvents","onCreate","context"].includes(q)){let Z=J[q];if(Z!=null)$.setAttribute(q,String(Z))}if(J.forwardEvents)FQ($,J.forwardEvents,J.context);if(J.container)J.container.appendChild($);if(J.onCreate)J.onCreate($,J.context);return $},MQ=(J={})=>{let $=document.createElementNS("http://www.w3.org/2000/svg",J.tag||"svg");if(J.text)$.textContent=J.text;if(J.id)$.id=J.id;if(J.attributes)W7($,J.attributes);if(J.forwardEvents)FQ($,J.forwardEvents,J.context);if(J.container)J.container.appendChild($);if(J.onCreate)J.onCreate($,J.context);return $},kQ=(J)=>{let $=J.__eventHandlers;if($){for(let Q in $)J.removeEventListener(Q,$[Q]);delete J.__eventHandlers}};var u6=g(()=>{u9();vZ=new HQ});function jq(J){return"touches"in J}function Kq(J){return"clientX"in J&&"clientY"in J}var NQ=()=>{let J=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),$=window.innerWidth<=768;return J||$},Q$,G9,W8,x6=()=>{return"ontouchstart"in window||navigator.maxTouchPoints>0},f6=(J)=>{if(jq(J)&&J.touches.length>0){let $=J.touches[0];return{clientX:$.clientX,clientY:$.clientY,pageX:$.pageX,pageY:$.pageY,target:J.target,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation(),type:J.type}}if(Kq(J))return{clientX:J.clientX,clientY:J.clientY,pageX:J.pageX,pageY:J.pageY,target:J.target,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation(),type:J.type};return{clientX:0,clientY:0,pageX:0,pageY:0,target:J.target,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation(),type:J.type}};var U7=g(()=>{Q$={passive:!0},G9={TARGET_SIZE:44,FEEDBACK_DURATION:200,TAP_THRESHOLD:250,SWIPE_THRESHOLD:50},W8={MINIMUM:44,COMFORTABLE:48,LARGE:56}});var Yq=(J)=>({getClass:($)=>`${J}-${$}`,getModifierClass:($,Q)=>`${$}--${Q}`,getElementClass:($,Q)=>`${$}-${Q}`}),T=(J={})=>({config:J,componentName:J.componentName,...Yq(J.prefix||"mtrl"),touchState:{startTime:0,startPosition:{x:0,y:0},isTouching:!1,activeTarget:null},updateTouchState($,Q){let q=f6($);if(Q==="start")this.touchState={startTime:Date.now(),startPosition:{x:q.clientX,y:q.clientY},isTouching:!0,activeTarget:q.target};else if(Q==="end")this.touchState.isTouching=!1,this.touchState.activeTarget=null}}),S=(J={})=>($)=>{let Q=(z)=>{if(j.updateTouchState(z,"start"),G.classList.add(`${j.getClass("touch-active")}`),J.forwardEvents?.touchstart&&"emit"in $)$.emit("touchstart",f6(z))},q=(z)=>{if(!j.touchState.isTouching)return;let W=Date.now()-j.touchState.startTime;if(G.classList.remove(`${j.getClass("touch-active")}`),j.updateTouchState(z,"end"),W<G9.TAP_THRESHOLD&&"emit"in $)$.emit("tap",f6(z));if(J.forwardEvents?.touchend&&"emit"in $)$.emit("touchend",f6(z))},Z=(z)=>{if(!j.touchState.isTouching)return;let W=f6(z),X=W.clientX-j.touchState.startPosition.x,U=W.clientY-j.touchState.startPosition.y;if(Math.abs(X)>G9.SWIPE_THRESHOLD&&"emit"in $)$.emit("swipe",{direction:X>0?"right":"left",deltaX:X,deltaY:U});if(J.forwardEvents?.touchmove&&"emit"in $)$.emit("touchmove",{...W,deltaX:X,deltaY:U})},j=$,K=$.config.parent||J.parent;if(typeof K==="string")K=document.querySelector(K);let Y={tag:J.tag||"div",className:[j.getClass(J.componentName||j.componentName||"component"),x6()&&J.interactive?j.getClass("interactive"):null,...Array.isArray(J.className)?J.className:[J.className]].filter(Boolean),attributes:J.attributes||{},forwardEvents:J.forwardEvents||{},context:$,container:K},G=E(Y);if(x6()&&J.interactive)G.addEventListener("touchstart",Q,Q$),G.addEventListener("touchend",q),G.addEventListener("touchmove",Z,Q$);return{...$,element:G,addClass(...z){return G.classList.add(...z.filter(Boolean)),this},destroy(){if(x6()&&J.interactive)G.removeEventListener("touchstart",Q),G.removeEventListener("touchend",q),G.removeEventListener("touchmove",Z);kQ(G),G.remove()}}};var s=g(()=>{u6();U7()});var T6=()=>{let J=new Map;return{on:($,Q)=>{let q=J.get($)||[];return J.set($,[...q,Q]),()=>{let Z=J.get($)||[];J.set($,Z.filter((j)=>j!==Q))}},off($,Q){let q=J.get($)||[];J.set($,q.filter((Z)=>Z!==Q))},emit:($,...Q)=>{(J.get($)||[]).forEach((Z)=>Z(...Q))},clear:()=>{J.clear()}}};var h=()=>(J)=>{let $=T6();return{...J,on(Q,q){return $.on(Q,q),this},off(Q,q){return $.off(Q,q),this},emit(Q,q){return $.emit(Q,q),this}}};var LQ=()=>{};var Gq=(J,$={})=>{let Q=null,q=$.prefix||"mtrl",Z=(j)=>{let K=document.createElement("span");return K.className=`${q}-${$.componentName||"component"}-text`,K.textContent=j,K};return{setText(j){if(!Q&&j)if(Q=Z(j),$.beforeElement)J.insertBefore(Q,$.beforeElement);else J.appendChild(Q);else if(Q)Q.textContent=j;return this},getText(){return Q?Q.textContent||"":""},getElement(){return Q}}},$9=(J)=>($)=>{let Q=Gq($.element,{prefix:J.prefix,componentName:J.componentName||"component"});if(J.text)Q.setText(J.text);return{...$,text:Q}};var zq=(J,$={})=>{let Q=null,q=$.prefix||"mtrl",Z=(j)=>{let K=document.createElement("span");K.className=`${q}-icon`;let Y=`${q}-${$.componentName||"component"}-icon`;if(K.classList.add(Y),$.iconPosition)K.classList.add(`${Y}--${$.iconPosition}`);if($.iconSize)K.classList.add(`${q}-icon--${$.iconSize}`);return K.innerHTML=j,K};return{setIcon(j){if(!Q&&j)if(Q=Z(j),$.iconPosition==="end")J.appendChild(Q);else{let K=J.querySelector(`[class*="${q}-${$.componentName||"component"}-label"]`);if(K)if(K.nextSibling)J.insertBefore(Q,K.nextSibling);else J.appendChild(Q);else J.insertBefore(Q,J.firstChild)}else if(Q&&j)Q.innerHTML=j;return this},getIcon(){return Q?Q.innerHTML:""},getElement(){return Q}}},Wq=(J,$)=>{let{text:Q,icon:q}=$,Z=`${J.getClass("button")}--circular`;if(!Q&&q)J.element.classList.add(Z);else J.element.classList.remove(Z)},g6=(J)=>($)=>{let Q=zq($.element,{prefix:J.prefix,componentName:J.componentName||"component",iconPosition:J.iconPosition,iconSize:J.iconSize});if(J.icon)Q.setIcon(J.icon);if($.componentName==="button"){if(!J.text)Wq($,J);else if(J.icon&&J.text)$.element.classList.add(`${$.getClass("button")}--icon`)}return{...$,icon:Q}};var Y6=(J)=>($)=>{if(J.variant&&$.element){let Q=`${J.prefix}-${J.componentName}--${J.variant}`;$.element.classList.add(Q)}return $};var X7=(J)=>($)=>{if(J.size&&$.element){let Q=`${J.prefix}-${J.componentName}--${J.size}`;$.element.classList.add(Q)}return $};var VQ,B7=(J)=>($)=>{if(!J.position||!$.element)return $;let Q=VQ[J.position.toUpperCase()]||J.position,q=`${J.prefix}-${J.componentName}--${Q}`;return $.element.classList.add(q),{...$,position:{setPosition(j){let K=Q,Y=`${J.prefix}-${J.componentName}--${K}`,G=`${J.prefix}-${J.componentName}--${j}`;return $.element.classList.remove(Y),$.element.classList.add(G),this},getPosition(){return Q}}}};var _Q=g(()=>{((Y)=>{Y.LEFT="left";Y.RIGHT="right";Y.TOP="top";Y.BOTTOM="bottom";Y.START="start";Y.END="end";Y.CENTER="center"})(VQ||={})});var DQ,f9,oZ;var OQ=g(()=>{((K)=>{K.LINEAR="linear";K.EASE="ease";K.EASE_IN="ease-in";K.EASE_OUT="ease-out";K.EASE_IN_OUT="ease-in-out";K.MATERIAL="cubic-bezier(0.4, 0.0, 0.2, 1)"})(DQ||={});f9={duration:450,timing:"cubic-bezier(0.4, 0.0, 0.2, 1)",opacity:["0.4","0"]},oZ={duration:{type:"number",minimum:0,default:f9.duration},timing:{type:"string",enum:Object.values(DQ),default:f9.timing},opacity:{type:"array",items:{type:"string",pattern:"^[0-1](\\.\\d+)?$"},minItems:2,maxItems:2,default:f9.opacity}}});var Uq=(J={})=>{let $={...f9,...J,opacity:J.opacity||f9.opacity},Q=new WeakMap,q=[],Z=()=>{let G=document.createElement("div");return G.className=`${u}-ripple-wave`,G},j=(G,z)=>{if(typeof document.addEventListener==="function")document.addEventListener(G,z),q.push({event:G,handler:z})},K=(G,z)=>{if(typeof document.removeEventListener==="function")document.removeEventListener(G,z),q=q.filter((W)=>!(W.event===G&&W.handler===z))},Y=(G,z)=>{if(!z||!z.__rippleContainer)return;let W=z.__rippleContainer,X=z.getBoundingClientRect(),U=Z(),_=Math.max(X.width,X.height)*2,N=G.clientX-X.left-_/2,F=G.clientY-X.top-_/2;Object.assign(U.style,{width:`${_}px`,height:`${_}px`,left:`${N}px`,top:`${F}px`}),W.appendChild(U),U.offsetHeight,requestAnimationFrame(()=>{U.classList.add("active")});let k=()=>{K("mouseup",k),K("mouseleave",k),U.classList.remove("active"),U.classList.add("fade-out"),setTimeout(()=>{if(U.parentNode)U.parentNode.removeChild(U);Q.get(z)?.delete(U)},$.duration)};j("mouseup",k),j("mouseleave",k)};return{mount:(G)=>{if(!G)return;if(window.getComputedStyle(G).position==="static")G.style.position="relative";let W=G.querySelector(`.${u}-ripple`);if(!W)W=document.createElement("div"),W.className=`${u}-ripple`,G.appendChild(W);G.__rippleContainer=W,Q.set(G,new Set);let X=(U)=>Y(U,G);if(!G.__rippleHandlers)G.__rippleHandlers=[];G.__rippleHandlers.push(X),G.addEventListener("mousedown",X)},unmount:(G)=>{if(!G)return;if(q.forEach(({event:z,handler:W})=>{K(z,W)}),q=[],G.__rippleHandlers)G.__rippleHandlers.forEach((z)=>{G.removeEventListener("mousedown",z)}),G.__rippleHandlers=[];if(Q.has(G)){let z=Q.get(G);if(z)z.forEach((W)=>{if(W.parentNode)W.parentNode.removeChild(W)});Q.delete(G)}if(G.__rippleContainer&&G.__rippleContainer.parentNode)G.__rippleContainer.parentNode.removeChild(G.__rippleContainer),delete G.__rippleContainer}}},P6=(J)=>($)=>{if(!J.ripple)return $;let Q=Uq(J.rippleConfig);if(Q.mount($.element),$.lifecycle){let q=$.lifecycle.mount,Z=$.lifecycle.destroy;$.lifecycle.mount=()=>{q.call($.lifecycle)},$.lifecycle.destroy=()=>{Q.unmount($.element),Z.call($.lifecycle)}}return{...$,ripple:Q}};var PQ=g(()=>{OQ();w6()});function RQ(J){return"emit"in J&&typeof J.emit==="function"}var _9=(J={})=>($)=>{let Q=document.createElement("input"),q=$.componentName||"component";Q.type="checkbox",Q.className=`${$.getClass(q)}-input`,Q.style.position="absolute",Q.style.opacity="0",Q.style.cursor="pointer",$.element.setAttribute("role","presentation"),Q.setAttribute("role",q);let Z={name:J.name,checked:J.checked,required:J.required,disabled:J.disabled,value:J.value||"on","aria-label":J.label||J.ariaLabel};return Object.entries(Z).forEach(([j,K])=>{if(K!==null&&K!==void 0)if(j==="disabled"&&K===!0)Q.disabled=!0,Q.setAttribute("disabled","true");else if(K===!0)Q.setAttribute(j,j);else Q.setAttribute(j,String(K))}),Q.addEventListener("change",(j)=>{if(RQ($))$.emit("change",{checked:Q.checked,value:Q.value,nativeEvent:j})}),Q.addEventListener("keydown",(j)=>{if(j.key===" "||j.key==="Enter"){if(j.preventDefault(),!Q.disabled)Q.checked=!Q.checked,Q.dispatchEvent(new Event("change",{bubbles:!0}))}}),$.element.appendChild(Q),{...$,input:Q,getValue:()=>Q.value,setValue(j){if(Q.value=j,RQ($))$.emit("value",{value:j});return this}}};var D9=(J={})=>($)=>{if(!$.input)return $;let Q=$.componentName||"component",q=()=>{$.element.classList.toggle(`${$.getClass(Q)}--checked`,$.input.checked)};if(J.checked!==void 0)$.input.checked=J.checked;if(q(),$.emit)$.on?.("change",q);return{...$,checkable:{check(){if(!$.input.checked)$.input.checked=!0,q(),$.emit?.("change",{checked:!0,value:$.input.value});return this},uncheck(){if($.input.checked)$.input.checked=!1,q(),$.emit?.("change",{checked:!1,value:$.input.value});return this},toggle(){return $.input.checked=!$.input.checked,q(),$.emit?.("change",{checked:$.input.checked,value:$.input.value}),this},isChecked(){return $.input.checked}}}};var U8=(J={})=>($)=>{if(J.variant)$.element.classList.add(`${$.getClass("button")}--${J.variant}`);if(J.size)$.element.classList.add(`${$.getClass("button")}--${J.size}`);return $};function z9(J){return"lifecycle"in J&&J.lifecycle&&typeof J.lifecycle==="object"&&"destroy"in J.lifecycle&&typeof J.lifecycle.destroy==="function"}function W9(J){return"emit"in J&&typeof J.emit==="function"}var F7=(J={})=>($)=>{let Q=J.multiline||J.type==="multiline",q=document.createElement(Q?"textarea":"input");q.className=`${$.getClass("textfield")}-input`;let Z={name:J.name,required:J.required,disabled:J.disabled,maxLength:J.maxLength,pattern:J.pattern,autocomplete:J.autocomplete,value:J.value||"",placeholder:J.placeholder||" "};if(!Q)Z.type=J.type||"text";else Z["data-type"]="multiline";Object.entries(Z).forEach(([G,z])=>{if(z!==null&&z!==void 0)if(typeof z==="boolean"){if(z)q.setAttribute(G,"")}else q.setAttribute(G,String(z))});let j=()=>{let G=!q.value;return $.element.classList.toggle(`${$.getClass("textfield")}--empty`,G),G},K=(G=!0)=>{let z=q.value&&q.value.length>0,W=q.matches(":-webkit-autofill"),U=window.getComputedStyle(q).backgroundColor,_=U==="rgb(250, 255, 189)"||U==="rgb(232, 240, 254)"||U==="rgb(250, 255, 0)"||U==="rgba(255, 255, 0, 0.1)";if(z||W||_){if($.element.classList.remove(`${$.getClass("textfield")}--empty`),G&&W9($)&&(W||_))$.emit("input",{value:q.value,isEmpty:!1,isAutofilled:!0})}},Y=null;if(typeof MutationObserver!=="undefined")Y=new MutationObserver((G)=>{G.forEach((z)=>{if(z.type==="attributes"&&(z.attributeName==="value"||z.attributeName==="data-autofilled"))K(!0)})}),Y.observe(q,{attributes:!0,attributeFilter:["value","data-autofilled","autocomplete"]});if(q.addEventListener("focus",()=>{if($.element.classList.add(`${$.getClass("textfield")}--focused`),W9($))$.emit("focus",{isEmpty:j()});K(!1)}),q.addEventListener("blur",()=>{if($.element.classList.remove(`${$.getClass("textfield")}--focused`),W9($))$.emit("blur",{isEmpty:j()});K(!1)}),q.addEventListener("input",()=>{if(W9($))$.emit("input",{value:q.value,isEmpty:j(),isAutofilled:!1});else j()}),q.addEventListener("change",()=>{let G=j();if(K(!1),W9($))$.emit("change",{value:q.value,isEmpty:G,isAutofilled:q.matches?.(":-webkit-autofill")||!1})}),q.addEventListener("animationstart",(G)=>{if(G.animationName==="onAutoFillStart"||G.animationName?.includes("autofill"))K()}),j(),setTimeout(()=>{K(!1)},0),Q)$.element.classList.add(`${$.getClass("textfield")}--multiline`);if($.element.appendChild(q),z9($)){let G=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(Y)Y.disconnect();q.remove(),G.call($.lifecycle)}}return{...$,input:q,setValue(G){return q.value=G||"",j(),this},getValue(){return q.value},setAttribute(G,z){return q.setAttribute(G,z),this},getAttribute(G){return q.getAttribute(G)},removeAttribute(G){return q.removeAttribute(G),this}}};var yQ=()=>{};var d6=(J={})=>($)=>{if(!J.label)return $;let Q=document.createElement("label"),q=J.labelPosition||"start";if(Q.className=`${J.prefix}-${J.componentName}-label ${J.prefix}-${J.componentName}-label--${q}`,Q.textContent=J.label,q==="start")if($.element.firstChild)$.element.insertBefore(Q,$.element.firstChild);else $.element.appendChild(Q);else $.element.appendChild(Q);if(q&&$.componentName!=="slider")$.element.classList.add(`${J.prefix}-${J.componentName}--label-${q}`);return{...$,label:{setText(j){return Q.textContent=j,this},getText(){return Q.textContent||""},getElement(){return Q}}}};var Xq=`
|
|
6
|
+
var{defineProperty:K8,getOwnPropertyNames:$q,getOwnPropertyDescriptor:Jq}=Object,Qq=Object.prototype.hasOwnProperty;var QQ=new WeakMap,qq=(J)=>{var $=QQ.get(J),Q;if($)return $;if($=K8({},"__esModule",{value:!0}),J&&typeof J==="object"||typeof J==="function")$q(J).map((q)=>!Qq.call($,q)&&K8($,q,{get:()=>J[q],enumerable:!(Q=Jq(J,q))||Q.enumerable}));return QQ.set(J,$),$};var Y8=(J,$)=>{for(var Q in $)K8(J,Q,{get:$[Q],enumerable:!0,configurable:!0,set:(q)=>$[Q]=()=>q})};var g=(J,$)=>()=>(J&&($=J(J=0)),$);var I=(...J)=>($)=>J.reduce((Q,q)=>q(Q),$),qQ=(...J)=>($)=>J.reduceRight((Q,q)=>q(Q),$),ZQ=(...J)=>($,Q={})=>J.reduce((q,Z)=>({...q,...Z(q,Q)}),$);var jQ=(J={})=>({element:null,config:J,setup(){return this}});var W7=(J,$={})=>{if(!$)return J;let Q=Object.keys($);if(Q.length===1){let q=$[Q[0]];if(q!=null)J.setAttribute(Q[0],String(q));return J}for(let q in $){let Z=$[q];if(Z!=null)J.setAttribute(q,String(Z))}return J},KQ=(J,$=[])=>{for(let Q=0;Q<$.length;Q++)J.removeAttribute($[Q]);return J},YQ=(J,$)=>{for(let Q=0;Q<$.length;Q++){let q=$[Q];if(q.action==="set"&&q.value!=null)J.setAttribute(q.key,String(q.value));else if(q.action==="remove")J.removeAttribute(q.key)}return J},GQ=(J,$)=>J.hasAttribute($),zQ=(J,$,Q="")=>J.getAttribute($)??Q;var u="mtrl",WQ=(J)=>`mtrl-${J}`,UQ=(J,$)=>`${J}--${$}`,XQ=(J,$)=>`${J}-${$}`,G8,z8,BQ;var w6=g(()=>{((j)=>{j.BUTTON="button";j.TEXTFIELD="textfield";j.CONTAINER="container";j.SNACKBAR="snackbar";j.SWITCH="switch"})(G8||={});((j)=>{j.DISABLED="disabled";j.FOCUSED="focused";j.ACTIVE="active";j.LOADING="loading";j.ERROR="error"})(z8||={});BQ={bem:(J,$,Q)=>{let q=J;if($)q+=`-${$}`;if(Q)q+=`--${Q}`;return q},join:(...J)=>J.filter(Boolean).join(" ")}});var L6,$$,Zq=500,V9=(...J)=>{if(J.length===0)return[];if(J.length===1&&typeof J[0]==="string"){let q=J[0];if(!q)return[];if(!q.includes(" "))return[q];if($$.has(q))return $$.get(q)}let $=new Set,Q=[];for(let q of J)if(typeof q==="string"&&q)if(!q.includes(" ")){if(!$.has(q))$.add(q),Q.push(q)}else q.split(" ").forEach((Z)=>{let j=Z.trim();if(j&&!$.has(j))$.add(j),Q.push(j)});else if(Array.isArray(q))q.forEach((Z)=>{if(typeof Z==="string"&&Z&&!$.has(Z))$.add(Z),Q.push(Z)});if(J.length===1&&typeof J[0]==="string"&&Q.length<=10){if($$.size<Zq)$$.set(J[0],Q)}return Q},p=(J,...$)=>{if($.length===0)return J;if($.length===1&&Array.isArray($[0]))return p(J,...$[0]);if($.length===1&&typeof $[0]==="string"){let q=$[0];if(q&&!q.includes(" ")){let Z=q.startsWith(L6)?q:L6+q;if(!Z.includes(" "))return J.classList.add(Z),J}}let Q=V9(...$);for(let q of Q){let Z=q.startsWith(L6)?q:L6+q;if(Z.includes(" "))Z.split(" ").forEach((j)=>{let K=j.trim();if(K)J.classList.add(K)});else J.classList.add(Z)}return J},K6=(J,...$)=>{if($.length===0)return J;if($.length===1&&Array.isArray($[0]))return K6(J,...$[0]);if($.length===1&&typeof $[0]==="string"){let q=$[0];if(q&&!q.includes(" ")){let Z=q.startsWith(L6)?q:L6+q;if(!Z.includes(" "))return J.classList.remove(Z),J}}let Q=V9(...$);for(let q of Q){let Z=q.startsWith(L6)?q:L6+q;if(Z.includes(" "))Z.split(" ").forEach((j)=>{let K=j.trim();if(K)J.classList.remove(K)});else J.classList.remove(Z)}return J},J$=(J,...$)=>{if($.length===1&&Array.isArray($[0]))return J$(J,...$[0]);if($.length===1&&typeof $[0]==="string"){let q=$[0];if(q&&!q.includes(" ")){let Z=q.startsWith(L6)?q:L6+q;if(!Z.includes(" "))return J.classList.toggle(Z),J}}let Q=V9(...$);for(let q of Q){let Z=q.startsWith(L6)?q:L6+q;if(Z.includes(" "))Z.split(" ").forEach((j)=>{let K=j.trim();if(K)J.classList.toggle(K)});else J.classList.toggle(Z)}return J},m6=(J,...$)=>{if($.length===0)return!0;if($.length===1&&Array.isArray($[0]))return m6(J,...$[0]);if($.length===1&&typeof $[0]==="string"){let q=$[0];if(q&&!q.includes(" ")){let Z=q.startsWith(L6)?q:L6+q;if(!Z.includes(" "))return J.classList.contains(Z)}}let Q=V9(...$);for(let q of Q){let Z=q.startsWith(L6)?q:L6+q;if(Z.includes(" ")){let j=Z.split(" ").map((K)=>K.trim()).filter(Boolean);for(let K of j)if(!J.classList.contains(K))return!1}else if(!J.classList.contains(Z))return!1}return!0};var u9=g(()=>{w6();L6=`${u}-`,$$=new Map});class HQ{pools=new Map;maxSize=20;acquire(J="div"){let $=this.pools.get(J);if($?.length){let Q=$.pop();return Q.className="",Q.innerHTML="",Q.removeAttribute("id"),Object.keys(Q.dataset).forEach((q)=>delete Q.dataset[q]),Q}return document.createElement(J)}release(J){let $=J.tagName.toLowerCase(),Q=this.pools.get($);if(!Q)Q=[],this.pools.set($,Q);if(Q.length<this.maxSize)this.cleanElement(J),Q.push(J)}cleanElement(J){let $=J.__eventHandlers;if($){for(let Q in $)J.removeEventListener(Q,$[Q]);delete J.__eventHandlers}J.className="",J.innerHTML="",J.removeAttribute("id"),Object.keys(J.dataset).forEach((Q)=>delete J.dataset[Q]),J.parentNode?.removeChild(J)}}var FQ=(J,$,Q)=>{if(!$||!Q?.emit&&!Q?.on)return;J.__eventHandlers={};for(let q in $){let Z=$[q],j=(K)=>{let Y=!0;if(typeof Z==="function")try{Y=Z({...Q,element:J},K)}catch(G){console.warn(`Error in event condition for ${q}:`,G),Y=!1}else Y=Boolean(Z);if(Y&&Q.emit)Q.emit(q,{event:K,element:J,originalEvent:K})};J.__eventHandlers[q]=j,J.addEventListener(q,j)}},vZ,E=(J={})=>{if(!J||Object.keys(J).length===0)return document.createElement("div");if(typeof J==="string")return document.createElement(J);let $=document.createElement(J.tag||"div");if(J.html)$.innerHTML=J.html;else if(J.text)$.textContent=J.text;if(J.id)$.id=J.id;if(J.ariaLabel)$.setAttribute("aria-label",J.ariaLabel);let Q=J.className||J.class;if(Q)p($,Q);if(J.rawClass){let q=Array.isArray(J.rawClass)?J.rawClass:J.rawClass.split(" ");$.classList.add(...q.filter(Boolean))}if(J.data)Object.assign($.dataset,J.data);if(J.attributes)W7($,J.attributes);for(let q in J)if(!["tag","container","html","text","id","ariaLabel","data","class","className","rawClass","attributes","forwardEvents","onCreate","context"].includes(q)){let Z=J[q];if(Z!=null)$.setAttribute(q,String(Z))}if(J.forwardEvents)FQ($,J.forwardEvents,J.context);if(J.container)J.container.appendChild($);if(J.onCreate)J.onCreate($,J.context);return $},MQ=(J={})=>{let $=document.createElementNS("http://www.w3.org/2000/svg",J.tag||"svg");if(J.text)$.textContent=J.text;if(J.id)$.id=J.id;if(J.attributes)W7($,J.attributes);if(J.forwardEvents)FQ($,J.forwardEvents,J.context);if(J.container)J.container.appendChild($);if(J.onCreate)J.onCreate($,J.context);return $},kQ=(J)=>{let $=J.__eventHandlers;if($){for(let Q in $)J.removeEventListener(Q,$[Q]);delete J.__eventHandlers}};var u6=g(()=>{u9();vZ=new HQ});function jq(J){return"touches"in J}function Kq(J){return"clientX"in J&&"clientY"in J}var NQ=()=>{let J=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),$=window.innerWidth<=768;return J||$},Q$,G9,W8,x6=()=>{return"ontouchstart"in window||navigator.maxTouchPoints>0},f6=(J)=>{if(jq(J)&&J.touches.length>0){let $=J.touches[0];return{clientX:$.clientX,clientY:$.clientY,pageX:$.pageX,pageY:$.pageY,target:J.target,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation(),type:J.type}}if(Kq(J))return{clientX:J.clientX,clientY:J.clientY,pageX:J.pageX,pageY:J.pageY,target:J.target,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation(),type:J.type};return{clientX:0,clientY:0,pageX:0,pageY:0,target:J.target,preventDefault:()=>J.preventDefault(),stopPropagation:()=>J.stopPropagation(),type:J.type}};var U7=g(()=>{Q$={passive:!0},G9={TARGET_SIZE:44,FEEDBACK_DURATION:200,TAP_THRESHOLD:250,SWIPE_THRESHOLD:50},W8={MINIMUM:44,COMFORTABLE:48,LARGE:56}});var Yq=(J)=>({getClass:($)=>`${J}-${$}`,getModifierClass:($,Q)=>`${$}--${Q}`,getElementClass:($,Q)=>`${$}-${Q}`}),T=(J={})=>({config:J,componentName:J.componentName,...Yq(J.prefix||"mtrl"),touchState:{startTime:0,startPosition:{x:0,y:0},isTouching:!1,activeTarget:null},updateTouchState($,Q){let q=f6($);if(Q==="start")this.touchState={startTime:Date.now(),startPosition:{x:q.clientX,y:q.clientY},isTouching:!0,activeTarget:q.target};else if(Q==="end")this.touchState.isTouching=!1,this.touchState.activeTarget=null}}),S=(J={})=>($)=>{let Q=(z)=>{if(j.updateTouchState(z,"start"),G.classList.add(`${j.getClass("touch-active")}`),J.forwardEvents?.touchstart&&"emit"in $)$.emit("touchstart",f6(z))},q=(z)=>{if(!j.touchState.isTouching)return;let W=Date.now()-j.touchState.startTime;if(G.classList.remove(`${j.getClass("touch-active")}`),j.updateTouchState(z,"end"),W<G9.TAP_THRESHOLD&&"emit"in $)$.emit("tap",f6(z));if(J.forwardEvents?.touchend&&"emit"in $)$.emit("touchend",f6(z))},Z=(z)=>{if(!j.touchState.isTouching)return;let W=f6(z),X=W.clientX-j.touchState.startPosition.x,U=W.clientY-j.touchState.startPosition.y;if(Math.abs(X)>G9.SWIPE_THRESHOLD&&"emit"in $)$.emit("swipe",{direction:X>0?"right":"left",deltaX:X,deltaY:U});if(J.forwardEvents?.touchmove&&"emit"in $)$.emit("touchmove",{...W,deltaX:X,deltaY:U})},j=$,K=$.config.parent||J.parent;if(typeof K==="string")K=document.querySelector(K);let Y={tag:J.tag||"div",className:[j.getClass(J.componentName||j.componentName||"component"),x6()&&J.interactive?j.getClass("interactive"):null,...Array.isArray(J.className)?J.className:[J.className]].filter(Boolean),attributes:J.attributes||{},forwardEvents:J.forwardEvents||{},context:$,container:K},G=E(Y);if(x6()&&J.interactive)G.addEventListener("touchstart",Q,Q$),G.addEventListener("touchend",q),G.addEventListener("touchmove",Z,Q$);return{...$,element:G,addClass(...z){return G.classList.add(...z.filter(Boolean)),this},destroy(){if(x6()&&J.interactive)G.removeEventListener("touchstart",Q),G.removeEventListener("touchend",q),G.removeEventListener("touchmove",Z);kQ(G),G.remove()}}};var s=g(()=>{u6();U7()});var T6=()=>{let J=new Map;return{on:($,Q)=>{let q=J.get($)||[];return J.set($,[...q,Q]),()=>{let Z=J.get($)||[];J.set($,Z.filter((j)=>j!==Q))}},off($,Q){let q=J.get($)||[];J.set($,q.filter((Z)=>Z!==Q))},emit:($,...Q)=>{(J.get($)||[]).forEach((Z)=>Z(...Q))},clear:()=>{J.clear()}}};var h=()=>(J)=>{let $=T6();return{...J,on(Q,q){return $.on(Q,q),this},off(Q,q){return $.off(Q,q),this},emit(Q,q){return $.emit(Q,q),this}}};var LQ=()=>{};var Gq=(J,$={})=>{let Q=null,q=$.prefix||"mtrl",Z=(j)=>{let K=document.createElement("span");return K.className=`${q}-${$.componentName||"component"}-text`,K.textContent=j,K};return{setText(j){if(!Q&&j)if(Q=Z(j),$.beforeElement)J.insertBefore(Q,$.beforeElement);else J.appendChild(Q);else if(Q)Q.textContent=j;return this},getText(){return Q?Q.textContent||"":""},getElement(){return Q}}},$9=(J)=>($)=>{let Q=Gq($.element,{prefix:J.prefix,componentName:J.componentName||"component"});if(J.text)Q.setText(J.text);return{...$,text:Q}};var zq=(J,$={})=>{let Q=null,q=$.prefix||"mtrl",Z=(j)=>{let K=document.createElement("span");K.className=`${q}-icon`;let Y=`${q}-${$.componentName||"component"}-icon`;if(K.classList.add(Y),$.iconPosition)K.classList.add(`${Y}--${$.iconPosition}`);if($.iconSize)K.classList.add(`${q}-icon--${$.iconSize}`);return K.innerHTML=j,K};return{setIcon(j){if(!Q&&j)if(Q=Z(j),$.iconPosition==="end")J.appendChild(Q);else{let K=J.querySelector(`[class*="${q}-${$.componentName||"component"}-label"]`);if(K)if(K.nextSibling)J.insertBefore(Q,K.nextSibling);else J.appendChild(Q);else J.insertBefore(Q,J.firstChild)}else if(Q&&j)Q.innerHTML=j;return this},getIcon(){return Q?Q.innerHTML:""},getElement(){return Q}}},Wq=(J,$)=>{let{text:Q,icon:q}=$,Z=`${J.getClass("button")}--circular`;if(!Q&&q)J.element.classList.add(Z);else J.element.classList.remove(Z)},g6=(J)=>($)=>{let Q=zq($.element,{prefix:J.prefix,componentName:J.componentName||"component",iconPosition:J.iconPosition,iconSize:J.iconSize});if(J.icon)Q.setIcon(J.icon);if($.componentName==="button"){if(!J.text)Wq($,J);else if(J.icon&&J.text)$.element.classList.add(`${$.getClass("button")}--icon`)}return{...$,icon:Q}};var Y6=(J)=>($)=>{if(J.variant&&$.element){let Q=`${J.prefix}-${J.componentName}--${J.variant}`;$.element.classList.add(Q)}return $};var X7=(J)=>($)=>{if(J.size&&$.element){let Q=`${J.prefix}-${J.componentName}--${J.size}`;$.element.classList.add(Q)}return $};var VQ,B7=(J)=>($)=>{if(!J.position||!$.element)return $;let Q=VQ[J.position.toUpperCase()]||J.position,q=`${J.prefix}-${J.componentName}--${Q}`;return $.element.classList.add(q),{...$,position:{setPosition(j){let K=Q,Y=`${J.prefix}-${J.componentName}--${K}`,G=`${J.prefix}-${J.componentName}--${j}`;return $.element.classList.remove(Y),$.element.classList.add(G),this},getPosition(){return Q}}}};var _Q=g(()=>{((Y)=>{Y.LEFT="left";Y.RIGHT="right";Y.TOP="top";Y.BOTTOM="bottom";Y.START="start";Y.END="end";Y.CENTER="center"})(VQ||={})});var DQ,f9,oZ;var OQ=g(()=>{((K)=>{K.LINEAR="linear";K.EASE="ease";K.EASE_IN="ease-in";K.EASE_OUT="ease-out";K.EASE_IN_OUT="ease-in-out";K.MATERIAL="cubic-bezier(0.4, 0.0, 0.2, 1)"})(DQ||={});f9={duration:450,timing:"cubic-bezier(0.4, 0.0, 0.2, 1)",opacity:["0.4","0"]},oZ={duration:{type:"number",minimum:0,default:f9.duration},timing:{type:"string",enum:Object.values(DQ),default:f9.timing},opacity:{type:"array",items:{type:"string",pattern:"^[0-1](\\.\\d+)?$"},minItems:2,maxItems:2,default:f9.opacity}}});var Uq=(J={})=>{let $={...f9,...J,opacity:J.opacity||f9.opacity},Q=new WeakMap,q=[],Z=()=>{let G=document.createElement("div");return G.className=`${u}-ripple-wave`,G},j=(G,z)=>{if(typeof document.addEventListener==="function")document.addEventListener(G,z),q.push({event:G,handler:z})},K=(G,z)=>{if(typeof document.removeEventListener==="function")document.removeEventListener(G,z),q=q.filter((W)=>!(W.event===G&&W.handler===z))},Y=(G,z)=>{if(!z||!z.__rippleContainer)return;let W=z.__rippleContainer,X=z.getBoundingClientRect(),U=Z(),_=Math.max(X.width,X.height)*2,N=G.clientX-X.left-_/2,F=G.clientY-X.top-_/2;Object.assign(U.style,{width:`${_}px`,height:`${_}px`,left:`${N}px`,top:`${F}px`}),W.appendChild(U),U.offsetHeight,requestAnimationFrame(()=>{U.classList.add("active")});let k=()=>{K("mouseup",k),K("mouseleave",k),U.classList.remove("active"),U.classList.add("fade-out"),setTimeout(()=>{if(U.parentNode)U.parentNode.removeChild(U);Q.get(z)?.delete(U)},$.duration)};j("mouseup",k),j("mouseleave",k)};return{mount:(G)=>{if(!G)return;if(window.getComputedStyle(G).position==="static")G.style.position="relative";let W=G.querySelector(`.${u}-ripple`);if(!W)W=document.createElement("div"),W.className=`${u}-ripple`,G.appendChild(W);G.__rippleContainer=W,Q.set(G,new Set);let X=(U)=>Y(U,G);if(!G.__rippleHandlers)G.__rippleHandlers=[];G.__rippleHandlers.push(X),G.addEventListener("mousedown",X)},unmount:(G)=>{if(!G)return;if(q.forEach(({event:z,handler:W})=>{K(z,W)}),q=[],G.__rippleHandlers)G.__rippleHandlers.forEach((z)=>{G.removeEventListener("mousedown",z)}),G.__rippleHandlers=[];if(Q.has(G)){let z=Q.get(G);if(z)z.forEach((W)=>{if(W.parentNode)W.parentNode.removeChild(W)});Q.delete(G)}if(G.__rippleContainer&&G.__rippleContainer.parentNode)G.__rippleContainer.parentNode.removeChild(G.__rippleContainer),delete G.__rippleContainer}}},P6=(J)=>($)=>{if(!J.ripple)return $;let Q=Uq(J.rippleConfig);if(Q.mount($.element),$.lifecycle){let q=$.lifecycle.mount,Z=$.lifecycle.destroy;$.lifecycle.mount=()=>{q.call($.lifecycle)},$.lifecycle.destroy=()=>{Q.unmount($.element),Z.call($.lifecycle)}}return{...$,ripple:Q}};var PQ=g(()=>{OQ();w6()});function RQ(J){return"emit"in J&&typeof J.emit==="function"}var _9=(J={})=>($)=>{let Q=document.createElement("input"),q=$.componentName||"component";Q.type="checkbox",Q.className=`${$.getClass(q)}-input`,Q.style.position="absolute",Q.style.opacity="0",Q.style.cursor="pointer",$.element.setAttribute("role","presentation"),Q.setAttribute("role",q);let Z={name:J.name,checked:J.checked,required:J.required,disabled:J.disabled,value:J.value||"on","aria-label":J.label||J.ariaLabel};return Object.entries(Z).forEach(([j,K])=>{if(K!==null&&K!==void 0)if(j==="disabled"&&K===!0)Q.disabled=!0,Q.setAttribute("disabled","true");else if(K===!0)Q.setAttribute(j,j);else Q.setAttribute(j,String(K))}),Q.addEventListener("change",(j)=>{if(RQ($))$.emit("change",{checked:Q.checked,value:Q.value,nativeEvent:j})}),Q.addEventListener("keydown",(j)=>{if(j.key===" "||j.key==="Enter"){if(j.preventDefault(),!Q.disabled)Q.checked=!Q.checked,Q.dispatchEvent(new Event("change",{bubbles:!0}))}}),$.element.appendChild(Q),{...$,input:Q,getValue:()=>Q.value,setValue(j){if(Q.value=j,RQ($))$.emit("value",{value:j});return this}}};var D9=(J={})=>($)=>{if(!$.input)return $;let Q=$.componentName||"component",q=()=>{$.element.classList.toggle(`${$.getClass(Q)}--checked`,$.input.checked)};if(J.checked!==void 0)$.input.checked=J.checked;if(q(),$.emit)$.on?.("change",q);return{...$,checkable:{check(){if(!$.input.checked)$.input.checked=!0,q(),$.emit?.("change",{checked:!0,value:$.input.value});return this},uncheck(){if($.input.checked)$.input.checked=!1,q(),$.emit?.("change",{checked:!1,value:$.input.value});return this},toggle(){return $.input.checked=!$.input.checked,q(),$.emit?.("change",{checked:$.input.checked,value:$.input.value}),this},isChecked(){return $.input.checked}}}};var U8=(J={})=>($)=>{if(J.variant)$.element.classList.add(`${$.getClass("button")}--${J.variant}`);if(J.size)$.element.classList.add(`${$.getClass("button")}--${J.size}`);return $};function z9(J){return"lifecycle"in J&&J.lifecycle&&typeof J.lifecycle==="object"&&"destroy"in J.lifecycle&&typeof J.lifecycle.destroy==="function"}function W9(J){return"emit"in J&&typeof J.emit==="function"}var F7=(J={})=>($)=>{let Q=J.multiline||J.type==="multiline",q=document.createElement(Q?"textarea":"input");q.className=`${$.getClass("textfield")}-input`;let Z={name:J.name,required:J.required,disabled:J.disabled,maxLength:J.maxLength,pattern:J.pattern,autocomplete:J.autocomplete,value:J.value||"",placeholder:J.placeholder||" "};if(!Q)Z.type=J.type||"text";else Z["data-type"]="multiline";Object.entries(Z).forEach(([G,z])=>{if(z!==null&&z!==void 0)if(typeof z==="boolean"){if(z)q.setAttribute(G,"")}else q.setAttribute(G,String(z))});let j=()=>{let G=!q.value;return $.element.classList.toggle(`${$.getClass("textfield")}--empty`,G),G},K=(G=!0)=>{let z=q.value&&q.value.length>0,W=q.matches(":-webkit-autofill"),U=window.getComputedStyle(q).backgroundColor,_=U==="rgb(250, 255, 189)"||U==="rgb(232, 240, 254)"||U==="rgb(250, 255, 0)"||U==="rgba(255, 255, 0, 0.1)";if(z||W||_){if($.element.classList.remove(`${$.getClass("textfield")}--empty`),G&&W9($)&&(W||_))$.emit("input",{value:q.value,isEmpty:!1,isAutofilled:!0})}},Y=null;if(typeof MutationObserver<"u")Y=new MutationObserver((G)=>{G.forEach((z)=>{if(z.type==="attributes"&&(z.attributeName==="value"||z.attributeName==="data-autofilled"))K(!0)})}),Y.observe(q,{attributes:!0,attributeFilter:["value","data-autofilled","autocomplete"]});if(q.addEventListener("focus",()=>{if($.element.classList.add(`${$.getClass("textfield")}--focused`),W9($))$.emit("focus",{isEmpty:j()});K(!1)}),q.addEventListener("blur",()=>{if($.element.classList.remove(`${$.getClass("textfield")}--focused`),W9($))$.emit("blur",{isEmpty:j()});K(!1)}),q.addEventListener("input",()=>{if(W9($))$.emit("input",{value:q.value,isEmpty:j(),isAutofilled:!1});else j()}),q.addEventListener("change",()=>{let G=j();if(K(!1),W9($))$.emit("change",{value:q.value,isEmpty:G,isAutofilled:q.matches?.(":-webkit-autofill")||!1})}),q.addEventListener("animationstart",(G)=>{if(G.animationName==="onAutoFillStart"||G.animationName?.includes("autofill"))K()}),j(),setTimeout(()=>{K(!1)},0),Q)$.element.classList.add(`${$.getClass("textfield")}--multiline`);if($.element.appendChild(q),z9($)){let G=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(Y)Y.disconnect();q.remove(),G.call($.lifecycle)}}return{...$,input:q,setValue(G){return q.value=G||"",j(),this},getValue(){return q.value},setAttribute(G,z){return q.setAttribute(G,z),this},getAttribute(G){return q.getAttribute(G)},removeAttribute(G){return q.removeAttribute(G),this}}};var yQ=()=>{};var d6=(J={})=>($)=>{if(!J.label)return $;let Q=document.createElement("label"),q=J.labelPosition||"start";if(Q.className=`${J.prefix}-${J.componentName}-label ${J.prefix}-${J.componentName}-label--${q}`,Q.textContent=J.label,q==="start")if($.element.firstChild)$.element.insertBefore(Q,$.element.firstChild);else $.element.appendChild(Q);else $.element.appendChild(Q);if(q&&$.componentName!=="slider")$.element.classList.add(`${J.prefix}-${J.componentName}--label-${q}`);return{...$,label:{setText(j){return Q.textContent=j,this},getText(){return Q.textContent||""},getElement(){return Q}}}};var Xq=`
|
|
7
7
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
8
8
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
9
|
-
</svg>`,H7=(J)=>($)=>{let Q=document.createElement("span");Q.className=`${J.prefix}-${J.componentName}-track`;let q=document.createElement("span");if(q.className=`${J.prefix}-${J.componentName}-thumb`,Q.appendChild(q),J.icon!=="none"){let Z=document.createElement("span");Z.className=`${J.prefix}-${J.componentName}-thumb-icon`,Z.innerHTML=J.icon||Xq,q.appendChild(Z)}return $.element.appendChild(Q),{...$,track:Q,thumb:q}};var q$=(J)=>{let $=new Map;return{on(Q,q){return J.addEventListener(Q,q),$.set(q,Q),this},off(Q,q){return J.removeEventListener(Q,q),$.delete(q),this},destroy(){$.forEach((Q,q)=>{J.removeEventListener(Q,q)}),$.clear()},getHandlers(){return new Map($)}}};var X8=(J)=>($)=>{let Q=q$(J||$.element),q={addListeners(Z){return Object.entries(Z).forEach(([j,K])=>{Q.on(j,K)}),this},removeListeners(Z){return Object.entries(Z).forEach(([j,K])=>{Q.off(j,K)}),this},once(Z,j){let K=(Y)=>{j(Y),Q.off(Z,K)};return Q.on(Z,K),this},on(Z,j){return Q.on(Z,j),this},off(Z,j){return Q.off(Z,j),this},destroy(){Q.destroy()}};if(z9($)){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{Q.destroy(),Z.call($.lifecycle)}}return{...$,events:q,on:q.on.bind(q),off:q.off.bind(q)}};var AQ=()=>{};var wQ=g(()=>{M7();w6()});var d9=(J,$,Q={})=>{let q=null,Z=0,{leading:j=!0,trailing:K=!0}=Q;return function(...Y){let G=Date.now();if(!Z&&!j)Z=G;let z=$-(G-Z);if(z<=0||z>$){if(q)clearTimeout(q),q=null;Z=G,J.apply(this,Y)}else if(!q&&K)q=window.setTimeout(()=>{Z=j?Date.now():0,q=null,J.apply(this,Y)},z)}},r9=(J,$,Q={})=>{let q=null,Z=null,j=null,K,Y=null,G=0,{leading:z=!1,maxWait:W}=Q,X=(F)=>{let k=F-(Y||0),L=F-G;return!Y||k>=$||k<0||W!==void 0&&L>=W},U=(F)=>{let k=Z,L=j;return Z=j=null,G=F,K=J.apply(L,k),K},_=(F)=>{if(q=null,Z)return U(F);return K},N=(F)=>{return G=F,q=window.setTimeout(()=>{_(Date.now())},$),z?U(F):K};return function(...F){let k=Date.now(),L=X(k);if(Z=F,j=this,Y=k,L){if(q===null)return N(k);if(W!==void 0)q=window.setTimeout(()=>{let D=Date.now();if(X(D))return _(D)},Math.min($,W-(k-G)))}if(q===null)q=window.setTimeout(()=>{_(Date.now())},$);return K}},Z$=(J)=>{let $=!1,Q;return function(...q){if(!$)$=!0,Q=J.apply(this,q);return Q}};var B8=(J={})=>($)=>{let Q={},q=(K,Y,G,z={})=>{if(Q[K])Z(K);let W=d9(Y,G,z);return $.element.addEventListener(K,W),Q[K]={original:Y,throttled:W},j},Z=(K)=>{let Y=Q[K];if(Y)$.element.removeEventListener(K,Y.throttled),delete Q[K];return j};if(z9($)){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{Object.keys(Q).forEach((Y)=>{let G=Q[Y];$.element.removeEventListener(Y,G.throttled)}),K.call($.lifecycle)}}if(J.throttledEvents)Object.entries(J.throttledEvents).forEach(([K,Y])=>{q(K,Y.handler,Y.wait,Y.options)});let j={...$,addThrottledEvent:q,removeThrottledEvent:Z};return j};var xQ=()=>{};function Bq(J){return"lifecycle"in J&&J.lifecycle&&typeof J.lifecycle==="object"&&"destroy"in J.lifecycle&&typeof J.lifecycle.destroy==="function"}var F8=(J={})=>($)=>{let Q={},q=(K,Y,G,z={})=>{if(Q[K])Z(K);let W=r9(Y,G,z);return $.element.addEventListener(K,W),Q[K]={original:Y,debounced:W},j},Z=(K)=>{let Y=Q[K];if(Y)$.element.removeEventListener(K,Y.debounced),delete Q[K];return j};if(Bq($)){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{Object.keys(Q).forEach((Y)=>{let G=Q[Y];$.element.removeEventListener(Y,G.debounced)}),K.call($.lifecycle)}}if(J.debouncedEvents)Object.entries(J.debouncedEvents).forEach(([K,Y])=>{q(K,Y.handler,Y.wait,Y.options)});let j={...$,addDebouncedEvent:q,removeDebouncedEvent:Z};return j};var TQ=()=>{};function H8(J){return"input"in J&&J.input instanceof HTMLElement&&"disabled"in J.input}var G6=(J)=>($)=>{let Q=`${$.getClass(J.componentName||$.componentName||"component")}--disabled`,q={enable(){if($.element.classList.remove(Q),H8($))$.input.disabled=!1,$.input.removeAttribute("disabled");else{let Z=$.element;if("disabled"in Z)Z.disabled=!1;$.element.removeAttribute("disabled")}return this},disable(){if($.element.classList.add(Q),H8($))$.input.disabled=!0,$.input.setAttribute("disabled","true");else{let Z=$.element;if("disabled"in Z)Z.disabled=!0;$.element.setAttribute("disabled","true")}return this},toggle(){if(this.isDisabled())this.enable();else this.disable();return this},isDisabled(){if(H8($))return $.input.disabled;let Z=$.element;return"disabled"in Z&&Z.disabled}};if(J.disabled)requestAnimationFrame(()=>{q.disable()});return{...$,disabled:q}};function Fq(J){return"events"in J&&J.events&&typeof J.events==="object"&&"destroy"in J.events&&typeof J.events.destroy==="function"}function Hq(J){return"text"in J&&J.text&&typeof J.text==="object"&&"getElement"in J.text&&typeof J.text.getElement==="function"}function Mq(J){return"icon"in J&&J.icon&&typeof J.icon==="object"&&"getElement"in J.icon&&typeof J.icon.getElement==="function"}var v=()=>(J)=>{let $=!1,Q=T6();return{...J,lifecycle:{onMount:(Z)=>Q.on("mount",Z),onUnmount:(Z)=>Q.on("unmount",Z),mount:()=>{if(!$)$=!0,Q.emit("mount")},unmount:()=>{if($)$=!1,Q.emit("unmount"),Q.clear()},isMounted:()=>$,destroy(){if($)this.unmount();if(Fq(J))J.events.destroy();if(Hq(J)){let Z=J.text.getElement();if(Z)Z.remove()}if(Mq(J)){let Z=J.icon.getElement();if(Z)Z.remove()}if(J.element)J.element.remove()}}}};var IQ=()=>{};var c=g(()=>{LQ();_Q();PQ();yQ();AQ();wQ();xQ();TQ();IQ()});var n=g(()=>{s();c()});function M8(J,$){k7[J]=$}function N7(J){return k7[J]||{}}function k8(J){Object.assign(k7,J)}function N8(){Object.keys(k7).forEach((J)=>{delete k7[J]})}var k7;var L8=g(()=>{k7={}});var b=(J,$={},Q)=>{let q=N7(Q),Z=$.className!==void 0?$.className:$.class,j=J.className!==void 0?J.className:J.class,K={...J,...q,...$,componentName:Q,prefix:u,className:Z!==void 0?Z:j};if("class"in K&&K.className!==void 0)delete K.class;return K},f=(J,$)=>{let Q=J.className||J.class,q=$.className,Z=[...Array.isArray(Q)?Q:[Q],...Array.isArray(q)?q:[q]].filter(Boolean),j=$.attributes||{};return{tag:$.tag,componentName:J.componentName,attributes:j,className:Z.length>0?Z:void 0,rawClass:J.rawClass,html:$.html,text:$.text,forwardEvents:$.forwardEvents||{},interactive:$.interactive}};var m=g(()=>{w6();L8()});var L7,V7,_7,O9=4;var V8=g(()=>{L7={SMALL:"small",LARGE:"large"},V7={ERROR:"error",PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",SUCCESS:"success",WARNING:"warning",INFO:"info"},_7={TOP_RIGHT:"top-right",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_LEFT:"bottom-left"}});var kq,SQ=(J={})=>b(kq,J,"badge"),bQ=(J)=>{let $={};if(J.variant!=="small")$.role="status";let Q=J.variant==="small"?"":l9(J.label||"",J.max);return f(J,{tag:"span",attributes:$,className:J.class,text:Q})},vQ=(J)=>({visibility:{show:()=>J.visibility.show(),hide:()=>J.visibility.hide(),toggle:($)=>J.visibility.toggle($),isVisible:()=>J.visibility.isVisible()},lifecycle:{destroy:()=>J.lifecycle.destroy()}}),l9=(J,$)=>{if(J===void 0||J===null||J==="")return"";let Q=String(J),q=Number(J);if($!==void 0&&!isNaN(q)&&q>$)Q=`${$}+`;if(Q.length>O9){let Z=Number(J);if(!isNaN(Z))if(Z>=1000)Q="999+";else Q=Q.substring(0,O9-1)+"+";else Q=Q.substring(0,O9)}return Q};var j$=g(()=>{m();V8();kq={variant:L7.LARGE,color:V7.ERROR,position:_7.TOP_RIGHT,label:"",visible:!0}});var CQ="small",Nq="large",Lq="error",Vq="top-right",EQ=()=>(J)=>{if(J.config.visible===!1)J.element.classList.add(`${J.getClass("badge")}--invisible`);return{...J,visibility:{show(){J.element.classList.remove(`${J.getClass("badge")}--invisible`)},hide(){J.element.classList.add(`${J.getClass("badge")}--invisible`)},toggle(Q){if(Q===void 0)J.element.classList.toggle(`${J.getClass("badge")}--invisible`);else if(Q)this.show();else this.hide()},isVisible(){return!J.element.classList.contains(`${J.getClass("badge")}--invisible`)}}}},hQ=(J)=>($)=>{let Q=J.variant||Nq;if($.element.classList.add(`${$.getClass("badge")}--${Q}`),Q===CQ)$.element.textContent="",$.element.setAttribute("aria-hidden","true");else if($.element.setAttribute("role","status"),J.label!==void 0&&J.label!==""){let q=l9(J.label,J.max);$.element.textContent=q}return $},uQ=(J)=>($)=>{let Q=J.color||Lq;return $.element.classList.add(`${$.getClass("badge")}--${Q}`),$},fQ=(J)=>($)=>{let Q=J.position||Vq;if($.element.classList.add(`${$.getClass("badge")}--${Q}`),J.target)$.element.classList.add(`${$.getClass("badge")}--positioned`);return $},gQ=(J)=>($)=>{if(J.max===void 0||J.variant===CQ)return $;if($.config.max=J.max,J.label!==void 0&&J.label!==""){let Q=l9(J.label,J.max);if($.element.textContent=Q,typeof J.label==="number"&&J.label>J.max)$.element.classList.add(`${$.getClass("badge")}--overflow`)}return $},dQ=(J)=>($)=>{if(!J.target)return $;let Q=document.createElement("div");Q.classList.add($.getClass("badge-wrapper")),Q.style.position="relative";let q=J.target.parentNode;if(q)q.replaceChild(Q,J.target),Q.appendChild(J.target),Q.appendChild($.element),$.wrapper=Q;return $};var rQ=g(()=>{j$()});var lQ="small",_q,Dq,Oq,pQ=({visibility:J,lifecycle:$})=>(Q)=>{let q={element:Q.element,wrapper:Q.wrapper,getClass:Q.getClass,setLabel(Z){if(Q.config.label=Z,Q.config.variant===lQ)return Q.element.textContent="",q;let j=l9(Z,Q.config.max);if(Q.element.textContent=j,Q.element.classList.remove(`${Q.getClass("badge")}--overflow`),typeof Z==="number"&&Q.config.max!==void 0&&Z>Q.config.max)Q.element.classList.add(`${Q.getClass("badge")}--overflow`);if(j===""||j==="0")q.hide();else q.show();return q},getLabel(){return Q.element.textContent||""},setContent(Z){return q.setLabel(Z)},getContent(){return q.getLabel()},show(){return J.show(),q},hide(){return J.hide(),q},toggle(Z){return J.toggle(Z),q},isVisible(){return J.isVisible()},setMax(Z){if(Q.config.max=Z,Q.config.label!==void 0)q.setLabel(Q.config.label);return q},setColor(Z){return _q.forEach((j)=>{Q.element.classList.remove(`${Q.getClass("badge")}--${j}`)}),Q.element.classList.add(`${Q.getClass("badge")}--${Z}`),q},setVariant(Z){if(Dq.forEach((j)=>{Q.element.classList.remove(`${Q.getClass("badge")}--${j}`)}),Q.element.classList.add(`${Q.getClass("badge")}--${Z}`),Q.config.variant=Z,Z===lQ)Q.element.textContent="",Q.element.setAttribute("aria-hidden","true");else if(Q.element.setAttribute("role","status"),Q.config.label!==void 0)q.setLabel(Q.config.label);return q},setPosition(Z){return Oq.forEach((j)=>{Q.element.classList.remove(`${Q.getClass("badge")}--${j}`)}),Q.element.classList.add(`${Q.getClass("badge")}--${Z}`),q},attachTo(Z){if(Q.wrapper&&Q.wrapper.contains(Q.element))Q.wrapper.removeChild(Q.element);let j=document.createElement("div");j.classList.add(Q.getClass("badge-wrapper")),j.style.position="relative";let K=Z.parentNode;if(K)K.replaceChild(j,Z),j.appendChild(Z),j.appendChild(Q.element),Q.element.classList.add(`${Q.getClass("badge")}--positioned`),Q.wrapper=j,q.wrapper=j;return q},detach(){if(Q.wrapper&&Q.wrapper.contains(Q.element))Q.wrapper.removeChild(Q.element),Q.element.classList.remove(`${Q.getClass("badge")}--positioned`),document.body.appendChild(Q.element),Q.wrapper=void 0,q.wrapper=void 0;return q},destroy(){if($.destroy(),Q.wrapper){let Z=Q.wrapper.firstChild,j=Q.wrapper.parentNode;if(j&&Z)j.replaceChild(Z,Q.wrapper)}},addClass:(...Z)=>{return Q.addClass(...Z),q},removeClass:(...Z)=>{return Q.removeClass(...Z),q},on:(Z,j)=>{return Q.on(Z,j),q},off:(Z,j)=>{return Q.off(Z,j),q}};return q};var sQ=g(()=>{j$();_q=["error","primary","secondary","tertiary","success","warning","info"],Dq=["small","large"],Oq=["top-right","top-left","bottom-right","bottom-left"]});var Pq=(J={})=>{let $=SQ(J);try{return I(T,h(),S(bQ($)),hQ($),uQ($),fQ($),gQ($),EQ(),dQ($),v(),(q)=>pQ(vQ(q))(q))($)}catch(Q){throw console.error("Badge creation error:",Q),new Error(`Failed to create badge: ${Q.message}`)}},g9;var mQ=g(()=>{n();s();c();rQ();sQ();j$();g9=Pq});var M7=g(()=>{mQ()});var oQ=(J)=>{let $=new Map,Q=(j,K)=>`${j}_${K.toString()}`,q=(j,K)=>(Y)=>{try{j(Y)}catch(G){console.error(`Error in ${K} handler:`,G)}},Z=(j,K)=>{try{J.removeEventListener(j,K)}catch(Y){console.warn(`Failed to remove ${j} listener:`,Y)}};return{on(j,K,Y={}){let G=q(K,j),z=Q(j,K);return $.set(z,{original:K,enhanced:G,event:j,options:Y}),J.addEventListener(j,G,Y),this},off(j,K){let Y=Q(j,K),G=$.get(Y);if(G)Z(j,G.enhanced),$.delete(Y);return this},pause(){return $.forEach(({enhanced:j,event:K})=>{Z(K,j)}),this},resume(){return $.forEach(({enhanced:j,event:K,options:Y})=>{J.addEventListener(K,j,Y)}),this},destroy(){$.forEach(({enhanced:j,event:K})=>{Z(K,j)}),$.clear()},getHandlers(){return new Map($)},hasHandler(j,K){let Y=Q(j,K);return $.has(Y)}}};var p9=g(()=>{u6();u9()});var J9,R6,s9,I6,z6,r6,S6,W6;var a6=g(()=>{J9={LINEAR:"linear",CIRCULAR:"circular"},R6={FLAT:"flat",WAVY:"wavy"},s9={CHANGE:"change",COMPLETE:"complete"},I6={VARIANT:"linear",VALUE:0,MAX:100,BUFFER:0,SHAPE:"flat",SHOW_LABEL:!1,INDETERMINATE:!1},z6={CONTAINER:"progress",LINEAR:"progress--linear",CIRCULAR:"progress--circular",TRACK:"progress__track",INDICATOR:"progress__indicator",BUFFER:"progress__buffer",LABEL:"progress__label",INDETERMINATE:"progress--indeterminate",DISABLED:"progress--disabled",TEST:"progress--test",TRANSITION:"progress--transition"},r6={LINEAR:{MIN_HEIGHT:4,GAP:4,STOP_INDICATOR:4,HEIGHT:4},CIRCULAR:{SIZE:48,GAP:8},COMMON:{STROKE_WIDTH:4}},S6={THIN:4,THICK:8},W6={LINEAR:{AMPLITUDE:4,SPEED:1,FREQUENCY:2,INDETERMINATE_FREQUENCY:4,INDETERMINATE_AMPLITUDE:2,POWER:0.8,START_TRANSITION_END:0,END_TRANSITION_START:0.92},CIRCULAR:{AMPLITUDE:6,INDETERMINATE_AMPLITUDE:4,SPEED:1,FREQUENCY:10,INDETERMINATE_FREQUENCY:16,POWER:0.8,START_TRANSITION_END:0,END_TRANSITION_START:0.92}}});var O8=(J)=>{return Boolean(J&&typeof J==="object"&&Object.getPrototypeOf(J)===Object.getPrototypeOf({}))},P8=(J,$)=>{let Z=$.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),j=J;for(let K=0,Y=Z.length;K<Y;++K){let G=Z[K];if(G in j)j=j[G];else return}return j};var U9=(J,$=17)=>{if(!J||!(J instanceof HTMLElement))return{color:"",element:null};let Q=0,q=J;while(q&&Q<$){let K=window.getComputedStyle(q).backgroundColor;if(K.startsWith("var(")){let Y=K.match(/var\((--[\w-]+)\)/);if(Y){let G=Y[1];K=window.getComputedStyle(document.documentElement).getPropertyValue(G).trim()||"transparent"}}if(K&&K!=="transparent"&&K!=="rgba(0, 0, 0, 0)"&&K!=="rgba(0,0,0,0)")return{color:K,element:q};q=q.parentElement,Q++}let Z=window.getComputedStyle(document.body).backgroundColor;if(Z!=="transparent"&&Z!=="rgba(0, 0, 0, 0)")return{color:Z,element:document.body};return{color:"rgb(255, 255, 255)",element:null}};var R8=()=>{};function F6(J,$){let Q=`--${u}-${J}`;if($?.onThemeChange)Aq($.onThemeChange);let Z=getComputedStyle(document.body).getPropertyValue(Q).trim();if(!Z)Z=getComputedStyle(document.documentElement).getPropertyValue(Q).trim();if(!Z&&$?.fallback)return $.fallback;if(!Z)return"";if(typeof $?.alpha==="number"&&/\d+,\s*\d+,\s*\d+/.test(Z))return`rgba(${Z}, ${$.alpha})`;if(typeof $?.alpha==="number"&&/^#([\da-f]{6}|[\da-f]{3})$/i.test(Z)){let j=Z.replace("#",""),K,Y,G;if(j.length===3)K=parseInt(j[0]+j[0],16),Y=parseInt(j[1]+j[1],16),G=parseInt(j[2]+j[2],16);else K=parseInt(j.substring(0,2),16),Y=parseInt(j.substring(2,4),16),G=parseInt(j.substring(4,6),16);return`rgba(${K}, ${Y}, ${G}, ${$.alpha})`}return Z}var K$,P9=null,yq=()=>{if(P9)return;P9=new MutationObserver((J)=>{for(let $ of J)if($.type==="attributes"&&($.attributeName==="data-theme"||$.attributeName==="data-theme-mode")){K$.forEach((Q)=>Q());break}}),P9.observe(document.body,{attributes:!0,attributeFilter:["data-theme","data-theme-mode"]})},Aq=(J)=>{if(!P9)yq();return K$.add(J),()=>{K$.delete(J)}};var tQ=g(()=>{w6();K$=new Set;if(typeof window!=="undefined")window.addEventListener("unload",()=>{if(P9)P9.disconnect(),P9=null;K$.clear()})});var D7=(J,$)=>{let q=document.createElement("canvas").getContext("2d");if(!q)return`rgba(0, 0, 0, ${$})`;q.fillStyle=J;let Z=q.fillStyle;if(Z.startsWith("#")){let j=Z.substring(1),K=parseInt(j.substring(0,2),16),Y=parseInt(j.substring(2,4),16),G=parseInt(j.substring(4,6),16);return`rgba(${K}, ${Y}, ${G}, ${$})`}if(Z.startsWith("rgb")){let j=Z.match(/\d+/g);if(j){let[K,Y,G]=j;return`rgba(${K}, ${Y}, ${G}, ${$})`}}return`rgba(0, 0, 0, ${$})`};var nQ=(J,$)=>(Q,q)=>J(Q,q)?$(Q,q):Q,eQ=(...J)=>J.filter(Boolean).join(" ");var R9=g(()=>{U7();R8();tQ()});var O7=(J,$,Q)=>{let q=null,Z=()=>{if(q)clearTimeout(q);q=window.setTimeout(()=>{Q()},100)};if(typeof ResizeObserver!=="undefined"){let j=new ResizeObserver((K)=>{for(let Y of K){let{width:G}=Y.contentRect,z=parseFloat($.style.width||"0");if(Math.abs(G-z)>2)Z()}});return j.observe(J),()=>{if(q)clearTimeout(q);j.disconnect()}}else return window.addEventListener("resize",Z),()=>{if(q)clearTimeout(q);window.removeEventListener("resize",Z)}};var $0=(J,$,Q,q,Z,j,K,Y,G)=>{let z=Math.max(100,Math.abs(j-Z)*50),W=(j-Z)/z,X=W6.CIRCULAR.SPEED*2*Math.PI/1000;J.beginPath();for(let U=0;U<=z;U++){let _=Z+W*U,N=_*Y+G*X,F=Math.sin(N),L=Math.sign(F)*Math.pow(Math.abs(F),W6.CIRCULAR.POWER)*K,D=q+L,B=$+D*Math.cos(_),H=Q+D*Math.sin(_);if(U===0)J.moveTo(B,H);else J.lineTo(B,H)}J.stroke()},J0=(J,$,Q,q,Z,j=0,K="flat")=>{let{ctx:Y,width:G,height:z}=J,W=P7($.thickness),X=K==="wavy",U=Math.min(G,z),_=Z?W6.CIRCULAR.INDETERMINATE_AMPLITUDE:W6.CIRCULAR.AMPLITUDE,N=U/2-W/2,F=N*(_/100),k=X?y9(W,F):0,L=N-k,D=G/2,B=z/2;Y.clearRect(0,0,G,z);let V=(r6.CIRCULAR.GAP+2*W)/L,O=-Math.PI/2,M=2*Math.PI-V;Y.lineWidth=W,Y.lineCap="round",Y.lineJoin="round";let P=Z?W6.CIRCULAR.INDETERMINATE_FREQUENCY:W6.CIRCULAR.FREQUENCY;if(Z){let B6=j%1333/1333,w=(N9)=>{let U6=N9<=0.5?N9*2:2-N9*2;return 0.028+0.722*(U6<0.5?2*U6*U6:1-Math.pow(-2*U6+2,2)/2)},l=()=>{let N9=j/1568*2*Math.PI,U6=Math.floor(j/1333),h6=j%1333/1333,e6=0;if(h6>0.5){let Y7=(h6-0.5)*2;e6=0.722*(Y7<0.5?2*Y7*Y7:1-Math.pow(-2*Y7+2,2)/2)}return N9+(U6*0.722+e6)*2*Math.PI},a=w(B6)*2*Math.PI,i=l(),O6=O+i,J6=O6+a;Y.strokeStyle=F6("sys-color-primary-rgb",{alpha:0.12,fallback:"rgba(103, 80, 164, 0.12)"}),Y.beginPath();let h9=V/2;if(Y.arc(D,B,L,J6+h9,O6-h9+2*Math.PI),Y.stroke(),Y.strokeStyle=F6("sys-color-primary",{fallback:"#6750A4"}),X)$0(Y,D,B,L,O6,J6,k,P,j);else Y.beginPath(),Y.arc(D,B,L,O6,J6),Y.stroke();return}let R=Q/q,x=Math.max(R,0.001),A=0.95,C=M;if(R>=A){let $6=(R-A)/(1-A),B6=$6*$6;C=M+V*B6}if(R<0.99){let B6=O+C*x+V/2,w=O+M+V/2;if(B6<w)Y.strokeStyle=F6("sys-color-primary-rgb",{alpha:0.12,fallback:"rgba(103, 80, 164, 0.12)"}),Y.beginPath(),Y.arc(D,B,L,B6,w),Y.stroke()}Y.strokeStyle=F6("sys-color-primary",{fallback:"#6750A4"});let r=k;if(X){let $6=W6.CIRCULAR.START_TRANSITION_END,B6=W6.CIRCULAR.END_TRANSITION_START;if(R===0&&$6>0)r=0;else if(R>0&&R<=$6){let w=R/$6;r=k*Math.pow(w,2)}else if(R>=B6){let w=(R-B6)/(1-B6),l=1-Math.pow(1-w,2);r=k*(1-l)}if(R>=1)r=0}let Q6=O,X6=O+C*x;if(X)$0(Y,D,B,L,Q6,X6,r,P,j);else Y.beginPath(),Y.arc(D,B,L,Q6,X6),Y.stroke()};var Q0=g(()=>{a6();R9();Y$()});var R7=(J,$,Q)=>{J.strokeStyle=Q,J.lineWidth=$,J.lineCap="round"},X9=(J,$,Q,q,Z,j,K)=>{if(J.beginPath(),!Z||K.amplitude===0)J.moveTo($,q),J.lineTo(Q,q);else{let Y=$;for(let G=$;G<=Q;G+=1){let z=G*K.frequency+j*K.speed,W=Math.sin(z),X=Math.sign(W)*Math.pow(Math.abs(W),W6.LINEAR.POWER),U=q+X*K.amplitude;if(G===$)J.moveTo(G,U);else J.lineTo(G,U);Y=G}if(Y<Q){let G=Q*K.frequency+j*K.speed,z=Math.sin(G),W=Math.sign(z)*Math.pow(Math.abs(z),W6.LINEAR.POWER),X=q+W*K.amplitude;J.lineTo(Q,X)}}J.stroke()},q0=(J,$)=>{let[Q,q,Z]=$;if(J<=Q)return 0.08+0.5814790000000001*(J/Q);else if(J<=q)return 0.661479;else if(Z&&J<=Z)return 0.661479;return Z?0.661479-0.5814790000000001*((J-Z)/(1-Z)):0.08},Z0=(J,$)=>{for(let Z=0;Z<$.length-1;Z++){let[j,K]=$[Z],[Y,G]=$[Z+1];if(J<=Y){let z=(J-j)/(Y-j);return K+(G-K)*z}}let[Q,q]=$[$.length-1];return q+(220-q)*((J-Q)/(1-Q))},j0=(J,$,Q,q,Z,j,K=0,Y=!0,G="flat")=>{let{ctx:z,width:W,height:X}=J,U=P7($.thickness),_=X/2,N=G==="wavy",F=U/2,k=W-F*2,L=r6.LINEAR.GAP,D=Q/q,B=0.001,H=Math.max(D,0.001),V=F+k*H;z.clearRect(0,0,W,X);let O=F6("sys-color-primary",{fallback:"#6750A4"}),M=F6("sys-color-primary-rgb",{alpha:0.12,fallback:"rgba(103, 80, 164, 0.12)"});if(j){let X6=K%2000/2000,$6=L*2+U/2,B6=q0(X6,[0.3665,0.6915]),w=Z0(X6,[[0,-120],[0.2,0],[0.5915,83.6714]]),l=X6<=0.5?0:q0(X6,[0.8335,null,0.8335]),a=X6<=0.5?-54.8889:Z0(X6,[[0.5,-54.8889],[0.7,25.0389],[0.85,83.6714]]),O6=[{scale:B6,translate:w,start:Math.max(F,F+k*w/100),end:Math.min(W-F,F+k*w/100+k*B6)},{scale:l,translate:a,start:Math.max(F,F+k*a/100),end:Math.min(W-F,F+k*a/100+k*l)}].filter((U6)=>U6.end>U6.start).sort((U6,h6)=>U6.start-h6.start),J6=[];for(let U6=0;U6<O6.length;U6++){let h6=O6[U6];if(J6.length===0)J6.push({...h6});else{let e6=J6[J6.length-1];if(h6.start<=e6.end+$6)e6.end=Math.max(e6.end,h6.end);else J6.push({...h6})}}R7(z,U,M);let h9=U;if(J6.length===0)X9(z,F,W-F,_,!1,0,{amplitude:0,frequency:0,speed:0});else{let U6=J6[0].start;if(U6-F>$6+h9)X9(z,F,U6-$6,_,!1,0,{amplitude:0,frequency:0,speed:0});if(J6.length===2){if(J6[1].start-J6[0].end>2*$6+h9)X9(z,J6[0].end+$6,J6[1].start-$6,_,!1,0,{amplitude:0,frequency:0,speed:0})}let e6=J6[J6.length-1].end;if(W-F-e6>$6+h9)X9(z,e6+$6,W-F,_,!1,0,{amplitude:0,frequency:0,speed:0})}R7(z,U,O);let N9={amplitude:N?y9(U,W6.LINEAR.INDETERMINATE_AMPLITUDE):0,frequency:W6.LINEAR.INDETERMINATE_FREQUENCY*2*Math.PI/100,speed:0};J6.forEach((U6)=>{X9(z,U6.start,U6.end,_,N,K,N9)});return}let P=W6.LINEAR.START_TRANSITION_END,R=W6.LINEAR.END_TRANSITION_START,y=(L+U)/2;R7(z,U,M);let x=D===0?F+U+L:Math.min(V+y,W-F);X9(z,x,W-F,_,!1,0,{amplitude:0,frequency:0,speed:0}),R7(z,U,O);let A=D>=1?W-F:Math.max(F,V-y),C;if(D===0)C=F+(N?0.1:0);else{let Q6=U/2;C=Math.max(F+Q6,A)}let r=N?y9(U,W6.LINEAR.AMPLITUDE):0;if(N){if(D===0&&P>0)r=0;else if(H<=P)r*=Math.pow(H/P,2);else if(H>=R)r*=Math.pow((1-H)/(1-R),2)}if(X9(z,F,C,_,N,K,{amplitude:r,frequency:W6.LINEAR.FREQUENCY*2*Math.PI/100,speed:W6.LINEAR.SPEED*2*Math.PI/1000}),Z>0&&Z>Q){R7(z,U,F6("sys-color-secondary-container",{fallback:"#E8DEF8"}));let Q6=F+k*(Z/q);X9(z,V,Q6,_,!1,0,{amplitude:0,frequency:0,speed:0})}if(D<1&&Y){let Q6=Math.min(U*0.5,2);z.beginPath(),z.arc(W-F,_,Q6,0,2*Math.PI),z.fillStyle=O,z.fill()}};var K0=g(()=>{a6();R9();Y$()});var P7=(J="thin")=>{if(typeof J==="number")return J;return J==="thick"?S6.THICK:S6.THIN},y9=(J,$,Q)=>{let Z=1+0.3*(4-J)/(J+4),j=$*Z;return Q?Math.min(j,Q):j},y8=(J,$,Q,q)=>{let Z=window.devicePixelRatio||1,j=P7(q?.thickness),{ctx:K}=$;if(Q){let Y=Math.max(24,Math.min(q?.size??r6.CIRCULAR.SIZE,240)),G=0;if(q?.shape==="wavy"){let W=Y/2-j/2,X=q?.indeterminate?W6.CIRCULAR.INDETERMINATE_AMPLITUDE:W6.CIRCULAR.AMPLITUDE,U=W*(X/100);G=y9(j,U)}let z=Y+G*2;J.style.width=J.style.height=`${z}px`,J.width=J.height=Math.round(z*Z),$.width=$.height=z}else{let Y=J.parentElement;if(!Y)return;let G=Math.max(Y.getBoundingClientRect().width||Y.offsetWidth,200),z=0;if(q?.shape==="wavy"){let X=W6.LINEAR.AMPLITUDE,U=y9(j,X);z=Math.ceil(U*2)}let W=j+z;J.style.width=`${G}px`,J.style.height=`${W}px`,J.width=Math.round(G*Z),J.height=Math.round(W*Z),$.width=G,$.height=W}K.setTransform(1,0,0,1,0,0),K.scale(Z,Z)},Y0=(J,$,Q)=>{let q={canvas:J,ctx:J.getContext("2d"),width:0,height:0,pixelRatio:window.devicePixelRatio||1};return y8(J,q,$,Q),q},G0=(J)=>($)=>{let q=J.variant===J9.CIRCULAR,Z=document.createElement("canvas");Z.className=`${$.getClass(z6.CONTAINER)}-canvas`,Z.style.maxWidth="100%",Z.style.maxHeight="100%",Z.style.boxSizing="border-box",$.element.appendChild(Z);let j=null,K=null,Y=null,G=J.thickness,z=J.shape,W=J.size??r6.CIRCULAR.SIZE,X=J.value??0,U=X,_=0,N=()=>{try{return j=Y0(Z,q,{...J,thickness:G,shape:z,size:W}),$.ctx=j.ctx,!0}catch(P){return console.warn("Canvas initialization failed:",P),!1}};if(!N())requestAnimationFrame(()=>{if(!N())setTimeout(N,100)});$.canvas=Z,$.animationTime=0,$.animationId=null,$.wavyAnimationId=null,$.valueAnimationId=null,$.currentShape=z;let F=(P=0)=>{if(!$.state?.indeterminate)return;if($.animationId)cancelAnimationFrame($.animationId),$.animationId=null;let R=0,y=(x)=>{if(!$.state?.indeterminate){k();return}if(R===0)R=x-P;let A=x-R;$.animationTime=A,B(A),$.animationId=requestAnimationFrame(y)};$.animationId=requestAnimationFrame(y)},k=()=>{if($.animationId)cancelAnimationFrame($.animationId),$.animationId=null},L=(P=0)=>{if($.wavyAnimationId)cancelAnimationFrame($.wavyAnimationId),$.wavyAnimationId=null;let R=0,y=(x)=>{if(R===0)R=x-P;let A=x-R;$.animationTime=A,B(A),$.wavyAnimationId=requestAnimationFrame(y)};$.wavyAnimationId=requestAnimationFrame(y)},D=()=>{if($.wavyAnimationId)cancelAnimationFrame($.wavyAnimationId),$.wavyAnimationId=null},B=(P=0)=>{if(!j)return;let R=$.state,y=R?.value??J.value??0,x=R?.max??J.max??100,A=R?.buffer??J.buffer??0,C=R?.indeterminate??J.indeterminate??!1,r={...J,thickness:G,shape:z,size:W};y8(Z,j,q,r);let Q6=C||!R?y:X;if(q)J0(j,r,Q6,x,C,P,z);else j0(j,r,Q6,x,A,C,P,!0,z)},H=()=>{if(!j)return;try{let P=Y0(Z,q,{...J,thickness:G,shape:z,size:W});$.ctx=P.ctx,Object.assign(j,P),B()}catch(P){console.warn("Canvas resize failed:",P)}};K=O7($.element,Z,()=>{if($.element.offsetWidth>0||q)H()});let V=F6("sys-color-primary",{onThemeChange:B});Y=typeof V==="function"?V:null;let O=()=>{if(!j){requestAnimationFrame(O);return}if(B(),$.state?.indeterminate)if(z==="wavy"||!q)L();else F();else if(z==="wavy")L()};requestAnimationFrame(O);let M=(P)=>{if(!j)return;let R={...J,thickness:G,shape:z,size:W,...P};y8(Z,j,q,R),B()};if($.setThickness=(P)=>{G=P,M({thickness:P})},$.setSize=(P)=>{if(!q)return;W=Math.max(24,Math.min(P,240)),M({size:W})},$.getSize=()=>q?W:void 0,$.setShape=(P)=>{if(z===P)return;if(z=P,$.currentShape=z,M({shape:P}),$.state?.indeterminate){let R=$.animationTime||0;if(D(),k(),P==="wavy"||!q)L(R);else F(R)}else if(P==="wavy"){if(!$.wavyAnimationId)L()}else D();B($.animationTime||0)},$.setValue=(P,R=!0)=>{if(U=Math.max(0,Math.min($.state.max,P)),$.state.indeterminate)$.setIndeterminate(!1);if($.valueAnimationId&&R)return;if($.valueAnimationId)cancelAnimationFrame($.valueAnimationId),$.valueAnimationId=null;if(!R){if(X=U,B(),z==="wavy"&&!$.state.indeterminate&&!$.wavyAnimationId)L();if(U>=$.state.max)$.element.dispatchEvent(new CustomEvent("complete",{detail:{value:U,max:$.state.max}}));return}let y=X,x=performance.now(),A=x-_,C=300;if(A<300&&_>0)C=Math.max(100,A*0.9);_=x;let r=(Q6)=>{let X6=Q6-x,$6=Math.min(X6/C,1),B6=$6<0.5?4*$6*$6*$6:1-Math.pow(-2*$6+2,3)/2;if(X=y+(U-y)*B6,!$.wavyAnimationId||z!=="wavy")B(Q6);if($6<1)$.valueAnimationId=requestAnimationFrame(r);else{if(X=U,$.valueAnimationId=null,z==="wavy"&&!$.state.indeterminate&&!$.wavyAnimationId)L();if(U>=$.state.max)$.element.dispatchEvent(new CustomEvent("complete",{detail:{value:U,max:$.state.max}}))}};$.valueAnimationId=requestAnimationFrame(r)},$.setIndeterminate=(P)=>{if(!$.state){console.warn("[Progress] No state available for setIndeterminate");return}if($.state.indeterminate=P,P){if($.valueAnimationId)cancelAnimationFrame($.valueAnimationId),$.valueAnimationId=null;if(X=$.state.value,z==="wavy"||!q)L();else F()}else{if(X=$.state.value,k(),z==="wavy"){if(!$.wavyAnimationId)L()}else D();B()}},$.hide=()=>{$.element.classList.add($.getClass(z6.TRANSITION)),$.element.style.opacity="0";let P=()=>{$.element.style.display="none",$.element.removeEventListener("transitionend",P)};return $.element.addEventListener("transitionend",P),[$.animationId,$.wavyAnimationId,$.valueAnimationId].forEach((R)=>{if(R)cancelAnimationFrame(R)}),$.animationId=$.wavyAnimationId=$.valueAnimationId=null,$},$.show=()=>{if($.element.classList.add($.getClass(z6.TRANSITION)),$.element.style.display="",$.element.style.opacity="0",$.element.offsetHeight,$.element.style.opacity="1",$.state?.indeterminate)if(z==="wavy"||!q)L();else F();else if(z==="wavy")L();return $},$.isVisible=()=>$.element.style.display!=="none"&&$.element.style.opacity!=="0",$.lifecycle){let P=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{if(K)K();if(Y)Y();[$.animationId,$.wavyAnimationId,$.valueAnimationId].forEach((R)=>{if(R)cancelAnimationFrame(R)}),P()}}return Object.assign($,{startWavyAnimation:L,stopWavyAnimation:D,startIndeterminateAnimation:F,stopIndeterminateAnimation:k}),{...$,canvas:Z,get ctx(){return j?.ctx},draw:B,resize:H}};var Y$=g(()=>{a6();R9();Q0();K0()});var z0=(J)=>($)=>{if(J.indeterminate&&$.element)p($.element,z6.INDETERMINATE),$.element.removeAttribute("aria-valuenow");if($.element){let j=$.getClass?.(z6.CONTAINER)||"";$.element.classList.remove(`${j}--thin`,`${j}--thick`)}if(J.shape&&J.shape!==R6.FLAT&&$.element){if(!$.element.classList.contains($.getClass?.(z6.CIRCULAR)||"")){let K=$.getClass?.(z6.CONTAINER)||"";p($.element,`${K}--${J.shape}`)}}let Q={value:J.value??0,max:J.max??100,buffer:J.buffer??0,indeterminate:J.indeterminate===!0,thickness:J.thickness??"thin",shape:J.shape??R6.FLAT,labelFormatter:J.labelFormatter??((j,K)=>`${Math.round(j/K*100)}%`),showLabel:J.showLabel},q=$.lifecycle?.init,Z=$.lifecycle?.destroy;return $.state=Q,$.lifecycle={init:()=>{if(requestAnimationFrame(()=>{try{if(Q.indeterminate)$.setIndeterminate?.(!0);else if($.setValue?.(Q.value),J.buffer!==void 0)$.setBuffer?.(Q.buffer);if(Q.shape!==R6.FLAT&&$.setShape)$.setShape(Q.shape);if(Q.thickness)if($.setThickness)$.setThickness(Q.thickness);else $.state.thickness=Q.thickness}catch(j){console.error("Error initializing progress state:",j)}}),q)q()},destroy:()=>{if(Z)Z()}},{...$,state:Q}};var W0=g(()=>{a6();p9()});var U0=(J)=>($)=>{let{element:Q,getClass:q,canvas:Z}=$,j=Q.classList.contains(q(z6.CIRCULAR)),K=(W,X)=>{Q.dispatchEvent(new CustomEvent(W,{detail:X}))},Y=(W,X)=>{Q.setAttribute("aria-valuenow",W.toString());let U=$.label;if(U){let _=J.label?.formatter||((N,F)=>`${Math.round(N/F*100)}%`);U.textContent=_(W,X)}if(typeof $.draw==="function")$.draw()},G=(W)=>{if(W){if(p(Q,z6.INDETERMINATE),Q.removeAttribute("aria-valuenow"),!j){if((J.shape?.getShape()||R6.FLAT)!=="wavy"&&$.startIndeterminateAnimation)$.startIndeterminateAnimation()}}else if(K6(Q,z6.INDETERMINATE),$.stopIndeterminateAnimation)$.stopIndeterminateAnimation();if(typeof $.draw==="function")$.draw()};if(J.state.isIndeterminate())G(!0);let z={element:Q,track:Z,indicator:Z,buffer:Z,getClass:q,getValue(){return J.value.getValue()},setValue(W,X=!0){let U=J.value.getValue(),_=J.value.getMax();if(J.value.setValue(W),U!==W){Q.setAttribute("aria-valuenow",W.toString());let N=$.label;if(N){let k=J.label?.formatter||((L,D)=>`${Math.round(L/D*100)}%`);N.textContent=k(W,_)}let F={value:W,max:_};if(K(s9.CHANGE,F),$.setValue&&typeof $.setValue==="function")$.setValue(W,X);else Y(W,_)}return z},getMax(){return J.value.getMax()},getBuffer:()=>J.buffer.getBuffer(),setBuffer(W){if(J.buffer.setBuffer(W),!J.state.isIndeterminate()&&typeof $.draw==="function")$.draw();return z},setIndeterminate(W){if(J.state.isIndeterminate()===W)return z;return J.state.setIndeterminate(W),G(W),z},isIndeterminate:()=>J.state.isIndeterminate(),showLabel(){if(J.label?.show)J.label.show();return z},hideLabel(){if(J.label?.hide)J.label.hide();return z},setLabelFormatter(W){if(J.label?.format)J.label.format(W);let X=$.label||$.state?.label;if(X)X.textContent=W(J.value.getValue(),J.value.getMax());return z},getThickness(){return J.thickness?.getThickness()||S6.THIN},setThickness(W){if(J.thickness)J.thickness.setThickness(W);if($.setThickness)$.setThickness(W);return z},getShape(){if(J.shape&&typeof J.shape.getShape==="function")return J.shape.getShape();return R6.FLAT},setShape(W){return $.setShape?.(W),z},setSize(W){if($.setSize)$.setSize(W);return z},getSize(){return $.getSize?$.getSize():void 0},enable(){return J.disabled.enable(),z},disable(){return J.disabled.disable(),z},isDisabled:J.disabled.isDisabled,hide(){if($.hide)$.hide();return z},show(){if($.show)$.show();return z},isVisible(){return $.isVisible?$.isVisible():Q.style.display!=="none"},on(W,X){return Q.addEventListener(W,X),z},off(W,X){return Q.removeEventListener(W,X),z},addClass(...W){return W.forEach((X)=>Q.classList.add(X)),z},destroy(){J.lifecycle.destroy()},disabled:{enable(){J.disabled.enable()},disable(){J.disabled.disable()},isDisabled:J.disabled.isDisabled},lifecycle:{destroy(){J.lifecycle.destroy()}}};if($.state?.showLabel===!0){if(J.label?.show)J.label.show()}return z};var X0=g(()=>{a6();p9()});var wq,B0=(J={})=>{return b(wq,J,"progress")},F0=(J)=>{let $=J.indeterminate===!0,Q=J.variant===J9.CIRCULAR,q={role:"progressbar","aria-valuemin":"0","aria-valuemax":(J.max||100).toString()};if(!$&&J.value!==void 0)q["aria-valuenow"]=J.value.toString();if(J.disabled===!0)q["aria-disabled"]="true";let Z=[J.class,z6.CONTAINER,Q?z6.CIRCULAR:z6.LINEAR].filter(Boolean);if(!Q&&J.shape&&J.shape!==R6.FLAT)Z.push(`${z6.CONTAINER}--${J.shape}`);return f(J,{tag:"div",attributes:q,className:Z})},H0=(J)=>{if(!J.state)J.state={value:0,max:100,buffer:0,indeterminate:!1,thickness:"thin",shape:I6.SHAPE,labelFormatter:($,Q)=>`${Math.round($/Q*100)}%`};return{value:{getValue:()=>J.state.value,setValue:($)=>{if(J.state){let Q=Math.max(0,Math.min(J.state.max,$));if(J.state.previousValue=J.state.value,J.state.value=Q,J.state.label)J.state.label.textContent=J.state.labelFormatter(Q,J.state.max);if(typeof J.setValue==="function")J.setValue(Q);else if(J.draw)J.draw()}},getMax:()=>J.state.max},buffer:{getBuffer:()=>J.state.buffer,setBuffer:($)=>{J.state.buffer=Math.max(0,Math.min(J.state.max,$))}},disabled:{enable:()=>J.disabled?.enable?.()||void 0,disable:()=>J.disabled?.disable?.()||void 0,isDisabled:()=>J.disabled?.isDisabled?.()||!1},label:{show:()=>{if(!J.state.label){let $=document.createElement("div");$.className=`${J.getClass(z6.LABEL)}`,$.textContent=J.state.labelFormatter(J.state.value,J.state.max),J.element.appendChild($),J.state.label=$,J.label=$}},hide:()=>{if(J.state.label)J.state.label.remove(),J.state.label=void 0,J.label=void 0},format:($)=>{J.state.labelFormatter=$},formatter:J.state.labelFormatter},thickness:{getThickness:()=>{let $=J.state.thickness;if($==="thin")return S6.THIN;else if($==="thick")return S6.THICK;else if(typeof $==="number")return $;return S6.THIN},setThickness:($)=>{if(J.state.thickness=$,J.draw)J.draw()}},shape:{getShape:()=>J.state.shape,setShape:($)=>{if(J.state.shape=$,J.setShape)J.setShape($)}},state:{setIndeterminate:($)=>{if(J.state){if(J.state.indeterminate=$,typeof J.setIndeterminate==="function")J.setIndeterminate($);else if(J.draw)J.draw()}},isIndeterminate:()=>J.state.indeterminate},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()||void 0}}};var M0=g(()=>{m();a6();wq={variant:I6.VARIANT,value:I6.VALUE,max:I6.MAX,buffer:I6.BUFFER,showLabel:I6.SHOW_LABEL,thickness:"thin",shape:I6.SHAPE}});var k0={};Y8(k0,{default:()=>G$});var xq=(J={})=>{let $=B0(J);try{let Q=I(T,h(),S(F0($)),Y6($),G6($),z0($),G0($),(q)=>{return U0(H0(q))(q)},v())($);if(Q.lifecycle?.init)Q.lifecycle.init();return Q}catch(Q){throw console.error("Progress creation error:",Q),new Error(`Failed to create progress: ${Q.message}`)}},G$;var A8=g(()=>{n();s();c();Y$();W0();X0();M0();G$=xq});var Tq=async(J)=>{let{default:$}=await Promise.resolve().then(() => (A8(),k0));return $(J)},N0=(J)=>($)=>{if(!J.progress)return $;let Q={},q=typeof J.progress==="boolean"?{variant:"circular",size:20,thickness:2,indeterminate:!0}:(()=>{let{on:W,...X}=J.progress;if(W)Q=W;return{variant:"circular",size:20,thickness:2,indeterminate:!0,...X}})(),Z=null,j=null,K=!1,Y="",G=async()=>{if(Z)return Z;if(!j)j=Tq(q).then((W)=>{return Z=W,p(Z.element,$.getClass("button-progress")),Z.element.style.display="none",Object.entries(Q).forEach(([X,U])=>{Z.on(X,U)}),$.progress=Z,Z});return j},z=()=>{let W=$.element.querySelector(`.${$.getClass("button-icon")}`);if(W&&W.nextSibling)return W.nextSibling;return $.element.firstChild};if($.showProgress=async function(){let W=await G();if(W.element){if(!$.element.contains(W.element)){let U=z();if(U)$.element.insertBefore(W.element,U);else $.element.appendChild(W.element)}W.element.style.display="",p($.element,`${$.getClass("button")}--progress`);let X=$.element.querySelector(`.${$.getClass("button-icon")}`);if(X instanceof HTMLElement)X.style.display="none"}return $},$.showProgressSync=function(){return $.showProgress(),$},$.hideProgress=async function(){if(!Z)return $;Z.element.style.display="none",K6($.element,`${$.getClass("button")}--progress`);let W=$.element.querySelector(`.${$.getClass("button-icon")}`);if(W instanceof HTMLElement)W.style.display="";return $},$.hideProgressSync=function(){return $.hideProgress(),$},$.setProgress=async function(W){return(await G()).setValue(W),$},$.setProgressSync=function(W){return $.setProgress(W),$},$.setIndeterminate=async function(W){return(await G()).setIndeterminate(W),$},$.setIndeterminateSync=function(W){return $.setIndeterminate(W),$},$.setLoading=async function(W,X){if(W&&!K){if($.setText&&$.getText)Y=$.getText();if(K=!0,await $.showProgress(),$.disabled?.disable)$.disabled.disable();if(X&&$.setText)$.setText(X)}else if(!W&&K){if(K=!1,await $.hideProgress(),$.disabled?.enable)$.disabled.enable();if(X&&$.setText)$.setText(X);else if(Y&&$.setText)$.setText(Y)}return $},$.setLoadingSync=function(W,X){return $.setLoading(W,X),$},$.lifecycle){let W=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(Z)Z.destroy();if(Z&&Z.element.parentNode)Z.element.parentNode.removeChild(Z.element);W()}}if(J.showProgress)G().then(()=>{$.showProgress()});return $};var L0=g(()=>{p9()});var V0=(J={},$={})=>{let Q={...J},q=T6(),Z=new Map,j=$.middleware||[],K=(G,z)=>{q.emit("change",G,z)},Y=(G,z)=>{return j.reduce((W,X)=>X(W,z),G)};return{getState:()=>{let G={};return Z.forEach((z,W)=>{G[W]=z(Q)}),{...Q,...G}},setState:(G)=>{let z={...Q},W=typeof G==="function"?G(Q):{...Q,...G};Q=Y(W,z),K(Q,z)},subscribe:(G)=>q.on("change",G),derive:(G,z)=>{return Z.set(G,z),()=>{Z.delete(G)}},select:(G)=>G(Q),reset:()=>{Q={...J},K(Q,{})}}},_0=(J,$)=>{return console.log("State change:",{old:$,new:J,diff:Object.keys(J).reduce((Q,q)=>{if(J[q]!==$[q])Q[q]={from:$[q],to:J[q]};return Q},{})}),J},D0=(J)=>($)=>Object.keys($).reduce((Q,q)=>{if(J($[q],q))Q[q]=$[q];return Q},{});var O0=()=>{};var P0=(J,$={})=>{let Q=!1,q=T6();return{onMount:(Z)=>q.on("mount",Z),onUnmount:(Z)=>q.on("unmount",Z),mount:()=>{if(!Q)Q=!0,q.emit("mount")},unmount:()=>{if(Q)Q=!1,q.emit("unmount"),q.clear()},isMounted:()=>Q,destroy(){if(Q)this.unmount();if($.events)$.events.destroy();if($.text){let Z=$.text.getElement();if(Z)Z.remove()}if($.icon){let Z=$.icon.getElement();if(Z)Z.remove()}if(J)J.remove()}}};var R0=()=>{};var y0=(J)=>{return{enable(){return J.disabled=!1,J.removeAttribute("disabled"),this},disable(){return J.disabled=!0,J.setAttribute("disabled","true"),this},toggle(){if(J.disabled)this.enable();else this.disable();return this},isDisabled(){return J.disabled===!0}}};var w8=(J,$,Q,q,Z,j)=>{if(q<0||Z<0)return;let K=typeof j==="number"?[j,j,j,j]:j,[Y,G,z,W]=K;J.beginPath(),J.moveTo($+Y,Q),J.lineTo($+q-G,Q),J.quadraticCurveTo($+q,Q,$+q,Q+G),J.lineTo($+q,Q+Z-z),J.quadraticCurveTo($+q,Q+Z,$+q-z,Q+Z),J.lineTo($+W,Q+Z),J.quadraticCurveTo($,Q+Z,$,Q+Z-W),J.lineTo($,Q+Y),J.quadraticCurveTo($,Q,$+Y,Q),J.closePath()},Iq=(J,$,Q,q,Z,j,K)=>{if(J.save(),K)J.fillStyle=K;w8(J,$,Q,q,Z,j),J.fill(),J.restore()},x8=(J,$,Q,q,Z,j)=>{return J.save(),w8(J,$,Q,q,Z,j),J.clip(),()=>J.restore()},T8=(J,$,Q,q,Z,j,K,Y)=>{if(q<0||Z<0)return;if(J.save(),Y)J.fillStyle=Y;J.beginPath(),J.moveTo($+j,Q),J.lineTo($+q-K,Q),J.quadraticCurveTo($+q,Q,$+q,Q+K),J.lineTo($+q,Q+Z-K),J.quadraticCurveTo($+q,Q+Z,$+q-K,Q+Z),J.lineTo($+j,Q+Z),J.quadraticCurveTo($,Q+Z,$,Q+Z-j),J.lineTo($,Q+j),J.quadraticCurveTo($,Q,$+j,Q),J.closePath(),J.fill(),J.restore()},I8=(J,$,Q,q)=>{if(q)J.fillStyle=q,J.fillRect(0,0,$,Q);else J.clearRect(0,0,$,Q)};var z$=(J)=>{let j=J;for(let X=0;X<4;X++){let F=j*j,L=1.6*(F*j)+-1.8000000000000003*F+1.2000000000000002*j-J,D=4.800000000000001*F+-3.6000000000000005*j+1.2000000000000002;if(Math.abs(L)<0.00001)break;j=j-L/D}let K=0,Y=3-K,G=1-K-Y,z=j*j,W=z*j;return G*W+Y*z+K*j},S8,Sq;var A0=g(()=>{S8={SHORT:100,MEDIUM:225,LONG:375,EXTRA_LONG:500},Sq={linear:(J)=>J,easeIn:(J)=>J*J,easeOut:(J)=>J*(2-J),easeInOut:(J)=>J<0.5?2*J*J:-1+(4-2*J)*J,materialStandard:z$}});class w0{animationId=null;start(J){this.stop();let $=(Q)=>{J(Q),this.animationId=requestAnimationFrame($)};this.animationId=requestAnimationFrame($)}stop(){if(this.animationId!==null)cancelAnimationFrame(this.animationId),this.animationId=null}get isRunning(){return this.animationId!==null}}class x0{cleanupFunctions=[];add(J){if(J)this.cleanupFunctions.push(J)}cleanup(){this.cleanupFunctions.forEach((J)=>J()),this.cleanupFunctions=[]}}var b8=(J,$,Q)=>{let q=window.devicePixelRatio||1,Z=J.getContext("2d");return J.style.width=`${$}px`,J.style.height=`${Q}px`,J.width=Math.round($*q),J.height=Math.round(Q*q),Z.setTransform(1,0,0,1,0,0),Z.scale(q,q),{canvas:J,ctx:Z,width:$,height:Q,pixelRatio:q}},v8=(J,$,Q)=>{let{canvas:q,ctx:Z,pixelRatio:j}=J;q.style.width=`${$}px`,q.style.height=`${Q}px`,q.width=Math.round($*j),q.height=Math.round(Q*j),J.width=$,J.height=Q,Z.setTransform(1,0,0,1,0,0),Z.scale(j,j)},C8=(J,$)=>{if(J())return $?.(),!0;return requestAnimationFrame(()=>{if(J())$?.();else setTimeout(()=>{if(J())$?.()},100)}),!1},W$=(J,$)=>{let Q=F6(`sys-color-${J}`,{onThemeChange:$});return typeof Q==="function"?Q:null},E8=(J,$={})=>{let Q=document.createElement("canvas");return Q.className=J,Object.assign(Q.style,{position:"absolute",width:"100%",height:"100%",pointerEvents:"none",...$}),Q};var T0=g(()=>{R9()});var U$=g(()=>{A0();T0()});var y7=g(()=>{n();p9();m();O0();R0();U$();U$();w6();L8();R9()});var I0=({disabled:J,lifecycle:$})=>(Q)=>{let q={setText:(K)=>{return Q.text.setText(K),q},getText:()=>Q.text.getText(),getElement:()=>Q.text.getElement()},Z={setIcon:(K)=>{return Q.icon.setIcon(K),Z},getIcon:()=>Q.icon.getIcon(),getElement:()=>Q.icon.getElement()},j={element:Q.element,text:q,icon:Z,disabled:J,lifecycle:$,getClass:Q.getClass,on:(K,Y)=>{if(Q.on)Q.on(K,Y);return j},off:(K,Y)=>{if(Q.off)Q.off(K,Y);return j},addClass:(...K)=>{if(Q.addClass)Q.addClass(...K);else p(Q.element,...K);return j},getValue:()=>Q.element.value,setValue(K){return Q.element.value=K,j},enable(){return J.enable(),j},disable(){return J.disable(),j},setText(K){return Q.text.setText(K),j.updateCircularStyle(),j},getText(){return Q.text.getText()},hasIcon(){let K=Q.icon.getElement();return!!K&&!!K.innerHTML.trim()&&!!K.parentNode},setIcon(K){let Y=Q.componentName||"button",G=Q.getClass(Y);if(!K){let z=Q.icon.getElement();if(z&&z.parentNode)z.parentNode.removeChild(z),Q.icon.getElement=()=>null,Q.icon.getIcon=()=>"";Q.element.classList.remove(`${G}--icon`)}else if(!j.hasIcon()){let z=document.createElement("span");if(z.className=`${Q.getClass("button-icon")}`,z.innerHTML=K,Q.element.firstChild)Q.element.insertBefore(z,Q.element.firstChild);else Q.element.appendChild(z);Q.icon.getElement=()=>z,Q.icon.getIcon=()=>K,Q.element.classList.add(`${G}--icon`)}else{let z=Q.icon.getElement();if(z)z.innerHTML=K}return j.updateCircularStyle(),j},getIcon(){return j.hasIcon()?Q.icon.getIcon():""},setVariant(K){let Y=Q.componentName||"button",G=Q.getClass(Y);return["filled","tonal","outlined","elevated","text"].map((W)=>`${G}--${W}`).forEach((W)=>{Q.element.classList.remove(W)}),Q.element.classList.add(`${G}--${K}`),j},getVariant(){let K=Q.componentName||"button",Y=Q.getClass(K),G=["filled","tonal","outlined","elevated","text"];for(let z of G)if(Q.element.classList.contains(`${Y}--${z}`))return z;return"filled"},getSize(){let K=Q.componentName||"button",Y=Q.getClass(K),G=["xs","s","m","l","xl"];for(let z of G)if(Q.element.classList.contains(`${Y}--${z}`))return z;return"s"},setSize(K){let Y=Q.componentName||"button",G=Q.getClass(Y);return["xs","s","m","l","xl"].map((W)=>`${G}--${W}`).forEach((W)=>{Q.element.classList.remove(W)}),Q.element.classList.add(`${G}--${K}`),j},getShape(){let K=Q.componentName||"button",Y=Q.getClass(K),G=["round","square"];for(let z of G)if(Q.element.classList.contains(`${Y}--${z}`))return z;return"round"},setShape(K){let Y=Q.componentName||"button",G=Q.getClass(Y);return["round","square"].map((W)=>`${G}--${W}`).forEach((W)=>{Q.element.classList.remove(W)}),Q.element.classList.add(`${G}--${K}`),j},setActive(K){if(K)Q.element.classList.add(`${Q.getClass("button")}--active`);else Q.element.classList.remove(`${Q.getClass("button")}--active`);return j},setAriaLabel(K){return Q.element.setAttribute("aria-label",K),j},destroy(){$.destroy()},updateCircularStyle(){let K=Q.text.getText()!=="",Y=j.hasIcon();if(!K)p(Q.element,"button--circular"),K6(Q.element,"button--icon");else K6(Q.element,"button--circular");if(Y&&K)p(Q.element,"button--icon")}};if(Q.progress)j.progress=Q.progress;if(Q.showProgress)j.showProgress=async()=>{return await Q.showProgress(),j};if(Q.showProgressSync)j.showProgressSync=()=>{return Q.showProgressSync(),j};if(Q.hideProgress)j.hideProgress=async()=>{return await Q.hideProgress(),j};if(Q.hideProgressSync)j.hideProgressSync=()=>{return Q.hideProgressSync(),j};if(Q.setProgress)j.setProgress=async(K)=>{return await Q.setProgress(K),j};if(Q.setProgressSync)j.setProgressSync=(K)=>{return Q.setProgressSync(K),j};if(Q.setIndeterminate)j.setIndeterminate=async(K)=>{return await Q.setIndeterminate(K),j};if(Q.setIndeterminateSync)j.setIndeterminateSync=(K)=>{return Q.setIndeterminateSync(K),j};if(Q.setLoading)j.setLoading=async(K,Y)=>{return await Q.setLoading(K,Y),j};if(Q.setLoadingSync)j.setLoadingSync=(K,Y)=>{return Q.setLoadingSync(K,Y),j};return j};var S0=g(()=>{y7()});var A7,w7,x7,T7,h8,A9;var u8=g(()=>{A7={FILLED:"filled",TONAL:"tonal",OUTLINED:"outlined",ELEVATED:"elevated",TEXT:"text"},w7={XS:"xs",S:"s",M:"m",L:"l",XL:"xl"},x7={ROUND:"round",SQUARE:"square"},T7={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},h8={ROOT:"button",ICON:"button-icon",TEXT:"button-text",CIRCULAR:"button-circular",ACTIVE:"button-active",DISABLED:"button-disabled"},A9={DURATION:450,TIMING:"cubic-bezier(0.4, 0.0, 0.2, 1)",OPACITY:["0.7","0"]}});var bq,b0=(J={})=>b(bq,J,"button"),v0=(J)=>{let $={type:J.type||"button"};if(J.disabled===!0)$.disabled=!0;if(J.value!==void 0)$.value=J.value;if(J.ariaLabel)$["aria-label"]=J.ariaLabel;return f(J,{tag:"button",attributes:$,className:J.class,forwardEvents:{click:(Q)=>!Q.element.disabled,focus:!0,blur:!0}})},C0=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable(),isDisabled:()=>J.disabled.isDisabled()},lifecycle:{destroy:()=>J.lifecycle.destroy()}});var E0=g(()=>{m();u8();bq={variant:A7.FILLED,size:w7.S,shape:x7.ROUND,disabled:!1,type:T7.BUTTON,ripple:!0,rippleConfig:{duration:A9.DURATION,timing:A9.TIMING,opacity:A9.OPACITY}}});var vq=(J={})=>{let $=b0(J);try{return I(T,h(),S(v0($)),Y6($),X7($),$9($),g6($),G6($),N0($),P6($),v(),(q)=>{if($.shape&&q.element){let Z=`${$.prefix}-${$.componentName}--${$.shape}`;q.element.classList.add(Z)}return q},(q)=>I0(C0(q))(q))($)}catch(Q){throw console.error("Button creation error:",Q),new Error(`Failed to create button: ${Q.message}`)}},i6;var h0=g(()=>{n();s();c();L0();S0();E0();i6=vq});var u0={};Y8(u0,{default:()=>i6});var w9=g(()=>{h0()});var _Z={};Y8(_Z,{withVariant:()=>Y6,withTrack:()=>H7,withThrottle:()=>B8,withTextLabel:()=>d6,withTextInput:()=>F7,withText:()=>$9,withTabsManagement:()=>i$,withSwipeable:()=>a0,withSupportingText:()=>d$,withStyle:()=>U8,withSize:()=>X7,withScrollable:()=>c$,withRipple:()=>P6,withPosition:()=>B7,withLoading:()=>s0,withLifecycle:()=>v,withInput:()=>_9,withIndicator:()=>t$,withIcon:()=>g6,withExpandable:()=>m0,withEvents:()=>h,withEnhancedEvents:()=>X8,withElevation:()=>H$,withElement:()=>S,withDivider:()=>o$,withDisabled:()=>G6,withDebounce:()=>F8,withCheckable:()=>D9,withAPI:()=>X$,when:()=>nQ,updateTabPanels:()=>s$,updateCanvasDimensions:()=>v8,transform:()=>ZQ,toggleClass:()=>J$,throttle:()=>d9,setupResponsiveBehavior:()=>K2,setupKeyboardNavigation:()=>m$,setGlobalDefaults:()=>k8,setComponentDefaults:()=>M8,setAttributes:()=>W7,removeClass:()=>K6,removeAttributes:()=>KQ,pipe:()=>I,once:()=>Z$,observeCanvasResize:()=>O7,normalizeEvent:()=>f6,normalizeClasses:()=>V9,loggingMiddleware:()=>_0,joinClasses:()=>eQ,isObject:()=>O8,initializeCanvasWithRetry:()=>C8,hasTouchSupport:()=>x6,hasLifecycle:()=>z9,hasEmit:()=>W9,hasClass:()=>m6,hasAttribute:()=>GQ,getModifierClass:()=>UQ,getInheritedBackground:()=>U9,getElementClass:()=>XQ,getComponentDefaults:()=>N7,getComponentClass:()=>WQ,getAttribute:()=>zQ,fillRoundedRectLR:()=>T8,fillRoundedRect:()=>Iq,easeOutCubic:()=>z$,deriveFiltered:()=>D0,debounce:()=>r9,createTopAppBar:()=>D2,createTooltip:()=>S1,createTimePicker:()=>A1,createTextfield:()=>p7,createTabsState:()=>Q2,createTabs:()=>Y2,createTabIndicator:()=>a$,createTab:()=>q7,createSwitch:()=>q1,createStyledCanvas:()=>E8,createStore:()=>V0,createStateEventManager:()=>q$,createSnackbar:()=>Q1,createSlider:()=>nJ,createSheet:()=>rJ,createSelect:()=>f1,createSegmentedButton:()=>E$,createSegment:()=>C$,createSearch:()=>wJ,createSVGElement:()=>MQ,createRoundedRectPath:()=>w8,createRadios:()=>kJ,createProgress:()=>G$,createNavigationSystem:()=>i2,createNavigation:()=>o9,createMenu:()=>E7,createList:()=>C1,createLifecycle:()=>P0,createFab:()=>_$,createExtendedFab:()=>D$,createEventManager:()=>oQ,createEmitter:()=>T6,createElementConfig:()=>f,createElement:()=>E,createDivider:()=>I9,createDisabled:()=>y0,createDialog:()=>KJ,createDatePicker:()=>jJ,createComponentConfig:()=>b,createComponent:()=>jQ,createChips:()=>X4,createChip:()=>v7,createCheckbox:()=>i8,createCarousel:()=>a8,createCardMedia:()=>a9,createCardHeader:()=>S7,createCardContent:()=>I7,createCardActions:()=>m9,createCard:()=>l8,createCanvasThemeObserver:()=>W$,createCanvasContext:()=>b8,createButton:()=>i6,createBottomAppBar:()=>cQ,createBase:()=>T,createBadge:()=>g9,compose:()=>qQ,clipRoundedRect:()=>x8,clearGlobalDefaults:()=>N8,clearCanvas:()=>I8,classNames:()=>BQ,byString:()=>P8,batchAttributes:()=>YQ,addScrollIndicators:()=>j2,addClass:()=>p,TOP_APP_BAR_TYPES:()=>q8,TOP_APP_BAR_STATES:()=>w1,TOP_APP_BAR_DEFAULTS:()=>K9,TOP_APP_BAR_CLASSES:()=>x1,TOOLTIP_VARIANTS:()=>j8,TOOLTIP_POSITIONS:()=>Z8,TOOLTIP_EVENTS:()=>T1,TOOLTIP_DEFAULTS:()=>E6,TOOLTIP_CLASSES:()=>I1,TIME_PICKER_TYPE:()=>j7,TIME_PICKER_ORIENTATION:()=>s7,TIME_PERIOD:()=>E9,TIME_FORMAT:()=>C9,TIMEPICKER_Z_INDEX:()=>K7,TIMEPICKER_VALUES:()=>R1,TIMEPICKER_TYPES:()=>e$,TIMEPICKER_SELECTORS:()=>e,TIMEPICKER_PERIODS:()=>P1,TIMEPICKER_ORIENTATIONS:()=>$8,TIMEPICKER_ICONS:()=>v6,TIMEPICKER_FORMATS:()=>J8,TIMEPICKER_EVENTS:()=>N6,TIMEPICKER_DIAL:()=>n6,TIMEPICKER_DEFAULTS:()=>s6,TIMEPICKER_CLASSES:()=>y1,TEXTFIELD_VARIANTS:()=>l7,TEXTFIELD_TYPES:()=>n$,TEXTFIELD_STATES:()=>V1,TEXTFIELD_EVENTS:()=>_1,TEXTFIELD_DENSITY:()=>D1,TEXTFIELD_DEFAULTS:()=>Z7,TEXTFIELD_CLASSES:()=>O1,TAB_VARIANTS:()=>r7,TAB_STATES:()=>J7,TAB_INDICATOR_WIDTH_STRATEGIES:()=>l$,TAB_EVENTS:()=>G1,TAB_CLASSES:()=>W1,TABS_EVENTS:()=>p$,TABS_DEFAULTS:()=>k9,TABS_CLASSES:()=>z1,SelectionMode:()=>u7,SWITCH_STATES:()=>Z1,SWITCH_LABEL_POSITIONS:()=>r$,SWITCH_EVENTS:()=>j1,SWITCH_DEFAULTS:()=>K1,SWITCH_CLASSES:()=>Y1,STATES:()=>z8,SNACKBAR_VARIANTS:()=>g$,SNACKBAR_STATES:()=>eJ,SNACKBAR_POSITIONS:()=>t6,SNACKBAR_EVENTS:()=>$1,SNACKBAR_DEFAULTS:()=>v9,SNACKBAR_CLASSES:()=>J1,SLIDER_SIZES:()=>V6,SLIDER_POSITIONS:()=>g7,SLIDER_EVENTS:()=>M6,SLIDER_DEFAULTS:()=>k6,SLIDER_COLORS:()=>o6,SLIDER_CLASSES:()=>pJ,SHEET_VARIANTS:()=>M9,SHEET_POSITIONS:()=>b9,SHEET_GESTURE:()=>gJ,SHEET_EVENTS:()=>uJ,SHEET_ELEVATION:()=>h$,SHEET_DEFAULTS:()=>j9,SHEET_CLASSES:()=>dJ,SHEET_ANIMATION:()=>fJ,SELECT_VARIANTS:()=>G7,SELECT_PLACEMENT:()=>z7,SELECT_INTERACTION:()=>o7,SELECT_ICONS:()=>n7,SELECT_EVENTS:()=>t7,SELECT_DEFAULTS:()=>L9,SELECT_CLASSES:()=>e7,SEGMENTED_BUTTON_MODES:()=>b$,SEGMENTED_BUTTON_ICONS:()=>TJ,SEGMENTED_BUTTON_EVENTS:()=>xJ,SEGMENTED_BUTTON_DENSITY:()=>v$,SEGMENTED_BUTTON_DEFAULTS:()=>S9,SEGMENTED_BUTTON_CLASSES:()=>IJ,SEARCH_VARIANTS:()=>t9,SEARCH_STATES:()=>RJ,SEARCH_ICONS:()=>n9,SEARCH_EVENTS:()=>yJ,SEARCH_DEFAULTS:()=>p6,SEARCH_CLASSES:()=>AJ,RADIO_VARIANTS:()=>x$,RADIO_STATES:()=>NJ,RADIO_SIZES:()=>I$,RADIO_LABEL_POSITIONS:()=>T$,RADIO_EVENTS:()=>LJ,RADIO_DIRECTIONS:()=>w$,RADIO_DEFAULTS:()=>VJ,RADIO_CLASSES:()=>_J,PROGRESS_VARIANTS:()=>J9,PROGRESS_THICKNESS:()=>S6,PROGRESS_SHAPES:()=>R6,PROGRESS_MEASUREMENTS:()=>r6,PROGRESS_EVENTS:()=>s9,PROGRESS_DEFAULTS:()=>I6,PROGRESS_CLASSES:()=>z6,PREFIX:()=>u,NAV_VARIANTS:()=>P$,NAV_POSITIONS:()=>R$,NAV_ITEM_STATES:()=>HJ,NAV_EVENTS:()=>h7,NAV_DEFAULTS:()=>Z9,NAV_CLASSES:()=>o,NAV_BEHAVIORS:()=>y$,MONTH_NAMES_SHORT:()=>s1,MONTH_NAMES:()=>p1,MENU_POSITION:()=>O$,MENU_ITEM_TYPES:()=>BJ,MENU_INTERACTION_TYPES:()=>XJ,MENU_EVENTS:()=>FJ,MENU_DEFAULTS:()=>l6,MENU_CLASSES:()=>C7,LIST_TYPES:()=>a7,LIST_SELECTION_MODES:()=>i7,LIST_SCROLL_POSITIONS:()=>c7,LIST_EVENTS:()=>Y9,LIST_DEFAULTS:()=>m7,LIST_CLASSES:()=>q6,FAB_VARIANTS:()=>e1,FAB_SIZES:()=>$Q,FAB_POSITIONS:()=>JQ,EASING_FUNCTIONS:()=>Sq,Density:()=>f7,DIALOG_SIZES:()=>a1,DIALOG_FOOTER_ALIGNMENTS:()=>c1,DIALOG_BUTTON_VARIANTS:()=>o1,DIALOG_ANIMATIONS:()=>i1,DEFAULT_RIPPLE_CONFIG:()=>A9,DEFAULT_DATE_FORMAT:()=>m1,DEFAULT_CONFIRM_BUTTON_TEXT:()=>t1,DEFAULT_CANCEL_BUTTON_TEXT:()=>n1,DAY_NAMES:()=>l1,DATEPICKER_VIEWS:()=>d1,DATEPICKER_VARIANTS:()=>g1,DATEPICKER_SELECTION_MODES:()=>r1,CleanupManager:()=>x0,COMPONENTS:()=>G8,CHIP_VARIANTS:()=>e8,CHIP_EVENTS:()=>$J,CHIPS_EVENTS:()=>q9,CHECKBOX_VARIANTS:()=>M$,CHECKBOX_STATES:()=>c8,CHECKBOX_LABEL_POSITION:()=>k$,CHECKBOX_CLASSES:()=>o8,CAROUSEL_TRANSITIONS:()=>b7,CAROUSEL_SCROLL_BEHAVIORS:()=>p8,CAROUSEL_LAYOUTS:()=>Q9,CAROUSEL_ITEM_SIZES:()=>i0,CAROUSEL_EVENTS:()=>T9,CAROUSEL_DEFAULTS:()=>H6,CARD_WIDTHS:()=>B$,CARD_VARIANTS:()=>B9,CARD_MEDIA_POSITION:()=>d8,CARD_ELEVATIONS:()=>i9,CARD_CORNER_RADIUS:()=>f8,CARD_CLASSES:()=>r8,CARD_ASPECT_RATIOS:()=>F$,CARD_ACTION_ALIGNMENT:()=>g8,BUTTON_VARIANTS:()=>A7,BUTTON_TYPES:()=>T7,BUTTON_SIZES:()=>w7,BUTTON_SHAPES:()=>x7,BUTTON_CLASSES:()=>h8,BADGE_VARIANTS:()=>L7,BADGE_POSITIONS:()=>_7,BADGE_MAX_CHARACTERS:()=>O9,BADGE_COLORS:()=>V7,AnimationFrameManager:()=>w0,ANIMATION_DURATIONS:()=>S8});module.exports=qq(_Z);var m7={COLLECTION:"items",BASE_URL:"http://localhost:4000/api",PAGE_SIZE:20,RENDER_BUFFER_SIZE:5,ITEM_HEIGHT:48},a7={DEFAULT:"default",SINGLE_SELECT:"single-select",MULTI_SELECT:"multi-select"},i7={NONE:"none",SINGLE:"single",MULTIPLE:"multiple"},Y9={SELECT:"select",LOAD:"load",SCROLL:"scroll"},c7={START:"start",CENTER:"center",END:"end"},q6={CONTAINER:"list-container",LIST:"list",ITEM:"list-item",SELECTED:"list-item--selected",LOADING:"list--loading",EMPTY:"list--empty"};var G7={FILLED:"filled",OUTLINED:"outlined"},z7={BOTTOM_START:"bottom-start",BOTTOM:"bottom",BOTTOM_END:"bottom-end",TOP_START:"top-start",TOP:"top",TOP_END:"top-end"},o7={MOUSE:"mouse",KEYBOARD:"keyboard"},t7={CHANGE:"change",OPEN:"open",CLOSE:"close"},n7={DROPDOWN:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M7 10l5 5 5-5z"/></svg>',CHECKMARK:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>'},L9={VARIANT:G7.FILLED,PLACEMENT:z7.BOTTOM_START,LABEL:"Select",VALUE:"",REQUIRED:!1,DISABLED:!1,SUPPORTING_TEXT:"",ERROR:!1},e7={CONTAINER:"select",TEXTFIELD:"select__textfield",DROPDOWN_ICON:"select__dropdown-icon",MENU:"select__menu",MENU_ITEM:"select__menu-item",MENU_ITEM_SELECTED:"select__menu-item--selected",MENU_ITEM_DISABLED:"select__menu-item--disabled",MENU_ITEM_CHECKMARK:"select__menu-item-checkmark",MENU_ITEM_ICON:"select__menu-item-icon",MENU_ITEM_TEXT:"select__menu-item-text",FILLED:"select--filled",OUTLINED:"select--outlined",OPEN:"select--open",DISABLED:"select--disabled",REQUIRED:"select--required",ERROR:"select--error"};M7();n();m();var _8={CENTER:"center",END:"end"},D8=300;var Rq={tag:"div",hasFab:!1,fabPosition:_8.END,autoHide:!1,transitionDuration:D8},aQ=(J={})=>b(Rq,J,"bottom-app-bar");var iQ=(J={})=>{let $=aQ(J),Q=T($),q=document.createElement("div");q.className=`${Q.getClass("bottom-app-bar")}-actions`;let Z=document.createElement("div");Z.className=`${Q.getClass("bottom-app-bar")}-fab-container`;let j=S({tag:$.tag,componentName:"bottom-app-bar",className:[$.hasFab?`${Q.getClass("bottom-app-bar")}--with-fab`:"",$.fabPosition==="center"?`${Q.getClass("bottom-app-bar")}--fab-center`:"",$.class],attributes:{role:"toolbar","aria-label":"Bottom app bar"},interactive:!0})(Q),K=h()(j),Y=v()(K);Y.element.appendChild(q),Y.element.appendChild(Z);let G=!0,z=window.scrollY;if($.autoHide){let X=()=>{let _=window.scrollY;if(_>z+10){if(G)W.hide(),$.onVisibilityChange?.(!1)}else if(_<z-10){if(!G)W.show(),$.onVisibilityChange?.(!0)}z=_};window.addEventListener("scroll",X,{passive:!0});let U=Y.lifecycle.destroy;Y.lifecycle.destroy=()=>{window.removeEventListener("scroll",X),U()}}let W={...Y,addAction(X){return q.appendChild(X),this},addFab(X){return Z.innerHTML="",Z.appendChild(X),this.element.classList.add(`${Q.getClass("bottom-app-bar")}--with-fab`),this},show(){return this.element.classList.remove(`${Q.getClass("bottom-app-bar")}--hidden`),G=!0,this},hide(){return this.element.classList.add(`${Q.getClass("bottom-app-bar")}--hidden`),G=!1,this},isVisible(){return G},getActionsContainer(){return q}};if($.autoHide&&$.transitionDuration)W.element.style.transition=`transform ${$.transitionDuration}ms ease-in-out`;return W};var cQ=iQ;w9();n();s();c();var X$=({lifecycle:J})=>($)=>({...$,element:$.element,addContent(Q){if(Q&&Q.classList.contains(`${$.getClass("card")}-content`))$.element.appendChild(Q);return this},setHeader(Q){if(Q&&Q.classList.contains(`${$.getClass("card")}-header`)){let q=$.element.querySelector(`.${$.getClass("card")}-header`);if(q)q.remove();if($.element.querySelector(`.${$.getClass("card")}-media`)){let j=$.element.querySelectorAll(`.${$.getClass("card")}-media`),K=j[j.length-1];if(K.nextSibling)$.element.insertBefore(Q,K.nextSibling);else $.element.appendChild(Q)}else $.element.insertBefore(Q,$.element.firstChild)}return this},addMedia(Q,q="top"){if(Q&&Q.classList.contains(`${$.getClass("card")}-media`))if(q==="top")$.element.insertBefore(Q,$.element.firstChild);else $.element.appendChild(Q);return this},setActions(Q){if(Q&&Q.classList.contains(`${$.getClass("card")}-actions`)){let q=$.element.querySelector(`.${$.getClass("card")}-actions`);if(q)q.remove();$.element.appendChild(Q)}return this},makeDraggable(Q){if($.element.setAttribute("draggable","true"),$.element.setAttribute("aria-grabbed","false"),typeof Q==="function")$.element.addEventListener("dragstart",(q)=>{$.element.setAttribute("aria-grabbed","true"),Q(q)}),$.element.addEventListener("dragend",()=>{$.element.setAttribute("aria-grabbed","false")});return this},focus(){return $.element.focus(),this},destroy(){J.destroy()}});m();w6();n();s();u6();var I7=(J={})=>{let $={...J,componentName:"card-content",prefix:u};try{let Q=I(T,S({tag:"div",componentName:"card-content",className:[J.class,J.padding===!1?`${u}-card-content--no-padding`:null],attributes:{role:"region",style:"display: block; color: inherit;"}}))($);if(J.html)Q.element.innerHTML=J.html;else if(J.text)Q.element.innerHTML=`<p>${J.text}</p>`;if(Array.isArray(J.children))J.children.forEach((q)=>{if(q instanceof HTMLElement)Q.element.appendChild(q)});return Q.element.classList.add("debug-content"),Q.element}catch(Q){throw console.error("Card content creation error:",Q instanceof Error?Q.message:String(Q)),new Error(`Failed to create card content: ${Q instanceof Error?Q.message:String(Q)}`)}},S7=(J={})=>{let $={...J,componentName:"card-header",prefix:u};try{let Q=I(T,S({tag:"div",componentName:"card-header",className:J.class,attributes:{role:"heading","aria-level":"3"}}))($),q=E({tag:"div",className:`${u}-card-header-text`,container:Q.element});if(J.title){E({tag:"h3",className:`${u}-card-header-title`,text:J.title,container:q,attributes:{id:`${Q.element.id||"card-header"}-title`}});let Z=Q.element.closest(`.${u}-card`);if(Z&&!Z.hasAttribute("aria-labelledby"))Z.setAttribute("aria-labelledby",`${Q.element.id||"card-header"}-title`)}if(J.subtitle)E({tag:"h4",className:`${u}-card-header-subtitle`,text:J.subtitle,container:q});if(J.avatar){let Z=typeof J.avatar==="string"?E({tag:"div",className:`${u}-card-header-avatar`,html:J.avatar}):J.avatar,j=Z.querySelector("img");if(j&&!j.hasAttribute("alt"))j.setAttribute("alt",""),j.setAttribute("aria-hidden","true");Q.element.insertBefore(Z,Q.element.firstChild)}if(J.action){let Z=typeof J.action==="string"?E({tag:"div",className:`${u}-card-header-action`,html:J.action}):J.action;Q.element.appendChild(Z)}return Q.element}catch(Q){throw console.error("Card header creation error:",Q instanceof Error?Q.message:String(Q)),new Error(`Failed to create card header: ${Q instanceof Error?Q.message:String(Q)}`)}},m9=(J={})=>{let $={...J,componentName:"card-actions",prefix:u};try{let Q=I(T,S({tag:"div",componentName:"card-actions",className:[J.class,J.fullBleed?`${u}-card-actions--full-bleed`:null,J.vertical?`${u}-card-actions--vertical`:null,J.align?`${u}-card-actions--${J.align}`:null],attributes:{role:"group"}}))($);if(Array.isArray(J.actions))J.actions.forEach((q,Z)=>{if(q instanceof HTMLElement){if(!q.hasAttribute("aria-label")&&!q.hasAttribute("aria-labelledby")&&q.textContent?.trim()==="")q.setAttribute("aria-label",`Action ${Z+1}`);Q.element.appendChild(q)}});return Q.element}catch(Q){throw console.error("Card actions creation error:",Q instanceof Error?Q.message:String(Q)),new Error(`Failed to create card actions: ${Q instanceof Error?Q.message:String(Q)}`)}},a9=(J={})=>{let $={...J,componentName:"card-media",prefix:u};try{let Q=I(T,S({tag:"div",componentName:"card-media",className:[J.class,J.aspectRatio?`${u}-card-media--${J.aspectRatio.replace(":","-")}`:null,J.contain?`${u}-card-media--contain`:null]}))($);if(J.element instanceof HTMLElement)Q.element.appendChild(J.element);else if(J.src){let q=document.createElement("img");if(q.src=J.src,q.className=`${u}-card-media-img`,q.alt=J.alt||"",!J.alt)q.setAttribute("aria-hidden","true");Q.element.appendChild(q)}return Q.element}catch(Q){throw console.error("Card media creation error:",Q instanceof Error?Q.message:String(Q)),new Error(`Failed to create card media: ${Q instanceof Error?Q.message:String(Q)}`)}};var B9={ELEVATED:"elevated",FILLED:"filled",OUTLINED:"outlined"},i9={LEVEL0:0,LEVEL1:1,LEVEL2:2,LEVEL4:4},B$={SMALL:"344px",MEDIUM:"480px",LARGE:"624px",FULL:"100%"},f8={SMALL:"8px",MEDIUM:"12px",LARGE:"16px"},F$={SQUARE:"1:1",STANDARD:"4:3",WIDESCREEN:"16:9"},g8={START:"start",CENTER:"center",END:"end",SPACE_BETWEEN:"space-between"},d8={TOP:"top",BOTTOM:"bottom"},r8={ROOT:"card",HEADER:"card-header",TITLE:"card-title",SUBTITLE:"card-subtitle",AVATAR:"card-avatar",HEADER_ACTION:"card-header-action",CONTENT:"card-content",MEDIA:"card-media",ACTIONS:"card-actions",DRAGGABLE:"card-draggable",INTERACTIVE:"card-interactive",FULL_WIDTH:"card-full-width",CLICKABLE:"card-clickable",LOADING:"card-loading",EXPANDED:"card-expanded",ELEVATION_PREFIX:"card-elevation-"};var Cq={variant:B9.ELEVATED,interactive:!1,fullWidth:!1,clickable:!1,draggable:!1},f0=(J)=>{let $={...J};if(J.header)$.headerConfig=J.header;if(J.content)$.contentConfig=J.content;if(J.media)$.mediaConfig=J.media;if(J.actions)$.actionsConfig=J.actions;return $},g0=(J,$)=>{if($.mediaConfig&&(!$.mediaConfig.position||$.mediaConfig.position==="top")){let Q=a9({...$.mediaConfig,position:void 0});J.addMedia(Q,"top")}if($.headerConfig){let Q=S7($.headerConfig);J.setHeader(Q)}if($.contentConfig){let Q=I7($.contentConfig);J.addContent(Q)}if($.mediaConfig&&$.mediaConfig.position==="bottom"){let Q=a9({...$.mediaConfig,position:void 0});J.addMedia(Q,"bottom")}if($.actionsConfig){let Q=m9($.actionsConfig);J.setActions(Q)}if(Array.isArray($.buttons)&&$.buttons.length>0)Promise.resolve().then(() => (w9(),u0)).then(({default:Q})=>{let q=$.buttons.map((j)=>Q(j).element),Z=m9({actions:q,align:$.actionsConfig?.align||"end"});J.setActions(Z)}).catch((Q)=>{console.error("Error processing buttons:",Q)})},d0=(J={})=>b(Cq,J,"card"),r0=(J)=>{let $=J.interactive||J.clickable,Q=$?"button":"region",q={};if(J.aria)Object.entries(J.aria).forEach(([Z,j])=>{if(j!==void 0){let K=Z.startsWith("aria-")?Z:`aria-${Z}`;q[K]=j}});if(!q.role&&!J.aria?.role)q.role=Q;if($&&!q.tabindex)q.tabindex="0";return f(J,{tag:"div",className:[J.class,J.fullWidth?`${J.prefix}-card--full-width`:null,$?`${J.prefix}-card--interactive`:null],attributes:q,forwardEvents:{click:()=>!!J.clickable,mouseenter:()=>!!$,mouseleave:()=>!!$,keydown:()=>!!$,focus:()=>!!$,blur:()=>!!$},interactive:$})},l0=(J)=>({lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}}),x9=i9,p0=(J)=>{let $=J.config;if($.interactive||$.clickable)J.element.addEventListener("mouseenter",()=>{if($.variant===B9.ELEVATED)J.element.style.setProperty("--card-elevation",String(x9.LEVEL2))}),J.element.addEventListener("mouseleave",()=>{if($.variant===B9.ELEVATED)J.element.style.setProperty("--card-elevation",String(x9.LEVEL1))}),J.element.addEventListener("keydown",(q)=>{if((q.key==="Enter"||q.key===" ")&&$.clickable)q.preventDefault(),J.element.click()}),J.element.addEventListener("focus",()=>{J.element.classList.add(`${J.getClass("card")}--focused`)}),J.element.addEventListener("blur",()=>{J.element.classList.remove(`${J.getClass("card")}--focused`)});if($.draggable)J.element.setAttribute("draggable","true"),J.element.addEventListener("dragstart",(q)=>{if(J.element.style.setProperty("--card-elevation",String(x9.LEVEL4)),J.element.classList.add(`${J.getClass("card")}--dragging`),J.emit?.("dragstart",{event:q}),q.dataTransfer){let Z=J.element.querySelector(`.${J.getClass("card")}-header-title`)?.textContent||"Card";q.dataTransfer.setData("text/plain",Z)}}),J.element.addEventListener("dragend",(q)=>{J.element.style.setProperty("--card-elevation",String(x9.LEVEL1)),J.element.classList.remove(`${J.getClass("card")}--dragging`),J.emit?.("dragend",{event:q})});return J};w6();u6();var s0=(J={})=>($)=>{let Q=J.initialState||!1,q=null,Z=Q;function j(K){if(Z=K,K&&!q)q=E({tag:"div",className:`${u}-card-loading-overlay`,container:$.element,attributes:{role:"progressbar","aria-busy":"true","aria-label":"Loading"}}),E({tag:"div",className:`${u}-card-loading-spinner`,container:q}),$.element.classList.add(`${u}-card--state-loading`),$.element.setAttribute("aria-busy","true");else if(!K&&q)q.remove(),q=null,$.element.classList.remove(`${u}-card--state-loading`),$.element.setAttribute("aria-busy","false")}if(Q)j(!0);return{...$,loading:{isLoading:()=>Z,setLoading:j}}},H$=(J)=>{if(J.config.variant==="elevated")J.element.style.setProperty("--card-elevation",String(x9.LEVEL1));else J.element.style.setProperty("--card-elevation",String(x9.LEVEL0));return J},m0=(J={})=>($)=>{let Q=J.initialExpanded||!1,q=Q,Z=J.expandableContent,j=E({tag:"button",className:`${u}-card-expand-button`,attributes:{"aria-expanded":q?"true":"false","aria-label":q?"Collapse content":"Expand content","aria-controls":Z?.id||`${$.element.id||"card"}-expandable-content`}}),K=$.element.querySelector(`.${u}-card-actions`);if(K)K.appendChild(j);else E({tag:"div",className:`${u}-card-actions`,container:$.element,attributes:{role:"group"}}).appendChild(j);if(Z){if(Z.classList.add(`${u}-card-expandable-content`),!Z.id)Z.id=`${$.element.id||"card"}-expandable-content`;if(!Q)Z.style.display="none",Z.setAttribute("aria-hidden","true");else Z.setAttribute("aria-hidden","false");$.element.appendChild(Z)}function Y(z){if(q=z,Z)Z.style.display=z?"block":"none",Z.setAttribute("aria-hidden",z?"false":"true");if(j.setAttribute("aria-expanded",z?"true":"false"),j.setAttribute("aria-label",z?"Collapse content":"Expand content"),z)$.element.classList.add(`${u}-card--expanded`);else $.element.classList.remove(`${u}-card--expanded`);$.emit?.("expandedChanged",{expanded:z})}function G(){Y(!q)}return j.addEventListener("click",(z)=>{z.stopPropagation(),G()}),j.addEventListener("keydown",(z)=>{if(z.key==="Enter"||z.key===" ")z.preventDefault(),G()}),{...$,expandable:{isExpanded:()=>q,setExpanded:Y,toggleExpanded:G}}},a0=(J={})=>($)=>{let Q=J.threshold||100,q=0,Z=0;$.element.setAttribute("aria-description","Swipeable card. Swipe left or right to perform actions.");let j=E({tag:"button",className:`${u}-card-swipe-left-action`,text:"Swipe Left Action",container:$.element,attributes:{"aria-label":"Perform swipe left action",style:"position: absolute; left: -9999px; top: -9999px; visibility: hidden;"}}),K=E({tag:"button",className:`${u}-card-swipe-right-action`,text:"Swipe Right Action",container:$.element,attributes:{"aria-label":"Perform swipe right action",style:"position: absolute; left: -9999px; top: -9999px; visibility: hidden;"}});j.addEventListener("click",()=>{if(J.onSwipeLeft)$.element.style.transform="translateX(-100%)",$.element.style.transition="transform 0.3s ease",J.onSwipeLeft($)}),K.addEventListener("click",()=>{if(J.onSwipeRight)$.element.style.transform="translateX(100%)",$.element.style.transition="transform 0.3s ease",J.onSwipeRight($)});function Y(W){q=W.touches[0].clientX,$.element.style.transition="none"}function G(W){if(!q)return;Z=W.touches[0].clientX;let X=Z-q;$.element.style.transform=`translateX(${X}px)`}function z(){if(!q)return;$.element.style.transition="transform 0.3s ease";let W=Z-q;if(Math.abs(W)>=Q)if(W>0&&J.onSwipeRight)$.element.style.transform="translateX(100%)",J.onSwipeRight($);else if(W<0&&J.onSwipeLeft)$.element.style.transform="translateX(-100%)",J.onSwipeLeft($);else $.element.style.transform="translateX(0)";else $.element.style.transform="translateX(0)";q=0,Z=0}return $.element.addEventListener("touchstart",Y),$.element.addEventListener("touchmove",G),$.element.addEventListener("touchend",z),$.element.classList.add(`${u}-card--swipeable`),{...$,swipeable:{reset:()=>{$.element.style.transition="transform 0.3s ease",$.element.style.transform="translateX(0)"}}}};var Eq=(J={})=>{let $=f0(J),Q=d0($);try{let q=I(T,h(),S(r0(Q)),Y6(Q),Q.clickable?P6(Q):(Z)=>Z,v(),p0,H$,(Z)=>X$(l0(Z))(Z))(Q);return g0(q,$),q}catch(q){throw console.error("Card creation error:",q instanceof Error?q.message:String(q)),new Error(`Failed to create card: ${q instanceof Error?q.message:String(q)}`)}},l8=Eq;n();s();c();var Q9={MULTI_BROWSE:"multi-browse",UNCONTAINED:"uncontained",HERO:"hero",FULL_SCREEN:"full-screen"},p8={DEFAULT:"default",SNAP:"snap"},i0={LARGE:"large",MEDIUM:"medium",SMALL:"small"},b7={SLIDE:"slide",FADE:"fade",NONE:"none"},T9={SLIDE_CHANGE:"slide-change",SLIDE_CHANGED:"slide-changed",RESIZE:"resize"},H6={INITIAL_SLIDE:0,LOOP:!0,TRANSITION:b7.SLIDE,TRANSITION_DURATION:300,BORDER_RADIUS:16,GAP:8,LAYOUT:Q9.MULTI_BROWSE,SCROLL_BEHAVIOR:p8.SNAP,SMALL_ITEM_WIDTH:48,ITEM_WIDTHS:{[Q9.MULTI_BROWSE]:{LARGE:240,MEDIUM:180,SMALL:48},[Q9.UNCONTAINED]:{LARGE:240,MEDIUM:240,SMALL:240},[Q9.HERO]:{LARGE:300,MEDIUM:240,SMALL:48},[Q9.FULL_SCREEN]:{LARGE:"100%",MEDIUM:"100%",SMALL:"100%"}}};var s8=(J)=>($)=>{let Q={...$},q=J.layout||H6.LAYOUT,Z=()=>{let B=document.createElement("div");return B.className=`${$.getClass("carousel")}-wrapper`,B.dataset.layout=q,$.element.appendChild(B),B},j=document.createElement("div");if(j.className=`${$.getClass("carousel")}-slides`,j.setAttribute("role","list"),j.setAttribute("aria-label","Carousel Slides"),J.scrollBehavior==="snap")j.dataset.snapScroll="true";j.dataset.gap=`${J.gap||H6.GAP}`;let K=Z();K.appendChild(j);let Y=J.initialSlide||0,G=0,z=[],W=[];function X(B){if(W[B]?.size)return W[B].size;switch(q){case"multi-browse":if(B===0||B===1)return"large";if(B===2)return"medium";return"small";case"uncontained":return"large";case"hero":return B===0?"large":"small";case"full-screen":return"large";default:return"large"}}function U(){let B=j.clientWidth,H=typeof H6.ITEM_WIDTHS[q].LARGE==="number"?H6.ITEM_WIDTHS[q].LARGE:B,V=typeof H6.ITEM_WIDTHS[q].MEDIUM==="number"?H6.ITEM_WIDTHS[q].MEDIUM:B*0.75,O=typeof H6.ITEM_WIDTHS[q].SMALL==="number"?H6.ITEM_WIDTHS[q].SMALL:H6.SMALL_ITEM_WIDTH;if(J.largeItemMaxWidth&&typeof J.largeItemMaxWidth==="number")H=Math.min(H,J.largeItemMaxWidth);if(J.smallItemWidth&&typeof J.smallItemWidth==="number")O=J.smallItemWidth;if(q==="full-screen")H=B,V=B,O=B;z.forEach((M,P)=>{let R=X(P);switch(R){case"large":M.style.width=`${H}px`;break;case"medium":M.style.width=`${V}px`;break;case"small":M.style.width=`${O}px`;break}M.className=`${$.getClass("carousel")}-slide ${$.getClass("carousel")}-slide--${R}`;let y=M.querySelector(`.${$.getClass("carousel")}-slide-title`),x=M.querySelector(`.${$.getClass("carousel")}-slide-description`);if(y)if(R==="small"&&q!=="uncontained")y.classList.add("visually-hidden");else y.classList.remove("visually-hidden");if(x)if(R==="small"||R==="medium"&&q==="multi-browse")x.classList.add("visually-hidden");else x.classList.remove("visually-hidden")})}function _(B,H){let V=document.createElement("div");V.className=`${$.getClass("carousel")}-slide`,V.setAttribute("role","listitem"),V.setAttribute("aria-roledescription","slide"),V.dataset.borderRadius=`${J.borderRadius||H6.BORDER_RADIUS}`;let O=document.createElement("div");O.className=`${$.getClass("carousel")}-slide-image`;let M=document.createElement("img");if(M.src=B.image,M.alt=B.title||"Carousel slide",O.appendChild(M),B.accent){let R=document.createElement("div");if(R.className=`${$.getClass("carousel")}-slide-overlay`,B.accent)R.style.backgroundColor=B.accent;O.appendChild(R)}let P=document.createElement("div");if(P.className=`${$.getClass("carousel")}-slide-content`,B.title){let R=document.createElement("div");if(R.className=`${$.getClass("carousel")}-slide-title`,R.textContent=B.title,q==="full-screen")P.appendChild(R);else O.appendChild(R)}if(B.description){let R=document.createElement("div");R.className=`${$.getClass("carousel")}-slide-description`,R.textContent=B.description,P.appendChild(R)}if(B.buttonText){let R=document.createElement("a");if(R.className=`${$.getClass("carousel")}-slide-button`,R.textContent=B.buttonText,B.buttonUrl)R.href=B.buttonUrl;if(B.accent)R.style.backgroundColor=B.accent;P.appendChild(R)}if(V.appendChild(O),V.appendChild(P),H!==void 0&&H>=0&&H<=W.length)W.splice(H,0,B);else W.push(B);if(H!==void 0&&H>=0&&H<=z.length)if(H<z.length)j.insertBefore(V,z[H]),z.splice(H,0,V);else j.appendChild(V),z.push(V);else j.appendChild(V),z.push(V);return G++,U(),V}let N=()=>{if(J.showAllLink===!1)return;let B=document.createElement("div");B.className=`${$.getClass("carousel")}-show-all`,B.setAttribute("role","button"),B.setAttribute("tabindex","0"),B.setAttribute("aria-label","Show all items");let H=document.createElement("span");H.textContent="Show all",B.appendChild(H),K.appendChild(B),B.addEventListener("click",()=>{if(J.onShowAll&&typeof J.onShowAll==="function")J.onShowAll()}),B.addEventListener("keydown",(V)=>{if(V.key==="Enter"||V.key===" "){if(J.onShowAll&&typeof J.onShowAll==="function")J.onShowAll();V.preventDefault()}})};if(J.slides&&J.slides.length>0)J.slides.forEach((B)=>{_(B)});if(J.showAllLink!==!1&&q!=="full-screen")N();let F=()=>{U();let B=new CustomEvent(T9.RESIZE,{detail:{width:j.clientWidth}});$.element.dispatchEvent(B)};window.addEventListener("resize",F),setTimeout(U,0);let k=(B)=>{if(B<0||B>=G)if(J.loop)if(B<0)B=G-1;else B=0;else return Q;if(Y!==B){let H=new CustomEvent(T9.SLIDE_CHANGE,{detail:{previousSlide:Y,nextSlide:B}});$.element.dispatchEvent(H),Y=B,z.forEach((M,P)=>{if(P===Y)M.classList.add(`${$.getClass("carousel")}-slide--active`),M.setAttribute("aria-current","true");else M.classList.remove(`${$.getClass("carousel")}-slide--active`),M.removeAttribute("aria-current")});let V=J.scrollBehavior==="snap"?"smooth":"auto";if(z[B])if(q==="hero"&&J.centered){let M=z[B].offsetWidth,P=j.clientWidth,R=z[B].offsetLeft;j.scrollTo({left:R-P/2+M/2,behavior:V})}else z[B].scrollIntoView({behavior:V,block:"nearest",inline:"start"});let O=new CustomEvent(T9.SLIDE_CHANGED,{detail:{currentSlide:Y}});$.element.dispatchEvent(O)}return Q};if(Object.assign(Q,{slides:{addSlide:(B,H)=>{return _(B,H),Q.slides},removeSlide:(B)=>{if(B>=0&&B<z.length){if(j.removeChild(z[B]),z.splice(B,1),W.splice(B,1),G--,Y>=G)Y=G-1;if(Y<0)Y=0;U()}return Q.slides},updateSlide:(B,H)=>{if(B>=0&&B<z.length){W[B]=H;let V=z[B],O=V.querySelector("img");if(O)O.src=H.image,O.alt=H.title||"Carousel slide";let M=V.querySelector(`.${$.getClass("carousel")}-slide-title`);if(M&&H.title)M.textContent=H.title;let P=V.querySelector(`.${$.getClass("carousel")}-slide-description`);if(P&&H.description)P.textContent=H.description;let R=V.querySelector(`.${$.getClass("carousel")}-slide-overlay`);if(R&&H.accent)R.style.backgroundColor=H.accent;let y=V.querySelector(`.${$.getClass("carousel")}-slide-button`);if(y)if(H.buttonText){if(y.textContent=H.buttonText,H.buttonUrl)y.href=H.buttonUrl;if(H.accent)y.style.backgroundColor=H.accent}else y.parentElement?.removeChild(y);else if(H.buttonText){let x=V.querySelector(`.${$.getClass("carousel")}-slide-content`);if(x){let A=document.createElement("a");if(A.className=`${$.getClass("carousel")}-slide-button`,A.textContent=H.buttonText,H.buttonUrl)A.href=H.buttonUrl;if(H.accent)A.style.backgroundColor=H.accent;x.appendChild(A)}}if(H.size)U()}return Q.slides},getSlide:(B)=>{if(B>=0&&B<W.length)return W[B];return null},getCount:()=>G,getElements:()=>[...z]},slidesContainer:j,slideData:W,wrapper:K,getCurrentSlide:()=>Y,goTo:k,next:()=>k(Y+1),prev:()=>k(Y-1),enableLoop:()=>{return J.loop=!0,Q},disableLoop:()=>{return J.loop=!1,Q},setBorderRadius:(B)=>{return J.borderRadius=B,z.forEach((H)=>{H.dataset.borderRadius=`${B}`}),Q},setGap:(B)=>{return J.gap=B,j.dataset.gap=`${B}`,Q},updateLayout:(B)=>{return J.layout=B,K.dataset.layout=B,$.element.dataset.layout=B,Object.values(Q9).forEach((H)=>{$.element.classList.remove(`${$.getClass("carousel")}-layout--${H}`)}),$.element.classList.add(`${$.getClass("carousel")}-layout--${B}`),U(),Q},lifecycle:{...$.lifecycle||{},destroy:()=>{if(window.removeEventListener("resize",F),$.lifecycle&&$.lifecycle.destroy)$.lifecycle.destroy()}}}),J.transition)$.element.classList.add(`${$.getClass("carousel")}-transition--${J.transition}`);if(J.scrollBehavior==="snap")j.addEventListener("scroll",()=>{clearTimeout(Q.scrollTimeout),Q.scrollTimeout=setTimeout(()=>{let B=0,H=1/0,V=j.scrollLeft,O=j.clientWidth;if(z.forEach((M,P)=>{let y=M.offsetLeft+M.offsetWidth/2,x=V+O/2,A=Math.abs(y-x);if(A<H)H=A,B=P}),B!==Y){Y=B,z.forEach((P,R)=>{if(R===Y)P.classList.add(`${$.getClass("carousel")}-slide--active`),P.setAttribute("aria-current","true");else P.classList.remove(`${$.getClass("carousel")}-slide--active`),P.removeAttribute("aria-current")});let M=new CustomEvent(T9.SLIDE_CHANGED,{detail:{currentSlide:Y}});$.element.dispatchEvent(M)}},150)});return Q};var m8=(J)=>($)=>{let Q,q,Z,j=!1,K=0,Y=0,G,z=J.scrollBehavior||"default",W=(H)=>{if(H.button!==0)return;cancelAnimationFrame(G),Q=H.clientX,q=$.slidesContainer.scrollLeft,Z=Q,j=!0,Y=Date.now(),K=0,$.slidesContainer.dataset.touchAction="none",$.element.dataset.dragging="true",$.slidesContainer.style.scrollBehavior="auto",$.element.setPointerCapture(H.pointerId),H.preventDefault()},X=(H)=>{if(!j)return;let V=H.clientX-Q;$.slidesContainer.scrollLeft=q-V;let O=Date.now(),M=O-Y;if(M>0)K=(H.clientX-Z)/M;Z=H.clientX,Y=O,H.preventDefault()},U=()=>{let H=$.slides.getElements(),V=$.slidesContainer.clientWidth,O=$.slidesContainer.scrollLeft,M=J.layout==="hero"&&J.centered,P=0,R=1/0;return H.forEach((y)=>{let x;if(M)x=y.offsetLeft+y.offsetWidth/2-V/2;else x=y.offsetLeft;let A=Math.abs(x-O);if(A<R)R=A,P=x}),P},_=(H,V,O)=>{let M=Date.now(),P=V-H,R=500;if(Math.abs(O)>0.5)R=Math.min(R,300);let y=()=>{let x=Date.now()-M,A=Math.min(x/R,1);A=1-Math.pow(1-A,3);let C=H+P*A;if($.slidesContainer.scrollLeft=C,A<1)G=requestAnimationFrame(y)};G=requestAnimationFrame(y)},N=(H)=>{if(!j)return;if(j=!1,delete $.element.dataset.dragging,$.element.releasePointerCapture(H.pointerId),z==="snap"){let V=U();_($.slidesContainer.scrollLeft,V,K)}else if(Math.abs(K)>0.5){let V=K*100,O=$.slidesContainer.scrollLeft-V;_($.slidesContainer.scrollLeft,O,K)}K=0,setTimeout(()=>{$.slidesContainer.style.scrollBehavior=""},0)},F=(H)=>{if(j)j=!1,delete $.element.dataset.dragging,$.element.releasePointerCapture(H.pointerId),$.slidesContainer.style.scrollBehavior=""},k=(H)=>{if(J.layout==="full-screen")return;H.preventDefault();let O=(H.deltaY||H.deltaX)*0.5;if(z==="snap")$.slidesContainer.scrollLeft+=O,clearTimeout($.wheelSnapTimeout),$.wheelSnapTimeout=setTimeout(()=>{let M=U();_($.slidesContainer.scrollLeft,M,0)},150);else $.slidesContainer.scrollLeft+=O},L=()=>{if(J.layout!=="multi-browse"||!$.element.dataset.enableParallax)return;let H=$.slides.getElements(),V=$.slidesContainer.clientWidth,O=$.slidesContainer.scrollLeft;H.forEach((M)=>{let{offsetLeft:P,offsetWidth:R}=M,y=P+R/2,x=O+V/2,A=y-x,C=Math.max(-1,Math.min(1,A/(V/2))),r=M.querySelector(`.${$.getClass("carousel")}-slide-image img`);if(r)r.style.transform=`translateX(${C*-5}%)`})},D=()=>{L()};if(J.layout==="multi-browse")$.element.dataset.enableParallax="true";$.element.dataset.swipe="true",$.slidesContainer.addEventListener("pointerdown",W),window.addEventListener("pointermove",X),window.addEventListener("pointerup",N),window.addEventListener("pointercancel",F),$.slidesContainer.addEventListener("wheel",k,{passive:!1}),$.slidesContainer.addEventListener("scroll",D,{passive:!0});let B=(H)=>{if($.element!==document.activeElement)return;switch(H.key){case"ArrowLeft":if($.prev)$.prev();else $.slidesContainer.scrollBy({left:-200,behavior:z==="snap"?"smooth":"auto"});H.preventDefault();break;case"ArrowRight":if($.next)$.next();else $.slidesContainer.scrollBy({left:200,behavior:z==="snap"?"smooth":"auto"});H.preventDefault();break;case"Home":if($.goTo)$.goTo(0);H.preventDefault();break;case"End":if($.goTo&&$.slides.getCount)$.goTo($.slides.getCount()-1);H.preventDefault();break}};return $.element.setAttribute("tabindex","0"),$.element.addEventListener("keydown",B),$.element.setAttribute("aria-label","Carousel"),{...$,lifecycle:{...$.lifecycle,destroy:()=>{if(cancelAnimationFrame(G),$.slidesContainer.removeEventListener("pointerdown",W),window.removeEventListener("pointermove",X),window.removeEventListener("pointerup",N),window.removeEventListener("pointercancel",F),$.slidesContainer.removeEventListener("wheel",k),$.slidesContainer.removeEventListener("scroll",D),$.element.removeEventListener("keydown",B),$.lifecycle&&$.lifecycle.destroy)$.lifecycle.destroy()}}}};var c0=(J)=>($)=>{let Q={element:$.element,slides:{addSlide:(q,Z)=>{return J.slides.addSlide(q,Z),Q.slides},removeSlide:(q)=>{return J.slides.removeSlide(q),Q.slides},updateSlide:(q,Z)=>{return J.slides.updateSlide(q,Z),Q.slides},getSlide:(q)=>{if($.slideData&&q>=0&&q<$.slideData.length)return $.slideData[q];return null},getCount:J.slides.getCount,getElements:J.slides.getElements},lifecycle:{destroy:J.lifecycle.destroy},getClass:$.getClass,next(){return $.next(),this},prev(){return $.prev(),this},goTo(q){return $.goTo(q),this},getCurrentSlide:$.getCurrentSlide,addSlide(q,Z){return J.slides.addSlide(q,Z),this},removeSlide(q){return J.slides.removeSlide(q),this},enableLoop(){return $.enableLoop(),this},disableLoop(){return $.disableLoop(),this},setBorderRadius(q){if($.setBorderRadius)$.setBorderRadius(q);return this},setGap(q){if($.setGap)$.setGap(q);return this},destroy(){J.lifecycle.destroy()},on(q,Z){if($.on)$.on(q,Z);else if($.element.addEventListener)$.element.addEventListener(q,Z);return this},off(q,Z){if($.off)$.off(q,Z);else if($.element.removeEventListener)$.element.removeEventListener(q,Z);return this},addClass(...q){if($.addClass)$.addClass(...q);else q.forEach((Z)=>$.element.classList.add(Z));return this}};return Q};m();var hq={initialSlide:H6.INITIAL_SLIDE,loop:H6.LOOP,transition:b7.SLIDE,transitionDuration:H6.TRANSITION_DURATION,borderRadius:H6.BORDER_RADIUS,gap:H6.GAP,prefix:"carousel",showAllLink:!0},o0=(J={})=>b(hq,J,"carousel"),t0=(J)=>{let $={role:"region","aria-roledescription":"carousel","aria-live":"polite"},Q={"data-transition":J.transition,"data-loop":J.loop?"true":"false"};return f(J,{tag:"div",attributes:{...$,...Q},className:J.class,forwardEvents:{keydown:!0,focus:!0,blur:!0}})};var uq=(J={})=>{J.layout=J.layout||"multi-browse",J.scrollBehavior=J.scrollBehavior||fq(J.layout);let $=o0(J);try{let q={...I(T,h(),S(t0($)))($)};gq(q,J);let Z=s8($)(q),j=m8($)(Z),K=v()(j),Y={slides:{addSlide:K.slides.addSlide,removeSlide:K.slides.removeSlide,updateSlide:K.slides.updateSlide,getCount:K.slides.getCount,getElements:K.slides.getElements},lifecycle:{destroy:K.lifecycle.destroy}},G=c0(Y)(K);return G.element.dataset.layout=J.layout,G.element.dataset.scrollBehavior=J.scrollBehavior,G}catch(Q){throw console.error("Carousel creation error:",Q),new Error(`Failed to create carousel: ${Q.message}`)}};function fq(J){switch(J){case"multi-browse":case"hero":case"full-screen":return"snap";case"uncontained":return"default";default:return"default"}}function gq(J,$){switch(J.element.classList.add(`${J.getClass("carousel")}-layout--${$.layout}`),$.layout){case"multi-browse":J.element.dataset.enableParallax="true",J.element.dataset.layout="multi-browse";break;case"uncontained":J.element.style.overflow="visible",J.element.dataset.layout="uncontained";break;case"hero":if(J.element.dataset.largeItemFocus="true",J.element.dataset.layout="hero",$.centered)J.element.dataset.centered="true";break;case"full-screen":J.element.style.width="100%",J.element.style.height="100%",J.element.style.maxWidth="100vw",J.element.style.maxHeight="100vh",J.element.dataset.verticalScroll="true",J.element.dataset.layout="full-screen",$.scrollBehavior="snap";break}if($.scrollBehavior==="snap")J.element.dataset.snapScroll="true";else J.element.dataset.snapScroll="false"}var a8=uq;n();s();c();var n0=({disabled:J,lifecycle:$,checkable:Q})=>(q)=>({...q,element:q.element,input:q.input,getValue:q.getValue||(()=>""),setValue(Z){return q.setValue?.(Z),this},check(){return Q.check(),this},uncheck(){return Q.uncheck(),this},toggle(){return Q.toggle(),this},isChecked(){return Q.isChecked()},setIndeterminate(Z){return q.setIndeterminate?.(Z),this},setLabel(Z){return q.text?.setText(Z),this},getLabel(){return q.text?.getText()||""},on(Z,j){return q.on?.(Z,j),this},off(Z,j){return q.off?.(Z,j),this},enable(){return J.enable(),this},disable(){return J.disable(),this},destroy(){$.destroy()}});m();var dq={variant:"filled",labelPosition:"end"},e0=(J={})=>b(dq,J,"checkbox"),$4=(J)=>f(J,{tag:"div",className:J.class,interactive:!0}),J4=(J)=>($)=>{let Q=document.createElement("span");return Q.className=`${J.prefix}-checkbox-icon`,Q.innerHTML=`
|
|
9
|
+
</svg>`,H7=(J)=>($)=>{let Q=document.createElement("span");Q.className=`${J.prefix}-${J.componentName}-track`;let q=document.createElement("span");if(q.className=`${J.prefix}-${J.componentName}-thumb`,Q.appendChild(q),J.icon!=="none"){let Z=document.createElement("span");Z.className=`${J.prefix}-${J.componentName}-thumb-icon`,Z.innerHTML=J.icon||Xq,q.appendChild(Z)}return $.element.appendChild(Q),{...$,track:Q,thumb:q}};var q$=(J)=>{let $=new Map;return{on(Q,q){return J.addEventListener(Q,q),$.set(q,Q),this},off(Q,q){return J.removeEventListener(Q,q),$.delete(q),this},destroy(){$.forEach((Q,q)=>{J.removeEventListener(Q,q)}),$.clear()},getHandlers(){return new Map($)}}};var X8=(J)=>($)=>{let Q=q$(J||$.element),q={addListeners(Z){return Object.entries(Z).forEach(([j,K])=>{Q.on(j,K)}),this},removeListeners(Z){return Object.entries(Z).forEach(([j,K])=>{Q.off(j,K)}),this},once(Z,j){let K=(Y)=>{j(Y),Q.off(Z,K)};return Q.on(Z,K),this},on(Z,j){return Q.on(Z,j),this},off(Z,j){return Q.off(Z,j),this},destroy(){Q.destroy()}};if(z9($)){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{Q.destroy(),Z.call($.lifecycle)}}return{...$,events:q,on:q.on.bind(q),off:q.off.bind(q)}};var AQ=()=>{};var wQ=g(()=>{M7();w6()});var d9=(J,$,Q={})=>{let q=null,Z=0,{leading:j=!0,trailing:K=!0}=Q;return function(...Y){let G=Date.now();if(!Z&&!j)Z=G;let z=$-(G-Z);if(z<=0||z>$){if(q)clearTimeout(q),q=null;Z=G,J.apply(this,Y)}else if(!q&&K)q=window.setTimeout(()=>{Z=j?Date.now():0,q=null,J.apply(this,Y)},z)}},r9=(J,$,Q={})=>{let q=null,Z=null,j=null,K,Y=null,G=0,{leading:z=!1,maxWait:W}=Q,X=(F)=>{let k=F-(Y||0),L=F-G;return!Y||k>=$||k<0||W!==void 0&&L>=W},U=(F)=>{let k=Z,L=j;return Z=j=null,G=F,K=J.apply(L,k),K},_=(F)=>{if(q=null,Z)return U(F);return K},N=(F)=>{return G=F,q=window.setTimeout(()=>{_(Date.now())},$),z?U(F):K};return function(...F){let k=Date.now(),L=X(k);if(Z=F,j=this,Y=k,L){if(q===null)return N(k);if(W!==void 0)q=window.setTimeout(()=>{let D=Date.now();if(X(D))return _(D)},Math.min($,W-(k-G)))}if(q===null)q=window.setTimeout(()=>{_(Date.now())},$);return K}},Z$=(J)=>{let $=!1,Q;return function(...q){if(!$)$=!0,Q=J.apply(this,q);return Q}};var B8=(J={})=>($)=>{let Q={},q=(K,Y,G,z={})=>{if(Q[K])Z(K);let W=d9(Y,G,z);return $.element.addEventListener(K,W),Q[K]={original:Y,throttled:W},j},Z=(K)=>{let Y=Q[K];if(Y)$.element.removeEventListener(K,Y.throttled),delete Q[K];return j};if(z9($)){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{Object.keys(Q).forEach((Y)=>{let G=Q[Y];$.element.removeEventListener(Y,G.throttled)}),K.call($.lifecycle)}}if(J.throttledEvents)Object.entries(J.throttledEvents).forEach(([K,Y])=>{q(K,Y.handler,Y.wait,Y.options)});let j={...$,addThrottledEvent:q,removeThrottledEvent:Z};return j};var xQ=()=>{};function Bq(J){return"lifecycle"in J&&J.lifecycle&&typeof J.lifecycle==="object"&&"destroy"in J.lifecycle&&typeof J.lifecycle.destroy==="function"}var F8=(J={})=>($)=>{let Q={},q=(K,Y,G,z={})=>{if(Q[K])Z(K);let W=r9(Y,G,z);return $.element.addEventListener(K,W),Q[K]={original:Y,debounced:W},j},Z=(K)=>{let Y=Q[K];if(Y)$.element.removeEventListener(K,Y.debounced),delete Q[K];return j};if(Bq($)){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{Object.keys(Q).forEach((Y)=>{let G=Q[Y];$.element.removeEventListener(Y,G.debounced)}),K.call($.lifecycle)}}if(J.debouncedEvents)Object.entries(J.debouncedEvents).forEach(([K,Y])=>{q(K,Y.handler,Y.wait,Y.options)});let j={...$,addDebouncedEvent:q,removeDebouncedEvent:Z};return j};var TQ=()=>{};function H8(J){return"input"in J&&J.input instanceof HTMLElement&&"disabled"in J.input}var G6=(J)=>($)=>{let Q=`${$.getClass(J.componentName||$.componentName||"component")}--disabled`,q={enable(){if($.element.classList.remove(Q),H8($))$.input.disabled=!1,$.input.removeAttribute("disabled");else{let Z=$.element;if("disabled"in Z)Z.disabled=!1;$.element.removeAttribute("disabled")}return this},disable(){if($.element.classList.add(Q),H8($))$.input.disabled=!0,$.input.setAttribute("disabled","true");else{let Z=$.element;if("disabled"in Z)Z.disabled=!0;$.element.setAttribute("disabled","true")}return this},toggle(){if(this.isDisabled())this.enable();else this.disable();return this},isDisabled(){if(H8($))return $.input.disabled;let Z=$.element;return"disabled"in Z&&Z.disabled}};if(J.disabled)requestAnimationFrame(()=>{q.disable()});return{...$,disabled:q}};function Fq(J){return"events"in J&&J.events&&typeof J.events==="object"&&"destroy"in J.events&&typeof J.events.destroy==="function"}function Hq(J){return"text"in J&&J.text&&typeof J.text==="object"&&"getElement"in J.text&&typeof J.text.getElement==="function"}function Mq(J){return"icon"in J&&J.icon&&typeof J.icon==="object"&&"getElement"in J.icon&&typeof J.icon.getElement==="function"}var v=()=>(J)=>{let $=!1,Q=T6();return{...J,lifecycle:{onMount:(Z)=>Q.on("mount",Z),onUnmount:(Z)=>Q.on("unmount",Z),mount:()=>{if(!$)$=!0,Q.emit("mount")},unmount:()=>{if($)$=!1,Q.emit("unmount"),Q.clear()},isMounted:()=>$,destroy(){if($)this.unmount();if(Fq(J))J.events.destroy();if(Hq(J)){let Z=J.text.getElement();if(Z)Z.remove()}if(Mq(J)){let Z=J.icon.getElement();if(Z)Z.remove()}if(J.element)J.element.remove()}}}};var IQ=()=>{};var c=g(()=>{LQ();_Q();PQ();yQ();AQ();wQ();xQ();TQ();IQ()});var n=g(()=>{s();c()});function M8(J,$){k7[J]=$}function N7(J){return k7[J]||{}}function k8(J){Object.assign(k7,J)}function N8(){Object.keys(k7).forEach((J)=>{delete k7[J]})}var k7;var L8=g(()=>{k7={}});var b=(J,$={},Q)=>{let q=N7(Q),Z=$.className!==void 0?$.className:$.class,j=J.className!==void 0?J.className:J.class,K={...J,...q,...$,componentName:Q,prefix:u,className:Z!==void 0?Z:j};if("class"in K&&K.className!==void 0)delete K.class;return K},f=(J,$)=>{let Q=J.className||J.class,q=$.className,Z=[...Array.isArray(Q)?Q:[Q],...Array.isArray(q)?q:[q]].filter(Boolean),j=$.attributes||{};return{tag:$.tag,componentName:J.componentName,attributes:j,className:Z.length>0?Z:void 0,rawClass:J.rawClass,html:$.html,text:$.text,forwardEvents:$.forwardEvents||{},interactive:$.interactive}};var m=g(()=>{w6();L8()});var L7,V7,_7,O9=4;var V8=g(()=>{L7={SMALL:"small",LARGE:"large"},V7={ERROR:"error",PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",SUCCESS:"success",WARNING:"warning",INFO:"info"},_7={TOP_RIGHT:"top-right",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_LEFT:"bottom-left"}});var kq,SQ=(J={})=>b(kq,J,"badge"),bQ=(J)=>{let $={};if(J.variant!=="small")$.role="status";let Q=J.variant==="small"?"":l9(J.label||"",J.max);return f(J,{tag:"span",attributes:$,className:J.class,text:Q})},vQ=(J)=>({visibility:{show:()=>J.visibility.show(),hide:()=>J.visibility.hide(),toggle:($)=>J.visibility.toggle($),isVisible:()=>J.visibility.isVisible()},lifecycle:{destroy:()=>J.lifecycle.destroy()}}),l9=(J,$)=>{if(J===void 0||J===null||J==="")return"";let Q=String(J),q=Number(J);if($!==void 0&&!isNaN(q)&&q>$)Q=`${$}+`;if(Q.length>O9){let Z=Number(J);if(!isNaN(Z))if(Z>=1000)Q="999+";else Q=Q.substring(0,O9-1)+"+";else Q=Q.substring(0,O9)}return Q};var j$=g(()=>{m();V8();kq={variant:L7.LARGE,color:V7.ERROR,position:_7.TOP_RIGHT,label:"",visible:!0}});var CQ="small",Nq="large",Lq="error",Vq="top-right",EQ=()=>(J)=>{if(J.config.visible===!1)J.element.classList.add(`${J.getClass("badge")}--invisible`);return{...J,visibility:{show(){J.element.classList.remove(`${J.getClass("badge")}--invisible`)},hide(){J.element.classList.add(`${J.getClass("badge")}--invisible`)},toggle(Q){if(Q===void 0)J.element.classList.toggle(`${J.getClass("badge")}--invisible`);else if(Q)this.show();else this.hide()},isVisible(){return!J.element.classList.contains(`${J.getClass("badge")}--invisible`)}}}},hQ=(J)=>($)=>{let Q=J.variant||Nq;if($.element.classList.add(`${$.getClass("badge")}--${Q}`),Q===CQ)$.element.textContent="",$.element.setAttribute("aria-hidden","true");else if($.element.setAttribute("role","status"),J.label!==void 0&&J.label!==""){let q=l9(J.label,J.max);$.element.textContent=q}return $},uQ=(J)=>($)=>{let Q=J.color||Lq;return $.element.classList.add(`${$.getClass("badge")}--${Q}`),$},fQ=(J)=>($)=>{let Q=J.position||Vq;if($.element.classList.add(`${$.getClass("badge")}--${Q}`),J.target)$.element.classList.add(`${$.getClass("badge")}--positioned`);return $},gQ=(J)=>($)=>{if(J.max===void 0||J.variant===CQ)return $;if($.config.max=J.max,J.label!==void 0&&J.label!==""){let Q=l9(J.label,J.max);if($.element.textContent=Q,typeof J.label==="number"&&J.label>J.max)$.element.classList.add(`${$.getClass("badge")}--overflow`)}return $},dQ=(J)=>($)=>{if(!J.target)return $;let Q=document.createElement("div");Q.classList.add($.getClass("badge-wrapper")),Q.style.position="relative";let q=J.target.parentNode;if(q)q.replaceChild(Q,J.target),Q.appendChild(J.target),Q.appendChild($.element),$.wrapper=Q;return $};var rQ=g(()=>{j$()});var lQ="small",_q,Dq,Oq,pQ=({visibility:J,lifecycle:$})=>(Q)=>{let q={element:Q.element,wrapper:Q.wrapper,getClass:Q.getClass,setLabel(Z){if(Q.config.label=Z,Q.config.variant===lQ)return Q.element.textContent="",q;let j=l9(Z,Q.config.max);if(Q.element.textContent=j,Q.element.classList.remove(`${Q.getClass("badge")}--overflow`),typeof Z==="number"&&Q.config.max!==void 0&&Z>Q.config.max)Q.element.classList.add(`${Q.getClass("badge")}--overflow`);if(j===""||j==="0")q.hide();else q.show();return q},getLabel(){return Q.element.textContent||""},setContent(Z){return q.setLabel(Z)},getContent(){return q.getLabel()},show(){return J.show(),q},hide(){return J.hide(),q},toggle(Z){return J.toggle(Z),q},isVisible(){return J.isVisible()},setMax(Z){if(Q.config.max=Z,Q.config.label!==void 0)q.setLabel(Q.config.label);return q},setColor(Z){return _q.forEach((j)=>{Q.element.classList.remove(`${Q.getClass("badge")}--${j}`)}),Q.element.classList.add(`${Q.getClass("badge")}--${Z}`),q},setVariant(Z){if(Dq.forEach((j)=>{Q.element.classList.remove(`${Q.getClass("badge")}--${j}`)}),Q.element.classList.add(`${Q.getClass("badge")}--${Z}`),Q.config.variant=Z,Z===lQ)Q.element.textContent="",Q.element.setAttribute("aria-hidden","true");else if(Q.element.setAttribute("role","status"),Q.config.label!==void 0)q.setLabel(Q.config.label);return q},setPosition(Z){return Oq.forEach((j)=>{Q.element.classList.remove(`${Q.getClass("badge")}--${j}`)}),Q.element.classList.add(`${Q.getClass("badge")}--${Z}`),q},attachTo(Z){if(Q.wrapper&&Q.wrapper.contains(Q.element))Q.wrapper.removeChild(Q.element);let j=document.createElement("div");j.classList.add(Q.getClass("badge-wrapper")),j.style.position="relative";let K=Z.parentNode;if(K)K.replaceChild(j,Z),j.appendChild(Z),j.appendChild(Q.element),Q.element.classList.add(`${Q.getClass("badge")}--positioned`),Q.wrapper=j,q.wrapper=j;return q},detach(){if(Q.wrapper&&Q.wrapper.contains(Q.element))Q.wrapper.removeChild(Q.element),Q.element.classList.remove(`${Q.getClass("badge")}--positioned`),document.body.appendChild(Q.element),Q.wrapper=void 0,q.wrapper=void 0;return q},destroy(){if($.destroy(),Q.wrapper){let Z=Q.wrapper.firstChild,j=Q.wrapper.parentNode;if(j&&Z)j.replaceChild(Z,Q.wrapper)}},addClass:(...Z)=>{return Q.addClass(...Z),q},removeClass:(...Z)=>{return Q.removeClass(...Z),q},on:(Z,j)=>{return Q.on(Z,j),q},off:(Z,j)=>{return Q.off(Z,j),q}};return q};var sQ=g(()=>{j$();_q=["error","primary","secondary","tertiary","success","warning","info"],Dq=["small","large"],Oq=["top-right","top-left","bottom-right","bottom-left"]});var Pq=(J={})=>{let $=SQ(J);try{return I(T,h(),S(bQ($)),hQ($),uQ($),fQ($),gQ($),EQ(),dQ($),v(),(q)=>pQ(vQ(q))(q))($)}catch(Q){throw console.error("Badge creation error:",Q),Error(`Failed to create badge: ${Q.message}`)}},g9;var mQ=g(()=>{n();s();c();rQ();sQ();j$();g9=Pq});var M7=g(()=>{mQ()});var oQ=(J)=>{let $=new Map,Q=(j,K)=>`${j}_${K.toString()}`,q=(j,K)=>(Y)=>{try{j(Y)}catch(G){console.error(`Error in ${K} handler:`,G)}},Z=(j,K)=>{try{J.removeEventListener(j,K)}catch(Y){console.warn(`Failed to remove ${j} listener:`,Y)}};return{on(j,K,Y={}){let G=q(K,j),z=Q(j,K);return $.set(z,{original:K,enhanced:G,event:j,options:Y}),J.addEventListener(j,G,Y),this},off(j,K){let Y=Q(j,K),G=$.get(Y);if(G)Z(j,G.enhanced),$.delete(Y);return this},pause(){return $.forEach(({enhanced:j,event:K})=>{Z(K,j)}),this},resume(){return $.forEach(({enhanced:j,event:K,options:Y})=>{J.addEventListener(K,j,Y)}),this},destroy(){$.forEach(({enhanced:j,event:K})=>{Z(K,j)}),$.clear()},getHandlers(){return new Map($)},hasHandler(j,K){let Y=Q(j,K);return $.has(Y)}}};var p9=g(()=>{u6();u9()});var J9,R6,s9,I6,z6,r6,S6,W6;var a6=g(()=>{J9={LINEAR:"linear",CIRCULAR:"circular"},R6={FLAT:"flat",WAVY:"wavy"},s9={CHANGE:"change",COMPLETE:"complete"},I6={VARIANT:"linear",VALUE:0,MAX:100,BUFFER:0,SHAPE:"flat",SHOW_LABEL:!1,INDETERMINATE:!1},z6={CONTAINER:"progress",LINEAR:"progress--linear",CIRCULAR:"progress--circular",TRACK:"progress__track",INDICATOR:"progress__indicator",BUFFER:"progress__buffer",LABEL:"progress__label",INDETERMINATE:"progress--indeterminate",DISABLED:"progress--disabled",TEST:"progress--test",TRANSITION:"progress--transition"},r6={LINEAR:{MIN_HEIGHT:4,GAP:4,STOP_INDICATOR:4,HEIGHT:4},CIRCULAR:{SIZE:48,GAP:8},COMMON:{STROKE_WIDTH:4}},S6={THIN:4,THICK:8},W6={LINEAR:{AMPLITUDE:4,SPEED:1,FREQUENCY:2,INDETERMINATE_FREQUENCY:4,INDETERMINATE_AMPLITUDE:2,POWER:0.8,START_TRANSITION_END:0,END_TRANSITION_START:0.92},CIRCULAR:{AMPLITUDE:6,INDETERMINATE_AMPLITUDE:4,SPEED:1,FREQUENCY:10,INDETERMINATE_FREQUENCY:16,POWER:0.8,START_TRANSITION_END:0,END_TRANSITION_START:0.92}}});var O8=(J)=>{return Boolean(J&&typeof J==="object"&&Object.getPrototypeOf(J)===Object.getPrototypeOf({}))},P8=(J,$)=>{let Z=$.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),j=J;for(let K=0,Y=Z.length;K<Y;++K){let G=Z[K];if(G in j)j=j[G];else return}return j};var U9=(J,$=17)=>{if(!J||!(J instanceof HTMLElement))return{color:"",element:null};let Q=0,q=J;while(q&&Q<$){let K=window.getComputedStyle(q).backgroundColor;if(K.startsWith("var(")){let Y=K.match(/var\((--[\w-]+)\)/);if(Y){let G=Y[1];K=window.getComputedStyle(document.documentElement).getPropertyValue(G).trim()||"transparent"}}if(K&&K!=="transparent"&&K!=="rgba(0, 0, 0, 0)"&&K!=="rgba(0,0,0,0)")return{color:K,element:q};q=q.parentElement,Q++}let Z=window.getComputedStyle(document.body).backgroundColor;if(Z!=="transparent"&&Z!=="rgba(0, 0, 0, 0)")return{color:Z,element:document.body};return{color:"rgb(255, 255, 255)",element:null}};var R8=()=>{};function F6(J,$){let Q=`--${u}-${J}`;if($?.onThemeChange)Aq($.onThemeChange);let Z=getComputedStyle(document.body).getPropertyValue(Q).trim();if(!Z)Z=getComputedStyle(document.documentElement).getPropertyValue(Q).trim();if(!Z&&$?.fallback)return $.fallback;if(!Z)return"";if(typeof $?.alpha==="number"&&/\d+,\s*\d+,\s*\d+/.test(Z))return`rgba(${Z}, ${$.alpha})`;if(typeof $?.alpha==="number"&&/^#([\da-f]{6}|[\da-f]{3})$/i.test(Z)){let j=Z.replace("#",""),K,Y,G;if(j.length===3)K=parseInt(j[0]+j[0],16),Y=parseInt(j[1]+j[1],16),G=parseInt(j[2]+j[2],16);else K=parseInt(j.substring(0,2),16),Y=parseInt(j.substring(2,4),16),G=parseInt(j.substring(4,6),16);return`rgba(${K}, ${Y}, ${G}, ${$.alpha})`}return Z}var K$,P9=null,yq=()=>{if(P9)return;P9=new MutationObserver((J)=>{for(let $ of J)if($.type==="attributes"&&($.attributeName==="data-theme"||$.attributeName==="data-theme-mode")){K$.forEach((Q)=>Q());break}}),P9.observe(document.body,{attributes:!0,attributeFilter:["data-theme","data-theme-mode"]})},Aq=(J)=>{if(!P9)yq();return K$.add(J),()=>{K$.delete(J)}};var tQ=g(()=>{w6();K$=new Set;if(typeof window<"u")window.addEventListener("unload",()=>{if(P9)P9.disconnect(),P9=null;K$.clear()})});var D7=(J,$)=>{let q=document.createElement("canvas").getContext("2d");if(!q)return`rgba(0, 0, 0, ${$})`;q.fillStyle=J;let Z=q.fillStyle;if(Z.startsWith("#")){let j=Z.substring(1),K=parseInt(j.substring(0,2),16),Y=parseInt(j.substring(2,4),16),G=parseInt(j.substring(4,6),16);return`rgba(${K}, ${Y}, ${G}, ${$})`}if(Z.startsWith("rgb")){let j=Z.match(/\d+/g);if(j){let[K,Y,G]=j;return`rgba(${K}, ${Y}, ${G}, ${$})`}}return`rgba(0, 0, 0, ${$})`};var nQ=(J,$)=>(Q,q)=>J(Q,q)?$(Q,q):Q,eQ=(...J)=>J.filter(Boolean).join(" ");var R9=g(()=>{U7();R8();tQ()});var O7=(J,$,Q)=>{let q=null,Z=()=>{if(q)clearTimeout(q);q=window.setTimeout(()=>{Q()},100)};if(typeof ResizeObserver<"u"){let j=new ResizeObserver((K)=>{for(let Y of K){let{width:G}=Y.contentRect,z=parseFloat($.style.width||"0");if(Math.abs(G-z)>2)Z()}});return j.observe(J),()=>{if(q)clearTimeout(q);j.disconnect()}}else return window.addEventListener("resize",Z),()=>{if(q)clearTimeout(q);window.removeEventListener("resize",Z)}};var $0=(J,$,Q,q,Z,j,K,Y,G)=>{let z=Math.max(100,Math.abs(j-Z)*50),W=(j-Z)/z,X=W6.CIRCULAR.SPEED*2*Math.PI/1000;J.beginPath();for(let U=0;U<=z;U++){let _=Z+W*U,N=_*Y+G*X,F=Math.sin(N),L=Math.sign(F)*Math.pow(Math.abs(F),W6.CIRCULAR.POWER)*K,D=q+L,B=$+D*Math.cos(_),H=Q+D*Math.sin(_);if(U===0)J.moveTo(B,H);else J.lineTo(B,H)}J.stroke()},J0=(J,$,Q,q,Z,j=0,K="flat")=>{let{ctx:Y,width:G,height:z}=J,W=P7($.thickness),X=K==="wavy",U=Math.min(G,z),_=Z?W6.CIRCULAR.INDETERMINATE_AMPLITUDE:W6.CIRCULAR.AMPLITUDE,N=U/2-W/2,F=N*(_/100),k=X?y9(W,F):0,L=N-k,D=G/2,B=z/2;Y.clearRect(0,0,G,z);let V=(r6.CIRCULAR.GAP+2*W)/L,O=-Math.PI/2,M=2*Math.PI-V;Y.lineWidth=W,Y.lineCap="round",Y.lineJoin="round";let P=Z?W6.CIRCULAR.INDETERMINATE_FREQUENCY:W6.CIRCULAR.FREQUENCY;if(Z){let B6=j%1333/1333,w=(N9)=>{let U6=N9<=0.5?N9*2:2-N9*2;return 0.028+0.722*(U6<0.5?2*U6*U6:1-Math.pow(-2*U6+2,2)/2)},l=()=>{let N9=j/1568*2*Math.PI,U6=Math.floor(j/1333),h6=j%1333/1333,e6=0;if(h6>0.5){let Y7=(h6-0.5)*2;e6=0.722*(Y7<0.5?2*Y7*Y7:1-Math.pow(-2*Y7+2,2)/2)}return N9+(U6*0.722+e6)*2*Math.PI},a=w(B6)*2*Math.PI,i=l(),O6=O+i,J6=O6+a;Y.strokeStyle=F6("sys-color-primary-rgb",{alpha:0.12,fallback:"rgba(103, 80, 164, 0.12)"}),Y.beginPath();let h9=V/2;if(Y.arc(D,B,L,J6+h9,O6-h9+2*Math.PI),Y.stroke(),Y.strokeStyle=F6("sys-color-primary",{fallback:"#6750A4"}),X)$0(Y,D,B,L,O6,J6,k,P,j);else Y.beginPath(),Y.arc(D,B,L,O6,J6),Y.stroke();return}let R=Q/q,x=Math.max(R,0.001),A=0.95,C=M;if(R>=A){let $6=(R-A)/(1-A),B6=$6*$6;C=M+V*B6}if(R<0.99){let B6=O+C*x+V/2,w=O+M+V/2;if(B6<w)Y.strokeStyle=F6("sys-color-primary-rgb",{alpha:0.12,fallback:"rgba(103, 80, 164, 0.12)"}),Y.beginPath(),Y.arc(D,B,L,B6,w),Y.stroke()}Y.strokeStyle=F6("sys-color-primary",{fallback:"#6750A4"});let r=k;if(X){let $6=W6.CIRCULAR.START_TRANSITION_END,B6=W6.CIRCULAR.END_TRANSITION_START;if(R===0&&$6>0)r=0;else if(R>0&&R<=$6){let w=R/$6;r=k*Math.pow(w,2)}else if(R>=B6){let w=(R-B6)/(1-B6),l=1-Math.pow(1-w,2);r=k*(1-l)}if(R>=1)r=0}let Q6=O,X6=O+C*x;if(X)$0(Y,D,B,L,Q6,X6,r,P,j);else Y.beginPath(),Y.arc(D,B,L,Q6,X6),Y.stroke()};var Q0=g(()=>{a6();R9();Y$()});var R7=(J,$,Q)=>{J.strokeStyle=Q,J.lineWidth=$,J.lineCap="round"},X9=(J,$,Q,q,Z,j,K)=>{if(J.beginPath(),!Z||K.amplitude===0)J.moveTo($,q),J.lineTo(Q,q);else{let Y=$;for(let G=$;G<=Q;G+=1){let z=G*K.frequency+j*K.speed,W=Math.sin(z),X=Math.sign(W)*Math.pow(Math.abs(W),W6.LINEAR.POWER),U=q+X*K.amplitude;if(G===$)J.moveTo(G,U);else J.lineTo(G,U);Y=G}if(Y<Q){let G=Q*K.frequency+j*K.speed,z=Math.sin(G),W=Math.sign(z)*Math.pow(Math.abs(z),W6.LINEAR.POWER),X=q+W*K.amplitude;J.lineTo(Q,X)}}J.stroke()},q0=(J,$)=>{let[Q,q,Z]=$;if(J<=Q)return 0.08+0.5814790000000001*(J/Q);else if(J<=q)return 0.661479;else if(Z&&J<=Z)return 0.661479;return Z?0.661479-0.5814790000000001*((J-Z)/(1-Z)):0.08},Z0=(J,$)=>{for(let Z=0;Z<$.length-1;Z++){let[j,K]=$[Z],[Y,G]=$[Z+1];if(J<=Y){let z=(J-j)/(Y-j);return K+(G-K)*z}}let[Q,q]=$[$.length-1];return q+(220-q)*((J-Q)/(1-Q))},j0=(J,$,Q,q,Z,j,K=0,Y=!0,G="flat")=>{let{ctx:z,width:W,height:X}=J,U=P7($.thickness),_=X/2,N=G==="wavy",F=U/2,k=W-F*2,L=r6.LINEAR.GAP,D=Q/q,B=0.001,H=Math.max(D,0.001),V=F+k*H;z.clearRect(0,0,W,X);let O=F6("sys-color-primary",{fallback:"#6750A4"}),M=F6("sys-color-primary-rgb",{alpha:0.12,fallback:"rgba(103, 80, 164, 0.12)"});if(j){let X6=K%2000/2000,$6=L*2+U/2,B6=q0(X6,[0.3665,0.6915]),w=Z0(X6,[[0,-120],[0.2,0],[0.5915,83.6714]]),l=X6<=0.5?0:q0(X6,[0.8335,null,0.8335]),a=X6<=0.5?-54.8889:Z0(X6,[[0.5,-54.8889],[0.7,25.0389],[0.85,83.6714]]),O6=[{scale:B6,translate:w,start:Math.max(F,F+k*w/100),end:Math.min(W-F,F+k*w/100+k*B6)},{scale:l,translate:a,start:Math.max(F,F+k*a/100),end:Math.min(W-F,F+k*a/100+k*l)}].filter((U6)=>U6.end>U6.start).sort((U6,h6)=>U6.start-h6.start),J6=[];for(let U6=0;U6<O6.length;U6++){let h6=O6[U6];if(J6.length===0)J6.push({...h6});else{let e6=J6[J6.length-1];if(h6.start<=e6.end+$6)e6.end=Math.max(e6.end,h6.end);else J6.push({...h6})}}R7(z,U,M);let h9=U;if(J6.length===0)X9(z,F,W-F,_,!1,0,{amplitude:0,frequency:0,speed:0});else{let U6=J6[0].start;if(U6-F>$6+h9)X9(z,F,U6-$6,_,!1,0,{amplitude:0,frequency:0,speed:0});if(J6.length===2){if(J6[1].start-J6[0].end>2*$6+h9)X9(z,J6[0].end+$6,J6[1].start-$6,_,!1,0,{amplitude:0,frequency:0,speed:0})}let e6=J6[J6.length-1].end;if(W-F-e6>$6+h9)X9(z,e6+$6,W-F,_,!1,0,{amplitude:0,frequency:0,speed:0})}R7(z,U,O);let N9={amplitude:N?y9(U,W6.LINEAR.INDETERMINATE_AMPLITUDE):0,frequency:W6.LINEAR.INDETERMINATE_FREQUENCY*2*Math.PI/100,speed:0};J6.forEach((U6)=>{X9(z,U6.start,U6.end,_,N,K,N9)});return}let P=W6.LINEAR.START_TRANSITION_END,R=W6.LINEAR.END_TRANSITION_START,y=(L+U)/2;R7(z,U,M);let x=D===0?F+U+L:Math.min(V+y,W-F);X9(z,x,W-F,_,!1,0,{amplitude:0,frequency:0,speed:0}),R7(z,U,O);let A=D>=1?W-F:Math.max(F,V-y),C;if(D===0)C=F+(N?0.1:0);else{let Q6=U/2;C=Math.max(F+Q6,A)}let r=N?y9(U,W6.LINEAR.AMPLITUDE):0;if(N){if(D===0&&P>0)r=0;else if(H<=P)r*=Math.pow(H/P,2);else if(H>=R)r*=Math.pow((1-H)/(1-R),2)}if(X9(z,F,C,_,N,K,{amplitude:r,frequency:W6.LINEAR.FREQUENCY*2*Math.PI/100,speed:W6.LINEAR.SPEED*2*Math.PI/1000}),Z>0&&Z>Q){R7(z,U,F6("sys-color-secondary-container",{fallback:"#E8DEF8"}));let Q6=F+k*(Z/q);X9(z,V,Q6,_,!1,0,{amplitude:0,frequency:0,speed:0})}if(D<1&&Y){let Q6=Math.min(U*0.5,2);z.beginPath(),z.arc(W-F,_,Q6,0,2*Math.PI),z.fillStyle=O,z.fill()}};var K0=g(()=>{a6();R9();Y$()});var P7=(J="thin")=>{if(typeof J==="number")return J;return J==="thick"?S6.THICK:S6.THIN},y9=(J,$,Q)=>{let Z=1+0.3*(4-J)/(J+4),j=$*Z;return Q?Math.min(j,Q):j},y8=(J,$,Q,q)=>{let Z=window.devicePixelRatio||1,j=P7(q?.thickness),{ctx:K}=$;if(Q){let Y=Math.max(24,Math.min(q?.size??r6.CIRCULAR.SIZE,240)),G=0;if(q?.shape==="wavy"){let W=Y/2-j/2,X=q?.indeterminate?W6.CIRCULAR.INDETERMINATE_AMPLITUDE:W6.CIRCULAR.AMPLITUDE,U=W*(X/100);G=y9(j,U)}let z=Y+G*2;J.style.width=J.style.height=`${z}px`,J.width=J.height=Math.round(z*Z),$.width=$.height=z}else{let Y=J.parentElement;if(!Y)return;let G=Math.max(Y.getBoundingClientRect().width||Y.offsetWidth,200),z=0;if(q?.shape==="wavy"){let X=W6.LINEAR.AMPLITUDE,U=y9(j,X);z=Math.ceil(U*2)}let W=j+z;J.style.width=`${G}px`,J.style.height=`${W}px`,J.width=Math.round(G*Z),J.height=Math.round(W*Z),$.width=G,$.height=W}K.setTransform(1,0,0,1,0,0),K.scale(Z,Z)},Y0=(J,$,Q)=>{let q={canvas:J,ctx:J.getContext("2d"),width:0,height:0,pixelRatio:window.devicePixelRatio||1};return y8(J,q,$,Q),q},G0=(J)=>($)=>{let q=J.variant===J9.CIRCULAR,Z=document.createElement("canvas");Z.className=`${$.getClass(z6.CONTAINER)}-canvas`,Z.style.maxWidth="100%",Z.style.maxHeight="100%",Z.style.boxSizing="border-box",$.element.appendChild(Z);let j=null,K=null,Y=null,G=J.thickness,z=J.shape,W=J.size??r6.CIRCULAR.SIZE,X=J.value??0,U=X,_=0,N=()=>{try{return j=Y0(Z,q,{...J,thickness:G,shape:z,size:W}),$.ctx=j.ctx,!0}catch(P){return console.warn("Canvas initialization failed:",P),!1}};if(!N())requestAnimationFrame(()=>{if(!N())setTimeout(N,100)});$.canvas=Z,$.animationTime=0,$.animationId=null,$.wavyAnimationId=null,$.valueAnimationId=null,$.currentShape=z;let F=(P=0)=>{if(!$.state?.indeterminate)return;if($.animationId)cancelAnimationFrame($.animationId),$.animationId=null;let R=0,y=(x)=>{if(!$.state?.indeterminate){k();return}if(R===0)R=x-P;let A=x-R;$.animationTime=A,B(A),$.animationId=requestAnimationFrame(y)};$.animationId=requestAnimationFrame(y)},k=()=>{if($.animationId)cancelAnimationFrame($.animationId),$.animationId=null},L=(P=0)=>{if($.wavyAnimationId)cancelAnimationFrame($.wavyAnimationId),$.wavyAnimationId=null;let R=0,y=(x)=>{if(R===0)R=x-P;let A=x-R;$.animationTime=A,B(A),$.wavyAnimationId=requestAnimationFrame(y)};$.wavyAnimationId=requestAnimationFrame(y)},D=()=>{if($.wavyAnimationId)cancelAnimationFrame($.wavyAnimationId),$.wavyAnimationId=null},B=(P=0)=>{if(!j)return;let R=$.state,y=R?.value??J.value??0,x=R?.max??J.max??100,A=R?.buffer??J.buffer??0,C=R?.indeterminate??J.indeterminate??!1,r={...J,thickness:G,shape:z,size:W};y8(Z,j,q,r);let Q6=C||!R?y:X;if(q)J0(j,r,Q6,x,C,P,z);else j0(j,r,Q6,x,A,C,P,!0,z)},H=()=>{if(!j)return;try{let P=Y0(Z,q,{...J,thickness:G,shape:z,size:W});$.ctx=P.ctx,Object.assign(j,P),B()}catch(P){console.warn("Canvas resize failed:",P)}};K=O7($.element,Z,()=>{if($.element.offsetWidth>0||q)H()});let V=F6("sys-color-primary",{onThemeChange:B});Y=typeof V==="function"?V:null;let O=()=>{if(!j){requestAnimationFrame(O);return}if(B(),$.state?.indeterminate)if(z==="wavy"||!q)L();else F();else if(z==="wavy")L()};requestAnimationFrame(O);let M=(P)=>{if(!j)return;let R={...J,thickness:G,shape:z,size:W,...P};y8(Z,j,q,R),B()};if($.setThickness=(P)=>{G=P,M({thickness:P})},$.setSize=(P)=>{if(!q)return;W=Math.max(24,Math.min(P,240)),M({size:W})},$.getSize=()=>q?W:void 0,$.setShape=(P)=>{if(z===P)return;if(z=P,$.currentShape=z,M({shape:P}),$.state?.indeterminate){let R=$.animationTime||0;if(D(),k(),P==="wavy"||!q)L(R);else F(R)}else if(P==="wavy"){if(!$.wavyAnimationId)L()}else D();B($.animationTime||0)},$.setValue=(P,R=!0)=>{if(U=Math.max(0,Math.min($.state.max,P)),$.state.indeterminate)$.setIndeterminate(!1);if($.valueAnimationId&&R)return;if($.valueAnimationId)cancelAnimationFrame($.valueAnimationId),$.valueAnimationId=null;if(!R){if(X=U,B(),z==="wavy"&&!$.state.indeterminate&&!$.wavyAnimationId)L();if(U>=$.state.max)$.element.dispatchEvent(new CustomEvent("complete",{detail:{value:U,max:$.state.max}}));return}let y=X,x=performance.now(),A=x-_,C=300;if(A<300&&_>0)C=Math.max(100,A*0.9);_=x;let r=(Q6)=>{let X6=Q6-x,$6=Math.min(X6/C,1),B6=$6<0.5?4*$6*$6*$6:1-Math.pow(-2*$6+2,3)/2;if(X=y+(U-y)*B6,!$.wavyAnimationId||z!=="wavy")B(Q6);if($6<1)$.valueAnimationId=requestAnimationFrame(r);else{if(X=U,$.valueAnimationId=null,z==="wavy"&&!$.state.indeterminate&&!$.wavyAnimationId)L();if(U>=$.state.max)$.element.dispatchEvent(new CustomEvent("complete",{detail:{value:U,max:$.state.max}}))}};$.valueAnimationId=requestAnimationFrame(r)},$.setIndeterminate=(P)=>{if(!$.state){console.warn("[Progress] No state available for setIndeterminate");return}if($.state.indeterminate=P,P){if($.valueAnimationId)cancelAnimationFrame($.valueAnimationId),$.valueAnimationId=null;if(X=$.state.value,z==="wavy"||!q)L();else F()}else{if(X=$.state.value,k(),z==="wavy"){if(!$.wavyAnimationId)L()}else D();B()}},$.hide=()=>{$.element.classList.add($.getClass(z6.TRANSITION)),$.element.style.opacity="0";let P=()=>{$.element.style.display="none",$.element.removeEventListener("transitionend",P)};return $.element.addEventListener("transitionend",P),[$.animationId,$.wavyAnimationId,$.valueAnimationId].forEach((R)=>{if(R)cancelAnimationFrame(R)}),$.animationId=$.wavyAnimationId=$.valueAnimationId=null,$},$.show=()=>{if($.element.classList.add($.getClass(z6.TRANSITION)),$.element.style.display="",$.element.style.opacity="0",$.element.offsetHeight,$.element.style.opacity="1",$.state?.indeterminate)if(z==="wavy"||!q)L();else F();else if(z==="wavy")L();return $},$.isVisible=()=>$.element.style.display!=="none"&&$.element.style.opacity!=="0",$.lifecycle){let P=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{if(K)K();if(Y)Y();[$.animationId,$.wavyAnimationId,$.valueAnimationId].forEach((R)=>{if(R)cancelAnimationFrame(R)}),P()}}return Object.assign($,{startWavyAnimation:L,stopWavyAnimation:D,startIndeterminateAnimation:F,stopIndeterminateAnimation:k}),{...$,canvas:Z,get ctx(){return j?.ctx},draw:B,resize:H}};var Y$=g(()=>{a6();R9();Q0();K0()});var z0=(J)=>($)=>{if(J.indeterminate&&$.element)p($.element,z6.INDETERMINATE),$.element.removeAttribute("aria-valuenow");if($.element){let j=$.getClass?.(z6.CONTAINER)||"";$.element.classList.remove(`${j}--thin`,`${j}--thick`)}if(J.shape&&J.shape!==R6.FLAT&&$.element){if(!$.element.classList.contains($.getClass?.(z6.CIRCULAR)||"")){let K=$.getClass?.(z6.CONTAINER)||"";p($.element,`${K}--${J.shape}`)}}let Q={value:J.value??0,max:J.max??100,buffer:J.buffer??0,indeterminate:J.indeterminate===!0,thickness:J.thickness??"thin",shape:J.shape??R6.FLAT,labelFormatter:J.labelFormatter??((j,K)=>`${Math.round(j/K*100)}%`),showLabel:J.showLabel},q=$.lifecycle?.init,Z=$.lifecycle?.destroy;return $.state=Q,$.lifecycle={init:()=>{if(requestAnimationFrame(()=>{try{if(Q.indeterminate)$.setIndeterminate?.(!0);else if($.setValue?.(Q.value),J.buffer!==void 0)$.setBuffer?.(Q.buffer);if(Q.shape!==R6.FLAT&&$.setShape)$.setShape(Q.shape);if(Q.thickness)if($.setThickness)$.setThickness(Q.thickness);else $.state.thickness=Q.thickness}catch(j){console.error("Error initializing progress state:",j)}}),q)q()},destroy:()=>{if(Z)Z()}},{...$,state:Q}};var W0=g(()=>{a6();p9()});var U0=(J)=>($)=>{let{element:Q,getClass:q,canvas:Z}=$,j=Q.classList.contains(q(z6.CIRCULAR)),K=(W,X)=>{Q.dispatchEvent(new CustomEvent(W,{detail:X}))},Y=(W,X)=>{Q.setAttribute("aria-valuenow",W.toString());let U=$.label;if(U){let _=J.label?.formatter||((N,F)=>`${Math.round(N/F*100)}%`);U.textContent=_(W,X)}if(typeof $.draw==="function")$.draw()},G=(W)=>{if(W){if(p(Q,z6.INDETERMINATE),Q.removeAttribute("aria-valuenow"),!j){if((J.shape?.getShape()||R6.FLAT)!=="wavy"&&$.startIndeterminateAnimation)$.startIndeterminateAnimation()}}else if(K6(Q,z6.INDETERMINATE),$.stopIndeterminateAnimation)$.stopIndeterminateAnimation();if(typeof $.draw==="function")$.draw()};if(J.state.isIndeterminate())G(!0);let z={element:Q,track:Z,indicator:Z,buffer:Z,getClass:q,getValue(){return J.value.getValue()},setValue(W,X=!0){let U=J.value.getValue(),_=J.value.getMax();if(J.value.setValue(W),U!==W){Q.setAttribute("aria-valuenow",W.toString());let N=$.label;if(N){let k=J.label?.formatter||((L,D)=>`${Math.round(L/D*100)}%`);N.textContent=k(W,_)}let F={value:W,max:_};if(K(s9.CHANGE,F),$.setValue&&typeof $.setValue==="function")$.setValue(W,X);else Y(W,_)}return z},getMax(){return J.value.getMax()},getBuffer:()=>J.buffer.getBuffer(),setBuffer(W){if(J.buffer.setBuffer(W),!J.state.isIndeterminate()&&typeof $.draw==="function")$.draw();return z},setIndeterminate(W){if(J.state.isIndeterminate()===W)return z;return J.state.setIndeterminate(W),G(W),z},isIndeterminate:()=>J.state.isIndeterminate(),showLabel(){if(J.label?.show)J.label.show();return z},hideLabel(){if(J.label?.hide)J.label.hide();return z},setLabelFormatter(W){if(J.label?.format)J.label.format(W);let X=$.label||$.state?.label;if(X)X.textContent=W(J.value.getValue(),J.value.getMax());return z},getThickness(){return J.thickness?.getThickness()||S6.THIN},setThickness(W){if(J.thickness)J.thickness.setThickness(W);if($.setThickness)$.setThickness(W);return z},getShape(){if(J.shape&&typeof J.shape.getShape==="function")return J.shape.getShape();return R6.FLAT},setShape(W){return $.setShape?.(W),z},setSize(W){if($.setSize)$.setSize(W);return z},getSize(){return $.getSize?$.getSize():void 0},enable(){return J.disabled.enable(),z},disable(){return J.disabled.disable(),z},isDisabled:J.disabled.isDisabled,hide(){if($.hide)$.hide();return z},show(){if($.show)$.show();return z},isVisible(){return $.isVisible?$.isVisible():Q.style.display!=="none"},on(W,X){return Q.addEventListener(W,X),z},off(W,X){return Q.removeEventListener(W,X),z},addClass(...W){return W.forEach((X)=>Q.classList.add(X)),z},destroy(){J.lifecycle.destroy()},disabled:{enable(){J.disabled.enable()},disable(){J.disabled.disable()},isDisabled:J.disabled.isDisabled},lifecycle:{destroy(){J.lifecycle.destroy()}}};if($.state?.showLabel===!0){if(J.label?.show)J.label.show()}return z};var X0=g(()=>{a6();p9()});var wq,B0=(J={})=>{return b(wq,J,"progress")},F0=(J)=>{let $=J.indeterminate===!0,Q=J.variant===J9.CIRCULAR,q={role:"progressbar","aria-valuemin":"0","aria-valuemax":(J.max||100).toString()};if(!$&&J.value!==void 0)q["aria-valuenow"]=J.value.toString();if(J.disabled===!0)q["aria-disabled"]="true";let Z=[J.class,z6.CONTAINER,Q?z6.CIRCULAR:z6.LINEAR].filter(Boolean);if(!Q&&J.shape&&J.shape!==R6.FLAT)Z.push(`${z6.CONTAINER}--${J.shape}`);return f(J,{tag:"div",attributes:q,className:Z})},H0=(J)=>{if(!J.state)J.state={value:0,max:100,buffer:0,indeterminate:!1,thickness:"thin",shape:I6.SHAPE,labelFormatter:($,Q)=>`${Math.round($/Q*100)}%`};return{value:{getValue:()=>J.state.value,setValue:($)=>{if(J.state){let Q=Math.max(0,Math.min(J.state.max,$));if(J.state.previousValue=J.state.value,J.state.value=Q,J.state.label)J.state.label.textContent=J.state.labelFormatter(Q,J.state.max);if(typeof J.setValue==="function")J.setValue(Q);else if(J.draw)J.draw()}},getMax:()=>J.state.max},buffer:{getBuffer:()=>J.state.buffer,setBuffer:($)=>{J.state.buffer=Math.max(0,Math.min(J.state.max,$))}},disabled:{enable:()=>J.disabled?.enable?.()||void 0,disable:()=>J.disabled?.disable?.()||void 0,isDisabled:()=>J.disabled?.isDisabled?.()||!1},label:{show:()=>{if(!J.state.label){let $=document.createElement("div");$.className=`${J.getClass(z6.LABEL)}`,$.textContent=J.state.labelFormatter(J.state.value,J.state.max),J.element.appendChild($),J.state.label=$,J.label=$}},hide:()=>{if(J.state.label)J.state.label.remove(),J.state.label=void 0,J.label=void 0},format:($)=>{J.state.labelFormatter=$},formatter:J.state.labelFormatter},thickness:{getThickness:()=>{let $=J.state.thickness;if($==="thin")return S6.THIN;else if($==="thick")return S6.THICK;else if(typeof $==="number")return $;return S6.THIN},setThickness:($)=>{if(J.state.thickness=$,J.draw)J.draw()}},shape:{getShape:()=>J.state.shape,setShape:($)=>{if(J.state.shape=$,J.setShape)J.setShape($)}},state:{setIndeterminate:($)=>{if(J.state){if(J.state.indeterminate=$,typeof J.setIndeterminate==="function")J.setIndeterminate($);else if(J.draw)J.draw()}},isIndeterminate:()=>J.state.indeterminate},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()||void 0}}};var M0=g(()=>{m();a6();wq={variant:I6.VARIANT,value:I6.VALUE,max:I6.MAX,buffer:I6.BUFFER,showLabel:I6.SHOW_LABEL,thickness:"thin",shape:I6.SHAPE}});var k0={};Y8(k0,{default:()=>G$});var xq=(J={})=>{let $=B0(J);try{let Q=I(T,h(),S(F0($)),Y6($),G6($),z0($),G0($),(q)=>{return U0(H0(q))(q)},v())($);if(Q.lifecycle?.init)Q.lifecycle.init();return Q}catch(Q){throw console.error("Progress creation error:",Q),Error(`Failed to create progress: ${Q.message}`)}},G$;var A8=g(()=>{n();s();c();Y$();W0();X0();M0();G$=xq});var Tq=async(J)=>{let{default:$}=await Promise.resolve().then(() => (A8(),k0));return $(J)},N0=(J)=>($)=>{if(!J.progress)return $;let Q={},q=typeof J.progress==="boolean"?{variant:"circular",size:20,thickness:2,indeterminate:!0}:(()=>{let{on:W,...X}=J.progress;if(W)Q=W;return{variant:"circular",size:20,thickness:2,indeterminate:!0,...X}})(),Z=null,j=null,K=!1,Y="",G=async()=>{if(Z)return Z;if(!j)j=Tq(q).then((W)=>{return Z=W,p(Z.element,$.getClass("button-progress")),Z.element.style.display="none",Object.entries(Q).forEach(([X,U])=>{Z.on(X,U)}),$.progress=Z,Z});return j},z=()=>{let W=$.element.querySelector(`.${$.getClass("button-icon")}`);if(W&&W.nextSibling)return W.nextSibling;return $.element.firstChild};if($.showProgress=async function(){let W=await G();if(W.element){if(!$.element.contains(W.element)){let U=z();if(U)$.element.insertBefore(W.element,U);else $.element.appendChild(W.element)}W.element.style.display="",p($.element,`${$.getClass("button")}--progress`);let X=$.element.querySelector(`.${$.getClass("button-icon")}`);if(X instanceof HTMLElement)X.style.display="none"}return $},$.showProgressSync=function(){return $.showProgress(),$},$.hideProgress=async function(){if(!Z)return $;Z.element.style.display="none",K6($.element,`${$.getClass("button")}--progress`);let W=$.element.querySelector(`.${$.getClass("button-icon")}`);if(W instanceof HTMLElement)W.style.display="";return $},$.hideProgressSync=function(){return $.hideProgress(),$},$.setProgress=async function(W){return(await G()).setValue(W),$},$.setProgressSync=function(W){return $.setProgress(W),$},$.setIndeterminate=async function(W){return(await G()).setIndeterminate(W),$},$.setIndeterminateSync=function(W){return $.setIndeterminate(W),$},$.setLoading=async function(W,X){if(W&&!K){if($.setText&&$.getText)Y=$.getText();if(K=!0,await $.showProgress(),$.disabled?.disable)$.disabled.disable();if(X&&$.setText)$.setText(X)}else if(!W&&K){if(K=!1,await $.hideProgress(),$.disabled?.enable)$.disabled.enable();if(X&&$.setText)$.setText(X);else if(Y&&$.setText)$.setText(Y)}return $},$.setLoadingSync=function(W,X){return $.setLoading(W,X),$},$.lifecycle){let W=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(Z)Z.destroy();if(Z&&Z.element.parentNode)Z.element.parentNode.removeChild(Z.element);W()}}if(J.showProgress)G().then(()=>{$.showProgress()});return $};var L0=g(()=>{p9()});var V0=(J={},$={})=>{let Q={...J},q=T6(),Z=new Map,j=$.middleware||[],K=(G,z)=>{q.emit("change",G,z)},Y=(G,z)=>{return j.reduce((W,X)=>X(W,z),G)};return{getState:()=>{let G={};return Z.forEach((z,W)=>{G[W]=z(Q)}),{...Q,...G}},setState:(G)=>{let z={...Q},W=typeof G==="function"?G(Q):{...Q,...G};Q=Y(W,z),K(Q,z)},subscribe:(G)=>q.on("change",G),derive:(G,z)=>{return Z.set(G,z),()=>{Z.delete(G)}},select:(G)=>G(Q),reset:()=>{Q={...J},K(Q,{})}}},_0=(J,$)=>{return console.log("State change:",{old:$,new:J,diff:Object.keys(J).reduce((Q,q)=>{if(J[q]!==$[q])Q[q]={from:$[q],to:J[q]};return Q},{})}),J},D0=(J)=>($)=>Object.keys($).reduce((Q,q)=>{if(J($[q],q))Q[q]=$[q];return Q},{});var O0=()=>{};var P0=(J,$={})=>{let Q=!1,q=T6();return{onMount:(Z)=>q.on("mount",Z),onUnmount:(Z)=>q.on("unmount",Z),mount:()=>{if(!Q)Q=!0,q.emit("mount")},unmount:()=>{if(Q)Q=!1,q.emit("unmount"),q.clear()},isMounted:()=>Q,destroy(){if(Q)this.unmount();if($.events)$.events.destroy();if($.text){let Z=$.text.getElement();if(Z)Z.remove()}if($.icon){let Z=$.icon.getElement();if(Z)Z.remove()}if(J)J.remove()}}};var R0=()=>{};var y0=(J)=>{return{enable(){return J.disabled=!1,J.removeAttribute("disabled"),this},disable(){return J.disabled=!0,J.setAttribute("disabled","true"),this},toggle(){if(J.disabled)this.enable();else this.disable();return this},isDisabled(){return J.disabled===!0}}};var w8=(J,$,Q,q,Z,j)=>{if(q<0||Z<0)return;let K=typeof j==="number"?[j,j,j,j]:j,[Y,G,z,W]=K;J.beginPath(),J.moveTo($+Y,Q),J.lineTo($+q-G,Q),J.quadraticCurveTo($+q,Q,$+q,Q+G),J.lineTo($+q,Q+Z-z),J.quadraticCurveTo($+q,Q+Z,$+q-z,Q+Z),J.lineTo($+W,Q+Z),J.quadraticCurveTo($,Q+Z,$,Q+Z-W),J.lineTo($,Q+Y),J.quadraticCurveTo($,Q,$+Y,Q),J.closePath()},Iq=(J,$,Q,q,Z,j,K)=>{if(J.save(),K)J.fillStyle=K;w8(J,$,Q,q,Z,j),J.fill(),J.restore()},x8=(J,$,Q,q,Z,j)=>{return J.save(),w8(J,$,Q,q,Z,j),J.clip(),()=>J.restore()},T8=(J,$,Q,q,Z,j,K,Y)=>{if(q<0||Z<0)return;if(J.save(),Y)J.fillStyle=Y;J.beginPath(),J.moveTo($+j,Q),J.lineTo($+q-K,Q),J.quadraticCurveTo($+q,Q,$+q,Q+K),J.lineTo($+q,Q+Z-K),J.quadraticCurveTo($+q,Q+Z,$+q-K,Q+Z),J.lineTo($+j,Q+Z),J.quadraticCurveTo($,Q+Z,$,Q+Z-j),J.lineTo($,Q+j),J.quadraticCurveTo($,Q,$+j,Q),J.closePath(),J.fill(),J.restore()},I8=(J,$,Q,q)=>{if(q)J.fillStyle=q,J.fillRect(0,0,$,Q);else J.clearRect(0,0,$,Q)};var z$=(J)=>{let j=J;for(let X=0;X<4;X++){let F=j*j,L=1.6*(F*j)+-1.8000000000000003*F+1.2000000000000002*j-J,D=4.800000000000001*F+-3.6000000000000005*j+1.2000000000000002;if(Math.abs(L)<0.00001)break;j=j-L/D}let K=0,Y=3-K,G=1-K-Y,z=j*j,W=z*j;return G*W+Y*z+K*j},S8,Sq;var A0=g(()=>{S8={SHORT:100,MEDIUM:225,LONG:375,EXTRA_LONG:500},Sq={linear:(J)=>J,easeIn:(J)=>J*J,easeOut:(J)=>J*(2-J),easeInOut:(J)=>J<0.5?2*J*J:-1+(4-2*J)*J,materialStandard:z$}});class w0{animationId=null;start(J){this.stop();let $=(Q)=>{J(Q),this.animationId=requestAnimationFrame($)};this.animationId=requestAnimationFrame($)}stop(){if(this.animationId!==null)cancelAnimationFrame(this.animationId),this.animationId=null}get isRunning(){return this.animationId!==null}}class x0{cleanupFunctions=[];add(J){if(J)this.cleanupFunctions.push(J)}cleanup(){this.cleanupFunctions.forEach((J)=>J()),this.cleanupFunctions=[]}}var b8=(J,$,Q)=>{let q=window.devicePixelRatio||1,Z=J.getContext("2d");return J.style.width=`${$}px`,J.style.height=`${Q}px`,J.width=Math.round($*q),J.height=Math.round(Q*q),Z.setTransform(1,0,0,1,0,0),Z.scale(q,q),{canvas:J,ctx:Z,width:$,height:Q,pixelRatio:q}},v8=(J,$,Q)=>{let{canvas:q,ctx:Z,pixelRatio:j}=J;q.style.width=`${$}px`,q.style.height=`${Q}px`,q.width=Math.round($*j),q.height=Math.round(Q*j),J.width=$,J.height=Q,Z.setTransform(1,0,0,1,0,0),Z.scale(j,j)},C8=(J,$)=>{if(J())return $?.(),!0;return requestAnimationFrame(()=>{if(J())$?.();else setTimeout(()=>{if(J())$?.()},100)}),!1},W$=(J,$)=>{let Q=F6(`sys-color-${J}`,{onThemeChange:$});return typeof Q==="function"?Q:null},E8=(J,$={})=>{let Q=document.createElement("canvas");return Q.className=J,Object.assign(Q.style,{position:"absolute",width:"100%",height:"100%",pointerEvents:"none",...$}),Q};var T0=g(()=>{R9()});var U$=g(()=>{A0();T0()});var y7=g(()=>{m();O0();R0();w6();L8();R9();n();p9();U$();U$()});var I0=({disabled:J,lifecycle:$})=>(Q)=>{let q={setText:(K)=>{return Q.text.setText(K),q},getText:()=>Q.text.getText(),getElement:()=>Q.text.getElement()},Z={setIcon:(K)=>{return Q.icon.setIcon(K),Z},getIcon:()=>Q.icon.getIcon(),getElement:()=>Q.icon.getElement()},j={element:Q.element,text:q,icon:Z,disabled:J,lifecycle:$,getClass:Q.getClass,on:(K,Y)=>{if(Q.on)Q.on(K,Y);return j},off:(K,Y)=>{if(Q.off)Q.off(K,Y);return j},addClass:(...K)=>{if(Q.addClass)Q.addClass(...K);else p(Q.element,...K);return j},getValue:()=>Q.element.value,setValue(K){return Q.element.value=K,j},enable(){return J.enable(),j},disable(){return J.disable(),j},setText(K){return Q.text.setText(K),j.updateCircularStyle(),j},getText(){return Q.text.getText()},hasIcon(){let K=Q.icon.getElement();return!!K&&!!K.innerHTML.trim()&&!!K.parentNode},setIcon(K){let Y=Q.componentName||"button",G=Q.getClass(Y);if(!K){let z=Q.icon.getElement();if(z&&z.parentNode)z.parentNode.removeChild(z),Q.icon.getElement=()=>null,Q.icon.getIcon=()=>"";Q.element.classList.remove(`${G}--icon`)}else if(!j.hasIcon()){let z=document.createElement("span");if(z.className=`${Q.getClass("button-icon")}`,z.innerHTML=K,Q.element.firstChild)Q.element.insertBefore(z,Q.element.firstChild);else Q.element.appendChild(z);Q.icon.getElement=()=>z,Q.icon.getIcon=()=>K,Q.element.classList.add(`${G}--icon`)}else{let z=Q.icon.getElement();if(z)z.innerHTML=K}return j.updateCircularStyle(),j},getIcon(){return j.hasIcon()?Q.icon.getIcon():""},setVariant(K){let Y=Q.componentName||"button",G=Q.getClass(Y);return["filled","tonal","outlined","elevated","text"].map((W)=>`${G}--${W}`).forEach((W)=>{Q.element.classList.remove(W)}),Q.element.classList.add(`${G}--${K}`),j},getVariant(){let K=Q.componentName||"button",Y=Q.getClass(K),G=["filled","tonal","outlined","elevated","text"];for(let z of G)if(Q.element.classList.contains(`${Y}--${z}`))return z;return"filled"},getSize(){let K=Q.componentName||"button",Y=Q.getClass(K),G=["xs","s","m","l","xl"];for(let z of G)if(Q.element.classList.contains(`${Y}--${z}`))return z;return"s"},setSize(K){let Y=Q.componentName||"button",G=Q.getClass(Y);return["xs","s","m","l","xl"].map((W)=>`${G}--${W}`).forEach((W)=>{Q.element.classList.remove(W)}),Q.element.classList.add(`${G}--${K}`),j},getShape(){let K=Q.componentName||"button",Y=Q.getClass(K),G=["round","square"];for(let z of G)if(Q.element.classList.contains(`${Y}--${z}`))return z;return"round"},setShape(K){let Y=Q.componentName||"button",G=Q.getClass(Y);return["round","square"].map((W)=>`${G}--${W}`).forEach((W)=>{Q.element.classList.remove(W)}),Q.element.classList.add(`${G}--${K}`),j},setActive(K){if(K)Q.element.classList.add(`${Q.getClass("button")}--active`);else Q.element.classList.remove(`${Q.getClass("button")}--active`);return j},setAriaLabel(K){return Q.element.setAttribute("aria-label",K),j},destroy(){$.destroy()},updateCircularStyle(){let K=Q.text.getText()!=="",Y=j.hasIcon();if(!K)p(Q.element,"button--circular"),K6(Q.element,"button--icon");else K6(Q.element,"button--circular");if(Y&&K)p(Q.element,"button--icon")}};if(Q.progress)j.progress=Q.progress;if(Q.showProgress)j.showProgress=async()=>{return await Q.showProgress(),j};if(Q.showProgressSync)j.showProgressSync=()=>{return Q.showProgressSync(),j};if(Q.hideProgress)j.hideProgress=async()=>{return await Q.hideProgress(),j};if(Q.hideProgressSync)j.hideProgressSync=()=>{return Q.hideProgressSync(),j};if(Q.setProgress)j.setProgress=async(K)=>{return await Q.setProgress(K),j};if(Q.setProgressSync)j.setProgressSync=(K)=>{return Q.setProgressSync(K),j};if(Q.setIndeterminate)j.setIndeterminate=async(K)=>{return await Q.setIndeterminate(K),j};if(Q.setIndeterminateSync)j.setIndeterminateSync=(K)=>{return Q.setIndeterminateSync(K),j};if(Q.setLoading)j.setLoading=async(K,Y)=>{return await Q.setLoading(K,Y),j};if(Q.setLoadingSync)j.setLoadingSync=(K,Y)=>{return Q.setLoadingSync(K,Y),j};return j};var S0=g(()=>{y7()});var A7,w7,x7,T7,h8,A9;var u8=g(()=>{A7={FILLED:"filled",TONAL:"tonal",OUTLINED:"outlined",ELEVATED:"elevated",TEXT:"text"},w7={XS:"xs",S:"s",M:"m",L:"l",XL:"xl"},x7={ROUND:"round",SQUARE:"square"},T7={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},h8={ROOT:"button",ICON:"button-icon",TEXT:"button-text",CIRCULAR:"button-circular",ACTIVE:"button-active",DISABLED:"button-disabled"},A9={DURATION:450,TIMING:"cubic-bezier(0.4, 0.0, 0.2, 1)",OPACITY:["0.7","0"]}});var bq,b0=(J={})=>b(bq,J,"button"),v0=(J)=>{let $={type:J.type||"button"};if(J.disabled===!0)$.disabled=!0;if(J.value!==void 0)$.value=J.value;if(J.ariaLabel)$["aria-label"]=J.ariaLabel;return f(J,{tag:"button",attributes:$,className:J.class,forwardEvents:{click:(Q)=>!Q.element.disabled,focus:!0,blur:!0}})},C0=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable(),isDisabled:()=>J.disabled.isDisabled()},lifecycle:{destroy:()=>J.lifecycle.destroy()}});var E0=g(()=>{m();u8();bq={variant:A7.FILLED,size:w7.S,shape:x7.ROUND,disabled:!1,type:T7.BUTTON,ripple:!0,rippleConfig:{duration:A9.DURATION,timing:A9.TIMING,opacity:A9.OPACITY}}});var vq=(J={})=>{let $=b0(J);try{return I(T,h(),S(v0($)),Y6($),X7($),$9($),g6($),G6($),N0($),P6($),v(),(q)=>{if($.shape&&q.element){let Z=`${$.prefix}-${$.componentName}--${$.shape}`;q.element.classList.add(Z)}return q},(q)=>I0(C0(q))(q))($)}catch(Q){throw console.error("Button creation error:",Q),Error(`Failed to create button: ${Q.message}`)}},i6;var h0=g(()=>{n();s();c();L0();S0();E0();i6=vq});var u0={};Y8(u0,{default:()=>i6});var w9=g(()=>{h0()});var _Z={};Y8(_Z,{withVariant:()=>Y6,withTrack:()=>H7,withThrottle:()=>B8,withTextLabel:()=>d6,withTextInput:()=>F7,withText:()=>$9,withTabsManagement:()=>i$,withSwipeable:()=>a0,withSupportingText:()=>d$,withStyle:()=>U8,withSize:()=>X7,withScrollable:()=>c$,withRipple:()=>P6,withPosition:()=>B7,withLoading:()=>s0,withLifecycle:()=>v,withInput:()=>_9,withIndicator:()=>t$,withIcon:()=>g6,withExpandable:()=>m0,withEvents:()=>h,withEnhancedEvents:()=>X8,withElevation:()=>H$,withElement:()=>S,withDivider:()=>o$,withDisabled:()=>G6,withDebounce:()=>F8,withCheckable:()=>D9,withAPI:()=>X$,when:()=>nQ,updateTabPanels:()=>s$,updateCanvasDimensions:()=>v8,transform:()=>ZQ,toggleClass:()=>J$,throttle:()=>d9,setupResponsiveBehavior:()=>K2,setupKeyboardNavigation:()=>m$,setGlobalDefaults:()=>k8,setComponentDefaults:()=>M8,setAttributes:()=>W7,removeClass:()=>K6,removeAttributes:()=>KQ,pipe:()=>I,once:()=>Z$,observeCanvasResize:()=>O7,normalizeEvent:()=>f6,normalizeClasses:()=>V9,loggingMiddleware:()=>_0,joinClasses:()=>eQ,isObject:()=>O8,initializeCanvasWithRetry:()=>C8,hasTouchSupport:()=>x6,hasLifecycle:()=>z9,hasEmit:()=>W9,hasClass:()=>m6,hasAttribute:()=>GQ,getModifierClass:()=>UQ,getInheritedBackground:()=>U9,getElementClass:()=>XQ,getComponentDefaults:()=>N7,getComponentClass:()=>WQ,getAttribute:()=>zQ,fillRoundedRectLR:()=>T8,fillRoundedRect:()=>Iq,easeOutCubic:()=>z$,deriveFiltered:()=>D0,debounce:()=>r9,createTopAppBar:()=>D2,createTooltip:()=>S1,createTimePicker:()=>A1,createTextfield:()=>p7,createTabsState:()=>Q2,createTabs:()=>Y2,createTabIndicator:()=>a$,createTab:()=>q7,createSwitch:()=>q1,createStyledCanvas:()=>E8,createStore:()=>V0,createStateEventManager:()=>q$,createSnackbar:()=>Q1,createSlider:()=>nJ,createSheet:()=>rJ,createSelect:()=>f1,createSegmentedButton:()=>E$,createSegment:()=>C$,createSearch:()=>wJ,createSVGElement:()=>MQ,createRoundedRectPath:()=>w8,createRadios:()=>kJ,createProgress:()=>G$,createNavigationSystem:()=>i2,createNavigation:()=>o9,createMenu:()=>E7,createList:()=>C1,createLifecycle:()=>P0,createFab:()=>_$,createExtendedFab:()=>D$,createEventManager:()=>oQ,createEmitter:()=>T6,createElementConfig:()=>f,createElement:()=>E,createDivider:()=>I9,createDisabled:()=>y0,createDialog:()=>KJ,createDatePicker:()=>jJ,createComponentConfig:()=>b,createComponent:()=>jQ,createChips:()=>X4,createChip:()=>v7,createCheckbox:()=>i8,createCarousel:()=>a8,createCardMedia:()=>a9,createCardHeader:()=>S7,createCardContent:()=>I7,createCardActions:()=>m9,createCard:()=>l8,createCanvasThemeObserver:()=>W$,createCanvasContext:()=>b8,createButton:()=>i6,createBottomAppBar:()=>cQ,createBase:()=>T,createBadge:()=>g9,compose:()=>qQ,clipRoundedRect:()=>x8,clearGlobalDefaults:()=>N8,clearCanvas:()=>I8,classNames:()=>BQ,byString:()=>P8,batchAttributes:()=>YQ,addScrollIndicators:()=>j2,addClass:()=>p,TOP_APP_BAR_TYPES:()=>q8,TOP_APP_BAR_STATES:()=>w1,TOP_APP_BAR_DEFAULTS:()=>K9,TOP_APP_BAR_CLASSES:()=>x1,TOOLTIP_VARIANTS:()=>j8,TOOLTIP_POSITIONS:()=>Z8,TOOLTIP_EVENTS:()=>T1,TOOLTIP_DEFAULTS:()=>E6,TOOLTIP_CLASSES:()=>I1,TIME_PICKER_TYPE:()=>j7,TIME_PICKER_ORIENTATION:()=>s7,TIME_PERIOD:()=>E9,TIME_FORMAT:()=>C9,TIMEPICKER_Z_INDEX:()=>K7,TIMEPICKER_VALUES:()=>R1,TIMEPICKER_TYPES:()=>e$,TIMEPICKER_SELECTORS:()=>e,TIMEPICKER_PERIODS:()=>P1,TIMEPICKER_ORIENTATIONS:()=>$8,TIMEPICKER_ICONS:()=>v6,TIMEPICKER_FORMATS:()=>J8,TIMEPICKER_EVENTS:()=>N6,TIMEPICKER_DIAL:()=>n6,TIMEPICKER_DEFAULTS:()=>s6,TIMEPICKER_CLASSES:()=>y1,TEXTFIELD_VARIANTS:()=>l7,TEXTFIELD_TYPES:()=>n$,TEXTFIELD_STATES:()=>V1,TEXTFIELD_EVENTS:()=>_1,TEXTFIELD_DENSITY:()=>D1,TEXTFIELD_DEFAULTS:()=>Z7,TEXTFIELD_CLASSES:()=>O1,TAB_VARIANTS:()=>r7,TAB_STATES:()=>J7,TAB_INDICATOR_WIDTH_STRATEGIES:()=>l$,TAB_EVENTS:()=>G1,TAB_CLASSES:()=>W1,TABS_EVENTS:()=>p$,TABS_DEFAULTS:()=>k9,TABS_CLASSES:()=>z1,SelectionMode:()=>u7,SWITCH_STATES:()=>Z1,SWITCH_LABEL_POSITIONS:()=>r$,SWITCH_EVENTS:()=>j1,SWITCH_DEFAULTS:()=>K1,SWITCH_CLASSES:()=>Y1,STATES:()=>z8,SNACKBAR_VARIANTS:()=>g$,SNACKBAR_STATES:()=>eJ,SNACKBAR_POSITIONS:()=>t6,SNACKBAR_EVENTS:()=>$1,SNACKBAR_DEFAULTS:()=>v9,SNACKBAR_CLASSES:()=>J1,SLIDER_SIZES:()=>V6,SLIDER_POSITIONS:()=>g7,SLIDER_EVENTS:()=>M6,SLIDER_DEFAULTS:()=>k6,SLIDER_COLORS:()=>o6,SLIDER_CLASSES:()=>pJ,SHEET_VARIANTS:()=>M9,SHEET_POSITIONS:()=>b9,SHEET_GESTURE:()=>gJ,SHEET_EVENTS:()=>uJ,SHEET_ELEVATION:()=>h$,SHEET_DEFAULTS:()=>j9,SHEET_CLASSES:()=>dJ,SHEET_ANIMATION:()=>fJ,SELECT_VARIANTS:()=>G7,SELECT_PLACEMENT:()=>z7,SELECT_INTERACTION:()=>o7,SELECT_ICONS:()=>n7,SELECT_EVENTS:()=>t7,SELECT_DEFAULTS:()=>L9,SELECT_CLASSES:()=>e7,SEGMENTED_BUTTON_MODES:()=>b$,SEGMENTED_BUTTON_ICONS:()=>TJ,SEGMENTED_BUTTON_EVENTS:()=>xJ,SEGMENTED_BUTTON_DENSITY:()=>v$,SEGMENTED_BUTTON_DEFAULTS:()=>S9,SEGMENTED_BUTTON_CLASSES:()=>IJ,SEARCH_VARIANTS:()=>t9,SEARCH_STATES:()=>RJ,SEARCH_ICONS:()=>n9,SEARCH_EVENTS:()=>yJ,SEARCH_DEFAULTS:()=>p6,SEARCH_CLASSES:()=>AJ,RADIO_VARIANTS:()=>x$,RADIO_STATES:()=>NJ,RADIO_SIZES:()=>I$,RADIO_LABEL_POSITIONS:()=>T$,RADIO_EVENTS:()=>LJ,RADIO_DIRECTIONS:()=>w$,RADIO_DEFAULTS:()=>VJ,RADIO_CLASSES:()=>_J,PROGRESS_VARIANTS:()=>J9,PROGRESS_THICKNESS:()=>S6,PROGRESS_SHAPES:()=>R6,PROGRESS_MEASUREMENTS:()=>r6,PROGRESS_EVENTS:()=>s9,PROGRESS_DEFAULTS:()=>I6,PROGRESS_CLASSES:()=>z6,PREFIX:()=>u,NAV_VARIANTS:()=>P$,NAV_POSITIONS:()=>R$,NAV_ITEM_STATES:()=>HJ,NAV_EVENTS:()=>h7,NAV_DEFAULTS:()=>Z9,NAV_CLASSES:()=>o,NAV_BEHAVIORS:()=>y$,MONTH_NAMES_SHORT:()=>s1,MONTH_NAMES:()=>p1,MENU_POSITION:()=>O$,MENU_ITEM_TYPES:()=>BJ,MENU_INTERACTION_TYPES:()=>XJ,MENU_EVENTS:()=>FJ,MENU_DEFAULTS:()=>l6,MENU_CLASSES:()=>C7,LIST_TYPES:()=>a7,LIST_SELECTION_MODES:()=>i7,LIST_SCROLL_POSITIONS:()=>c7,LIST_EVENTS:()=>Y9,LIST_DEFAULTS:()=>m7,LIST_CLASSES:()=>q6,FAB_VARIANTS:()=>e1,FAB_SIZES:()=>$Q,FAB_POSITIONS:()=>JQ,EASING_FUNCTIONS:()=>Sq,Density:()=>f7,DIALOG_SIZES:()=>a1,DIALOG_FOOTER_ALIGNMENTS:()=>c1,DIALOG_BUTTON_VARIANTS:()=>o1,DIALOG_ANIMATIONS:()=>i1,DEFAULT_RIPPLE_CONFIG:()=>A9,DEFAULT_DATE_FORMAT:()=>m1,DEFAULT_CONFIRM_BUTTON_TEXT:()=>t1,DEFAULT_CANCEL_BUTTON_TEXT:()=>n1,DAY_NAMES:()=>l1,DATEPICKER_VIEWS:()=>d1,DATEPICKER_VARIANTS:()=>g1,DATEPICKER_SELECTION_MODES:()=>r1,CleanupManager:()=>x0,COMPONENTS:()=>G8,CHIP_VARIANTS:()=>e8,CHIP_EVENTS:()=>$J,CHIPS_EVENTS:()=>q9,CHECKBOX_VARIANTS:()=>M$,CHECKBOX_STATES:()=>c8,CHECKBOX_LABEL_POSITION:()=>k$,CHECKBOX_CLASSES:()=>o8,CAROUSEL_TRANSITIONS:()=>b7,CAROUSEL_SCROLL_BEHAVIORS:()=>p8,CAROUSEL_LAYOUTS:()=>Q9,CAROUSEL_ITEM_SIZES:()=>i0,CAROUSEL_EVENTS:()=>T9,CAROUSEL_DEFAULTS:()=>H6,CARD_WIDTHS:()=>B$,CARD_VARIANTS:()=>B9,CARD_MEDIA_POSITION:()=>d8,CARD_ELEVATIONS:()=>i9,CARD_CORNER_RADIUS:()=>f8,CARD_CLASSES:()=>r8,CARD_ASPECT_RATIOS:()=>F$,CARD_ACTION_ALIGNMENT:()=>g8,BUTTON_VARIANTS:()=>A7,BUTTON_TYPES:()=>T7,BUTTON_SIZES:()=>w7,BUTTON_SHAPES:()=>x7,BUTTON_CLASSES:()=>h8,BADGE_VARIANTS:()=>L7,BADGE_POSITIONS:()=>_7,BADGE_MAX_CHARACTERS:()=>O9,BADGE_COLORS:()=>V7,AnimationFrameManager:()=>w0,ANIMATION_DURATIONS:()=>S8});module.exports=qq(_Z);var m7={COLLECTION:"items",BASE_URL:"http://localhost:4000/api",PAGE_SIZE:20,RENDER_BUFFER_SIZE:5,ITEM_HEIGHT:48},a7={DEFAULT:"default",SINGLE_SELECT:"single-select",MULTI_SELECT:"multi-select"},i7={NONE:"none",SINGLE:"single",MULTIPLE:"multiple"},Y9={SELECT:"select",LOAD:"load",SCROLL:"scroll"},c7={START:"start",CENTER:"center",END:"end"},q6={CONTAINER:"list-container",LIST:"list",ITEM:"list-item",SELECTED:"list-item--selected",LOADING:"list--loading",EMPTY:"list--empty"};var G7={FILLED:"filled",OUTLINED:"outlined"},z7={BOTTOM_START:"bottom-start",BOTTOM:"bottom",BOTTOM_END:"bottom-end",TOP_START:"top-start",TOP:"top",TOP_END:"top-end"},o7={MOUSE:"mouse",KEYBOARD:"keyboard"},t7={CHANGE:"change",OPEN:"open",CLOSE:"close"},n7={DROPDOWN:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M7 10l5 5 5-5z"/></svg>',CHECKMARK:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>'},L9={VARIANT:G7.FILLED,PLACEMENT:z7.BOTTOM_START,LABEL:"Select",VALUE:"",REQUIRED:!1,DISABLED:!1,SUPPORTING_TEXT:"",ERROR:!1},e7={CONTAINER:"select",TEXTFIELD:"select__textfield",DROPDOWN_ICON:"select__dropdown-icon",MENU:"select__menu",MENU_ITEM:"select__menu-item",MENU_ITEM_SELECTED:"select__menu-item--selected",MENU_ITEM_DISABLED:"select__menu-item--disabled",MENU_ITEM_CHECKMARK:"select__menu-item-checkmark",MENU_ITEM_ICON:"select__menu-item-icon",MENU_ITEM_TEXT:"select__menu-item-text",FILLED:"select--filled",OUTLINED:"select--outlined",OPEN:"select--open",DISABLED:"select--disabled",REQUIRED:"select--required",ERROR:"select--error"};M7();n();m();var _8={CENTER:"center",END:"end"},D8=300;var Rq={tag:"div",hasFab:!1,fabPosition:_8.END,autoHide:!1,transitionDuration:D8},aQ=(J={})=>b(Rq,J,"bottom-app-bar");var iQ=(J={})=>{let $=aQ(J),Q=T($),q=document.createElement("div");q.className=`${Q.getClass("bottom-app-bar")}-actions`;let Z=document.createElement("div");Z.className=`${Q.getClass("bottom-app-bar")}-fab-container`;let j=S({tag:$.tag,componentName:"bottom-app-bar",className:[$.hasFab?`${Q.getClass("bottom-app-bar")}--with-fab`:"",$.fabPosition==="center"?`${Q.getClass("bottom-app-bar")}--fab-center`:"",$.class],attributes:{role:"toolbar","aria-label":"Bottom app bar"},interactive:!0})(Q),K=h()(j),Y=v()(K);Y.element.appendChild(q),Y.element.appendChild(Z);let G=!0,z=window.scrollY;if($.autoHide){let X=()=>{let _=window.scrollY;if(_>z+10){if(G)W.hide(),$.onVisibilityChange?.(!1)}else if(_<z-10){if(!G)W.show(),$.onVisibilityChange?.(!0)}z=_};window.addEventListener("scroll",X,{passive:!0});let U=Y.lifecycle.destroy;Y.lifecycle.destroy=()=>{window.removeEventListener("scroll",X),U()}}let W={...Y,addAction(X){return q.appendChild(X),this},addFab(X){return Z.innerHTML="",Z.appendChild(X),this.element.classList.add(`${Q.getClass("bottom-app-bar")}--with-fab`),this},show(){return this.element.classList.remove(`${Q.getClass("bottom-app-bar")}--hidden`),G=!0,this},hide(){return this.element.classList.add(`${Q.getClass("bottom-app-bar")}--hidden`),G=!1,this},isVisible(){return G},getActionsContainer(){return q}};if($.autoHide&&$.transitionDuration)W.element.style.transition=`transform ${$.transitionDuration}ms ease-in-out`;return W};var cQ=iQ;w9();n();s();c();var X$=({lifecycle:J})=>($)=>({...$,element:$.element,addContent(Q){if(Q&&Q.classList.contains(`${$.getClass("card")}-content`))$.element.appendChild(Q);return this},setHeader(Q){if(Q&&Q.classList.contains(`${$.getClass("card")}-header`)){let q=$.element.querySelector(`.${$.getClass("card")}-header`);if(q)q.remove();if($.element.querySelector(`.${$.getClass("card")}-media`)){let j=$.element.querySelectorAll(`.${$.getClass("card")}-media`),K=j[j.length-1];if(K.nextSibling)$.element.insertBefore(Q,K.nextSibling);else $.element.appendChild(Q)}else $.element.insertBefore(Q,$.element.firstChild)}return this},addMedia(Q,q="top"){if(Q&&Q.classList.contains(`${$.getClass("card")}-media`))if(q==="top")$.element.insertBefore(Q,$.element.firstChild);else $.element.appendChild(Q);return this},setActions(Q){if(Q&&Q.classList.contains(`${$.getClass("card")}-actions`)){let q=$.element.querySelector(`.${$.getClass("card")}-actions`);if(q)q.remove();$.element.appendChild(Q)}return this},makeDraggable(Q){if($.element.setAttribute("draggable","true"),$.element.setAttribute("aria-grabbed","false"),typeof Q==="function")$.element.addEventListener("dragstart",(q)=>{$.element.setAttribute("aria-grabbed","true"),Q(q)}),$.element.addEventListener("dragend",()=>{$.element.setAttribute("aria-grabbed","false")});return this},focus(){return $.element.focus(),this},destroy(){J.destroy()}});m();w6();n();s();u6();var I7=(J={})=>{let $={...J,componentName:"card-content",prefix:u};try{let Q=I(T,S({tag:"div",componentName:"card-content",className:[J.class,J.padding===!1?`${u}-card-content--no-padding`:null],attributes:{role:"region",style:"display: block; color: inherit;"}}))($);if(J.html)Q.element.innerHTML=J.html;else if(J.text)Q.element.innerHTML=`<p>${J.text}</p>`;if(Array.isArray(J.children))J.children.forEach((q)=>{if(q instanceof HTMLElement)Q.element.appendChild(q)});return Q.element.classList.add("debug-content"),Q.element}catch(Q){throw console.error("Card content creation error:",Q instanceof Error?Q.message:String(Q)),Error(`Failed to create card content: ${Q instanceof Error?Q.message:String(Q)}`)}},S7=(J={})=>{let $={...J,componentName:"card-header",prefix:u};try{let Q=I(T,S({tag:"div",componentName:"card-header",className:J.class,attributes:{role:"heading","aria-level":"3"}}))($),q=E({tag:"div",className:`${u}-card-header-text`,container:Q.element});if(J.title){E({tag:"h3",className:`${u}-card-header-title`,text:J.title,container:q,attributes:{id:`${Q.element.id||"card-header"}-title`}});let Z=Q.element.closest(`.${u}-card`);if(Z&&!Z.hasAttribute("aria-labelledby"))Z.setAttribute("aria-labelledby",`${Q.element.id||"card-header"}-title`)}if(J.subtitle)E({tag:"h4",className:`${u}-card-header-subtitle`,text:J.subtitle,container:q});if(J.avatar){let Z=typeof J.avatar==="string"?E({tag:"div",className:`${u}-card-header-avatar`,html:J.avatar}):J.avatar,j=Z.querySelector("img");if(j&&!j.hasAttribute("alt"))j.setAttribute("alt",""),j.setAttribute("aria-hidden","true");Q.element.insertBefore(Z,Q.element.firstChild)}if(J.action){let Z=typeof J.action==="string"?E({tag:"div",className:`${u}-card-header-action`,html:J.action}):J.action;Q.element.appendChild(Z)}return Q.element}catch(Q){throw console.error("Card header creation error:",Q instanceof Error?Q.message:String(Q)),Error(`Failed to create card header: ${Q instanceof Error?Q.message:String(Q)}`)}},m9=(J={})=>{let $={...J,componentName:"card-actions",prefix:u};try{let Q=I(T,S({tag:"div",componentName:"card-actions",className:[J.class,J.fullBleed?`${u}-card-actions--full-bleed`:null,J.vertical?`${u}-card-actions--vertical`:null,J.align?`${u}-card-actions--${J.align}`:null],attributes:{role:"group"}}))($);if(Array.isArray(J.actions))J.actions.forEach((q,Z)=>{if(q instanceof HTMLElement){if(!q.hasAttribute("aria-label")&&!q.hasAttribute("aria-labelledby")&&q.textContent?.trim()==="")q.setAttribute("aria-label",`Action ${Z+1}`);Q.element.appendChild(q)}});return Q.element}catch(Q){throw console.error("Card actions creation error:",Q instanceof Error?Q.message:String(Q)),Error(`Failed to create card actions: ${Q instanceof Error?Q.message:String(Q)}`)}},a9=(J={})=>{let $={...J,componentName:"card-media",prefix:u};try{let Q=I(T,S({tag:"div",componentName:"card-media",className:[J.class,J.aspectRatio?`${u}-card-media--${J.aspectRatio.replace(":","-")}`:null,J.contain?`${u}-card-media--contain`:null]}))($);if(J.element instanceof HTMLElement)Q.element.appendChild(J.element);else if(J.src){let q=document.createElement("img");if(q.src=J.src,q.className=`${u}-card-media-img`,q.alt=J.alt||"",!J.alt)q.setAttribute("aria-hidden","true");Q.element.appendChild(q)}return Q.element}catch(Q){throw console.error("Card media creation error:",Q instanceof Error?Q.message:String(Q)),Error(`Failed to create card media: ${Q instanceof Error?Q.message:String(Q)}`)}};var B9={ELEVATED:"elevated",FILLED:"filled",OUTLINED:"outlined"},i9={LEVEL0:0,LEVEL1:1,LEVEL2:2,LEVEL4:4},B$={SMALL:"344px",MEDIUM:"480px",LARGE:"624px",FULL:"100%"},f8={SMALL:"8px",MEDIUM:"12px",LARGE:"16px"},F$={SQUARE:"1:1",STANDARD:"4:3",WIDESCREEN:"16:9"},g8={START:"start",CENTER:"center",END:"end",SPACE_BETWEEN:"space-between"},d8={TOP:"top",BOTTOM:"bottom"},r8={ROOT:"card",HEADER:"card-header",TITLE:"card-title",SUBTITLE:"card-subtitle",AVATAR:"card-avatar",HEADER_ACTION:"card-header-action",CONTENT:"card-content",MEDIA:"card-media",ACTIONS:"card-actions",DRAGGABLE:"card-draggable",INTERACTIVE:"card-interactive",FULL_WIDTH:"card-full-width",CLICKABLE:"card-clickable",LOADING:"card-loading",EXPANDED:"card-expanded",ELEVATION_PREFIX:"card-elevation-"};var Cq={variant:B9.ELEVATED,interactive:!1,fullWidth:!1,clickable:!1,draggable:!1},f0=(J)=>{let $={...J};if(J.header)$.headerConfig=J.header;if(J.content)$.contentConfig=J.content;if(J.media)$.mediaConfig=J.media;if(J.actions)$.actionsConfig=J.actions;return $},g0=(J,$)=>{if($.mediaConfig&&(!$.mediaConfig.position||$.mediaConfig.position==="top")){let Q=a9({...$.mediaConfig,position:void 0});J.addMedia(Q,"top")}if($.headerConfig){let Q=S7($.headerConfig);J.setHeader(Q)}if($.contentConfig){let Q=I7($.contentConfig);J.addContent(Q)}if($.mediaConfig&&$.mediaConfig.position==="bottom"){let Q=a9({...$.mediaConfig,position:void 0});J.addMedia(Q,"bottom")}if($.actionsConfig){let Q=m9($.actionsConfig);J.setActions(Q)}if(Array.isArray($.buttons)&&$.buttons.length>0)Promise.resolve().then(() => (w9(),u0)).then(({default:Q})=>{let q=$.buttons.map((j)=>Q(j).element),Z=m9({actions:q,align:$.actionsConfig?.align||"end"});J.setActions(Z)}).catch((Q)=>{console.error("Error processing buttons:",Q)})},d0=(J={})=>b(Cq,J,"card"),r0=(J)=>{let $=J.interactive||J.clickable,Q=$?"button":"region",q={};if(J.aria)Object.entries(J.aria).forEach(([Z,j])=>{if(j!==void 0){let K=Z.startsWith("aria-")?Z:`aria-${Z}`;q[K]=j}});if(!q.role&&!J.aria?.role)q.role=Q;if($&&!q.tabindex)q.tabindex="0";return f(J,{tag:"div",className:[J.class,J.fullWidth?`${J.prefix}-card--full-width`:null,$?`${J.prefix}-card--interactive`:null],attributes:q,forwardEvents:{click:()=>!!J.clickable,mouseenter:()=>!!$,mouseleave:()=>!!$,keydown:()=>!!$,focus:()=>!!$,blur:()=>!!$},interactive:$})},l0=(J)=>({lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}}),x9=i9,p0=(J)=>{let $=J.config;if($.interactive||$.clickable)J.element.addEventListener("mouseenter",()=>{if($.variant===B9.ELEVATED)J.element.style.setProperty("--card-elevation",String(x9.LEVEL2))}),J.element.addEventListener("mouseleave",()=>{if($.variant===B9.ELEVATED)J.element.style.setProperty("--card-elevation",String(x9.LEVEL1))}),J.element.addEventListener("keydown",(q)=>{if((q.key==="Enter"||q.key===" ")&&$.clickable)q.preventDefault(),J.element.click()}),J.element.addEventListener("focus",()=>{J.element.classList.add(`${J.getClass("card")}--focused`)}),J.element.addEventListener("blur",()=>{J.element.classList.remove(`${J.getClass("card")}--focused`)});if($.draggable)J.element.setAttribute("draggable","true"),J.element.addEventListener("dragstart",(q)=>{if(J.element.style.setProperty("--card-elevation",String(x9.LEVEL4)),J.element.classList.add(`${J.getClass("card")}--dragging`),J.emit?.("dragstart",{event:q}),q.dataTransfer){let Z=J.element.querySelector(`.${J.getClass("card")}-header-title`)?.textContent||"Card";q.dataTransfer.setData("text/plain",Z)}}),J.element.addEventListener("dragend",(q)=>{J.element.style.setProperty("--card-elevation",String(x9.LEVEL1)),J.element.classList.remove(`${J.getClass("card")}--dragging`),J.emit?.("dragend",{event:q})});return J};w6();u6();var s0=(J={})=>($)=>{let Q=J.initialState||!1,q=null,Z=Q;function j(K){if(Z=K,K&&!q)q=E({tag:"div",className:`${u}-card-loading-overlay`,container:$.element,attributes:{role:"progressbar","aria-busy":"true","aria-label":"Loading"}}),E({tag:"div",className:`${u}-card-loading-spinner`,container:q}),$.element.classList.add(`${u}-card--state-loading`),$.element.setAttribute("aria-busy","true");else if(!K&&q)q.remove(),q=null,$.element.classList.remove(`${u}-card--state-loading`),$.element.setAttribute("aria-busy","false")}if(Q)j(!0);return{...$,loading:{isLoading:()=>Z,setLoading:j}}},H$=(J)=>{if(J.config.variant==="elevated")J.element.style.setProperty("--card-elevation",String(x9.LEVEL1));else J.element.style.setProperty("--card-elevation",String(x9.LEVEL0));return J},m0=(J={})=>($)=>{let Q=J.initialExpanded||!1,q=Q,Z=J.expandableContent,j=E({tag:"button",className:`${u}-card-expand-button`,attributes:{"aria-expanded":q?"true":"false","aria-label":q?"Collapse content":"Expand content","aria-controls":Z?.id||`${$.element.id||"card"}-expandable-content`}}),K=$.element.querySelector(`.${u}-card-actions`);if(K)K.appendChild(j);else E({tag:"div",className:`${u}-card-actions`,container:$.element,attributes:{role:"group"}}).appendChild(j);if(Z){if(Z.classList.add(`${u}-card-expandable-content`),!Z.id)Z.id=`${$.element.id||"card"}-expandable-content`;if(!Q)Z.style.display="none",Z.setAttribute("aria-hidden","true");else Z.setAttribute("aria-hidden","false");$.element.appendChild(Z)}function Y(z){if(q=z,Z)Z.style.display=z?"block":"none",Z.setAttribute("aria-hidden",z?"false":"true");if(j.setAttribute("aria-expanded",z?"true":"false"),j.setAttribute("aria-label",z?"Collapse content":"Expand content"),z)$.element.classList.add(`${u}-card--expanded`);else $.element.classList.remove(`${u}-card--expanded`);$.emit?.("expandedChanged",{expanded:z})}function G(){Y(!q)}return j.addEventListener("click",(z)=>{z.stopPropagation(),G()}),j.addEventListener("keydown",(z)=>{if(z.key==="Enter"||z.key===" ")z.preventDefault(),G()}),{...$,expandable:{isExpanded:()=>q,setExpanded:Y,toggleExpanded:G}}},a0=(J={})=>($)=>{let Q=J.threshold||100,q=0,Z=0;$.element.setAttribute("aria-description","Swipeable card. Swipe left or right to perform actions.");let j=E({tag:"button",className:`${u}-card-swipe-left-action`,text:"Swipe Left Action",container:$.element,attributes:{"aria-label":"Perform swipe left action",style:"position: absolute; left: -9999px; top: -9999px; visibility: hidden;"}}),K=E({tag:"button",className:`${u}-card-swipe-right-action`,text:"Swipe Right Action",container:$.element,attributes:{"aria-label":"Perform swipe right action",style:"position: absolute; left: -9999px; top: -9999px; visibility: hidden;"}});j.addEventListener("click",()=>{if(J.onSwipeLeft)$.element.style.transform="translateX(-100%)",$.element.style.transition="transform 0.3s ease",J.onSwipeLeft($)}),K.addEventListener("click",()=>{if(J.onSwipeRight)$.element.style.transform="translateX(100%)",$.element.style.transition="transform 0.3s ease",J.onSwipeRight($)});function Y(W){q=W.touches[0].clientX,$.element.style.transition="none"}function G(W){if(!q)return;Z=W.touches[0].clientX;let X=Z-q;$.element.style.transform=`translateX(${X}px)`}function z(){if(!q)return;$.element.style.transition="transform 0.3s ease";let W=Z-q;if(Math.abs(W)>=Q)if(W>0&&J.onSwipeRight)$.element.style.transform="translateX(100%)",J.onSwipeRight($);else if(W<0&&J.onSwipeLeft)$.element.style.transform="translateX(-100%)",J.onSwipeLeft($);else $.element.style.transform="translateX(0)";else $.element.style.transform="translateX(0)";q=0,Z=0}return $.element.addEventListener("touchstart",Y),$.element.addEventListener("touchmove",G),$.element.addEventListener("touchend",z),$.element.classList.add(`${u}-card--swipeable`),{...$,swipeable:{reset:()=>{$.element.style.transition="transform 0.3s ease",$.element.style.transform="translateX(0)"}}}};var Eq=(J={})=>{let $=f0(J),Q=d0($);try{let q=I(T,h(),S(r0(Q)),Y6(Q),Q.clickable?P6(Q):(Z)=>Z,v(),p0,H$,(Z)=>X$(l0(Z))(Z))(Q);return g0(q,$),q}catch(q){throw console.error("Card creation error:",q instanceof Error?q.message:String(q)),Error(`Failed to create card: ${q instanceof Error?q.message:String(q)}`)}},l8=Eq;n();s();c();var Q9={MULTI_BROWSE:"multi-browse",UNCONTAINED:"uncontained",HERO:"hero",FULL_SCREEN:"full-screen"},p8={DEFAULT:"default",SNAP:"snap"},i0={LARGE:"large",MEDIUM:"medium",SMALL:"small"},b7={SLIDE:"slide",FADE:"fade",NONE:"none"},T9={SLIDE_CHANGE:"slide-change",SLIDE_CHANGED:"slide-changed",RESIZE:"resize"},H6={INITIAL_SLIDE:0,LOOP:!0,TRANSITION:b7.SLIDE,TRANSITION_DURATION:300,BORDER_RADIUS:16,GAP:8,LAYOUT:Q9.MULTI_BROWSE,SCROLL_BEHAVIOR:p8.SNAP,SMALL_ITEM_WIDTH:48,ITEM_WIDTHS:{[Q9.MULTI_BROWSE]:{LARGE:240,MEDIUM:180,SMALL:48},[Q9.UNCONTAINED]:{LARGE:240,MEDIUM:240,SMALL:240},[Q9.HERO]:{LARGE:300,MEDIUM:240,SMALL:48},[Q9.FULL_SCREEN]:{LARGE:"100%",MEDIUM:"100%",SMALL:"100%"}}};var s8=(J)=>($)=>{let Q={...$},q=J.layout||H6.LAYOUT,Z=()=>{let B=document.createElement("div");return B.className=`${$.getClass("carousel")}-wrapper`,B.dataset.layout=q,$.element.appendChild(B),B},j=document.createElement("div");if(j.className=`${$.getClass("carousel")}-slides`,j.setAttribute("role","list"),j.setAttribute("aria-label","Carousel Slides"),J.scrollBehavior==="snap")j.dataset.snapScroll="true";j.dataset.gap=`${J.gap||H6.GAP}`;let K=Z();K.appendChild(j);let Y=J.initialSlide||0,G=0,z=[],W=[];function X(B){if(W[B]?.size)return W[B].size;switch(q){case"multi-browse":if(B===0||B===1)return"large";if(B===2)return"medium";return"small";case"uncontained":return"large";case"hero":return B===0?"large":"small";case"full-screen":return"large";default:return"large"}}function U(){let B=j.clientWidth,H=typeof H6.ITEM_WIDTHS[q].LARGE==="number"?H6.ITEM_WIDTHS[q].LARGE:B,V=typeof H6.ITEM_WIDTHS[q].MEDIUM==="number"?H6.ITEM_WIDTHS[q].MEDIUM:B*0.75,O=typeof H6.ITEM_WIDTHS[q].SMALL==="number"?H6.ITEM_WIDTHS[q].SMALL:H6.SMALL_ITEM_WIDTH;if(J.largeItemMaxWidth&&typeof J.largeItemMaxWidth==="number")H=Math.min(H,J.largeItemMaxWidth);if(J.smallItemWidth&&typeof J.smallItemWidth==="number")O=J.smallItemWidth;if(q==="full-screen")H=B,V=B,O=B;z.forEach((M,P)=>{let R=X(P);switch(R){case"large":M.style.width=`${H}px`;break;case"medium":M.style.width=`${V}px`;break;case"small":M.style.width=`${O}px`;break}M.className=`${$.getClass("carousel")}-slide ${$.getClass("carousel")}-slide--${R}`;let y=M.querySelector(`.${$.getClass("carousel")}-slide-title`),x=M.querySelector(`.${$.getClass("carousel")}-slide-description`);if(y)if(R==="small"&&q!=="uncontained")y.classList.add("visually-hidden");else y.classList.remove("visually-hidden");if(x)if(R==="small"||R==="medium"&&q==="multi-browse")x.classList.add("visually-hidden");else x.classList.remove("visually-hidden")})}function _(B,H){let V=document.createElement("div");V.className=`${$.getClass("carousel")}-slide`,V.setAttribute("role","listitem"),V.setAttribute("aria-roledescription","slide"),V.dataset.borderRadius=`${J.borderRadius||H6.BORDER_RADIUS}`;let O=document.createElement("div");O.className=`${$.getClass("carousel")}-slide-image`;let M=document.createElement("img");if(M.src=B.image,M.alt=B.title||"Carousel slide",O.appendChild(M),B.accent){let R=document.createElement("div");if(R.className=`${$.getClass("carousel")}-slide-overlay`,B.accent)R.style.backgroundColor=B.accent;O.appendChild(R)}let P=document.createElement("div");if(P.className=`${$.getClass("carousel")}-slide-content`,B.title){let R=document.createElement("div");if(R.className=`${$.getClass("carousel")}-slide-title`,R.textContent=B.title,q==="full-screen")P.appendChild(R);else O.appendChild(R)}if(B.description){let R=document.createElement("div");R.className=`${$.getClass("carousel")}-slide-description`,R.textContent=B.description,P.appendChild(R)}if(B.buttonText){let R=document.createElement("a");if(R.className=`${$.getClass("carousel")}-slide-button`,R.textContent=B.buttonText,B.buttonUrl)R.href=B.buttonUrl;if(B.accent)R.style.backgroundColor=B.accent;P.appendChild(R)}if(V.appendChild(O),V.appendChild(P),H!==void 0&&H>=0&&H<=W.length)W.splice(H,0,B);else W.push(B);if(H!==void 0&&H>=0&&H<=z.length)if(H<z.length)j.insertBefore(V,z[H]),z.splice(H,0,V);else j.appendChild(V),z.push(V);else j.appendChild(V),z.push(V);return G++,U(),V}let N=()=>{if(J.showAllLink===!1)return;let B=document.createElement("div");B.className=`${$.getClass("carousel")}-show-all`,B.setAttribute("role","button"),B.setAttribute("tabindex","0"),B.setAttribute("aria-label","Show all items");let H=document.createElement("span");H.textContent="Show all",B.appendChild(H),K.appendChild(B),B.addEventListener("click",()=>{if(J.onShowAll&&typeof J.onShowAll==="function")J.onShowAll()}),B.addEventListener("keydown",(V)=>{if(V.key==="Enter"||V.key===" "){if(J.onShowAll&&typeof J.onShowAll==="function")J.onShowAll();V.preventDefault()}})};if(J.slides&&J.slides.length>0)J.slides.forEach((B)=>{_(B)});if(J.showAllLink!==!1&&q!=="full-screen")N();let F=()=>{U();let B=new CustomEvent(T9.RESIZE,{detail:{width:j.clientWidth}});$.element.dispatchEvent(B)};window.addEventListener("resize",F),setTimeout(U,0);let k=(B)=>{if(B<0||B>=G)if(J.loop)if(B<0)B=G-1;else B=0;else return Q;if(Y!==B){let H=new CustomEvent(T9.SLIDE_CHANGE,{detail:{previousSlide:Y,nextSlide:B}});$.element.dispatchEvent(H),Y=B,z.forEach((M,P)=>{if(P===Y)M.classList.add(`${$.getClass("carousel")}-slide--active`),M.setAttribute("aria-current","true");else M.classList.remove(`${$.getClass("carousel")}-slide--active`),M.removeAttribute("aria-current")});let V=J.scrollBehavior==="snap"?"smooth":"auto";if(z[B])if(q==="hero"&&J.centered){let M=z[B].offsetWidth,P=j.clientWidth,R=z[B].offsetLeft;j.scrollTo({left:R-P/2+M/2,behavior:V})}else z[B].scrollIntoView({behavior:V,block:"nearest",inline:"start"});let O=new CustomEvent(T9.SLIDE_CHANGED,{detail:{currentSlide:Y}});$.element.dispatchEvent(O)}return Q};if(Object.assign(Q,{slides:{addSlide:(B,H)=>{return _(B,H),Q.slides},removeSlide:(B)=>{if(B>=0&&B<z.length){if(j.removeChild(z[B]),z.splice(B,1),W.splice(B,1),G--,Y>=G)Y=G-1;if(Y<0)Y=0;U()}return Q.slides},updateSlide:(B,H)=>{if(B>=0&&B<z.length){W[B]=H;let V=z[B],O=V.querySelector("img");if(O)O.src=H.image,O.alt=H.title||"Carousel slide";let M=V.querySelector(`.${$.getClass("carousel")}-slide-title`);if(M&&H.title)M.textContent=H.title;let P=V.querySelector(`.${$.getClass("carousel")}-slide-description`);if(P&&H.description)P.textContent=H.description;let R=V.querySelector(`.${$.getClass("carousel")}-slide-overlay`);if(R&&H.accent)R.style.backgroundColor=H.accent;let y=V.querySelector(`.${$.getClass("carousel")}-slide-button`);if(y)if(H.buttonText){if(y.textContent=H.buttonText,H.buttonUrl)y.href=H.buttonUrl;if(H.accent)y.style.backgroundColor=H.accent}else y.parentElement?.removeChild(y);else if(H.buttonText){let x=V.querySelector(`.${$.getClass("carousel")}-slide-content`);if(x){let A=document.createElement("a");if(A.className=`${$.getClass("carousel")}-slide-button`,A.textContent=H.buttonText,H.buttonUrl)A.href=H.buttonUrl;if(H.accent)A.style.backgroundColor=H.accent;x.appendChild(A)}}if(H.size)U()}return Q.slides},getSlide:(B)=>{if(B>=0&&B<W.length)return W[B];return null},getCount:()=>G,getElements:()=>[...z]},slidesContainer:j,slideData:W,wrapper:K,getCurrentSlide:()=>Y,goTo:k,next:()=>k(Y+1),prev:()=>k(Y-1),enableLoop:()=>{return J.loop=!0,Q},disableLoop:()=>{return J.loop=!1,Q},setBorderRadius:(B)=>{return J.borderRadius=B,z.forEach((H)=>{H.dataset.borderRadius=`${B}`}),Q},setGap:(B)=>{return J.gap=B,j.dataset.gap=`${B}`,Q},updateLayout:(B)=>{return J.layout=B,K.dataset.layout=B,$.element.dataset.layout=B,Object.values(Q9).forEach((H)=>{$.element.classList.remove(`${$.getClass("carousel")}-layout--${H}`)}),$.element.classList.add(`${$.getClass("carousel")}-layout--${B}`),U(),Q},lifecycle:{...$.lifecycle||{},destroy:()=>{if(window.removeEventListener("resize",F),$.lifecycle&&$.lifecycle.destroy)$.lifecycle.destroy()}}}),J.transition)$.element.classList.add(`${$.getClass("carousel")}-transition--${J.transition}`);if(J.scrollBehavior==="snap")j.addEventListener("scroll",()=>{clearTimeout(Q.scrollTimeout),Q.scrollTimeout=setTimeout(()=>{let B=0,H=1/0,V=j.scrollLeft,O=j.clientWidth;if(z.forEach((M,P)=>{let y=M.offsetLeft+M.offsetWidth/2,x=V+O/2,A=Math.abs(y-x);if(A<H)H=A,B=P}),B!==Y){Y=B,z.forEach((P,R)=>{if(R===Y)P.classList.add(`${$.getClass("carousel")}-slide--active`),P.setAttribute("aria-current","true");else P.classList.remove(`${$.getClass("carousel")}-slide--active`),P.removeAttribute("aria-current")});let M=new CustomEvent(T9.SLIDE_CHANGED,{detail:{currentSlide:Y}});$.element.dispatchEvent(M)}},150)});return Q};var m8=(J)=>($)=>{let Q,q,Z,j=!1,K=0,Y=0,G,z=J.scrollBehavior||"default",W=(H)=>{if(H.button!==0)return;cancelAnimationFrame(G),Q=H.clientX,q=$.slidesContainer.scrollLeft,Z=Q,j=!0,Y=Date.now(),K=0,$.slidesContainer.dataset.touchAction="none",$.element.dataset.dragging="true",$.slidesContainer.style.scrollBehavior="auto",$.element.setPointerCapture(H.pointerId),H.preventDefault()},X=(H)=>{if(!j)return;let V=H.clientX-Q;$.slidesContainer.scrollLeft=q-V;let O=Date.now(),M=O-Y;if(M>0)K=(H.clientX-Z)/M;Z=H.clientX,Y=O,H.preventDefault()},U=()=>{let H=$.slides.getElements(),V=$.slidesContainer.clientWidth,O=$.slidesContainer.scrollLeft,M=J.layout==="hero"&&J.centered,P=0,R=1/0;return H.forEach((y)=>{let x;if(M)x=y.offsetLeft+y.offsetWidth/2-V/2;else x=y.offsetLeft;let A=Math.abs(x-O);if(A<R)R=A,P=x}),P},_=(H,V,O)=>{let M=Date.now(),P=V-H,R=500;if(Math.abs(O)>0.5)R=Math.min(R,300);let y=()=>{let x=Date.now()-M,A=Math.min(x/R,1);A=1-Math.pow(1-A,3);let C=H+P*A;if($.slidesContainer.scrollLeft=C,A<1)G=requestAnimationFrame(y)};G=requestAnimationFrame(y)},N=(H)=>{if(!j)return;if(j=!1,delete $.element.dataset.dragging,$.element.releasePointerCapture(H.pointerId),z==="snap"){let V=U();_($.slidesContainer.scrollLeft,V,K)}else if(Math.abs(K)>0.5){let V=K*100,O=$.slidesContainer.scrollLeft-V;_($.slidesContainer.scrollLeft,O,K)}K=0,setTimeout(()=>{$.slidesContainer.style.scrollBehavior=""},0)},F=(H)=>{if(j)j=!1,delete $.element.dataset.dragging,$.element.releasePointerCapture(H.pointerId),$.slidesContainer.style.scrollBehavior=""},k=(H)=>{if(J.layout==="full-screen")return;H.preventDefault();let O=(H.deltaY||H.deltaX)*0.5;if(z==="snap")$.slidesContainer.scrollLeft+=O,clearTimeout($.wheelSnapTimeout),$.wheelSnapTimeout=setTimeout(()=>{let M=U();_($.slidesContainer.scrollLeft,M,0)},150);else $.slidesContainer.scrollLeft+=O},L=()=>{if(J.layout!=="multi-browse"||!$.element.dataset.enableParallax)return;let H=$.slides.getElements(),V=$.slidesContainer.clientWidth,O=$.slidesContainer.scrollLeft;H.forEach((M)=>{let{offsetLeft:P,offsetWidth:R}=M,y=P+R/2,x=O+V/2,A=y-x,C=Math.max(-1,Math.min(1,A/(V/2))),r=M.querySelector(`.${$.getClass("carousel")}-slide-image img`);if(r)r.style.transform=`translateX(${C*-5}%)`})},D=()=>{L()};if(J.layout==="multi-browse")$.element.dataset.enableParallax="true";$.element.dataset.swipe="true",$.slidesContainer.addEventListener("pointerdown",W),window.addEventListener("pointermove",X),window.addEventListener("pointerup",N),window.addEventListener("pointercancel",F),$.slidesContainer.addEventListener("wheel",k,{passive:!1}),$.slidesContainer.addEventListener("scroll",D,{passive:!0});let B=(H)=>{if($.element!==document.activeElement)return;switch(H.key){case"ArrowLeft":if($.prev)$.prev();else $.slidesContainer.scrollBy({left:-200,behavior:z==="snap"?"smooth":"auto"});H.preventDefault();break;case"ArrowRight":if($.next)$.next();else $.slidesContainer.scrollBy({left:200,behavior:z==="snap"?"smooth":"auto"});H.preventDefault();break;case"Home":if($.goTo)$.goTo(0);H.preventDefault();break;case"End":if($.goTo&&$.slides.getCount)$.goTo($.slides.getCount()-1);H.preventDefault();break}};return $.element.setAttribute("tabindex","0"),$.element.addEventListener("keydown",B),$.element.setAttribute("aria-label","Carousel"),{...$,lifecycle:{...$.lifecycle,destroy:()=>{if(cancelAnimationFrame(G),$.slidesContainer.removeEventListener("pointerdown",W),window.removeEventListener("pointermove",X),window.removeEventListener("pointerup",N),window.removeEventListener("pointercancel",F),$.slidesContainer.removeEventListener("wheel",k),$.slidesContainer.removeEventListener("scroll",D),$.element.removeEventListener("keydown",B),$.lifecycle&&$.lifecycle.destroy)$.lifecycle.destroy()}}}};var c0=(J)=>($)=>{let Q={element:$.element,slides:{addSlide:(q,Z)=>{return J.slides.addSlide(q,Z),Q.slides},removeSlide:(q)=>{return J.slides.removeSlide(q),Q.slides},updateSlide:(q,Z)=>{return J.slides.updateSlide(q,Z),Q.slides},getSlide:(q)=>{if($.slideData&&q>=0&&q<$.slideData.length)return $.slideData[q];return null},getCount:J.slides.getCount,getElements:J.slides.getElements},lifecycle:{destroy:J.lifecycle.destroy},getClass:$.getClass,next(){return $.next(),this},prev(){return $.prev(),this},goTo(q){return $.goTo(q),this},getCurrentSlide:$.getCurrentSlide,addSlide(q,Z){return J.slides.addSlide(q,Z),this},removeSlide(q){return J.slides.removeSlide(q),this},enableLoop(){return $.enableLoop(),this},disableLoop(){return $.disableLoop(),this},setBorderRadius(q){if($.setBorderRadius)$.setBorderRadius(q);return this},setGap(q){if($.setGap)$.setGap(q);return this},destroy(){J.lifecycle.destroy()},on(q,Z){if($.on)$.on(q,Z);else if($.element.addEventListener)$.element.addEventListener(q,Z);return this},off(q,Z){if($.off)$.off(q,Z);else if($.element.removeEventListener)$.element.removeEventListener(q,Z);return this},addClass(...q){if($.addClass)$.addClass(...q);else q.forEach((Z)=>$.element.classList.add(Z));return this}};return Q};m();var hq={initialSlide:H6.INITIAL_SLIDE,loop:H6.LOOP,transition:b7.SLIDE,transitionDuration:H6.TRANSITION_DURATION,borderRadius:H6.BORDER_RADIUS,gap:H6.GAP,prefix:"carousel",showAllLink:!0},o0=(J={})=>b(hq,J,"carousel"),t0=(J)=>{let $={role:"region","aria-roledescription":"carousel","aria-live":"polite"},Q={"data-transition":J.transition,"data-loop":J.loop?"true":"false"};return f(J,{tag:"div",attributes:{...$,...Q},className:J.class,forwardEvents:{keydown:!0,focus:!0,blur:!0}})};var uq=(J={})=>{J.layout=J.layout||"multi-browse",J.scrollBehavior=J.scrollBehavior||fq(J.layout);let $=o0(J);try{let q={...I(T,h(),S(t0($)))($)};gq(q,J);let Z=s8($)(q),j=m8($)(Z),K=v()(j),Y={slides:{addSlide:K.slides.addSlide,removeSlide:K.slides.removeSlide,updateSlide:K.slides.updateSlide,getCount:K.slides.getCount,getElements:K.slides.getElements},lifecycle:{destroy:K.lifecycle.destroy}},G=c0(Y)(K);return G.element.dataset.layout=J.layout,G.element.dataset.scrollBehavior=J.scrollBehavior,G}catch(Q){throw console.error("Carousel creation error:",Q),Error(`Failed to create carousel: ${Q.message}`)}};function fq(J){switch(J){case"multi-browse":case"hero":case"full-screen":return"snap";case"uncontained":return"default";default:return"default"}}function gq(J,$){switch(J.element.classList.add(`${J.getClass("carousel")}-layout--${$.layout}`),$.layout){case"multi-browse":J.element.dataset.enableParallax="true",J.element.dataset.layout="multi-browse";break;case"uncontained":J.element.style.overflow="visible",J.element.dataset.layout="uncontained";break;case"hero":if(J.element.dataset.largeItemFocus="true",J.element.dataset.layout="hero",$.centered)J.element.dataset.centered="true";break;case"full-screen":J.element.style.width="100%",J.element.style.height="100%",J.element.style.maxWidth="100vw",J.element.style.maxHeight="100vh",J.element.dataset.verticalScroll="true",J.element.dataset.layout="full-screen",$.scrollBehavior="snap";break}if($.scrollBehavior==="snap")J.element.dataset.snapScroll="true";else J.element.dataset.snapScroll="false"}var a8=uq;n();s();c();var n0=({disabled:J,lifecycle:$,checkable:Q})=>(q)=>({...q,element:q.element,input:q.input,getValue:q.getValue||(()=>""),setValue(Z){return q.setValue?.(Z),this},check(){return Q.check(),this},uncheck(){return Q.uncheck(),this},toggle(){return Q.toggle(),this},isChecked(){return Q.isChecked()},setIndeterminate(Z){return q.setIndeterminate?.(Z),this},setLabel(Z){return q.text?.setText(Z),this},getLabel(){return q.text?.getText()||""},on(Z,j){return q.on?.(Z,j),this},off(Z,j){return q.off?.(Z,j),this},enable(){return J.enable(),this},disable(){return J.disable(),this},destroy(){$.destroy()}});m();var dq={variant:"filled",labelPosition:"end"},e0=(J={})=>b(dq,J,"checkbox"),$4=(J)=>f(J,{tag:"div",className:J.class,interactive:!0}),J4=(J)=>($)=>{let Q=document.createElement("span");return Q.className=`${J.prefix}-checkbox-icon`,Q.innerHTML=`
|
|
10
10
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
|
|
11
11
|
<path d="M9.55 14.6L6.35 11.4l-1.9 1.9L9.55 18.4l10.9-10.9-1.9-1.9z"/>
|
|
12
12
|
</svg>
|
|
13
|
-
`,$.element.appendChild(Q),$},Q4=(J)=>($)=>{let Q=J.labelPosition||"end",q=`${J.prefix}-checkbox--label-${Q}`;return $.element.classList.add(q),$},q4=(J)=>({disabled:{enable:J.disabled?.enable,disable:J.disabled?.disable},lifecycle:{destroy:J.lifecycle?.destroy},checkable:{check:J.checkable?.check,uncheck:J.checkable?.uncheck,toggle:J.checkable?.toggle,isChecked:J.checkable?.isChecked}});var rq=(J,$)=>{let Q=D9($)(J);if($.indeterminate)Q.input.indeterminate=!0;return Q.setIndeterminate=(q)=>{return Q.input.indeterminate=q,Q.element.classList.toggle(`${$.prefix}-checkbox--indeterminate`,q),Q},Q},lq=(J={})=>{let $=e0(J);try{return I(T,h(),S($4($)),_9($),J4($),d6($),Q4($),(q)=>rq(q,$),G6($),v(),(q)=>n0(q4(q))(q))($)}catch(Q){throw console.error("Checkbox creation error:",Q instanceof Error?Q.message:String(Q)),new Error(`Failed to create checkbox: ${Q instanceof Error?Q.message:String(Q)}`)}},i8=lq;var M$={FILLED:"filled",OUTLINED:"outlined"},k$={START:"start",END:"end"},c8={CHECKED:"checked",INDETERMINATE:"indeterminate",DISABLED:"disabled",FOCUSED:"focused"},o8={ROOT:"checkbox",INPUT:"checkbox-input",ICON:"checkbox-icon",LABEL:"checkbox-label"};n();s();c();var Z4=({disabled:J,lifecycle:$})=>(Q)=>{let q=Q.element.classList.contains(`${Q.getClass("chip")}--selected`),Z=Q.element.getAttribute("data-value")||null;return{...Q,element:Q.element,getValue(){let j=Q.element.getAttribute("data-value");if(j!==null)return Z=j,j;if(Z!==null)return Q.element.setAttribute("data-value",Z),Z;let K=Q.element.querySelector(`.${Q.getClass("chip")}-text`);if(K&&K.textContent){let Y=K.textContent;if(Y.includes(" Theme"))Z=Y.replace(" Theme","").toLowerCase();else Z=Y.toLowerCase().replace(/\s+/g,"-");return Q.element.setAttribute("data-value",Z),Z}return null},setValue(j){if(j!==null&&j!==void 0)Z=j,Q.element.setAttribute("data-value",j);else Z=null,Q.element.removeAttribute("data-value");return this},isDisabled(){return Q.element.getAttribute("aria-disabled")==="true"},enable(){return J.enable(),Q.element.classList.remove(`${Q.getClass("chip")}--disabled`),Q.element.setAttribute("aria-disabled","false"),Q.element.setAttribute("tabindex","0"),this},disable(){return J.disable(),Q.element.classList.add(`${Q.getClass("chip")}--disabled`),Q.element.setAttribute("aria-disabled","true"),Q.element.setAttribute("tabindex","-1"),this},setText(j){let K=`.${Q.getClass("chip")}-content`,Y=Q.element.querySelector(K)||Q.element,G=`.${Q.getClass("chip")}-text`,z=Q.element.querySelector(G);if(!z&&j){z=document.createElement("span"),z.className=`${Q.getClass("chip")}-text`;let W=Q.element.querySelector(`.${Q.getClass("chip")}-leading-icon`);if(W)Y.insertBefore(z,W.nextSibling);else Y.insertBefore(z,Y.firstChild)}if(z){if(z.textContent=j||"",!j&&z.parentNode)z.parentNode.removeChild(z)}return this},getText(){let j=Q.element.querySelector(`.${Q.getClass("chip")}-text`);return j?j.textContent||"":""},setIcon(j){return this.setLeadingIcon(j)},getIcon(){let j=Q.element.querySelector(`.${Q.getClass("chip")}-leading-icon`);return j?j.innerHTML:""},setLeadingIcon(j){let K=Q.element.querySelector(`.${Q.getClass("chip")}-content`)||Q.element,Y=`.${Q.getClass("chip")}-leading-icon`,G=Q.element.querySelector(Y);if(!G&&j)G=document.createElement("span"),G.className=`${Q.getClass("chip")}-leading-icon`,K.insertBefore(G,K.firstChild);if(G){if(G.innerHTML=j||"",!j&&G.parentNode)G.parentNode.removeChild(G)}return this},setTrailingIcon(j,K){let Y=Q.element.querySelector(`.${Q.getClass("chip")}-content`)||Q.element,G=`.${Q.getClass("chip")}-trailing-icon`,z=Q.element.querySelector(G);if(!z&&j){if(z=document.createElement("span"),z.className=`${Q.getClass("chip")}-trailing-icon`,Y.appendChild(z),K)z.addEventListener("click",(W)=>{W.stopPropagation(),K(this)})}if(z){if(z.innerHTML=j||"",!j&&z.parentNode)z.parentNode.removeChild(z)}return this},isSelected(){return q},setSelected(j){if(q=!!j,j)Q.element.classList.add(`${Q.getClass("chip")}--selected`),Q.element.setAttribute("aria-selected","true");else Q.element.classList.remove(`${Q.getClass("chip")}--selected`),Q.element.setAttribute("aria-selected","false");return this},toggleSelected(){return this.setSelected(!q)},destroy(){$.destroy()}}};m();var pq={variant:"filled",ripple:!0},j4=(J={})=>b(pq,J,"chip"),K4=(J)=>{let $={role:"button",tabindex:"0"};if(J.disabled===!0)$["aria-disabled"]="true";if(J.selected===!0)$["aria-selected"]="true";else if(J.selected===!1)$["aria-selected"]="false";let Q=[J.class,J.selected?`${J.prefix}-chip--selected`:null];return f(J,{tag:"div",attributes:$,className:Q,forwardEvents:{click:(q)=>q.element.getAttribute("aria-disabled")!=="true",keydown:(q,Z)=>{if(Z.key===" "||Z.key==="Enter")return Z.preventDefault(),q.element.click(),!0;return!1},focus:!0,blur:!0}})},Y4=(J)=>({disabled:{enable:()=>J.disabled?.enable(),disable:()=>J.disabled?.disable()},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}});var sq=(J={})=>{let $=j4(J);try{let Q=I(T,h(),S(K4($)),Y6($),G6($),P6($),v())($),q=document.createElement("div");if(q.className=`${Q.getClass("chip")}-content`,q.style.display="flex",q.style.alignItems="center",q.style.gap="8px",q.style.width="100%",Q.element.appendChild(q),J.leadingIcon||J.icon){let j=document.createElement("span");j.className=`${Q.getClass("chip")}-leading-icon`,j.innerHTML=J.leadingIcon||J.icon||"",q.appendChild(j)}if(J.text){let j=document.createElement("span");j.className=`${Q.getClass("chip")}-text`,j.textContent=J.text,q.appendChild(j)}if(J.trailingIcon){let j=document.createElement("span");if(j.className=`${Q.getClass("chip")}-trailing-icon`,j.innerHTML=J.trailingIcon,J.onTrailingIconClick)j.addEventListener("click",(K)=>{K.stopPropagation(),J.onTrailingIconClick(Q)});q.appendChild(j)}if(J.selected)Q.element.classList.add(`${Q.getClass("chip")}--selected`),Q.element.setAttribute("aria-selected","true");if(J.value)Q.element.setAttribute("data-value",J.value);let Z=Z4(Y4(Q))(Q);if(!Q.element.hasAttribute("data-value")&&J.text)Z.getValue();if(J.variant==="filter"||J.variant==="assist"||J.variant==="suggestion"||J.selectable)Q.element.addEventListener("click",()=>{if(Z.isDisabled())return;let j=Z.isSelected();Z.toggleSelected();let K=Z.isSelected();if(J.onChange&&j!==K)J.onChange(K,Z);if(J.onSelect)J.onSelect(Z)});return Z}catch(Q){throw console.error("Chip creation error:",Q),new Error(`Failed to create chip: ${Q.message}`)}},v7=sq;s();c();var t8=(J)=>($)=>{let Q={scrollable:J.scrollable===!0,vertical:J.vertical===!0};return{...$,layout:{setScrollable(q){if(Q.scrollable=q,$.element)if(q)$.element.classList.add(`${$.getClass("chips")}--scrollable`);else $.element.classList.remove(`${$.getClass("chips")}--scrollable`);return this},isScrollable(){return Q.scrollable},setVertical(q){if(Q.vertical=q,$.element)if(q)$.element.classList.add(`${$.getClass("chips")}--vertical`);else $.element.classList.remove(`${$.getClass("chips")}--vertical`);return this},isVertical(){return Q.vertical}}}};var n8=(J)=>($)=>{return{...$,chipInstances:[],onCreated(){if(typeof $.onCreated==="function")$.onCreated();if(Array.isArray(J.chips)&&J.chips.length>0)J.chips.forEach((q)=>{this.chips?.addChip?.(q)})}}};var e8={FILLED:"filled",OUTLINED:"outlined",ELEVATED:"elevated",ASSIST:"assist",FILTER:"filter",INPUT:"input",SUGGESTION:"suggestion"},$J={CHANGE:"change",SELECT:"select",DESELECT:"deselect",REMOVE:"remove"},q9={CHANGE:"change",ADD:"add",REMOVE:"remove"};var JJ=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize chips controller: missing element"),$;let Q={change:[],add:[],remove:[]},q=-1,Z=(L,...D)=>{if(Q[L])Q[L].forEach((B)=>B(...D))},j=(L)=>{if(L.isSelected())L.element.classList.add(`${$.getClass("chip")}--selected`),L.element.setAttribute("aria-selected","true");else L.element.classList.remove(`${$.getClass("chip")}--selected`),L.element.setAttribute("aria-selected","false");if(!J.multiSelect){if($.chipInstances.forEach((V)=>{if(V!==L&&V.isSelected())V.setSelected(!1),V.element.classList.remove(`${$.getClass("chip")}--selected`),V.element.setAttribute("aria-selected","false")}),!L.isSelected()&&X().length===0)L.setSelected(!0),L.element.classList.add(`${$.getClass("chip")}--selected`),L.element.setAttribute("aria-selected","true")}let B=$.chipInstances.filter((V)=>V.isSelected()).map((V)=>V.getValue()),H=L?L.getValue():null;if(typeof J.onChange==="function")J.onChange(B,H);Z(q9.CHANGE,B,H)},K=(L)=>{if($.chipInstances.length===0)return;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," "].includes(L.key))return;if(L.key==="Enter"||L.key===" "){if(q>=0&&q<$.chipInstances.length){L.preventDefault();let D=$.chipInstances[q];if(!D.isDisabled()){if(D.toggleSelected(),D.isSelected())D.element.classList.add(`${$.getClass("chip")}--selected`),D.element.setAttribute("aria-selected","true");else D.element.classList.remove(`${$.getClass("chip")}--selected`),D.element.setAttribute("aria-selected","false");j(D)}return}}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(L.key)){L.preventDefault();let D=$.layout&&$.layout.isVertical(),B=q;if(q===-1)B=0;else if(D&&L.key==="ArrowUp"||!D&&L.key==="ArrowLeft")B=Math.max(0,q-1);else if(D&&L.key==="ArrowDown"||!D&&L.key==="ArrowRight")B=Math.min($.chipInstances.length-1,q+1);if(B!==q){if(q>=0&&q<$.chipInstances.length)$.chipInstances[q].element.blur();if(q=B,$.chipInstances[q].element.focus(),$.layout&&$.layout.isScrollable())Y(q)}}},Y=(L)=>{if(!($.layout&&$.layout.isScrollable()))return;let B=typeof L==="number"?L:$.chipInstances.indexOf(L);if(B>=0&&B<$.chipInstances.length){let H=$.chipInstances[B].element,V=$.chipContainer||$.element,O=V.getBoundingClientRect(),M=H.getBoundingClientRect();if($.layout&&$.layout.isVertical()){let R=H.offsetTop-V.offsetTop-O.height/2+M.height/2;V.scrollTo({top:Math.max(0,R),behavior:"smooth"})}else{let R=H.offsetLeft-V.offsetLeft-O.width/2+M.width/2;V.scrollTo({left:Math.max(0,R),behavior:"smooth"})}}},G=(L)=>{let D=v7({...L,onSelect:L.onSelect}),B=$.chipContainer||$.element,H=document.createDocumentFragment();return H.appendChild(D.element),B.appendChild(H),$.chipInstances.push(D),D.element.addEventListener("click",()=>{if(!D.isDisabled()){if(D.toggleSelected(),D.isSelected())D.element.classList.add(`${$.getClass("chip")}--selected`),D.element.setAttribute("aria-selected","true");else D.element.classList.remove(`${$.getClass("chip")}--selected`),D.element.setAttribute("aria-selected","false");j(D),q=$.chipInstances.indexOf(D)}}),D.element.addEventListener("keydown",K),Z(q9.ADD,D),D},z=(L)=>{let D=typeof L==="number"?L:$.chipInstances.indexOf(L);if(D>=0&&D<$.chipInstances.length){let B=$.chipInstances[D];if(Z(q9.REMOVE,B),B.destroy(),$.chipInstances.splice(D,1),D===q)q=-1;else if(D<q)q--}},W=()=>{return[...$.chipInstances]},X=()=>{return $.chipInstances.filter((L)=>L.isSelected())},U=()=>{return X().map((L)=>L.getValue())},_=(L,D=!0,B=!J.multiSelect)=>{let H=Array.isArray(L)?L:[L],V=!1;if(B)$.chipInstances.forEach((O)=>{if(!H.includes(O.getValue())&&O.isSelected())O.setSelected(!1),O.element.classList.remove(`${$.getClass("chip")}--selected`),O.element.setAttribute("aria-selected","false"),V=!0});if($.chipInstances.forEach((O)=>{if(H.includes(O.getValue())&&!O.isSelected())O.setSelected(!0),O.element.classList.add(`${$.getClass("chip")}--selected`),O.element.setAttribute("aria-selected","true"),V=!0}),V&&D){let O=U();Z(q9.CHANGE,O,null)}},N=(L=!0)=>{let B=U().length>0;if($.chipInstances.forEach((H)=>{H.setSelected(!1),H.element.classList.remove(`${$.getClass("chip")}--selected`),H.element.setAttribute("aria-selected","false")}),B&&L)Z(q9.CHANGE,[],null)},F=()=>{$.chipInstances.forEach((L)=>{L.element.addEventListener("keydown",K)})},k=()=>{$.chipInstances.forEach((L)=>{L.element.removeEventListener("keydown",K)})};if(F(),$.element)$.element.addEventListener("keydown",K);if($.lifecycle){let L=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{$.chipInstances.forEach((D)=>{D.element.removeEventListener("keydown",K)}),$.chipInstances.forEach((D)=>D.destroy()),$.chipInstances.length=0,Object.keys(Q).forEach((D)=>{Q[D]=[]}),L()}}return{...$,chips:{addChip:G,removeChip:z,getChips:W,getSelectedChips:X,getSelectedValues:U,selectByValue:_,clearSelection:N,scrollToChip:Y},keyboard:{enable:F,disable:k},on(L,D){if(!Q[L])Q[L]=[];return Q[L].push(D),this},off(L,D){if(Q[L]){let B=Q[L].indexOf(D);if(B!==-1)Q[L].splice(B,1)}return this}}};u6();var QJ=(J)=>($)=>{let Q=(Y)=>$.getClass(Y),q=J.label&&J.label.trim().length>0,Z=J.labelPosition||"start",j;if(q)j=E({tag:"label",className:Q("chips-label"),text:J.label,container:$.element});let K=E({tag:"div",className:Q("chips-container"),container:$.element});return{...$,chipContainer:K,label:j,getChipContainer:()=>K,getLabel:()=>j||null}};var G4=(J)=>($)=>{return{...$,element:$.element,addChip(Q){if(J.chips&&typeof J.chips.addChip==="function")J.chips.addChip(Q);return this},removeChip(Q){if(J.chips&&typeof J.chips.removeChip==="function")J.chips.removeChip(Q);return this},getChips(){if(J.chips&&typeof J.chips.getChips==="function")return J.chips.getChips();return[]},getSelectedChips(){if(J.chips&&typeof J.chips.getSelectedChips==="function")return J.chips.getSelectedChips();return[]},getSelectedValues(){if(J.chips&&typeof J.chips.getSelectedValues==="function")return J.chips.getSelectedValues();return[]},selectByValue(Q,q=!0){if(J.chips&&typeof J.chips.selectByValue==="function")J.chips.selectByValue(Q,q);return this},clearSelection(){if(J.chips&&typeof J.chips.clearSelection==="function")J.chips.clearSelection();return this},setScrollable(Q){if(J.layout&&typeof J.layout.setScrollable==="function")J.layout.setScrollable(Q);return this},setVertical(Q){if(J.layout&&typeof J.layout.setVertical==="function")J.layout.setVertical(Q);return this},setLabel(Q){if(J.label&&typeof J.label.setText==="function")J.label.setText(Q);return this},getLabel(){if(J.label&&typeof J.label.getText==="function")return J.label.getText();return""},setLabelPosition(Q){if(J.label&&typeof J.label.setPosition==="function")J.label.setPosition(Q);return this},getLabelPosition(){if(J.label&&typeof J.label.getPosition==="function")return J.label.getPosition();return"start"},scrollToChip(Q){if(J.chips&&typeof J.chips.scrollToChip==="function")J.chips.scrollToChip(Q);return this},enableKeyboardNavigation(){if(J.keyboard&&typeof J.keyboard.enableKeyboardNavigation==="function")J.keyboard.enableKeyboardNavigation();return this},on(Q,q){if(J.events&&typeof J.events.on==="function")J.events.on(Q,q);return this},off(Q,q){if(J.events&&typeof J.events.off==="function")J.events.off(Q,q);return this},destroy(){if(J.lifecycle&&typeof J.lifecycle.destroy==="function")J.lifecycle.destroy()}}};m();var mq={chips:[],scrollable:!1,vertical:!1,multiSelect:!1,onChange:null,selector:null,labelPosition:"start"},z4=(J={})=>{return b(mq,J,"chips")},W4=(J)=>{let $=J.scrollable===!0,Q=J.vertical===!0,q=J.multiSelect===!0,Z=J.label&&J.label.trim().length>0,j=J.labelPosition||"start",K=["chips",J.class,$?"chips--scrollable":"",Q?"chips--vertical":"",Z?"chips--with-label":"",Z&&j==="end"?"chips--label-end":""].filter(Boolean).join(" ");return f(J,{tag:"div",attributes:{role:"group","aria-multiselectable":q?"true":"false"},className:K})},U4=(J)=>({chips:{addChip:function($){if(J.chips&&typeof J.chips.addChip==="function")return J.chips.addChip($);return null},removeChip:($)=>J.chips?.removeChip?.($),getChips:()=>J.chips?.getChips?.()??[],getSelectedChips:()=>J.chips?.getSelectedChips?.()??[],getSelectedValues:()=>J.chips?.getSelectedValues?.()??[],selectByValue:($)=>J.chips?.selectByValue?.($),clearSelection:()=>J.chips?.clearSelection?.(),scrollToChip:($)=>J.chips?.scrollToChip?.($)},layout:{setScrollable:($)=>J.layout?.setScrollable?.($),isScrollable:()=>J.layout?.isScrollable?.()??!1,setVertical:($)=>J.layout?.setVertical?.($),isVertical:()=>J.layout?.isVertical?.()??!1},label:{setText:($)=>J.label?.setText?.($),getText:()=>J.label?.getText?.()??"",setPosition:($)=>J.label?.setPosition?.($),getPosition:()=>J.label?.getPosition?.()??"start"},keyboard:{enableKeyboardNavigation:()=>J.keyboard?.enable?.(),disableKeyboardNavigation:()=>J.keyboard?.disable?.()},events:{on:($,Q)=>J.on?.($,Q),off:($,Q)=>J.off?.($,Q)},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}});var aq=(J={})=>{let $=z4(J);try{let Q=I(T,h(),S(W4($)),t8($),n8($),QJ($),JJ($),v())($),q=U4(Q),Z=G4(q)(Q);if($.on&&typeof Z.on==="function")Object.entries($.on).forEach(([j,K])=>{if(typeof K==="function")Z.on(j,K)});return Z}catch(Q){throw console.error("Chips creation error:",Q),new Error(`Failed to create chip: ${Q.message}`)}},X4=aq;w6();n();s();c();var B4=["S","M","T","W","T","F","S"],N$=["January","February","March","April","May","June","July","August","September","October","November","December"],L$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qJ="MM/DD/YYYY",F4="today",V$="selected",H4="outside-month",M4="range-start",k4="range-end",N4="range-middle";var y6=(J)=>{if(!J)return null;if(J instanceof Date)return isNaN(J.getTime())?null:J;if(typeof J==="string"){let $=new Date(J);return isNaN($.getTime())?null:$}return null},H9=(J,$="MM/DD/YYYY")=>{if(!J||!(J instanceof Date)||isNaN(J.getTime()))return"";let Q="",q=0;while(q<$.length)if($.substring(q,q+4)==="MMMM")Q+=N$[J.getMonth()],q+=4;else if($.substring(q,q+3)==="MMM")Q+=L$[J.getMonth()],q+=3;else if($.substring(q,q+2)==="MM")Q+=(J.getMonth()+1).toString().padStart(2,"0"),q+=2;else if($.substring(q,q+1)==="M")Q+=J.getMonth()+1,q+=1;else if($.substring(q,q+4)==="YYYY")Q+=J.getFullYear(),q+=4;else if($.substring(q,q+2)==="YY")Q+=J.getFullYear().toString().slice(-2),q+=2;else if($.substring(q,q+2)==="DD")Q+=J.getDate().toString().padStart(2,"0"),q+=2;else if($.substring(q,q+1)==="D")Q+=J.getDate(),q+=1;else Q+=$[q],q+=1;return Q},L4=(J,$)=>{return new Date(J,$+1,0).getDate()},iq=(J,$)=>{return new Date(J,$,1).getDay()},F9=(J,$)=>{return J.getDate()===$.getDate()&&J.getMonth()===$.getMonth()&&J.getFullYear()===$.getFullYear()},cq=(J,$,Q)=>{let q=J.getTime();return q>=$.getTime()&&q<=Q.getTime()},V4=(J,$,Q=null,q=null,Z=null,j=null)=>{let K=new Date;K.setHours(0,0,0,0);let Y=[],G=iq(J,$),z=L4(J,$-1);for(let _=G-1;_>=0;_--){let N=new Date(J,$-1,z-_),F=Z&&N<Z||j&&N>j;Y.push({date:N,day:N.getDate(),isCurrentMonth:!1,isToday:F9(N,K),isSelected:Q?F9(N,Q):!1,isDisabled:F})}let W=L4(J,$);for(let _=1;_<=W;_++){let N=new Date(J,$,_),F=Q?F9(N,Q):!1,k=Z&&N<Z||j&&N>j,L={date:N,day:_,isCurrentMonth:!0,isToday:F9(N,K),isSelected:F,isDisabled:k};if(Q&&q)L.isRangeStart=F9(N,Q),L.isRangeEnd=F9(N,q),L.isRangeMiddle=cq(N,Q,q)&&!L.isRangeStart&&!L.isRangeEnd;Y.push(L)}let U=42-Y.length;for(let _=1;_<=U;_++){let N=new Date(J,$+1,_),F=Z&&N<Z||j&&N>j;Y.push({date:N,day:_,isCurrentMonth:!1,isToday:F9(N,K),isSelected:Q?F9(N,Q):!1,isDisabled:F})}return Y},_4=(J,$=10)=>{let Q=[],q=J-$,Z=J+$;for(let j=q;j<=Z;j++)Q.push(j);return Q};var ZJ=(J,$)=>{let Q=new Date(J);return Q.setMonth(Q.getMonth()+$),Q};var D4=(J,{disabled:$,lifecycle:Q,events:q})=>(Z)=>{let j={goToDate(K){let Y=y6(K);if(!Y)return;J.currentMonth=Y.getMonth(),J.currentYear=Y.getFullYear(),J.updateCalendar()},nextMonth(){let K=ZJ(new Date(J.currentYear,J.currentMonth,1),1);J.currentMonth=K.getMonth(),J.currentYear=K.getFullYear(),J.updateCalendar()},prevMonth(){let K=ZJ(new Date(J.currentYear,J.currentMonth,1),-1);J.currentMonth=K.getMonth(),J.currentYear=K.getFullYear(),J.updateCalendar()},nextYear(){J.currentYear+=1,J.updateCalendar()},prevYear(){J.currentYear-=1,J.updateCalendar()},showDayView(){J.currentView="day",J.updateCalendar()},showMonthView(){J.currentView="month",J.updateCalendar()},showYearView(){J.currentView="year",J.updateCalendar()},getCurrentView(){return J.currentView}};return{...Z,element:Z.element,input:J.input,calendar:j,open(){return J.isOpen=!0,J.render(),q.emit("open",{value:this.getValue()}),this},close(){return J.isOpen=!1,J.render(),q.emit("close",{value:this.getValue()}),this},getValue(){if(!J.selectedDate)return null;if(J.selectionMode==="range"&&J.rangeEndDate)return[new Date(J.selectedDate),new Date(J.rangeEndDate)];return new Date(J.selectedDate)},setValue(K){if(Array.isArray(K)&&J.selectionMode==="range"){let G=y6(K[0]),z=y6(K[1]);if(G&&z){if(J.selectedDate=G,J.rangeEndDate=z,G>z)J.selectedDate=z,J.rangeEndDate=G;if(J.updateInputValue(),J.isOpen)J.currentMonth=J.selectedDate.getMonth(),J.currentYear=J.selectedDate.getFullYear(),J.updateCalendar();q.emit("change",{value:this.getValue(),formattedValue:this.getFormattedValue()})}return this}let Y=y6(K);if(Y){if(J.selectedDate=Y,J.rangeEndDate=null,J.updateInputValue(),J.isOpen)J.currentMonth=Y.getMonth(),J.currentYear=Y.getFullYear(),J.updateCalendar();q.emit("change",{value:this.getValue(),formattedValue:this.getFormattedValue()})}return this},getFormattedValue(){if(!J.selectedDate)return"";if(J.selectionMode==="range"&&J.rangeEndDate){let K=H9(J.selectedDate,J.dateFormat),Y=H9(J.rangeEndDate,J.dateFormat);return`${K} - ${Y}`}return H9(J.selectedDate,J.dateFormat)},clear(){if(J.selectedDate=null,J.rangeEndDate=null,J.updateInputValue(),J.isOpen)J.updateCalendar();return q.emit("change",{value:null,formattedValue:""}),this},enable(){return $.enable(),J.input.disabled=!1,this},disable(){return $.disable(),J.input.disabled=!0,this},setMinDate(K){let Y=y6(K);if(Y){if(J.minDate=Y,J.isOpen)J.updateCalendar()}return this},setMaxDate(K){let Y=y6(K);if(Y){if(J.maxDate=Y,J.isOpen)J.updateCalendar()}return this},destroy(){if(document.removeEventListener("click",J.outsideClickHandler),J.calendarElement&&J.calendarElement.parentNode)J.calendarElement.parentNode.removeChild(J.calendarElement);Q.destroy()},on(K,Y){return q.on(K,Y),this},off(K,Y){return q.off(K,Y),this}}};m();var oq={variant:"docked",initialView:"day",selectionMode:"single",dateFormat:qJ,animate:!0},O4=(J={})=>{let $=b(oq,J,"datepicker");if($.closeOnSelect===void 0)$.closeOnSelect=$.variant!=="docked";return $},P4=(J)=>{return f(J,{tag:"div",attributes:{role:"application","aria-label":"Date Picker",tabindex:"-1"},className:[`${J.prefix}-datepicker-container`,J.class],forwardEvents:{keydown:!0,click:!0},interactive:!0})},R4=(J)=>{let $={type:"text",placeholder:J.placeholder||J.dateFormat,autocomplete:"off",readonly:!0};if(J.disabled===!0)$.disabled=!0;return f(J,{tag:"input",attributes:$,className:`${J.prefix}-datepicker-input`,forwardEvents:{focus:!0,blur:!0,click:!0},interactive:!0})},y4=(J)=>{return f(J,{tag:"div",attributes:{role:"dialog","aria-modal":J.variant!=="docked"?"true":"false"},className:[`${J.prefix}-datepicker-calendar`,`${J.prefix}-datepicker-${J.variant}`,J.selectionMode==="range"?`${J.prefix}-datepicker-range`:""],forwardEvents:{keydown:!0,click:!0}})},A4=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable()},lifecycle:{destroy:()=>J.lifecycle.destroy()},events:{on:J.on,off:J.off,emit:J.emit}});u6();var tq=({currentMonth:J,currentYear:$,currentView:Q,prefix:q,emit:Z})=>{let j=E({tag:"div",className:`${q}-datepicker-header`}),K=E({tag:"button",className:`${q}-datepicker-month-selector`,text:N$[J],attributes:{type:"button","aria-label":"Select month"}}),Y=E({tag:"button",className:`${q}-datepicker-year-selector`,text:$.toString(),attributes:{type:"button","aria-label":"Select year"}}),G=E({tag:"div",className:`${q}-datepicker-nav-controls`}),z=E({tag:"button",className:`${q}-datepicker-prev-btn`,html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>',attributes:{type:"button","aria-label":Q==="day"?"Previous month":Q==="month"?"Previous year":"Previous year range"}}),W=E({tag:"button",className:`${q}-datepicker-next-btn`,html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>',attributes:{type:"button","aria-label":Q==="day"?"Next month":Q==="month"?"Next year":"Next year range"}});return K.addEventListener("click",(X)=>{X.stopPropagation(),Z("viewChange",{view:"month"})}),Y.addEventListener("click",(X)=>{X.stopPropagation(),Z("viewChange",{view:"year"})}),z.addEventListener("click",(X)=>{if(X.stopPropagation(),Q==="day")Z("prevMonth");else if(Q==="month")Z("prevYear");else Z("prevYearRange")}),W.addEventListener("click",(X)=>{if(X.stopPropagation(),Q==="day")Z("nextMonth");else if(Q==="month")Z("nextYear");else Z("nextYearRange")}),j.appendChild(K),j.appendChild(Y),G.appendChild(z),G.appendChild(W),j.appendChild(G),j},nq=(J)=>{let $=E({tag:"div",className:`${J}-datepicker-weekdays`});return B4.forEach((Q)=>{let q=E({tag:"span",className:`${J}-datepicker-weekday`,text:Q});$.appendChild(q)}),$},eq=({currentYear:J,currentMonth:$,selectedDate:Q,rangeEndDate:q,minDate:Z,maxDate:j,prefix:K,emit:Y})=>{let G=E({tag:"div",className:`${K}-datepicker-days`});return V4(J,$,Q,q,Z,j).forEach((W)=>{let X=[`${K}-datepicker-day`,W.isCurrentMonth?"":H4,W.isToday?F4:"",W.isSelected?V$:"",W.isDisabled?"disabled":"",W.isRangeStart?M4:"",W.isRangeEnd?k4:"",W.isRangeMiddle?N4:""].filter(Boolean).join(" "),U=E({tag:"button",className:X,text:W.day.toString(),attributes:{type:"button","aria-label":W.date.toLocaleDateString(),"aria-selected":W.isSelected?"true":"false","aria-disabled":W.isDisabled?"true":"false","data-date":W.date.toISOString(),disabled:W.isDisabled}});U.addEventListener("click",(_)=>{if(_.stopPropagation(),!W.isDisabled)Y("dateSelected",{date:W.date})}),G.appendChild(U)}),G},$3=({currentMonth:J,prefix:$,emit:Q})=>{let q=E({tag:"div",className:`${$}-datepicker-months`});return L$.forEach((Z,j)=>{let K=j===J,Y=E({tag:"button",className:`${$}-datepicker-month ${K?V$:""}`,text:Z,attributes:{type:"button","aria-selected":K?"true":"false","data-month":j.toString()}});Y.addEventListener("click",(G)=>{G.stopPropagation(),Q("monthSelected",{month:j})}),q.appendChild(Y)}),q},J3=({currentYear:J,prefix:$,emit:Q})=>{let q=E({tag:"div",className:`${$}-datepicker-years`});return _4(J,10).forEach((j)=>{let K=j===J,Y=E({tag:"button",className:`${$}-datepicker-year ${K?V$:""}`,text:j.toString(),attributes:{type:"button","aria-selected":K?"true":"false","data-year":j.toString()}});Y.addEventListener("click",(G)=>{G.stopPropagation(),Q("yearSelected",{year:j})}),q.appendChild(Y)}),q},Q3=({prefix:J,emit:$})=>{let Q=E({tag:"div",className:`${J}-datepicker-footer`}),q=E({tag:"button",className:`${J}-datepicker-cancel ${J}-button ${J}-button--text`,text:"Cancel",attributes:{type:"button"}}),Z=E({tag:"button",className:`${J}-datepicker-ok ${J}-button ${J}-button--text`,text:"OK",attributes:{type:"button"}});return q.addEventListener("click",(j)=>{j.stopPropagation(),$("cancel")}),Z.addEventListener("click",(j)=>{j.stopPropagation(),$("confirm")}),Q.appendChild(q),Q.appendChild(Z),Q},w4=(J,$)=>{let{prefix:Q,currentView:q,currentMonth:Z,currentYear:j,selectedDate:K,rangeEndDate:Y,minDate:G,maxDate:z,variant:W}=J,X=E({tag:"div",className:`${Q}-datepicker-calendar-content`}),U=tq({currentMonth:Z,currentYear:j,currentView:q,prefix:Q,emit:$});if(X.appendChild(U),q==="day"){let _=nq(Q);X.appendChild(_);let N=eq({currentYear:j,currentMonth:Z,selectedDate:K,rangeEndDate:Y,minDate:G,maxDate:z,prefix:Q,emit:$});X.appendChild(N)}else if(q==="month"){let _=$3({currentMonth:Z,prefix:Q,emit:$});X.appendChild(_)}else if(q==="year"){let _=J3({currentYear:j,prefix:Q,emit:$});X.appendChild(_)}if(W!=="docked"){let _=Q3({prefix:Q,emit:$});X.appendChild(_)}return X};u6();var q3=(J={})=>{let $=O4(J);try{let Q={isOpen:!1,selectedDate:null,rangeEndDate:null,currentView:$.initialView,currentMonth:new Date().getMonth(),currentYear:new Date().getFullYear(),minDate:$.minDate?y6($.minDate):null,maxDate:$.maxDate?y6($.maxDate):null,dateFormat:$.dateFormat,variant:$.variant,selectionMode:$.selectionMode,closeOnSelect:$.closeOnSelect,prefix:$.prefix||u,calendarElement:null,input:null,updateInputValue(){if(!this.input)return;if(!this.selectedDate){this.input.value="";return}if(this.selectionMode==="range"&&this.rangeEndDate){let K=H9(this.selectedDate,this.dateFormat),Y=H9(this.rangeEndDate,this.dateFormat);this.input.value=`${K} - ${Y}`;return}this.input.value=H9(this.selectedDate,this.dateFormat)},updateCalendar(){if(!this.isOpen||!this.calendarElement)return;this.calendarElement.innerHTML="";let K=w4(this,(Y,G)=>{switch(Y){case"dateSelected":this.handleDateSelection(G.date);break;case"monthSelected":this.currentMonth=G.month,this.currentView="day",this.updateCalendar();break;case"yearSelected":this.currentYear=G.year,this.currentView="month",this.updateCalendar();break;case"viewChange":this.currentView=G.view,this.updateCalendar();break;case"prevMonth":this.prevMonth();break;case"nextMonth":this.nextMonth();break;case"prevYear":this.prevYear();break;case"nextYear":this.nextYear();break;case"prevYearRange":this.currentYear-=20,this.updateCalendar();break;case"nextYearRange":this.currentYear+=20,this.updateCalendar();break;case"cancel":this.isOpen=!1,this.render();break;case"confirm":this.isOpen=!1,this.render();break}});this.calendarElement.appendChild(K)},handleDateSelection(K){if(this.selectionMode==="range")if(!this.selectedDate||this.selectedDate&&this.rangeEndDate)this.selectedDate=K,this.rangeEndDate=null;else{if(K<this.selectedDate)this.rangeEndDate=this.selectedDate,this.selectedDate=K;else this.rangeEndDate=K;if(this.closeOnSelect)this.isOpen=!1}else if(this.selectedDate=K,this.closeOnSelect)this.isOpen=!1;this.updateInputValue(),this.updateCalendar(),q.emit("change",{value:this.selectedDate,rangeEndDate:this.rangeEndDate,formattedValue:this.input.value})},prevMonth(){if(this.currentMonth===0)this.currentMonth=11,this.currentYear--;else this.currentMonth--;this.updateCalendar()},nextMonth(){if(this.currentMonth===11)this.currentMonth=0,this.currentYear++;else this.currentMonth++;this.updateCalendar()},prevYear(){this.currentYear--,this.updateCalendar()},nextYear(){this.currentYear++,this.updateCalendar()},render(){if(this.calendarElement)if(this.isOpen)this.calendarElement.style.display="block",this.updateCalendar(),setTimeout(()=>{this.calendarElement.focus()},10);else this.calendarElement.style.display="none"}};if($.value)if(Array.isArray($.value)&&$.selectionMode==="range"){let K=y6($.value[0]),Y=y6($.value[1]);if(K&&Y)Q.selectedDate=K,Q.rangeEndDate=Y,Q.currentMonth=K.getMonth(),Q.currentYear=K.getFullYear()}else{let K=y6($.value);if(K)Q.selectedDate=K,Q.currentMonth=K.getMonth(),Q.currentYear=K.getFullYear()}let q=I(T,h(),S(P4($)),G6($),v())($),Z=I(T,S(R4($)))($);Q.input=Z.element,q.element.appendChild(Q.input),Q.updateInputValue();let j=y4($);return Q.calendarElement=E({tag:"div",className:j.className,attributes:j.attributes}),Q.calendarElement.style.display="none",q.element.appendChild(Q.calendarElement),Q.input.addEventListener("click",()=>{if(!q.element.classList.contains("disabled"))if(Q.isOpen=!Q.isOpen,Q.render(),Q.isOpen)q.emit("open",{value:Q.selectedDate});else q.emit("close",{value:Q.selectedDate})}),Q.calendarElement.addEventListener("click",(K)=>{K.stopPropagation()}),document.addEventListener("click",(K)=>{if(Q.isOpen&&!q.element.contains(K.target))Q.isOpen=!1,Q.render(),q.emit("close",{value:Q.selectedDate})}),D4(Q,A4(q))(q)}catch(Q){throw console.error("DatePicker creation error:",Q),new Error(`Failed to create DatePicker: ${Q.message}`)}},jJ=q3;n();s();c();m();var Z3={size:"medium",animation:"scale",footerAlignment:"right",open:!1,closeButton:!0,closeOnOverlayClick:!0,closeOnEscape:!0,modal:!0,autofocus:!0,trapFocus:!0,divider:!1,animationDuration:150,buttons:[]},x4=(J={})=>b(Z3,J,"dialog"),T4=(J)=>{return f(J,{tag:"div",attributes:{},className:J.class})},I4=(J)=>{return{tag:"div",attributes:{"aria-modal":J.modal===!1?!1:!0,role:"dialog",tabindex:-1},className:""}},S4=(J)=>({visibility:{open:()=>J.visibility.open(),close:()=>J.visibility.close(),toggle:($)=>J.visibility.toggle($),isOpen:()=>J.visibility.isOpen()},content:{setTitle:($)=>J.content.setTitle($),getTitle:()=>J.content.getTitle(),setSubtitle:($)=>J.content.setSubtitle($),getSubtitle:()=>J.content.getSubtitle(),setContent:($)=>J.content.setContent($),getContent:()=>J.content.getContent(),getHeaderElement:()=>J.content.getHeaderElement(),getContentElement:()=>J.content.getContentElement(),getFooterElement:()=>J.content.getFooterElement()},buttons:{addButton:($)=>J.buttons.addButton($),removeButton:($)=>J.buttons.removeButton($),getButtons:()=>J.buttons.getButtons(),setFooterAlignment:($)=>J.buttons.setFooterAlignment($)},focus:{trapFocus:()=>J.focus.trapFocus(),releaseFocus:()=>J.focus.releaseFocus()},size:{setSize:($)=>J.size.setSize($)},divider:{toggleDivider:($)=>J.divider.toggleDivider($),hasDivider:()=>J.divider.hasDivider()},events:{on:($,Q)=>J.on($,Q),off:($,Q)=>J.off($,Q),trigger:($,Q)=>J.emit($,Q)},lifecycle:{destroy:()=>J.lifecycle.destroy()}});w9();n();m();var j3={orientation:"horizontal",variant:"full-width",thickness:1},b4=(J={})=>{return b(j3,J,"divider")};var v4=(J)=>($)=>{let Q=J.orientation||"horizontal";$.element.classList.add(`${$.getClass("divider")}--${Q}`);let q=J.thickness||1;if(Q==="horizontal")$.element.style.height=`${q}px`,$.element.style.width="100%";else $.element.style.width=`${q}px`,$.element.style.height="100%";return{...$,getOrientation(){return Q},setOrientation(Z){if($.element.classList.remove(`${$.getClass("divider")}--${Q}`),$.element.classList.add(`${$.getClass("divider")}--${Z}`),Z==="horizontal")$.element.style.height=`${q}px`,$.element.style.width="100%",$.element.style.marginTop="",$.element.style.marginBottom="";else $.element.style.width=`${q}px`,$.element.style.height="100%",$.element.style.marginLeft="",$.element.style.marginRight="";return this}}},C4=(J)=>($)=>{let Q=J.variant||"full-width",q=J.orientation||"horizontal";if(Q==="inset"||Q==="middle-inset")if(q==="horizontal"){let Z=J.insetStart!==void 0?J.insetStart:16,j=J.insetEnd!==void 0?J.insetEnd:Q==="middle-inset"?16:0;$.element.style.marginLeft=`${Z}px`,$.element.style.marginRight=`${j}px`}else{let Z=J.insetStart!==void 0?J.insetStart:16,j=J.insetEnd!==void 0?J.insetEnd:Q==="middle-inset"?16:0;$.element.style.marginTop=`${Z}px`,$.element.style.marginBottom=`${j}px`}return{...$,getVariant(){return Q},setVariant(Z){$.element.classList.remove(`${$.getClass("divider")}--${Q}`),$.element.classList.add(`${$.getClass("divider")}--${Z}`);let j=$.getOrientation?$.getOrientation():q;if(Z==="full-width")if(j==="horizontal")$.element.style.marginLeft="",$.element.style.marginRight="";else $.element.style.marginTop="",$.element.style.marginBottom="";else{let K=J.insetStart!==void 0?J.insetStart:16,Y=J.insetEnd!==void 0?J.insetEnd:Z==="middle-inset"?16:0;if(j==="horizontal")$.element.style.marginLeft=`${K}px`,$.element.style.marginRight=`${Y}px`;else $.element.style.marginTop=`${K}px`,$.element.style.marginBottom=`${Y}px`}return this},setInset(Z,j){let K=$.getOrientation?$.getOrientation():q;if(($.getVariant?$.getVariant():Q)!=="full-width")if(K==="horizontal"){if(Z!==void 0)$.element.style.marginLeft=`${Z}px`;if(j!==void 0)$.element.style.marginRight=`${j}px`}else{if(Z!==void 0)$.element.style.marginTop=`${Z}px`;if(j!==void 0)$.element.style.marginBottom=`${j}px`}return this}}},E4=(J)=>($)=>{if(J.color)$.element.style.backgroundColor=J.color;let Q=J.thickness||1,q=J.orientation||"horizontal";if(q==="horizontal")$.element.style.height=`${Q}px`;else $.element.style.width=`${Q}px`;return{...$,setThickness(Z){if(($.getOrientation?$.getOrientation():q)==="horizontal")$.element.style.height=`${Z}px`;else $.element.style.width=`${Z}px`;return this},setColor(Z){return $.element.style.backgroundColor=Z,this}}};var I9=(J={})=>{let $=b4(J);return I(T,S({tag:"hr",componentName:"divider",className:J.class}),v4($),Y6($),C4($),E4($))($)};u9();var c9={OPEN:"open",CLOSE:"close",BEFORE_OPEN:"beforeopen",BEFORE_CLOSE:"beforeclose",AFTER_OPEN:"afteropen",AFTER_CLOSE:"afterclose"},h4=(J)=>($)=>{let Q=I4(J),q=document.createElement(Q.tag||"div");if(q.classList.add($.getClass("dialog-overlay")),Q.attributes&&typeof Q.attributes==="object")Object.entries(Q.attributes).forEach(([k,L])=>{if(k&&typeof k==="string"&&L!==void 0)q.setAttribute(k,String(L))});if(J.zIndex)q.style.zIndex=String(J.zIndex);let Z=()=>{let k=document.createElement("div");k.classList.add($.getClass("dialog-header"));let L=document.createElement("div");if(L.classList.add($.getClass("dialog-header-content")),k.appendChild(L),J.title){let D=document.createElement("h2");D.classList.add($.getClass("dialog-header-title")),D.textContent=J.title,L.appendChild(D)}if(J.subtitle){let D=document.createElement("p");D.classList.add($.getClass("dialog-header-subtitle")),D.textContent=J.subtitle,L.appendChild(D)}if(J.closeButton!==!1){let D=document.createElement("button");D.classList.add($.getClass("dialog-header-close")),D.setAttribute("aria-label","Close dialog"),D.innerHTML=`
|
|
13
|
+
`,$.element.appendChild(Q),$},Q4=(J)=>($)=>{let Q=J.labelPosition||"end",q=`${J.prefix}-checkbox--label-${Q}`;return $.element.classList.add(q),$},q4=(J)=>({disabled:{enable:J.disabled?.enable,disable:J.disabled?.disable},lifecycle:{destroy:J.lifecycle?.destroy},checkable:{check:J.checkable?.check,uncheck:J.checkable?.uncheck,toggle:J.checkable?.toggle,isChecked:J.checkable?.isChecked}});var rq=(J,$)=>{let Q=D9($)(J);if($.indeterminate)Q.input.indeterminate=!0;return Q.setIndeterminate=(q)=>{return Q.input.indeterminate=q,Q.element.classList.toggle(`${$.prefix}-checkbox--indeterminate`,q),Q},Q},lq=(J={})=>{let $=e0(J);try{return I(T,h(),S($4($)),_9($),J4($),d6($),Q4($),(q)=>rq(q,$),G6($),v(),(q)=>n0(q4(q))(q))($)}catch(Q){throw console.error("Checkbox creation error:",Q instanceof Error?Q.message:String(Q)),Error(`Failed to create checkbox: ${Q instanceof Error?Q.message:String(Q)}`)}},i8=lq;var M$={FILLED:"filled",OUTLINED:"outlined"},k$={START:"start",END:"end"},c8={CHECKED:"checked",INDETERMINATE:"indeterminate",DISABLED:"disabled",FOCUSED:"focused"},o8={ROOT:"checkbox",INPUT:"checkbox-input",ICON:"checkbox-icon",LABEL:"checkbox-label"};n();s();c();var Z4=({disabled:J,lifecycle:$})=>(Q)=>{let q=Q.element.classList.contains(`${Q.getClass("chip")}--selected`),Z=Q.element.getAttribute("data-value")||null;return{...Q,element:Q.element,getValue(){let j=Q.element.getAttribute("data-value");if(j!==null)return Z=j,j;if(Z!==null)return Q.element.setAttribute("data-value",Z),Z;let K=Q.element.querySelector(`.${Q.getClass("chip")}-text`);if(K&&K.textContent){let Y=K.textContent;if(Y.includes(" Theme"))Z=Y.replace(" Theme","").toLowerCase();else Z=Y.toLowerCase().replace(/\s+/g,"-");return Q.element.setAttribute("data-value",Z),Z}return null},setValue(j){if(j!==null&&j!==void 0)Z=j,Q.element.setAttribute("data-value",j);else Z=null,Q.element.removeAttribute("data-value");return this},isDisabled(){return Q.element.getAttribute("aria-disabled")==="true"},enable(){return J.enable(),Q.element.classList.remove(`${Q.getClass("chip")}--disabled`),Q.element.setAttribute("aria-disabled","false"),Q.element.setAttribute("tabindex","0"),this},disable(){return J.disable(),Q.element.classList.add(`${Q.getClass("chip")}--disabled`),Q.element.setAttribute("aria-disabled","true"),Q.element.setAttribute("tabindex","-1"),this},setText(j){let K=`.${Q.getClass("chip")}-content`,Y=Q.element.querySelector(K)||Q.element,G=`.${Q.getClass("chip")}-text`,z=Q.element.querySelector(G);if(!z&&j){z=document.createElement("span"),z.className=`${Q.getClass("chip")}-text`;let W=Q.element.querySelector(`.${Q.getClass("chip")}-leading-icon`);if(W)Y.insertBefore(z,W.nextSibling);else Y.insertBefore(z,Y.firstChild)}if(z){if(z.textContent=j||"",!j&&z.parentNode)z.parentNode.removeChild(z)}return this},getText(){let j=Q.element.querySelector(`.${Q.getClass("chip")}-text`);return j?j.textContent||"":""},setIcon(j){return this.setLeadingIcon(j)},getIcon(){let j=Q.element.querySelector(`.${Q.getClass("chip")}-leading-icon`);return j?j.innerHTML:""},setLeadingIcon(j){let K=Q.element.querySelector(`.${Q.getClass("chip")}-content`)||Q.element,Y=`.${Q.getClass("chip")}-leading-icon`,G=Q.element.querySelector(Y);if(!G&&j)G=document.createElement("span"),G.className=`${Q.getClass("chip")}-leading-icon`,K.insertBefore(G,K.firstChild);if(G){if(G.innerHTML=j||"",!j&&G.parentNode)G.parentNode.removeChild(G)}return this},setTrailingIcon(j,K){let Y=Q.element.querySelector(`.${Q.getClass("chip")}-content`)||Q.element,G=`.${Q.getClass("chip")}-trailing-icon`,z=Q.element.querySelector(G);if(!z&&j){if(z=document.createElement("span"),z.className=`${Q.getClass("chip")}-trailing-icon`,Y.appendChild(z),K)z.addEventListener("click",(W)=>{W.stopPropagation(),K(this)})}if(z){if(z.innerHTML=j||"",!j&&z.parentNode)z.parentNode.removeChild(z)}return this},isSelected(){return q},setSelected(j){if(q=!!j,j)Q.element.classList.add(`${Q.getClass("chip")}--selected`),Q.element.setAttribute("aria-selected","true");else Q.element.classList.remove(`${Q.getClass("chip")}--selected`),Q.element.setAttribute("aria-selected","false");return this},toggleSelected(){return this.setSelected(!q)},destroy(){$.destroy()}}};m();var pq={variant:"filled",ripple:!0},j4=(J={})=>b(pq,J,"chip"),K4=(J)=>{let $={role:"button",tabindex:"0"};if(J.disabled===!0)$["aria-disabled"]="true";if(J.selected===!0)$["aria-selected"]="true";else if(J.selected===!1)$["aria-selected"]="false";let Q=[J.class,J.selected?`${J.prefix}-chip--selected`:null];return f(J,{tag:"div",attributes:$,className:Q,forwardEvents:{click:(q)=>q.element.getAttribute("aria-disabled")!=="true",keydown:(q,Z)=>{if(Z.key===" "||Z.key==="Enter")return Z.preventDefault(),q.element.click(),!0;return!1},focus:!0,blur:!0}})},Y4=(J)=>({disabled:{enable:()=>J.disabled?.enable(),disable:()=>J.disabled?.disable()},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}});var sq=(J={})=>{let $=j4(J);try{let Q=I(T,h(),S(K4($)),Y6($),G6($),P6($),v())($),q=document.createElement("div");if(q.className=`${Q.getClass("chip")}-content`,q.style.display="flex",q.style.alignItems="center",q.style.gap="8px",q.style.width="100%",Q.element.appendChild(q),J.leadingIcon||J.icon){let j=document.createElement("span");j.className=`${Q.getClass("chip")}-leading-icon`,j.innerHTML=J.leadingIcon||J.icon||"",q.appendChild(j)}if(J.text){let j=document.createElement("span");j.className=`${Q.getClass("chip")}-text`,j.textContent=J.text,q.appendChild(j)}if(J.trailingIcon){let j=document.createElement("span");if(j.className=`${Q.getClass("chip")}-trailing-icon`,j.innerHTML=J.trailingIcon,J.onTrailingIconClick)j.addEventListener("click",(K)=>{K.stopPropagation(),J.onTrailingIconClick(Q)});q.appendChild(j)}if(J.selected)Q.element.classList.add(`${Q.getClass("chip")}--selected`),Q.element.setAttribute("aria-selected","true");if(J.value)Q.element.setAttribute("data-value",J.value);let Z=Z4(Y4(Q))(Q);if(!Q.element.hasAttribute("data-value")&&J.text)Z.getValue();if(J.variant==="filter"||J.variant==="assist"||J.variant==="suggestion"||J.selectable)Q.element.addEventListener("click",()=>{if(Z.isDisabled())return;let j=Z.isSelected();Z.toggleSelected();let K=Z.isSelected();if(J.onChange&&j!==K)J.onChange(K,Z);if(J.onSelect)J.onSelect(Z)});return Z}catch(Q){throw console.error("Chip creation error:",Q),Error(`Failed to create chip: ${Q.message}`)}},v7=sq;s();c();var t8=(J)=>($)=>{let Q={scrollable:J.scrollable===!0,vertical:J.vertical===!0};return{...$,layout:{setScrollable(q){if(Q.scrollable=q,$.element)if(q)$.element.classList.add(`${$.getClass("chips")}--scrollable`);else $.element.classList.remove(`${$.getClass("chips")}--scrollable`);return this},isScrollable(){return Q.scrollable},setVertical(q){if(Q.vertical=q,$.element)if(q)$.element.classList.add(`${$.getClass("chips")}--vertical`);else $.element.classList.remove(`${$.getClass("chips")}--vertical`);return this},isVertical(){return Q.vertical}}}};var n8=(J)=>($)=>{return{...$,chipInstances:[],onCreated(){if(typeof $.onCreated==="function")$.onCreated();if(Array.isArray(J.chips)&&J.chips.length>0)J.chips.forEach((q)=>{this.chips?.addChip?.(q)})}}};var e8={FILLED:"filled",OUTLINED:"outlined",ELEVATED:"elevated",ASSIST:"assist",FILTER:"filter",INPUT:"input",SUGGESTION:"suggestion"},$J={CHANGE:"change",SELECT:"select",DESELECT:"deselect",REMOVE:"remove"},q9={CHANGE:"change",ADD:"add",REMOVE:"remove"};var JJ=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize chips controller: missing element"),$;let Q={change:[],add:[],remove:[]},q=-1,Z=(L,...D)=>{if(Q[L])Q[L].forEach((B)=>B(...D))},j=(L)=>{if(L.isSelected())L.element.classList.add(`${$.getClass("chip")}--selected`),L.element.setAttribute("aria-selected","true");else L.element.classList.remove(`${$.getClass("chip")}--selected`),L.element.setAttribute("aria-selected","false");if(!J.multiSelect){if($.chipInstances.forEach((V)=>{if(V!==L&&V.isSelected())V.setSelected(!1),V.element.classList.remove(`${$.getClass("chip")}--selected`),V.element.setAttribute("aria-selected","false")}),!L.isSelected()&&X().length===0)L.setSelected(!0),L.element.classList.add(`${$.getClass("chip")}--selected`),L.element.setAttribute("aria-selected","true")}let B=$.chipInstances.filter((V)=>V.isSelected()).map((V)=>V.getValue()),H=L?L.getValue():null;if(typeof J.onChange==="function")J.onChange(B,H);Z(q9.CHANGE,B,H)},K=(L)=>{if($.chipInstances.length===0)return;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," "].includes(L.key))return;if(L.key==="Enter"||L.key===" "){if(q>=0&&q<$.chipInstances.length){L.preventDefault();let D=$.chipInstances[q];if(!D.isDisabled()){if(D.toggleSelected(),D.isSelected())D.element.classList.add(`${$.getClass("chip")}--selected`),D.element.setAttribute("aria-selected","true");else D.element.classList.remove(`${$.getClass("chip")}--selected`),D.element.setAttribute("aria-selected","false");j(D)}return}}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(L.key)){L.preventDefault();let D=$.layout&&$.layout.isVertical(),B=q;if(q===-1)B=0;else if(D&&L.key==="ArrowUp"||!D&&L.key==="ArrowLeft")B=Math.max(0,q-1);else if(D&&L.key==="ArrowDown"||!D&&L.key==="ArrowRight")B=Math.min($.chipInstances.length-1,q+1);if(B!==q){if(q>=0&&q<$.chipInstances.length)$.chipInstances[q].element.blur();if(q=B,$.chipInstances[q].element.focus(),$.layout&&$.layout.isScrollable())Y(q)}}},Y=(L)=>{if(!($.layout&&$.layout.isScrollable()))return;let B=typeof L==="number"?L:$.chipInstances.indexOf(L);if(B>=0&&B<$.chipInstances.length){let H=$.chipInstances[B].element,V=$.chipContainer||$.element,O=V.getBoundingClientRect(),M=H.getBoundingClientRect();if($.layout&&$.layout.isVertical()){let R=H.offsetTop-V.offsetTop-O.height/2+M.height/2;V.scrollTo({top:Math.max(0,R),behavior:"smooth"})}else{let R=H.offsetLeft-V.offsetLeft-O.width/2+M.width/2;V.scrollTo({left:Math.max(0,R),behavior:"smooth"})}}},G=(L)=>{let D=v7({...L,onSelect:L.onSelect}),B=$.chipContainer||$.element,H=document.createDocumentFragment();return H.appendChild(D.element),B.appendChild(H),$.chipInstances.push(D),D.element.addEventListener("click",()=>{if(!D.isDisabled()){if(D.toggleSelected(),D.isSelected())D.element.classList.add(`${$.getClass("chip")}--selected`),D.element.setAttribute("aria-selected","true");else D.element.classList.remove(`${$.getClass("chip")}--selected`),D.element.setAttribute("aria-selected","false");j(D),q=$.chipInstances.indexOf(D)}}),D.element.addEventListener("keydown",K),Z(q9.ADD,D),D},z=(L)=>{let D=typeof L==="number"?L:$.chipInstances.indexOf(L);if(D>=0&&D<$.chipInstances.length){let B=$.chipInstances[D];if(Z(q9.REMOVE,B),B.destroy(),$.chipInstances.splice(D,1),D===q)q=-1;else if(D<q)q--}},W=()=>{return[...$.chipInstances]},X=()=>{return $.chipInstances.filter((L)=>L.isSelected())},U=()=>{return X().map((L)=>L.getValue())},_=(L,D=!0,B=!J.multiSelect)=>{let H=Array.isArray(L)?L:[L],V=!1;if(B)$.chipInstances.forEach((O)=>{if(!H.includes(O.getValue())&&O.isSelected())O.setSelected(!1),O.element.classList.remove(`${$.getClass("chip")}--selected`),O.element.setAttribute("aria-selected","false"),V=!0});if($.chipInstances.forEach((O)=>{if(H.includes(O.getValue())&&!O.isSelected())O.setSelected(!0),O.element.classList.add(`${$.getClass("chip")}--selected`),O.element.setAttribute("aria-selected","true"),V=!0}),V&&D){let O=U();Z(q9.CHANGE,O,null)}},N=(L=!0)=>{let B=U().length>0;if($.chipInstances.forEach((H)=>{H.setSelected(!1),H.element.classList.remove(`${$.getClass("chip")}--selected`),H.element.setAttribute("aria-selected","false")}),B&&L)Z(q9.CHANGE,[],null)},F=()=>{$.chipInstances.forEach((L)=>{L.element.addEventListener("keydown",K)})},k=()=>{$.chipInstances.forEach((L)=>{L.element.removeEventListener("keydown",K)})};if(F(),$.element)$.element.addEventListener("keydown",K);if($.lifecycle){let L=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{$.chipInstances.forEach((D)=>{D.element.removeEventListener("keydown",K)}),$.chipInstances.forEach((D)=>D.destroy()),$.chipInstances.length=0,Object.keys(Q).forEach((D)=>{Q[D]=[]}),L()}}return{...$,chips:{addChip:G,removeChip:z,getChips:W,getSelectedChips:X,getSelectedValues:U,selectByValue:_,clearSelection:N,scrollToChip:Y},keyboard:{enable:F,disable:k},on(L,D){if(!Q[L])Q[L]=[];return Q[L].push(D),this},off(L,D){if(Q[L]){let B=Q[L].indexOf(D);if(B!==-1)Q[L].splice(B,1)}return this}}};u6();var QJ=(J)=>($)=>{let Q=(Y)=>$.getClass(Y),q=J.label&&J.label.trim().length>0,Z=J.labelPosition||"start",j;if(q)j=E({tag:"label",className:Q("chips-label"),text:J.label,container:$.element});let K=E({tag:"div",className:Q("chips-container"),container:$.element});return{...$,chipContainer:K,label:j,getChipContainer:()=>K,getLabel:()=>j||null}};var G4=(J)=>($)=>{return{...$,element:$.element,addChip(Q){if(J.chips&&typeof J.chips.addChip==="function")J.chips.addChip(Q);return this},removeChip(Q){if(J.chips&&typeof J.chips.removeChip==="function")J.chips.removeChip(Q);return this},getChips(){if(J.chips&&typeof J.chips.getChips==="function")return J.chips.getChips();return[]},getSelectedChips(){if(J.chips&&typeof J.chips.getSelectedChips==="function")return J.chips.getSelectedChips();return[]},getSelectedValues(){if(J.chips&&typeof J.chips.getSelectedValues==="function")return J.chips.getSelectedValues();return[]},selectByValue(Q,q=!0){if(J.chips&&typeof J.chips.selectByValue==="function")J.chips.selectByValue(Q,q);return this},clearSelection(){if(J.chips&&typeof J.chips.clearSelection==="function")J.chips.clearSelection();return this},setScrollable(Q){if(J.layout&&typeof J.layout.setScrollable==="function")J.layout.setScrollable(Q);return this},setVertical(Q){if(J.layout&&typeof J.layout.setVertical==="function")J.layout.setVertical(Q);return this},setLabel(Q){if(J.label&&typeof J.label.setText==="function")J.label.setText(Q);return this},getLabel(){if(J.label&&typeof J.label.getText==="function")return J.label.getText();return""},setLabelPosition(Q){if(J.label&&typeof J.label.setPosition==="function")J.label.setPosition(Q);return this},getLabelPosition(){if(J.label&&typeof J.label.getPosition==="function")return J.label.getPosition();return"start"},scrollToChip(Q){if(J.chips&&typeof J.chips.scrollToChip==="function")J.chips.scrollToChip(Q);return this},enableKeyboardNavigation(){if(J.keyboard&&typeof J.keyboard.enableKeyboardNavigation==="function")J.keyboard.enableKeyboardNavigation();return this},on(Q,q){if(J.events&&typeof J.events.on==="function")J.events.on(Q,q);return this},off(Q,q){if(J.events&&typeof J.events.off==="function")J.events.off(Q,q);return this},destroy(){if(J.lifecycle&&typeof J.lifecycle.destroy==="function")J.lifecycle.destroy()}}};m();var mq={chips:[],scrollable:!1,vertical:!1,multiSelect:!1,onChange:null,selector:null,labelPosition:"start"},z4=(J={})=>{return b(mq,J,"chips")},W4=(J)=>{let $=J.scrollable===!0,Q=J.vertical===!0,q=J.multiSelect===!0,Z=J.label&&J.label.trim().length>0,j=J.labelPosition||"start",K=["chips",J.class,$?"chips--scrollable":"",Q?"chips--vertical":"",Z?"chips--with-label":"",Z&&j==="end"?"chips--label-end":""].filter(Boolean).join(" ");return f(J,{tag:"div",attributes:{role:"group","aria-multiselectable":q?"true":"false"},className:K})},U4=(J)=>({chips:{addChip:function($){if(J.chips&&typeof J.chips.addChip==="function")return J.chips.addChip($);return null},removeChip:($)=>J.chips?.removeChip?.($),getChips:()=>J.chips?.getChips?.()??[],getSelectedChips:()=>J.chips?.getSelectedChips?.()??[],getSelectedValues:()=>J.chips?.getSelectedValues?.()??[],selectByValue:($)=>J.chips?.selectByValue?.($),clearSelection:()=>J.chips?.clearSelection?.(),scrollToChip:($)=>J.chips?.scrollToChip?.($)},layout:{setScrollable:($)=>J.layout?.setScrollable?.($),isScrollable:()=>J.layout?.isScrollable?.()??!1,setVertical:($)=>J.layout?.setVertical?.($),isVertical:()=>J.layout?.isVertical?.()??!1},label:{setText:($)=>J.label?.setText?.($),getText:()=>J.label?.getText?.()??"",setPosition:($)=>J.label?.setPosition?.($),getPosition:()=>J.label?.getPosition?.()??"start"},keyboard:{enableKeyboardNavigation:()=>J.keyboard?.enable?.(),disableKeyboardNavigation:()=>J.keyboard?.disable?.()},events:{on:($,Q)=>J.on?.($,Q),off:($,Q)=>J.off?.($,Q)},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}});var aq=(J={})=>{let $=z4(J);try{let Q=I(T,h(),S(W4($)),t8($),n8($),QJ($),JJ($),v())($),q=U4(Q),Z=G4(q)(Q);if($.on&&typeof Z.on==="function")Object.entries($.on).forEach(([j,K])=>{if(typeof K==="function")Z.on(j,K)});return Z}catch(Q){throw console.error("Chips creation error:",Q),Error(`Failed to create chip: ${Q.message}`)}},X4=aq;w6();n();s();c();var B4=["S","M","T","W","T","F","S"],N$=["January","February","March","April","May","June","July","August","September","October","November","December"],L$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qJ="MM/DD/YYYY",F4="today",V$="selected",H4="outside-month",M4="range-start",k4="range-end",N4="range-middle";var y6=(J)=>{if(!J)return null;if(J instanceof Date)return isNaN(J.getTime())?null:J;if(typeof J==="string"){let $=new Date(J);return isNaN($.getTime())?null:$}return null},H9=(J,$="MM/DD/YYYY")=>{if(!J||!(J instanceof Date)||isNaN(J.getTime()))return"";let Q="",q=0;while(q<$.length)if($.substring(q,q+4)==="MMMM")Q+=N$[J.getMonth()],q+=4;else if($.substring(q,q+3)==="MMM")Q+=L$[J.getMonth()],q+=3;else if($.substring(q,q+2)==="MM")Q+=(J.getMonth()+1).toString().padStart(2,"0"),q+=2;else if($.substring(q,q+1)==="M")Q+=J.getMonth()+1,q+=1;else if($.substring(q,q+4)==="YYYY")Q+=J.getFullYear(),q+=4;else if($.substring(q,q+2)==="YY")Q+=J.getFullYear().toString().slice(-2),q+=2;else if($.substring(q,q+2)==="DD")Q+=J.getDate().toString().padStart(2,"0"),q+=2;else if($.substring(q,q+1)==="D")Q+=J.getDate(),q+=1;else Q+=$[q],q+=1;return Q},L4=(J,$)=>{return new Date(J,$+1,0).getDate()},iq=(J,$)=>{return new Date(J,$,1).getDay()},F9=(J,$)=>{return J.getDate()===$.getDate()&&J.getMonth()===$.getMonth()&&J.getFullYear()===$.getFullYear()},cq=(J,$,Q)=>{let q=J.getTime();return q>=$.getTime()&&q<=Q.getTime()},V4=(J,$,Q=null,q=null,Z=null,j=null)=>{let K=new Date;K.setHours(0,0,0,0);let Y=[],G=iq(J,$),z=L4(J,$-1);for(let _=G-1;_>=0;_--){let N=new Date(J,$-1,z-_),F=Z&&N<Z||j&&N>j;Y.push({date:N,day:N.getDate(),isCurrentMonth:!1,isToday:F9(N,K),isSelected:Q?F9(N,Q):!1,isDisabled:F})}let W=L4(J,$);for(let _=1;_<=W;_++){let N=new Date(J,$,_),F=Q?F9(N,Q):!1,k=Z&&N<Z||j&&N>j,L={date:N,day:_,isCurrentMonth:!0,isToday:F9(N,K),isSelected:F,isDisabled:k};if(Q&&q)L.isRangeStart=F9(N,Q),L.isRangeEnd=F9(N,q),L.isRangeMiddle=cq(N,Q,q)&&!L.isRangeStart&&!L.isRangeEnd;Y.push(L)}let U=42-Y.length;for(let _=1;_<=U;_++){let N=new Date(J,$+1,_),F=Z&&N<Z||j&&N>j;Y.push({date:N,day:_,isCurrentMonth:!1,isToday:F9(N,K),isSelected:Q?F9(N,Q):!1,isDisabled:F})}return Y},_4=(J,$=10)=>{let Q=[],q=J-$,Z=J+$;for(let j=q;j<=Z;j++)Q.push(j);return Q};var ZJ=(J,$)=>{let Q=new Date(J);return Q.setMonth(Q.getMonth()+$),Q};var D4=(J,{disabled:$,lifecycle:Q,events:q})=>(Z)=>{let j={goToDate(K){let Y=y6(K);if(!Y)return;J.currentMonth=Y.getMonth(),J.currentYear=Y.getFullYear(),J.updateCalendar()},nextMonth(){let K=ZJ(new Date(J.currentYear,J.currentMonth,1),1);J.currentMonth=K.getMonth(),J.currentYear=K.getFullYear(),J.updateCalendar()},prevMonth(){let K=ZJ(new Date(J.currentYear,J.currentMonth,1),-1);J.currentMonth=K.getMonth(),J.currentYear=K.getFullYear(),J.updateCalendar()},nextYear(){J.currentYear+=1,J.updateCalendar()},prevYear(){J.currentYear-=1,J.updateCalendar()},showDayView(){J.currentView="day",J.updateCalendar()},showMonthView(){J.currentView="month",J.updateCalendar()},showYearView(){J.currentView="year",J.updateCalendar()},getCurrentView(){return J.currentView}};return{...Z,element:Z.element,input:J.input,calendar:j,open(){return J.isOpen=!0,J.render(),q.emit("open",{value:this.getValue()}),this},close(){return J.isOpen=!1,J.render(),q.emit("close",{value:this.getValue()}),this},getValue(){if(!J.selectedDate)return null;if(J.selectionMode==="range"&&J.rangeEndDate)return[new Date(J.selectedDate),new Date(J.rangeEndDate)];return new Date(J.selectedDate)},setValue(K){if(Array.isArray(K)&&J.selectionMode==="range"){let G=y6(K[0]),z=y6(K[1]);if(G&&z){if(J.selectedDate=G,J.rangeEndDate=z,G>z)J.selectedDate=z,J.rangeEndDate=G;if(J.updateInputValue(),J.isOpen)J.currentMonth=J.selectedDate.getMonth(),J.currentYear=J.selectedDate.getFullYear(),J.updateCalendar();q.emit("change",{value:this.getValue(),formattedValue:this.getFormattedValue()})}return this}let Y=y6(K);if(Y){if(J.selectedDate=Y,J.rangeEndDate=null,J.updateInputValue(),J.isOpen)J.currentMonth=Y.getMonth(),J.currentYear=Y.getFullYear(),J.updateCalendar();q.emit("change",{value:this.getValue(),formattedValue:this.getFormattedValue()})}return this},getFormattedValue(){if(!J.selectedDate)return"";if(J.selectionMode==="range"&&J.rangeEndDate){let K=H9(J.selectedDate,J.dateFormat),Y=H9(J.rangeEndDate,J.dateFormat);return`${K} - ${Y}`}return H9(J.selectedDate,J.dateFormat)},clear(){if(J.selectedDate=null,J.rangeEndDate=null,J.updateInputValue(),J.isOpen)J.updateCalendar();return q.emit("change",{value:null,formattedValue:""}),this},enable(){return $.enable(),J.input.disabled=!1,this},disable(){return $.disable(),J.input.disabled=!0,this},setMinDate(K){let Y=y6(K);if(Y){if(J.minDate=Y,J.isOpen)J.updateCalendar()}return this},setMaxDate(K){let Y=y6(K);if(Y){if(J.maxDate=Y,J.isOpen)J.updateCalendar()}return this},destroy(){if(document.removeEventListener("click",J.outsideClickHandler),J.calendarElement&&J.calendarElement.parentNode)J.calendarElement.parentNode.removeChild(J.calendarElement);Q.destroy()},on(K,Y){return q.on(K,Y),this},off(K,Y){return q.off(K,Y),this}}};m();var oq={variant:"docked",initialView:"day",selectionMode:"single",dateFormat:qJ,animate:!0},O4=(J={})=>{let $=b(oq,J,"datepicker");if($.closeOnSelect===void 0)$.closeOnSelect=$.variant!=="docked";return $},P4=(J)=>{return f(J,{tag:"div",attributes:{role:"application","aria-label":"Date Picker",tabindex:"-1"},className:[`${J.prefix}-datepicker-container`,J.class],forwardEvents:{keydown:!0,click:!0},interactive:!0})},R4=(J)=>{let $={type:"text",placeholder:J.placeholder||J.dateFormat,autocomplete:"off",readonly:!0};if(J.disabled===!0)$.disabled=!0;return f(J,{tag:"input",attributes:$,className:`${J.prefix}-datepicker-input`,forwardEvents:{focus:!0,blur:!0,click:!0},interactive:!0})},y4=(J)=>{return f(J,{tag:"div",attributes:{role:"dialog","aria-modal":J.variant!=="docked"?"true":"false"},className:[`${J.prefix}-datepicker-calendar`,`${J.prefix}-datepicker-${J.variant}`,J.selectionMode==="range"?`${J.prefix}-datepicker-range`:""],forwardEvents:{keydown:!0,click:!0}})},A4=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable()},lifecycle:{destroy:()=>J.lifecycle.destroy()},events:{on:J.on,off:J.off,emit:J.emit}});u6();var tq=({currentMonth:J,currentYear:$,currentView:Q,prefix:q,emit:Z})=>{let j=E({tag:"div",className:`${q}-datepicker-header`}),K=E({tag:"button",className:`${q}-datepicker-month-selector`,text:N$[J],attributes:{type:"button","aria-label":"Select month"}}),Y=E({tag:"button",className:`${q}-datepicker-year-selector`,text:$.toString(),attributes:{type:"button","aria-label":"Select year"}}),G=E({tag:"div",className:`${q}-datepicker-nav-controls`}),z=E({tag:"button",className:`${q}-datepicker-prev-btn`,html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>',attributes:{type:"button","aria-label":Q==="day"?"Previous month":Q==="month"?"Previous year":"Previous year range"}}),W=E({tag:"button",className:`${q}-datepicker-next-btn`,html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>',attributes:{type:"button","aria-label":Q==="day"?"Next month":Q==="month"?"Next year":"Next year range"}});return K.addEventListener("click",(X)=>{X.stopPropagation(),Z("viewChange",{view:"month"})}),Y.addEventListener("click",(X)=>{X.stopPropagation(),Z("viewChange",{view:"year"})}),z.addEventListener("click",(X)=>{if(X.stopPropagation(),Q==="day")Z("prevMonth");else if(Q==="month")Z("prevYear");else Z("prevYearRange")}),W.addEventListener("click",(X)=>{if(X.stopPropagation(),Q==="day")Z("nextMonth");else if(Q==="month")Z("nextYear");else Z("nextYearRange")}),j.appendChild(K),j.appendChild(Y),G.appendChild(z),G.appendChild(W),j.appendChild(G),j},nq=(J)=>{let $=E({tag:"div",className:`${J}-datepicker-weekdays`});return B4.forEach((Q)=>{let q=E({tag:"span",className:`${J}-datepicker-weekday`,text:Q});$.appendChild(q)}),$},eq=({currentYear:J,currentMonth:$,selectedDate:Q,rangeEndDate:q,minDate:Z,maxDate:j,prefix:K,emit:Y})=>{let G=E({tag:"div",className:`${K}-datepicker-days`});return V4(J,$,Q,q,Z,j).forEach((W)=>{let X=[`${K}-datepicker-day`,W.isCurrentMonth?"":H4,W.isToday?F4:"",W.isSelected?V$:"",W.isDisabled?"disabled":"",W.isRangeStart?M4:"",W.isRangeEnd?k4:"",W.isRangeMiddle?N4:""].filter(Boolean).join(" "),U=E({tag:"button",className:X,text:W.day.toString(),attributes:{type:"button","aria-label":W.date.toLocaleDateString(),"aria-selected":W.isSelected?"true":"false","aria-disabled":W.isDisabled?"true":"false","data-date":W.date.toISOString(),disabled:W.isDisabled}});U.addEventListener("click",(_)=>{if(_.stopPropagation(),!W.isDisabled)Y("dateSelected",{date:W.date})}),G.appendChild(U)}),G},$3=({currentMonth:J,prefix:$,emit:Q})=>{let q=E({tag:"div",className:`${$}-datepicker-months`});return L$.forEach((Z,j)=>{let K=j===J,Y=E({tag:"button",className:`${$}-datepicker-month ${K?V$:""}`,text:Z,attributes:{type:"button","aria-selected":K?"true":"false","data-month":j.toString()}});Y.addEventListener("click",(G)=>{G.stopPropagation(),Q("monthSelected",{month:j})}),q.appendChild(Y)}),q},J3=({currentYear:J,prefix:$,emit:Q})=>{let q=E({tag:"div",className:`${$}-datepicker-years`});return _4(J,10).forEach((j)=>{let K=j===J,Y=E({tag:"button",className:`${$}-datepicker-year ${K?V$:""}`,text:j.toString(),attributes:{type:"button","aria-selected":K?"true":"false","data-year":j.toString()}});Y.addEventListener("click",(G)=>{G.stopPropagation(),Q("yearSelected",{year:j})}),q.appendChild(Y)}),q},Q3=({prefix:J,emit:$})=>{let Q=E({tag:"div",className:`${J}-datepicker-footer`}),q=E({tag:"button",className:`${J}-datepicker-cancel ${J}-button ${J}-button--text`,text:"Cancel",attributes:{type:"button"}}),Z=E({tag:"button",className:`${J}-datepicker-ok ${J}-button ${J}-button--text`,text:"OK",attributes:{type:"button"}});return q.addEventListener("click",(j)=>{j.stopPropagation(),$("cancel")}),Z.addEventListener("click",(j)=>{j.stopPropagation(),$("confirm")}),Q.appendChild(q),Q.appendChild(Z),Q},w4=(J,$)=>{let{prefix:Q,currentView:q,currentMonth:Z,currentYear:j,selectedDate:K,rangeEndDate:Y,minDate:G,maxDate:z,variant:W}=J,X=E({tag:"div",className:`${Q}-datepicker-calendar-content`}),U=tq({currentMonth:Z,currentYear:j,currentView:q,prefix:Q,emit:$});if(X.appendChild(U),q==="day"){let _=nq(Q);X.appendChild(_);let N=eq({currentYear:j,currentMonth:Z,selectedDate:K,rangeEndDate:Y,minDate:G,maxDate:z,prefix:Q,emit:$});X.appendChild(N)}else if(q==="month"){let _=$3({currentMonth:Z,prefix:Q,emit:$});X.appendChild(_)}else if(q==="year"){let _=J3({currentYear:j,prefix:Q,emit:$});X.appendChild(_)}if(W!=="docked"){let _=Q3({prefix:Q,emit:$});X.appendChild(_)}return X};u6();var q3=(J={})=>{let $=O4(J);try{let Q={isOpen:!1,selectedDate:null,rangeEndDate:null,currentView:$.initialView,currentMonth:new Date().getMonth(),currentYear:new Date().getFullYear(),minDate:$.minDate?y6($.minDate):null,maxDate:$.maxDate?y6($.maxDate):null,dateFormat:$.dateFormat,variant:$.variant,selectionMode:$.selectionMode,closeOnSelect:$.closeOnSelect,prefix:$.prefix||u,calendarElement:null,input:null,updateInputValue(){if(!this.input)return;if(!this.selectedDate){this.input.value="";return}if(this.selectionMode==="range"&&this.rangeEndDate){let K=H9(this.selectedDate,this.dateFormat),Y=H9(this.rangeEndDate,this.dateFormat);this.input.value=`${K} - ${Y}`;return}this.input.value=H9(this.selectedDate,this.dateFormat)},updateCalendar(){if(!this.isOpen||!this.calendarElement)return;this.calendarElement.innerHTML="";let K=w4(this,(Y,G)=>{switch(Y){case"dateSelected":this.handleDateSelection(G.date);break;case"monthSelected":this.currentMonth=G.month,this.currentView="day",this.updateCalendar();break;case"yearSelected":this.currentYear=G.year,this.currentView="month",this.updateCalendar();break;case"viewChange":this.currentView=G.view,this.updateCalendar();break;case"prevMonth":this.prevMonth();break;case"nextMonth":this.nextMonth();break;case"prevYear":this.prevYear();break;case"nextYear":this.nextYear();break;case"prevYearRange":this.currentYear-=20,this.updateCalendar();break;case"nextYearRange":this.currentYear+=20,this.updateCalendar();break;case"cancel":this.isOpen=!1,this.render();break;case"confirm":this.isOpen=!1,this.render();break}});this.calendarElement.appendChild(K)},handleDateSelection(K){if(this.selectionMode==="range")if(!this.selectedDate||this.selectedDate&&this.rangeEndDate)this.selectedDate=K,this.rangeEndDate=null;else{if(K<this.selectedDate)this.rangeEndDate=this.selectedDate,this.selectedDate=K;else this.rangeEndDate=K;if(this.closeOnSelect)this.isOpen=!1}else if(this.selectedDate=K,this.closeOnSelect)this.isOpen=!1;this.updateInputValue(),this.updateCalendar(),q.emit("change",{value:this.selectedDate,rangeEndDate:this.rangeEndDate,formattedValue:this.input.value})},prevMonth(){if(this.currentMonth===0)this.currentMonth=11,this.currentYear--;else this.currentMonth--;this.updateCalendar()},nextMonth(){if(this.currentMonth===11)this.currentMonth=0,this.currentYear++;else this.currentMonth++;this.updateCalendar()},prevYear(){this.currentYear--,this.updateCalendar()},nextYear(){this.currentYear++,this.updateCalendar()},render(){if(this.calendarElement)if(this.isOpen)this.calendarElement.style.display="block",this.updateCalendar(),setTimeout(()=>{this.calendarElement.focus()},10);else this.calendarElement.style.display="none"}};if($.value)if(Array.isArray($.value)&&$.selectionMode==="range"){let K=y6($.value[0]),Y=y6($.value[1]);if(K&&Y)Q.selectedDate=K,Q.rangeEndDate=Y,Q.currentMonth=K.getMonth(),Q.currentYear=K.getFullYear()}else{let K=y6($.value);if(K)Q.selectedDate=K,Q.currentMonth=K.getMonth(),Q.currentYear=K.getFullYear()}let q=I(T,h(),S(P4($)),G6($),v())($),Z=I(T,S(R4($)))($);Q.input=Z.element,q.element.appendChild(Q.input),Q.updateInputValue();let j=y4($);return Q.calendarElement=E({tag:"div",className:j.className,attributes:j.attributes}),Q.calendarElement.style.display="none",q.element.appendChild(Q.calendarElement),Q.input.addEventListener("click",()=>{if(!q.element.classList.contains("disabled"))if(Q.isOpen=!Q.isOpen,Q.render(),Q.isOpen)q.emit("open",{value:Q.selectedDate});else q.emit("close",{value:Q.selectedDate})}),Q.calendarElement.addEventListener("click",(K)=>{K.stopPropagation()}),document.addEventListener("click",(K)=>{if(Q.isOpen&&!q.element.contains(K.target))Q.isOpen=!1,Q.render(),q.emit("close",{value:Q.selectedDate})}),D4(Q,A4(q))(q)}catch(Q){throw console.error("DatePicker creation error:",Q),Error(`Failed to create DatePicker: ${Q.message}`)}},jJ=q3;n();s();c();m();var Z3={size:"medium",animation:"scale",footerAlignment:"right",open:!1,closeButton:!0,closeOnOverlayClick:!0,closeOnEscape:!0,modal:!0,autofocus:!0,trapFocus:!0,divider:!1,animationDuration:150,buttons:[]},x4=(J={})=>b(Z3,J,"dialog"),T4=(J)=>{return f(J,{tag:"div",attributes:{},className:J.class})},I4=(J)=>{return{tag:"div",attributes:{"aria-modal":J.modal===!1?!1:!0,role:"dialog",tabindex:-1},className:""}},S4=(J)=>({visibility:{open:()=>J.visibility.open(),close:()=>J.visibility.close(),toggle:($)=>J.visibility.toggle($),isOpen:()=>J.visibility.isOpen()},content:{setTitle:($)=>J.content.setTitle($),getTitle:()=>J.content.getTitle(),setSubtitle:($)=>J.content.setSubtitle($),getSubtitle:()=>J.content.getSubtitle(),setContent:($)=>J.content.setContent($),getContent:()=>J.content.getContent(),getHeaderElement:()=>J.content.getHeaderElement(),getContentElement:()=>J.content.getContentElement(),getFooterElement:()=>J.content.getFooterElement()},buttons:{addButton:($)=>J.buttons.addButton($),removeButton:($)=>J.buttons.removeButton($),getButtons:()=>J.buttons.getButtons(),setFooterAlignment:($)=>J.buttons.setFooterAlignment($)},focus:{trapFocus:()=>J.focus.trapFocus(),releaseFocus:()=>J.focus.releaseFocus()},size:{setSize:($)=>J.size.setSize($)},divider:{toggleDivider:($)=>J.divider.toggleDivider($),hasDivider:()=>J.divider.hasDivider()},events:{on:($,Q)=>J.on($,Q),off:($,Q)=>J.off($,Q),trigger:($,Q)=>J.emit($,Q)},lifecycle:{destroy:()=>J.lifecycle.destroy()}});w9();n();m();var j3={orientation:"horizontal",variant:"full-width",thickness:1},b4=(J={})=>{return b(j3,J,"divider")};var v4=(J)=>($)=>{let Q=J.orientation||"horizontal";$.element.classList.add(`${$.getClass("divider")}--${Q}`);let q=J.thickness||1;if(Q==="horizontal")$.element.style.height=`${q}px`,$.element.style.width="100%";else $.element.style.width=`${q}px`,$.element.style.height="100%";return{...$,getOrientation(){return Q},setOrientation(Z){if($.element.classList.remove(`${$.getClass("divider")}--${Q}`),$.element.classList.add(`${$.getClass("divider")}--${Z}`),Z==="horizontal")$.element.style.height=`${q}px`,$.element.style.width="100%",$.element.style.marginTop="",$.element.style.marginBottom="";else $.element.style.width=`${q}px`,$.element.style.height="100%",$.element.style.marginLeft="",$.element.style.marginRight="";return this}}},C4=(J)=>($)=>{let Q=J.variant||"full-width",q=J.orientation||"horizontal";if(Q==="inset"||Q==="middle-inset")if(q==="horizontal"){let Z=J.insetStart!==void 0?J.insetStart:16,j=J.insetEnd!==void 0?J.insetEnd:Q==="middle-inset"?16:0;$.element.style.marginLeft=`${Z}px`,$.element.style.marginRight=`${j}px`}else{let Z=J.insetStart!==void 0?J.insetStart:16,j=J.insetEnd!==void 0?J.insetEnd:Q==="middle-inset"?16:0;$.element.style.marginTop=`${Z}px`,$.element.style.marginBottom=`${j}px`}return{...$,getVariant(){return Q},setVariant(Z){$.element.classList.remove(`${$.getClass("divider")}--${Q}`),$.element.classList.add(`${$.getClass("divider")}--${Z}`);let j=$.getOrientation?$.getOrientation():q;if(Z==="full-width")if(j==="horizontal")$.element.style.marginLeft="",$.element.style.marginRight="";else $.element.style.marginTop="",$.element.style.marginBottom="";else{let K=J.insetStart!==void 0?J.insetStart:16,Y=J.insetEnd!==void 0?J.insetEnd:Z==="middle-inset"?16:0;if(j==="horizontal")$.element.style.marginLeft=`${K}px`,$.element.style.marginRight=`${Y}px`;else $.element.style.marginTop=`${K}px`,$.element.style.marginBottom=`${Y}px`}return this},setInset(Z,j){let K=$.getOrientation?$.getOrientation():q;if(($.getVariant?$.getVariant():Q)!=="full-width")if(K==="horizontal"){if(Z!==void 0)$.element.style.marginLeft=`${Z}px`;if(j!==void 0)$.element.style.marginRight=`${j}px`}else{if(Z!==void 0)$.element.style.marginTop=`${Z}px`;if(j!==void 0)$.element.style.marginBottom=`${j}px`}return this}}},E4=(J)=>($)=>{if(J.color)$.element.style.backgroundColor=J.color;let Q=J.thickness||1,q=J.orientation||"horizontal";if(q==="horizontal")$.element.style.height=`${Q}px`;else $.element.style.width=`${Q}px`;return{...$,setThickness(Z){if(($.getOrientation?$.getOrientation():q)==="horizontal")$.element.style.height=`${Z}px`;else $.element.style.width=`${Z}px`;return this},setColor(Z){return $.element.style.backgroundColor=Z,this}}};var I9=(J={})=>{let $=b4(J);return I(T,S({tag:"hr",componentName:"divider",className:J.class}),v4($),Y6($),C4($),E4($))($)};u9();var c9={OPEN:"open",CLOSE:"close",BEFORE_OPEN:"beforeopen",BEFORE_CLOSE:"beforeclose",AFTER_OPEN:"afteropen",AFTER_CLOSE:"afterclose"},h4=(J)=>($)=>{let Q=I4(J),q=document.createElement(Q.tag||"div");if(q.classList.add($.getClass("dialog-overlay")),Q.attributes&&typeof Q.attributes==="object")Object.entries(Q.attributes).forEach(([k,L])=>{if(k&&typeof k==="string"&&L!==void 0)q.setAttribute(k,String(L))});if(J.zIndex)q.style.zIndex=String(J.zIndex);let Z=()=>{let k=document.createElement("div");k.classList.add($.getClass("dialog-header"));let L=document.createElement("div");if(L.classList.add($.getClass("dialog-header-content")),k.appendChild(L),J.title){let D=document.createElement("h2");D.classList.add($.getClass("dialog-header-title")),D.textContent=J.title,L.appendChild(D)}if(J.subtitle){let D=document.createElement("p");D.classList.add($.getClass("dialog-header-subtitle")),D.textContent=J.subtitle,L.appendChild(D)}if(J.closeButton!==!1){let D=document.createElement("button");D.classList.add($.getClass("dialog-header-close")),D.setAttribute("aria-label","Close dialog"),D.innerHTML=`
|
|
14
14
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
15
15
|
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
16
16
|
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
17
17
|
</svg>
|
|
18
|
-
`,D.addEventListener("click",(B)=>{if(B.preventDefault(),B.stopPropagation(),$&&$.emit)$.emit("dialog:close",{source:"closeButton"})}),k.appendChild(D)}return k},j=()=>{let k=document.createElement("div");if(k.classList.add($.getClass("dialog-content")),J.content)k.innerHTML=J.content;return k},K=()=>{let k=document.createElement("div");k.classList.add($.getClass("dialog-footer"));let L=J.footerAlignment||"right";if(L!=="right")p(k,`${$.getClass("dialog-footer")}--${L}`);if(Array.isArray(J.buttons)&&J.buttons.length>0)J.buttons.forEach((D)=>f4(k,D,$));return k},Y=()=>{return I9({variant:"full-width",class:$.getClass("dialog-divider")})},G=Z(),z=j(),W=Array.isArray(J.buttons)&&J.buttons.length>0?K():null;p($.element,$.getClass("dialog"));let X=J.size||"medium";if(X!=="medium")p($.element,`${$.getClass("dialog")}--${X}`);let U=J.animation||"scale";if(U!=="scale")p($.element,`${$.getClass("dialog")}--${U}`);$.element.appendChild(G);let _=null,N=null;if(J.divider){if(_=Y(),_.element.classList.add($.getClass("dialog-header-divider")),$.element.appendChild(_.element),W)N=Y(),N.element.classList.add($.getClass("dialog-footer-divider"))}if($.element.appendChild(z),N)$.element.appendChild(N.element);if(W)$.element.appendChild(W);q.appendChild($.element);let F=J.container||document.body;return F.appendChild(q),{...$,overlay:q,structure:{header:G,content:z,footer:W,headerDivider:_,footerDivider:N,container:F}}},u4=()=>(J)=>{return{...J,divider:{toggleDivider($){if($&&!J.structure.headerDivider){let Q=I9({variant:"full-width",class:`${J.getClass("dialog-divider")} ${J.getClass("dialog-header-divider")}`});if(J.element.insertBefore(Q.element,J.structure.content),J.structure.headerDivider=Q,J.structure.footer&&!J.structure.footerDivider){let q=I9({variant:"full-width",class:`${J.getClass("dialog-divider")} ${J.getClass("dialog-footer-divider")}`});J.element.insertBefore(q.element,J.structure.footer),J.structure.footerDivider=q}}else if(!$){if(J.structure.headerDivider)J.structure.headerDivider.element.remove(),J.structure.headerDivider=null;if(J.structure.footerDivider)J.structure.footerDivider.element.remove(),J.structure.footerDivider=null}return J},hasDivider(){return J.structure.headerDivider!==null}}}},f4=(J,$,Q)=>{let{text:q,variant:Z="text",onClick:j,closeDialog:K=!0,autofocus:Y=!1,attributes:G={}}=$,z=i6({text:q,variant:Z,...G});if(z.on("click",(W)=>{console.log("button click");let X=K;if(typeof j==="function")try{if(j(W,Q)===!1)X=!1}catch(U){console.error("Error in onClick handler:",U)}if(X){if(Q&&Q.emit)Q.emit("dialog:close",{source:"button",text:q})}}),Y)z.element.setAttribute("autofocus","true");if(J.appendChild(z.element),!Q._buttons)Q._buttons=[];Q._buttons.push({config:$,instance:z})},g4=()=>(J)=>{let $=J.config.open===!0,Q=J.config.animationDuration||150,q='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',Z=null,j=()=>{if(!J.config.trapFocus)return;let U=J.element.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(U.length===0)return;let _=U[0],N=U[U.length-1];if(J.config.autofocus){let k=J.element.querySelector("[autofocus]");if(k)k.focus();else _.focus()}J.element.addEventListener("keydown",F);function F(k){if(k.key!=="Tab")return;if(k.shiftKey){if(document.activeElement===_)N.focus(),k.preventDefault()}else if(document.activeElement===N)_.focus(),k.preventDefault()}},K=()=>{if(!J.config.trapFocus)return;if(J.element.removeEventListener("keydown",U),Z)Z.focus(),Z=null;function U(){}},Y=()=>{if(J.config.closeOnOverlayClick!==!1)J.overlay.addEventListener("click",z);if(J.config.closeOnEscape!==!1)document.addEventListener("keydown",W)},G=()=>{J.overlay.removeEventListener("click",z),document.removeEventListener("keydown",W)};function z(U){if(U.target===J.overlay)X.close()}function W(U){if(U.key==="Escape"&&X.isOpen())X.close()}if($)p(J.overlay,`${J.getClass("dialog-overlay")}--visible`),p(J.element,`${J.getClass("dialog")}--visible`),j(),Y();let X={open(){if(this.isOpen())return;Z=document.activeElement;let U={dialog:J,defaultPrevented:!1,preventDefault:()=>{U.defaultPrevented=!0}};if(typeof J.emit==="function")J.emit(c9.BEFORE_OPEN,U);if(U.defaultPrevented)return;if(J.overlay&&!J.overlay.parentNode)(J.structure.container||document.body).appendChild(J.overlay);p(J.overlay,`${J.getClass("dialog-overlay")}--visible`),setTimeout(()=>{if(p(J.element,`${J.getClass("dialog")}--visible`),j(),Y(),typeof J.emit==="function")J.emit(c9.OPEN,{dialog:J}),setTimeout(()=>{J.emit(c9.AFTER_OPEN,{dialog:J})},Q)},10)},close(){console.log("Dialog close method called");let U={dialog:J,defaultPrevented:!1,preventDefault:()=>{U.defaultPrevented=!0}};if(typeof J.emit==="function")J.emit(c9.BEFORE_CLOSE,U);if(U.defaultPrevented){console.log("Dialog close prevented by event handler");return}let _=`${J.getClass("dialog")}--visible`,N=`${J.getClass("dialog-overlay")}--visible`;if(K6(J.element,_),K6(J.overlay,N),K(),G(),typeof J.emit==="function")J.emit(c9.CLOSE,{dialog:J});setTimeout(()=>{if(J.overlay&&J.overlay.parentNode)J.overlay.parentNode.removeChild(J.overlay);if(typeof J.emit==="function")J.emit(c9.AFTER_CLOSE,{dialog:J})},Q)},toggle(U){if(U===void 0)this.isOpen()?this.close():this.open();else if(U)this.open();else this.close()},isOpen(){return J.element.classList.contains(`${J.getClass("dialog")}--visible`)}};if(J&&J.on)J.on("dialog:close",()=>{X.close()});return{...J,visibility:X}},d4=()=>(J)=>{let $=J.structure.header,Q=J.structure.content,q=J.structure.footer;return{...J,content:{setTitle(Z){let j=$.querySelector(`.${J.getClass("dialog-header-title")}`);if(!j&&Z)j=document.createElement("h2"),j.classList.add(J.getClass("dialog-header-title")),$.querySelector(`.${J.getClass("dialog-header-content")}`).appendChild(j);if(j)j.textContent=Z},getTitle(){let Z=$.querySelector(`.${J.getClass("dialog-header-title")}`);return Z?Z.textContent||"":""},setSubtitle(Z){let j=$.querySelector(`.${J.getClass("dialog-header-subtitle")}`);if(!j&&Z)j=document.createElement("p"),j.classList.add(J.getClass("dialog-header-subtitle")),$.querySelector(`.${J.getClass("dialog-header-content")}`).appendChild(j);if(j)j.textContent=Z},getSubtitle(){let Z=$.querySelector(`.${J.getClass("dialog-header-subtitle")}`);return Z?Z.textContent||"":""},setContent(Z){Q.innerHTML=Z},getContent(){return Q.innerHTML},getHeaderElement(){return $},getContentElement(){return Q},getFooterElement(){return q}}}},r4=()=>(J)=>{if(!J._buttons)J._buttons=[];return{...J,buttons:{addButton($){let Q=J.structure.footer;if(!Q){Q=document.createElement("div"),Q.classList.add(J.getClass("dialog-footer"));let q=J.config.footerAlignment||"right";if(q!=="right")p(Q,`${J.getClass("dialog-footer")}--${q}`);J.element.appendChild(Q),J.structure.footer=Q}f4(Q,$,J)},removeButton($){if(typeof $==="number"){if($>=0&&$<J._buttons.length)J._buttons[$].instance.destroy(),J._buttons.splice($,1)}else{let Q=J._buttons.findIndex((q)=>q.config.text===$);if(Q!==-1)J._buttons[Q].instance.destroy(),J._buttons.splice(Q,1)}if(J._buttons.length===0&&J.structure.footer)J.element.removeChild(J.structure.footer),J.structure.footer=null},getButtons(){return J._buttons.map(($)=>$.config)},setFooterAlignment($){if(!J.structure.footer)return;if(["right","left","center","space-between"].forEach((q)=>{if(q!=="right")K6(J.structure.footer,`${J.getClass("dialog-footer")}--${q}`)}),$!=="right")p(J.structure.footer,`${J.getClass("dialog-footer")}--${$}`)}}}},l4=()=>(J)=>{return{...J,size:{setSize($){if(["small","medium","large","fullwidth","fullscreen"].forEach((q)=>{K6(J.element,`${J.getClass("dialog")}--${q}`)}),$!=="medium")p(J.element,`${J.getClass("dialog")}--${$}`)}}}},p4=()=>(J)=>{return{...J,confirm($){return new Promise((Q)=>{let{title:q="Confirm",message:Z,confirmText:j="Yes",cancelText:K="No",confirmVariant:Y="filled",cancelVariant:G="text",size:z="small"}=$;J.content.setTitle(q),J.content.setContent(`<p>${Z}</p>`),J.size.setSize(z),J._buttons.forEach((W)=>W.instance.destroy()),J._buttons=[],J.buttons.addButton({text:j,variant:Y,onClick:()=>{Q(!0)}}),J.buttons.addButton({text:K,variant:G,onClick:()=>{Q(!1)}}),J.visibility.open()})}}};u9();var s4=(J)=>($)=>({...$,open(){return J.visibility.open(),this},close(){return J.visibility.close(),this},toggle(Q){return J.visibility.toggle(Q),this},isOpen(){return J.visibility.isOpen()},setTitle(Q){return J.content.setTitle(Q),this},getTitle(){return J.content.getTitle()},setSubtitle(Q){return J.content.setSubtitle(Q),this},getSubtitle(){return J.content.getSubtitle()},setContent(Q){return J.content.setContent(Q),this},getContent(){return J.content.getContent()},addButton(Q){return J.buttons.addButton(Q),this},removeButton(Q){return J.buttons.removeButton(Q),this},getButtons(){return J.buttons.getButtons()},setFooterAlignment(Q){return J.buttons.setFooterAlignment(Q),this},toggleDivider(Q){return J.divider.toggleDivider(Q),this},hasDivider(){return J.divider.hasDivider()},setSize(Q){return J.size.setSize(Q),this},on(Q,q){return J.events.on(Q,q),this},off(Q,q){return J.events.off(Q,q),this},getHeaderElement(){return J.content.getHeaderElement()},getContentElement(){return J.content.getContentElement()},getFooterElement(){return J.content.getFooterElement()},confirm(Q){if($.confirm)return $.confirm(Q||{message:"Are you sure?"});return Promise.resolve(!1)},destroy(){if(console.log("destroy",this.isOpen()),this.isOpen()){let Q=`${$.getClass("dialog")}--visible`,q=`${$.getClass("dialog-overlay")}--visible`;if(K6($.element,Q),K6($.overlay,q),J.focus&&J.focus.releaseFocus)J.focus.releaseFocus()}if(J.lifecycle.destroy(),$.overlay&&$.overlay.parentNode)$.overlay.parentNode.removeChild($.overlay)},element:$.element,overlay:$.overlay});var K3=(J={})=>{let $=x4(J);try{let Q=I(T,h(),S(T4($)),h4($),g4(),d4(),r4(),l4(),u4(),p4(),v(),(q)=>s4(S4(q))(q))($);if($.on)Object.entries($.on).forEach(([q,Z])=>{if(typeof Z==="function")Q.on(q,Z)});return Q}catch(Q){throw console.error("Dialog creation error:",Q),new Error(`Failed to create dialog: ${Q.message}`)}},KJ=K3;n();s();c();var m4=({disabled:J,lifecycle:$,className:Q})=>(q)=>({...q,element:q.element,getValue:()=>q.element.value,setValue(Z){return q.element.value=Z,this},enable(){return J.enable(),this},disable(){return J.disable(),this},setIcon(Z){return q.icon.setIcon(Z),this},getIcon(){return q.icon.getIcon()},setPosition(Z){return["top-right","top-left","bottom-right","bottom-left"].forEach((K)=>{q.element.classList.remove(`${Q}--${K}`)}),q.element.classList.add(`${Q}--${Z}`),this},getPosition(){let Z=["top-right","top-left","bottom-right","bottom-left"];for(let j of Z)if(q.element.classList.contains(`${Q}--${j}`))return j;return null},lower(){return q.element.classList.add(`${Q}--lowered`),this},raise(){return q.element.classList.remove(`${Q}--lowered`),this},destroy(){$.destroy()}});m();var Y3={variant:"primary",size:"default",type:"button",ripple:!0},a4=(J={})=>b(Y3,J,"fab"),i4=(J)=>{let $={type:J.type||"button","aria-label":J.ariaLabel||(J.icon?"action":void 0)};if(J.disabled===!0)$.disabled=!0;let Q=[];if(Q.push(`fab--${J.size||"default"}`),J.animate)Q.push("fab--animate-enter");if(J.position)Q.push(`fab--${J.position}`);if(J.disabled===!0)Q.push("fab--disabled");let q={...J,className:Q};return f(q,{tag:"button",attributes:$,forwardEvents:{click:(Z)=>!Z.element.disabled,focus:!0,blur:!0},interactive:!0})},c4=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable()},lifecycle:{destroy:()=>J.lifecycle.destroy()},className:J.getClass("fab")});var G3=(J={})=>{let $=a4(J);try{return I(T,h(),S(i4($)),Y6($),g6($),G6($),P6($),v(),(q)=>m4(c4(q))(q))($)}catch(Q){throw console.error("FAB creation error:",Q),new Error(`Failed to create FAB: ${Q.message}`)}},_$=G3;n();s();c();var o4=({disabled:J,lifecycle:$,text:Q,className:q})=>(Z)=>({...Z,element:Z.element,getValue:()=>Z.element.value,setValue(j){return Z.element.value=j,this},enable(){return J.enable(),this},disable(){return J.disable(),this},setIcon(j){return Z.icon.setIcon(j),this},getIcon(){return Z.icon.getIcon()},setText(j){return Q.setText(j),this},getText(){return Q.getText()},setPosition(j){return["top-right","top-left","bottom-right","bottom-left"].forEach((Y)=>{Z.element.classList.remove(`${q}--${Y}`)}),Z.element.classList.add(`${q}--${j}`),this},getPosition(){let j=["top-right","top-left","bottom-right","bottom-left"];for(let K of j)if(Z.element.classList.contains(`${q}--${K}`))return K;return null},lower(){return Z.element.classList.add(`${q}--lowered`),this},raise(){return Z.element.classList.remove(`${q}--lowered`),this},collapse(){Z.element.classList.add(`${q}--collapsed`);let j=new CustomEvent("collapse",{bubbles:!0,cancelable:!0});return Z.element.dispatchEvent(j),this},expand(){Z.element.classList.remove(`${q}--collapsed`);let j=new CustomEvent("expand",{bubbles:!0,cancelable:!0});return Z.element.dispatchEvent(j),this},destroy(){$.destroy()}});m();var z3={variant:"primary",type:"button",ripple:!0,iconPosition:"start",width:"fixed"},t4=(J={})=>b(z3,J,"extended-fab"),n4=(J)=>{let $={type:J.type||"button","aria-label":J.ariaLabel||J.text||(J.icon?"action":void 0)},Q=[`${J.prefix}-extended-fab`];if(J.variant)Q.push(`${J.prefix}-extended-fab--${J.variant}`);if(J.width)Q.push(`${J.prefix}-extended-fab--${J.width}`);if(J.animate)Q.push(`${J.prefix}-extended-fab--animate-enter`);if(J.position)Q.push(`${J.prefix}-extended-fab--${J.position}`);if(J.collapseOnScroll)Q.push(`${J.prefix}-extended-fab--collapsible`);if(J.class)Q.push(J.class);if(J.disabled===!0)$.disabled=!0,Q.push(`${J.prefix}-extended-fab--disabled`);return f(J,{tag:"button",attributes:$,className:Q,forwardEvents:{click:(q)=>!q.element.disabled,focus:!0,blur:!0},interactive:!0})},e4=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable()},lifecycle:{destroy:()=>J.lifecycle.destroy()},className:J.getClass("extended-fab"),text:{setText:($)=>J.text.setText($),getText:()=>J.text.getText()}});var W3=(J={})=>{let $=t4(J),Q=(q)=>{if($.collapseOnScroll){let Z=window.scrollY,j=!1,K=10,Y=()=>{if(!j)window.requestAnimationFrame(()=>{let z=window.scrollY,W=z-Z;if(W>K)q.collapse();else if(W<-K)q.expand();if(z<=0)q.expand();Z=z,j=!1}),j=!0};window.addEventListener("scroll",Y,{passive:!0}),requestAnimationFrame(()=>{q.expand()});let G=q.destroy;q.destroy=()=>{window.removeEventListener("scroll",Y),G.call(q)}}};try{let q=I(T,h(),S(n4($)),Y6($),g6($),$9($),G6($),P6($),v(),(Z)=>o4(e4(Z))(Z))($);return Q(q),q}catch(q){throw console.error("Extended FAB creation error:",q),new Error(`Failed to create Extended FAB: ${q.message}`)}},D$=W3;n();s();c();var $5=!1,U3=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize menu controller: missing element"),$;let Q={visible:J.visible||!1,items:J.items||[],position:J.position,selectedItemId:null,activeItemIndex:-1,component:$},q={triggerEvent(B,H={},V){let O={menu:Q.component,...H,originalEvent:V,preventDefault:()=>{O.defaultPrevented=!0},defaultPrevented:!1};return $.emit(B,O),O}},Z=()=>{if($.opener&&typeof $.opener.getOpener==="function")return $.opener.getOpener();let{opener:B}=J;if(typeof B==="string"){let H=document.querySelector(B);if(!H)return console.warn(`Menu opener not found: ${B}`),null;return H}if(typeof B==="object"&&B!==null&&"element"in B)return B.element;return B},j=(B,H)=>{let V=document.createElement("li"),O=`${$.getClass("menu-item")}`;if(V.className=O,V.setAttribute("role","menuitem"),V.setAttribute("tabindex","-1"),V.setAttribute("data-id",B.id),V.setAttribute("data-index",H.toString()),B.disabled)V.classList.add(`${O}--disabled`),V.setAttribute("aria-disabled","true");else V.setAttribute("aria-disabled","false");if(Q.selectedItemId&&B.id===Q.selectedItemId)V.classList.add(`${O}--selected`),V.setAttribute("aria-selected","true");else V.setAttribute("aria-selected","false");if(B.hasSubmenu)V.classList.add(`${O}--submenu`),V.setAttribute("aria-haspopup","true"),V.setAttribute("aria-expanded","false");let M=document.createElement("span");if(M.className=`${$.getClass("menu-item-content")}`,B.icon){let R=document.createElement("span");R.className=`${$.getClass("menu-item-icon")}`,R.innerHTML=B.icon,M.appendChild(R)}let P=document.createElement("span");if(P.className=`${$.getClass("menu-item-text")}`,P.textContent=B.text,M.appendChild(P),B.shortcut){let R=document.createElement("span");R.className=`${$.getClass("menu-item-shortcut")}`,R.textContent=B.shortcut,M.appendChild(R)}if(V.appendChild(M),!B.disabled){if(V.addEventListener("click",(R)=>z(R,B,H)),V.addEventListener("keydown",(R)=>{if(R.key==="Enter"||R.key===" ")R.preventDefault(),z(R,B,H)}),V.addEventListener("focus",()=>{Q.activeItemIndex=H}),B.hasSubmenu&&J.openSubmenuOnHover)V.addEventListener("mouseenter",()=>{if($.submenu)$.submenu.handleSubmenuHover(B,H,V)}),V.addEventListener("mouseleave",(R)=>{if($.submenu)$.submenu.handleSubmenuLeave(R)})}return V},K=(B,H)=>{let V=document.createElement("li");if(V.className=`${$.getClass("menu-divider")}`,V.setAttribute("role","separator"),V.setAttribute("data-index",H.toString()),B.id)V.setAttribute("id",B.id);return V},Y=()=>{let B=document.createElement("ul");B.className=`${$.getClass("menu-list")}`,B.setAttribute("role","menu"),Q.items.forEach((H,V)=>{if("type"in H&&H.type==="divider")B.appendChild(K(H,V));else B.appendChild(j(H,V))}),$.element.innerHTML="",$.element.appendChild(B)},G=(B)=>{for(let H of Q.items){if("id"in H&&H.id===B)return H;if("submenu"in H&&Array.isArray(H.submenu)){for(let V of H.submenu)if("id"in V&&V.id===B)return V}}return null},z=(B,H,V)=>{if(B.preventDefault(),B.stopPropagation(),H.disabled)return;if(H.hasSubmenu&&$.submenu){$.submenu.handleSubmenuClick(H,V,B.currentTarget);return}let O=q.triggerEvent("select",{item:H,itemId:H.id,itemData:H.data},B);if(J.closeOnSelect&&!O.defaultPrevented)U(B,!0)},W=(B)=>{if(!$.element)return;$.element.querySelectorAll(`.${$.getClass("menu-item")}`).forEach((V)=>{if(V.getAttribute("data-id")===B)V.classList.add(`${$.getClass("menu-item--selected")}`),V.setAttribute("aria-selected","true");else V.classList.remove(`${$.getClass("menu-item--selected")}`),V.setAttribute("aria-selected","false")}),Q.selectedItemId=B},X=(B,H="mouse")=>{if(Q.visible)return;if(Q.visible=!0,document.removeEventListener("click",N),!$.element.parentNode)$.element.classList.remove(`${$.getClass("menu--visible")}`),$.element.setAttribute("aria-hidden","true"),$.element.style.transform="scaleY(0)",$.element.style.opacity="0",document.body.appendChild($.element);let V=Z();if(V&&$.position)$.position.positionMenu(V);setTimeout(()=>{$.element.setAttribute("aria-hidden","false"),$.element.style.transform="",$.element.style.opacity="",$.element.getBoundingClientRect(),$.element.classList.add(`${$.getClass("menu--visible")}`),setTimeout(()=>{if($.keyboard&&$.keyboard.handleInitialFocus)$.keyboard.handleInitialFocus($.element,H);else if(H==="keyboard"){let O=Array.from($.element.querySelectorAll(`.${$.getClass("menu-item")}:not(.${$.getClass("menu-item--disabled")})`));if(O.length>0)O.forEach((M)=>{M.tabIndex=-1}),O[0].tabIndex=0,O[0].focus();else $.element.tabIndex=0,$.element.focus()}else{$.element.tabIndex=-1;let O=Array.from($.element.querySelectorAll(`.${$.getClass("menu-item")}:not(.${$.getClass("menu-item--disabled")})`));if(O.length>0)O.forEach((M)=>{M.tabIndex=-1}),O[0].tabIndex=0}},100),setTimeout(()=>{if(J.closeOnClickOutside&&Q.visible)document.addEventListener("click",N);if(J.closeOnEscape)document.addEventListener("keydown",F);window.addEventListener("resize",k,{passive:!0}),window.addEventListener("scroll",L,{passive:!0})},0)},20),q.triggerEvent("open",{},B)},U=(B,H=!0)=>{if(!Q.visible)return;if($.emit("menu-closing",{event:B,restoreFocus:H}),$.submenu)$.submenu.closeAllSubmenus();setTimeout(()=>{Q.visible=!1,$.element.setAttribute("aria-hidden","true"),$.element.classList.remove(`${$.getClass("menu--visible")}`),document.removeEventListener("click",N),document.removeEventListener("keydown",F),window.removeEventListener("resize",k),window.removeEventListener("scroll",L),q.triggerEvent("close",{restoreFocus:H},B),setTimeout(()=>{if($.element.parentNode&&!Q.visible)$.element.parentNode.removeChild($.element)},300)},50)},_=(B,H="mouse")=>{if(Q.visible)U(B);else{if(B){if(B instanceof KeyboardEvent)H="keyboard";else if(B instanceof MouseEvent)H="mouse"}X(B,H)}},N=(B)=>{if($5){$5=!1;return}if($.element.contains(B.target))return;let H=Z();if(H&&H.contains(B.target))return;if($.submenu&&$.submenu.hasOpenSubmenu()){let V=$.submenu.getActiveSubmenus();for(let O of V)if(O.element.contains(B.target))return}U(B,!1)},F=(B)=>{let H=$.element.contains(B.target),V=$.submenu&&$.submenu.hasOpenSubmenu()&&$.submenu.getActiveSubmenus().some((O)=>O.element.contains(B.target));if(Q.visible){if(H||V){if(B.key==="Escape")B.preventDefault(),U(B,!0)}else if($.keyboard&&$.keyboard.handleMenuKeydown)$.keyboard.handleMenuKeydown(B,Q,{closeMenu:U,closeSubmenu:$.submenu?$.submenu.closeSubmenu:null,findItemById:G,handleSubmenuClick:$.submenu?$.submenu.handleSubmenuClick:null,handleNestedSubmenuClick:$.submenu?$.submenu.handleNestedSubmenuClick:null})}},k=()=>{if(Q.visible){let B=Z();if(B&&$.position)$.position.positionMenu(B)}},L=()=>{if(Q.visible)window.requestAnimationFrame(()=>{let B=Z();if(B&&$.position)$.position.positionMenu(B)})},D=()=>{if(Y(),$.keyboard&&$.keyboard.setupKeyboardHandlers)$.keyboard.setupKeyboardHandlers($.element,Q,{closeMenu:U,closeSubmenu:$.submenu?$.submenu.closeSubmenu:null,findItemById:G,handleSubmenuClick:$.submenu?$.submenu.handleSubmenuClick:null,handleNestedSubmenuClick:$.submenu?$.submenu.handleNestedSubmenuClick:null});if(Q.visible){let B=Z();if(B&&$.position)$.position.positionMenu(B);if($.element.classList.add(`${$.getClass("menu--visible")}`),J.closeOnClickOutside)document.addEventListener("click",N);if(J.closeOnEscape)document.addEventListener("keydown",F);window.addEventListener("resize",k),window.addEventListener("scroll",L)}};if($.on("create-menu-items",(B)=>{let{items:H,container:V,onItemCreated:O}=B;H.forEach((M,P)=>{let R;if("type"in M&&M.type==="divider")R=K(M,P);else R=j(M,P);if(V.appendChild(R),O)O(R)})}),setTimeout(D,0),$.lifecycle){let B=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{document.removeEventListener("click",N),document.removeEventListener("keydown",F),window.removeEventListener("resize",k),window.removeEventListener("scroll",L),B()}}return{...$,menu:{open:(B,H="mouse")=>{return X(B,H),$},close:(B,H=!0)=>{return U(B,H),$},toggle:(B,H="mouse")=>{return _(B,H),$},isOpen:()=>Q.visible,setItems:(B)=>{return Q.items=B,Y(),$},getItems:()=>Q.items,setPosition:(B)=>{if(Q.position=B,Q.visible){let H=Z();if(H&&$.position)$.position.positionMenu(H)}return $},getPosition:()=>Q.position,setSelected:(B)=>{return W(B),$},getSelected:()=>Q.selectedItemId}}},YJ=U3;var X3=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize menu opener: missing element"),$;let Q=!1;document.addEventListener("keydown",(F)=>{Q=F.key==="Tab",setTimeout(()=>{Q=!1},100)});let q={openerElement:null,openerComponent:null,activeClass:""},Z=(F)=>{if(!F)return{element:null,component:null};if(typeof F==="string"){let k=document.querySelector(F);if(!k)return console.warn(`Menu opener not found: ${F}`),{element:null,component:null};return{element:k,component:null}}if(typeof F==="object"&&F!==null){if("element"in F&&F.element instanceof HTMLElement)return{element:F.element,component:F};if("getElement"in F&&typeof F.getElement==="function"){let k=F.getElement();if(k instanceof HTMLElement)return{element:k,component:F}}if("input"in F&&F.input instanceof HTMLElement)return{element:F.input,component:F};if(F instanceof HTMLElement)return{element:F,component:null}}return console.warn("Invalid opener type:",F),{element:null,component:null}},j=(F)=>{let k=$.getClass("").split("-")[0];if(F.tagName==="BUTTON")return`${k}-button--active`;else if(F.classList.contains(`${k}-chip`))return`${k}-chip--selected`;else if(F.classList.contains(`${k}-textfield`)||F.classList.contains(`${k}-select`))return`${k}-textfield--focused`;else return`${k}-menu-opener--active`},K=(F)=>{let{element:k,component:L}=F;if(!k)return;if(q.openerElement&&q.openerElement!==k)U();q.openerElement=k,q.openerComponent=L,q.activeClass=j(k),k.addEventListener("click",z),k.addEventListener("keydown",W),k.addEventListener("blur",X),k.setAttribute("aria-haspopup","true"),k.setAttribute("aria-expanded","false");let D=$.element.id;if(!D)D=`menu-${Date.now()}-${Math.floor(Math.random()*1000)}`,$.element.id=D;k.setAttribute("aria-controls",D)},Y=(F)=>{if(!q.openerElement)return;if(q.openerComponent&&typeof q.openerComponent.setActive==="function"){q.openerComponent.setActive(F);return}if(q.openerComponent&&"selected"in q.openerComponent){q.openerComponent.selected=F;return}if(q.openerComponent&&typeof q.openerComponent.focus==="function"&&typeof q.openerComponent.blur==="function"){if(F)q.openerComponent.focus();else q.openerComponent.blur();return}if(q.openerElement.classList)if(F)q.openerElement.classList.add(q.activeClass);else q.openerElement.classList.remove(q.activeClass)},G=()=>{if(!q.openerElement)return;if(q.openerComponent&&typeof q.openerComponent.focus==="function"){requestAnimationFrame(()=>{q.openerComponent.focus()});return}if(q.openerComponent&&"input"in q.openerComponent&&q.openerComponent.input instanceof HTMLElement){requestAnimationFrame(()=>{q.openerComponent.input.focus()});return}requestAnimationFrame(()=>{q.openerElement.focus()})},z=(F)=>{if(F.preventDefault(),$.menu)if($.menu.isOpen())$.menu.close(F);else $.menu.open(F,"mouse")},W=(F)=>{if(!$.menu)return;let k=$.menu.isOpen();switch(F.key){case"Enter":case" ":case"ArrowDown":case"Down":if(F.preventDefault(),!k)$.menu.open(F,"keyboard");break;case"Escape":if(k)F.preventDefault(),$.menu.close(F);break;case"ArrowUp":case"Up":if(F.preventDefault(),!k)$.menu.open(F,"keyboard"),setTimeout(()=>{let L=$.element.querySelectorAll(`.${$.getClass("menu-item")}:not(.${$.getClass("menu-item--disabled")})`);if(L.length>0){L.forEach((B)=>B.setAttribute("tabindex","-1"));let D=L[L.length-1];D.setAttribute("tabindex","0"),D.focus()}},100);break}},X=(F)=>{if(!$.menu||!$.menu.isOpen())return;let k=F.relatedTarget;if(Q){setTimeout(()=>{if($.menu&&$.menu.isOpen())$.menu.close(F,!1)},10);return}if(k){if($.element.contains(k))return;if(k.getAttribute("aria-haspopup")==="true"||k.closest('[aria-haspopup="true"]'))return}setTimeout(()=>{if($.menu&&$.menu.isOpen())$.menu.close(F,!1)},50)},U=()=>{if(q.openerElement)q.openerElement.removeEventListener("click",z),q.openerElement.removeEventListener("keydown",W),q.openerElement.removeEventListener("blur",X),q.openerElement.removeAttribute("aria-haspopup"),q.openerElement.removeAttribute("aria-expanded"),q.openerElement.removeAttribute("aria-controls"),Y(!1);q.openerComponent=null,q.openerElement=null,q.activeClass=""},{element:_,component:N}=Z(J.opener);if(K({element:_,component:N}),$.lifecycle){let F=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{U(),F()}}return $.on("open",()=>{if(q.openerElement)q.openerElement.setAttribute("aria-expanded","true"),Y(!0)}),$.on("close",(F)=>{if(q.openerElement){if(q.openerElement.setAttribute("aria-expanded","false"),Y(!1),F.restoreFocus&&!Q)G()}}),{...$,opener:{setOpener(F){let k=Z(F);if(k.element)K(k);return $},getOpener(){return q.openerElement},getOpenerComponent(){return q.openerComponent},setActive(F){return Y(F),$},focus(){return G(),$}}}},GJ=X3;var B3=(J,$)=>{let Q=(j,K,Y,G=!1)=>{if(!j||!K)return;j.style.position="absolute";let z=window.pageXOffset||document.documentElement.scrollLeft,W=window.pageYOffset||document.documentElement.scrollTop,X=j.cloneNode(!0);X.style.visibility="hidden",X.style.display="block",X.style.position="absolute",X.style.top="0",X.style.left="0",X.style.transform="none",X.style.opacity="0",X.style.pointerEvents="none",X.classList.add(`${J.getClass("menu--visible")}`),document.body.appendChild(X);let U=K.getBoundingClientRect(),_=X.getBoundingClientRect(),N=window.innerWidth,F=window.innerHeight;document.body.removeChild(X);let k=$.offset!==void 0?$.offset:8,L=0,D=0,B=Y;if(G){if(B=Y||"right-start",B.startsWith("right")&&U.right+_.width+k>N-16)B=B.replace("right","left");else if(B.startsWith("left")&&U.left-_.width-k<16)B=B.replace("left","right");if(U.top+_.height>F-48){if(B==="right-start")B="right-end";else if(B==="left-start")B="left-end"}}else switch(Y){case"top-start":case"top":case"top-end":if(U.top<_.height+k+48)B=Y.replace("top","bottom");break;case"bottom-start":case"bottom":case"bottom-end":if(U.bottom+_.height+k+48>F){if(U.top>F-U.bottom)B=Y.replace("bottom","top")}break;case"right-start":case"right":case"left-start":case"left":if(U.bottom+_.height>F-48){if(Y==="right-start")B="right-end";else if(Y==="left-start")B="left-end";else if(Y==="right")L=U.top-(_.height-U.height)-k;else if(Y==="left")L=U.top-(_.height-U.height)-k}break}if(["position-top","position-bottom","position-right","position-left"].forEach((R)=>{j.classList.remove(`${J.getClass("menu")}--${R}`)}),B.startsWith("top")||B==="right-end"||B==="left-end"||B==="right"&&L<U.top||B==="left"&&L<U.top)j.classList.add(`${J.getClass("menu")}--position-top`);else if(B.startsWith("left"))j.classList.add(`${J.getClass("menu")}--position-left`);else if(B.startsWith("right"))j.classList.add(`${J.getClass("menu")}--position-right`);else j.classList.add(`${J.getClass("menu")}--position-bottom`);switch(B){case"top-start":L=U.top+W-_.height-k,D=U.left+z;break;case"top":L=U.top+W-_.height-k,D=U.left+z+U.width/2-_.width/2;break;case"top-end":L=U.top+W-_.height-k,D=U.right+z-_.width;break;case"right-start":L=U.top+W,D=U.right+z+k;break;case"right":if(L===0)L=U.top+W+U.height/2-_.height/2;else L+=W;D=U.right+z+k;break;case"right-end":L=U.bottom+W-_.height,D=U.right+z+k;break;case"bottom-start":L=U.bottom+W+k,D=U.left+z;break;case"bottom":L=U.bottom+W+k,D=U.left+z+U.width/2-_.width/2;break;case"bottom-end":L=U.bottom+W+k,D=U.right+z-_.width;break;case"left-start":L=U.top+W,D=U.left+z-_.width-k;break;case"left":if(L===0)L=U.top+W+U.height/2-_.height/2;else L+=W;D=U.left+z-_.width-k;break;case"left-end":L=U.bottom+W-_.height,D=U.left+z-_.width-k;break}let O=48;if(L-W<O)L=O+W;let M=48;if(L-W+_.height>F-M){let R=F-(L-W)-M,y=Math.min(_.height,100),x=Math.max(R,y);if(j.style.maxHeight=`${x}px`,$.maxHeight){let A=parseInt($.maxHeight,10);if(!isNaN(A)&&A<parseInt(j.style.maxHeight||"0",10))j.style.maxHeight=$.maxHeight}}else if($.maxHeight)j.style.maxHeight=$.maxHeight;if($.width==="100%"&&!G)j.style.width=`${U.width}px`;if(j.style.top=`${Math.max(O+W,L)}px`,j.style.left=`${Math.max(16+z,D)}px`,D-z+_.width>N-16)j.style.left="auto",j.style.right="16px"};return{positionMenu:(j)=>{if(!j||!J.element)return;Q(J.element,j,$.position,!1)},positionSubmenu:(j,K,Y=1)=>{if(!j||!K)return;let G=Y%2===1?"right-start":"left-start";j.style.zIndex=`${1000+Y*10}`,Q(j,K,G,!0)},positionElement:Q}},F3=(J)=>($)=>{if(!$.element)return $;let Q=B3($,J);return{...$,position:Q}},zJ=F3;var H3=(J)=>{let $=!1;(()=>{document.addEventListener("keydown",(G)=>{$=G.key==="Tab",setTimeout(()=>{$=!1},100)})})();let q=()=>{let z=document.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])');return Array.from(z).filter((W)=>{return W.offsetParent!==null&&!W.classList.contains("hidden")})},Z=(G,z)=>{if(z==="keyboard"){let W=Array.from(G.querySelectorAll(`.${J.getClass("menu-item")}:not(.${J.getClass("menu-item--disabled")})`));if(W.length>0)W[0].setAttribute("tabindex","0"),W[0].focus();else G.setAttribute("tabindex","0"),G.focus()}else{G.setAttribute("tabindex","-1");let W=G.querySelector(`.${J.getClass("menu-item")}:not(.${J.getClass("menu-item--disabled")})`);if(W)W.setAttribute("tabindex","0")}},j=(G,z,W)=>{let X=z.activeSubmenu&&z.activeSubmenu.contains(G.target),U=X?z.activeSubmenu:J.element,_=Array.from(U.querySelectorAll(`.${J.getClass("menu-item")}:not(.${J.getClass("menu-item--disabled")})`));if(_.length===0)return;let N=document.activeElement,F=-1;if(N&&_.includes(N))F=_.indexOf(N);let k=(L)=>{if(_[L])_[L].focus()};switch(G.key){case"ArrowDown":case"Down":if(G.preventDefault(),F<0)k(0);else if(F<_.length-1)k(F+1);else k(0);break;case"ArrowUp":case"Up":if(G.preventDefault(),F<0)k(_.length-1);else if(F>0)k(F-1);else k(_.length-1);break;case"Home":G.preventDefault(),k(0);break;case"End":G.preventDefault(),k(_.length-1);break;case"Enter":case" ":if(G.preventDefault(),F>=0)_[F].click();break;case"ArrowRight":case"Right":if(G.preventDefault(),X){if(F>=0&&_[F].classList.contains(`${J.getClass("menu-item--submenu")}`)){let D=_[F],B=parseInt(D.getAttribute("data-index"),10),V=D.closest(`.${J.getClass("menu--submenu")}`)?.getAttribute("data-parent-item"),O=W.findItemById(V);if(O&&O.submenu){let M=O.submenu[B];W.handleNestedSubmenuClick(M,B,D)}}}else if(F>=0&&_[F].classList.contains(`${J.getClass("menu-item--submenu")}`)){let D=_[F],B=parseInt(D.getAttribute("data-index"),10),H=z.items[B];W.handleSubmenuClick(H,B,D)}break;case"ArrowLeft":case"Left":if(G.preventDefault(),X)if(z.activeSubmenuItem){let D=z.activeSubmenuItem,B=parseInt(U.getAttribute("data-level")||"1",10);if(W.closeSubmenu(B),D)D.focus()}else W.closeSubmenu(1);break;case"Escape":if(G.preventDefault(),X)if(z.activeSubmenuItem){let D=z.activeSubmenuItem,B=parseInt(U.getAttribute("data-level")||"1",10);if(W.closeSubmenu(B),D)D.focus()}else W.closeSubmenu(1);else W.closeMenu(G,!0);break;case"Tab":G.preventDefault();let L=J.opener?.getOpener?.();if(W.closeMenu(G,!0),L)setTimeout(()=>{if(G.shiftKey);else{let D=q(),B=D.indexOf(L);if(B>=0&&B<D.length-1)D[B+1].focus()}},0);break}};return{handleInitialFocus:Z,handleMenuKeydown:j,setupKeyboardHandlers:(G,z,W)=>{let X=G.querySelectorAll(`.${J.getClass("menu-item")}:not(.${J.getClass("menu-item--disabled")})`);if(X.forEach((U)=>{U.tabIndex=-1}),X.length>0)X[0].tabIndex=0;G.addEventListener("keydown",(U)=>j(U,z,W))},isTabNavigationActive:()=>$,getFocusableElements:q}},M3=()=>(J)=>{if(!J.element)return J;let $=H3(J);return{...J,keyboard:$}},WJ=M3;var k3=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize menu submenu: missing element"),$;let Q={activeSubmenu:null,activeSubmenuItem:null,submenuLevel:0,activeSubmenus:[],submenuTimer:null,hoverIntent:{timer:null,activeItem:null},component:$},q=()=>{if(Q.hoverIntent.timer)clearTimeout(Q.hoverIntent.timer),Q.hoverIntent.timer=null,Q.hoverIntent.activeItem=null},Z=()=>{if(Q.submenuTimer)clearTimeout(Q.submenuTimer),Q.submenuTimer=null},j=(D,B,H)=>{if(!J.openSubmenuOnHover||!D.hasSubmenu)return;q(),Z(),Q.hoverIntent.activeItem=H,Q.hoverIntent.timer=setTimeout(()=>{if(H.matches(":hover")){if(Q.activeSubmenuItem!==H)z(D,B,H)}Q.hoverIntent.timer=null},100)},K=()=>{q(),Z(),Q.submenuTimer=setTimeout(()=>{let{activeSubmenu:D,activeSubmenuItem:B}=Q;if(D&&B){let H=D.matches(":hover"),V=B.matches(":hover");if(!H&&!V)W(Q.submenuLevel)}Q.submenuTimer=null},300)},Y=(D,B,H)=>{if(!D.submenu||!D.hasSubmenu)return;let V=H.getAttribute("aria-expanded")==="true";if(Q.activeSubmenus.some((M)=>M.isOpening))return;if(V){let M=parseInt(H.closest(`.${$.getClass("menu--submenu")}`)?.getAttribute("data-level")||"0",10);W(M+1),H.setAttribute("aria-expanded","false")}else z(D,B,H)},G=(D,B,H)=>{if(!D.submenu||!D.hasSubmenu)return;let V=H.getAttribute("aria-expanded")==="true";if(Q.activeSubmenus.some((M)=>M.isOpening))return;if(V){let M=parseInt(H.closest(`.${$.getClass("menu--submenu")}`)?.getAttribute("data-level")||"1",10);W(M+1)}else z(D,B,H)},z=(D,B,H)=>{if(!D.submenu||!D.hasSubmenu)return;let V=H.closest(`.${$.getClass("menu--submenu")}`)?parseInt(H.closest(`.${$.getClass("menu--submenu")}`).getAttribute("data-level")||"0",10)+1:1;if(W(V),Q.activeSubmenus.findIndex((y)=>y.menuItem===H&&y.isOpening)>=0)return;H.setAttribute("aria-expanded","true");let M=document.createElement("div");M.className=`${$.getClass("menu")} ${$.getClass("menu--submenu")}`,M.setAttribute("role","menu"),M.setAttribute("tabindex","-1"),M.setAttribute("data-level",V.toString()),M.setAttribute("data-parent-item",D.id),M.style.zIndex=`${1000+V*10}`;let P=document.createElement("ul");P.className=`${$.getClass("menu-list")}`;let R=[];if($.emit("create-menu-items",{items:D.submenu,container:P,level:V,onItemCreated:(y)=>{if(!y.classList.contains(`${$.getClass("menu-item--disabled")}`))R.push(y)}}),M.appendChild(P),document.body.appendChild(M),$.position&&$.position.positionSubmenu)$.position.positionSubmenu(M,H,V);if($.keyboard&&$.keyboard.setupKeyboardHandlers)$.keyboard.setupKeyboardHandlers(M,{activeSubmenus:Q.activeSubmenus},{closeSubmenu:W,handleNestedSubmenuClick:G});M.addEventListener("mouseenter",()=>{Z()}),M.addEventListener("mouseleave",()=>{K()}),Q.activeSubmenu=M,Q.activeSubmenuItem=H,Q.activeSubmenus.push({element:M,menuItem:H,level:V,isOpening:!0}),Q.submenuLevel=V,document.addEventListener("click",U),window.addEventListener("resize",_,{passive:!0}),window.addEventListener("scroll",N,{passive:!0}),requestAnimationFrame(()=>{M.classList.add(`${$.getClass("menu--visible")}`),setTimeout(()=>{let y=Q.activeSubmenus.findIndex((x)=>x.element===M);if(y!==-1)Q.activeSubmenus[y].isOpening=!1;if(R.length>0){if(V>=2||document.activeElement===H)R[0].setAttribute("tabindex","0"),R[0].focus()}},300)}),$.emit("submenu-opened",{submenuElement:M,parentItem:H,level:V,item:D})},W=(D)=>{q(),Z();let B=[];for(let H=Q.activeSubmenus.length-1;H>=0;H--)if(Q.activeSubmenus[H].level>=D){let V=Q.activeSubmenus[H];if(V.menuItem)V.menuItem.setAttribute("aria-expanded","false");V.element.classList.remove(`${$.getClass("menu--visible")}`),setTimeout(()=>{if(V.element.parentNode)V.element.parentNode.removeChild(V.element)},200),B.push(H)}if(B.forEach((H)=>{Q.activeSubmenus.splice(H,1)}),Q.activeSubmenus.length>0){let H=Q.activeSubmenus[Q.activeSubmenus.length-1];if(Q.activeSubmenu=H.element,Q.activeSubmenuItem=H.menuItem,Q.submenuLevel=H.level,H.menuItem)H.menuItem.focus()}else Q.activeSubmenu=null,Q.activeSubmenuItem=null,Q.submenuLevel=0;$.emit("submenu-closed",{level:D})},X=()=>{if(q(),Z(),Q.activeSubmenus.length===0)return;[...Q.activeSubmenus].forEach((D)=>{if(D.menuItem)D.menuItem.setAttribute("aria-expanded","false");D.element.classList.remove(`${$.getClass("menu--visible")}`),setTimeout(()=>{if(D.element.parentNode)D.element.parentNode.removeChild(D.element)},200)}),Q.activeSubmenu=null,Q.activeSubmenuItem=null,Q.activeSubmenus=[],Q.submenuLevel=0,document.removeEventListener("click",U),window.removeEventListener("resize",_),window.removeEventListener("scroll",N),$.emit("all-submenus-closed",{})},U=(D)=>{if(!Q.activeSubmenu)return;let{activeSubmenu:B,activeSubmenuItem:H}=Q;if(B.contains(D.target)||H&&H.contains(D.target))return;X()},_=()=>{if(Q.activeSubmenu&&Q.activeSubmenuItem&&$.position)$.position.positionSubmenu(Q.activeSubmenu,Q.activeSubmenuItem,Q.submenuLevel)},N=()=>{window.requestAnimationFrame(()=>{if(Q.activeSubmenu&&Q.activeSubmenuItem&&$.position)$.position.positionSubmenu(Q.activeSubmenu,Q.activeSubmenuItem,Q.submenuLevel)})},F=()=>{return Q.activeSubmenus.length>0},k=()=>{return Q.submenuLevel},L=()=>{return[...Q.activeSubmenus]};if($.lifecycle){let D=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{if(q(),Z(),document.removeEventListener("click",U),window.removeEventListener("resize",_),window.removeEventListener("scroll",N),Q.activeSubmenus.length>0)Q.activeSubmenus.forEach((B)=>{if(B.element.parentNode)B.element.parentNode.removeChild(B.element)});D()}}return $.on("menu-closing",()=>{X()}),{...$,submenu:{openSubmenu:z,closeSubmenu:W,closeAllSubmenus:X,handleSubmenuClick:Y,handleNestedSubmenuClick:G,handleSubmenuHover:j,handleSubmenuLeave:K,hasOpenSubmenu:F,getSubmenuLevel:k,getActiveSubmenus:L}}},UJ=k3;var J5=({menu:J,opener:$,events:Q,lifecycle:q})=>(Z)=>{return{element:Z.element,open(K,Y="mouse"){if(K&&!Y){if(K instanceof KeyboardEvent)Y="keyboard"}return J.open(K,Y),this},close(K,Y=!0,G=!1){return J.close(K,Y,G),this},toggle(K,Y){if(K&&!Y){if(K instanceof KeyboardEvent)Y="keyboard";else if(K instanceof MouseEvent)Y="mouse"}return J.toggle(K,Y),this},isOpen(){return J.isOpen()},setItems(K){return J.setItems(K),this},getItems(){return J.getItems()},setOpener(K){return $.setOpener(K),this},getOpener(){return $.getOpener()},setPosition(K){return J.setPosition(K),this},getPosition(){return J.getPosition()},setSelected(K){return J.setSelected(K),this},getSelected(){return J.getSelected()},on(K,Y){if(Q?.on)Q.on(K,Y);else if(Z.on)Z.on(K,Y);return this},off(K,Y){if(Q?.off)Q.off(K,Y);else if(Z.off)Z.off(K,Y);return this},destroy(){q.destroy()}}};m();var O$={BOTTOM_START:"bottom-start",BOTTOM:"bottom",BOTTOM_END:"bottom-end",TOP_START:"top-start",TOP:"top",TOP_END:"top-end",RIGHT_START:"right-start",RIGHT:"right",RIGHT_END:"right-end",LEFT_START:"left-start",LEFT:"left",LEFT_END:"left-end"},l6={POSITION:O$.BOTTOM_START,OFFSET:0,CLOSE_ON_SELECT:!0,CLOSE_ON_CLICK_OUTSIDE:!0,CLOSE_ON_ESCAPE:!0,OPEN_SUBMENU_ON_HOVER:!0,AUTO_FLIP:!0},XJ={MOUSE:"mouse",KEYBOARD:"keyboard"},BJ={ITEM:"item",DIVIDER:"divider"},FJ={OPEN:"open",CLOSE:"close",SELECT:"select"},C7={CONTAINER:"menu",VISIBLE:"menu--visible",INNER:"menu__inner",ITEM:"menu__item",ITEM_DISABLED:"menu__item--disabled",ITEM_SELECTED:"menu__item--selected",ITEM_HAS_SUBMENU:"menu__item--has-submenu",DIVIDER:"menu__divider",ITEM_ICON:"menu__item-icon",ITEM_TEXT:"menu__item-text",ITEM_SHORTCUT:"menu__item-shortcut",SUBMENU_INDICATOR:"menu__submenu-indicator"};var N3={items:[],position:l6.POSITION,closeOnSelect:l6.CLOSE_ON_SELECT,closeOnClickOutside:l6.CLOSE_ON_CLICK_OUTSIDE,closeOnEscape:l6.CLOSE_ON_ESCAPE,openSubmenuOnHover:l6.OPEN_SUBMENU_ON_HOVER,offset:l6.OFFSET,autoFlip:l6.AUTO_FLIP,visible:!1},Q5=(J)=>{if(!J.opener)throw new Error("Menu component requires an opener element or selector");return b(N3,J,"menu")},q5=(J)=>{let $={};if(J.width)$.width=J.width;if(J.maxHeight)$.maxHeight=J.maxHeight;let Q={role:"menu",tabindex:"-1","aria-hidden":(!J.visible).toString(),style:Object.entries($).map(([q,Z])=>`${q}: ${Z}`).join(";")};return f(J,{tag:"div",attributes:Q,className:[J.visible?C7.VISIBLE:null,J.class].filter(Boolean),forwardEvents:{keydown:!0}})},Z5=(J)=>({menu:{open:($,Q)=>J.menu?.open($,Q),close:($,Q,q)=>J.menu?.close($,Q,q),toggle:($,Q)=>J.menu?.toggle($,Q),isOpen:()=>J.menu?.isOpen()||!1,setItems:($)=>J.menu?.setItems($),getItems:()=>J.menu?.getItems()||[],setPosition:($)=>J.menu?.setPosition($),getPosition:()=>J.menu?.getPosition(),setSelected:($)=>J.menu?.setSelected($),getSelected:()=>J.menu?.getSelected()},opener:{setOpener:($)=>J.opener?.setOpener($),getOpener:()=>J.opener?.getOpener()},submenu:{hasOpenSubmenu:()=>J.submenu?.hasOpenSubmenu()||!1,closeAllSubmenus:()=>J.submenu?.closeAllSubmenus()},events:{on:($,Q)=>J.on?.($,Q),off:($,Q)=>J.off?.($,Q)},lifecycle:{destroy:()=>J.lifecycle?.destroy()}});var L3=(J)=>{try{let $=Q5(J);return I(T,h(),S(q5($)),zJ($),WJ(),UJ($),YJ($),GJ($),v(),(q)=>J5(Z5(q))(q))($)}catch($){throw console.error("Menu creation error:",$),new Error(`Failed to create menu: ${$.message}`)}},E7=L3;n();s();c();var j5=(J)=>($)=>{return{...$,element:$.element,items:$.items||new Map,addItem(q){if(typeof $.addItem==="function")$.addItem(q);return this},removeItem(q){if(typeof $.removeItem==="function")$.removeItem(q);return this},getItem(q){if(typeof $.getItem==="function")return $.getItem(q);return this.items.get(q)},getAllItems(){if(typeof $.getAllItems==="function")return $.getAllItems();return Array.from(this.items.values())},getActive(){if(typeof $.getActive==="function")return $.getActive();return null},getItemPath(q){if(typeof $.getItemPath==="function")return $.getItemPath(q);return[]},setActive(q){if(typeof $.handleItemClick==="function")$.handleItemClick(q);else if(typeof $.setActive==="function")$.setActive(q);else{let Z=this.items.get(q);if(Z&&Z.element){if($.emit)$.emit("change",{id:q,item:Z,source:"api"})}}return this},enable(){if(J.disabled.enable)J.disabled.enable();return this},disable(){if(J.disabled.disable)J.disabled.disable();return this},expand(){if(this.element.classList.remove(`${this.element.className.split(" ")[0]}--hidden`),this.element.setAttribute("aria-hidden","false"),$.emit)$.emit("expanded",{source:"api"});return this},collapse(){if(this.element.classList.add(`${this.element.className.split(" ")[0]}--hidden`),this.element.setAttribute("aria-hidden","true"),$.emit)$.emit("collapsed",{source:"api"});return this},isExpanded(){return!this.element.classList.contains(`${this.element.className.split(" ")[0]}--hidden`)},toggle(){return this.isExpanded()?this.collapse():this.expand()},on(q,Z){if($.on)$.on(q,Z);return this},off(q,Z){if($.off)$.off(q,Z);return this},destroy(){if(J.lifecycle.destroy)J.lifecycle.destroy()}}};var P$={RAIL:"rail",DRAWER:"drawer",BAR:"bar",MODAL:"modal",STANDARD:"standard"},R$={LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom"},y$={FIXED:"fixed",DISMISSIBLE:"dismissible",MODAL:"modal"},HJ={ACTIVE:"active",DISABLED:"disabled",EXPANDED:"expanded",COLLAPSED:"collapsed",HOVERED:"hovered",FOCUSED:"focused",PRESSED:"pressed"},h7={CHANGE:"change",EXPAND:"expand",COLLAPSE:"collapse",GROUP_EXPAND:"group:expand",GROUP_COLLAPSE:"group:collapse"},Z9={VARIANT:P$.STANDARD,POSITION:R$.LEFT,BEHAVIOR:y$.FIXED,EXPANDED:!1,SHOW_LABELS:!0,SCRIM_ENABLED:!0},o={CONTAINER:"nav",VARIANT_PREFIX:"nav--",POSITION_PREFIX:"nav--pos-",BEHAVIOR_PREFIX:"nav--",EXPANDED:"nav--expanded",DISABLED:"nav--disabled",ITEM:"nav-item",ITEM_CONTAINER:"nav-item-container",ICON:"nav-item-icon",LABEL:"nav-item-label",BADGE:"nav-item-badge",DIVIDER:"nav-divider",SCRIM:"nav-scrim",GROUP:"nav-group",GROUP_TITLE:"nav-group-title",SUBTITLE:"nav-subtitle",NESTED_CONTAINER:"nav-nested-container",NESTED_ITEM:"nav-nested-item",EXPAND_ICON:"nav-expand-icon",ACTIVE:"nav-item--active",ITEM_DISABLED:"nav-item--disabled"};var V3=(J)=>{let $=document.createElement("span");return $.className=`${J}-${o.EXPAND_ICON}`,$.innerHTML=`
|
|
18
|
+
`,D.addEventListener("click",(B)=>{if(B.preventDefault(),B.stopPropagation(),$&&$.emit)$.emit("dialog:close",{source:"closeButton"})}),k.appendChild(D)}return k},j=()=>{let k=document.createElement("div");if(k.classList.add($.getClass("dialog-content")),J.content)k.innerHTML=J.content;return k},K=()=>{let k=document.createElement("div");k.classList.add($.getClass("dialog-footer"));let L=J.footerAlignment||"right";if(L!=="right")p(k,`${$.getClass("dialog-footer")}--${L}`);if(Array.isArray(J.buttons)&&J.buttons.length>0)J.buttons.forEach((D)=>f4(k,D,$));return k},Y=()=>{return I9({variant:"full-width",class:$.getClass("dialog-divider")})},G=Z(),z=j(),W=Array.isArray(J.buttons)&&J.buttons.length>0?K():null;p($.element,$.getClass("dialog"));let X=J.size||"medium";if(X!=="medium")p($.element,`${$.getClass("dialog")}--${X}`);let U=J.animation||"scale";if(U!=="scale")p($.element,`${$.getClass("dialog")}--${U}`);$.element.appendChild(G);let _=null,N=null;if(J.divider){if(_=Y(),_.element.classList.add($.getClass("dialog-header-divider")),$.element.appendChild(_.element),W)N=Y(),N.element.classList.add($.getClass("dialog-footer-divider"))}if($.element.appendChild(z),N)$.element.appendChild(N.element);if(W)$.element.appendChild(W);q.appendChild($.element);let F=J.container||document.body;return F.appendChild(q),{...$,overlay:q,structure:{header:G,content:z,footer:W,headerDivider:_,footerDivider:N,container:F}}},u4=()=>(J)=>{return{...J,divider:{toggleDivider($){if($&&!J.structure.headerDivider){let Q=I9({variant:"full-width",class:`${J.getClass("dialog-divider")} ${J.getClass("dialog-header-divider")}`});if(J.element.insertBefore(Q.element,J.structure.content),J.structure.headerDivider=Q,J.structure.footer&&!J.structure.footerDivider){let q=I9({variant:"full-width",class:`${J.getClass("dialog-divider")} ${J.getClass("dialog-footer-divider")}`});J.element.insertBefore(q.element,J.structure.footer),J.structure.footerDivider=q}}else if(!$){if(J.structure.headerDivider)J.structure.headerDivider.element.remove(),J.structure.headerDivider=null;if(J.structure.footerDivider)J.structure.footerDivider.element.remove(),J.structure.footerDivider=null}return J},hasDivider(){return J.structure.headerDivider!==null}}}},f4=(J,$,Q)=>{let{text:q,variant:Z="text",onClick:j,closeDialog:K=!0,autofocus:Y=!1,attributes:G={}}=$,z=i6({text:q,variant:Z,...G});if(z.on("click",(W)=>{console.log("button click");let X=K;if(typeof j==="function")try{if(j(W,Q)===!1)X=!1}catch(U){console.error("Error in onClick handler:",U)}if(X){if(Q&&Q.emit)Q.emit("dialog:close",{source:"button",text:q})}}),Y)z.element.setAttribute("autofocus","true");if(J.appendChild(z.element),!Q._buttons)Q._buttons=[];Q._buttons.push({config:$,instance:z})},g4=()=>(J)=>{let $=J.config.open===!0,Q=J.config.animationDuration||150,q='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',Z=null,j=()=>{if(!J.config.trapFocus)return;let U=J.element.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(U.length===0)return;let _=U[0],N=U[U.length-1];if(J.config.autofocus){let k=J.element.querySelector("[autofocus]");if(k)k.focus();else _.focus()}J.element.addEventListener("keydown",F);function F(k){if(k.key!=="Tab")return;if(k.shiftKey){if(document.activeElement===_)N.focus(),k.preventDefault()}else if(document.activeElement===N)_.focus(),k.preventDefault()}},K=()=>{if(!J.config.trapFocus)return;if(J.element.removeEventListener("keydown",U),Z)Z.focus(),Z=null;function U(){}},Y=()=>{if(J.config.closeOnOverlayClick!==!1)J.overlay.addEventListener("click",z);if(J.config.closeOnEscape!==!1)document.addEventListener("keydown",W)},G=()=>{J.overlay.removeEventListener("click",z),document.removeEventListener("keydown",W)};function z(U){if(U.target===J.overlay)X.close()}function W(U){if(U.key==="Escape"&&X.isOpen())X.close()}if($)p(J.overlay,`${J.getClass("dialog-overlay")}--visible`),p(J.element,`${J.getClass("dialog")}--visible`),j(),Y();let X={open(){if(this.isOpen())return;Z=document.activeElement;let U={dialog:J,defaultPrevented:!1,preventDefault:()=>{U.defaultPrevented=!0}};if(typeof J.emit==="function")J.emit(c9.BEFORE_OPEN,U);if(U.defaultPrevented)return;if(J.overlay&&!J.overlay.parentNode)(J.structure.container||document.body).appendChild(J.overlay);p(J.overlay,`${J.getClass("dialog-overlay")}--visible`),setTimeout(()=>{if(p(J.element,`${J.getClass("dialog")}--visible`),j(),Y(),typeof J.emit==="function")J.emit(c9.OPEN,{dialog:J}),setTimeout(()=>{J.emit(c9.AFTER_OPEN,{dialog:J})},Q)},10)},close(){console.log("Dialog close method called");let U={dialog:J,defaultPrevented:!1,preventDefault:()=>{U.defaultPrevented=!0}};if(typeof J.emit==="function")J.emit(c9.BEFORE_CLOSE,U);if(U.defaultPrevented){console.log("Dialog close prevented by event handler");return}let _=`${J.getClass("dialog")}--visible`,N=`${J.getClass("dialog-overlay")}--visible`;if(K6(J.element,_),K6(J.overlay,N),K(),G(),typeof J.emit==="function")J.emit(c9.CLOSE,{dialog:J});setTimeout(()=>{if(J.overlay&&J.overlay.parentNode)J.overlay.parentNode.removeChild(J.overlay);if(typeof J.emit==="function")J.emit(c9.AFTER_CLOSE,{dialog:J})},Q)},toggle(U){if(U===void 0)this.isOpen()?this.close():this.open();else if(U)this.open();else this.close()},isOpen(){return J.element.classList.contains(`${J.getClass("dialog")}--visible`)}};if(J&&J.on)J.on("dialog:close",()=>{X.close()});return{...J,visibility:X}},d4=()=>(J)=>{let $=J.structure.header,Q=J.structure.content,q=J.structure.footer;return{...J,content:{setTitle(Z){let j=$.querySelector(`.${J.getClass("dialog-header-title")}`);if(!j&&Z)j=document.createElement("h2"),j.classList.add(J.getClass("dialog-header-title")),$.querySelector(`.${J.getClass("dialog-header-content")}`).appendChild(j);if(j)j.textContent=Z},getTitle(){let Z=$.querySelector(`.${J.getClass("dialog-header-title")}`);return Z?Z.textContent||"":""},setSubtitle(Z){let j=$.querySelector(`.${J.getClass("dialog-header-subtitle")}`);if(!j&&Z)j=document.createElement("p"),j.classList.add(J.getClass("dialog-header-subtitle")),$.querySelector(`.${J.getClass("dialog-header-content")}`).appendChild(j);if(j)j.textContent=Z},getSubtitle(){let Z=$.querySelector(`.${J.getClass("dialog-header-subtitle")}`);return Z?Z.textContent||"":""},setContent(Z){Q.innerHTML=Z},getContent(){return Q.innerHTML},getHeaderElement(){return $},getContentElement(){return Q},getFooterElement(){return q}}}},r4=()=>(J)=>{if(!J._buttons)J._buttons=[];return{...J,buttons:{addButton($){let Q=J.structure.footer;if(!Q){Q=document.createElement("div"),Q.classList.add(J.getClass("dialog-footer"));let q=J.config.footerAlignment||"right";if(q!=="right")p(Q,`${J.getClass("dialog-footer")}--${q}`);J.element.appendChild(Q),J.structure.footer=Q}f4(Q,$,J)},removeButton($){if(typeof $==="number"){if($>=0&&$<J._buttons.length)J._buttons[$].instance.destroy(),J._buttons.splice($,1)}else{let Q=J._buttons.findIndex((q)=>q.config.text===$);if(Q!==-1)J._buttons[Q].instance.destroy(),J._buttons.splice(Q,1)}if(J._buttons.length===0&&J.structure.footer)J.element.removeChild(J.structure.footer),J.structure.footer=null},getButtons(){return J._buttons.map(($)=>$.config)},setFooterAlignment($){if(!J.structure.footer)return;if(["right","left","center","space-between"].forEach((q)=>{if(q!=="right")K6(J.structure.footer,`${J.getClass("dialog-footer")}--${q}`)}),$!=="right")p(J.structure.footer,`${J.getClass("dialog-footer")}--${$}`)}}}},l4=()=>(J)=>{return{...J,size:{setSize($){if(["small","medium","large","fullwidth","fullscreen"].forEach((q)=>{K6(J.element,`${J.getClass("dialog")}--${q}`)}),$!=="medium")p(J.element,`${J.getClass("dialog")}--${$}`)}}}},p4=()=>(J)=>{return{...J,confirm($){return new Promise((Q)=>{let{title:q="Confirm",message:Z,confirmText:j="Yes",cancelText:K="No",confirmVariant:Y="filled",cancelVariant:G="text",size:z="small"}=$;J.content.setTitle(q),J.content.setContent(`<p>${Z}</p>`),J.size.setSize(z),J._buttons.forEach((W)=>W.instance.destroy()),J._buttons=[],J.buttons.addButton({text:j,variant:Y,onClick:()=>{Q(!0)}}),J.buttons.addButton({text:K,variant:G,onClick:()=>{Q(!1)}}),J.visibility.open()})}}};u9();var s4=(J)=>($)=>({...$,open(){return J.visibility.open(),this},close(){return J.visibility.close(),this},toggle(Q){return J.visibility.toggle(Q),this},isOpen(){return J.visibility.isOpen()},setTitle(Q){return J.content.setTitle(Q),this},getTitle(){return J.content.getTitle()},setSubtitle(Q){return J.content.setSubtitle(Q),this},getSubtitle(){return J.content.getSubtitle()},setContent(Q){return J.content.setContent(Q),this},getContent(){return J.content.getContent()},addButton(Q){return J.buttons.addButton(Q),this},removeButton(Q){return J.buttons.removeButton(Q),this},getButtons(){return J.buttons.getButtons()},setFooterAlignment(Q){return J.buttons.setFooterAlignment(Q),this},toggleDivider(Q){return J.divider.toggleDivider(Q),this},hasDivider(){return J.divider.hasDivider()},setSize(Q){return J.size.setSize(Q),this},on(Q,q){return J.events.on(Q,q),this},off(Q,q){return J.events.off(Q,q),this},getHeaderElement(){return J.content.getHeaderElement()},getContentElement(){return J.content.getContentElement()},getFooterElement(){return J.content.getFooterElement()},confirm(Q){if($.confirm)return $.confirm(Q||{message:"Are you sure?"});return Promise.resolve(!1)},destroy(){if(console.log("destroy",this.isOpen()),this.isOpen()){let Q=`${$.getClass("dialog")}--visible`,q=`${$.getClass("dialog-overlay")}--visible`;if(K6($.element,Q),K6($.overlay,q),J.focus&&J.focus.releaseFocus)J.focus.releaseFocus()}if(J.lifecycle.destroy(),$.overlay&&$.overlay.parentNode)$.overlay.parentNode.removeChild($.overlay)},element:$.element,overlay:$.overlay});var K3=(J={})=>{let $=x4(J);try{let Q=I(T,h(),S(T4($)),h4($),g4(),d4(),r4(),l4(),u4(),p4(),v(),(q)=>s4(S4(q))(q))($);if($.on)Object.entries($.on).forEach(([q,Z])=>{if(typeof Z==="function")Q.on(q,Z)});return Q}catch(Q){throw console.error("Dialog creation error:",Q),Error(`Failed to create dialog: ${Q.message}`)}},KJ=K3;n();s();c();var m4=({disabled:J,lifecycle:$,className:Q})=>(q)=>({...q,element:q.element,getValue:()=>q.element.value,setValue(Z){return q.element.value=Z,this},enable(){return J.enable(),this},disable(){return J.disable(),this},setIcon(Z){return q.icon.setIcon(Z),this},getIcon(){return q.icon.getIcon()},setPosition(Z){return["top-right","top-left","bottom-right","bottom-left"].forEach((K)=>{q.element.classList.remove(`${Q}--${K}`)}),q.element.classList.add(`${Q}--${Z}`),this},getPosition(){let Z=["top-right","top-left","bottom-right","bottom-left"];for(let j of Z)if(q.element.classList.contains(`${Q}--${j}`))return j;return null},lower(){return q.element.classList.add(`${Q}--lowered`),this},raise(){return q.element.classList.remove(`${Q}--lowered`),this},destroy(){$.destroy()}});m();var Y3={variant:"primary",size:"default",type:"button",ripple:!0},a4=(J={})=>b(Y3,J,"fab"),i4=(J)=>{let $={type:J.type||"button","aria-label":J.ariaLabel||(J.icon?"action":void 0)};if(J.disabled===!0)$.disabled=!0;let Q=[];if(Q.push(`fab--${J.size||"default"}`),J.animate)Q.push("fab--animate-enter");if(J.position)Q.push(`fab--${J.position}`);if(J.disabled===!0)Q.push("fab--disabled");let q={...J,className:Q};return f(q,{tag:"button",attributes:$,forwardEvents:{click:(Z)=>!Z.element.disabled,focus:!0,blur:!0},interactive:!0})},c4=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable()},lifecycle:{destroy:()=>J.lifecycle.destroy()},className:J.getClass("fab")});var G3=(J={})=>{let $=a4(J);try{return I(T,h(),S(i4($)),Y6($),g6($),G6($),P6($),v(),(q)=>m4(c4(q))(q))($)}catch(Q){throw console.error("FAB creation error:",Q),Error(`Failed to create FAB: ${Q.message}`)}},_$=G3;n();s();c();var o4=({disabled:J,lifecycle:$,text:Q,className:q})=>(Z)=>({...Z,element:Z.element,getValue:()=>Z.element.value,setValue(j){return Z.element.value=j,this},enable(){return J.enable(),this},disable(){return J.disable(),this},setIcon(j){return Z.icon.setIcon(j),this},getIcon(){return Z.icon.getIcon()},setText(j){return Q.setText(j),this},getText(){return Q.getText()},setPosition(j){return["top-right","top-left","bottom-right","bottom-left"].forEach((Y)=>{Z.element.classList.remove(`${q}--${Y}`)}),Z.element.classList.add(`${q}--${j}`),this},getPosition(){let j=["top-right","top-left","bottom-right","bottom-left"];for(let K of j)if(Z.element.classList.contains(`${q}--${K}`))return K;return null},lower(){return Z.element.classList.add(`${q}--lowered`),this},raise(){return Z.element.classList.remove(`${q}--lowered`),this},collapse(){Z.element.classList.add(`${q}--collapsed`);let j=new CustomEvent("collapse",{bubbles:!0,cancelable:!0});return Z.element.dispatchEvent(j),this},expand(){Z.element.classList.remove(`${q}--collapsed`);let j=new CustomEvent("expand",{bubbles:!0,cancelable:!0});return Z.element.dispatchEvent(j),this},destroy(){$.destroy()}});m();var z3={variant:"primary",type:"button",ripple:!0,iconPosition:"start",width:"fixed"},t4=(J={})=>b(z3,J,"extended-fab"),n4=(J)=>{let $={type:J.type||"button","aria-label":J.ariaLabel||J.text||(J.icon?"action":void 0)},Q=[`${J.prefix}-extended-fab`];if(J.variant)Q.push(`${J.prefix}-extended-fab--${J.variant}`);if(J.width)Q.push(`${J.prefix}-extended-fab--${J.width}`);if(J.animate)Q.push(`${J.prefix}-extended-fab--animate-enter`);if(J.position)Q.push(`${J.prefix}-extended-fab--${J.position}`);if(J.collapseOnScroll)Q.push(`${J.prefix}-extended-fab--collapsible`);if(J.class)Q.push(J.class);if(J.disabled===!0)$.disabled=!0,Q.push(`${J.prefix}-extended-fab--disabled`);return f(J,{tag:"button",attributes:$,className:Q,forwardEvents:{click:(q)=>!q.element.disabled,focus:!0,blur:!0},interactive:!0})},e4=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable()},lifecycle:{destroy:()=>J.lifecycle.destroy()},className:J.getClass("extended-fab"),text:{setText:($)=>J.text.setText($),getText:()=>J.text.getText()}});var W3=(J={})=>{let $=t4(J),Q=(q)=>{if($.collapseOnScroll){let Z=window.scrollY,j=!1,K=10,Y=()=>{if(!j)window.requestAnimationFrame(()=>{let z=window.scrollY,W=z-Z;if(W>K)q.collapse();else if(W<-K)q.expand();if(z<=0)q.expand();Z=z,j=!1}),j=!0};window.addEventListener("scroll",Y,{passive:!0}),requestAnimationFrame(()=>{q.expand()});let G=q.destroy;q.destroy=()=>{window.removeEventListener("scroll",Y),G.call(q)}}};try{let q=I(T,h(),S(n4($)),Y6($),g6($),$9($),G6($),P6($),v(),(Z)=>o4(e4(Z))(Z))($);return Q(q),q}catch(q){throw console.error("Extended FAB creation error:",q),Error(`Failed to create Extended FAB: ${q.message}`)}},D$=W3;n();s();c();var $5=!1,U3=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize menu controller: missing element"),$;let Q={visible:J.visible||!1,items:J.items||[],position:J.position,selectedItemId:null,activeItemIndex:-1,component:$},q={triggerEvent(B,H={},V){let O={menu:Q.component,...H,originalEvent:V,preventDefault:()=>{O.defaultPrevented=!0},defaultPrevented:!1};return $.emit(B,O),O}},Z=()=>{if($.opener&&typeof $.opener.getOpener==="function")return $.opener.getOpener();let{opener:B}=J;if(typeof B==="string"){let H=document.querySelector(B);if(!H)return console.warn(`Menu opener not found: ${B}`),null;return H}if(typeof B==="object"&&B!==null&&"element"in B)return B.element;return B},j=(B,H)=>{let V=document.createElement("li"),O=`${$.getClass("menu-item")}`;if(V.className=O,V.setAttribute("role","menuitem"),V.setAttribute("tabindex","-1"),V.setAttribute("data-id",B.id),V.setAttribute("data-index",H.toString()),B.disabled)V.classList.add(`${O}--disabled`),V.setAttribute("aria-disabled","true");else V.setAttribute("aria-disabled","false");if(Q.selectedItemId&&B.id===Q.selectedItemId)V.classList.add(`${O}--selected`),V.setAttribute("aria-selected","true");else V.setAttribute("aria-selected","false");if(B.hasSubmenu)V.classList.add(`${O}--submenu`),V.setAttribute("aria-haspopup","true"),V.setAttribute("aria-expanded","false");let M=document.createElement("span");if(M.className=`${$.getClass("menu-item-content")}`,B.icon){let R=document.createElement("span");R.className=`${$.getClass("menu-item-icon")}`,R.innerHTML=B.icon,M.appendChild(R)}let P=document.createElement("span");if(P.className=`${$.getClass("menu-item-text")}`,P.textContent=B.text,M.appendChild(P),B.shortcut){let R=document.createElement("span");R.className=`${$.getClass("menu-item-shortcut")}`,R.textContent=B.shortcut,M.appendChild(R)}if(V.appendChild(M),!B.disabled){if(V.addEventListener("click",(R)=>z(R,B,H)),V.addEventListener("keydown",(R)=>{if(R.key==="Enter"||R.key===" ")R.preventDefault(),z(R,B,H)}),V.addEventListener("focus",()=>{Q.activeItemIndex=H}),B.hasSubmenu&&J.openSubmenuOnHover)V.addEventListener("mouseenter",()=>{if($.submenu)$.submenu.handleSubmenuHover(B,H,V)}),V.addEventListener("mouseleave",(R)=>{if($.submenu)$.submenu.handleSubmenuLeave(R)})}return V},K=(B,H)=>{let V=document.createElement("li");if(V.className=`${$.getClass("menu-divider")}`,V.setAttribute("role","separator"),V.setAttribute("data-index",H.toString()),B.id)V.setAttribute("id",B.id);return V},Y=()=>{let B=document.createElement("ul");B.className=`${$.getClass("menu-list")}`,B.setAttribute("role","menu"),Q.items.forEach((H,V)=>{if("type"in H&&H.type==="divider")B.appendChild(K(H,V));else B.appendChild(j(H,V))}),$.element.innerHTML="",$.element.appendChild(B)},G=(B)=>{for(let H of Q.items){if("id"in H&&H.id===B)return H;if("submenu"in H&&Array.isArray(H.submenu)){for(let V of H.submenu)if("id"in V&&V.id===B)return V}}return null},z=(B,H,V)=>{if(B.preventDefault(),B.stopPropagation(),H.disabled)return;if(H.hasSubmenu&&$.submenu){$.submenu.handleSubmenuClick(H,V,B.currentTarget);return}let O=q.triggerEvent("select",{item:H,itemId:H.id,itemData:H.data},B);if(J.closeOnSelect&&!O.defaultPrevented)U(B,!0)},W=(B)=>{if(!$.element)return;$.element.querySelectorAll(`.${$.getClass("menu-item")}`).forEach((V)=>{if(V.getAttribute("data-id")===B)V.classList.add(`${$.getClass("menu-item--selected")}`),V.setAttribute("aria-selected","true");else V.classList.remove(`${$.getClass("menu-item--selected")}`),V.setAttribute("aria-selected","false")}),Q.selectedItemId=B},X=(B,H="mouse")=>{if(Q.visible)return;if(Q.visible=!0,document.removeEventListener("click",N),!$.element.parentNode)$.element.classList.remove(`${$.getClass("menu--visible")}`),$.element.setAttribute("aria-hidden","true"),$.element.style.transform="scaleY(0)",$.element.style.opacity="0",document.body.appendChild($.element);let V=Z();if(V&&$.position)$.position.positionMenu(V);setTimeout(()=>{$.element.setAttribute("aria-hidden","false"),$.element.style.transform="",$.element.style.opacity="",$.element.getBoundingClientRect(),$.element.classList.add(`${$.getClass("menu--visible")}`),setTimeout(()=>{if($.keyboard&&$.keyboard.handleInitialFocus)$.keyboard.handleInitialFocus($.element,H);else if(H==="keyboard"){let O=Array.from($.element.querySelectorAll(`.${$.getClass("menu-item")}:not(.${$.getClass("menu-item--disabled")})`));if(O.length>0)O.forEach((M)=>{M.tabIndex=-1}),O[0].tabIndex=0,O[0].focus();else $.element.tabIndex=0,$.element.focus()}else{$.element.tabIndex=-1;let O=Array.from($.element.querySelectorAll(`.${$.getClass("menu-item")}:not(.${$.getClass("menu-item--disabled")})`));if(O.length>0)O.forEach((M)=>{M.tabIndex=-1}),O[0].tabIndex=0}},100),setTimeout(()=>{if(J.closeOnClickOutside&&Q.visible)document.addEventListener("click",N);if(J.closeOnEscape)document.addEventListener("keydown",F);window.addEventListener("resize",k,{passive:!0}),window.addEventListener("scroll",L,{passive:!0})},0)},20),q.triggerEvent("open",{},B)},U=(B,H=!0)=>{if(!Q.visible)return;if($.emit("menu-closing",{event:B,restoreFocus:H}),$.submenu)$.submenu.closeAllSubmenus();setTimeout(()=>{Q.visible=!1,$.element.setAttribute("aria-hidden","true"),$.element.classList.remove(`${$.getClass("menu--visible")}`),document.removeEventListener("click",N),document.removeEventListener("keydown",F),window.removeEventListener("resize",k),window.removeEventListener("scroll",L),q.triggerEvent("close",{restoreFocus:H},B),setTimeout(()=>{if($.element.parentNode&&!Q.visible)$.element.parentNode.removeChild($.element)},300)},50)},_=(B,H="mouse")=>{if(Q.visible)U(B);else{if(B){if(B instanceof KeyboardEvent)H="keyboard";else if(B instanceof MouseEvent)H="mouse"}X(B,H)}},N=(B)=>{if($5){$5=!1;return}if($.element.contains(B.target))return;let H=Z();if(H&&H.contains(B.target))return;if($.submenu&&$.submenu.hasOpenSubmenu()){let V=$.submenu.getActiveSubmenus();for(let O of V)if(O.element.contains(B.target))return}U(B,!1)},F=(B)=>{let H=$.element.contains(B.target),V=$.submenu&&$.submenu.hasOpenSubmenu()&&$.submenu.getActiveSubmenus().some((O)=>O.element.contains(B.target));if(Q.visible){if(H||V){if(B.key==="Escape")B.preventDefault(),U(B,!0)}else if($.keyboard&&$.keyboard.handleMenuKeydown)$.keyboard.handleMenuKeydown(B,Q,{closeMenu:U,closeSubmenu:$.submenu?$.submenu.closeSubmenu:null,findItemById:G,handleSubmenuClick:$.submenu?$.submenu.handleSubmenuClick:null,handleNestedSubmenuClick:$.submenu?$.submenu.handleNestedSubmenuClick:null})}},k=()=>{if(Q.visible){let B=Z();if(B&&$.position)$.position.positionMenu(B)}},L=()=>{if(Q.visible)window.requestAnimationFrame(()=>{let B=Z();if(B&&$.position)$.position.positionMenu(B)})},D=()=>{if(Y(),$.keyboard&&$.keyboard.setupKeyboardHandlers)$.keyboard.setupKeyboardHandlers($.element,Q,{closeMenu:U,closeSubmenu:$.submenu?$.submenu.closeSubmenu:null,findItemById:G,handleSubmenuClick:$.submenu?$.submenu.handleSubmenuClick:null,handleNestedSubmenuClick:$.submenu?$.submenu.handleNestedSubmenuClick:null});if(Q.visible){let B=Z();if(B&&$.position)$.position.positionMenu(B);if($.element.classList.add(`${$.getClass("menu--visible")}`),J.closeOnClickOutside)document.addEventListener("click",N);if(J.closeOnEscape)document.addEventListener("keydown",F);window.addEventListener("resize",k),window.addEventListener("scroll",L)}};if($.on("create-menu-items",(B)=>{let{items:H,container:V,onItemCreated:O}=B;H.forEach((M,P)=>{let R;if("type"in M&&M.type==="divider")R=K(M,P);else R=j(M,P);if(V.appendChild(R),O)O(R)})}),setTimeout(D,0),$.lifecycle){let B=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{document.removeEventListener("click",N),document.removeEventListener("keydown",F),window.removeEventListener("resize",k),window.removeEventListener("scroll",L),B()}}return{...$,menu:{open:(B,H="mouse")=>{return X(B,H),$},close:(B,H=!0)=>{return U(B,H),$},toggle:(B,H="mouse")=>{return _(B,H),$},isOpen:()=>Q.visible,setItems:(B)=>{return Q.items=B,Y(),$},getItems:()=>Q.items,setPosition:(B)=>{if(Q.position=B,Q.visible){let H=Z();if(H&&$.position)$.position.positionMenu(H)}return $},getPosition:()=>Q.position,setSelected:(B)=>{return W(B),$},getSelected:()=>Q.selectedItemId}}},YJ=U3;var X3=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize menu opener: missing element"),$;let Q=!1;document.addEventListener("keydown",(F)=>{Q=F.key==="Tab",setTimeout(()=>{Q=!1},100)});let q={openerElement:null,openerComponent:null,activeClass:""},Z=(F)=>{if(!F)return{element:null,component:null};if(typeof F==="string"){let k=document.querySelector(F);if(!k)return console.warn(`Menu opener not found: ${F}`),{element:null,component:null};return{element:k,component:null}}if(typeof F==="object"&&F!==null){if("element"in F&&F.element instanceof HTMLElement)return{element:F.element,component:F};if("getElement"in F&&typeof F.getElement==="function"){let k=F.getElement();if(k instanceof HTMLElement)return{element:k,component:F}}if("input"in F&&F.input instanceof HTMLElement)return{element:F.input,component:F};if(F instanceof HTMLElement)return{element:F,component:null}}return console.warn("Invalid opener type:",F),{element:null,component:null}},j=(F)=>{let k=$.getClass("").split("-")[0];if(F.tagName==="BUTTON")return`${k}-button--active`;else if(F.classList.contains(`${k}-chip`))return`${k}-chip--selected`;else if(F.classList.contains(`${k}-textfield`)||F.classList.contains(`${k}-select`))return`${k}-textfield--focused`;else return`${k}-menu-opener--active`},K=(F)=>{let{element:k,component:L}=F;if(!k)return;if(q.openerElement&&q.openerElement!==k)U();q.openerElement=k,q.openerComponent=L,q.activeClass=j(k),k.addEventListener("click",z),k.addEventListener("keydown",W),k.addEventListener("blur",X),k.setAttribute("aria-haspopup","true"),k.setAttribute("aria-expanded","false");let D=$.element.id;if(!D)D=`menu-${Date.now()}-${Math.floor(Math.random()*1000)}`,$.element.id=D;k.setAttribute("aria-controls",D)},Y=(F)=>{if(!q.openerElement)return;if(q.openerComponent&&typeof q.openerComponent.setActive==="function"){q.openerComponent.setActive(F);return}if(q.openerComponent&&"selected"in q.openerComponent){q.openerComponent.selected=F;return}if(q.openerComponent&&typeof q.openerComponent.focus==="function"&&typeof q.openerComponent.blur==="function"){if(F)q.openerComponent.focus();else q.openerComponent.blur();return}if(q.openerElement.classList)if(F)q.openerElement.classList.add(q.activeClass);else q.openerElement.classList.remove(q.activeClass)},G=()=>{if(!q.openerElement)return;if(q.openerComponent&&typeof q.openerComponent.focus==="function"){requestAnimationFrame(()=>{q.openerComponent.focus()});return}if(q.openerComponent&&"input"in q.openerComponent&&q.openerComponent.input instanceof HTMLElement){requestAnimationFrame(()=>{q.openerComponent.input.focus()});return}requestAnimationFrame(()=>{q.openerElement.focus()})},z=(F)=>{if(F.preventDefault(),$.menu)if($.menu.isOpen())$.menu.close(F);else $.menu.open(F,"mouse")},W=(F)=>{if(!$.menu)return;let k=$.menu.isOpen();switch(F.key){case"Enter":case" ":case"ArrowDown":case"Down":if(F.preventDefault(),!k)$.menu.open(F,"keyboard");break;case"Escape":if(k)F.preventDefault(),$.menu.close(F);break;case"ArrowUp":case"Up":if(F.preventDefault(),!k)$.menu.open(F,"keyboard"),setTimeout(()=>{let L=$.element.querySelectorAll(`.${$.getClass("menu-item")}:not(.${$.getClass("menu-item--disabled")})`);if(L.length>0){L.forEach((B)=>B.setAttribute("tabindex","-1"));let D=L[L.length-1];D.setAttribute("tabindex","0"),D.focus()}},100);break}},X=(F)=>{if(!$.menu||!$.menu.isOpen())return;let k=F.relatedTarget;if(Q){setTimeout(()=>{if($.menu&&$.menu.isOpen())$.menu.close(F,!1)},10);return}if(k){if($.element.contains(k))return;if(k.getAttribute("aria-haspopup")==="true"||k.closest('[aria-haspopup="true"]'))return}setTimeout(()=>{if($.menu&&$.menu.isOpen())$.menu.close(F,!1)},50)},U=()=>{if(q.openerElement)q.openerElement.removeEventListener("click",z),q.openerElement.removeEventListener("keydown",W),q.openerElement.removeEventListener("blur",X),q.openerElement.removeAttribute("aria-haspopup"),q.openerElement.removeAttribute("aria-expanded"),q.openerElement.removeAttribute("aria-controls"),Y(!1);q.openerComponent=null,q.openerElement=null,q.activeClass=""},{element:_,component:N}=Z(J.opener);if(K({element:_,component:N}),$.lifecycle){let F=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{U(),F()}}return $.on("open",()=>{if(q.openerElement)q.openerElement.setAttribute("aria-expanded","true"),Y(!0)}),$.on("close",(F)=>{if(q.openerElement){if(q.openerElement.setAttribute("aria-expanded","false"),Y(!1),F.restoreFocus&&!Q)G()}}),{...$,opener:{setOpener(F){let k=Z(F);if(k.element)K(k);return $},getOpener(){return q.openerElement},getOpenerComponent(){return q.openerComponent},setActive(F){return Y(F),$},focus(){return G(),$}}}},GJ=X3;var B3=(J,$)=>{let Q=(j,K,Y,G=!1)=>{if(!j||!K)return;j.style.position="absolute";let z=window.pageXOffset||document.documentElement.scrollLeft,W=window.pageYOffset||document.documentElement.scrollTop,X=j.cloneNode(!0);X.style.visibility="hidden",X.style.display="block",X.style.position="absolute",X.style.top="0",X.style.left="0",X.style.transform="none",X.style.opacity="0",X.style.pointerEvents="none",X.classList.add(`${J.getClass("menu--visible")}`),document.body.appendChild(X);let U=K.getBoundingClientRect(),_=X.getBoundingClientRect(),N=window.innerWidth,F=window.innerHeight;document.body.removeChild(X);let k=$.offset!==void 0?$.offset:8,L=0,D=0,B=Y;if(G){if(B=Y||"right-start",B.startsWith("right")&&U.right+_.width+k>N-16)B=B.replace("right","left");else if(B.startsWith("left")&&U.left-_.width-k<16)B=B.replace("left","right");if(U.top+_.height>F-48){if(B==="right-start")B="right-end";else if(B==="left-start")B="left-end"}}else switch(Y){case"top-start":case"top":case"top-end":if(U.top<_.height+k+48)B=Y.replace("top","bottom");break;case"bottom-start":case"bottom":case"bottom-end":if(U.bottom+_.height+k+48>F){if(U.top>F-U.bottom)B=Y.replace("bottom","top")}break;case"right-start":case"right":case"left-start":case"left":if(U.bottom+_.height>F-48){if(Y==="right-start")B="right-end";else if(Y==="left-start")B="left-end";else if(Y==="right")L=U.top-(_.height-U.height)-k;else if(Y==="left")L=U.top-(_.height-U.height)-k}break}if(["position-top","position-bottom","position-right","position-left"].forEach((R)=>{j.classList.remove(`${J.getClass("menu")}--${R}`)}),B.startsWith("top")||B==="right-end"||B==="left-end"||B==="right"&&L<U.top||B==="left"&&L<U.top)j.classList.add(`${J.getClass("menu")}--position-top`);else if(B.startsWith("left"))j.classList.add(`${J.getClass("menu")}--position-left`);else if(B.startsWith("right"))j.classList.add(`${J.getClass("menu")}--position-right`);else j.classList.add(`${J.getClass("menu")}--position-bottom`);switch(B){case"top-start":L=U.top+W-_.height-k,D=U.left+z;break;case"top":L=U.top+W-_.height-k,D=U.left+z+U.width/2-_.width/2;break;case"top-end":L=U.top+W-_.height-k,D=U.right+z-_.width;break;case"right-start":L=U.top+W,D=U.right+z+k;break;case"right":if(L===0)L=U.top+W+U.height/2-_.height/2;else L+=W;D=U.right+z+k;break;case"right-end":L=U.bottom+W-_.height,D=U.right+z+k;break;case"bottom-start":L=U.bottom+W+k,D=U.left+z;break;case"bottom":L=U.bottom+W+k,D=U.left+z+U.width/2-_.width/2;break;case"bottom-end":L=U.bottom+W+k,D=U.right+z-_.width;break;case"left-start":L=U.top+W,D=U.left+z-_.width-k;break;case"left":if(L===0)L=U.top+W+U.height/2-_.height/2;else L+=W;D=U.left+z-_.width-k;break;case"left-end":L=U.bottom+W-_.height,D=U.left+z-_.width-k;break}let O=48;if(L-W<O)L=O+W;let M=48;if(L-W+_.height>F-M){let R=F-(L-W)-M,y=Math.min(_.height,100),x=Math.max(R,y);if(j.style.maxHeight=`${x}px`,$.maxHeight){let A=parseInt($.maxHeight,10);if(!isNaN(A)&&A<parseInt(j.style.maxHeight||"0",10))j.style.maxHeight=$.maxHeight}}else if($.maxHeight)j.style.maxHeight=$.maxHeight;if($.width==="100%"&&!G)j.style.width=`${U.width}px`;if(j.style.top=`${Math.max(O+W,L)}px`,j.style.left=`${Math.max(16+z,D)}px`,D-z+_.width>N-16)j.style.left="auto",j.style.right="16px"};return{positionMenu:(j)=>{if(!j||!J.element)return;Q(J.element,j,$.position,!1)},positionSubmenu:(j,K,Y=1)=>{if(!j||!K)return;let G=Y%2===1?"right-start":"left-start";j.style.zIndex=`${1000+Y*10}`,Q(j,K,G,!0)},positionElement:Q}},F3=(J)=>($)=>{if(!$.element)return $;let Q=B3($,J);return{...$,position:Q}},zJ=F3;var H3=(J)=>{let $=!1;(()=>{document.addEventListener("keydown",(G)=>{$=G.key==="Tab",setTimeout(()=>{$=!1},100)})})();let q=()=>{let z=document.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])');return Array.from(z).filter((W)=>{return W.offsetParent!==null&&!W.classList.contains("hidden")})},Z=(G,z)=>{if(z==="keyboard"){let W=Array.from(G.querySelectorAll(`.${J.getClass("menu-item")}:not(.${J.getClass("menu-item--disabled")})`));if(W.length>0)W[0].setAttribute("tabindex","0"),W[0].focus();else G.setAttribute("tabindex","0"),G.focus()}else{G.setAttribute("tabindex","-1");let W=G.querySelector(`.${J.getClass("menu-item")}:not(.${J.getClass("menu-item--disabled")})`);if(W)W.setAttribute("tabindex","0")}},j=(G,z,W)=>{let X=z.activeSubmenu&&z.activeSubmenu.contains(G.target),U=X?z.activeSubmenu:J.element,_=Array.from(U.querySelectorAll(`.${J.getClass("menu-item")}:not(.${J.getClass("menu-item--disabled")})`));if(_.length===0)return;let N=document.activeElement,F=-1;if(N&&_.includes(N))F=_.indexOf(N);let k=(L)=>{if(_[L])_[L].focus()};switch(G.key){case"ArrowDown":case"Down":if(G.preventDefault(),F<0)k(0);else if(F<_.length-1)k(F+1);else k(0);break;case"ArrowUp":case"Up":if(G.preventDefault(),F<0)k(_.length-1);else if(F>0)k(F-1);else k(_.length-1);break;case"Home":G.preventDefault(),k(0);break;case"End":G.preventDefault(),k(_.length-1);break;case"Enter":case" ":if(G.preventDefault(),F>=0)_[F].click();break;case"ArrowRight":case"Right":if(G.preventDefault(),X){if(F>=0&&_[F].classList.contains(`${J.getClass("menu-item--submenu")}`)){let D=_[F],B=parseInt(D.getAttribute("data-index"),10),V=D.closest(`.${J.getClass("menu--submenu")}`)?.getAttribute("data-parent-item"),O=W.findItemById(V);if(O&&O.submenu){let M=O.submenu[B];W.handleNestedSubmenuClick(M,B,D)}}}else if(F>=0&&_[F].classList.contains(`${J.getClass("menu-item--submenu")}`)){let D=_[F],B=parseInt(D.getAttribute("data-index"),10),H=z.items[B];W.handleSubmenuClick(H,B,D)}break;case"ArrowLeft":case"Left":if(G.preventDefault(),X)if(z.activeSubmenuItem){let D=z.activeSubmenuItem,B=parseInt(U.getAttribute("data-level")||"1",10);if(W.closeSubmenu(B),D)D.focus()}else W.closeSubmenu(1);break;case"Escape":if(G.preventDefault(),X)if(z.activeSubmenuItem){let D=z.activeSubmenuItem,B=parseInt(U.getAttribute("data-level")||"1",10);if(W.closeSubmenu(B),D)D.focus()}else W.closeSubmenu(1);else W.closeMenu(G,!0);break;case"Tab":G.preventDefault();let L=J.opener?.getOpener?.();if(W.closeMenu(G,!0),L)setTimeout(()=>{if(G.shiftKey);else{let D=q(),B=D.indexOf(L);if(B>=0&&B<D.length-1)D[B+1].focus()}},0);break}};return{handleInitialFocus:Z,handleMenuKeydown:j,setupKeyboardHandlers:(G,z,W)=>{let X=G.querySelectorAll(`.${J.getClass("menu-item")}:not(.${J.getClass("menu-item--disabled")})`);if(X.forEach((U)=>{U.tabIndex=-1}),X.length>0)X[0].tabIndex=0;G.addEventListener("keydown",(U)=>j(U,z,W))},isTabNavigationActive:()=>$,getFocusableElements:q}},M3=()=>(J)=>{if(!J.element)return J;let $=H3(J);return{...J,keyboard:$}},WJ=M3;var k3=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize menu submenu: missing element"),$;let Q={activeSubmenu:null,activeSubmenuItem:null,submenuLevel:0,activeSubmenus:[],submenuTimer:null,hoverIntent:{timer:null,activeItem:null},component:$},q=()=>{if(Q.hoverIntent.timer)clearTimeout(Q.hoverIntent.timer),Q.hoverIntent.timer=null,Q.hoverIntent.activeItem=null},Z=()=>{if(Q.submenuTimer)clearTimeout(Q.submenuTimer),Q.submenuTimer=null},j=(D,B,H)=>{if(!J.openSubmenuOnHover||!D.hasSubmenu)return;q(),Z(),Q.hoverIntent.activeItem=H,Q.hoverIntent.timer=setTimeout(()=>{if(H.matches(":hover")){if(Q.activeSubmenuItem!==H)z(D,B,H)}Q.hoverIntent.timer=null},100)},K=()=>{q(),Z(),Q.submenuTimer=setTimeout(()=>{let{activeSubmenu:D,activeSubmenuItem:B}=Q;if(D&&B){let H=D.matches(":hover"),V=B.matches(":hover");if(!H&&!V)W(Q.submenuLevel)}Q.submenuTimer=null},300)},Y=(D,B,H)=>{if(!D.submenu||!D.hasSubmenu)return;let V=H.getAttribute("aria-expanded")==="true";if(Q.activeSubmenus.some((M)=>M.isOpening))return;if(V){let M=parseInt(H.closest(`.${$.getClass("menu--submenu")}`)?.getAttribute("data-level")||"0",10);W(M+1),H.setAttribute("aria-expanded","false")}else z(D,B,H)},G=(D,B,H)=>{if(!D.submenu||!D.hasSubmenu)return;let V=H.getAttribute("aria-expanded")==="true";if(Q.activeSubmenus.some((M)=>M.isOpening))return;if(V){let M=parseInt(H.closest(`.${$.getClass("menu--submenu")}`)?.getAttribute("data-level")||"1",10);W(M+1)}else z(D,B,H)},z=(D,B,H)=>{if(!D.submenu||!D.hasSubmenu)return;let V=H.closest(`.${$.getClass("menu--submenu")}`)?parseInt(H.closest(`.${$.getClass("menu--submenu")}`).getAttribute("data-level")||"0",10)+1:1;if(W(V),Q.activeSubmenus.findIndex((y)=>y.menuItem===H&&y.isOpening)>=0)return;H.setAttribute("aria-expanded","true");let M=document.createElement("div");M.className=`${$.getClass("menu")} ${$.getClass("menu--submenu")}`,M.setAttribute("role","menu"),M.setAttribute("tabindex","-1"),M.setAttribute("data-level",V.toString()),M.setAttribute("data-parent-item",D.id),M.style.zIndex=`${1000+V*10}`;let P=document.createElement("ul");P.className=`${$.getClass("menu-list")}`;let R=[];if($.emit("create-menu-items",{items:D.submenu,container:P,level:V,onItemCreated:(y)=>{if(!y.classList.contains(`${$.getClass("menu-item--disabled")}`))R.push(y)}}),M.appendChild(P),document.body.appendChild(M),$.position&&$.position.positionSubmenu)$.position.positionSubmenu(M,H,V);if($.keyboard&&$.keyboard.setupKeyboardHandlers)$.keyboard.setupKeyboardHandlers(M,{activeSubmenus:Q.activeSubmenus},{closeSubmenu:W,handleNestedSubmenuClick:G});M.addEventListener("mouseenter",()=>{Z()}),M.addEventListener("mouseleave",()=>{K()}),Q.activeSubmenu=M,Q.activeSubmenuItem=H,Q.activeSubmenus.push({element:M,menuItem:H,level:V,isOpening:!0}),Q.submenuLevel=V,document.addEventListener("click",U),window.addEventListener("resize",_,{passive:!0}),window.addEventListener("scroll",N,{passive:!0}),requestAnimationFrame(()=>{M.classList.add(`${$.getClass("menu--visible")}`),setTimeout(()=>{let y=Q.activeSubmenus.findIndex((x)=>x.element===M);if(y!==-1)Q.activeSubmenus[y].isOpening=!1;if(R.length>0){if(V>=2||document.activeElement===H)R[0].setAttribute("tabindex","0"),R[0].focus()}},300)}),$.emit("submenu-opened",{submenuElement:M,parentItem:H,level:V,item:D})},W=(D)=>{q(),Z();let B=[];for(let H=Q.activeSubmenus.length-1;H>=0;H--)if(Q.activeSubmenus[H].level>=D){let V=Q.activeSubmenus[H];if(V.menuItem)V.menuItem.setAttribute("aria-expanded","false");V.element.classList.remove(`${$.getClass("menu--visible")}`),setTimeout(()=>{if(V.element.parentNode)V.element.parentNode.removeChild(V.element)},200),B.push(H)}if(B.forEach((H)=>{Q.activeSubmenus.splice(H,1)}),Q.activeSubmenus.length>0){let H=Q.activeSubmenus[Q.activeSubmenus.length-1];if(Q.activeSubmenu=H.element,Q.activeSubmenuItem=H.menuItem,Q.submenuLevel=H.level,H.menuItem)H.menuItem.focus()}else Q.activeSubmenu=null,Q.activeSubmenuItem=null,Q.submenuLevel=0;$.emit("submenu-closed",{level:D})},X=()=>{if(q(),Z(),Q.activeSubmenus.length===0)return;[...Q.activeSubmenus].forEach((D)=>{if(D.menuItem)D.menuItem.setAttribute("aria-expanded","false");D.element.classList.remove(`${$.getClass("menu--visible")}`),setTimeout(()=>{if(D.element.parentNode)D.element.parentNode.removeChild(D.element)},200)}),Q.activeSubmenu=null,Q.activeSubmenuItem=null,Q.activeSubmenus=[],Q.submenuLevel=0,document.removeEventListener("click",U),window.removeEventListener("resize",_),window.removeEventListener("scroll",N),$.emit("all-submenus-closed",{})},U=(D)=>{if(!Q.activeSubmenu)return;let{activeSubmenu:B,activeSubmenuItem:H}=Q;if(B.contains(D.target)||H&&H.contains(D.target))return;X()},_=()=>{if(Q.activeSubmenu&&Q.activeSubmenuItem&&$.position)$.position.positionSubmenu(Q.activeSubmenu,Q.activeSubmenuItem,Q.submenuLevel)},N=()=>{window.requestAnimationFrame(()=>{if(Q.activeSubmenu&&Q.activeSubmenuItem&&$.position)$.position.positionSubmenu(Q.activeSubmenu,Q.activeSubmenuItem,Q.submenuLevel)})},F=()=>{return Q.activeSubmenus.length>0},k=()=>{return Q.submenuLevel},L=()=>{return[...Q.activeSubmenus]};if($.lifecycle){let D=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{if(q(),Z(),document.removeEventListener("click",U),window.removeEventListener("resize",_),window.removeEventListener("scroll",N),Q.activeSubmenus.length>0)Q.activeSubmenus.forEach((B)=>{if(B.element.parentNode)B.element.parentNode.removeChild(B.element)});D()}}return $.on("menu-closing",()=>{X()}),{...$,submenu:{openSubmenu:z,closeSubmenu:W,closeAllSubmenus:X,handleSubmenuClick:Y,handleNestedSubmenuClick:G,handleSubmenuHover:j,handleSubmenuLeave:K,hasOpenSubmenu:F,getSubmenuLevel:k,getActiveSubmenus:L}}},UJ=k3;var J5=({menu:J,opener:$,events:Q,lifecycle:q})=>(Z)=>{return{element:Z.element,open(K,Y="mouse"){if(K&&!Y){if(K instanceof KeyboardEvent)Y="keyboard"}return J.open(K,Y),this},close(K,Y=!0,G=!1){return J.close(K,Y,G),this},toggle(K,Y){if(K&&!Y){if(K instanceof KeyboardEvent)Y="keyboard";else if(K instanceof MouseEvent)Y="mouse"}return J.toggle(K,Y),this},isOpen(){return J.isOpen()},setItems(K){return J.setItems(K),this},getItems(){return J.getItems()},setOpener(K){return $.setOpener(K),this},getOpener(){return $.getOpener()},setPosition(K){return J.setPosition(K),this},getPosition(){return J.getPosition()},setSelected(K){return J.setSelected(K),this},getSelected(){return J.getSelected()},on(K,Y){if(Q?.on)Q.on(K,Y);else if(Z.on)Z.on(K,Y);return this},off(K,Y){if(Q?.off)Q.off(K,Y);else if(Z.off)Z.off(K,Y);return this},destroy(){q.destroy()}}};m();var O$={BOTTOM_START:"bottom-start",BOTTOM:"bottom",BOTTOM_END:"bottom-end",TOP_START:"top-start",TOP:"top",TOP_END:"top-end",RIGHT_START:"right-start",RIGHT:"right",RIGHT_END:"right-end",LEFT_START:"left-start",LEFT:"left",LEFT_END:"left-end"},l6={POSITION:O$.BOTTOM_START,OFFSET:0,CLOSE_ON_SELECT:!0,CLOSE_ON_CLICK_OUTSIDE:!0,CLOSE_ON_ESCAPE:!0,OPEN_SUBMENU_ON_HOVER:!0,AUTO_FLIP:!0},XJ={MOUSE:"mouse",KEYBOARD:"keyboard"},BJ={ITEM:"item",DIVIDER:"divider"},FJ={OPEN:"open",CLOSE:"close",SELECT:"select"},C7={CONTAINER:"menu",VISIBLE:"menu--visible",INNER:"menu__inner",ITEM:"menu__item",ITEM_DISABLED:"menu__item--disabled",ITEM_SELECTED:"menu__item--selected",ITEM_HAS_SUBMENU:"menu__item--has-submenu",DIVIDER:"menu__divider",ITEM_ICON:"menu__item-icon",ITEM_TEXT:"menu__item-text",ITEM_SHORTCUT:"menu__item-shortcut",SUBMENU_INDICATOR:"menu__submenu-indicator"};var N3={items:[],position:l6.POSITION,closeOnSelect:l6.CLOSE_ON_SELECT,closeOnClickOutside:l6.CLOSE_ON_CLICK_OUTSIDE,closeOnEscape:l6.CLOSE_ON_ESCAPE,openSubmenuOnHover:l6.OPEN_SUBMENU_ON_HOVER,offset:l6.OFFSET,autoFlip:l6.AUTO_FLIP,visible:!1},Q5=(J)=>{if(!J.opener)throw Error("Menu component requires an opener element or selector");return b(N3,J,"menu")},q5=(J)=>{let $={};if(J.width)$.width=J.width;if(J.maxHeight)$.maxHeight=J.maxHeight;let Q={role:"menu",tabindex:"-1","aria-hidden":(!J.visible).toString(),style:Object.entries($).map(([q,Z])=>`${q}: ${Z}`).join(";")};return f(J,{tag:"div",attributes:Q,className:[J.visible?C7.VISIBLE:null,J.class].filter(Boolean),forwardEvents:{keydown:!0}})},Z5=(J)=>({menu:{open:($,Q)=>J.menu?.open($,Q),close:($,Q,q)=>J.menu?.close($,Q,q),toggle:($,Q)=>J.menu?.toggle($,Q),isOpen:()=>J.menu?.isOpen()||!1,setItems:($)=>J.menu?.setItems($),getItems:()=>J.menu?.getItems()||[],setPosition:($)=>J.menu?.setPosition($),getPosition:()=>J.menu?.getPosition(),setSelected:($)=>J.menu?.setSelected($),getSelected:()=>J.menu?.getSelected()},opener:{setOpener:($)=>J.opener?.setOpener($),getOpener:()=>J.opener?.getOpener()},submenu:{hasOpenSubmenu:()=>J.submenu?.hasOpenSubmenu()||!1,closeAllSubmenus:()=>J.submenu?.closeAllSubmenus()},events:{on:($,Q)=>J.on?.($,Q),off:($,Q)=>J.off?.($,Q)},lifecycle:{destroy:()=>J.lifecycle?.destroy()}});var L3=(J)=>{try{let $=Q5(J);return I(T,h(),S(q5($)),zJ($),WJ(),UJ($),YJ($),GJ($),v(),(q)=>J5(Z5(q))(q))($)}catch($){throw console.error("Menu creation error:",$),Error(`Failed to create menu: ${$.message}`)}},E7=L3;n();s();c();var j5=(J)=>($)=>{return{...$,element:$.element,items:$.items||new Map,addItem(q){if(typeof $.addItem==="function")$.addItem(q);return this},removeItem(q){if(typeof $.removeItem==="function")$.removeItem(q);return this},getItem(q){if(typeof $.getItem==="function")return $.getItem(q);return this.items.get(q)},getAllItems(){if(typeof $.getAllItems==="function")return $.getAllItems();return Array.from(this.items.values())},getActive(){if(typeof $.getActive==="function")return $.getActive();return null},getItemPath(q){if(typeof $.getItemPath==="function")return $.getItemPath(q);return[]},setActive(q){if(typeof $.handleItemClick==="function")$.handleItemClick(q);else if(typeof $.setActive==="function")$.setActive(q);else{let Z=this.items.get(q);if(Z&&Z.element){if($.emit)$.emit("change",{id:q,item:Z,source:"api"})}}return this},enable(){if(J.disabled.enable)J.disabled.enable();return this},disable(){if(J.disabled.disable)J.disabled.disable();return this},expand(){if(this.element.classList.remove(`${this.element.className.split(" ")[0]}--hidden`),this.element.setAttribute("aria-hidden","false"),$.emit)$.emit("expanded",{source:"api"});return this},collapse(){if(this.element.classList.add(`${this.element.className.split(" ")[0]}--hidden`),this.element.setAttribute("aria-hidden","true"),$.emit)$.emit("collapsed",{source:"api"});return this},isExpanded(){return!this.element.classList.contains(`${this.element.className.split(" ")[0]}--hidden`)},toggle(){return this.isExpanded()?this.collapse():this.expand()},on(q,Z){if($.on)$.on(q,Z);return this},off(q,Z){if($.off)$.off(q,Z);return this},destroy(){if(J.lifecycle.destroy)J.lifecycle.destroy()}}};var P$={RAIL:"rail",DRAWER:"drawer",BAR:"bar",MODAL:"modal",STANDARD:"standard"},R$={LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom"},y$={FIXED:"fixed",DISMISSIBLE:"dismissible",MODAL:"modal"},HJ={ACTIVE:"active",DISABLED:"disabled",EXPANDED:"expanded",COLLAPSED:"collapsed",HOVERED:"hovered",FOCUSED:"focused",PRESSED:"pressed"},h7={CHANGE:"change",EXPAND:"expand",COLLAPSE:"collapse",GROUP_EXPAND:"group:expand",GROUP_COLLAPSE:"group:collapse"},Z9={VARIANT:P$.STANDARD,POSITION:R$.LEFT,BEHAVIOR:y$.FIXED,EXPANDED:!1,SHOW_LABELS:!0,SCRIM_ENABLED:!0},o={CONTAINER:"nav",VARIANT_PREFIX:"nav--",POSITION_PREFIX:"nav--pos-",BEHAVIOR_PREFIX:"nav--",EXPANDED:"nav--expanded",DISABLED:"nav--disabled",ITEM:"nav-item",ITEM_CONTAINER:"nav-item-container",ICON:"nav-item-icon",LABEL:"nav-item-label",BADGE:"nav-item-badge",DIVIDER:"nav-divider",SCRIM:"nav-scrim",GROUP:"nav-group",GROUP_TITLE:"nav-group-title",SUBTITLE:"nav-subtitle",NESTED_CONTAINER:"nav-nested-container",NESTED_ITEM:"nav-nested-item",EXPAND_ICON:"nav-expand-icon",ACTIVE:"nav-item--active",ITEM_DISABLED:"nav-item--disabled"};var V3=(J)=>{let $=document.createElement("span");return $.className=`${J}-${o.EXPAND_ICON}`,$.innerHTML=`
|
|
19
19
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
|
|
20
20
|
<polyline points="9 18 15 12 9 6"></polyline>
|
|
21
21
|
</svg>
|
|
22
22
|
`,$},_3=(J,$,Q)=>{let q=document.createElement("div");return q.className=`${$}-${o.NESTED_CONTAINER}`,q.setAttribute("role","menu"),q.hidden=!0,J.forEach((Z)=>{Q(Z,q,$)}),q},A$=(J,$,Q)=>{let q=document.createElement("div");q.className=`${Q}-${o.ITEM_CONTAINER}`;let Z=$.getAttribute("role")==="menu",j=$.getAttribute("role")==="tablist",K=$.closest(`.${Q}-nav--drawer, .${Q}-nav--drawer-modal, .${Q}-nav--drawer-standard`)!==null,Y=document.createElement("button");if(Y.className=`${Q}-${o.ITEM}`,Y.type="button",J.items?.length)if(K)Y.setAttribute("role","button"),Y.setAttribute("aria-expanded",J.expanded?"true":"false"),Y.setAttribute("aria-haspopup","menu");else Y.setAttribute("role","button");else if(Z)Y.setAttribute("role","menuitem");else if(j)Y.setAttribute("role","tab"),Y.setAttribute("aria-selected",J.active?"true":"false"),Y.setAttribute("tabindex",J.active?"0":"-1");if(J.id)Y.dataset.id=J.id;if(J.disabled)Y.disabled=!0,Y.setAttribute("aria-disabled","true");if(J.icon){let G=document.createElement("span");G.className=`${Q}-${o.ICON}`,G.innerHTML=J.icon,Y.appendChild(G)}if(J.label){let G=document.createElement("a");G.className=`${Q}-${o.LABEL}`,G.textContent=J.label,G.href=`/${J.id}`,G.style.textDecoration="none",G.style.color="inherit",G.style.pointerEvents="none",G.setAttribute("title",J.label),Y.appendChild(G),Y.setAttribute("aria-label",J.label)}if(J.badge){let G=document.createElement("span");G.className=`${Q}-${o.BADGE}`,G.textContent=J.badge,G.setAttribute("aria-label",`${J.badge} notifications`),Y.appendChild(G)}if(J.active&&!J.items?.length){if(Y.classList.add(`${Q}-${o.ACTIVE}`),!j)Y.setAttribute("aria-current","page")}if(q.appendChild(Y),J.items?.length&&K){let G=V3(Q);Y.appendChild(G);let z=_3(J.items,Q,A$);z.hidden=!J.expanded,q.appendChild(z),Y.addEventListener("click",(W)=>{W.stopPropagation();let X=Y.getAttribute("aria-expanded")==="true";if(Y.setAttribute("aria-expanded",(!X).toString()),z.hidden=X,G.style)G.style.transform=X?"":"rotate(90deg)"})}return $.appendChild(q),Y},MJ=(J,$)=>{let Q=J.closest(`.${$}-${o.ITEM_CONTAINER}`);if(!Q)return[];let q=Q.querySelector(`.${$}-${o.NESTED_CONTAINER}`);if(!q)return[];return Array.from(q.querySelectorAll(`.${$}-${o.ITEM}`)).reduce((j,K)=>{return[...j,K,...MJ(K,$)]},[])};function D3(J,$){if(!J)return null;let Q=J.getAttribute("data-id");if(Q)return Q;if(J.classList.contains(`${$}-nav--rail`))return"rail";if(J.classList.contains(`${$}-nav--drawer`))return"drawer";return null}var K5=(J)=>($)=>{let Q=new Map,q=null,Z=J.prefix||"mtrl",j=(G,z)=>{if(Q.set(G.id,{element:z,config:G}),G.items?.length)G.items.forEach((W)=>{let X=z.closest(`.${Z}-${o.ITEM_CONTAINER}`);if(X){let U=X.querySelector(`.${Z}-${o.NESTED_CONTAINER}`);if(U){let _=U.querySelector(`[data-id="${W.id}"]`);if(_)j(W,_)}}})},K=(G,z,W)=>{let X=G.getAttribute("role");if(W){if(G.classList.add(`${Z}-${o.ACTIVE}`),X==="tab")G.setAttribute("aria-selected","true"),G.setAttribute("tabindex","0");else if(!G.getAttribute("aria-haspopup"))G.setAttribute("aria-current","page")}else if(G.classList.remove(`${Z}-${o.ACTIVE}`),X==="tab")G.setAttribute("aria-selected","false"),G.setAttribute("tabindex","-1");else if(G.hasAttribute("aria-current"))G.removeAttribute("aria-current")};if(J.items)J.items.forEach((G)=>{let z=A$(G,$.element,Z);if(j(G,z),G.active)q={element:z,config:G},K(z,q,!0)});if($.emit)$.element.addEventListener("mouseover",(G)=>{let W=G.target.closest("[data-id]");if(W){let X=W.dataset.id;if(X)$.emit("mouseover",{id:X,clientX:G.clientX,clientY:G.clientY,target:W,item:Q.get(X)})}},{passive:!0}),$.element.addEventListener("mouseenter",(G)=>{let z=$.element.dataset.id||$.componentName||"nav";$.emit("mouseenter",{clientX:G.clientX,clientY:G.clientY,id:z})},{passive:!0}),$.element.addEventListener("mouseleave",(G)=>{let z=G.relatedTarget,W=D3(z,Z),X=$.element.dataset.id||$.componentName||"nav";$.emit("mouseleave",{clientX:G.clientX,clientY:G.clientY,relatedTargetId:W,id:X})});if($.lifecycle){let G=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(Q.clear(),G)G()}}let Y=(G)=>{let z=[G],W=Q.get(G);if(!W)return z;let X=W.element.closest(`.${Z}-${o.ITEM_CONTAINER}`);if(!X)return z;let U=X.parentElement;if(!U||!U.classList.contains(`${Z}-${o.NESTED_CONTAINER}`))return z;let _=U;while(_){let N=_.parentElement;if(!N||!N.classList.contains(`${Z}-${o.ITEM_CONTAINER}`))break;let F=N.querySelector(`.${Z}-${o.ITEM}[data-id]`);if(!F)break;let k=F.getAttribute("data-id");if(!k)break;z.unshift(k);let L=N.parentElement;if(!L||!L.classList.contains(`${Z}-${o.NESTED_CONTAINER}`))break;_=L}return z};return{...$,items:Q,addItem(G){if(Q.has(G.id))return this;let z=A$(G,$.element,Z);if(j(G,z),G.active)this.setActive(G.id);if($.emit)$.emit("itemAdded",{id:G.id,item:{element:z,config:G}});return this},removeItem(G){let z=Q.get(G);if(!z)return this;if(MJ(z.element,Z).forEach((U)=>{let _=U.dataset.id;if(_)Q.delete(_)}),q?.config.id===G)q=null;let X=z.element.closest(`.${Z}-${o.ITEM_CONTAINER}`);if(X)X.remove();if(Q.delete(G),$.emit)$.emit("itemRemoved",{id:G,item:z});return this},getItem:(G)=>Q.get(G),getAllItems:()=>Array.from(Q.values()),getActive:()=>q,getItemPath:(G)=>Y(G),setActive(G){let z=Q.get(G);if(!z||z.config.disabled)return this;if(q)K(q.element,q,!1);if(K(z.element,z,!0),q=z,Y(G).forEach((X)=>{let U=Q.get(X);if(U){let _=U.element,N=_.closest(`.${Z}-${o.ITEM_CONTAINER}`);if(N){let F=N.querySelector(`.${Z}-${o.NESTED_CONTAINER}`);if(F)_.setAttribute("aria-expanded","true"),F.hidden=!1}}}),$.emit)$.emit(h7.CHANGE,{id:G,item:z,previousItem:q,path:Y(G)});return this}}};var c6={ITEM:"nav-item",ITEM_CONTAINER:"nav-item-container",ICON:"nav-item-icon",LABEL:"nav-item-label",BADGE:"nav-item-badge",DIVIDER:"nav-divider",SCRIM:"nav-scrim",GROUP:"nav-group",GROUP_TITLE:"nav-group-title",SUBTITLE:"nav-subtitle",NESTED_CONTAINER:"nav-nested-container",NESTED_ITEM:"nav-nested-item",EXPAND_ICON:"nav-expand-icon"};var Y5=(J)=>($)=>{let Q=J.prefix||"mtrl",q=(K,Y)=>{if(!K)return;let G=K.getAttribute("role");if(Y){if(K.classList.add(`${Q}-${c6.ITEM}--active`),G==="tab")K.setAttribute("aria-selected","true"),K.setAttribute("tabindex","0");else if(!K.getAttribute("aria-haspopup"))K.setAttribute("aria-current","page")}else if(K.classList.remove(`${Q}-${c6.ITEM}--active`),G==="tab")K.setAttribute("aria-selected","false"),K.setAttribute("tabindex","-1");else if(K.hasAttribute("aria-current"))K.removeAttribute("aria-current")},Z=(K)=>{if(K.getAttribute("aria-expanded")===null)return!1;let G=K.getAttribute("aria-expanded")==="true";K.setAttribute("aria-expanded",(!G).toString());let z=K.closest(`.${Q}-${c6.ITEM_CONTAINER}, .mtrl-nav-item-container`);if(z){let X=z.querySelector(`.${Q}-${c6.NESTED_CONTAINER}, .mtrl-nav-nested-container`);if(X){X.hidden=G;let U=K.querySelector(`.${Q}-${c6.EXPAND_ICON}, .mtrl-nav-expand-icon`);if(U&&U.style)U.style.transform=G?"":"rotate(90deg)"}}let W=K.dataset.id;if(W&&$.emit)$.emit("expandToggle",{id:W,expanded:!G});return!0},j={...$,handleItemClick(K){if(!$.items)return;let Y=$.items.get(K);if(!Y)return;let G=$.element.querySelector(`.${Q}-${c6.ITEM}--active, .mtrl-nav-item--active`);if(G)q(G,!1);if(Y.element)q(Y.element,!0);if($.emit){let z=$.getItemPath?$.getItemPath(K):[];$.emit("change",{id:K,item:Y,previousItem:G?{element:G,config:{id:G.dataset.id}}:null,path:z,source:"userAction"})}}};return $.element.addEventListener("click",(K)=>{let Y=K.target,G=Y.closest(`.${Q}-${c6.ITEM}, .mtrl-nav-item`);if(!G){if(!Y.closest("[data-id]"))return}let z=G||Y.closest("[data-id]");if(z.hasAttribute("disabled")||z.getAttribute("aria-disabled")==="true")return;let W=z.dataset.id;if(!W)return;if(Z(z))return;j.handleItemClick(W)}),$.element.addEventListener("keydown",(K)=>{if(!["Enter"," ","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].includes(K.key))return;let Y=["rail","drawer"].includes($.variant||""),G=["bar"].includes($.variant||"");if(K.key==="Enter"||K.key===" "){let _=document.activeElement;if(_&&_.classList.contains(`${Q}-${c6.ITEM}`)){if(K.preventDefault(),_.dataset.id)_.click()}return}let z=Array.from($.element.querySelectorAll(`.${Q}-${c6.ITEM}:not([disabled]):not([aria-disabled="true"]),
|
|
23
|
-
.mtrl-nav-item:not([disabled]):not([aria-disabled="true"])`));if(z.length===0)return;let W=document.activeElement,X=z.indexOf(W),U=-1;if(Y&&(K.key==="ArrowDown"||K.key==="ArrowRight")||G&&K.key==="ArrowRight")U=X<0?0:(X+1)%z.length;else if(Y&&(K.key==="ArrowUp"||K.key==="ArrowLeft")||G&&K.key==="ArrowLeft")U=X<0?z.length-1:(X-1+z.length)%z.length;else if(K.key==="Home")U=0;else if(K.key==="End")U=z.length-1;if(U>=0)K.preventDefault(),z[U].focus()}),j};m();var O3={variant:Z9.VARIANT,position:Z9.POSITION,behavior:Z9.BEHAVIOR,items:[],showLabels:Z9.SHOW_LABELS,scrimEnabled:Z9.SCRIM_ENABLED},G5=(J={})=>b(O3,J,"nav"),z5=(J)=>{let $=J.variant?`${J.prefix}-${o.VARIANT_PREFIX}${J.variant}`:"",Q=J.position?`${J.prefix}-${o.POSITION_PREFIX}${J.position}`:"",q=J.class||"",Z=[$,Q,q].filter(Boolean);return f(J,{tag:"nav",attributes:{role:"navigation","aria-label":J.ariaLabel||"Main Navigation"},className:Z})},W5=(J)=>({disabled:{enable:J.disabled?.enable||(()=>{}),disable:J.disabled?.disable||(()=>{})},lifecycle:{destroy:J.lifecycle?.destroy||(()=>{})}});var P3=(J,$)=>{let{element:Q}=J,q=$.variant||"rail",Z=$.prefix||"mtrl";if(Q.setAttribute("aria-label",$.ariaLabel||"Main Navigation"),q==="bar")if(!$.items?.some((K)=>K.items?.length))Q.setAttribute("role","tablist"),Q.setAttribute("aria-orientation","horizontal");else Q.setAttribute("role","menubar"),Q.setAttribute("aria-orientation","horizontal");else Q.setAttribute("role","navigation");if((q==="modal"||q==="drawer"&&$.behavior==="dismissible")&&!$.expanded)Q.classList.add(`${Z}-nav--hidden`)},R3=(J={})=>{let $=G5(J);try{let q=I(T,h(),S(z5($)),Y6($),B7($),K5($),Y5($),G6($),v(),(Z)=>j5(W5(Z))(Z))($);if(P3(q,$),$.disabled)q.disable();if(q.element.dataset.componentType="navigation",$.variant)q.element.dataset.variant=$.variant;return q}catch(Q){throw
|
|
23
|
+
.mtrl-nav-item:not([disabled]):not([aria-disabled="true"])`));if(z.length===0)return;let W=document.activeElement,X=z.indexOf(W),U=-1;if(Y&&(K.key==="ArrowDown"||K.key==="ArrowRight")||G&&K.key==="ArrowRight")U=X<0?0:(X+1)%z.length;else if(Y&&(K.key==="ArrowUp"||K.key==="ArrowLeft")||G&&K.key==="ArrowLeft")U=X<0?z.length-1:(X-1+z.length)%z.length;else if(K.key==="Home")U=0;else if(K.key==="End")U=z.length-1;if(U>=0)K.preventDefault(),z[U].focus()}),j};m();var O3={variant:Z9.VARIANT,position:Z9.POSITION,behavior:Z9.BEHAVIOR,items:[],showLabels:Z9.SHOW_LABELS,scrimEnabled:Z9.SCRIM_ENABLED},G5=(J={})=>b(O3,J,"nav"),z5=(J)=>{let $=J.variant?`${J.prefix}-${o.VARIANT_PREFIX}${J.variant}`:"",Q=J.position?`${J.prefix}-${o.POSITION_PREFIX}${J.position}`:"",q=J.class||"",Z=[$,Q,q].filter(Boolean);return f(J,{tag:"nav",attributes:{role:"navigation","aria-label":J.ariaLabel||"Main Navigation"},className:Z})},W5=(J)=>({disabled:{enable:J.disabled?.enable||(()=>{}),disable:J.disabled?.disable||(()=>{})},lifecycle:{destroy:J.lifecycle?.destroy||(()=>{})}});var P3=(J,$)=>{let{element:Q}=J,q=$.variant||"rail",Z=$.prefix||"mtrl";if(Q.setAttribute("aria-label",$.ariaLabel||"Main Navigation"),q==="bar")if(!$.items?.some((K)=>K.items?.length))Q.setAttribute("role","tablist"),Q.setAttribute("aria-orientation","horizontal");else Q.setAttribute("role","menubar"),Q.setAttribute("aria-orientation","horizontal");else Q.setAttribute("role","navigation");if((q==="modal"||q==="drawer"&&$.behavior==="dismissible")&&!$.expanded)Q.classList.add(`${Z}-nav--hidden`)},R3=(J={})=>{let $=G5(J);try{let q=I(T,h(),S(z5($)),Y6($),B7($),K5($),Y5($),G6($),v(),(Z)=>j5(W5(Z))(Z))($);if(P3(q,$),$.disabled)q.disable();if(q.element.dataset.componentType="navigation",$.variant)q.element.dataset.variant=$.variant;return q}catch(Q){throw Error(`Failed to create navigation: ${Q instanceof Error?Q.message:String(Q)}`)}},o9=R3;a6();n();s();c();var U5=(J)=>($)=>{let Q=[],q=$.getClass("radios"),Z=J.value||"";if($.element.classList.add(`${q}--${J.direction||"vertical"}`),J.disabled)$.element.classList.add(`${q}--disabled`);let j=(G)=>{let z=document.createElement("div");z.classList.add(`${q}-item`);let W=document.createElement("input");if(W.type="radio",W.name=J.name,W.value=G.value,W.classList.add(`${q}-input`),Z===G.value)W.checked=!0;if(J.disabled||G.disabled)W.disabled=!0,z.classList.add(`${q}-item--disabled`);let X=document.createElement("label");X.classList.add(`${q}-label`);let U=document.createElement("span");U.classList.add(`${q}-control`);let _=document.createElement("span");if(_.classList.add(`${q}-circle`),J.ripple!==!1){let L=document.createElement("span");L.classList.add(`${q}-ripple`),U.appendChild(L)}U.appendChild(_);let N=document.createElement("span");if(N.classList.add(`${q}-text`),N.textContent=G.label,G.labelBefore)X.classList.add(`${q}-label--before`),X.appendChild(N),X.appendChild(U);else X.appendChild(U),X.appendChild(N);let F=`${q}-${G.value}-${Math.random().toString(36).substring(2,9)}`;W.id=F,X.htmlFor=F,z.appendChild(W),z.appendChild(X);let k=(L)=>{if(W.checked){if(Z=G.value,Q.forEach((D)=>{if(D.input!==W)D.input.checked=!1}),$.events&&typeof $.events.emit==="function")$.events.emit("change",{value:G.value,originalEvent:L,option:G});else if(typeof $.on==="function"){let D=new CustomEvent("change",{detail:{value:G.value,originalEvent:L,option:G}});$.element.dispatchEvent(D)}}};return W.addEventListener("change",k),{element:z,input:W,label:X,config:G,destroy:()=>{if(W.removeEventListener("change",k),z.parentNode)z.parentNode.removeChild(z)}}},K=(G)=>{let z=j(G);return $.element.appendChild(z.element),Q.push(z),$},Y=(G)=>{let z=Q.findIndex((W)=>W.config.value===G);if(z!==-1){if(Q[z].destroy(),Q.splice(z,1),Z===G)Z=""}return $};if(J.options&&Array.isArray(J.options))J.options.forEach((G)=>K(G));if(!$.events)$.events={on:(G,z)=>{$.element.addEventListener(G,(W)=>z(W.detail))},off:(G,z)=>{$.element.removeEventListener(G,z)},emit:(G,z)=>{let W=new CustomEvent(G,{detail:z});$.element.dispatchEvent(W)}};return{...$,radios:Q,getValue:()=>Z,setValue:(G)=>{return Z=G,Q.forEach((z)=>{z.input.checked=z.config.value===G}),$},getSelected:()=>{let G=Q.find((z)=>z.config.value===Z);return G?G.config:null},addOption:K,removeOption:Y,enable:()=>{return $.element.classList.remove(`${q}--disabled`),Q.forEach((G)=>{if(G.input.disabled=G.config.disabled||!1,!G.config.disabled)G.element.classList.remove(`${q}-item--disabled`)}),$},disable:()=>{return $.element.classList.add(`${q}--disabled`),Q.forEach((G)=>{G.input.disabled=!0,G.element.classList.add(`${q}-item--disabled`)}),$},enableOption:(G)=>{let z=Q.find((W)=>W.config.value===G);if(z){if(z.config.disabled=!1,z.input.disabled=$.element.classList.contains(`${q}--disabled`),!z.input.disabled)z.element.classList.remove(`${q}-item--disabled`)}return $},disableOption:(G)=>{let z=Q.find((W)=>W.config.value===G);if(z)z.config.disabled=!0,z.input.disabled=!0,z.element.classList.add(`${q}-item--disabled`);return $}}};var X5=({disabled:J,lifecycle:$})=>(Q)=>{if(!Q.events)Q.events={on:(Z,j)=>{Q.element.addEventListener(Z,(K)=>j(K.detail))},off:(Z,j)=>{Q.element.removeEventListener(Z,j)},emit:(Z,j)=>{let K=new CustomEvent(Z,{detail:j});Q.element.dispatchEvent(K)}};else if(!Q.events.emit)Q.events.emit=(Z,j)=>{let K=new CustomEvent(Z,{detail:j});Q.element.dispatchEvent(K)};return{element:Q.element,radios:Q.radios,lifecycle:{destroy:$.destroy},getClass:Q.getClass,getValue:()=>Q.getValue(),setValue(Z){return Q.setValue(Z),this},getSelected:()=>Q.getSelected(),addOption(Z){return Q.addOption(Z),this},removeOption(Z){return Q.removeOption(Z),this},enable(){return J.enable(),this},disable(){return J.disable(),this},enableOption(Z){return Q.enableOption(Z),this},disableOption(Z){return Q.disableOption(Z),this},on(Z,j){return Q.events.on(Z,j),this},off(Z,j){return Q.events.off(Z,j),this},destroy(){Q.radios.forEach((Z)=>Z.destroy()),$.destroy()}}};m();var y3={name:"",direction:"vertical",disabled:!1,ripple:!0,options:[]},B5=(J)=>b(y3,J,"radios"),F5=(J)=>{return f(J,{tag:"div",attributes:{role:"radiogroup"},className:J.class})},H5=(J)=>({disabled:{enable:()=>J.disabled.enable(),disable:()=>J.disabled.disable()},lifecycle:{destroy:()=>J.lifecycle.destroy()}});var A3=(J)=>{if(!J.name)J.name=`radios-${Math.random().toString(36).substring(2,9)}`;let $=B5(J);try{return I(T,h(),S(F5($)),U5($),G6($),v(),(q)=>X5(H5(q))(q))($)}catch(Q){throw console.error("Radios creation error:",Q),Error(`Failed to create radios component: ${Q.message}`)}},kJ=A3;var NJ={CHECKED:"checked",UNCHECKED:"unchecked",DISABLED:"disabled",FOCUSED:"focused"},w$={VERTICAL:"vertical",HORIZONTAL:"horizontal"},x$={STANDARD:"standard",FILLED:"filled",OUTLINED:"outlined"},T$={RIGHT:"right",LEFT:"left"},I$={SMALL:"small",MEDIUM:"medium",LARGE:"large"},LJ={CHANGE:"change",FOCUS:"focus",BLUR:"blur"},VJ={VARIANT:x$.STANDARD,DIRECTION:w$.VERTICAL,LABEL_POSITION:T$.RIGHT,SIZE:I$.MEDIUM},_J={GROUP:"radio-group",RADIO:"radio",INPUT:"radio__input",LABEL:"radio__label",CONTROL:"radio__control",DOT:"radio__dot",FOCUS_RING:"radio__focus-ring",RIPPLE:"radio__ripple",CHECKED:"radio--checked",DISABLED:"radio--disabled",FOCUSED:"radio--focused",LABEL_RIGHT:"radio--label-right",LABEL_LEFT:"radio--label-left",SMALL:"radio--small",MEDIUM:"radio--medium",LARGE:"radio--large"};s();c();u6();var DJ=(J)=>($)=>{let Q=J.disabled===!0,Z=(J.variant||"bar")==="view",j=J.placeholder||"Search",K=J.value||"",Y=(B)=>$.getClass(B),G={type:"text",placeholder:j,value:K,"aria-label":j};if(Q)G.disabled="disabled";let z=E({tag:"div",className:Y("search-container"),container:$.element,attributes:{style:`
|
|
24
24
|
${J.minWidth?`min-width: ${J.minWidth}px;`:""}
|
|
25
25
|
${J.maxWidth?`max-width: ${J.maxWidth}px;`:""}
|
|
26
26
|
${J.fullWidth?"width: 100%;":""}
|
|
27
|
-
`}}),W=E({tag:"div",className:Y("search-leading-icon"),container:z,html:J.leadingIcon||"",attributes:{role:"button",tabindex:Q?"-1":"0","aria-label":"Search"}}),X=E({tag:"div",className:Y("search-input-wrapper"),container:z}),U=E({tag:"input",className:Y("search-input"),container:X,attributes:G}),_=E({tag:"div",className:[Y("search-clear-button"),K?"":Y("search-clear-button--hidden")],container:z,html:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',attributes:{role:"button",tabindex:Q||!K?"-1":"0","aria-label":"Clear search"}}),N,F,k;if(J.trailingIcon)N=E({tag:"div",className:Y("search-trailing-icon"),container:z,html:J.trailingIcon,attributes:{role:"button",tabindex:Q?"-1":"0","aria-label":"Search option"}});if(J.trailingIcon2)F=E({tag:"div",className:Y("search-trailing-icon"),container:z,html:J.trailingIcon2,attributes:{role:"button",tabindex:Q?"-1":"0","aria-label":"Search option"}});if(J.avatar)k=E({tag:"div",className:Y("search-avatar"),container:z,html:J.avatar});let L,D;if(Z||J.suggestions)L=E({tag:"div",className:Y("search-divider")}),D=E({tag:"div",className:Y("search-suggestions-container"),container:$.element});return $.element.classList.add($.getClass("search")),$.element.setAttribute("role","search"),$.element.setAttribute("aria-disabled",Q?"true":"false"),w3($,J,Z,Q),{...$,structure:{container:z,input:U,inputWrapper:X,leadingIcon:W,clearButton:_,trailingIcon:N,trailingIcon2:F,avatar:k,divider:L,suggestionsContainer:D}}};function w3(J,$,Q,q){let Z=J.getClass("search");if(J.element.classList.add(`${Z}--${$.variant||"bar"}`),q)J.element.classList.add(`${Z}--disabled`);if(Q)J.element.classList.add(`${Z}--expanded`);if($.fullWidth)J.element.classList.add(`${Z}--fullwidth`)}var S$={BAR:"bar",VIEW:"view"},OJ=(J)=>($)=>{if(J.disabled===!0)setTimeout(()=>{q()},0);function q(){if($.element.classList.add(`${$.getClass("search")}--disabled`),$.element.setAttribute("aria-disabled","true"),$.structure?.input)$.structure.input.disabled=!0;[$.structure?.leadingIcon,$.structure?.clearButton,$.structure?.trailingIcon,$.structure?.trailingIcon2].filter(Boolean).forEach((Y)=>{Y.tabIndex=-1,Y.setAttribute("aria-disabled","true")})}function Z(){if($.element.classList.remove(`${$.getClass("search")}--disabled`),$.element.setAttribute("aria-disabled","false"),$.structure?.input)$.structure.input.disabled=!1;if([$.structure?.leadingIcon,$.structure?.clearButton,$.structure?.trailingIcon,$.structure?.trailingIcon2].filter(Boolean).forEach((Y)=>{Y.tabIndex=0,Y.setAttribute("aria-disabled","false")}),$.structure?.clearButton&&$.structure.input&&!$.structure.input.value)$.structure.clearButton.tabIndex=-1}function j(){return Object.values(S$).find((K)=>$.element.classList.contains(`${$.getClass("search")}--${K}`))||S$.BAR}return{...$,disabled:{enable(){return Z(),this},disable(){return q(),this},isDisabled(){return $.element.classList.contains(`${$.getClass("search")}--disabled`)}},appearance:{setVariant(K){if(j()===K)return this;if(Object.values(S$).forEach((G)=>{$.element.classList.remove(`${$.getClass("search")}--${G}`)}),$.element.classList.add(`${$.getClass("search")}--${K}`),K===S$.VIEW)$.element.classList.add(`${$.getClass("search")}--expanded`);else $.element.classList.remove(`${$.getClass("search")}--expanded`);return this},getVariant(){return j()}}}};var PJ=(J)=>($)=>{if(!$.emit)console.warn("Search component requires event emission capability");if(!$.structure)return console.error("Search component missing structure"),$;let{input:Q,leadingIcon:q,clearButton:Z,trailingIcon:j,trailingIcon2:K,avatar:Y,divider:G,suggestionsContainer:z}=$.structure,W={value:J.value||"",placeholder:J.placeholder||"Search",suggestions:J.suggestions||[],isFocused:!1,isExpanded:J.variant==="view",component:$},X={triggerEvent(M,P=null){let R={search:W.component,value:W.value,originalEvent:P,preventDefault:()=>{R.defaultPrevented=!0},defaultPrevented:!1};if($.emit)$.emit(M,R);let y=`on${M.charAt(0).toUpperCase()+M.slice(1)}`;if(J[y]&&typeof J[y]==="function")J[y](W.value);return R}},U=(M,P=!0)=>{if(W.value=M,Q)Q.value=M;if(Z)if(M){if(Z.classList.remove(`${$.getClass("search-clear-button")}--hidden`),!$.disabled?.isDisabled())Z.tabIndex=0}else Z.classList.add(`${$.getClass("search-clear-button")}--hidden`),Z.tabIndex=-1;if(P)X.triggerEvent("input")},_=()=>{if(W.value){if(X.triggerEvent("submit"),!W.isExpanded)k()}},N=(M=!0)=>{if(U("",M),Q)Q.focus();if(M)X.triggerEvent("clear")},F=()=>{if(z)B()},k=()=>{if(z)z.classList.remove(`${$.getClass("search-suggestions-container")}--visible`)},L=()=>{if(W.isExpanded)return;if(W.isExpanded=!0,$.element.classList.add(`${$.getClass("search")}--expanded`),!$.element.classList.contains(`${$.getClass("search")}--view`))$.element.classList.remove(`${$.getClass("search")}--bar`),$.element.classList.add(`${$.getClass("search")}--view`);if(F(),Q)setTimeout(()=>{Q.focus()},50)},D=()=>{if(!W.isExpanded)return;if(W.isExpanded=!1,$.element.classList.remove(`${$.getClass("search")}--expanded`),!$.element.classList.contains(`${$.getClass("search")}--bar`))$.element.classList.remove(`${$.getClass("search")}--view`),$.element.classList.add(`${$.getClass("search")}--bar`);if(k(),Q)Q.blur()},B=()=>{if(!z||!W.suggestions||!W.suggestions.length)return;z.innerHTML="";let M=document.createElement("ul");if(M.className=$.getClass("search-suggestions-list"),M.setAttribute("role","listbox"),W.suggestions.forEach((P)=>{let R=document.createElement("li");if(R.className=$.getClass("search-suggestion-item"),R.setAttribute("role","option"),R.tabIndex=0,typeof P==="string"){if(R.textContent=P,W.value&&P.toLowerCase().includes(W.value.toLowerCase())){let y=P.toLowerCase().indexOf(W.value.toLowerCase()),x=P.slice(0,y),A=P.slice(y,y+W.value.length),C=P.slice(y+W.value.length);R.innerHTML=`${x}<strong>${A}</strong>${C}`}}else{if(P.icon){let x=document.createElement("span");x.className=$.getClass("search-suggestion-icon"),x.innerHTML=P.icon,R.appendChild(x)}let y=document.createElement("span");if(y.className=$.getClass("search-suggestion-text"),y.textContent=P.text,W.value&&P.text.toLowerCase().includes(W.value.toLowerCase())){let x=P.text.toLowerCase().indexOf(W.value.toLowerCase()),A=P.text.slice(0,x),C=P.text.slice(x,x+W.value.length),r=P.text.slice(x+W.value.length);y.innerHTML=`${A}<strong>${C}</strong>${r}`}if(R.appendChild(y),P.value)R.dataset.value=P.value}R.addEventListener("click",(y)=>{y.preventDefault(),y.stopPropagation();let x=R.dataset.value||(typeof P==="string"?P:P.text);U(x),_()}),M.appendChild(R)}),J.showDividers&&G&&G.parentElement!==z){let P=G.cloneNode(!0);z.appendChild(P)}z.appendChild(M),z.classList.add(`${$.getClass("search-suggestions-container")}--visible`)},H=()=>{if(Q)Q.addEventListener("input",(M)=>{if(U(M.target.value),W.isExpanded)F()}),Q.addEventListener("focus",(M)=>{if(W.isFocused=!0,$.element.classList.add(`${$.getClass("search")}--focused`),!W.isExpanded&&J.variant==="bar")L();X.triggerEvent("focus",M)}),Q.addEventListener("blur",(M)=>{if($.element.contains(M.relatedTarget))return;W.isFocused=!1,$.element.classList.remove(`${$.getClass("search")}--focused`),setTimeout(()=>{if(!W.isFocused){if(k(),W.isExpanded&&J.variant==="bar")D()}},200),X.triggerEvent("blur",M)}),Q.addEventListener("keydown",(M)=>{if(M.key==="Enter")M.preventDefault(),_();else if(M.key==="Escape"){if(M.preventDefault(),W.value)N();else if(W.isExpanded&&J.variant==="bar")D()}});if(q)q.addEventListener("click",(M)=>{if(M.preventDefault(),$.disabled?.isDisabled())return;if(W.isExpanded)D();else L();X.triggerEvent("iconClick",M)}),q.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),q.click()});if(Z)Z.addEventListener("click",(M)=>{if(M.preventDefault(),$.disabled?.isDisabled())return;N()}),Z.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),Z.click()});if(j)j.addEventListener("click",(M)=>{if(M.preventDefault(),$.disabled?.isDisabled())return;X.triggerEvent("iconClick",M)}),j.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),j.click()});if(K)K.addEventListener("click",(M)=>{if(M.preventDefault(),$.disabled?.isDisabled())return;X.triggerEvent("iconClick",M)}),K.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),K.click()});document.addEventListener("click",(M)=>{if(!$.element.contains(M.target)&&W.isExpanded){if(k(),W.isExpanded&&J.variant==="bar")D()}})},V=()=>{if(!$.element)return;document.removeEventListener("click",(M)=>{if(!$.element.contains(M.target)&&W.isExpanded){if(k(),W.isExpanded&&J.variant==="bar")D()}})},O=()=>{if(J.value&&Q){if(Q.value=J.value,Z&&J.showClearButton!==!1)Z.classList.remove(`${$.getClass("search-clear-button")}--hidden`)}if(Q)Q.setAttribute("role","searchbox"),Q.setAttribute("aria-label",W.placeholder||"Search");if(H(),W.isExpanded&&J.suggestions&&J.suggestions.length>0)F()};if($.lifecycle){let M=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{V(),M()}}return O(),{...$,search:{setValue(M,P=!0){return U(M,P),this},getValue(){return W.value},setPlaceholder(M){if(W.placeholder=M,Q)Q.placeholder=M,Q.setAttribute("aria-label",M);return this},getPlaceholder(){return W.placeholder},focus(){if(Q&&!$.disabled?.isDisabled())Q.focus();return this},blur(){if(Q)Q.blur();return this},expand(){return L(),this},collapse(){return D(),this},clear(){return N(),this},submit(){return _(),this},setSuggestions(M){if(W.suggestions=M,W.isExpanded)B();return this},showSuggestions(M){if(M)F();else k();return this}},icons:{setLeadingIcon(M){if(q)q.innerHTML=M||"";return this},setTrailingIcon(M){if(j)j.innerHTML=M||"";return this},setTrailingIcon2(M){if(K)K.innerHTML=M||"";return this},setAvatar(M){if(Y)Y.innerHTML=M||"";return this},showClearButton(M){if(Z)if(M)Z.classList.remove(`${$.getClass("search-clear-button")}--hidden`);else Z.classList.add(`${$.getClass("search-clear-button")}--hidden`);return this}}}};var M5=(J)=>($)=>{return{element:$.element,setValue(q,Z=!0){return J.search.setValue(q,Z),this},getValue(){return J.search.getValue()},setPlaceholder(q){return J.search.setPlaceholder(q),this},getPlaceholder(){return J.search.getPlaceholder()},setLeadingIcon(q){return J.icons.setLeadingIcon(q),this},setTrailingIcon(q){return J.icons.setTrailingIcon(q),this},setTrailingIcon2(q){return J.icons.setTrailingIcon2(q),this},setAvatar(q){return J.icons.setAvatar(q),this},showClearButton(q){return J.icons.showClearButton(q),this},setSuggestions(q){return J.search.setSuggestions(q),this},showSuggestions(q){return J.search.showSuggestions(q),this},focus(){return J.search.focus(),this},blur(){return J.search.blur(),this},expand(){return J.search.expand(),this},collapse(){return J.search.collapse(),this},clear(){return J.search.clear(),this},submit(){return J.search.submit(),this},enable(){return J.disabled.enable(),this},disable(){return J.disabled.disable(),this},isDisabled(){return J.disabled.isDisabled()},on(q,Z){return J.events.on(q,Z),this},off(q,Z){return J.events.off(q,Z),this},destroy(){if(J.lifecycle?.destroy)J.lifecycle.destroy()}}};m();var t9={STANDARD:"standard",BAR:"bar",RAIL:"rail",DRAWER:"drawer",MODAL:"modal"},RJ={FOCUSED:"focused",EXPANDED:"expanded",COLLAPSED:"collapsed",POPULATED:"populated",DISABLED:"disabled",SUGGESTING:"suggesting"},yJ={FOCUS:"focus",BLUR:"blur",INPUT:"input",SUBMIT:"submit",CLEAR:"clear",ICON_CLICK:"iconClick"},n9={SEARCH:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>',CLEAR:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',BACK:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>',SETTINGS:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>'},p6={VARIANT:t9.STANDARD,PLACEHOLDER:"Search",VALUE:"",LEADING_ICON:n9.SEARCH,SHOW_CLEAR_BUTTON:!0,MAX_WIDTH:480,MIN_WIDTH:240,FULL_WIDTH:!1,SHOW_DIVIDERS:!0},AJ={CONTAINER:"search",VARIANT_PREFIX:"search--",INPUT:"search__input",LEADING_ICON:"search__leading-icon",TRAILING_ICON:"search__trailing-icon",TRAILING_ICON2:"search__trailing-icon2",AVATAR:"search__avatar",CLEAR_BUTTON:"search__clear-button",SUGGESTIONS:"search__suggestions",SUGGESTION_ITEM:"search__suggestion-item",SUGGESTION_DIVIDER:"search__suggestion-divider",SUGGESTION_ICON:"search__suggestion-icon",SUGGESTION_TEXT:"search__suggestion-text",FOCUSED:"search--focused",EXPANDED:"search--expanded",POPULATED:"search--populated",DISABLED:"search--disabled",FULL_WIDTH:"search--full-width",SUGGESTING:"search--suggesting"};var x3={variant:t9.BAR,disabled:!1,placeholder:p6.PLACEHOLDER,value:p6.VALUE,leadingIcon:n9.SEARCH,showClearButton:p6.SHOW_CLEAR_BUTTON,minWidth:p6.MIN_WIDTH,maxWidth:p6.MAX_WIDTH,fullWidth:p6.FULL_WIDTH,showDividers:p6.SHOW_DIVIDERS},k5=(J={})=>b(x3,J,"search"),N5=(J)=>f(J,{tag:"div",attributes:{role:"search","aria-disabled":J.disabled===!0?"true":"false"},className:J.class}),L5=(J)=>({search:{setValue:($,Q)=>J.search?.setValue($,Q),getValue:()=>J.search?.getValue()??"",setPlaceholder:($)=>J.search?.setPlaceholder($),getPlaceholder:()=>J.search?.getPlaceholder()??"",focus:()=>J.search?.focus(),blur:()=>J.search?.blur(),expand:()=>J.search?.expand(),collapse:()=>J.search?.collapse(),clear:()=>J.search?.clear(),submit:()=>J.search?.submit(),setSuggestions:($)=>J.search?.setSuggestions($),showSuggestions:($)=>J.search?.showSuggestions($)},disabled:{enable:()=>J.disabled?.enable?.(),disable:()=>J.disabled?.disable?.(),isDisabled:()=>J.disabled?.isDisabled?.()??!1},appearance:{setColor:($)=>J.appearance?.setColor?.($),getColor:()=>J.appearance?.getColor?.()??"",setSize:($)=>J.appearance?.setSize?.($),getSize:()=>J.appearance?.getSize?.()??""},icons:{setLeadingIcon:($)=>J.icons?.setLeadingIcon?.($),setTrailingIcon:($)=>J.icons?.setTrailingIcon?.($),setTrailingIcon2:($)=>J.icons?.setTrailingIcon2?.($),setAvatar:($)=>J.icons?.setAvatar?.($),showClearButton:($)=>J.icons?.showClearButton?.($)},events:{on:($,Q)=>J.on?.($,Q),off:($,Q)=>J.off?.($,Q)},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}});var T3=(J={})=>{let $=k5(J);try{let Q=I(T,h(),S(N5($)),DJ($),OJ($),PJ($),v())($),q=L5(Q),Z=M5(q)(Q);if($.on&&typeof Z.on==="function")Object.entries($.on).forEach(([j,K])=>{if(typeof K==="function")Z.on(j,K)});return Z}catch(Q){throw console.error("Search creation error:",Q),new Error(`Failed to create search: ${Q.message}`)}},wJ=T3;s();c();var u7;((Q)=>{Q.SINGLE="single";Q.MULTI="multi"})(u7||={});var f7;((q)=>{q.DEFAULT="default";q.COMFORTABLE="comfortable";q.COMPACT="compact"})(f7||={});m();var b$={SINGLE:"single",MULTI:"multi"},v$={DEFAULT:"default",COMFORTABLE:"comfortable",COMPACT:"compact"},xJ={CHANGE:"change"},S9={MODE:b$.SINGLE,DENSITY:v$.DEFAULT,RIPPLE:!0,RIPPLE_DURATION:300,RIPPLE_TIMING:"cubic-bezier(0.4, 0, 0.2, 1)",RIPPLE_OPACITY:["0.2","0"]},V5=`
|
|
27
|
+
`}}),W=E({tag:"div",className:Y("search-leading-icon"),container:z,html:J.leadingIcon||"",attributes:{role:"button",tabindex:Q?"-1":"0","aria-label":"Search"}}),X=E({tag:"div",className:Y("search-input-wrapper"),container:z}),U=E({tag:"input",className:Y("search-input"),container:X,attributes:G}),_=E({tag:"div",className:[Y("search-clear-button"),K?"":Y("search-clear-button--hidden")],container:z,html:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',attributes:{role:"button",tabindex:Q||!K?"-1":"0","aria-label":"Clear search"}}),N,F,k;if(J.trailingIcon)N=E({tag:"div",className:Y("search-trailing-icon"),container:z,html:J.trailingIcon,attributes:{role:"button",tabindex:Q?"-1":"0","aria-label":"Search option"}});if(J.trailingIcon2)F=E({tag:"div",className:Y("search-trailing-icon"),container:z,html:J.trailingIcon2,attributes:{role:"button",tabindex:Q?"-1":"0","aria-label":"Search option"}});if(J.avatar)k=E({tag:"div",className:Y("search-avatar"),container:z,html:J.avatar});let L,D;if(Z||J.suggestions)L=E({tag:"div",className:Y("search-divider")}),D=E({tag:"div",className:Y("search-suggestions-container"),container:$.element});return $.element.classList.add($.getClass("search")),$.element.setAttribute("role","search"),$.element.setAttribute("aria-disabled",Q?"true":"false"),w3($,J,Z,Q),{...$,structure:{container:z,input:U,inputWrapper:X,leadingIcon:W,clearButton:_,trailingIcon:N,trailingIcon2:F,avatar:k,divider:L,suggestionsContainer:D}}};function w3(J,$,Q,q){let Z=J.getClass("search");if(J.element.classList.add(`${Z}--${$.variant||"bar"}`),q)J.element.classList.add(`${Z}--disabled`);if(Q)J.element.classList.add(`${Z}--expanded`);if($.fullWidth)J.element.classList.add(`${Z}--fullwidth`)}var S$={BAR:"bar",VIEW:"view"},OJ=(J)=>($)=>{if(J.disabled===!0)setTimeout(()=>{q()},0);function q(){if($.element.classList.add(`${$.getClass("search")}--disabled`),$.element.setAttribute("aria-disabled","true"),$.structure?.input)$.structure.input.disabled=!0;[$.structure?.leadingIcon,$.structure?.clearButton,$.structure?.trailingIcon,$.structure?.trailingIcon2].filter(Boolean).forEach((Y)=>{Y.tabIndex=-1,Y.setAttribute("aria-disabled","true")})}function Z(){if($.element.classList.remove(`${$.getClass("search")}--disabled`),$.element.setAttribute("aria-disabled","false"),$.structure?.input)$.structure.input.disabled=!1;if([$.structure?.leadingIcon,$.structure?.clearButton,$.structure?.trailingIcon,$.structure?.trailingIcon2].filter(Boolean).forEach((Y)=>{Y.tabIndex=0,Y.setAttribute("aria-disabled","false")}),$.structure?.clearButton&&$.structure.input&&!$.structure.input.value)$.structure.clearButton.tabIndex=-1}function j(){return Object.values(S$).find((K)=>$.element.classList.contains(`${$.getClass("search")}--${K}`))||S$.BAR}return{...$,disabled:{enable(){return Z(),this},disable(){return q(),this},isDisabled(){return $.element.classList.contains(`${$.getClass("search")}--disabled`)}},appearance:{setVariant(K){if(j()===K)return this;if(Object.values(S$).forEach((G)=>{$.element.classList.remove(`${$.getClass("search")}--${G}`)}),$.element.classList.add(`${$.getClass("search")}--${K}`),K===S$.VIEW)$.element.classList.add(`${$.getClass("search")}--expanded`);else $.element.classList.remove(`${$.getClass("search")}--expanded`);return this},getVariant(){return j()}}}};var PJ=(J)=>($)=>{if(!$.emit)console.warn("Search component requires event emission capability");if(!$.structure)return console.error("Search component missing structure"),$;let{input:Q,leadingIcon:q,clearButton:Z,trailingIcon:j,trailingIcon2:K,avatar:Y,divider:G,suggestionsContainer:z}=$.structure,W={value:J.value||"",placeholder:J.placeholder||"Search",suggestions:J.suggestions||[],isFocused:!1,isExpanded:J.variant==="view",component:$},X={triggerEvent(M,P=null){let R={search:W.component,value:W.value,originalEvent:P,preventDefault:()=>{R.defaultPrevented=!0},defaultPrevented:!1};if($.emit)$.emit(M,R);let y=`on${M.charAt(0).toUpperCase()+M.slice(1)}`;if(J[y]&&typeof J[y]==="function")J[y](W.value);return R}},U=(M,P=!0)=>{if(W.value=M,Q)Q.value=M;if(Z)if(M){if(Z.classList.remove(`${$.getClass("search-clear-button")}--hidden`),!$.disabled?.isDisabled())Z.tabIndex=0}else Z.classList.add(`${$.getClass("search-clear-button")}--hidden`),Z.tabIndex=-1;if(P)X.triggerEvent("input")},_=()=>{if(W.value){if(X.triggerEvent("submit"),!W.isExpanded)k()}},N=(M=!0)=>{if(U("",M),Q)Q.focus();if(M)X.triggerEvent("clear")},F=()=>{if(z)B()},k=()=>{if(z)z.classList.remove(`${$.getClass("search-suggestions-container")}--visible`)},L=()=>{if(W.isExpanded)return;if(W.isExpanded=!0,$.element.classList.add(`${$.getClass("search")}--expanded`),!$.element.classList.contains(`${$.getClass("search")}--view`))$.element.classList.remove(`${$.getClass("search")}--bar`),$.element.classList.add(`${$.getClass("search")}--view`);if(F(),Q)setTimeout(()=>{Q.focus()},50)},D=()=>{if(!W.isExpanded)return;if(W.isExpanded=!1,$.element.classList.remove(`${$.getClass("search")}--expanded`),!$.element.classList.contains(`${$.getClass("search")}--bar`))$.element.classList.remove(`${$.getClass("search")}--view`),$.element.classList.add(`${$.getClass("search")}--bar`);if(k(),Q)Q.blur()},B=()=>{if(!z||!W.suggestions||!W.suggestions.length)return;z.innerHTML="";let M=document.createElement("ul");if(M.className=$.getClass("search-suggestions-list"),M.setAttribute("role","listbox"),W.suggestions.forEach((P)=>{let R=document.createElement("li");if(R.className=$.getClass("search-suggestion-item"),R.setAttribute("role","option"),R.tabIndex=0,typeof P==="string"){if(R.textContent=P,W.value&&P.toLowerCase().includes(W.value.toLowerCase())){let y=P.toLowerCase().indexOf(W.value.toLowerCase()),x=P.slice(0,y),A=P.slice(y,y+W.value.length),C=P.slice(y+W.value.length);R.innerHTML=`${x}<strong>${A}</strong>${C}`}}else{if(P.icon){let x=document.createElement("span");x.className=$.getClass("search-suggestion-icon"),x.innerHTML=P.icon,R.appendChild(x)}let y=document.createElement("span");if(y.className=$.getClass("search-suggestion-text"),y.textContent=P.text,W.value&&P.text.toLowerCase().includes(W.value.toLowerCase())){let x=P.text.toLowerCase().indexOf(W.value.toLowerCase()),A=P.text.slice(0,x),C=P.text.slice(x,x+W.value.length),r=P.text.slice(x+W.value.length);y.innerHTML=`${A}<strong>${C}</strong>${r}`}if(R.appendChild(y),P.value)R.dataset.value=P.value}R.addEventListener("click",(y)=>{y.preventDefault(),y.stopPropagation();let x=R.dataset.value||(typeof P==="string"?P:P.text);U(x),_()}),M.appendChild(R)}),J.showDividers&&G&&G.parentElement!==z){let P=G.cloneNode(!0);z.appendChild(P)}z.appendChild(M),z.classList.add(`${$.getClass("search-suggestions-container")}--visible`)},H=()=>{if(Q)Q.addEventListener("input",(M)=>{if(U(M.target.value),W.isExpanded)F()}),Q.addEventListener("focus",(M)=>{if(W.isFocused=!0,$.element.classList.add(`${$.getClass("search")}--focused`),!W.isExpanded&&J.variant==="bar")L();X.triggerEvent("focus",M)}),Q.addEventListener("blur",(M)=>{if($.element.contains(M.relatedTarget))return;W.isFocused=!1,$.element.classList.remove(`${$.getClass("search")}--focused`),setTimeout(()=>{if(!W.isFocused){if(k(),W.isExpanded&&J.variant==="bar")D()}},200),X.triggerEvent("blur",M)}),Q.addEventListener("keydown",(M)=>{if(M.key==="Enter")M.preventDefault(),_();else if(M.key==="Escape"){if(M.preventDefault(),W.value)N();else if(W.isExpanded&&J.variant==="bar")D()}});if(q)q.addEventListener("click",(M)=>{if(M.preventDefault(),$.disabled?.isDisabled())return;if(W.isExpanded)D();else L();X.triggerEvent("iconClick",M)}),q.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),q.click()});if(Z)Z.addEventListener("click",(M)=>{if(M.preventDefault(),$.disabled?.isDisabled())return;N()}),Z.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),Z.click()});if(j)j.addEventListener("click",(M)=>{if(M.preventDefault(),$.disabled?.isDisabled())return;X.triggerEvent("iconClick",M)}),j.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),j.click()});if(K)K.addEventListener("click",(M)=>{if(M.preventDefault(),$.disabled?.isDisabled())return;X.triggerEvent("iconClick",M)}),K.addEventListener("keydown",(M)=>{if(M.key==="Enter"||M.key===" ")M.preventDefault(),K.click()});document.addEventListener("click",(M)=>{if(!$.element.contains(M.target)&&W.isExpanded){if(k(),W.isExpanded&&J.variant==="bar")D()}})},V=()=>{if(!$.element)return;document.removeEventListener("click",(M)=>{if(!$.element.contains(M.target)&&W.isExpanded){if(k(),W.isExpanded&&J.variant==="bar")D()}})},O=()=>{if(J.value&&Q){if(Q.value=J.value,Z&&J.showClearButton!==!1)Z.classList.remove(`${$.getClass("search-clear-button")}--hidden`)}if(Q)Q.setAttribute("role","searchbox"),Q.setAttribute("aria-label",W.placeholder||"Search");if(H(),W.isExpanded&&J.suggestions&&J.suggestions.length>0)F()};if($.lifecycle){let M=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{V(),M()}}return O(),{...$,search:{setValue(M,P=!0){return U(M,P),this},getValue(){return W.value},setPlaceholder(M){if(W.placeholder=M,Q)Q.placeholder=M,Q.setAttribute("aria-label",M);return this},getPlaceholder(){return W.placeholder},focus(){if(Q&&!$.disabled?.isDisabled())Q.focus();return this},blur(){if(Q)Q.blur();return this},expand(){return L(),this},collapse(){return D(),this},clear(){return N(),this},submit(){return _(),this},setSuggestions(M){if(W.suggestions=M,W.isExpanded)B();return this},showSuggestions(M){if(M)F();else k();return this}},icons:{setLeadingIcon(M){if(q)q.innerHTML=M||"";return this},setTrailingIcon(M){if(j)j.innerHTML=M||"";return this},setTrailingIcon2(M){if(K)K.innerHTML=M||"";return this},setAvatar(M){if(Y)Y.innerHTML=M||"";return this},showClearButton(M){if(Z)if(M)Z.classList.remove(`${$.getClass("search-clear-button")}--hidden`);else Z.classList.add(`${$.getClass("search-clear-button")}--hidden`);return this}}}};var M5=(J)=>($)=>{return{element:$.element,setValue(q,Z=!0){return J.search.setValue(q,Z),this},getValue(){return J.search.getValue()},setPlaceholder(q){return J.search.setPlaceholder(q),this},getPlaceholder(){return J.search.getPlaceholder()},setLeadingIcon(q){return J.icons.setLeadingIcon(q),this},setTrailingIcon(q){return J.icons.setTrailingIcon(q),this},setTrailingIcon2(q){return J.icons.setTrailingIcon2(q),this},setAvatar(q){return J.icons.setAvatar(q),this},showClearButton(q){return J.icons.showClearButton(q),this},setSuggestions(q){return J.search.setSuggestions(q),this},showSuggestions(q){return J.search.showSuggestions(q),this},focus(){return J.search.focus(),this},blur(){return J.search.blur(),this},expand(){return J.search.expand(),this},collapse(){return J.search.collapse(),this},clear(){return J.search.clear(),this},submit(){return J.search.submit(),this},enable(){return J.disabled.enable(),this},disable(){return J.disabled.disable(),this},isDisabled(){return J.disabled.isDisabled()},on(q,Z){return J.events.on(q,Z),this},off(q,Z){return J.events.off(q,Z),this},destroy(){if(J.lifecycle?.destroy)J.lifecycle.destroy()}}};m();var t9={STANDARD:"standard",BAR:"bar",RAIL:"rail",DRAWER:"drawer",MODAL:"modal"},RJ={FOCUSED:"focused",EXPANDED:"expanded",COLLAPSED:"collapsed",POPULATED:"populated",DISABLED:"disabled",SUGGESTING:"suggesting"},yJ={FOCUS:"focus",BLUR:"blur",INPUT:"input",SUBMIT:"submit",CLEAR:"clear",ICON_CLICK:"iconClick"},n9={SEARCH:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>',CLEAR:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',BACK:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>',SETTINGS:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>'},p6={VARIANT:t9.STANDARD,PLACEHOLDER:"Search",VALUE:"",LEADING_ICON:n9.SEARCH,SHOW_CLEAR_BUTTON:!0,MAX_WIDTH:480,MIN_WIDTH:240,FULL_WIDTH:!1,SHOW_DIVIDERS:!0},AJ={CONTAINER:"search",VARIANT_PREFIX:"search--",INPUT:"search__input",LEADING_ICON:"search__leading-icon",TRAILING_ICON:"search__trailing-icon",TRAILING_ICON2:"search__trailing-icon2",AVATAR:"search__avatar",CLEAR_BUTTON:"search__clear-button",SUGGESTIONS:"search__suggestions",SUGGESTION_ITEM:"search__suggestion-item",SUGGESTION_DIVIDER:"search__suggestion-divider",SUGGESTION_ICON:"search__suggestion-icon",SUGGESTION_TEXT:"search__suggestion-text",FOCUSED:"search--focused",EXPANDED:"search--expanded",POPULATED:"search--populated",DISABLED:"search--disabled",FULL_WIDTH:"search--full-width",SUGGESTING:"search--suggesting"};var x3={variant:t9.BAR,disabled:!1,placeholder:p6.PLACEHOLDER,value:p6.VALUE,leadingIcon:n9.SEARCH,showClearButton:p6.SHOW_CLEAR_BUTTON,minWidth:p6.MIN_WIDTH,maxWidth:p6.MAX_WIDTH,fullWidth:p6.FULL_WIDTH,showDividers:p6.SHOW_DIVIDERS},k5=(J={})=>b(x3,J,"search"),N5=(J)=>f(J,{tag:"div",attributes:{role:"search","aria-disabled":J.disabled===!0?"true":"false"},className:J.class}),L5=(J)=>({search:{setValue:($,Q)=>J.search?.setValue($,Q),getValue:()=>J.search?.getValue()??"",setPlaceholder:($)=>J.search?.setPlaceholder($),getPlaceholder:()=>J.search?.getPlaceholder()??"",focus:()=>J.search?.focus(),blur:()=>J.search?.blur(),expand:()=>J.search?.expand(),collapse:()=>J.search?.collapse(),clear:()=>J.search?.clear(),submit:()=>J.search?.submit(),setSuggestions:($)=>J.search?.setSuggestions($),showSuggestions:($)=>J.search?.showSuggestions($)},disabled:{enable:()=>J.disabled?.enable?.(),disable:()=>J.disabled?.disable?.(),isDisabled:()=>J.disabled?.isDisabled?.()??!1},appearance:{setColor:($)=>J.appearance?.setColor?.($),getColor:()=>J.appearance?.getColor?.()??"",setSize:($)=>J.appearance?.setSize?.($),getSize:()=>J.appearance?.getSize?.()??""},icons:{setLeadingIcon:($)=>J.icons?.setLeadingIcon?.($),setTrailingIcon:($)=>J.icons?.setTrailingIcon?.($),setTrailingIcon2:($)=>J.icons?.setTrailingIcon2?.($),setAvatar:($)=>J.icons?.setAvatar?.($),showClearButton:($)=>J.icons?.showClearButton?.($)},events:{on:($,Q)=>J.on?.($,Q),off:($,Q)=>J.off?.($,Q)},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}});var T3=(J={})=>{let $=k5(J);try{let Q=I(T,h(),S(N5($)),DJ($),OJ($),PJ($),v())($),q=L5(Q),Z=M5(q)(Q);if($.on&&typeof Z.on==="function")Object.entries($.on).forEach(([j,K])=>{if(typeof K==="function")Z.on(j,K)});return Z}catch(Q){throw console.error("Search creation error:",Q),Error(`Failed to create search: ${Q.message}`)}},wJ=T3;s();c();var u7;((Q)=>{Q.SINGLE="single";Q.MULTI="multi"})(u7||={});var f7;((q)=>{q.DEFAULT="default";q.COMFORTABLE="comfortable";q.COMPACT="compact"})(f7||={});m();var b$={SINGLE:"single",MULTI:"multi"},v$={DEFAULT:"default",COMFORTABLE:"comfortable",COMPACT:"compact"},xJ={CHANGE:"change"},S9={MODE:b$.SINGLE,DENSITY:v$.DEFAULT,RIPPLE:!0,RIPPLE_DURATION:300,RIPPLE_TIMING:"cubic-bezier(0.4, 0, 0.2, 1)",RIPPLE_OPACITY:["0.2","0"]},V5=`
|
|
28
28
|
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
29
29
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
30
|
-
</svg>`,TJ={CHECKMARK:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>'},IJ={CONTAINER:"segmented-button",SEGMENT:"segmented-button__segment",SELECTED:"segmented-button__segment--selected",DISABLED:"segmented-button__segment--disabled",HAS_ICON:"segmented-button__segment--has-icon",ICON:"segmented-button__icon",LABEL:"segmented-button__label",CHECKMARK:"segmented-button__checkmark",RIPPLE:"segmented-button__ripple",SINGLE_MODE:"segmented-button--single",MULTI_MODE:"segmented-button--multi",DEFAULT_DENSITY:"segmented-button--density-default",COMFORTABLE_DENSITY:"segmented-button--density-comfortable",COMPACT_DENSITY:"segmented-button--density-compact"};var I3={mode:S9.MODE,ripple:S9.RIPPLE,density:S9.DENSITY},_5=(J={})=>b(I3,J,"segmented-button"),D5=(J)=>{let $=J.density||"default";return{tag:"div",componentName:"segmented-button",attributes:{role:"group","aria-label":"Segmented button","data-mode":J.mode||"single","data-density":$},className:[J.class,J.disabled?`${J.prefix}-segmented-button--disabled`:null,$!=="default"?`${J.prefix}-segmented-button--${$}`:null],interactive:!0}},SJ=(J)=>{switch(J){case"compact":return{"--segment-padding":"4px 8px","--segment-height":"28px","--segment-font-size":"0.8125rem"};case"comfortable":return{"--segment-padding":"6px 12px","--segment-height":"32px","--segment-font-size":"0.875rem"};case"default":default:return{"--segment-padding":"8px 16px","--segment-height":"36px","--segment-font-size":"0.875rem"}}};w9();var C$=(J,$,Q,q=!1,Z={ripple:!0,rippleConfig:{}})=>{let j=q||J.disabled,K=J.icon,Y=J.checkmarkIcon||V5,G=i6({text:J.text,icon:J.selected&&J.text&&K?Y:K,value:J.value||J.text||"",disabled:j,ripple:Z.ripple,rippleConfig:Z.rippleConfig,class:J.class});if(G.element.classList.add(`${Q}-segmented-button-segment`),J.selected)G.element.classList.add(`${Q}-segment--selected`),G.element.setAttribute("aria-pressed","true");else G.element.setAttribute("aria-pressed","false");$.appendChild(G.element);let z=(X)=>{if(G.element.classList.toggle(`${Q}-segment--selected`,X),G.element.setAttribute("aria-pressed",X?"true":"false"),J.text&&K)if(X)G.setIcon(Y);else G.setIcon(K)},W=J.selected||!1;return{element:G.element,value:J.value||J.text||"",isSelected(){return W},setSelected(X){W=X,z(X)},isDisabled(){return G.disabled?.isDisabled?.()||!1},setDisabled(X){if(X)G.disable();else G.enable()},destroy(){G.destroy()}}};var S3=(J={})=>{let $=_5(J),Q=$.mode||"single",q=$.density||"default",Z=T6();try{let j=I(T,h(),S(D5($)),v())($),K=SJ(q);Object.entries(K).forEach(([N,F])=>{j.element.style.setProperty(N,F)});let Y=[];if($.segments&&$.segments.length)$.segments.forEach((N)=>{let F=C$(N,j.element,$.prefix,$.disabled,{ripple:$.ripple,rippleConfig:$.rippleConfig});Y.push(F)});if(Q==="single"&&!Y.some((N)=>N.isSelected())){let N=Y.find((F)=>!F.isDisabled());if(N)N.setSelected(!0)}let G=(N)=>{let F=N.currentTarget,k=Y.find((B)=>B.element===F);if(!k||k.isDisabled())return;let L=W();if(Q==="single")Y.forEach((B)=>{B.setSelected(B===k)});else k.setSelected(!k.isSelected());let D=W();if(L.length!==D.length||L.some((B)=>!D.includes(B))||D.some((B)=>!L.includes(B)))Z.emit("change",{selected:z(),value:D,oldValue:L})};Y.forEach((N)=>{N.element.addEventListener("click",G)});let z=()=>Y.filter((N)=>N.isSelected()),W=()=>z().map((N)=>N.value),X=(N)=>Y.find((F)=>F.value===N),U=(N)=>{if(["default","comfortable","compact"].forEach((k)=>{if(k!=="default")j.element.classList.remove(`${$.prefix}-segmented-button--${k}`)}),N!=="default")j.element.classList.add(`${$.prefix}-segmented-button--${N}`);j.element.setAttribute("data-density",N);let F=SJ(N);Object.entries(F).forEach(([k,L])=>{j.element.style.setProperty(k,L)})};return{element:j.element,segments:Y,getSelected:z,getValue(){return W()},select(N){let F=X(N);if(F&&!F.isDisabled()){let k=W();if(Q==="single")Y.forEach((D)=>D.setSelected(D===F));else F.setSelected(!0);let L=W();if(k.join(",")!==L.join(","))Z.emit("change",{selected:z(),value:L,oldValue:k})}return this},deselect(N){let F=X(N);if(F&&!F.isDisabled())if(Q==="single"){if(z().length>1||!F.isSelected()){let L=W();F.setSelected(!1);let D=W();if(L.join(",")!==D.join(","))Z.emit("change",{selected:z(),value:D,oldValue:L})}}else{let k=W();F.setSelected(!1);let L=W();if(k.join(",")!==L.join(","))Z.emit("change",{selected:z(),value:L,oldValue:k})}return this},enable(){return j.element.classList.remove(`${$.prefix}-segmented-button--disabled`),Y.forEach((N)=>{if(!$.segments?.find((F)=>F.value===N.value)?.disabled)N.setDisabled(!1)}),this},disable(){return j.element.classList.add(`${$.prefix}-segmented-button--disabled`),Y.forEach((N)=>{N.setDisabled(!0)}),this},enableSegment(N){let F=X(N);if(F)F.setDisabled(!1);return this},disableSegment(N){let F=X(N);if(F)F.setDisabled(!0);return this},setDensity(N){return U(N),this},getDensity(){return j.element.getAttribute("data-density")||"default"},on(N,F){return Z.on(N,F),this},off(N,F){return Z.off(N,F),this},destroy(){Y.forEach((N)=>{N.element.removeEventListener("click",G),N.destroy()}),Z.clear(),j.lifecycle.destroy()}}}catch(j){throw console.error("Segmented Button creation error:",j),new Error(`Failed to create segmented button: ${j.message}`)}},E$=S3;n();s();c();var b6={BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right"},e9={OPEN:"open",CLOSE:"close",DRAG_START:"dragstart",DRAG_END:"dragend"};var bJ=(J)=>($)=>{let{position:Q=b6.BOTTOM}=J,q=`${$.getClass("sheet")}--${Q.toLowerCase()}`;return $.element.classList.add(q),{...$,position:{setPosition(Z){$.element.classList.remove(q);let j=`${$.getClass("sheet")}--${Z.toLowerCase()}`;$.element.classList.add(j)},getPosition(){return Q}}}};var vJ=(J)=>($)=>{let{content:Q=""}=J,q=document.createElement("div");return q.className=`${$.getClass("sheet")}-content`,q.innerHTML=Q,$.container=document.createElement("div"),$.container.className=`${$.getClass("sheet")}-container`,$.container.appendChild(q),$.element.appendChild($.container),{...$,content:{setContent(Z){return q.innerHTML=Z,this},getContent(){return q.innerHTML},getElement(){return q}}}};var CJ=(J)=>($)=>{let{title:Q=""}=J,q=null;if(Q||J.dragHandle){if(q=document.createElement("div"),q.className=`${$.getClass("sheet")}-title`,Q)q.textContent=Q;if($.container.insertBefore(q,$.container.firstChild),J.dragHandle){let Z=document.createElement("div");Z.className=`${$.getClass("sheet")}-handle`,$.container.insertBefore(Z,$.container.firstChild),$.dragHandle={element:Z,setVisible(j){Z.style.display=j?"block":"none"}}}}return{...$,title:{setTitle(Z){if(!q&&Z)q=document.createElement("div"),q.className=`${$.getClass("sheet")}-title`,$.container.insertBefore(q,$.content.getElement());if(q)q.textContent=Z;return this},getTitle(){return q?q.textContent||"":""},getElement(){return q}}}};var EJ=(J)=>($)=>{let{open:Q=!1,dismissible:q=!0}=J,Z=Q,j=document.createElement("div");if(j.className=`${$.getClass("sheet")}-scrim`,$.element.parentNode?.insertBefore(j,$.element.nextSibling),q)$.element.classList.add(`${$.getClass("sheet")}--dismissible`),j.addEventListener("click",()=>{if(q)Y()});if(Q)$.element.classList.add(`${$.getClass("sheet")}--open`);if(J.elevation)$.element.classList.add(`${$.getClass("sheet")}--elevation-${J.elevation}`);document.addEventListener("keydown",(G)=>{if(G.key==="Escape"&&Z&&q)Y()});function K(){if(!Z){if(Z=!0,$.element.classList.add(`${$.getClass("sheet")}--open`),$.events.emit(e9.OPEN),J.onOpen)J.onOpen()}}function Y(){if(Z){if(Z=!1,$.element.classList.remove(`${$.getClass("sheet")}--open`),$.events.emit(e9.CLOSE),J.onClose)J.onClose()}}return{...$,state:{open:K,close:Y,isOpen(){return Z},setDismissible(G){if(G)$.element.classList.add(`${$.getClass("sheet")}--dismissible`);else $.element.classList.remove(`${$.getClass("sheet")}--dismissible`)}},initialize(){if(j.parentNode!==$.element.parentNode)$.element.parentNode?.insertBefore(j,$.element.nextSibling)}}};var hJ=(J)=>($)=>{if(J.enableGestures===!1)return $;let Q=J.position||b6.BOTTOM,q=0,Z=0,j=!1,K=$.dragHandle?.element||$.element,Y=(U)=>{if(!$.state.isOpen())return;if(j=!0,document.body.style.userSelect="none",U.type==="touchstart")q=U.touches[0].clientY,Z=U.touches[0].clientX;else q=U.clientY,Z=U.clientX,document.addEventListener("mousemove",G),document.addEventListener("mouseup",z);$.events.emit(e9.DRAG_START)},G=(U)=>{if(!j)return;let _,N;if(U.type==="touchmove")_=U.touches[0].clientY,N=U.touches[0].clientX;else _=U.clientY,N=U.clientX;let F=0;switch(Q){case b6.BOTTOM:if(F=_-q,F<0)F=0;$.element.style.transform=`translateY(${F}px)`;break;case b6.TOP:if(F=q-_,F<0)F=0;$.element.style.transform=`translateY(-${F}px)`;break;case b6.LEFT:if(F=Z-N,F<0)F=0;$.element.style.transform=`translateX(-${F}px)`;break;case b6.RIGHT:if(F=N-Z,F<0)F=0;$.element.style.transform=`translateX(${F}px)`;break}let k=Q===b6.BOTTOM||Q===b6.TOP?$.element.offsetHeight:$.element.offsetWidth,L=Math.min(F/k,1),D=$.element.nextElementSibling;if(D&&D.classList.contains(`${$.getClass("sheet")}-scrim`))D.style.opacity=`${0.32*(1-L)}`},z=()=>{if(!j)return;j=!1,document.body.style.userSelect="",document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",z);let U=Q===b6.BOTTOM||Q===b6.TOP?$.element.offsetHeight:$.element.offsetWidth,_=0;if($.element.style.transform){let N=$.element.style.transform.match(/translate[XY]\(([^p]+)px\)/);_=N?parseFloat(N[1]):0}if(_>U*0.3)$.state.close();else{$.element.style.transform="";let N=$.element.nextElementSibling;if(N&&N.classList.contains(`${$.getClass("sheet")}-scrim`))N.style.opacity=""}$.events.emit(e9.DRAG_END)};K.addEventListener("touchstart",Y),K.addEventListener("touchmove",G),K.addEventListener("touchend",z),K.addEventListener("mousedown",Y);let W=()=>{K.removeEventListener("touchstart",Y),K.removeEventListener("touchmove",G),K.removeEventListener("touchend",z),K.removeEventListener("mousedown",Y),document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",z)},X=$.lifecycle?.destroy||(()=>{});return $.lifecycle={...$.lifecycle,destroy:()=>{W(),X()}},$};var O5=({state:J,lifecycle:$})=>(Q)=>({...Q,element:Q.element,container:Q.container,open(){return J.open(),this},close(){return J.close(),this},setContent(q){return Q.content.setContent(q),this},getContent(){return Q.content.getContent()},setTitle(q){return Q.title.setTitle(q),this},getTitle(){return Q.title.getTitle()},setDragHandle(q){if(Q.dragHandle)Q.dragHandle.setVisible(q);return this},setMaxHeight(q){return Q.container.style.maxHeight=q,this},destroy(){$.destroy()},initialize(){if(Q.initialize)Q.initialize();return this}});m();var M9={STANDARD:"standard",MODAL:"modal",EXPANDED:"expanded"},b9={BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right"},uJ={OPEN:"open",CLOSE:"close",DRAG_START:"dragstart",DRAG_END:"dragend"},h$={LEVEL_1:1,LEVEL_2:2,LEVEL_3:3,LEVEL_4:4,LEVEL_5:5},j9={VARIANT:M9.STANDARD,POSITION:b9.BOTTOM,OPEN:!1,DISMISSIBLE:!0,DRAG_HANDLE:!0,ELEVATION:h$.LEVEL_3,TITLE:"",CONTENT:"",MAX_HEIGHT:"80%",ENABLE_GESTURES:!0},fJ={DURATION:300,TIMING:"cubic-bezier(0.4, 0, 0.2, 1)",DELAY:0},gJ={MIN_VELOCITY:0.3,MIN_DISTANCE:30,DISMISS_THRESHOLD:0.3},dJ={CONTAINER:"sheet",SCRIM:"sheet__scrim",PANEL:"sheet__panel",DRAG_HANDLE:"sheet__drag-handle",TITLE:"sheet__title",CONTENT:"sheet__content",STANDARD:"sheet--standard",MODAL:"sheet--modal",EXPANDED:"sheet--expanded",BOTTOM:"sheet--bottom",TOP:"sheet--top",LEFT:"sheet--left",RIGHT:"sheet--right",OPEN:"sheet--open",DRAGGING:"sheet--dragging",ELEVATION_PREFIX:"sheet--elevation-"};var b3={variant:M9.STANDARD,position:b9.BOTTOM,open:j9.OPEN,dismissible:j9.DISMISSIBLE,dragHandle:j9.DRAG_HANDLE,elevation:j9.ELEVATION,enableGestures:j9.ENABLE_GESTURES},P5=(J={})=>b(b3,J,"sheet"),R5=(J)=>{return f(J,{tag:"div",attributes:{role:"dialog","aria-modal":J.variant===M9.MODAL?"true":"false"},className:J.class,forwardEvents:{click:!0,keydown:!0}})},y5=(J)=>({state:{open:()=>J.state.open(),close:()=>J.state.close()},lifecycle:{destroy:()=>J.lifecycle.destroy()}});var v3=(J={})=>{let $=P5(J);try{let Q=I(T,h(),S(R5($)),Y6($),bJ($),vJ($),CJ($),EJ($),hJ($),v(),(q)=>O5(y5(q))(q))($);return Q.initialize(),Q}catch(Q){throw console.error("Sheet creation error:",Q),new Error(`Failed to create sheet: ${Q.message}`)}},rJ=v3;s();c();u6();var lJ=(J)=>($)=>{if(!J.range||!J.secondValue||!$.schema)return $;try{let Q=J.min||0,q=J.max||100,Z=J.secondValue,j=(Z-Q)/(q-Q)*100,K=J.valueFormatter||((U)=>U.toString()),Y=J.disabled===!0,G=$.getClass,z=JSON.parse(JSON.stringify($.schema)),W=z.element.options.className||[];if(Array.isArray(W))W.push(G("slider--range"));else z.element.options.className=`${W} ${G("slider--range")}`.trim();let X=z.element.children.container.children;return X.secondHandle={name:"secondHandle",creator:E,options:{tag:"div",className:G("slider-handle"),attributes:{role:"slider","aria-valuemin":String(Q),"aria-valuemax":String(q),"aria-valuenow":String(Z),"aria-orientation":"horizontal",tabindex:Y?"-1":"0","aria-disabled":Y?"true":"false","data-value":String(Z),"data-handle-index":"1"},style:{left:`${j}%`}}},X.secondValueBubble={name:"secondValueBubble",creator:E,options:{tag:"div",className:G("slider-value"),attributes:{"aria-hidden":"true","data-handle-index":"1"},text:K(Z),style:{left:`${j}%`}}},{...$,schema:z}}catch(Q){return console.warn("Error enhancing structure with range functionality:",Q),$}};var o6={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",ERROR:"error"},V6={XS:16,S:24,M:40,L:56,XL:80},Z6={HANDLE_SIZE:16,SMALL_HANDLE_HEIGHT:48,HANDLE_HEIGHT_OFFSET:16,MIN_HEIGHT:40,TRACK_RADIUS:3,SMALL_TRACK_EXTERNAL_RADIUS:10,LARGE_TRACK_RADIUS_RATIO:0.35,TICK_SIZE:4,DOT_SIZE:4,HANDLE_GAP:8,HANDLE_GAP_PRESSED_REDUCTION:2,CENTER_GAP:4,EDGE_PADDING:7},M6={CHANGE:"change",INPUT:"input",FOCUS:"focus",BLUR:"blur",START:"start",END:"end"},g7={START:"start",END:"end"},k6={MIN:0,MAX:100,VALUE:0,STEP:1,DISABLED:!1,COLOR:o6.PRIMARY,SIZE:"XS",TICKS:!1,SHOW_VALUE:!0,SNAP_TO_STEPS:!0,RANGE:!1,CENTERED:!1,ICON_POSITION:g7.START,LABEL_POSITION:g7.START},pJ={ROOT:"slider",CONTAINER:"slider__container",FILL:"slider__fill",HANDLE:"slider__handle",HANDLE_SECOND:"slider__handle--second",LABEL:"slider__label",VALUE:"slider__value",ICON:"slider__icon",DISABLED:"slider--disabled",FOCUSED:"slider--focused",DRAGGING:"slider--dragging",RANGE:"slider--range",PRIMARY:"slider--primary",SECONDARY:"slider--secondary",TERTIARY:"slider--tertiary",ERROR:"slider--error"};var sJ=(J)=>($)=>{if(J.disabled===!0)setTimeout(()=>{q()},0);function q(){if($.element.classList.add(`${$.getClass("slider")}--disabled`),$.element.setAttribute("aria-disabled","true"),$.structure?.handle)$.structure.handle.tabIndex=-1,$.structure.handle.setAttribute("aria-disabled","true");if(J.range&&$.structure?.secondHandle)$.structure.secondHandle.tabIndex=-1,$.structure.secondHandle.setAttribute("aria-disabled","true");if($.drawCanvas)$.drawCanvas()}function Z(){if($.element.classList.remove(`${$.getClass("slider")}--disabled`),$.element.setAttribute("aria-disabled","false"),$.structure?.handle)$.structure.handle.tabIndex=0,$.structure.handle.setAttribute("aria-disabled","false");if(J.range&&$.structure?.secondHandle)$.structure.secondHandle.tabIndex=0,$.structure.secondHandle.setAttribute("aria-disabled","false");if($.drawCanvas)$.drawCanvas()}function j(){return Object.values(o6).find((Y)=>$.element.classList.contains(`${$.getClass("slider")}--${Y}`))||o6.PRIMARY}function K(){return Object.keys(V6).find((z)=>$.element.classList.contains(`${$.getClass("slider")}--${z.toLowerCase()}`))||"XS"}return{...$,disabled:{enable(){return Z(),this},disable(){return q(),this},isDisabled(){return $.element.classList.contains(`${$.getClass("slider")}--disabled`)}},appearance:{setColor(Y){if(Object.values(o6).forEach((G)=>{$.element.classList.remove(`${$.getClass("slider")}--${G}`)}),Y!==o6.PRIMARY)$.element.classList.add(`${$.getClass("slider")}--${Y}`);return this},getColor(){return j()},setSize(Y){Object.keys(V6).forEach((W)=>{$.element.classList.remove(`${$.getClass("slider")}--${W.toLowerCase()}`)});let z;if(typeof Y==="string"&&Y in V6)z=Y;else if(typeof Y==="number"){let W=Object.entries(V6).find(([,X])=>X===Y);z=W?W[0]:"XS"}else z="XS";return $.element.classList.add(`${$.getClass("slider")}--${z.toLowerCase()}`),this},getSize(){return K()},showTicks(Y){if(J.ticks=Y,$.slider)$.slider.regenerateTicks();return this},showCurrentValue(Y){return J.showValue=Y,this}}}};var A5=(J,$,Q,q)=>{let Z=$.component?.components||{},j=$.component||{},K=j.container||Z.container||null,Y=j.handle||Z.handle||null,G=j.valueBubble||Z.valueBubble||null,z=j.secondHandle||Z.secondHandle||null,W=j.secondValueBubble||Z.secondValueBubble||null,{getValueFromPosition:X=()=>0,roundToStep:U=(w)=>w,clamp:_=(w)=>w,showValueBubble:N=()=>{},render:F=()=>{}}=Q,{triggerEvent:k=()=>({defaultPrevented:!1})}=q,L=!1,D=0,B=3,H=null,V=()=>{if($.valueHideTimer)clearTimeout($.valueHideTimer),$.valueHideTimer=null},O=()=>{if(V(),G)N(G,!1);if(W)N(W,!1)},M=(w)=>{if(O(),w&&J.showValue)N(w,!0)},P=(w,l=0)=>{if(V(),!w||!J.showValue)return;if(l>0)$.valueHideTimer=setTimeout(()=>{N(w,!1)},l);else N(w,!1)},R=()=>{if(Y)Y.classList.remove(`${$.component.getClass("slider-handle")}--focused`);if(z)z.classList.remove(`${$.component.getClass("slider-handle")}--focused`);try{let w=$.component.getClass("slider-handle--focused");if(document.querySelectorAll(`.${w}`).forEach((l)=>{l.classList.remove(w)}),document.activeElement?.classList.contains($.component.getClass("slider-handle")))document.activeElement.blur()}catch(w){console.warn("Error clearing keyboard focus:",w)}},y=(w,l=!1)=>{if(!$.component||$.component.disabled&&$.component.disabled.isDisabled())return;w.preventDefault(),w.stopPropagation(),O(),R(),D=w.type.includes("touch")?w.touches[0].clientX:w.clientX,$.dragging=!1,$.pressed=!0,L=!1,$.activeHandle=l?"second":"first",$.activeBubble=l?W:G,M($.activeBubble),document.addEventListener("mousemove",A),document.addEventListener("mouseup",C),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",C),F(),k(M6.START,w)},x=(w)=>{if(!$.component||$.component.disabled&&$.component.disabled.isDisabled()||!K)return;w.preventDefault(),O(),R();let l=!1;try{let a=w.type.includes("touch")?w.touches[0].clientX:w.clientX,i=X(a);if(J.snapToSteps&&$.step>0)i=U(i);if(i=_(i,$.min,$.max),J.range&&$.secondValue!==null){let O6=Math.abs(i-$.value);l=Math.abs(i-$.secondValue)<O6,l?$.secondValue=i:$.value=i}else if(J.centered&&$.component.slider&&$.component.slider.setValue)$.component.slider.setValue(i,!1);else $.value=i;F(),k(M6.INPUT,w)}catch(a){console.warn("Error handling track click:",a)}if($.activeHandle=l?"second":"first",$.activeBubble=l?W:G,D=w.type.includes("touch")?w.touches[0].clientX:w.clientX,J.centered&&!J.range)M($.activeBubble),document.addEventListener("mousemove",A),document.addEventListener("mouseup",C),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",C),$.pressed=!1,k(M6.START,w);else $.dragging=!1,$.pressed=!1,L=!1,M($.activeBubble),document.addEventListener("mousemove",A),document.addEventListener("mouseup",C),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",C),F(),k(M6.START,w)},A=(w)=>{if(!$.activeHandle||!K)return;w.preventDefault();try{let l=w.type.includes("touch")?w.touches[0].clientX:w.clientX;if(!L&&Math.abs(l-D)>=B)L=!0,$.dragging=!0,$.component.element.classList.add(`${$.component.getClass("slider")}--dragging`);let a=X(l);if(J.snapToSteps&&$.step>0)a=U(a);a=_(a,$.min,$.max);let i=$.activeHandle==="second";if(J.range&&$.secondValue!==null)if(i)if(a>=$.value)$.secondValue=a;else P($.activeBubble,0),$.secondValue=$.value,$.value=a,$.activeHandle="first",$.activeBubble=G,M($.activeBubble);else if(a<=$.secondValue)$.value=a;else P($.activeBubble,0),$.value=$.secondValue,$.secondValue=a,$.activeHandle="second",$.activeBubble=W,M($.activeBubble);else{if(J.centered)$.previousValue=$.value;$.value=a}F(),k(M6.INPUT,w)}catch(l){console.warn("Error during slider drag:",l)}},C=(w)=>{if(!$.activeHandle)return;w.preventDefault(),$.dragging=!1,$.pressed=!1,L=!1,$.component.element.classList.remove(`${$.component.getClass("slider")}--dragging`),P($.activeBubble,1000),document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",C),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",C),$.activeHandle=null,F(),k(M6.CHANGE,w),k(M6.END,w)},r=(w,l=!1)=>{if($.component.disabled&&$.component.disabled.isDisabled())return;let a=$.step||1,i=l?$.secondValue:$.value,O6=w.shiftKey?a*10:a;if(w.key==="Tab")return;let J6=!1;switch(w.key){case"ArrowRight":case"ArrowUp":w.preventDefault(),i=Math.min(i+O6,$.max),J6=!0;break;case"ArrowLeft":case"ArrowDown":w.preventDefault(),i=Math.max(i-O6,$.min),J6=!0;break;case"Home":w.preventDefault(),i=$.min,J6=!0;break;case"End":w.preventDefault(),i=$.max,J6=!0;break;case"PageUp":w.preventDefault(),i=Math.min(i+a*10,$.max),J6=!0;break;case"PageDown":w.preventDefault(),i=Math.max(i-a*10,$.min),J6=!0;break;default:return}if(!J6)return;if($.activeBubble=l?W:G,M($.activeBubble),l)$.secondValue=i;else{if(J.centered)$.previousValue=$.value;$.value=i}F(),k(M6.INPUT,w),k(M6.CHANGE,w)},Q6=(w,l=!1)=>{if($.component.disabled&&$.component.disabled.isDisabled())return;let a=l?z:Y;if(H&&H!==a)O();H=a,a.classList.add(`${$.component.getClass("slider-handle")}--focused`),M(l?W:G),$.activeBubble=l?W:G,k(M6.FOCUS,w)},X6=(w,l=!1)=>{(l?z:Y).classList.remove(`${$.component.getClass("slider-handle")}--focused`);let i=w.relatedTarget;if(!i||i!==(l?Y:z))P(l?W:G,200);k(M6.BLUR,w)};return{handleHandleMouseDown:y,handleTrackMouseDown:x,handleMouseMove:A,handleMouseUp:C,handleKeyDown:r,handleFocus:Q6,handleBlur:X6,setupEventListeners:()=>{if(!$.component||!Y){console.warn("Cannot set up event listeners: missing component or handle");return}if(K.addEventListener("mousedown",x),K.addEventListener("touchstart",x,{passive:!1}),Y.addEventListener("mousedown",(w)=>y(w,!1)),Y.addEventListener("touchstart",(w)=>y(w,!1),{passive:!1}),Y.addEventListener("keydown",(w)=>r(w,!1)),Y.addEventListener("focus",(w)=>Q6(w,!1)),Y.addEventListener("blur",(w)=>X6(w,!1)),J.range&&z)z.addEventListener("mousedown",(w)=>y(w,!0)),z.addEventListener("touchstart",(w)=>y(w,!0),{passive:!1}),z.addEventListener("keydown",(w)=>r(w,!0)),z.addEventListener("focus",(w)=>Q6(w,!0)),z.addEventListener("blur",(w)=>X6(w,!0))},cleanupEventListeners:()=>{if(!$.component)return;if(K)K.removeEventListener("mousedown",x),K.removeEventListener("touchstart",x);if(Y)Y.removeEventListener("mousedown",(w)=>y(w,!1)),Y.removeEventListener("touchstart",(w)=>y(w,!1)),Y.removeEventListener("keydown",(w)=>r(w,!1)),Y.removeEventListener("focus",(w)=>Q6(w,!1)),Y.removeEventListener("blur",(w)=>X6(w,!1));if(J.range&&z)z.removeEventListener("mousedown",(w)=>y(w,!0)),z.removeEventListener("touchstart",(w)=>y(w,!0)),z.removeEventListener("keydown",(w)=>r(w,!0)),z.removeEventListener("focus",(w)=>Q6(w,!0)),z.removeEventListener("blur",(w)=>X6(w,!0));document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",C),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",C)},showActiveBubble:M,hideActiveBubble:P,hideAllBubbles:O,clearKeyboardFocus:R}};var mJ=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize slider controller: missing element"),$;let Q={component:$,value:J.value!==void 0?J.value:0,secondValue:J.secondValue!==void 0?J.secondValue:null,min:J.min!==void 0?J.min:0,max:J.max!==void 0?J.max:100,step:J.step!==void 0?J.step:1,dragging:!1,pressed:!1,activeHandle:null,activeBubble:null,valueHideTimer:null},q={triggerEvent(H,V=null){let O={slider:Q.component,value:Q.value,secondValue:Q.secondValue,originalEvent:V,preventDefault:()=>{O.defaultPrevented=!0},defaultPrevented:!1};return Q.component.emit(H,O),O}},Z=()=>{if(!Q.component)return{};let H=Q.component.components||{},V=Q.component;return{container:V.container||H.container,handle:V.handle||H.handle,valueBubble:V.valueBubble||H.valueBubble,secondHandle:V.secondHandle||H.secondHandle,secondValueBubble:V.secondValueBubble||H.secondValueBubble,...H}},j=(H)=>{let V=Q.max-Q.min;return V===0?0:(H-Q.min)/V*100},K=()=>{let H=Z(),{handle:V,container:O}=H;if(!V||!O)return null;try{let M=V.getBoundingClientRect(),P=O.getBoundingClientRect(),R=M.width||Z6.HANDLE_SIZE,y=P.width,x=Z6.EDGE_PADDING/y*100,C=(Q.activeHandle?6:8)/y*100;return{handleSize:R,trackSize:y,edgeConstraint:x,paddingPercent:C}}catch(M){return console.warn("Error calculating track dimensions:",M),{handleSize:Z6.HANDLE_SIZE,trackSize:200,edgeConstraint:3,paddingPercent:4}}},Y=(H,V=200)=>{let O=Z6.EDGE_PADDING/V*100,M=O,P=100-O,R=P-M;if(H<=0)return M;if(H>=100)return P;return M+H/100*R},G=(H)=>{let V=Z(),{handle:O,container:M}=V;if(!O||!M)return Q.min;try{let P=M.getBoundingClientRect(),R=Q.max-Q.min,y=P.left+Z6.EDGE_PADDING,x=P.right-Z6.EDGE_PADDING,A=x-y,r=(Math.max(y,Math.min(x,H))-y)/A;return Q.min+r*R}catch(P){return console.warn("Error calculating value from position:",P),Q.min}},z=(H)=>{let V=Q.step;if(!V||V<=0)return H;let O=Math.round((H-Q.min)/V);return Q.min+O*V},W=(H,V,O)=>Math.min(Math.max(H,V),O),X=()=>{let H=Z(),{handle:V,container:O,valueBubble:M,secondHandle:P,secondValueBubble:R}=H;if(!V||!O)return;let y=K();if(!y)return;let{trackSize:x}=y,A=j(Q.value),C=Y(A,x);if(V.style.left=`${C}%`,V.style.transform="translate(-50%, -50%)",M)M.style.left=`${C}%`,M.style.transform="translateX(-50%)";if(J.range&&P&&Q.secondValue!==null){let r=j(Q.secondValue),Q6=Y(r,x);if(P.style.left=`${Q6}%`,P.style.transform="translate(-50%, -50%)",R)R.style.left=`${Q6}%`,R.style.transform="translateX(-50%)"}if(V)V.setAttribute("aria-valuenow",String(Q.value))},U=()=>{let H=Z(),{valueBubble:V,secondValueBubble:O}=H;if(!V)return;let M=J.valueFormatter||((P)=>P.toString());if(V.textContent=M(Q.value),J.range&&O&&Q.secondValue!==null)O.textContent=M(Q.secondValue)},_=(H,V)=>{if(!H||!J.showValue)return;let O=Q.component.getClass("slider-value");H.classList[V?"add":"remove"](`${O}--visible`)},N=()=>{},F=()=>{},k=()=>{try{if(X(),U(),$.drawCanvas)$.drawCanvas(Q)}catch(H){console.warn("Error rendering UI:",H)}},D=A5(J,Q,{getPercentage:j,getValueFromPosition:G,roundToStep:z,clamp:W,showValueBubble:_,updateUi:k,render:k},q),B=()=>{try{let H=Z();if(!H.handle){console.warn("Cannot initialize slider controller: missing required handle component");return}$.element.setAttribute("aria-valuemin",String(Q.min)),$.element.setAttribute("aria-valuemax",String(Q.max)),$.element.setAttribute("aria-valuenow",String(Q.value));let{handle:V,secondHandle:O}=H;if(V){if(V.setAttribute("aria-valuemin",String(Q.min)),V.setAttribute("aria-valuemax",String(Q.max)),V.setAttribute("aria-valuenow",String(Q.value)),J.range&&O&&Q.secondValue!==null)O.setAttribute("aria-valuemin",String(Q.min)),O.setAttribute("aria-valuemax",String(Q.max)),O.setAttribute("aria-valuenow",String(Q.secondValue))}D.setupEventListeners(),k()}catch(H){console.error("Error initializing slider controller:",H)}};if($.lifecycle){let H=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{D.cleanupEventListeners(),H()}}return setTimeout(()=>{B()},0),{...$,slider:{setValue(H,V=!0){let O=W(H,Q.min,Q.max);if(Q.value=O,k(),V)q.triggerEvent(M6.CHANGE);return this},getValue(){return Q.value},setSecondValue(H,V=!0){if(!J.range)return this;let O=W(H,Q.min,Q.max);if(Q.secondValue=O,k(),V)q.triggerEvent(M6.CHANGE);return this},getSecondValue(){return J.range?Q.secondValue:null},setMin(H){Q.min=H,$.element.setAttribute("aria-valuemin",String(H));let V=Z();if(V.handle)V.handle.setAttribute("aria-valuemin",String(H));if(J.range&&V.secondHandle)V.secondHandle.setAttribute("aria-valuemin",String(H));if(Q.value<H)Q.value=H;if(J.range&&Q.secondValue!==null&&Q.secondValue<H)Q.secondValue=H;if(J.ticks||J.tickLabels)N();return k(),this},getMin(){return Q.min},setMax(H){Q.max=H,$.element.setAttribute("aria-valuemax",String(H));let V=Z();if(V.handle)V.handle.setAttribute("aria-valuemax",String(H));if(J.range&&V.secondHandle)V.secondHandle.setAttribute("aria-valuemax",String(H));if(Q.value>H)Q.value=H;if(J.range&&Q.secondValue!==null&&Q.secondValue>H)Q.secondValue=H;if(J.ticks||J.tickLabels)N();return k(),this},getMax(){return Q.max},setStep(H){if(Q.step=H,$.element.classList[H>0?"add":"remove"](`${$.getClass("slider")}--discrete`),J.ticks||J.tickLabels)N(),F();return this},getStep(){return Q.step},regenerateTicks(){return k(),this},updateUi(){return k(),this}}}};R9();U$();var C3=(J)=>J?.disabled?.isDisabled?.()||J?.element?.classList?.contains?.(`${J?.getClass?.("slider")}--disabled`)||!1,iJ=(J,$,Q="track")=>{let q=C3($),Z=J.color||"primary";if(q){let K=F6("sys-color-on-surface",{fallback:"#000000"});return{primary:D7(K,0.38),secondary:D7(K,0.12)}}if(Q==="tick")return{primary:F6(`sys-color-on-${Z}`,{fallback:"#ffffff"}),secondary:F6(`sys-color-${Z}`,{fallback:"#1976d2"})};let j=F6(`sys-color-${Z}`,{fallback:"#1976d2"});return{primary:j,secondary:D7(j,0.24)}},u$=(J,$,Q)=>(J-$)/(Q-$)*100,A6=(J,$,Q,q,Z,j,K)=>{if(q>0)T8(J,$,Q,q,Z,j,j,K)},d7=(J)=>{if(typeof J==="number")return Math.max(J,V6.XS);if(typeof J==="string"&&J in V6)return V6[J];return V6.XS},cJ=(J)=>{let $=d7(J);if($<=V6.S)return Z6.SMALL_HANDLE_HEIGHT;return $+Z6.HANDLE_HEIGHT_OFFSET},E3=(J)=>{let $=d7(J);if($<=V6.S)return Z6.SMALL_TRACK_EXTERNAL_RADIUS;return $*Z6.LARGE_TRACK_RADIUS_RATIO},w5=(J,$,Q)=>{let q=d7(Q?.size),Z=cJ(Q?.size),j=J.parentElement;if(!j)return;let K=Math.max(j.getBoundingClientRect().width||j.offsetWidth,200),Y=Math.max(Z+20,q+32,Z6.MIN_HEIGHT);j.style.height=`${Y}px`,v8($,K,Y)},x5=(J,$)=>{let Q=J.parentElement;if(!Q)throw new Error("Canvas must have a parent element");let q=d7($?.size),Z=cJ($?.size),j=Math.max(Q.getBoundingClientRect().width||Q.offsetWidth,200),K=Math.max(Z+20,q+32,Z6.MIN_HEIGHT);return Q.style.height=`${K}px`,b8(J,j,K)},f$=(J,$)=>{let Q=Z6.EDGE_PADDING/$*100,q=Q,Z=100-Q,j=Z-q;if(J<=0)return q;if(J>=100)return Z;return q+J/100*j},h3=(J,$,Q,q,Z,j)=>{let K=Q/2,Y=d7(q.size),G=E3(q.size),z=Z6.TRACK_RADIUS,W=x8(J,0,K-Y/2,$,Y,G),{primary:X,secondary:U}=iJ(q,j),_=u$(Z.value,Z.min,Z.max),N=f$(_,$),F=Z.pressed?Z6.HANDLE_GAP_PRESSED_REDUCTION:0,k=Z6.HANDLE_GAP-F,D=Z6.CENTER_GAP/2/$*100,B=k/$*100;if(q.centered){let H=u$(0,Z.min,Z.max),V=f$(H,$),O=Math.abs(N-V)<B,M=Z.value>=0;if(O){let P=(N-B)/100*$;if(P>0)A6(J,0,K-Y/2,P,Y,z,U);let R=(N+B)/100*$,y=$-R;if(y>0)A6(J,R,K-Y/2,y,Y,z,U)}else if(M){let P=(V-D)/100*$;if(P>0)A6(J,0,K-Y/2,P,Y,z,U);let R=(V+D)/100*$,y=(N-B)/100*$-R;if(y>0)A6(J,R,K-Y/2,y,Y,z,X);let x=(N+B)/100*$,A=$-x;if(A>0)A6(J,x,K-Y/2,A,Y,z,U)}else{let P=(N-B)/100*$;if(P>0)A6(J,0,K-Y/2,P,Y,z,U);let R=(N+B)/100*$,y=(V-D)/100*$-R;if(y>0)A6(J,R,K-Y/2,y,Y,z,X);let x=(V+D)/100*$,A=$-x;if(A>0)A6(J,x,K-Y/2,A,Y,z,U)}}else if(q.range&&Z.secondValue!==null){let H=u$(Z.secondValue,Z.min,Z.max),V=f$(H,$),O=Math.min(N,V),M=Math.max(N,V),P=N<=V,R=Z.pressed&&Z.activeHandle==="first"?Z6.HANDLE_GAP_PRESSED_REDUCTION:0,y=Z.pressed&&Z.activeHandle==="second"?Z6.HANDLE_GAP_PRESSED_REDUCTION:0,x=Z6.HANDLE_GAP-R,A=Z6.HANDLE_GAP-y,C=P?x/$*100:A/$*100,r=P?A/$*100:x/$*100,Q6=(O-C)/100*$;if(Q6>0)A6(J,0,K-Y/2,Q6,Y,z,U);let X6=(O+C)/100*$,$6=(M-r)/100*$-X6;if($6>Y)A6(J,X6,K-Y/2,$6,Y,z,X);let B6=(M+r)/100*$,w=$-B6;if(w>0)A6(J,B6,K-Y/2,w,Y,z,U)}else{let H=(N-B)/100*$;if(H>0)A6(J,0,K-Y/2,H,Y,z,X);let V=(N+B)/100*$,O=$-V;if(O>0)A6(J,V,K-Y/2,O,Y,z,U)}W()},u3=(J,$,Q,q,Z,j)=>{if(!q.ticks)return;let K=Z6.TICK_SIZE,Y=Q/2,{primary:G,secondary:z}=iJ(q,j,"tick"),W=Math.floor((Z.max-Z.min)/Z.step);for(let X=0;X<=W;X++){let U=Z.min+X*Z.step;if(U>Z.max)continue;let _=u$(U,Z.min,Z.max),F=f$(_,$)/100*$,k=Math.abs(U-Z.value)<Z.step*0.1,L=q.range&&Z.secondValue!==null&&Math.abs(U-Z.secondValue)<Z.step*0.1;if(k||L)continue;let D=!1;if(q.centered)D=Z.value>=0?U>=0&&U<=Z.value:U>=Z.value&&U<=0;else if(q.range&&Z.secondValue!==null){let B=Math.min(Z.value,Z.secondValue),H=Math.max(Z.value,Z.secondValue);D=U>=B&&U<=H}else D=U<=Z.value;J.fillStyle=D?G:z,J.globalAlpha=D?1:0.5,J.beginPath(),J.arc(F,Y,K/2,0,Math.PI*2),J.fill()}J.globalAlpha=1},f3=(J,$,Q,q,Z)=>{if(q.ticks)return;let j=Z6.DOT_SIZE,K=Q/2,Y=Z6.EDGE_PADDING,{primary:G}=iJ(q,Z,"dot");J.fillStyle=G,J.beginPath(),J.arc($-Y,K,j/2,0,Math.PI*2),J.fill()},aJ=(J,$,Q,q)=>{let{ctx:Z,width:j,height:K}=J;if(j===0||K===0)return;I8(Z,j,K),f3(Z,j,K,$,q),h3(Z,j,K,$,Q,q),u3(Z,j,K,$,Q,q)},T5=(J,$)=>{let Q=cJ($),q=J.handle||J.components?.handle,Z=J.secondHandle||J.components?.secondHandle;if(q)q.style.height=`${Q}px`,q.style.transform="translate(-50%, -50%)";if(Z)Z.style.height=`${Q}px`,Z.style.transform="translate(-50%, -50%)"},g3=(J,$,Q)=>{if(J)return{value:J.value,secondValue:J.secondValue,min:J.min,max:J.max,step:J.step,pressed:J.pressed||!1,activeHandle:J.activeHandle||null};if($?.slider)return{value:$.slider.getValue(),secondValue:$.slider.getSecondValue(),min:$.slider.getMin(),max:$.slider.getMax(),step:$.slider.getStep(),pressed:!1,activeHandle:null};return Q||{value:0,secondValue:null,min:0,max:100,step:1,pressed:!1,activeHandle:null}},oJ=(J)=>($)=>{let Q=E8(`${$.getClass("slider-canvas")}`,{zIndex:"1"}),q=$.container||$.components?.container;if(q)q.insertBefore(Q,q.firstChild);else $.element.appendChild(Q);let Z=null,j=null,K=null,Y=J.size||"XS",G=g3(null,$,{value:J.value||0,secondValue:J.secondValue||null,min:J.min||0,max:J.max||100,step:J.step||1,pressed:!1,activeHandle:null}),z={animatedValue:G.value,animatedSecondValue:G.secondValue,targetValue:G.value,targetSecondValue:G.secondValue,startValue:G.value,startSecondValue:G.secondValue,startTime:0,duration:S8.MEDIUM,animationFrame:null};if($.animationState=z,C8(()=>{try{return Z=x5(Q,{...J,size:Y}),$.ctx=Z.ctx,!0}catch(k){return console.warn("Slider canvas initialization failed:",k),!1}},()=>{T5($,Y)}),J.color&&J.color!=="primary")$.element.classList.add(`${$.getClass("slider")}--${J.color}`);$.canvas=Q;let W=()=>{if(!Z)return;aJ(Z,{...J,size:Y},{...G,value:z.animatedValue,secondValue:z.animatedSecondValue},$)},X=(k)=>{if(!Z)return;let D=(k||performance.now())-z.startTime,B=Math.min(D/z.duration,1),H=z$(B),V=z.startValue,O=z.targetValue;if(z.animatedValue=V+(O-V)*H,z.targetSecondValue!==null&&z.animatedSecondValue!==null){let{startSecondValue:M,targetSecondValue:P}=z;z.animatedSecondValue=M+(P-M)*H}if(W(),B<1)z.animationFrame=requestAnimationFrame((M)=>X(M));else z.animationFrame=null},U=(k)=>{if(!Z){console.warn("Canvas context not ready");return}w5(Q,Z,{...J,size:Y});let L,D=!1;if(k)L={value:k.value,secondValue:k.secondValue,min:k.min,max:k.max,step:k.step,pressed:k.pressed||!1,activeHandle:k.activeHandle||null},D=k.dragging||!1,G={...L};else if($.slider)L={value:$.slider.getValue(),secondValue:$.slider.getSecondValue(),min:$.slider.getMin(),max:$.slider.getMax(),step:$.slider.getStep()},G={...L};else L={...G};let B=L.value!==z.targetValue,H=L.secondValue!==z.targetSecondValue;if((B||H)&&!D){if(z.startValue=z.animatedValue,z.startSecondValue=z.animatedSecondValue,z.targetValue=L.value,z.targetSecondValue=L.secondValue,z.animationFrame)cancelAnimationFrame(z.animationFrame);z.startTime=performance.now(),X()}else if(D){if(z.animatedValue=L.value,z.animatedSecondValue=L.secondValue,z.targetValue=L.value,z.targetSecondValue=L.secondValue,z.startValue=L.value,z.startSecondValue=L.secondValue,z.animationFrame)cancelAnimationFrame(z.animationFrame),z.animationFrame=null;aJ(Z,{...J,size:Y},k||L,$)}else aJ(Z,{...J,size:Y},k||L,$)},_=()=>{if(!Z)return;try{let k=x5(Q,{...J,size:Y});$.ctx=k.ctx,Object.assign(Z,k),W()}catch(k){console.warn("Slider canvas resize failed:",k)}};j=O7($.element,Q,_);let N=()=>W();K=W$(J.color||"primary",N),requestAnimationFrame(()=>{U()}),$.drawCanvas=U,$.resize=_,$.setSize=(k)=>{if(Y=k,Z)w5(Q,Z,{...J,size:Y}),W();T5($,Y)},$.getSize=()=>Y;let F=$.appearance?.setColor;if(F)$.appearance.setColor=(k)=>{if(F(k),J.color&&J.color!=="primary")$.element.classList.remove(`${$.getClass("slider")}--${J.color}`);if(k&&k!=="primary")$.element.classList.add(`${$.getClass("slider")}--${k}`);if(J.color=k,K)K(),K=null;K=W$(k,N),U()};if($.lifecycle){let k=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{if(j)j();if(K)K();if(z.animationFrame)cancelAnimationFrame(z.animationFrame);k()}}return $};u6();u9();var $7=(J,$)=>{return Object.assign(J.style,$),J};var tJ=(J)=>($)=>{let Q=(N)=>$.getClass(N),q=J.min||0,Z=J.max||100,j=J.value!==void 0?J.value:q,K=J.disabled===!0,Y=J.valueFormatter||((N)=>N.toString()),G=(j-q)/(Z-q)*100,z=E({tag:"div",className:Q("slider-container"),container:$.element});$7(z,{position:"relative"});let W=E({tag:"div",className:Q("slider-handle"),attributes:{role:"slider","aria-valuemin":String(q),"aria-valuemax":String(Z),"aria-valuenow":String(j),"aria-orientation":"horizontal",tabindex:K?"-1":"0","aria-disabled":K?"true":"false","data-value":String(j),"data-handle-index":"0"},container:z});$7(W,{left:`${G}%`});let X=E({tag:"div",className:Q("slider-value"),attributes:{"aria-hidden":"true","data-handle-index":"0"},text:Y(j),container:z});$7(X,{left:`${G}%`});let U,_;if(J.range){let N=J.secondValue!==void 0?J.secondValue:Z,F=(N-q)/(Z-q)*100;U=E({tag:"div",className:Q("slider-handle"),attributes:{role:"slider","aria-valuemin":String(q),"aria-valuemax":String(Z),"aria-valuenow":String(N),"aria-orientation":"horizontal",tabindex:K?"-1":"0","aria-disabled":K?"true":"false","data-value":String(N),"data-handle-index":"1"},container:z}),$7(U,{left:`${F}%`}),_=E({tag:"div",className:Q("slider-value"),attributes:{"aria-hidden":"true","data-handle-index":"1"},text:Y(N),container:z}),$7(_,{left:`${F}%`})}return{...$,container:z,handle:W,valueBubble:X,secondHandle:U,secondValueBubble:_,getContainer:()=>z,getHandle:()=>W,getValueBubble:()=>X,getSecondHandle:()=>U||null,getSecondValueBubble:()=>_||null}};var I5=(J)=>($)=>{return{...$,element:$.element,setValue(Q,q=!0){return J.slider.setValue(Q,q),this},getValue(){return J.slider.getValue()},setSecondValue(Q,q=!0){return J.slider.setSecondValue(Q,q),this},getSecondValue(){return J.slider.getSecondValue()},setMin(Q){return J.slider.setMin(Q),this},getMin(){return J.slider.getMin()},setMax(Q){return J.slider.setMax(Q),this},getMax(){return J.slider.getMax()},setStep(Q){return J.slider.setStep(Q),this},getStep(){return J.slider.getStep()},enable(){return J.disabled.enable(),this},disable(){return J.disabled.disable(),this},isDisabled(){return J.disabled.isDisabled()},setColor(Q){return J.appearance.setColor(Q),this},getColor(){return J.appearance.getColor()},setSize(Q){return J.appearance.setSize(Q),this},getSize(){return J.appearance.getSize()},showTicks(Q){return J.appearance.showTicks(Q),this},showCurrentValue(Q){return J.appearance.showCurrentValue(Q),this},setLabel(Q){if(J.text?.setText)J.text.setText(Q);return this},getLabel(){return J.text?.getText?J.text.getText():""},setIcon(Q){if(J.icon?.setIcon)J.icon.setIcon(Q);return this},getIcon(){return J.icon?.getIcon?J.icon.getIcon():""},on(Q,q){if(J.events?.on)J.events.on(Q,q);return this},off(Q,q){if(J.events?.off)J.events.off(Q,q);return this},destroy(){if(J.lifecycle?.destroy)J.lifecycle.destroy()}}};m();var d3={min:k6.MIN,max:k6.MAX,value:k6.VALUE,step:k6.STEP,disabled:k6.DISABLED,color:k6.COLOR,size:k6.SIZE,ticks:k6.TICKS,showValue:k6.SHOW_VALUE,snapToSteps:k6.SNAP_TO_STEPS,range:k6.RANGE,centered:k6.CENTERED,iconPosition:k6.ICON_POSITION,labelPosition:k6.LABEL_POSITION,valueFormatter:(J)=>J.toString()},S5=(J={})=>{return b(d3,J,"slider")},b5=(J)=>{let $=["slider",J.class,J.disabled?"slider--disabled":"",J.size&&J.size!=="XS"?`slider--${typeof J.size==="string"?J.size.toLowerCase():J.size}`:"",J.color&&J.color!=="primary"?`slider--${J.color}`:"",J.range?"slider--range":"",J.centered?"slider--centered":"",J.icon?"slider--icon":""].filter(Boolean).join(" "),Q={tabindex:"-1",role:"none","aria-disabled":J.disabled?"true":"false","aria-valuemin":String(J.min||0),"aria-valuemax":String(J.max||100),"aria-valuenow":String(J.value||J.min||0)};return f(J,{tag:"div",attributes:Q,className:$,forwardEvents:{click:!0,keydown:!0,touchstart:!0,touchmove:!0,touchend:!0,mousedown:!0,mousemove:!0,mouseup:!0},interactive:!0})},v5=(J)=>({slider:{setValue:($,Q)=>J.slider?.setValue($,Q),getValue:()=>J.slider?.getValue()??0,setSecondValue:($,Q)=>J.slider?.setSecondValue($,Q),getSecondValue:()=>J.slider?.getSecondValue()??null,setMin:($)=>J.slider?.setMin($),getMin:()=>J.slider?.getMin()??0,setMax:($)=>J.slider?.setMax($),getMax:()=>J.slider?.getMax()??100,setStep:($)=>J.slider?.setStep($),getStep:()=>J.slider?.getStep()??1,regenerateTicks:()=>J.slider?.regenerateTicks?.()},disabled:{enable:()=>J.disabled?.enable?.(),disable:()=>J.disabled?.disable?.(),isDisabled:()=>J.disabled?.isDisabled?.()??!1},appearance:{setColor:($)=>J.appearance?.setColor?.($),getColor:()=>J.appearance?.getColor?.()??"primary",setSize:($)=>J.setSize?.($),getSize:()=>J.getSize?.()??"XS",showTicks:($)=>J.appearance?.showTicks?.($),showCurrentValue:($)=>J.appearance?.showCurrentValue?.($)},text:{setText:($)=>J.label?.setText?.($),getText:()=>J.label?.getText?.()??""},icon:{setIcon:($)=>J.icon?.setIcon?.($),getIcon:()=>J.icon?.getIcon?.()??""},events:{on:($,Q)=>J.on?.($,Q),off:($,Q)=>J.off?.($,Q)},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}});var r3=(J={})=>{let $=S5(J);try{let Q=I(T,h(),S(b5($)),lJ($),tJ($),d6($),g6($),oJ($),sJ($),mJ($),v())($),q=v5(Q),Z=I5(q)(Q);if($.on&&typeof Z.on==="function")Object.entries($.on).forEach(([j,K])=>{if(typeof K==="function")Z.on(j,K)});return Z}catch(Q){throw console.error("Slider creation error:",Q),new Error(`Failed to create slider: ${Q.message}`)}},nJ=r3;n();s();var C5=(J)=>($)=>{if(!J.action)return $;let Q=document.createElement("button");return Q.className=`${J.prefix}-snackbar-action`,Q.textContent=J.action,$.element.appendChild(Q),{...$,actionButton:Q}},E5=(J)=>($)=>{let Q=null,q=()=>{if(Q)clearTimeout(Q),Q=null;if(typeof J.duration==="number"&&J.duration>0)Q=window.setTimeout(()=>{if($.element&&$.emit)$.emit("dismiss")},J.duration)},Z=()=>{if(Q)clearTimeout(Q),Q=null},j=$.lifecycle?.destroy;if($.lifecycle)$.lifecycle.destroy=()=>{if(Z(),j)j.call($.lifecycle)};return{...$,timer:{start:q,stop:Z}}};var g$={BASIC:"basic",ACTION:"action"},t6={CENTER:"center",START:"start",END:"end"},eJ={VISIBLE:"visible",HIDDEN:"hidden"},$1={OPEN:"open",CLOSE:"close",ACTION:"action",DISMISS:"dismiss"},v9={VARIANT:g$.BASIC,POSITION:t6.CENTER,DURATION:4000,Z_INDEX:1000,ANIMATION_DURATION:300},J1={ROOT:"snackbar",BASIC:"snackbar--basic",ACTION:"snackbar--action",CENTER:"snackbar--center",START:"snackbar--start",END:"snackbar--end",VISIBLE:"snackbar--visible",HIDDEN:"snackbar--hidden",MESSAGE:"snackbar__message",ACTION_BUTTON:"snackbar__action"};var h5=(J)=>($)=>{let Q=J.position||t6.CENTER,q=J.prefix||"mtrl",Z=`${q}-snackbar--${Q}`;$.element.classList.add(Z);let j=(K)=>{$.element.classList.remove(Z);let Y=`${q}-snackbar--${K}`;if($.element.classList.add(Y),$.element.classList.contains(`${q}-snackbar--visible`))if(K===t6.CENTER)$.element.style.transform="translateX(-50%) scale(1)";else $.element.style.transform="scale(1)"};return{...$,position:{getPosition:()=>Q,setPosition:(K)=>{if(Object.values(t6).includes(K))return j(K),$;else return console.warn(`Invalid position: ${K}. Using default: ${t6.CENTER}`),j(t6.CENTER),$}}}};c();var u5=({lifecycle:J,queue:$})=>(Q)=>{if(!$)throw new Error("Snackbar queue is required");let q=!1,Z={element:Q.element,actionButton:Q.actionButton,timer:Q.timer,position:Q.position,state:q?"visible":"hidden",show(){if(q)return this;return q=!0,this.state="visible",$.add({...this,_show:()=>{document.body.appendChild(Q.element);let j=Q.element.offsetHeight;if(Q.element.classList.add(`${Q.getClass?.("snackbar")}--visible`),Q.timer)Q.timer.start();return this}}),this},hide(){if(!q)return this;if(q=!1,this.state="hidden",Q.timer)Q.timer.stop();let j=(K)=>{if(K.propertyName!=="opacity")return;if(Q.element.removeEventListener("transitionend",j),Q.element.parentNode)Q.element.remove()};return Q.element.addEventListener("transitionend",j),Q.element.classList.remove(`${Q.getClass?.("snackbar")}--visible`),this},setMessage(j){return Q.text?.setText(j),this},getMessage(){return Q.text?.getText()||""},setAction(j){if(Q.actionButton)Q.actionButton.textContent=j;return this},getAction(){return Q.actionButton?Q.actionButton.textContent||"":""},setDuration(){return this},getDuration(){return 0},setPosition(j){if(Q.position?.setPosition)Q.position.setPosition(j);return this},getPosition(){return Q.position?.getPosition?.()||"center"},on(j,K){return Q.on?.(j,K),this},off(j,K){return Q.off?.(j,K),this},destroy(){if(q&&Q.element.parentNode)Q.element.remove();if(Q.timer)Q.timer.stop();J.destroy()}};if(Q.actionButton)Q.actionButton.addEventListener("click",()=>{Q.emit?.("action"),Q.emit?.("dismiss")});if(Q.on){let j=()=>{if(q)Z.hide()};Q.on("dismiss",j);let K=J.destroy;J.destroy=()=>{Q.off?.("dismiss",j),K?.call(J)}}return Z};var f5=()=>{let J=[],$=!1,Q=()=>{if(J.length===0){$=!1;return}$=!0;let q=J[0],Z=()=>{if(J.shift(),q.off?.("dismiss",Z),J.length===0)$=!1;else setTimeout(Q,200)};q.on?.("dismiss",Z),q._show()};return{add(q){if(!q._show)throw new Error("Snackbar must implement _show method");if(J.push(q),!$)Q()},clear(){J.length=0,$=!1},getLength(){return J.length}}};m();var l3={variant:v9.VARIANT,position:v9.POSITION,duration:v9.DURATION},g5=(J)=>b(l3,J,"snackbar"),d5=(J)=>f(J,{tag:"div",className:J.class}),r5=(J)=>({...J,text:J.message}),l5=(J,$)=>({lifecycle:{destroy:J.lifecycle?.destroy||(()=>{})},queue:$});var p3=f5(),s3=(J)=>{if(!J.message)throw new Error("Snackbar message is required");let $=g5(J);try{return I(T,h(),S(d5($)),Y6($),h5($),$9(r5($)),C5($),v(),E5($),(q)=>u5(l5(q,p3))(q))($)}catch(Q){throw console.error("Snackbar creation error:",Q instanceof Error?Q.message:String(Q)),new Error(`Failed to create snackbar: ${Q instanceof Error?Q.message:String(Q)}`)}},Q1=s3;n();s();c();var p5=({disabled:J,lifecycle:$,checkable:Q})=>(q)=>({...q,element:q.element,input:q.input,getValue:q.getValue||(()=>""),setValue(Z){return q.setValue?.(Z),this},check(){return Q.check(),this},uncheck(){return Q.uncheck(),this},toggle(){return Q.toggle(),this},isChecked(){return Q.isChecked()},setLabel(Z){return q.text?.setText(Z),this},getLabel(){return q.text?.getText()||""},supportingTextElement:q.supportingTextElement||null,setSupportingText(Z,j){if(q.setSupportingText)q.setSupportingText(Z,j);return this},removeSupportingText(){if(q.removeSupportingText)q.removeSupportingText();return this},on(Z,j){return q.on?.(Z,j),this},off(Z,j){return q.off?.(Z,j),this},enable(){return J.enable(),this},disable(){return J.disable(),this},destroy(){$.destroy()}});c();var s5=(J,$,Q)=>{let q=$||"mtrl",Z=Q||"switch",j=J.element.querySelector(`.${q}-${Z}-container`);if(!j){j=document.createElement("div"),j.className=`${q}-${Z}-container`;let Y=J.element.querySelector(`.${q}-${Z}-input`),G=J.element.querySelector(`.${q}-${Z}-track`),z=[];if(Y)z.push(Y);if(G)z.push(G);let W=document.createElement("div");W.className=`${q}-${Z}-content`;let X=J.element.querySelector(`.${q}-${Z}-label`);if(X)W.appendChild(X);return j.appendChild(W),z.forEach((U)=>j.appendChild(U)),J.element.appendChild(j),{container:j,contentWrapper:W}}let K=J.element.querySelector(`.${q}-${Z}-content`);if(!K){K=document.createElement("div"),K.className=`${q}-${Z}-content`;let Y=J.element.querySelector(`.${q}-${Z}-label`);if(Y)K.appendChild(Y);j.insertBefore(K,j.firstChild)}return{container:j,contentWrapper:K}},d$=(J)=>($)=>{let Q=J.prefix||"mtrl",q=J.componentName||"switch",{contentWrapper:Z}=s5($,Q,q),j=null;if(J.supportingText){if(j=document.createElement("div"),j.className=`${Q}-${q}-helper`,j.textContent=J.supportingText,J.error)j.classList.add(`${Q}-${q}-helper--error`),$.element.classList.add(`${Q}-${q}--error`);Z.appendChild(j)}if("lifecycle"in $&&$.lifecycle&&typeof $.lifecycle==="object"&&"destroy"in $.lifecycle&&j){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(j)j.remove();K.call($.lifecycle)}}return{...$,supportingTextElement:j,setSupportingText(K,Y=!1){let{contentWrapper:G}=s5($,Q,q),z=this.supportingTextElement;if(!z)z=document.createElement("div"),z.className=`${Q}-${q}-helper`,G.appendChild(z),this.supportingTextElement=z;return z.textContent=K,z.classList.toggle(`${Q}-${q}-helper--error`,Y),$.element.classList.toggle(`${Q}-${q}--error`,Y),this},removeSupportingText(){if(this.supportingTextElement&&this.supportingTextElement.parentNode)this.supportingTextElement.remove(),this.supportingTextElement=null,$.element.classList.remove(`${Q}-${q}--error`);return this}}},m5=(J)=>($)=>{let Q={...J,prefix:J.prefix||"mtrl",componentName:J.componentName||"switch"};return H7(Q)($)};m();var m3={prefix:"mtrl",componentName:"switch"},a5=(J={})=>b(m3,J,"switch"),i5=(J)=>f(J,{tag:"div",className:J.class,interactive:!0}),c5=(J)=>({disabled:{enable:J.disabled?.enable,disable:J.disabled?.disable},lifecycle:{destroy:J.lifecycle?.destroy},checkable:{check:J.checkable?.check,uncheck:J.checkable?.uncheck,toggle:J.checkable?.toggle,isChecked:J.checkable?.isChecked}});var a3=(J={})=>{let $=a5(J);try{return I(T,h(),S(i5($)),d6($),_9($),m5($),d$($),D9($),G6($),v(),(q)=>p5(c5(q))(q))($)}catch(Q){throw console.error("Switch creation error:",Q instanceof Error?Q.message:String(Q)),new Error(`Failed to create switch: ${Q instanceof Error?Q.message:String(Q)}`)}},q1=a3;var r$={START:"start",END:"end"},Z1={CHECKED:"checked",UNCHECKED:"unchecked",DISABLED:"disabled",ENABLED:"enabled"},j1={CHANGE:"change",FOCUS:"focus",BLUR:"blur"},K1={CHECKED:!1,DISABLED:!1,REQUIRED:!1,LABEL_POSITION:r$.END,VALUE:"on"},Y1={ROOT:"switch",CONTAINER:"switch-container",CONTENT:"switch-content",LABEL:"switch-label",INPUT:"switch-input",TRACK:"switch-track",THUMB:"switch-thumb",LABEL_START:"switch--label-start",LABEL_END:"switch--label-end",CHECKED:"switch--checked",DISABLED:"switch--disabled",ERROR:"switch--error",HELPER:"switch-helper",HELPER_ERROR:"switch-helper--error",FOCUSED:"switch--focused"};n();s();c();n();s();c();var r7={PRIMARY:"primary",SECONDARY:"secondary"},J7={ACTIVE:"active",INACTIVE:"inactive",DISABLED:"disabled"},l$={FIXED:"fixed",DYNAMIC:"dynamic",CONTENT:"content",AUTO:"auto"},G1={CLICK:"click",FOCUS:"focus",BLUR:"blur"},p$={CHANGE:"change"},k9={VARIANT:r7.PRIMARY,SCROLLABLE:!0,SHOW_DIVIDER:!0,INDICATOR_HEIGHT:3,INDICATOR_WIDTH_STRATEGY:l$.AUTO,INDICATOR_FIXED_WIDTH:40,INDICATOR_ANIMATION_DURATION:250,INDICATOR_ANIMATION_TIMING:"cubic-bezier(0.4, 0, 0.2, 1)",ICON_SIZE:"24px",RIPPLE:!0},Q7={ICON_ONLY:"icon-only",TEXT_ONLY:"text-only",ICON_AND_TEXT:"icon-and-text"},z1={ROOT:"tabs",PRIMARY:"tabs--primary",SECONDARY:"tabs--secondary",SCROLLABLE:"tabs--scrollable",SCROLL:"tabs-scroll",DIVIDER:"tabs-divider",INDICATOR:"tabs-indicator"},W1={ROOT:"tab",ACTIVE:"tab--active",INACTIVE:"tab--inactive",DISABLED:"tab--disabled",TEXT:"tab-text",ICON:"tab-icon",RIPPLE:"tab-ripple",PRIMARY:"tab--primary",SECONDARY:"tab--secondary",CONTAINER:"tab-container",BADGE:"tab-badge"};m();s();var i3={state:J7.INACTIVE,componentName:"tab",ripple:k9.RIPPLE},c3={variant:k9.VARIANT,scrollable:k9.SCROLLABLE,showDivider:k9.SHOW_DIVIDER,componentName:"tabs"},o5=(J={})=>b(c3,J,"tabs"),t5=(J={})=>b(i3,J,"tab"),n5=(J)=>{let $={tag:"div",attributes:{role:"tablist","aria-orientation":"horizontal"},className:[`${J.prefix}-tabs`,`${J.prefix}-tabs--${J.variant||"primary"}`,J.class]};return(Q)=>S($)(Q)};w9();M7();var q7=(J={})=>{let $=t5(J);try{let Q=I(T,h(),v())($),q=i6({text:$.text,icon:$.icon,iconSize:$.iconSize,disabled:$.disabled,ripple:$.ripple!==!1,rippleConfig:{duration:400,timing:"cubic-bezier(0.4, 0, 0.2, 1)",opacity:["0.2","0"],...$.rippleConfig||{}},value:$.value,prefix:$.prefix,variant:"text",class:`${$.prefix}-tab`});if(Q.element=q.element,Q.element.setAttribute("role","tab"),Q.element.setAttribute("aria-selected",$.state==="active"?"true":"false"),$.value)Q.element.setAttribute("id",`tab-${$.value}`),Q.element.setAttribute("aria-controls",`tabpanel-${$.value}`);if($.state==="active")Q.element.classList.add(`${Q.getClass("tab")}--active`);q.on("click",(j)=>{if(Q.emit)Q.emit("click",j)});let Z={...Q,button:q,element:q.element,badge:null,getValue(){return q.getValue()},setValue(j){let K=j||"";return q.setValue(K),this.element.setAttribute("id",`tab-${K}`),this.element.setAttribute("aria-controls",`tabpanel-${K}`),this},activate(){this.element.classList.add(`${this.getClass("tab")}--active`),this.element.setAttribute("aria-selected","true");let j=new CustomEvent("tab:activated",{bubbles:!0,detail:{value:this.getValue()}});return this.element.dispatchEvent(j),this},deactivate(){return this.element.classList.remove(`${this.getClass("tab")}--active`),this.element.setAttribute("aria-selected","false"),this},isActive(){return this.element.classList.contains(`${this.getClass("tab")}--active`)},enable(){return q.enable(),this.element.removeAttribute("aria-disabled"),this},disable(){return q.disable(),this.element.setAttribute("aria-disabled","true"),this},setText(j){return q.setText(j),this.updateLayoutStyle(),this},getText(){return q.getText()},setIcon(j){return q.setIcon(j),this.updateLayoutStyle(),this},getIcon(){return q.getIcon()},setBadge(j){if(!this.badge){let K={content:j,standalone:!1,target:this.element,prefix:$.prefix,...$.badgeConfig||{}};this.badge=g9(K)}else this.badge.setContent(j),this.badge.show();return this.element.setAttribute("data-has-badge","true"),this},getBadge(){return this.badge?this.badge.getContent():""},showBadge(){if(this.badge)this.badge.show(),this.element.setAttribute("data-has-badge","true");return this},hideBadge(){if(this.badge)this.badge.hide(),this.element.setAttribute("data-has-badge","false");return this},getBadgeComponent(){return this.badge},destroy(){if(this.badge)this.badge.destroy();if(q.destroy)q.destroy();Q.lifecycle.destroy()},updateLayoutStyle(){let j=!!this.getText(),K=!!this.getIcon(),Y="";if(j&&K)Y=Q7.ICON_AND_TEXT;else if(K)Y=Q7.ICON_ONLY;else Y=Q7.TEXT_ONLY;if(Object.values(Q7).forEach((G)=>{this.element.classList.remove(`${this.getClass("tab")}--${G}`)}),this.element.classList.add(`${this.getClass("tab")}--${Y}`),Y===Q7.ICON_ONLY&&j)this.element.setAttribute("aria-label",this.getText());else this.element.removeAttribute("aria-label")}};if($.badge!==void 0)Z.setBadge($.badge);return Z.updateLayoutStyle(),Z}catch(Q){throw console.error("Tab creation error:",Q),new Error(`Failed to create tab: ${Q.message}`)}};var e5=({lifecycle:J})=>($)=>({...$,element:$.element,addTab(Q){let q={...Q,prefix:$.config.prefix,variant:Q.variant||$.config.variant};if(q.value===void 0)q.value="";let Z=q7(q);if($.tabs.push(Z),$.tabsContainer.appendChild(Z.element),Z.on&&typeof Z.on==="function")Z.on("click",(K)=>$.handleTabClick(K,Z));return Z.element.addEventListener("click",(K)=>{$.handleTabClick(K,Z)}),Z},add(Q){if($.tabs.push(Q),$.tabsContainer.appendChild(Q.element),Q.on&&typeof Q.on==="function")Q.on("click",(Z)=>$.handleTabClick(Z,Q));return Q.element.addEventListener("click",(Z)=>{$.handleTabClick(Z,Q)}),this},getTabs(){return[...$.tabs]},getActiveTab(){return $.tabs.find((Q)=>Q.isActive())||null},setActiveTab(Q){let q=typeof Q==="string"?$.tabs.find((Z)=>Z.getValue()===Q):Q;if(!q)return this;if($.tabs.forEach((Z)=>Z.deactivate()),q.activate(),$.emit)$.emit("change",{tab:q,value:q.getValue()});return this},removeTab(Q){let q=typeof Q==="string"?$.tabs.find((j)=>j.getValue()===Q):Q;if(!q)return this;let Z=$.tabs.indexOf(q);if(Z!==-1)$.tabs.splice(Z,1);if(q.element.parentNode)q.element.parentNode.removeChild(q.element);return q.destroy(),this},on(Q,q){if($.on)$.on(Q,q);return this},off(Q,q){if($.off)$.off(Q,q);return this},destroy(){$.tabs.forEach((Q)=>Q.destroy()),$.tabs.length=0,J.destroy()}}),$2=(J)=>({lifecycle:{destroy:()=>J.lifecycle.destroy()}});function J2(J){if(typeof J.getActiveTab==="function")return J.getActiveTab();if(Array.isArray(J.tabs))return J.tabs.find(($)=>$.isActive&&$.isActive());return null}function s$(J){let $=J2(J);if(!$)return;if(typeof $.getValue!=="function")return;let Q=$.getValue();document.querySelectorAll('[role="tabpanel"]').forEach((Z)=>{if(Z.getAttribute("aria-labelledby")?.replace("tab-","")===Q)Z.removeAttribute("hidden"),Z.setAttribute("tabindex","0");else Z.setAttribute("hidden","true"),Z.setAttribute("tabindex","-1")})}function m$(J){if(!J.element)return;J.element.addEventListener("keydown",($)=>{if($.target!==$.currentTarget)return;if(typeof J.getTabs!=="function"||typeof J.setActiveTab!=="function")return;let Q=J.getTabs(),q=J2(J),Z=q?Q.indexOf(q):-1,j=Z;switch($.key){case"ArrowRight":case"ArrowDown":j=Z<Q.length-1?Z+1:0;break;case"ArrowLeft":case"ArrowUp":j=Z>0?Z-1:Q.length-1;break;case"Home":j=0;break;case"End":j=Q.length-1;break;default:return}if(j!==Z&&Q[j])$.preventDefault(),Q[j].element.focus(),J.setActiveTab(Q[j])})}var o3={widthStrategy:"auto",fixedWidth:40,animationDuration:250,animationTiming:"cubic-bezier(0.4, 0, 0.2, 1)",visible:!0,prefix:"mtrl",variant:"primary"},a$=(J={})=>{let $={...o3,...J},Q=$.prefix||"mtrl",q=document.createElement("div");if(q.className=`${Q}-tabs-indicator`,q.style.transition=`transform ${$.animationDuration}ms ${$.animationTiming},
|
|
30
|
+
</svg>`,TJ={CHECKMARK:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>'},IJ={CONTAINER:"segmented-button",SEGMENT:"segmented-button__segment",SELECTED:"segmented-button__segment--selected",DISABLED:"segmented-button__segment--disabled",HAS_ICON:"segmented-button__segment--has-icon",ICON:"segmented-button__icon",LABEL:"segmented-button__label",CHECKMARK:"segmented-button__checkmark",RIPPLE:"segmented-button__ripple",SINGLE_MODE:"segmented-button--single",MULTI_MODE:"segmented-button--multi",DEFAULT_DENSITY:"segmented-button--density-default",COMFORTABLE_DENSITY:"segmented-button--density-comfortable",COMPACT_DENSITY:"segmented-button--density-compact"};var I3={mode:S9.MODE,ripple:S9.RIPPLE,density:S9.DENSITY},_5=(J={})=>b(I3,J,"segmented-button"),D5=(J)=>{let $=J.density||"default";return{tag:"div",componentName:"segmented-button",attributes:{role:"group","aria-label":"Segmented button","data-mode":J.mode||"single","data-density":$},className:[J.class,J.disabled?`${J.prefix}-segmented-button--disabled`:null,$!=="default"?`${J.prefix}-segmented-button--${$}`:null],interactive:!0}},SJ=(J)=>{switch(J){case"compact":return{"--segment-padding":"4px 8px","--segment-height":"28px","--segment-font-size":"0.8125rem"};case"comfortable":return{"--segment-padding":"6px 12px","--segment-height":"32px","--segment-font-size":"0.875rem"};case"default":default:return{"--segment-padding":"8px 16px","--segment-height":"36px","--segment-font-size":"0.875rem"}}};w9();var C$=(J,$,Q,q=!1,Z={ripple:!0,rippleConfig:{}})=>{let j=q||J.disabled,K=J.icon,Y=J.checkmarkIcon||V5,G=i6({text:J.text,icon:J.selected&&J.text&&K?Y:K,value:J.value||J.text||"",disabled:j,ripple:Z.ripple,rippleConfig:Z.rippleConfig,class:J.class});if(G.element.classList.add(`${Q}-segmented-button-segment`),J.selected)G.element.classList.add(`${Q}-segment--selected`),G.element.setAttribute("aria-pressed","true");else G.element.setAttribute("aria-pressed","false");$.appendChild(G.element);let z=(X)=>{if(G.element.classList.toggle(`${Q}-segment--selected`,X),G.element.setAttribute("aria-pressed",X?"true":"false"),J.text&&K)if(X)G.setIcon(Y);else G.setIcon(K)},W=J.selected||!1;return{element:G.element,value:J.value||J.text||"",isSelected(){return W},setSelected(X){W=X,z(X)},isDisabled(){return G.disabled?.isDisabled?.()||!1},setDisabled(X){if(X)G.disable();else G.enable()},destroy(){G.destroy()}}};var S3=(J={})=>{let $=_5(J),Q=$.mode||"single",q=$.density||"default",Z=T6();try{let j=I(T,h(),S(D5($)),v())($),K=SJ(q);Object.entries(K).forEach(([N,F])=>{j.element.style.setProperty(N,F)});let Y=[];if($.segments&&$.segments.length)$.segments.forEach((N)=>{let F=C$(N,j.element,$.prefix,$.disabled,{ripple:$.ripple,rippleConfig:$.rippleConfig});Y.push(F)});if(Q==="single"&&!Y.some((N)=>N.isSelected())){let N=Y.find((F)=>!F.isDisabled());if(N)N.setSelected(!0)}let G=(N)=>{let F=N.currentTarget,k=Y.find((B)=>B.element===F);if(!k||k.isDisabled())return;let L=W();if(Q==="single")Y.forEach((B)=>{B.setSelected(B===k)});else k.setSelected(!k.isSelected());let D=W();if(L.length!==D.length||L.some((B)=>!D.includes(B))||D.some((B)=>!L.includes(B)))Z.emit("change",{selected:z(),value:D,oldValue:L})};Y.forEach((N)=>{N.element.addEventListener("click",G)});let z=()=>Y.filter((N)=>N.isSelected()),W=()=>z().map((N)=>N.value),X=(N)=>Y.find((F)=>F.value===N),U=(N)=>{if(["default","comfortable","compact"].forEach((k)=>{if(k!=="default")j.element.classList.remove(`${$.prefix}-segmented-button--${k}`)}),N!=="default")j.element.classList.add(`${$.prefix}-segmented-button--${N}`);j.element.setAttribute("data-density",N);let F=SJ(N);Object.entries(F).forEach(([k,L])=>{j.element.style.setProperty(k,L)})};return{element:j.element,segments:Y,getSelected:z,getValue(){return W()},select(N){let F=X(N);if(F&&!F.isDisabled()){let k=W();if(Q==="single")Y.forEach((D)=>D.setSelected(D===F));else F.setSelected(!0);let L=W();if(k.join(",")!==L.join(","))Z.emit("change",{selected:z(),value:L,oldValue:k})}return this},deselect(N){let F=X(N);if(F&&!F.isDisabled())if(Q==="single"){if(z().length>1||!F.isSelected()){let L=W();F.setSelected(!1);let D=W();if(L.join(",")!==D.join(","))Z.emit("change",{selected:z(),value:D,oldValue:L})}}else{let k=W();F.setSelected(!1);let L=W();if(k.join(",")!==L.join(","))Z.emit("change",{selected:z(),value:L,oldValue:k})}return this},enable(){return j.element.classList.remove(`${$.prefix}-segmented-button--disabled`),Y.forEach((N)=>{if(!$.segments?.find((F)=>F.value===N.value)?.disabled)N.setDisabled(!1)}),this},disable(){return j.element.classList.add(`${$.prefix}-segmented-button--disabled`),Y.forEach((N)=>{N.setDisabled(!0)}),this},enableSegment(N){let F=X(N);if(F)F.setDisabled(!1);return this},disableSegment(N){let F=X(N);if(F)F.setDisabled(!0);return this},setDensity(N){return U(N),this},getDensity(){return j.element.getAttribute("data-density")||"default"},on(N,F){return Z.on(N,F),this},off(N,F){return Z.off(N,F),this},destroy(){Y.forEach((N)=>{N.element.removeEventListener("click",G),N.destroy()}),Z.clear(),j.lifecycle.destroy()}}}catch(j){throw console.error("Segmented Button creation error:",j),Error(`Failed to create segmented button: ${j.message}`)}},E$=S3;n();s();c();var b6={BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right"},e9={OPEN:"open",CLOSE:"close",DRAG_START:"dragstart",DRAG_END:"dragend"};var bJ=(J)=>($)=>{let{position:Q=b6.BOTTOM}=J,q=`${$.getClass("sheet")}--${Q.toLowerCase()}`;return $.element.classList.add(q),{...$,position:{setPosition(Z){$.element.classList.remove(q);let j=`${$.getClass("sheet")}--${Z.toLowerCase()}`;$.element.classList.add(j)},getPosition(){return Q}}}};var vJ=(J)=>($)=>{let{content:Q=""}=J,q=document.createElement("div");return q.className=`${$.getClass("sheet")}-content`,q.innerHTML=Q,$.container=document.createElement("div"),$.container.className=`${$.getClass("sheet")}-container`,$.container.appendChild(q),$.element.appendChild($.container),{...$,content:{setContent(Z){return q.innerHTML=Z,this},getContent(){return q.innerHTML},getElement(){return q}}}};var CJ=(J)=>($)=>{let{title:Q=""}=J,q=null;if(Q||J.dragHandle){if(q=document.createElement("div"),q.className=`${$.getClass("sheet")}-title`,Q)q.textContent=Q;if($.container.insertBefore(q,$.container.firstChild),J.dragHandle){let Z=document.createElement("div");Z.className=`${$.getClass("sheet")}-handle`,$.container.insertBefore(Z,$.container.firstChild),$.dragHandle={element:Z,setVisible(j){Z.style.display=j?"block":"none"}}}}return{...$,title:{setTitle(Z){if(!q&&Z)q=document.createElement("div"),q.className=`${$.getClass("sheet")}-title`,$.container.insertBefore(q,$.content.getElement());if(q)q.textContent=Z;return this},getTitle(){return q?q.textContent||"":""},getElement(){return q}}}};var EJ=(J)=>($)=>{let{open:Q=!1,dismissible:q=!0}=J,Z=Q,j=document.createElement("div");if(j.className=`${$.getClass("sheet")}-scrim`,$.element.parentNode?.insertBefore(j,$.element.nextSibling),q)$.element.classList.add(`${$.getClass("sheet")}--dismissible`),j.addEventListener("click",()=>{if(q)Y()});if(Q)$.element.classList.add(`${$.getClass("sheet")}--open`);if(J.elevation)$.element.classList.add(`${$.getClass("sheet")}--elevation-${J.elevation}`);document.addEventListener("keydown",(G)=>{if(G.key==="Escape"&&Z&&q)Y()});function K(){if(!Z){if(Z=!0,$.element.classList.add(`${$.getClass("sheet")}--open`),$.events.emit(e9.OPEN),J.onOpen)J.onOpen()}}function Y(){if(Z){if(Z=!1,$.element.classList.remove(`${$.getClass("sheet")}--open`),$.events.emit(e9.CLOSE),J.onClose)J.onClose()}}return{...$,state:{open:K,close:Y,isOpen(){return Z},setDismissible(G){if(G)$.element.classList.add(`${$.getClass("sheet")}--dismissible`);else $.element.classList.remove(`${$.getClass("sheet")}--dismissible`)}},initialize(){if(j.parentNode!==$.element.parentNode)$.element.parentNode?.insertBefore(j,$.element.nextSibling)}}};var hJ=(J)=>($)=>{if(J.enableGestures===!1)return $;let Q=J.position||b6.BOTTOM,q=0,Z=0,j=!1,K=$.dragHandle?.element||$.element,Y=(U)=>{if(!$.state.isOpen())return;if(j=!0,document.body.style.userSelect="none",U.type==="touchstart")q=U.touches[0].clientY,Z=U.touches[0].clientX;else q=U.clientY,Z=U.clientX,document.addEventListener("mousemove",G),document.addEventListener("mouseup",z);$.events.emit(e9.DRAG_START)},G=(U)=>{if(!j)return;let _,N;if(U.type==="touchmove")_=U.touches[0].clientY,N=U.touches[0].clientX;else _=U.clientY,N=U.clientX;let F=0;switch(Q){case b6.BOTTOM:if(F=_-q,F<0)F=0;$.element.style.transform=`translateY(${F}px)`;break;case b6.TOP:if(F=q-_,F<0)F=0;$.element.style.transform=`translateY(-${F}px)`;break;case b6.LEFT:if(F=Z-N,F<0)F=0;$.element.style.transform=`translateX(-${F}px)`;break;case b6.RIGHT:if(F=N-Z,F<0)F=0;$.element.style.transform=`translateX(${F}px)`;break}let k=Q===b6.BOTTOM||Q===b6.TOP?$.element.offsetHeight:$.element.offsetWidth,L=Math.min(F/k,1),D=$.element.nextElementSibling;if(D&&D.classList.contains(`${$.getClass("sheet")}-scrim`))D.style.opacity=`${0.32*(1-L)}`},z=()=>{if(!j)return;j=!1,document.body.style.userSelect="",document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",z);let U=Q===b6.BOTTOM||Q===b6.TOP?$.element.offsetHeight:$.element.offsetWidth,_=0;if($.element.style.transform){let N=$.element.style.transform.match(/translate[XY]\(([^p]+)px\)/);_=N?parseFloat(N[1]):0}if(_>U*0.3)$.state.close();else{$.element.style.transform="";let N=$.element.nextElementSibling;if(N&&N.classList.contains(`${$.getClass("sheet")}-scrim`))N.style.opacity=""}$.events.emit(e9.DRAG_END)};K.addEventListener("touchstart",Y),K.addEventListener("touchmove",G),K.addEventListener("touchend",z),K.addEventListener("mousedown",Y);let W=()=>{K.removeEventListener("touchstart",Y),K.removeEventListener("touchmove",G),K.removeEventListener("touchend",z),K.removeEventListener("mousedown",Y),document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",z)},X=$.lifecycle?.destroy||(()=>{});return $.lifecycle={...$.lifecycle,destroy:()=>{W(),X()}},$};var O5=({state:J,lifecycle:$})=>(Q)=>({...Q,element:Q.element,container:Q.container,open(){return J.open(),this},close(){return J.close(),this},setContent(q){return Q.content.setContent(q),this},getContent(){return Q.content.getContent()},setTitle(q){return Q.title.setTitle(q),this},getTitle(){return Q.title.getTitle()},setDragHandle(q){if(Q.dragHandle)Q.dragHandle.setVisible(q);return this},setMaxHeight(q){return Q.container.style.maxHeight=q,this},destroy(){$.destroy()},initialize(){if(Q.initialize)Q.initialize();return this}});m();var M9={STANDARD:"standard",MODAL:"modal",EXPANDED:"expanded"},b9={BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right"},uJ={OPEN:"open",CLOSE:"close",DRAG_START:"dragstart",DRAG_END:"dragend"},h$={LEVEL_1:1,LEVEL_2:2,LEVEL_3:3,LEVEL_4:4,LEVEL_5:5},j9={VARIANT:M9.STANDARD,POSITION:b9.BOTTOM,OPEN:!1,DISMISSIBLE:!0,DRAG_HANDLE:!0,ELEVATION:h$.LEVEL_3,TITLE:"",CONTENT:"",MAX_HEIGHT:"80%",ENABLE_GESTURES:!0},fJ={DURATION:300,TIMING:"cubic-bezier(0.4, 0, 0.2, 1)",DELAY:0},gJ={MIN_VELOCITY:0.3,MIN_DISTANCE:30,DISMISS_THRESHOLD:0.3},dJ={CONTAINER:"sheet",SCRIM:"sheet__scrim",PANEL:"sheet__panel",DRAG_HANDLE:"sheet__drag-handle",TITLE:"sheet__title",CONTENT:"sheet__content",STANDARD:"sheet--standard",MODAL:"sheet--modal",EXPANDED:"sheet--expanded",BOTTOM:"sheet--bottom",TOP:"sheet--top",LEFT:"sheet--left",RIGHT:"sheet--right",OPEN:"sheet--open",DRAGGING:"sheet--dragging",ELEVATION_PREFIX:"sheet--elevation-"};var b3={variant:M9.STANDARD,position:b9.BOTTOM,open:j9.OPEN,dismissible:j9.DISMISSIBLE,dragHandle:j9.DRAG_HANDLE,elevation:j9.ELEVATION,enableGestures:j9.ENABLE_GESTURES},P5=(J={})=>b(b3,J,"sheet"),R5=(J)=>{return f(J,{tag:"div",attributes:{role:"dialog","aria-modal":J.variant===M9.MODAL?"true":"false"},className:J.class,forwardEvents:{click:!0,keydown:!0}})},y5=(J)=>({state:{open:()=>J.state.open(),close:()=>J.state.close()},lifecycle:{destroy:()=>J.lifecycle.destroy()}});var v3=(J={})=>{let $=P5(J);try{let Q=I(T,h(),S(R5($)),Y6($),bJ($),vJ($),CJ($),EJ($),hJ($),v(),(q)=>O5(y5(q))(q))($);return Q.initialize(),Q}catch(Q){throw console.error("Sheet creation error:",Q),Error(`Failed to create sheet: ${Q.message}`)}},rJ=v3;s();c();u6();var lJ=(J)=>($)=>{if(!J.range||!J.secondValue||!$.schema)return $;try{let Q=J.min||0,q=J.max||100,Z=J.secondValue,j=(Z-Q)/(q-Q)*100,K=J.valueFormatter||((U)=>U.toString()),Y=J.disabled===!0,G=$.getClass,z=JSON.parse(JSON.stringify($.schema)),W=z.element.options.className||[];if(Array.isArray(W))W.push(G("slider--range"));else z.element.options.className=`${W} ${G("slider--range")}`.trim();let X=z.element.children.container.children;return X.secondHandle={name:"secondHandle",creator:E,options:{tag:"div",className:G("slider-handle"),attributes:{role:"slider","aria-valuemin":String(Q),"aria-valuemax":String(q),"aria-valuenow":String(Z),"aria-orientation":"horizontal",tabindex:Y?"-1":"0","aria-disabled":Y?"true":"false","data-value":String(Z),"data-handle-index":"1"},style:{left:`${j}%`}}},X.secondValueBubble={name:"secondValueBubble",creator:E,options:{tag:"div",className:G("slider-value"),attributes:{"aria-hidden":"true","data-handle-index":"1"},text:K(Z),style:{left:`${j}%`}}},{...$,schema:z}}catch(Q){return console.warn("Error enhancing structure with range functionality:",Q),$}};var o6={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",ERROR:"error"},V6={XS:16,S:24,M:40,L:56,XL:80},Z6={HANDLE_SIZE:16,SMALL_HANDLE_HEIGHT:48,HANDLE_HEIGHT_OFFSET:16,MIN_HEIGHT:40,TRACK_RADIUS:3,SMALL_TRACK_EXTERNAL_RADIUS:10,LARGE_TRACK_RADIUS_RATIO:0.35,TICK_SIZE:4,DOT_SIZE:4,HANDLE_GAP:8,HANDLE_GAP_PRESSED_REDUCTION:2,CENTER_GAP:4,EDGE_PADDING:7},M6={CHANGE:"change",INPUT:"input",FOCUS:"focus",BLUR:"blur",START:"start",END:"end"},g7={START:"start",END:"end"},k6={MIN:0,MAX:100,VALUE:0,STEP:1,DISABLED:!1,COLOR:o6.PRIMARY,SIZE:"XS",TICKS:!1,SHOW_VALUE:!0,SNAP_TO_STEPS:!0,RANGE:!1,CENTERED:!1,ICON_POSITION:g7.START,LABEL_POSITION:g7.START},pJ={ROOT:"slider",CONTAINER:"slider__container",FILL:"slider__fill",HANDLE:"slider__handle",HANDLE_SECOND:"slider__handle--second",LABEL:"slider__label",VALUE:"slider__value",ICON:"slider__icon",DISABLED:"slider--disabled",FOCUSED:"slider--focused",DRAGGING:"slider--dragging",RANGE:"slider--range",PRIMARY:"slider--primary",SECONDARY:"slider--secondary",TERTIARY:"slider--tertiary",ERROR:"slider--error"};var sJ=(J)=>($)=>{if(J.disabled===!0)setTimeout(()=>{q()},0);function q(){if($.element.classList.add(`${$.getClass("slider")}--disabled`),$.element.setAttribute("aria-disabled","true"),$.structure?.handle)$.structure.handle.tabIndex=-1,$.structure.handle.setAttribute("aria-disabled","true");if(J.range&&$.structure?.secondHandle)$.structure.secondHandle.tabIndex=-1,$.structure.secondHandle.setAttribute("aria-disabled","true");if($.drawCanvas)$.drawCanvas()}function Z(){if($.element.classList.remove(`${$.getClass("slider")}--disabled`),$.element.setAttribute("aria-disabled","false"),$.structure?.handle)$.structure.handle.tabIndex=0,$.structure.handle.setAttribute("aria-disabled","false");if(J.range&&$.structure?.secondHandle)$.structure.secondHandle.tabIndex=0,$.structure.secondHandle.setAttribute("aria-disabled","false");if($.drawCanvas)$.drawCanvas()}function j(){return Object.values(o6).find((Y)=>$.element.classList.contains(`${$.getClass("slider")}--${Y}`))||o6.PRIMARY}function K(){return Object.keys(V6).find((z)=>$.element.classList.contains(`${$.getClass("slider")}--${z.toLowerCase()}`))||"XS"}return{...$,disabled:{enable(){return Z(),this},disable(){return q(),this},isDisabled(){return $.element.classList.contains(`${$.getClass("slider")}--disabled`)}},appearance:{setColor(Y){if(Object.values(o6).forEach((G)=>{$.element.classList.remove(`${$.getClass("slider")}--${G}`)}),Y!==o6.PRIMARY)$.element.classList.add(`${$.getClass("slider")}--${Y}`);return this},getColor(){return j()},setSize(Y){Object.keys(V6).forEach((W)=>{$.element.classList.remove(`${$.getClass("slider")}--${W.toLowerCase()}`)});let z;if(typeof Y==="string"&&Y in V6)z=Y;else if(typeof Y==="number"){let W=Object.entries(V6).find(([,X])=>X===Y);z=W?W[0]:"XS"}else z="XS";return $.element.classList.add(`${$.getClass("slider")}--${z.toLowerCase()}`),this},getSize(){return K()},showTicks(Y){if(J.ticks=Y,$.slider)$.slider.regenerateTicks();return this},showCurrentValue(Y){return J.showValue=Y,this}}}};var A5=(J,$,Q,q)=>{let Z=$.component?.components||{},j=$.component||{},K=j.container||Z.container||null,Y=j.handle||Z.handle||null,G=j.valueBubble||Z.valueBubble||null,z=j.secondHandle||Z.secondHandle||null,W=j.secondValueBubble||Z.secondValueBubble||null,{getValueFromPosition:X=()=>0,roundToStep:U=(w)=>w,clamp:_=(w)=>w,showValueBubble:N=()=>{},render:F=()=>{}}=Q,{triggerEvent:k=()=>({defaultPrevented:!1})}=q,L=!1,D=0,B=3,H=null,V=()=>{if($.valueHideTimer)clearTimeout($.valueHideTimer),$.valueHideTimer=null},O=()=>{if(V(),G)N(G,!1);if(W)N(W,!1)},M=(w)=>{if(O(),w&&J.showValue)N(w,!0)},P=(w,l=0)=>{if(V(),!w||!J.showValue)return;if(l>0)$.valueHideTimer=setTimeout(()=>{N(w,!1)},l);else N(w,!1)},R=()=>{if(Y)Y.classList.remove(`${$.component.getClass("slider-handle")}--focused`);if(z)z.classList.remove(`${$.component.getClass("slider-handle")}--focused`);try{let w=$.component.getClass("slider-handle--focused");if(document.querySelectorAll(`.${w}`).forEach((l)=>{l.classList.remove(w)}),document.activeElement?.classList.contains($.component.getClass("slider-handle")))document.activeElement.blur()}catch(w){console.warn("Error clearing keyboard focus:",w)}},y=(w,l=!1)=>{if(!$.component||$.component.disabled&&$.component.disabled.isDisabled())return;w.preventDefault(),w.stopPropagation(),O(),R(),D=w.type.includes("touch")?w.touches[0].clientX:w.clientX,$.dragging=!1,$.pressed=!0,L=!1,$.activeHandle=l?"second":"first",$.activeBubble=l?W:G,M($.activeBubble),document.addEventListener("mousemove",A),document.addEventListener("mouseup",C),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",C),F(),k(M6.START,w)},x=(w)=>{if(!$.component||$.component.disabled&&$.component.disabled.isDisabled()||!K)return;w.preventDefault(),O(),R();let l=!1;try{let a=w.type.includes("touch")?w.touches[0].clientX:w.clientX,i=X(a);if(J.snapToSteps&&$.step>0)i=U(i);if(i=_(i,$.min,$.max),J.range&&$.secondValue!==null){let O6=Math.abs(i-$.value);l=Math.abs(i-$.secondValue)<O6,l?$.secondValue=i:$.value=i}else if(J.centered&&$.component.slider&&$.component.slider.setValue)$.component.slider.setValue(i,!1);else $.value=i;F(),k(M6.INPUT,w)}catch(a){console.warn("Error handling track click:",a)}if($.activeHandle=l?"second":"first",$.activeBubble=l?W:G,D=w.type.includes("touch")?w.touches[0].clientX:w.clientX,J.centered&&!J.range)M($.activeBubble),document.addEventListener("mousemove",A),document.addEventListener("mouseup",C),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",C),$.pressed=!1,k(M6.START,w);else $.dragging=!1,$.pressed=!1,L=!1,M($.activeBubble),document.addEventListener("mousemove",A),document.addEventListener("mouseup",C),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",C),F(),k(M6.START,w)},A=(w)=>{if(!$.activeHandle||!K)return;w.preventDefault();try{let l=w.type.includes("touch")?w.touches[0].clientX:w.clientX;if(!L&&Math.abs(l-D)>=B)L=!0,$.dragging=!0,$.component.element.classList.add(`${$.component.getClass("slider")}--dragging`);let a=X(l);if(J.snapToSteps&&$.step>0)a=U(a);a=_(a,$.min,$.max);let i=$.activeHandle==="second";if(J.range&&$.secondValue!==null)if(i)if(a>=$.value)$.secondValue=a;else P($.activeBubble,0),$.secondValue=$.value,$.value=a,$.activeHandle="first",$.activeBubble=G,M($.activeBubble);else if(a<=$.secondValue)$.value=a;else P($.activeBubble,0),$.value=$.secondValue,$.secondValue=a,$.activeHandle="second",$.activeBubble=W,M($.activeBubble);else{if(J.centered)$.previousValue=$.value;$.value=a}F(),k(M6.INPUT,w)}catch(l){console.warn("Error during slider drag:",l)}},C=(w)=>{if(!$.activeHandle)return;w.preventDefault(),$.dragging=!1,$.pressed=!1,L=!1,$.component.element.classList.remove(`${$.component.getClass("slider")}--dragging`),P($.activeBubble,1000),document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",C),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",C),$.activeHandle=null,F(),k(M6.CHANGE,w),k(M6.END,w)},r=(w,l=!1)=>{if($.component.disabled&&$.component.disabled.isDisabled())return;let a=$.step||1,i=l?$.secondValue:$.value,O6=w.shiftKey?a*10:a;if(w.key==="Tab")return;let J6=!1;switch(w.key){case"ArrowRight":case"ArrowUp":w.preventDefault(),i=Math.min(i+O6,$.max),J6=!0;break;case"ArrowLeft":case"ArrowDown":w.preventDefault(),i=Math.max(i-O6,$.min),J6=!0;break;case"Home":w.preventDefault(),i=$.min,J6=!0;break;case"End":w.preventDefault(),i=$.max,J6=!0;break;case"PageUp":w.preventDefault(),i=Math.min(i+a*10,$.max),J6=!0;break;case"PageDown":w.preventDefault(),i=Math.max(i-a*10,$.min),J6=!0;break;default:return}if(!J6)return;if($.activeBubble=l?W:G,M($.activeBubble),l)$.secondValue=i;else{if(J.centered)$.previousValue=$.value;$.value=i}F(),k(M6.INPUT,w),k(M6.CHANGE,w)},Q6=(w,l=!1)=>{if($.component.disabled&&$.component.disabled.isDisabled())return;let a=l?z:Y;if(H&&H!==a)O();H=a,a.classList.add(`${$.component.getClass("slider-handle")}--focused`),M(l?W:G),$.activeBubble=l?W:G,k(M6.FOCUS,w)},X6=(w,l=!1)=>{(l?z:Y).classList.remove(`${$.component.getClass("slider-handle")}--focused`);let i=w.relatedTarget;if(!i||i!==(l?Y:z))P(l?W:G,200);k(M6.BLUR,w)};return{handleHandleMouseDown:y,handleTrackMouseDown:x,handleMouseMove:A,handleMouseUp:C,handleKeyDown:r,handleFocus:Q6,handleBlur:X6,setupEventListeners:()=>{if(!$.component||!Y){console.warn("Cannot set up event listeners: missing component or handle");return}if(K.addEventListener("mousedown",x),K.addEventListener("touchstart",x,{passive:!1}),Y.addEventListener("mousedown",(w)=>y(w,!1)),Y.addEventListener("touchstart",(w)=>y(w,!1),{passive:!1}),Y.addEventListener("keydown",(w)=>r(w,!1)),Y.addEventListener("focus",(w)=>Q6(w,!1)),Y.addEventListener("blur",(w)=>X6(w,!1)),J.range&&z)z.addEventListener("mousedown",(w)=>y(w,!0)),z.addEventListener("touchstart",(w)=>y(w,!0),{passive:!1}),z.addEventListener("keydown",(w)=>r(w,!0)),z.addEventListener("focus",(w)=>Q6(w,!0)),z.addEventListener("blur",(w)=>X6(w,!0))},cleanupEventListeners:()=>{if(!$.component)return;if(K)K.removeEventListener("mousedown",x),K.removeEventListener("touchstart",x);if(Y)Y.removeEventListener("mousedown",(w)=>y(w,!1)),Y.removeEventListener("touchstart",(w)=>y(w,!1)),Y.removeEventListener("keydown",(w)=>r(w,!1)),Y.removeEventListener("focus",(w)=>Q6(w,!1)),Y.removeEventListener("blur",(w)=>X6(w,!1));if(J.range&&z)z.removeEventListener("mousedown",(w)=>y(w,!0)),z.removeEventListener("touchstart",(w)=>y(w,!0)),z.removeEventListener("keydown",(w)=>r(w,!0)),z.removeEventListener("focus",(w)=>Q6(w,!0)),z.removeEventListener("blur",(w)=>X6(w,!0));document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",C),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",C)},showActiveBubble:M,hideActiveBubble:P,hideAllBubbles:O,clearKeyboardFocus:R}};var mJ=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize slider controller: missing element"),$;let Q={component:$,value:J.value!==void 0?J.value:0,secondValue:J.secondValue!==void 0?J.secondValue:null,min:J.min!==void 0?J.min:0,max:J.max!==void 0?J.max:100,step:J.step!==void 0?J.step:1,dragging:!1,pressed:!1,activeHandle:null,activeBubble:null,valueHideTimer:null},q={triggerEvent(H,V=null){let O={slider:Q.component,value:Q.value,secondValue:Q.secondValue,originalEvent:V,preventDefault:()=>{O.defaultPrevented=!0},defaultPrevented:!1};return Q.component.emit(H,O),O}},Z=()=>{if(!Q.component)return{};let H=Q.component.components||{},V=Q.component;return{container:V.container||H.container,handle:V.handle||H.handle,valueBubble:V.valueBubble||H.valueBubble,secondHandle:V.secondHandle||H.secondHandle,secondValueBubble:V.secondValueBubble||H.secondValueBubble,...H}},j=(H)=>{let V=Q.max-Q.min;return V===0?0:(H-Q.min)/V*100},K=()=>{let H=Z(),{handle:V,container:O}=H;if(!V||!O)return null;try{let M=V.getBoundingClientRect(),P=O.getBoundingClientRect(),R=M.width||Z6.HANDLE_SIZE,y=P.width,x=Z6.EDGE_PADDING/y*100,C=(Q.activeHandle?6:8)/y*100;return{handleSize:R,trackSize:y,edgeConstraint:x,paddingPercent:C}}catch(M){return console.warn("Error calculating track dimensions:",M),{handleSize:Z6.HANDLE_SIZE,trackSize:200,edgeConstraint:3,paddingPercent:4}}},Y=(H,V=200)=>{let O=Z6.EDGE_PADDING/V*100,M=O,P=100-O,R=P-M;if(H<=0)return M;if(H>=100)return P;return M+H/100*R},G=(H)=>{let V=Z(),{handle:O,container:M}=V;if(!O||!M)return Q.min;try{let P=M.getBoundingClientRect(),R=Q.max-Q.min,y=P.left+Z6.EDGE_PADDING,x=P.right-Z6.EDGE_PADDING,A=x-y,r=(Math.max(y,Math.min(x,H))-y)/A;return Q.min+r*R}catch(P){return console.warn("Error calculating value from position:",P),Q.min}},z=(H)=>{let V=Q.step;if(!V||V<=0)return H;let O=Math.round((H-Q.min)/V);return Q.min+O*V},W=(H,V,O)=>Math.min(Math.max(H,V),O),X=()=>{let H=Z(),{handle:V,container:O,valueBubble:M,secondHandle:P,secondValueBubble:R}=H;if(!V||!O)return;let y=K();if(!y)return;let{trackSize:x}=y,A=j(Q.value),C=Y(A,x);if(V.style.left=`${C}%`,V.style.transform="translate(-50%, -50%)",M)M.style.left=`${C}%`,M.style.transform="translateX(-50%)";if(J.range&&P&&Q.secondValue!==null){let r=j(Q.secondValue),Q6=Y(r,x);if(P.style.left=`${Q6}%`,P.style.transform="translate(-50%, -50%)",R)R.style.left=`${Q6}%`,R.style.transform="translateX(-50%)"}if(V)V.setAttribute("aria-valuenow",String(Q.value))},U=()=>{let H=Z(),{valueBubble:V,secondValueBubble:O}=H;if(!V)return;let M=J.valueFormatter||((P)=>P.toString());if(V.textContent=M(Q.value),J.range&&O&&Q.secondValue!==null)O.textContent=M(Q.secondValue)},_=(H,V)=>{if(!H||!J.showValue)return;let O=Q.component.getClass("slider-value");H.classList[V?"add":"remove"](`${O}--visible`)},N=()=>{},F=()=>{},k=()=>{try{if(X(),U(),$.drawCanvas)$.drawCanvas(Q)}catch(H){console.warn("Error rendering UI:",H)}},D=A5(J,Q,{getPercentage:j,getValueFromPosition:G,roundToStep:z,clamp:W,showValueBubble:_,updateUi:k,render:k},q),B=()=>{try{let H=Z();if(!H.handle){console.warn("Cannot initialize slider controller: missing required handle component");return}$.element.setAttribute("aria-valuemin",String(Q.min)),$.element.setAttribute("aria-valuemax",String(Q.max)),$.element.setAttribute("aria-valuenow",String(Q.value));let{handle:V,secondHandle:O}=H;if(V){if(V.setAttribute("aria-valuemin",String(Q.min)),V.setAttribute("aria-valuemax",String(Q.max)),V.setAttribute("aria-valuenow",String(Q.value)),J.range&&O&&Q.secondValue!==null)O.setAttribute("aria-valuemin",String(Q.min)),O.setAttribute("aria-valuemax",String(Q.max)),O.setAttribute("aria-valuenow",String(Q.secondValue))}D.setupEventListeners(),k()}catch(H){console.error("Error initializing slider controller:",H)}};if($.lifecycle){let H=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{D.cleanupEventListeners(),H()}}return setTimeout(()=>{B()},0),{...$,slider:{setValue(H,V=!0){let O=W(H,Q.min,Q.max);if(Q.value=O,k(),V)q.triggerEvent(M6.CHANGE);return this},getValue(){return Q.value},setSecondValue(H,V=!0){if(!J.range)return this;let O=W(H,Q.min,Q.max);if(Q.secondValue=O,k(),V)q.triggerEvent(M6.CHANGE);return this},getSecondValue(){return J.range?Q.secondValue:null},setMin(H){Q.min=H,$.element.setAttribute("aria-valuemin",String(H));let V=Z();if(V.handle)V.handle.setAttribute("aria-valuemin",String(H));if(J.range&&V.secondHandle)V.secondHandle.setAttribute("aria-valuemin",String(H));if(Q.value<H)Q.value=H;if(J.range&&Q.secondValue!==null&&Q.secondValue<H)Q.secondValue=H;if(J.ticks||J.tickLabels)N();return k(),this},getMin(){return Q.min},setMax(H){Q.max=H,$.element.setAttribute("aria-valuemax",String(H));let V=Z();if(V.handle)V.handle.setAttribute("aria-valuemax",String(H));if(J.range&&V.secondHandle)V.secondHandle.setAttribute("aria-valuemax",String(H));if(Q.value>H)Q.value=H;if(J.range&&Q.secondValue!==null&&Q.secondValue>H)Q.secondValue=H;if(J.ticks||J.tickLabels)N();return k(),this},getMax(){return Q.max},setStep(H){if(Q.step=H,$.element.classList[H>0?"add":"remove"](`${$.getClass("slider")}--discrete`),J.ticks||J.tickLabels)N(),F();return this},getStep(){return Q.step},regenerateTicks(){return k(),this},updateUi(){return k(),this}}}};R9();U$();var C3=(J)=>J?.disabled?.isDisabled?.()||J?.element?.classList?.contains?.(`${J?.getClass?.("slider")}--disabled`)||!1,iJ=(J,$,Q="track")=>{let q=C3($),Z=J.color||"primary";if(q){let K=F6("sys-color-on-surface",{fallback:"#000000"});return{primary:D7(K,0.38),secondary:D7(K,0.12)}}if(Q==="tick")return{primary:F6(`sys-color-on-${Z}`,{fallback:"#ffffff"}),secondary:F6(`sys-color-${Z}`,{fallback:"#1976d2"})};let j=F6(`sys-color-${Z}`,{fallback:"#1976d2"});return{primary:j,secondary:D7(j,0.24)}},u$=(J,$,Q)=>(J-$)/(Q-$)*100,A6=(J,$,Q,q,Z,j,K)=>{if(q>0)T8(J,$,Q,q,Z,j,j,K)},d7=(J)=>{if(typeof J==="number")return Math.max(J,V6.XS);if(typeof J==="string"&&J in V6)return V6[J];return V6.XS},cJ=(J)=>{let $=d7(J);if($<=V6.S)return Z6.SMALL_HANDLE_HEIGHT;return $+Z6.HANDLE_HEIGHT_OFFSET},E3=(J)=>{let $=d7(J);if($<=V6.S)return Z6.SMALL_TRACK_EXTERNAL_RADIUS;return $*Z6.LARGE_TRACK_RADIUS_RATIO},w5=(J,$,Q)=>{let q=d7(Q?.size),Z=cJ(Q?.size),j=J.parentElement;if(!j)return;let K=Math.max(j.getBoundingClientRect().width||j.offsetWidth,200),Y=Math.max(Z+20,q+32,Z6.MIN_HEIGHT);j.style.height=`${Y}px`,v8($,K,Y)},x5=(J,$)=>{let Q=J.parentElement;if(!Q)throw Error("Canvas must have a parent element");let q=d7($?.size),Z=cJ($?.size),j=Math.max(Q.getBoundingClientRect().width||Q.offsetWidth,200),K=Math.max(Z+20,q+32,Z6.MIN_HEIGHT);return Q.style.height=`${K}px`,b8(J,j,K)},f$=(J,$)=>{let Q=Z6.EDGE_PADDING/$*100,q=Q,Z=100-Q,j=Z-q;if(J<=0)return q;if(J>=100)return Z;return q+J/100*j},h3=(J,$,Q,q,Z,j)=>{let K=Q/2,Y=d7(q.size),G=E3(q.size),z=Z6.TRACK_RADIUS,W=x8(J,0,K-Y/2,$,Y,G),{primary:X,secondary:U}=iJ(q,j),_=u$(Z.value,Z.min,Z.max),N=f$(_,$),F=Z.pressed?Z6.HANDLE_GAP_PRESSED_REDUCTION:0,k=Z6.HANDLE_GAP-F,D=Z6.CENTER_GAP/2/$*100,B=k/$*100;if(q.centered){let H=u$(0,Z.min,Z.max),V=f$(H,$),O=Math.abs(N-V)<B,M=Z.value>=0;if(O){let P=(N-B)/100*$;if(P>0)A6(J,0,K-Y/2,P,Y,z,U);let R=(N+B)/100*$,y=$-R;if(y>0)A6(J,R,K-Y/2,y,Y,z,U)}else if(M){let P=(V-D)/100*$;if(P>0)A6(J,0,K-Y/2,P,Y,z,U);let R=(V+D)/100*$,y=(N-B)/100*$-R;if(y>0)A6(J,R,K-Y/2,y,Y,z,X);let x=(N+B)/100*$,A=$-x;if(A>0)A6(J,x,K-Y/2,A,Y,z,U)}else{let P=(N-B)/100*$;if(P>0)A6(J,0,K-Y/2,P,Y,z,U);let R=(N+B)/100*$,y=(V-D)/100*$-R;if(y>0)A6(J,R,K-Y/2,y,Y,z,X);let x=(V+D)/100*$,A=$-x;if(A>0)A6(J,x,K-Y/2,A,Y,z,U)}}else if(q.range&&Z.secondValue!==null){let H=u$(Z.secondValue,Z.min,Z.max),V=f$(H,$),O=Math.min(N,V),M=Math.max(N,V),P=N<=V,R=Z.pressed&&Z.activeHandle==="first"?Z6.HANDLE_GAP_PRESSED_REDUCTION:0,y=Z.pressed&&Z.activeHandle==="second"?Z6.HANDLE_GAP_PRESSED_REDUCTION:0,x=Z6.HANDLE_GAP-R,A=Z6.HANDLE_GAP-y,C=P?x/$*100:A/$*100,r=P?A/$*100:x/$*100,Q6=(O-C)/100*$;if(Q6>0)A6(J,0,K-Y/2,Q6,Y,z,U);let X6=(O+C)/100*$,$6=(M-r)/100*$-X6;if($6>Y)A6(J,X6,K-Y/2,$6,Y,z,X);let B6=(M+r)/100*$,w=$-B6;if(w>0)A6(J,B6,K-Y/2,w,Y,z,U)}else{let H=(N-B)/100*$;if(H>0)A6(J,0,K-Y/2,H,Y,z,X);let V=(N+B)/100*$,O=$-V;if(O>0)A6(J,V,K-Y/2,O,Y,z,U)}W()},u3=(J,$,Q,q,Z,j)=>{if(!q.ticks)return;let K=Z6.TICK_SIZE,Y=Q/2,{primary:G,secondary:z}=iJ(q,j,"tick"),W=Math.floor((Z.max-Z.min)/Z.step);for(let X=0;X<=W;X++){let U=Z.min+X*Z.step;if(U>Z.max)continue;let _=u$(U,Z.min,Z.max),F=f$(_,$)/100*$,k=Math.abs(U-Z.value)<Z.step*0.1,L=q.range&&Z.secondValue!==null&&Math.abs(U-Z.secondValue)<Z.step*0.1;if(k||L)continue;let D=!1;if(q.centered)D=Z.value>=0?U>=0&&U<=Z.value:U>=Z.value&&U<=0;else if(q.range&&Z.secondValue!==null){let B=Math.min(Z.value,Z.secondValue),H=Math.max(Z.value,Z.secondValue);D=U>=B&&U<=H}else D=U<=Z.value;J.fillStyle=D?G:z,J.globalAlpha=D?1:0.5,J.beginPath(),J.arc(F,Y,K/2,0,Math.PI*2),J.fill()}J.globalAlpha=1},f3=(J,$,Q,q,Z)=>{if(q.ticks)return;let j=Z6.DOT_SIZE,K=Q/2,Y=Z6.EDGE_PADDING,{primary:G}=iJ(q,Z,"dot");J.fillStyle=G,J.beginPath(),J.arc($-Y,K,j/2,0,Math.PI*2),J.fill()},aJ=(J,$,Q,q)=>{let{ctx:Z,width:j,height:K}=J;if(j===0||K===0)return;I8(Z,j,K),f3(Z,j,K,$,q),h3(Z,j,K,$,Q,q),u3(Z,j,K,$,Q,q)},T5=(J,$)=>{let Q=cJ($),q=J.handle||J.components?.handle,Z=J.secondHandle||J.components?.secondHandle;if(q)q.style.height=`${Q}px`,q.style.transform="translate(-50%, -50%)";if(Z)Z.style.height=`${Q}px`,Z.style.transform="translate(-50%, -50%)"},g3=(J,$,Q)=>{if(J)return{value:J.value,secondValue:J.secondValue,min:J.min,max:J.max,step:J.step,pressed:J.pressed||!1,activeHandle:J.activeHandle||null};if($?.slider)return{value:$.slider.getValue(),secondValue:$.slider.getSecondValue(),min:$.slider.getMin(),max:$.slider.getMax(),step:$.slider.getStep(),pressed:!1,activeHandle:null};return Q||{value:0,secondValue:null,min:0,max:100,step:1,pressed:!1,activeHandle:null}},oJ=(J)=>($)=>{let Q=E8(`${$.getClass("slider-canvas")}`,{zIndex:"1"}),q=$.container||$.components?.container;if(q)q.insertBefore(Q,q.firstChild);else $.element.appendChild(Q);let Z=null,j=null,K=null,Y=J.size||"XS",G=g3(null,$,{value:J.value||0,secondValue:J.secondValue||null,min:J.min||0,max:J.max||100,step:J.step||1,pressed:!1,activeHandle:null}),z={animatedValue:G.value,animatedSecondValue:G.secondValue,targetValue:G.value,targetSecondValue:G.secondValue,startValue:G.value,startSecondValue:G.secondValue,startTime:0,duration:S8.MEDIUM,animationFrame:null};if($.animationState=z,C8(()=>{try{return Z=x5(Q,{...J,size:Y}),$.ctx=Z.ctx,!0}catch(k){return console.warn("Slider canvas initialization failed:",k),!1}},()=>{T5($,Y)}),J.color&&J.color!=="primary")$.element.classList.add(`${$.getClass("slider")}--${J.color}`);$.canvas=Q;let W=()=>{if(!Z)return;aJ(Z,{...J,size:Y},{...G,value:z.animatedValue,secondValue:z.animatedSecondValue},$)},X=(k)=>{if(!Z)return;let D=(k||performance.now())-z.startTime,B=Math.min(D/z.duration,1),H=z$(B),V=z.startValue,O=z.targetValue;if(z.animatedValue=V+(O-V)*H,z.targetSecondValue!==null&&z.animatedSecondValue!==null){let{startSecondValue:M,targetSecondValue:P}=z;z.animatedSecondValue=M+(P-M)*H}if(W(),B<1)z.animationFrame=requestAnimationFrame((M)=>X(M));else z.animationFrame=null},U=(k)=>{if(!Z){console.warn("Canvas context not ready");return}w5(Q,Z,{...J,size:Y});let L,D=!1;if(k)L={value:k.value,secondValue:k.secondValue,min:k.min,max:k.max,step:k.step,pressed:k.pressed||!1,activeHandle:k.activeHandle||null},D=k.dragging||!1,G={...L};else if($.slider)L={value:$.slider.getValue(),secondValue:$.slider.getSecondValue(),min:$.slider.getMin(),max:$.slider.getMax(),step:$.slider.getStep()},G={...L};else L={...G};let B=L.value!==z.targetValue,H=L.secondValue!==z.targetSecondValue;if((B||H)&&!D){if(z.startValue=z.animatedValue,z.startSecondValue=z.animatedSecondValue,z.targetValue=L.value,z.targetSecondValue=L.secondValue,z.animationFrame)cancelAnimationFrame(z.animationFrame);z.startTime=performance.now(),X()}else if(D){if(z.animatedValue=L.value,z.animatedSecondValue=L.secondValue,z.targetValue=L.value,z.targetSecondValue=L.secondValue,z.startValue=L.value,z.startSecondValue=L.secondValue,z.animationFrame)cancelAnimationFrame(z.animationFrame),z.animationFrame=null;aJ(Z,{...J,size:Y},k||L,$)}else aJ(Z,{...J,size:Y},k||L,$)},_=()=>{if(!Z)return;try{let k=x5(Q,{...J,size:Y});$.ctx=k.ctx,Object.assign(Z,k),W()}catch(k){console.warn("Slider canvas resize failed:",k)}};j=O7($.element,Q,_);let N=()=>W();K=W$(J.color||"primary",N),requestAnimationFrame(()=>{U()}),$.drawCanvas=U,$.resize=_,$.setSize=(k)=>{if(Y=k,Z)w5(Q,Z,{...J,size:Y}),W();T5($,Y)},$.getSize=()=>Y;let F=$.appearance?.setColor;if(F)$.appearance.setColor=(k)=>{if(F(k),J.color&&J.color!=="primary")$.element.classList.remove(`${$.getClass("slider")}--${J.color}`);if(k&&k!=="primary")$.element.classList.add(`${$.getClass("slider")}--${k}`);if(J.color=k,K)K(),K=null;K=W$(k,N),U()};if($.lifecycle){let k=$.lifecycle.destroy||(()=>{});$.lifecycle.destroy=()=>{if(j)j();if(K)K();if(z.animationFrame)cancelAnimationFrame(z.animationFrame);k()}}return $};u6();u9();var $7=(J,$)=>{return Object.assign(J.style,$),J};var tJ=(J)=>($)=>{let Q=(N)=>$.getClass(N),q=J.min||0,Z=J.max||100,j=J.value!==void 0?J.value:q,K=J.disabled===!0,Y=J.valueFormatter||((N)=>N.toString()),G=(j-q)/(Z-q)*100,z=E({tag:"div",className:Q("slider-container"),container:$.element});$7(z,{position:"relative"});let W=E({tag:"div",className:Q("slider-handle"),attributes:{role:"slider","aria-valuemin":String(q),"aria-valuemax":String(Z),"aria-valuenow":String(j),"aria-orientation":"horizontal",tabindex:K?"-1":"0","aria-disabled":K?"true":"false","data-value":String(j),"data-handle-index":"0"},container:z});$7(W,{left:`${G}%`});let X=E({tag:"div",className:Q("slider-value"),attributes:{"aria-hidden":"true","data-handle-index":"0"},text:Y(j),container:z});$7(X,{left:`${G}%`});let U,_;if(J.range){let N=J.secondValue!==void 0?J.secondValue:Z,F=(N-q)/(Z-q)*100;U=E({tag:"div",className:Q("slider-handle"),attributes:{role:"slider","aria-valuemin":String(q),"aria-valuemax":String(Z),"aria-valuenow":String(N),"aria-orientation":"horizontal",tabindex:K?"-1":"0","aria-disabled":K?"true":"false","data-value":String(N),"data-handle-index":"1"},container:z}),$7(U,{left:`${F}%`}),_=E({tag:"div",className:Q("slider-value"),attributes:{"aria-hidden":"true","data-handle-index":"1"},text:Y(N),container:z}),$7(_,{left:`${F}%`})}return{...$,container:z,handle:W,valueBubble:X,secondHandle:U,secondValueBubble:_,getContainer:()=>z,getHandle:()=>W,getValueBubble:()=>X,getSecondHandle:()=>U||null,getSecondValueBubble:()=>_||null}};var I5=(J)=>($)=>{return{...$,element:$.element,setValue(Q,q=!0){return J.slider.setValue(Q,q),this},getValue(){return J.slider.getValue()},setSecondValue(Q,q=!0){return J.slider.setSecondValue(Q,q),this},getSecondValue(){return J.slider.getSecondValue()},setMin(Q){return J.slider.setMin(Q),this},getMin(){return J.slider.getMin()},setMax(Q){return J.slider.setMax(Q),this},getMax(){return J.slider.getMax()},setStep(Q){return J.slider.setStep(Q),this},getStep(){return J.slider.getStep()},enable(){return J.disabled.enable(),this},disable(){return J.disabled.disable(),this},isDisabled(){return J.disabled.isDisabled()},setColor(Q){return J.appearance.setColor(Q),this},getColor(){return J.appearance.getColor()},setSize(Q){return J.appearance.setSize(Q),this},getSize(){return J.appearance.getSize()},showTicks(Q){return J.appearance.showTicks(Q),this},showCurrentValue(Q){return J.appearance.showCurrentValue(Q),this},setLabel(Q){if(J.text?.setText)J.text.setText(Q);return this},getLabel(){return J.text?.getText?J.text.getText():""},setIcon(Q){if(J.icon?.setIcon)J.icon.setIcon(Q);return this},getIcon(){return J.icon?.getIcon?J.icon.getIcon():""},on(Q,q){if(J.events?.on)J.events.on(Q,q);return this},off(Q,q){if(J.events?.off)J.events.off(Q,q);return this},destroy(){if(J.lifecycle?.destroy)J.lifecycle.destroy()}}};m();var d3={min:k6.MIN,max:k6.MAX,value:k6.VALUE,step:k6.STEP,disabled:k6.DISABLED,color:k6.COLOR,size:k6.SIZE,ticks:k6.TICKS,showValue:k6.SHOW_VALUE,snapToSteps:k6.SNAP_TO_STEPS,range:k6.RANGE,centered:k6.CENTERED,iconPosition:k6.ICON_POSITION,labelPosition:k6.LABEL_POSITION,valueFormatter:(J)=>J.toString()},S5=(J={})=>{return b(d3,J,"slider")},b5=(J)=>{let $=["slider",J.class,J.disabled?"slider--disabled":"",J.size&&J.size!=="XS"?`slider--${typeof J.size==="string"?J.size.toLowerCase():J.size}`:"",J.color&&J.color!=="primary"?`slider--${J.color}`:"",J.range?"slider--range":"",J.centered?"slider--centered":"",J.icon?"slider--icon":""].filter(Boolean).join(" "),Q={tabindex:"-1",role:"none","aria-disabled":J.disabled?"true":"false","aria-valuemin":String(J.min||0),"aria-valuemax":String(J.max||100),"aria-valuenow":String(J.value||J.min||0)};return f(J,{tag:"div",attributes:Q,className:$,forwardEvents:{click:!0,keydown:!0,touchstart:!0,touchmove:!0,touchend:!0,mousedown:!0,mousemove:!0,mouseup:!0},interactive:!0})},v5=(J)=>({slider:{setValue:($,Q)=>J.slider?.setValue($,Q),getValue:()=>J.slider?.getValue()??0,setSecondValue:($,Q)=>J.slider?.setSecondValue($,Q),getSecondValue:()=>J.slider?.getSecondValue()??null,setMin:($)=>J.slider?.setMin($),getMin:()=>J.slider?.getMin()??0,setMax:($)=>J.slider?.setMax($),getMax:()=>J.slider?.getMax()??100,setStep:($)=>J.slider?.setStep($),getStep:()=>J.slider?.getStep()??1,regenerateTicks:()=>J.slider?.regenerateTicks?.()},disabled:{enable:()=>J.disabled?.enable?.(),disable:()=>J.disabled?.disable?.(),isDisabled:()=>J.disabled?.isDisabled?.()??!1},appearance:{setColor:($)=>J.appearance?.setColor?.($),getColor:()=>J.appearance?.getColor?.()??"primary",setSize:($)=>J.setSize?.($),getSize:()=>J.getSize?.()??"XS",showTicks:($)=>J.appearance?.showTicks?.($),showCurrentValue:($)=>J.appearance?.showCurrentValue?.($)},text:{setText:($)=>J.label?.setText?.($),getText:()=>J.label?.getText?.()??""},icon:{setIcon:($)=>J.icon?.setIcon?.($),getIcon:()=>J.icon?.getIcon?.()??""},events:{on:($,Q)=>J.on?.($,Q),off:($,Q)=>J.off?.($,Q)},lifecycle:{destroy:()=>J.lifecycle?.destroy?.()}});var r3=(J={})=>{let $=S5(J);try{let Q=I(T,h(),S(b5($)),lJ($),tJ($),d6($),g6($),oJ($),sJ($),mJ($),v())($),q=v5(Q),Z=I5(q)(Q);if($.on&&typeof Z.on==="function")Object.entries($.on).forEach(([j,K])=>{if(typeof K==="function")Z.on(j,K)});return Z}catch(Q){throw console.error("Slider creation error:",Q),Error(`Failed to create slider: ${Q.message}`)}},nJ=r3;n();s();var C5=(J)=>($)=>{if(!J.action)return $;let Q=document.createElement("button");return Q.className=`${J.prefix}-snackbar-action`,Q.textContent=J.action,$.element.appendChild(Q),{...$,actionButton:Q}},E5=(J)=>($)=>{let Q=null,q=()=>{if(Q)clearTimeout(Q),Q=null;if(typeof J.duration==="number"&&J.duration>0)Q=window.setTimeout(()=>{if($.element&&$.emit)$.emit("dismiss")},J.duration)},Z=()=>{if(Q)clearTimeout(Q),Q=null},j=$.lifecycle?.destroy;if($.lifecycle)$.lifecycle.destroy=()=>{if(Z(),j)j.call($.lifecycle)};return{...$,timer:{start:q,stop:Z}}};var g$={BASIC:"basic",ACTION:"action"},t6={CENTER:"center",START:"start",END:"end"},eJ={VISIBLE:"visible",HIDDEN:"hidden"},$1={OPEN:"open",CLOSE:"close",ACTION:"action",DISMISS:"dismiss"},v9={VARIANT:g$.BASIC,POSITION:t6.CENTER,DURATION:4000,Z_INDEX:1000,ANIMATION_DURATION:300},J1={ROOT:"snackbar",BASIC:"snackbar--basic",ACTION:"snackbar--action",CENTER:"snackbar--center",START:"snackbar--start",END:"snackbar--end",VISIBLE:"snackbar--visible",HIDDEN:"snackbar--hidden",MESSAGE:"snackbar__message",ACTION_BUTTON:"snackbar__action"};var h5=(J)=>($)=>{let Q=J.position||t6.CENTER,q=J.prefix||"mtrl",Z=`${q}-snackbar--${Q}`;$.element.classList.add(Z);let j=(K)=>{$.element.classList.remove(Z);let Y=`${q}-snackbar--${K}`;if($.element.classList.add(Y),$.element.classList.contains(`${q}-snackbar--visible`))if(K===t6.CENTER)$.element.style.transform="translateX(-50%) scale(1)";else $.element.style.transform="scale(1)"};return{...$,position:{getPosition:()=>Q,setPosition:(K)=>{if(Object.values(t6).includes(K))return j(K),$;else return console.warn(`Invalid position: ${K}. Using default: ${t6.CENTER}`),j(t6.CENTER),$}}}};c();var u5=({lifecycle:J,queue:$})=>(Q)=>{if(!$)throw Error("Snackbar queue is required");let q=!1,Z={element:Q.element,actionButton:Q.actionButton,timer:Q.timer,position:Q.position,state:q?"visible":"hidden",show(){if(q)return this;return q=!0,this.state="visible",$.add({...this,_show:()=>{document.body.appendChild(Q.element);let j=Q.element.offsetHeight;if(Q.element.classList.add(`${Q.getClass?.("snackbar")}--visible`),Q.timer)Q.timer.start();return this}}),this},hide(){if(!q)return this;if(q=!1,this.state="hidden",Q.timer)Q.timer.stop();let j=(K)=>{if(K.propertyName!=="opacity")return;if(Q.element.removeEventListener("transitionend",j),Q.element.parentNode)Q.element.remove()};return Q.element.addEventListener("transitionend",j),Q.element.classList.remove(`${Q.getClass?.("snackbar")}--visible`),this},setMessage(j){return Q.text?.setText(j),this},getMessage(){return Q.text?.getText()||""},setAction(j){if(Q.actionButton)Q.actionButton.textContent=j;return this},getAction(){return Q.actionButton?Q.actionButton.textContent||"":""},setDuration(){return this},getDuration(){return 0},setPosition(j){if(Q.position?.setPosition)Q.position.setPosition(j);return this},getPosition(){return Q.position?.getPosition?.()||"center"},on(j,K){return Q.on?.(j,K),this},off(j,K){return Q.off?.(j,K),this},destroy(){if(q&&Q.element.parentNode)Q.element.remove();if(Q.timer)Q.timer.stop();J.destroy()}};if(Q.actionButton)Q.actionButton.addEventListener("click",()=>{Q.emit?.("action"),Q.emit?.("dismiss")});if(Q.on){let j=()=>{if(q)Z.hide()};Q.on("dismiss",j);let K=J.destroy;J.destroy=()=>{Q.off?.("dismiss",j),K?.call(J)}}return Z};var f5=()=>{let J=[],$=!1,Q=()=>{if(J.length===0){$=!1;return}$=!0;let q=J[0],Z=()=>{if(J.shift(),q.off?.("dismiss",Z),J.length===0)$=!1;else setTimeout(Q,200)};q.on?.("dismiss",Z),q._show()};return{add(q){if(!q._show)throw Error("Snackbar must implement _show method");if(J.push(q),!$)Q()},clear(){J.length=0,$=!1},getLength(){return J.length}}};m();var l3={variant:v9.VARIANT,position:v9.POSITION,duration:v9.DURATION},g5=(J)=>b(l3,J,"snackbar"),d5=(J)=>f(J,{tag:"div",className:J.class}),r5=(J)=>({...J,text:J.message}),l5=(J,$)=>({lifecycle:{destroy:J.lifecycle?.destroy||(()=>{})},queue:$});var p3=f5(),s3=(J)=>{if(!J.message)throw Error("Snackbar message is required");let $=g5(J);try{return I(T,h(),S(d5($)),Y6($),h5($),$9(r5($)),C5($),v(),E5($),(q)=>u5(l5(q,p3))(q))($)}catch(Q){throw console.error("Snackbar creation error:",Q instanceof Error?Q.message:String(Q)),Error(`Failed to create snackbar: ${Q instanceof Error?Q.message:String(Q)}`)}},Q1=s3;n();s();c();var p5=({disabled:J,lifecycle:$,checkable:Q})=>(q)=>({...q,element:q.element,input:q.input,getValue:q.getValue||(()=>""),setValue(Z){return q.setValue?.(Z),this},check(){return Q.check(),this},uncheck(){return Q.uncheck(),this},toggle(){return Q.toggle(),this},isChecked(){return Q.isChecked()},setLabel(Z){return q.text?.setText(Z),this},getLabel(){return q.text?.getText()||""},supportingTextElement:q.supportingTextElement||null,setSupportingText(Z,j){if(q.setSupportingText)q.setSupportingText(Z,j);return this},removeSupportingText(){if(q.removeSupportingText)q.removeSupportingText();return this},on(Z,j){return q.on?.(Z,j),this},off(Z,j){return q.off?.(Z,j),this},enable(){return J.enable(),this},disable(){return J.disable(),this},destroy(){$.destroy()}});c();var s5=(J,$,Q)=>{let q=$||"mtrl",Z=Q||"switch",j=J.element.querySelector(`.${q}-${Z}-container`);if(!j){j=document.createElement("div"),j.className=`${q}-${Z}-container`;let Y=J.element.querySelector(`.${q}-${Z}-input`),G=J.element.querySelector(`.${q}-${Z}-track`),z=[];if(Y)z.push(Y);if(G)z.push(G);let W=document.createElement("div");W.className=`${q}-${Z}-content`;let X=J.element.querySelector(`.${q}-${Z}-label`);if(X)W.appendChild(X);return j.appendChild(W),z.forEach((U)=>j.appendChild(U)),J.element.appendChild(j),{container:j,contentWrapper:W}}let K=J.element.querySelector(`.${q}-${Z}-content`);if(!K){K=document.createElement("div"),K.className=`${q}-${Z}-content`;let Y=J.element.querySelector(`.${q}-${Z}-label`);if(Y)K.appendChild(Y);j.insertBefore(K,j.firstChild)}return{container:j,contentWrapper:K}},d$=(J)=>($)=>{let Q=J.prefix||"mtrl",q=J.componentName||"switch",{contentWrapper:Z}=s5($,Q,q),j=null;if(J.supportingText){if(j=document.createElement("div"),j.className=`${Q}-${q}-helper`,j.textContent=J.supportingText,J.error)j.classList.add(`${Q}-${q}-helper--error`),$.element.classList.add(`${Q}-${q}--error`);Z.appendChild(j)}if("lifecycle"in $&&$.lifecycle&&typeof $.lifecycle==="object"&&"destroy"in $.lifecycle&&j){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(j)j.remove();K.call($.lifecycle)}}return{...$,supportingTextElement:j,setSupportingText(K,Y=!1){let{contentWrapper:G}=s5($,Q,q),z=this.supportingTextElement;if(!z)z=document.createElement("div"),z.className=`${Q}-${q}-helper`,G.appendChild(z),this.supportingTextElement=z;return z.textContent=K,z.classList.toggle(`${Q}-${q}-helper--error`,Y),$.element.classList.toggle(`${Q}-${q}--error`,Y),this},removeSupportingText(){if(this.supportingTextElement&&this.supportingTextElement.parentNode)this.supportingTextElement.remove(),this.supportingTextElement=null,$.element.classList.remove(`${Q}-${q}--error`);return this}}},m5=(J)=>($)=>{let Q={...J,prefix:J.prefix||"mtrl",componentName:J.componentName||"switch"};return H7(Q)($)};m();var m3={prefix:"mtrl",componentName:"switch"},a5=(J={})=>b(m3,J,"switch"),i5=(J)=>f(J,{tag:"div",className:J.class,interactive:!0}),c5=(J)=>({disabled:{enable:J.disabled?.enable,disable:J.disabled?.disable},lifecycle:{destroy:J.lifecycle?.destroy},checkable:{check:J.checkable?.check,uncheck:J.checkable?.uncheck,toggle:J.checkable?.toggle,isChecked:J.checkable?.isChecked}});var a3=(J={})=>{let $=a5(J);try{return I(T,h(),S(i5($)),d6($),_9($),m5($),d$($),D9($),G6($),v(),(q)=>p5(c5(q))(q))($)}catch(Q){throw console.error("Switch creation error:",Q instanceof Error?Q.message:String(Q)),Error(`Failed to create switch: ${Q instanceof Error?Q.message:String(Q)}`)}},q1=a3;var r$={START:"start",END:"end"},Z1={CHECKED:"checked",UNCHECKED:"unchecked",DISABLED:"disabled",ENABLED:"enabled"},j1={CHANGE:"change",FOCUS:"focus",BLUR:"blur"},K1={CHECKED:!1,DISABLED:!1,REQUIRED:!1,LABEL_POSITION:r$.END,VALUE:"on"},Y1={ROOT:"switch",CONTAINER:"switch-container",CONTENT:"switch-content",LABEL:"switch-label",INPUT:"switch-input",TRACK:"switch-track",THUMB:"switch-thumb",LABEL_START:"switch--label-start",LABEL_END:"switch--label-end",CHECKED:"switch--checked",DISABLED:"switch--disabled",ERROR:"switch--error",HELPER:"switch-helper",HELPER_ERROR:"switch-helper--error",FOCUSED:"switch--focused"};n();s();c();n();s();c();var r7={PRIMARY:"primary",SECONDARY:"secondary"},J7={ACTIVE:"active",INACTIVE:"inactive",DISABLED:"disabled"},l$={FIXED:"fixed",DYNAMIC:"dynamic",CONTENT:"content",AUTO:"auto"},G1={CLICK:"click",FOCUS:"focus",BLUR:"blur"},p$={CHANGE:"change"},k9={VARIANT:r7.PRIMARY,SCROLLABLE:!0,SHOW_DIVIDER:!0,INDICATOR_HEIGHT:3,INDICATOR_WIDTH_STRATEGY:l$.AUTO,INDICATOR_FIXED_WIDTH:40,INDICATOR_ANIMATION_DURATION:250,INDICATOR_ANIMATION_TIMING:"cubic-bezier(0.4, 0, 0.2, 1)",ICON_SIZE:"24px",RIPPLE:!0},Q7={ICON_ONLY:"icon-only",TEXT_ONLY:"text-only",ICON_AND_TEXT:"icon-and-text"},z1={ROOT:"tabs",PRIMARY:"tabs--primary",SECONDARY:"tabs--secondary",SCROLLABLE:"tabs--scrollable",SCROLL:"tabs-scroll",DIVIDER:"tabs-divider",INDICATOR:"tabs-indicator"},W1={ROOT:"tab",ACTIVE:"tab--active",INACTIVE:"tab--inactive",DISABLED:"tab--disabled",TEXT:"tab-text",ICON:"tab-icon",RIPPLE:"tab-ripple",PRIMARY:"tab--primary",SECONDARY:"tab--secondary",CONTAINER:"tab-container",BADGE:"tab-badge"};m();s();var i3={state:J7.INACTIVE,componentName:"tab",ripple:k9.RIPPLE},c3={variant:k9.VARIANT,scrollable:k9.SCROLLABLE,showDivider:k9.SHOW_DIVIDER,componentName:"tabs"},o5=(J={})=>b(c3,J,"tabs"),t5=(J={})=>b(i3,J,"tab"),n5=(J)=>{let $={tag:"div",attributes:{role:"tablist","aria-orientation":"horizontal"},className:[`${J.prefix}-tabs`,`${J.prefix}-tabs--${J.variant||"primary"}`,J.class]};return(Q)=>S($)(Q)};w9();M7();var q7=(J={})=>{let $=t5(J);try{let Q=I(T,h(),v())($),q=i6({text:$.text,icon:$.icon,iconSize:$.iconSize,disabled:$.disabled,ripple:$.ripple!==!1,rippleConfig:{duration:400,timing:"cubic-bezier(0.4, 0, 0.2, 1)",opacity:["0.2","0"],...$.rippleConfig||{}},value:$.value,prefix:$.prefix,variant:"text",class:`${$.prefix}-tab`});if(Q.element=q.element,Q.element.setAttribute("role","tab"),Q.element.setAttribute("aria-selected",$.state==="active"?"true":"false"),$.value)Q.element.setAttribute("id",`tab-${$.value}`),Q.element.setAttribute("aria-controls",`tabpanel-${$.value}`);if($.state==="active")Q.element.classList.add(`${Q.getClass("tab")}--active`);q.on("click",(j)=>{if(Q.emit)Q.emit("click",j)});let Z={...Q,button:q,element:q.element,badge:null,getValue(){return q.getValue()},setValue(j){let K=j||"";return q.setValue(K),this.element.setAttribute("id",`tab-${K}`),this.element.setAttribute("aria-controls",`tabpanel-${K}`),this},activate(){this.element.classList.add(`${this.getClass("tab")}--active`),this.element.setAttribute("aria-selected","true");let j=new CustomEvent("tab:activated",{bubbles:!0,detail:{value:this.getValue()}});return this.element.dispatchEvent(j),this},deactivate(){return this.element.classList.remove(`${this.getClass("tab")}--active`),this.element.setAttribute("aria-selected","false"),this},isActive(){return this.element.classList.contains(`${this.getClass("tab")}--active`)},enable(){return q.enable(),this.element.removeAttribute("aria-disabled"),this},disable(){return q.disable(),this.element.setAttribute("aria-disabled","true"),this},setText(j){return q.setText(j),this.updateLayoutStyle(),this},getText(){return q.getText()},setIcon(j){return q.setIcon(j),this.updateLayoutStyle(),this},getIcon(){return q.getIcon()},setBadge(j){if(!this.badge){let K={content:j,standalone:!1,target:this.element,prefix:$.prefix,...$.badgeConfig||{}};this.badge=g9(K)}else this.badge.setContent(j),this.badge.show();return this.element.setAttribute("data-has-badge","true"),this},getBadge(){return this.badge?this.badge.getContent():""},showBadge(){if(this.badge)this.badge.show(),this.element.setAttribute("data-has-badge","true");return this},hideBadge(){if(this.badge)this.badge.hide(),this.element.setAttribute("data-has-badge","false");return this},getBadgeComponent(){return this.badge},destroy(){if(this.badge)this.badge.destroy();if(q.destroy)q.destroy();Q.lifecycle.destroy()},updateLayoutStyle(){let j=!!this.getText(),K=!!this.getIcon(),Y="";if(j&&K)Y=Q7.ICON_AND_TEXT;else if(K)Y=Q7.ICON_ONLY;else Y=Q7.TEXT_ONLY;if(Object.values(Q7).forEach((G)=>{this.element.classList.remove(`${this.getClass("tab")}--${G}`)}),this.element.classList.add(`${this.getClass("tab")}--${Y}`),Y===Q7.ICON_ONLY&&j)this.element.setAttribute("aria-label",this.getText());else this.element.removeAttribute("aria-label")}};if($.badge!==void 0)Z.setBadge($.badge);return Z.updateLayoutStyle(),Z}catch(Q){throw console.error("Tab creation error:",Q),Error(`Failed to create tab: ${Q.message}`)}};var e5=({lifecycle:J})=>($)=>({...$,element:$.element,addTab(Q){let q={...Q,prefix:$.config.prefix,variant:Q.variant||$.config.variant};if(q.value===void 0)q.value="";let Z=q7(q);if($.tabs.push(Z),$.tabsContainer.appendChild(Z.element),Z.on&&typeof Z.on==="function")Z.on("click",(K)=>$.handleTabClick(K,Z));return Z.element.addEventListener("click",(K)=>{$.handleTabClick(K,Z)}),Z},add(Q){if($.tabs.push(Q),$.tabsContainer.appendChild(Q.element),Q.on&&typeof Q.on==="function")Q.on("click",(Z)=>$.handleTabClick(Z,Q));return Q.element.addEventListener("click",(Z)=>{$.handleTabClick(Z,Q)}),this},getTabs(){return[...$.tabs]},getActiveTab(){return $.tabs.find((Q)=>Q.isActive())||null},setActiveTab(Q){let q=typeof Q==="string"?$.tabs.find((Z)=>Z.getValue()===Q):Q;if(!q)return this;if($.tabs.forEach((Z)=>Z.deactivate()),q.activate(),$.emit)$.emit("change",{tab:q,value:q.getValue()});return this},removeTab(Q){let q=typeof Q==="string"?$.tabs.find((j)=>j.getValue()===Q):Q;if(!q)return this;let Z=$.tabs.indexOf(q);if(Z!==-1)$.tabs.splice(Z,1);if(q.element.parentNode)q.element.parentNode.removeChild(q.element);return q.destroy(),this},on(Q,q){if($.on)$.on(Q,q);return this},off(Q,q){if($.off)$.off(Q,q);return this},destroy(){$.tabs.forEach((Q)=>Q.destroy()),$.tabs.length=0,J.destroy()}}),$2=(J)=>({lifecycle:{destroy:()=>J.lifecycle.destroy()}});function J2(J){if(typeof J.getActiveTab==="function")return J.getActiveTab();if(Array.isArray(J.tabs))return J.tabs.find(($)=>$.isActive&&$.isActive());return null}function s$(J){let $=J2(J);if(!$)return;if(typeof $.getValue!=="function")return;let Q=$.getValue();document.querySelectorAll('[role="tabpanel"]').forEach((Z)=>{if(Z.getAttribute("aria-labelledby")?.replace("tab-","")===Q)Z.removeAttribute("hidden"),Z.setAttribute("tabindex","0");else Z.setAttribute("hidden","true"),Z.setAttribute("tabindex","-1")})}function m$(J){if(!J.element)return;J.element.addEventListener("keydown",($)=>{if($.target!==$.currentTarget)return;if(typeof J.getTabs!=="function"||typeof J.setActiveTab!=="function")return;let Q=J.getTabs(),q=J2(J),Z=q?Q.indexOf(q):-1,j=Z;switch($.key){case"ArrowRight":case"ArrowDown":j=Z<Q.length-1?Z+1:0;break;case"ArrowLeft":case"ArrowUp":j=Z>0?Z-1:Q.length-1;break;case"Home":j=0;break;case"End":j=Q.length-1;break;default:return}if(j!==Z&&Q[j])$.preventDefault(),Q[j].element.focus(),J.setActiveTab(Q[j])})}var o3={widthStrategy:"auto",fixedWidth:40,animationDuration:250,animationTiming:"cubic-bezier(0.4, 0, 0.2, 1)",visible:!0,prefix:"mtrl",variant:"primary"},a$=(J={})=>{let $={...o3,...J},Q=$.prefix||"mtrl",q=document.createElement("div");if(q.className=`${Q}-tabs-indicator`,q.style.transition=`transform ${$.animationDuration}ms ${$.animationTiming},
|
|
31
31
|
width ${$.animationDuration}ms ${$.animationTiming}`,q.style.width=`${$.fixedWidth}px`,!$.visible)q.style.opacity="0";let Z=null,j=(N)=>{if($.widthStrategy==="auto"){if($.variant==="secondary")return N.element.offsetWidth;let F=N.element.querySelector(`.${Q}-tab-text`)||N.element.querySelector(`.${Q}-button-text`);if(F)return F.clientWidth;return Math.max(N.element.offsetWidth/2,30)}switch($.widthStrategy){case"dynamic":return Math.max(N.element.offsetWidth/2,30);case"content":let F=N.element.querySelector(`.${Q}-button-text`)||N.element.querySelector(`.${Q}-tab-text`);if(F)return Math.max(F.clientWidth,30);return $.fixedWidth||40;case"fixed":default:return $.fixedWidth||40}},K=(N)=>{let F=N.parentElement;if(!F)return console.error("Tab has no parent element, cannot position indicator"),{left:0,width:N.offsetWidth};let k=N.getBoundingClientRect(),L=F.getBoundingClientRect();return{left:k.left-L.left,width:k.width}},Y=(N,F)=>{let{left:k,width:L}=K(N.element);if($.variant!=="secondary"&&($.widthStrategy==="auto"||$.widthStrategy==="content")){let D=N.element.querySelector(`.${Q}-tab-text`)||N.element.querySelector(`.${Q}-button-text`);if(D){let B=D.getBoundingClientRect(),H=N.element.getBoundingClientRect(),V=B.left-H.left;return{left:k+V}}}if(F<L)return{left:k+(L-F)/2};return{left:k}},G=(N,F=!1)=>{if(!N||!N.element){console.error("Invalid tab or tab has no element");return}Z=N;let k=j(N),{left:L}=Y(N,k);if(F)q.style.transition="none",q.offsetHeight;if(q.style.width=`${k}px`,q.style.transform=`translateX(${L}px)`,F)setTimeout(()=>{q.style.transition=`transform ${$.animationDuration}ms ${$.animationTiming},
|
|
32
|
-
width ${$.animationDuration}ms ${$.animationTiming}`},10)};return{element:q,moveToTab:G,show:()=>{q.style.opacity="1"},hide:()=>{q.style.opacity="0"},setColor:(N)=>{q.style.backgroundColor=N},update:()=>{if(Z)G(Z,!0)},destroy:()=>{if(q.parentNode)q.parentNode.removeChild(q);Z=null}}};var i$=(J)=>($)=>{let Q=[],q=$.scrollContainer||$.element;if(Array.isArray(J.tabs))J.tabs.forEach((Y)=>{let G={...Y,prefix:J.prefix,variant:Y.variant||J.variant},z=q7(G);Q.push(z),q.appendChild(z.element)});let Z=()=>{return[...Q]},j=()=>{return Q.find((Y)=>Y.isActive())||null},K=(Y,G)=>{if(Y&&typeof Y.preventDefault==="function")Y.preventDefault();if(G.disabled&&G.disabled.isDisabled&&G.disabled.isDisabled())return;Q.forEach((W)=>W.deactivate()),G.activate();let z=G.getValue();if(s$({tabs:Q,getActiveTab:()=>Q.find((W)=>W.isActive())||null}),typeof $.emit==="function")$.emit("change",{tab:G,value:z})};return Q.forEach((Y)=>{if(Y.on&&typeof Y.on==="function")Y.on("click",(G)=>K(G,Y));Y.element.addEventListener("click",(G)=>K(G,Y))}),{...$,tabs:Q,tabsContainer:q,handleTabClick:K,getTabs:Z,getActiveTab:j}},c$=(J)=>($)=>{if(J.scrollable===!1)return $;$.element.classList.add(`${$.getClass("tabs")}--scrollable`);let Q=document.createElement("div");Q.className=`${$.getClass("tabs")}-scroll`;while($.element.firstChild)Q.appendChild($.element.firstChild);return $.element.appendChild(Q),{...$,scrollContainer:Q}},o$=(J)=>($)=>{if(J.showDivider===!1)return $;let Q=document.createElement("div");return Q.className=`${$.getClass("tabs")}-divider`,$.element.appendChild(Q),$},t$=(J)=>($)=>{let Q=J.indicator||{},q=a$({prefix:J.prefix,widthStrategy:Q.widthStrategy||J.indicatorWidthStrategy||"auto",height:Q.height||J.indicatorHeight||3,fixedWidth:Q.fixedWidth||40,animationDuration:Q.animationDuration||250,animationTiming:Q.animationTiming||"cubic-bezier(0.4, 0, 0.2, 1)",color:Q.color,variant:J.variant??"primary"}),Z=$.scrollContainer||$.element;if(!Z)throw console.error("No scroll container found - cannot add indicator"),
|
|
32
|
+
width ${$.animationDuration}ms ${$.animationTiming}`},10)};return{element:q,moveToTab:G,show:()=>{q.style.opacity="1"},hide:()=>{q.style.opacity="0"},setColor:(N)=>{q.style.backgroundColor=N},update:()=>{if(Z)G(Z,!0)},destroy:()=>{if(q.parentNode)q.parentNode.removeChild(q);Z=null}}};var i$=(J)=>($)=>{let Q=[],q=$.scrollContainer||$.element;if(Array.isArray(J.tabs))J.tabs.forEach((Y)=>{let G={...Y,prefix:J.prefix,variant:Y.variant||J.variant},z=q7(G);Q.push(z),q.appendChild(z.element)});let Z=()=>{return[...Q]},j=()=>{return Q.find((Y)=>Y.isActive())||null},K=(Y,G)=>{if(Y&&typeof Y.preventDefault==="function")Y.preventDefault();if(G.disabled&&G.disabled.isDisabled&&G.disabled.isDisabled())return;Q.forEach((W)=>W.deactivate()),G.activate();let z=G.getValue();if(s$({tabs:Q,getActiveTab:()=>Q.find((W)=>W.isActive())||null}),typeof $.emit==="function")$.emit("change",{tab:G,value:z})};return Q.forEach((Y)=>{if(Y.on&&typeof Y.on==="function")Y.on("click",(G)=>K(G,Y));Y.element.addEventListener("click",(G)=>K(G,Y))}),{...$,tabs:Q,tabsContainer:q,handleTabClick:K,getTabs:Z,getActiveTab:j}},c$=(J)=>($)=>{if(J.scrollable===!1)return $;$.element.classList.add(`${$.getClass("tabs")}--scrollable`);let Q=document.createElement("div");Q.className=`${$.getClass("tabs")}-scroll`;while($.element.firstChild)Q.appendChild($.element.firstChild);return $.element.appendChild(Q),{...$,scrollContainer:Q}},o$=(J)=>($)=>{if(J.showDivider===!1)return $;let Q=document.createElement("div");return Q.className=`${$.getClass("tabs")}-divider`,$.element.appendChild(Q),$},t$=(J)=>($)=>{let Q=J.indicator||{},q=a$({prefix:J.prefix,widthStrategy:Q.widthStrategy||J.indicatorWidthStrategy||"auto",height:Q.height||J.indicatorHeight||3,fixedWidth:Q.fixedWidth||40,animationDuration:Q.animationDuration||250,animationTiming:Q.animationTiming||"cubic-bezier(0.4, 0, 0.2, 1)",color:Q.color,variant:J.variant??"primary"}),Z=$.scrollContainer||$.element;if(!Z)throw console.error("No scroll container found - cannot add indicator"),Error("Failed to create tabs: No scroll container found");Z.appendChild(q.element);let j=$.handleTabClick;$.handleTabClick=function(W,X){if(X.disabled&&X.disabled.isDisabled&&X.disabled.isDisabled())return;j.call(this,W,X),setTimeout(()=>{q.moveToTab(X)},10)},setTimeout(()=>{let W=$.tabs.find((X)=>X.isActive());if(W)q.moveToTab(W,!0)},50);let K=()=>{let W=$.tabs.find((X)=>X.isActive());if(W)q.moveToTab(W,!0)};if(Z)Z.addEventListener("scroll",K);let Y=new ResizeObserver(()=>{let W=$.tabs.find((X)=>X.isActive());if(W)q.moveToTab(W,!0)});Y.observe(Z);let G=new MutationObserver((W)=>{for(let X of W)if(X.type==="attributes"&&X.attributeName==="class"&&X.target.classList.contains(`${J.prefix}-tab--active`)){let U=X.target,_=$.tabs.find((N)=>N.element===U);if(_)q.moveToTab(_)}});if(Array.isArray($.tabs))$.tabs.forEach((W)=>{if(W.element)G.observe(W.element,{attributes:!0})});let z=$.destroy||(()=>{});return $.destroy=function(){if(q.destroy(),Y.disconnect(),G.disconnect(),Z)Z.removeEventListener("scroll",K);if(typeof z==="function")z.call(this)},{...$,indicator:q,getIndicator:()=>q}};var Q2=(J)=>{let{tabs:$=[],onChange:Q,indicator:q}=J,Z=null,j=$.find((W)=>W.isActive());if(j){if(Z=j,q)setTimeout(()=>{q.moveToTab(j,!0)},50)}let K=(W)=>{if(!W.element)return;let X=W.element.querySelector(`.${W.getClass("tab")}-ripple`);if(!X)return;let U=document.createElement("span");U.className="ripple",U.style.width="100%",U.style.height="100%",U.style.left="0",U.style.top="0",U.style.animation="ripple-effect 0.4s cubic-bezier(0.4, 0, 0.2, 1)",X.appendChild(U),setTimeout(()=>{U.remove()},400)};return{activateTab:(W,X=!1)=>{if(!W||Z===W)return;if(Z)Z.deactivate();if(W.activate(),Z=W,q)setTimeout(()=>{q.moveToTab(W,X)},10);if(!X)K(W);if(Q)Q({tab:W,value:W.getValue()})},getActiveTab:()=>{return Z},destroy:()=>{Z=null}}},q2=()=>{if(document.getElementById("tab-state-styles"))return;let J=document.createElement("style");J.id="tab-state-styles",J.textContent=`
|
|
33
33
|
@keyframes ripple-effect {
|
|
34
34
|
0% {
|
|
35
35
|
transform: scale(0);
|
|
@@ -40,7 +40,7 @@ var{defineProperty:K8,getOwnPropertyNames:$q,getOwnPropertyDescriptor:Jq}=Object
|
|
|
40
40
|
opacity: 0;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
`,document.head.appendChild(J)};var t3=(J={})=>{let $=o5(J);q2();try{let Q=I(T,h(),n5($),c$($),i$($),o$($),t$($),v(),(q)=>e5($2(q))(q))($);return m$(Q),Q}catch(Q){throw console.error("Tabs creation error:",Q),new Error(`Failed to create tabs: ${Q.message}`)}},Z2=t3;var j2=(J,$={})=>{let{enabled:Q=!0,showButtons:q=!1,appearance:Z="fade"}=$;if(!Q)return;let j=J.element.querySelector(`.${J.getClass("tabs")}-scroll`);if(!j)return;let K=document.createElement("div");K.className=`${J.getClass("tabs")}-scroll-indicator ${J.getClass("tabs")}-scroll-indicator--left`,K.classList.add(`${J.getClass("tabs")}-scroll-indicator--${Z}`);let Y=document.createElement("div");if(Y.className=`${J.getClass("tabs")}-scroll-indicator ${J.getClass("tabs")}-scroll-indicator--right`,Y.classList.add(`${J.getClass("tabs")}-scroll-indicator--${Z}`),J.element.appendChild(K),J.element.appendChild(Y),q){let X=document.createElement("button");X.className=`${J.getClass("tabs")}-scroll-button ${J.getClass("tabs")}-scroll-button--left`,X.setAttribute("aria-label","Scroll tabs left"),X.innerHTML='<svg viewBox="0 0 24 24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>';let U=document.createElement("button");U.className=`${J.getClass("tabs")}-scroll-button ${J.getClass("tabs")}-scroll-button--right`,U.setAttribute("aria-label","Scroll tabs right"),U.innerHTML='<svg viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',J.element.appendChild(X),J.element.appendChild(U),X.addEventListener("click",()=>{j.scrollBy({left:-100,behavior:"smooth"})}),U.addEventListener("click",()=>{j.scrollBy({left:100,behavior:"smooth"})})}let G=()=>{let{scrollLeft:X,scrollWidth:U,clientWidth:_}=j;if(K.classList.toggle("visible",X>0),Y.classList.toggle("visible",X+_<U-1),q){let N=J.element.querySelector(`.${J.getClass("tabs")}-scroll-button--left`),F=J.element.querySelector(`.${J.getClass("tabs")}-scroll-button--right`);if(N)N.disabled=X<=0;if(F)F.disabled=X+_>=U-1}};G(),j.addEventListener("scroll",G);let z=new ResizeObserver(G);z.observe(j);let W=J.destroy;J.destroy=function(){if(z)z.disconnect();if(j.removeEventListener("scroll",G),K.parentNode)K.parentNode.removeChild(K);if(Y.parentNode)Y.parentNode.removeChild(Y);if(q){let X=J.element.querySelector(`.${J.getClass("tabs")}-scroll-button--left`),U=J.element.querySelector(`.${J.getClass("tabs")}-scroll-button--right`);if(X&&X.parentNode)X.parentNode.removeChild(X);if(U&&U.parentNode)U.parentNode.removeChild(U)}W.call(this)}};var U1={SMALL:600,MEDIUM:904,LARGE:1240},K2=(J,$={})=>{if($.responsive===!1)return;let Q={small:$.breakpoints?.small||U1.SMALL,medium:$.breakpoints?.medium||U1.MEDIUM,large:$.breakpoints?.large||U1.LARGE},q={layout:$.smallScreen?.layout||"icon-only",maxVisibleTabs:$.smallScreen?.maxVisibleTabs||4},Z=new Map,j=J.getTabs();j.forEach((z)=>{let W="text-only";if(z.getIcon()&&z.getText())W="icon-and-text";else if(z.getIcon())W="icon-only";Z.set(z,W)});let K=()=>{if(window.innerWidth<Q.small)j.forEach((W)=>{if(q.layout==="icon-only"&&!W.getIcon())return;if(q.layout==="icon-only"&&W.getIcon())W.element.classList.remove(`${W.getClass("tab")}--icon-and-text`),W.element.classList.remove(`${W.getClass("tab")}--text-only`),W.element.classList.add(`${W.getClass("tab")}--icon-only`);else if(q.layout==="text-only")W.element.classList.remove(`${W.getClass("tab")}--icon-and-text`),W.element.classList.remove(`${W.getClass("tab")}--icon-only`),W.element.classList.add(`${W.getClass("tab")}--text-only`)}),J.element.classList.add(`${J.getClass("tabs")}--responsive-small`);else j.forEach((W)=>{let X=Z.get(W)||"text-only";W.element.classList.remove(`${W.getClass("tab")}--icon-only`),W.element.classList.remove(`${W.getClass("tab")}--text-only`),W.element.classList.remove(`${W.getClass("tab")}--icon-and-text`),W.element.classList.add(`${W.getClass("tab")}--${X}`)}),J.element.classList.remove(`${J.getClass("tabs")}--responsive-small`)};K();let Y=new ResizeObserver(K);Y.observe(document.body),J._resizeObserver=Y;let G=J.destroy;J.destroy=function(){if(this._resizeObserver)this._resizeObserver.disconnect();G.call(this)}};var Y2=Z2;n();s();c();var G2=({disabled:J,lifecycle:$})=>(Q)=>({element:Q.element,input:Q.input,getValue:Q.getValue||(()=>""),setValue(q){return Q.setValue?.(q),this},setAttribute(q,Z){return Q.setAttribute?.(q,Z),this},getAttribute(q){return Q.getAttribute?.(q)||null},removeAttribute(q){return Q.removeAttribute?.(q),this},setVariant(q){let Z=Q.config?.prefix||"mtrl",j=Q.config?.componentName||"textfield";if(Q.element.classList.remove(`${Z}-${j}--filled`,`${Z}-${j}--outlined`),Q.element.classList.add(`${Z}-${j}--${q}`),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10);return this},getVariant(){let q=Q.config?.prefix||"mtrl",Z=Q.config?.componentName||"textfield";if(Q.element.classList.contains(`${q}-${Z}--outlined`))return"outlined";return"filled"},setLabel(q){if(Q.label?.setText(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10);return this},getLabel(){return Q.label?.getText()||""},leadingIcon:Q.leadingIcon||null,setLeadingIcon(q){if(Q.setLeadingIcon){if(Q.setLeadingIcon(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},removeLeadingIcon(){if(Q.removeLeadingIcon){if(Q.removeLeadingIcon(),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},trailingIcon:Q.trailingIcon||null,setTrailingIcon(q){if(Q.setTrailingIcon){if(Q.setTrailingIcon(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},removeTrailingIcon(){if(Q.removeTrailingIcon){if(Q.removeTrailingIcon(),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},supportingTextElement:Q.supportingTextElement||null,setSupportingText(q,Z){if(Q.setSupportingText)Q.setSupportingText(q,Z);return this},removeSupportingText(){if(Q.removeSupportingText)Q.removeSupportingText();return this},prefixTextElement:Q.prefixTextElement||null,setPrefixText(q){if(Q.setPrefixText){if(Q.setPrefixText(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},removePrefixText(){if(Q.removePrefixText){if(Q.removePrefixText(),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},suffixTextElement:Q.suffixTextElement||null,setSuffixText(q){if(Q.setSuffixText){if(Q.setSuffixText(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},removeSuffixText(){if(Q.removeSuffixText){if(Q.removeSuffixText(),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},updatePositions(){if(Q.input&&Q.element){let q=Q.input.value&&Q.input.value.length>0,Z=Q.input.matches?.(":-webkit-autofill")||!1;if(q||Z)Q.element.classList.remove(`${Q.config?.prefix||"mtrl"}-textfield--empty`);else Q.element.classList.add(`${Q.config?.prefix||"mtrl"}-textfield--empty`)}if(Q.updateElementPositions)Q.updateElementPositions();return this},setError(q,Z){if(Q.setError)Q.setError(q,Z);return this},isError(){return Q.isError?.()||!1},setDensity(q){if(Q.density?.set)Q.density.set(q);return this},getDensity(){return Q.density?.current||"default"},on(q,Z){return Q.on?.(q,Z),this},off(q,Z){return Q.off?.(q,Z),this},enable(){return J.enable(),this},disable(){return J.disable(),this},destroy(){$.destroy()}});var X1=(J)=>($)=>{if(!J.leadingIcon)return $;let Q=J.prefix||"mtrl",q=document.createElement("span");if(q.className=`${Q}-${J.componentName||"textfield"}-leading-icon`,q.innerHTML=J.leadingIcon,$.element.appendChild(q),$.element.classList.add(`${Q}-${J.componentName||"textfield"}--with-leading-icon`),$.input)$.input.classList.add(`${Q}-${J.componentName||"textfield"}-input--with-leading-icon`);if("lifecycle"in $&&$.lifecycle?.destroy){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{q.remove(),Z.call($.lifecycle)}}return setTimeout(()=>{let Z=$.element.querySelector(`.${Q}-${J.componentName||"textfield"}-label`);if(Z){if(!$.element.classList.contains(`${Q}-${J.componentName||"textfield"}--with-prefix`))Z.style.left="44px"}},10),{...$,leadingIcon:q,setLeadingIcon(Z){return q.innerHTML=Z,this},removeLeadingIcon(){if(q.parentNode){if(q.remove(),$.element.classList.remove(`${Q}-${J.componentName||"textfield"}--with-leading-icon`),$.input)$.input.classList.remove(`${Q}-${J.componentName||"textfield"}-input--with-leading-icon`);if(!$.element.classList.contains(`${Q}-${J.componentName||"textfield"}--with-prefix`)){let Z=$.element.querySelector(`.${Q}-${J.componentName||"textfield"}-label`);if(Z)Z.style.left=""}this.leadingIcon=null}return this}}};var B1=(J)=>($)=>{if(!J.trailingIcon)return $;let Q=J.prefix||"mtrl",q=document.createElement("span");if(q.className=`${Q}-${J.componentName||"textfield"}-trailing-icon`,q.innerHTML=J.trailingIcon,$.element.appendChild(q),$.element.classList.add(`${Q}-${J.componentName||"textfield"}--with-trailing-icon`),$.input)$.input.classList.add(`${Q}-${J.componentName||"textfield"}-input--with-trailing-icon`);if("lifecycle"in $&&$.lifecycle?.destroy){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{q.remove(),Z.call($.lifecycle)}}return{...$,trailingIcon:q,setTrailingIcon(Z){return q.innerHTML=Z,this},removeTrailingIcon(){if(q.parentNode){if(q.remove(),$.element.classList.remove(`${Q}-${J.componentName||"textfield"}--with-trailing-icon`),$.input)$.input.classList.remove(`${Q}-${J.componentName||"textfield"}-input--with-trailing-icon`);this.trailingIcon=null}return this}}};var F1=(J)=>($)=>{if(!J.prefixText)return $;let Q=J.prefix||"mtrl",q=document.createElement("span");if(q.className=`${Q}-${J.componentName||"textfield"}-prefix`,q.textContent=J.prefixText,$.element.appendChild(q),$.element.classList.add(`${Q}-${J.componentName||"textfield"}--with-prefix`),"lifecycle"in $&&$.lifecycle?.destroy){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{q.remove(),Z.call($.lifecycle)}}return{...$,prefixTextElement:q,setPrefixText(Z){return q.textContent=Z,this},removePrefixText(){if(q.parentNode){q.remove(),$.element.classList.remove(`${Q}-${J.componentName||"textfield"}--with-prefix`);let Z=$.element.querySelector(`.${Q}-${J.componentName||"textfield"}-label`);if(Z)Z.style.left="";this.prefixTextElement=null}return this}}};var H1=(J)=>($)=>{if(!J.suffixText)return $;let Q=J.prefix||"mtrl",q=document.createElement("span");if(q.className=`${Q}-${J.componentName||"textfield"}-suffix`,q.textContent=J.suffixText,$.element.appendChild(q),$.element.classList.add(`${Q}-${J.componentName||"textfield"}--with-suffix`),"lifecycle"in $&&$.lifecycle?.destroy){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{q.remove(),Z.call($.lifecycle)}}return{...$,suffixTextElement:q,setSuffixText(Z){return q.textContent=Z,this},removeSuffixText(){if(q.parentNode)q.remove(),$.element.classList.remove(`${Q}-${J.componentName||"textfield"}--with-suffix`),this.suffixTextElement=null;return this}}};var M1=(J)=>($)=>{let Q=J.prefix||"mtrl",q=J.componentName||"textfield",Z=null,j=(K,Y=!1)=>{let G=document.createElement("div");if(G.className=`${Q}-${q}-helper`,G.textContent=K,Y)G.classList.add(`${Q}-${q}-helper--error`),$.element.classList.add(`${Q}-${q}--error`);return G};if(J.supportingText)Z=j(J.supportingText,J.error),$.element.appendChild(Z);if("lifecycle"in $&&$.lifecycle?.destroy){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(Z)Z.remove();K.call($.lifecycle)}}return{...$,supportingTextElement:Z,setSupportingText(K,Y=!1){if(Z)Z.remove(),$.element.classList.remove(`${Q}-${q}--error`);if(K)Z=j(K,Y),$.element.appendChild(Z),this.supportingTextElement=Z;else Z=null,this.supportingTextElement=null,$.element.classList.remove(`${Q}-${q}--error`);return this},removeSupportingText(){if(Z)Z.remove(),Z=null,this.supportingTextElement=null,$.element.classList.remove(`${Q}-${q}--error`);return this}}};R8();var k1=()=>(J)=>{let $=J.config.prefix||"mtrl",Q=J.config.componentName||"textfield",q=new WeakMap,Z=new WeakMap,j=new WeakMap,K=new WeakMap,Y=()=>{if(!J.element||!J.element.isConnected)return J;let z=J.element.querySelector(`.${$}-${Q}-label`),W=J.element.querySelector(`.${$}-${Q}-prefix`),X=J.element.querySelector(`.${$}-${Q}-suffix`),U=J.element.classList.contains(`${$}-${Q}--outlined`),_=J.element.classList.contains(`${$}-${Q}--focused`),N=J.element.classList.contains(`${$}-${Q}--empty`),F=J.element.classList.contains(`${$}-${Q}--with-leading-icon`);if(U&&z){let{color:k,element:L}=U9(J.element);if(_||!N){if(z.style.backgroundColor=k,z.style.paddingLeft="4px",z.style.paddingRight="4px",L&&!q.has(J.element)){let D=new MutationObserver(()=>{let{color:V}=U9(J.element);z.style.backgroundColor=V});D.observe(L,{attributes:!0,attributeFilter:["style","class"]}),q.set(J.element,D);let B=L.parentElement,H=[];while(B&&B!==document.documentElement){let V=new MutationObserver(()=>{let{color:O}=U9(J.element);z.style.backgroundColor=O});V.observe(B,{attributes:!0,attributeFilter:["style","class","data-theme","data-theme-mode"]}),H.push(V),B=B.parentElement}if(H.length)Z.set(J.element,H)}if(!j.has(J.element)){let D=()=>{let{color:B}=U9(J.element);if(_||!N)z.style.backgroundColor=B};document.addEventListener("themechange",D),j.set(J.element,D)}}else z.style.backgroundColor="",z.style.padding=""}if(W&&J.input){let L=W.getBoundingClientRect().width+4+12;if(J.input.style.paddingLeft=`${L}px`,z){let D=L;if(F)D=Math.max(D,44);if(!_&&N)z.style.left=`${D}px`;else z.style.left="12px"}}else if(F&&z){if(U)if(!_&&N)z.style.left="44px";else z.style.left="12px"}if(X&&J.input){let L=X.getBoundingClientRect().width+4+12;J.input.style.paddingRight=`${L}px`}return J},G=()=>{let z=new MutationObserver((W)=>{W.forEach((X)=>{if(X.type==="attributes"&&X.attributeName==="class")setTimeout(Y,10)})});z.observe(J.element,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("resize",Y),K.set(J.element,z)};if(setTimeout(()=>{G(),Y()},0),"lifecycle"in J&&J.lifecycle?.destroy){let z=J.lifecycle.destroy;J.lifecycle.destroy=()=>{window.removeEventListener("resize",Y);let W=K.get(J.element);if(W)W.disconnect(),K.delete(J.element);let X=q.get(J.element);if(X)X.disconnect(),q.delete(J.element);let U=Z.get(J.element);if(U)U.forEach((N)=>N.disconnect()),Z.delete(J.element);let _=j.get(J.element);if(_)document.removeEventListener("themechange",_),j.delete(J.element);z.call(J.lifecycle)}}return{...J,updateElementPositions:()=>{return Y(),J}}};var N1=(J)=>($)=>{let Q=J.prefix||"mtrl",q=J.componentName||"textfield",Z=J.density||"default";if(Z!=="default")$.element.classList.add(`${Q}-${q}--density-${Z}`);if($.element.setAttribute("data-density",Z),$.input)j($.input,Z);function j(Y,G){Y.setAttribute("data-density",G)}let K=(Y)=>{if(["default","compact"].forEach((G)=>{$.element.classList.remove(`${Q}-${q}--density-${G}`)}),Y!=="default")$.element.classList.add(`${Q}-${q}--density-${Y}`);if($.element.setAttribute("data-density",Y),$.input)$.input.setAttribute("data-density",Y);if($.density)$.density.current=Y;if($.updateElementPositions)setTimeout(()=>$.updateElementPositions(),10)};return $.density={current:Z,set:K},$};var L1=(J)=>($)=>{let Q=J.prefix||"mtrl",q=J.componentName||"textfield",Z=J.error||!1;if(Z)$.element.classList.add(`${Q}-${q}--error`);return{...$,errorState:Z,setError(j,K){if(Z=j,$.element.classList.toggle(`${Q}-${q}--error`,j),K!==void 0&&$.setSupportingText){if(K)$.setSupportingText(K,j);else if(!j)$.setSupportingText("",!1)}else if($.supportingTextElement&&$.setSupportingText){let Y=$.supportingTextElement.textContent||"";if(Y)$.setSupportingText(Y,j)}return this},isError(){return Z}}};m();var l7={FILLED:"filled",OUTLINED:"outlined"},V1={ACTIVE:"active",INACTIVE:"inactive",DISABLED:"disabled"},n$={TEXT:"text",PASSWORD:"password",EMAIL:"email",NUMBER:"number",TEL:"tel",URL:"url",SEARCH:"search",MULTILINE:"multiline"},_1={CHANGE:"change",INPUT:"input",FOCUS:"focus",BLUR:"blur",ENTER:"enter",KEYDOWN:"keydown",KEYUP:"keyup"},D1={DEFAULT:"default",COMPACT:"compact"},Z7={TYPE:n$.TEXT,VARIANT:l7.FILLED,DENSITY:D1.DEFAULT,DISABLED:!1,REQUIRED:!1,ERROR:!1,FLOAT_LABEL:!0,ANIMATION_DURATION:150},O1={ROOT:"textfield",INPUT:"textfield-input",LABEL:"textfield-label",CONTAINER:"textfield-container",FILLED:"textfield--filled",OUTLINED:"textfield--outlined",FOCUSED:"textfield--focused",DISABLED:"textfield--disabled",ERROR:"textfield--error",REQUIRED:"textfield--required",LABEL_FLOATING:"textfield-label--floating",SUPPORTING_TEXT:"textfield-supporting-text",SUPPORTING_TEXT_ERROR:"textfield-supporting-text--error",LEADING_ICON:"textfield-leading-icon",TRAILING_ICON:"textfield-trailing-icon",PREFIX_TEXT:"textfield-prefix-text",SUFFIX_TEXT:"textfield-suffix-text",OUTLINE:"textfield-outline",MULTILINE:"textfield--multiline"};var n3={type:Z7.TYPE,variant:Z7.VARIANT},z2=(J={})=>b(n3,J,"textfield"),W2=(J)=>f(J,{tag:"div",className:J.class}),U2=(J)=>({disabled:{enable:J.disabled?.enable,disable:J.disabled?.disable},lifecycle:{destroy:J.lifecycle?.destroy}});var e3=(J={})=>{let $=z2(J);try{return I(T,h(),S(W2($)),Y6($),N1($),F7($),d6($),X1($),B1($),F1($),H1($),M1($),L1($),G6($),v(),k1(),(q)=>G2(U2(q))(q))($)}catch(Q){throw console.error("Textfield creation error:",Q instanceof Error?Q.message:String(Q)),new Error(`Failed to create textfield: ${Q instanceof Error?Q.message:String(Q)}`)}},p7=e3;w6();n();s();c();var j7;((Q)=>{Q.DIAL="dial";Q.INPUT="input"})(j7||={});var s7;((Q)=>{Q.VERTICAL="vertical";Q.HORIZONTAL="horizontal"})(s7||={});var C9;((Q)=>{Q.AMPM="12h";Q.MILITARY="24h"})(C9||={});var E9;((Q)=>{Q.AM="AM";Q.PM="PM"})(E9||={});m();var e$={DIAL:"dial",INPUT:"input"},$8={VERTICAL:"vertical",HORIZONTAL:"horizontal"},J8={AMPM:"12h",MILITARY:"24h"},P1={AM:"AM",PM:"PM"},N6={CHANGE:"change",OPEN:"open",CLOSE:"close",CONFIRM:"confirm",CANCEL:"cancel"},n6={DIAMETER:256,INNER_RADIUS:65,OUTER_RADIUS:110,NUMBER_SIZE:40,CENTER_SIZE:8,HAND_SIZE:36,TRACK_WIDTH:2},R1={HOURS_12:Array.from({length:12},(J,$)=>$===0?12:$),HOURS_24:Array.from({length:24},(J,$)=>$),MINUTES:Array.from({length:60},(J,$)=>$),SECONDS:Array.from({length:60},(J,$)=>$)},K7={MODAL:1050,DIALOG:1051},e={CONTAINER:".mtrl-time-picker",MODAL:".mtrl-time-picker-modal",DIALOG:".mtrl-time-picker-dialog",TITLE:".mtrl-time-picker-title",CONTENT:".mtrl-time-picker-content",DIAL:".mtrl-time-picker-dial",DIAL_CANVAS:".mtrl-time-picker-dial-canvas",DIAL_FACE:".mtrl-time-picker-dial-face",DIAL_HAND:".mtrl-time-picker-dial-hand",DIAL_CENTER:".mtrl-time-picker-dial-center",DIAL_NUMBERS:".mtrl-time-picker-dial-numbers",DIAL_NUMBER:".mtrl-time-picker-dial-number",INPUT_CONTAINER:".mtrl-time-picker-input-container",HOURS_INPUT:".mtrl-time-picker-hours",MINUTES_INPUT:".mtrl-time-picker-minutes",SECONDS_INPUT:".mtrl-time-picker-seconds",SEPARATOR:".mtrl-time-picker-separator",PERIOD_CONTAINER:".mtrl-time-picker-period",PERIOD_AM:".mtrl-time-picker-period-am",PERIOD_PM:".mtrl-time-picker-period-pm",ACTIONS:".mtrl-time-picker-actions",TOGGLE_TYPE_BUTTON:".mtrl-time-picker-toggle-type",CANCEL_BUTTON:".mtrl-time-picker-cancel",CONFIRM_BUTTON:".mtrl-time-picker-confirm"},v6={CLOCK:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
43
|
+
`,document.head.appendChild(J)};var t3=(J={})=>{let $=o5(J);q2();try{let Q=I(T,h(),n5($),c$($),i$($),o$($),t$($),v(),(q)=>e5($2(q))(q))($);return m$(Q),Q}catch(Q){throw console.error("Tabs creation error:",Q),Error(`Failed to create tabs: ${Q.message}`)}},Z2=t3;var j2=(J,$={})=>{let{enabled:Q=!0,showButtons:q=!1,appearance:Z="fade"}=$;if(!Q)return;let j=J.element.querySelector(`.${J.getClass("tabs")}-scroll`);if(!j)return;let K=document.createElement("div");K.className=`${J.getClass("tabs")}-scroll-indicator ${J.getClass("tabs")}-scroll-indicator--left`,K.classList.add(`${J.getClass("tabs")}-scroll-indicator--${Z}`);let Y=document.createElement("div");if(Y.className=`${J.getClass("tabs")}-scroll-indicator ${J.getClass("tabs")}-scroll-indicator--right`,Y.classList.add(`${J.getClass("tabs")}-scroll-indicator--${Z}`),J.element.appendChild(K),J.element.appendChild(Y),q){let X=document.createElement("button");X.className=`${J.getClass("tabs")}-scroll-button ${J.getClass("tabs")}-scroll-button--left`,X.setAttribute("aria-label","Scroll tabs left"),X.innerHTML='<svg viewBox="0 0 24 24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>';let U=document.createElement("button");U.className=`${J.getClass("tabs")}-scroll-button ${J.getClass("tabs")}-scroll-button--right`,U.setAttribute("aria-label","Scroll tabs right"),U.innerHTML='<svg viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',J.element.appendChild(X),J.element.appendChild(U),X.addEventListener("click",()=>{j.scrollBy({left:-100,behavior:"smooth"})}),U.addEventListener("click",()=>{j.scrollBy({left:100,behavior:"smooth"})})}let G=()=>{let{scrollLeft:X,scrollWidth:U,clientWidth:_}=j;if(K.classList.toggle("visible",X>0),Y.classList.toggle("visible",X+_<U-1),q){let N=J.element.querySelector(`.${J.getClass("tabs")}-scroll-button--left`),F=J.element.querySelector(`.${J.getClass("tabs")}-scroll-button--right`);if(N)N.disabled=X<=0;if(F)F.disabled=X+_>=U-1}};G(),j.addEventListener("scroll",G);let z=new ResizeObserver(G);z.observe(j);let W=J.destroy;J.destroy=function(){if(z)z.disconnect();if(j.removeEventListener("scroll",G),K.parentNode)K.parentNode.removeChild(K);if(Y.parentNode)Y.parentNode.removeChild(Y);if(q){let X=J.element.querySelector(`.${J.getClass("tabs")}-scroll-button--left`),U=J.element.querySelector(`.${J.getClass("tabs")}-scroll-button--right`);if(X&&X.parentNode)X.parentNode.removeChild(X);if(U&&U.parentNode)U.parentNode.removeChild(U)}W.call(this)}};var U1={SMALL:600,MEDIUM:904,LARGE:1240},K2=(J,$={})=>{if($.responsive===!1)return;let Q={small:$.breakpoints?.small||U1.SMALL,medium:$.breakpoints?.medium||U1.MEDIUM,large:$.breakpoints?.large||U1.LARGE},q={layout:$.smallScreen?.layout||"icon-only",maxVisibleTabs:$.smallScreen?.maxVisibleTabs||4},Z=new Map,j=J.getTabs();j.forEach((z)=>{let W="text-only";if(z.getIcon()&&z.getText())W="icon-and-text";else if(z.getIcon())W="icon-only";Z.set(z,W)});let K=()=>{if(window.innerWidth<Q.small)j.forEach((W)=>{if(q.layout==="icon-only"&&!W.getIcon())return;if(q.layout==="icon-only"&&W.getIcon())W.element.classList.remove(`${W.getClass("tab")}--icon-and-text`),W.element.classList.remove(`${W.getClass("tab")}--text-only`),W.element.classList.add(`${W.getClass("tab")}--icon-only`);else if(q.layout==="text-only")W.element.classList.remove(`${W.getClass("tab")}--icon-and-text`),W.element.classList.remove(`${W.getClass("tab")}--icon-only`),W.element.classList.add(`${W.getClass("tab")}--text-only`)}),J.element.classList.add(`${J.getClass("tabs")}--responsive-small`);else j.forEach((W)=>{let X=Z.get(W)||"text-only";W.element.classList.remove(`${W.getClass("tab")}--icon-only`),W.element.classList.remove(`${W.getClass("tab")}--text-only`),W.element.classList.remove(`${W.getClass("tab")}--icon-and-text`),W.element.classList.add(`${W.getClass("tab")}--${X}`)}),J.element.classList.remove(`${J.getClass("tabs")}--responsive-small`)};K();let Y=new ResizeObserver(K);Y.observe(document.body),J._resizeObserver=Y;let G=J.destroy;J.destroy=function(){if(this._resizeObserver)this._resizeObserver.disconnect();G.call(this)}};var Y2=Z2;n();s();c();var G2=({disabled:J,lifecycle:$})=>(Q)=>({element:Q.element,input:Q.input,getValue:Q.getValue||(()=>""),setValue(q){return Q.setValue?.(q),this},setAttribute(q,Z){return Q.setAttribute?.(q,Z),this},getAttribute(q){return Q.getAttribute?.(q)||null},removeAttribute(q){return Q.removeAttribute?.(q),this},setVariant(q){let Z=Q.config?.prefix||"mtrl",j=Q.config?.componentName||"textfield";if(Q.element.classList.remove(`${Z}-${j}--filled`,`${Z}-${j}--outlined`),Q.element.classList.add(`${Z}-${j}--${q}`),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10);return this},getVariant(){let q=Q.config?.prefix||"mtrl",Z=Q.config?.componentName||"textfield";if(Q.element.classList.contains(`${q}-${Z}--outlined`))return"outlined";return"filled"},setLabel(q){if(Q.label?.setText(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10);return this},getLabel(){return Q.label?.getText()||""},leadingIcon:Q.leadingIcon||null,setLeadingIcon(q){if(Q.setLeadingIcon){if(Q.setLeadingIcon(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},removeLeadingIcon(){if(Q.removeLeadingIcon){if(Q.removeLeadingIcon(),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},trailingIcon:Q.trailingIcon||null,setTrailingIcon(q){if(Q.setTrailingIcon){if(Q.setTrailingIcon(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},removeTrailingIcon(){if(Q.removeTrailingIcon){if(Q.removeTrailingIcon(),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},supportingTextElement:Q.supportingTextElement||null,setSupportingText(q,Z){if(Q.setSupportingText)Q.setSupportingText(q,Z);return this},removeSupportingText(){if(Q.removeSupportingText)Q.removeSupportingText();return this},prefixTextElement:Q.prefixTextElement||null,setPrefixText(q){if(Q.setPrefixText){if(Q.setPrefixText(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},removePrefixText(){if(Q.removePrefixText){if(Q.removePrefixText(),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},suffixTextElement:Q.suffixTextElement||null,setSuffixText(q){if(Q.setSuffixText){if(Q.setSuffixText(q),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},removeSuffixText(){if(Q.removeSuffixText){if(Q.removeSuffixText(),Q.updateElementPositions)setTimeout(()=>Q.updateElementPositions(),10)}return this},updatePositions(){if(Q.input&&Q.element){let q=Q.input.value&&Q.input.value.length>0,Z=Q.input.matches?.(":-webkit-autofill")||!1;if(q||Z)Q.element.classList.remove(`${Q.config?.prefix||"mtrl"}-textfield--empty`);else Q.element.classList.add(`${Q.config?.prefix||"mtrl"}-textfield--empty`)}if(Q.updateElementPositions)Q.updateElementPositions();return this},setError(q,Z){if(Q.setError)Q.setError(q,Z);return this},isError(){return Q.isError?.()||!1},setDensity(q){if(Q.density?.set)Q.density.set(q);return this},getDensity(){return Q.density?.current||"default"},on(q,Z){return Q.on?.(q,Z),this},off(q,Z){return Q.off?.(q,Z),this},enable(){return J.enable(),this},disable(){return J.disable(),this},destroy(){$.destroy()}});var X1=(J)=>($)=>{if(!J.leadingIcon)return $;let Q=J.prefix||"mtrl",q=document.createElement("span");if(q.className=`${Q}-${J.componentName||"textfield"}-leading-icon`,q.innerHTML=J.leadingIcon,$.element.appendChild(q),$.element.classList.add(`${Q}-${J.componentName||"textfield"}--with-leading-icon`),$.input)$.input.classList.add(`${Q}-${J.componentName||"textfield"}-input--with-leading-icon`);if("lifecycle"in $&&$.lifecycle?.destroy){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{q.remove(),Z.call($.lifecycle)}}return setTimeout(()=>{let Z=$.element.querySelector(`.${Q}-${J.componentName||"textfield"}-label`);if(Z){if(!$.element.classList.contains(`${Q}-${J.componentName||"textfield"}--with-prefix`))Z.style.left="44px"}},10),{...$,leadingIcon:q,setLeadingIcon(Z){return q.innerHTML=Z,this},removeLeadingIcon(){if(q.parentNode){if(q.remove(),$.element.classList.remove(`${Q}-${J.componentName||"textfield"}--with-leading-icon`),$.input)$.input.classList.remove(`${Q}-${J.componentName||"textfield"}-input--with-leading-icon`);if(!$.element.classList.contains(`${Q}-${J.componentName||"textfield"}--with-prefix`)){let Z=$.element.querySelector(`.${Q}-${J.componentName||"textfield"}-label`);if(Z)Z.style.left=""}this.leadingIcon=null}return this}}};var B1=(J)=>($)=>{if(!J.trailingIcon)return $;let Q=J.prefix||"mtrl",q=document.createElement("span");if(q.className=`${Q}-${J.componentName||"textfield"}-trailing-icon`,q.innerHTML=J.trailingIcon,$.element.appendChild(q),$.element.classList.add(`${Q}-${J.componentName||"textfield"}--with-trailing-icon`),$.input)$.input.classList.add(`${Q}-${J.componentName||"textfield"}-input--with-trailing-icon`);if("lifecycle"in $&&$.lifecycle?.destroy){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{q.remove(),Z.call($.lifecycle)}}return{...$,trailingIcon:q,setTrailingIcon(Z){return q.innerHTML=Z,this},removeTrailingIcon(){if(q.parentNode){if(q.remove(),$.element.classList.remove(`${Q}-${J.componentName||"textfield"}--with-trailing-icon`),$.input)$.input.classList.remove(`${Q}-${J.componentName||"textfield"}-input--with-trailing-icon`);this.trailingIcon=null}return this}}};var F1=(J)=>($)=>{if(!J.prefixText)return $;let Q=J.prefix||"mtrl",q=document.createElement("span");if(q.className=`${Q}-${J.componentName||"textfield"}-prefix`,q.textContent=J.prefixText,$.element.appendChild(q),$.element.classList.add(`${Q}-${J.componentName||"textfield"}--with-prefix`),"lifecycle"in $&&$.lifecycle?.destroy){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{q.remove(),Z.call($.lifecycle)}}return{...$,prefixTextElement:q,setPrefixText(Z){return q.textContent=Z,this},removePrefixText(){if(q.parentNode){q.remove(),$.element.classList.remove(`${Q}-${J.componentName||"textfield"}--with-prefix`);let Z=$.element.querySelector(`.${Q}-${J.componentName||"textfield"}-label`);if(Z)Z.style.left="";this.prefixTextElement=null}return this}}};var H1=(J)=>($)=>{if(!J.suffixText)return $;let Q=J.prefix||"mtrl",q=document.createElement("span");if(q.className=`${Q}-${J.componentName||"textfield"}-suffix`,q.textContent=J.suffixText,$.element.appendChild(q),$.element.classList.add(`${Q}-${J.componentName||"textfield"}--with-suffix`),"lifecycle"in $&&$.lifecycle?.destroy){let Z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{q.remove(),Z.call($.lifecycle)}}return{...$,suffixTextElement:q,setSuffixText(Z){return q.textContent=Z,this},removeSuffixText(){if(q.parentNode)q.remove(),$.element.classList.remove(`${Q}-${J.componentName||"textfield"}--with-suffix`),this.suffixTextElement=null;return this}}};var M1=(J)=>($)=>{let Q=J.prefix||"mtrl",q=J.componentName||"textfield",Z=null,j=(K,Y=!1)=>{let G=document.createElement("div");if(G.className=`${Q}-${q}-helper`,G.textContent=K,Y)G.classList.add(`${Q}-${q}-helper--error`),$.element.classList.add(`${Q}-${q}--error`);return G};if(J.supportingText)Z=j(J.supportingText,J.error),$.element.appendChild(Z);if("lifecycle"in $&&$.lifecycle?.destroy){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{if(Z)Z.remove();K.call($.lifecycle)}}return{...$,supportingTextElement:Z,setSupportingText(K,Y=!1){if(Z)Z.remove(),$.element.classList.remove(`${Q}-${q}--error`);if(K)Z=j(K,Y),$.element.appendChild(Z),this.supportingTextElement=Z;else Z=null,this.supportingTextElement=null,$.element.classList.remove(`${Q}-${q}--error`);return this},removeSupportingText(){if(Z)Z.remove(),Z=null,this.supportingTextElement=null,$.element.classList.remove(`${Q}-${q}--error`);return this}}};R8();var k1=()=>(J)=>{let $=J.config.prefix||"mtrl",Q=J.config.componentName||"textfield",q=new WeakMap,Z=new WeakMap,j=new WeakMap,K=new WeakMap,Y=()=>{if(!J.element||!J.element.isConnected)return J;let z=J.element.querySelector(`.${$}-${Q}-label`),W=J.element.querySelector(`.${$}-${Q}-prefix`),X=J.element.querySelector(`.${$}-${Q}-suffix`),U=J.element.classList.contains(`${$}-${Q}--outlined`),_=J.element.classList.contains(`${$}-${Q}--focused`),N=J.element.classList.contains(`${$}-${Q}--empty`),F=J.element.classList.contains(`${$}-${Q}--with-leading-icon`);if(U&&z){let{color:k,element:L}=U9(J.element);if(_||!N){if(z.style.backgroundColor=k,z.style.paddingLeft="4px",z.style.paddingRight="4px",L&&!q.has(J.element)){let D=new MutationObserver(()=>{let{color:V}=U9(J.element);z.style.backgroundColor=V});D.observe(L,{attributes:!0,attributeFilter:["style","class"]}),q.set(J.element,D);let B=L.parentElement,H=[];while(B&&B!==document.documentElement){let V=new MutationObserver(()=>{let{color:O}=U9(J.element);z.style.backgroundColor=O});V.observe(B,{attributes:!0,attributeFilter:["style","class","data-theme","data-theme-mode"]}),H.push(V),B=B.parentElement}if(H.length)Z.set(J.element,H)}if(!j.has(J.element)){let D=()=>{let{color:B}=U9(J.element);if(_||!N)z.style.backgroundColor=B};document.addEventListener("themechange",D),j.set(J.element,D)}}else z.style.backgroundColor="",z.style.padding=""}if(W&&J.input){let L=W.getBoundingClientRect().width+4+12;if(J.input.style.paddingLeft=`${L}px`,z){let D=L;if(F)D=Math.max(D,44);if(!_&&N)z.style.left=`${D}px`;else z.style.left="12px"}}else if(F&&z){if(U)if(!_&&N)z.style.left="44px";else z.style.left="12px"}if(X&&J.input){let L=X.getBoundingClientRect().width+4+12;J.input.style.paddingRight=`${L}px`}return J},G=()=>{let z=new MutationObserver((W)=>{W.forEach((X)=>{if(X.type==="attributes"&&X.attributeName==="class")setTimeout(Y,10)})});z.observe(J.element,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("resize",Y),K.set(J.element,z)};if(setTimeout(()=>{G(),Y()},0),"lifecycle"in J&&J.lifecycle?.destroy){let z=J.lifecycle.destroy;J.lifecycle.destroy=()=>{window.removeEventListener("resize",Y);let W=K.get(J.element);if(W)W.disconnect(),K.delete(J.element);let X=q.get(J.element);if(X)X.disconnect(),q.delete(J.element);let U=Z.get(J.element);if(U)U.forEach((N)=>N.disconnect()),Z.delete(J.element);let _=j.get(J.element);if(_)document.removeEventListener("themechange",_),j.delete(J.element);z.call(J.lifecycle)}}return{...J,updateElementPositions:()=>{return Y(),J}}};var N1=(J)=>($)=>{let Q=J.prefix||"mtrl",q=J.componentName||"textfield",Z=J.density||"default";if(Z!=="default")$.element.classList.add(`${Q}-${q}--density-${Z}`);if($.element.setAttribute("data-density",Z),$.input)j($.input,Z);function j(Y,G){Y.setAttribute("data-density",G)}let K=(Y)=>{if(["default","compact"].forEach((G)=>{$.element.classList.remove(`${Q}-${q}--density-${G}`)}),Y!=="default")$.element.classList.add(`${Q}-${q}--density-${Y}`);if($.element.setAttribute("data-density",Y),$.input)$.input.setAttribute("data-density",Y);if($.density)$.density.current=Y;if($.updateElementPositions)setTimeout(()=>$.updateElementPositions(),10)};return $.density={current:Z,set:K},$};var L1=(J)=>($)=>{let Q=J.prefix||"mtrl",q=J.componentName||"textfield",Z=J.error||!1;if(Z)$.element.classList.add(`${Q}-${q}--error`);return{...$,errorState:Z,setError(j,K){if(Z=j,$.element.classList.toggle(`${Q}-${q}--error`,j),K!==void 0&&$.setSupportingText){if(K)$.setSupportingText(K,j);else if(!j)$.setSupportingText("",!1)}else if($.supportingTextElement&&$.setSupportingText){let Y=$.supportingTextElement.textContent||"";if(Y)$.setSupportingText(Y,j)}return this},isError(){return Z}}};m();var l7={FILLED:"filled",OUTLINED:"outlined"},V1={ACTIVE:"active",INACTIVE:"inactive",DISABLED:"disabled"},n$={TEXT:"text",PASSWORD:"password",EMAIL:"email",NUMBER:"number",TEL:"tel",URL:"url",SEARCH:"search",MULTILINE:"multiline"},_1={CHANGE:"change",INPUT:"input",FOCUS:"focus",BLUR:"blur",ENTER:"enter",KEYDOWN:"keydown",KEYUP:"keyup"},D1={DEFAULT:"default",COMPACT:"compact"},Z7={TYPE:n$.TEXT,VARIANT:l7.FILLED,DENSITY:D1.DEFAULT,DISABLED:!1,REQUIRED:!1,ERROR:!1,FLOAT_LABEL:!0,ANIMATION_DURATION:150},O1={ROOT:"textfield",INPUT:"textfield-input",LABEL:"textfield-label",CONTAINER:"textfield-container",FILLED:"textfield--filled",OUTLINED:"textfield--outlined",FOCUSED:"textfield--focused",DISABLED:"textfield--disabled",ERROR:"textfield--error",REQUIRED:"textfield--required",LABEL_FLOATING:"textfield-label--floating",SUPPORTING_TEXT:"textfield-supporting-text",SUPPORTING_TEXT_ERROR:"textfield-supporting-text--error",LEADING_ICON:"textfield-leading-icon",TRAILING_ICON:"textfield-trailing-icon",PREFIX_TEXT:"textfield-prefix-text",SUFFIX_TEXT:"textfield-suffix-text",OUTLINE:"textfield-outline",MULTILINE:"textfield--multiline"};var n3={type:Z7.TYPE,variant:Z7.VARIANT},z2=(J={})=>b(n3,J,"textfield"),W2=(J)=>f(J,{tag:"div",className:J.class}),U2=(J)=>({disabled:{enable:J.disabled?.enable,disable:J.disabled?.disable},lifecycle:{destroy:J.lifecycle?.destroy}});var e3=(J={})=>{let $=z2(J);try{return I(T,h(),S(W2($)),Y6($),N1($),F7($),d6($),X1($),B1($),F1($),H1($),M1($),L1($),G6($),v(),k1(),(q)=>G2(U2(q))(q))($)}catch(Q){throw console.error("Textfield creation error:",Q instanceof Error?Q.message:String(Q)),Error(`Failed to create textfield: ${Q instanceof Error?Q.message:String(Q)}`)}},p7=e3;w6();n();s();c();var j7;((Q)=>{Q.DIAL="dial";Q.INPUT="input"})(j7||={});var s7;((Q)=>{Q.VERTICAL="vertical";Q.HORIZONTAL="horizontal"})(s7||={});var C9;((Q)=>{Q.AMPM="12h";Q.MILITARY="24h"})(C9||={});var E9;((Q)=>{Q.AM="AM";Q.PM="PM"})(E9||={});m();var e$={DIAL:"dial",INPUT:"input"},$8={VERTICAL:"vertical",HORIZONTAL:"horizontal"},J8={AMPM:"12h",MILITARY:"24h"},P1={AM:"AM",PM:"PM"},N6={CHANGE:"change",OPEN:"open",CLOSE:"close",CONFIRM:"confirm",CANCEL:"cancel"},n6={DIAMETER:256,INNER_RADIUS:65,OUTER_RADIUS:110,NUMBER_SIZE:40,CENTER_SIZE:8,HAND_SIZE:36,TRACK_WIDTH:2},R1={HOURS_12:Array.from({length:12},(J,$)=>$===0?12:$),HOURS_24:Array.from({length:24},(J,$)=>$),MINUTES:Array.from({length:60},(J,$)=>$),SECONDS:Array.from({length:60},(J,$)=>$)},K7={MODAL:1050,DIALOG:1051},e={CONTAINER:".mtrl-time-picker",MODAL:".mtrl-time-picker-modal",DIALOG:".mtrl-time-picker-dialog",TITLE:".mtrl-time-picker-title",CONTENT:".mtrl-time-picker-content",DIAL:".mtrl-time-picker-dial",DIAL_CANVAS:".mtrl-time-picker-dial-canvas",DIAL_FACE:".mtrl-time-picker-dial-face",DIAL_HAND:".mtrl-time-picker-dial-hand",DIAL_CENTER:".mtrl-time-picker-dial-center",DIAL_NUMBERS:".mtrl-time-picker-dial-numbers",DIAL_NUMBER:".mtrl-time-picker-dial-number",INPUT_CONTAINER:".mtrl-time-picker-input-container",HOURS_INPUT:".mtrl-time-picker-hours",MINUTES_INPUT:".mtrl-time-picker-minutes",SECONDS_INPUT:".mtrl-time-picker-seconds",SEPARATOR:".mtrl-time-picker-separator",PERIOD_CONTAINER:".mtrl-time-picker-period",PERIOD_AM:".mtrl-time-picker-period-am",PERIOD_PM:".mtrl-time-picker-period-pm",ACTIONS:".mtrl-time-picker-actions",TOGGLE_TYPE_BUTTON:".mtrl-time-picker-toggle-type",CANCEL_BUTTON:".mtrl-time-picker-cancel",CONFIRM_BUTTON:".mtrl-time-picker-confirm"},v6={CLOCK:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
44
44
|
<circle cx="12" cy="12" r="10"></circle>
|
|
45
45
|
<polyline points="12 6 12 12 16 14"></polyline>
|
|
46
46
|
</svg>`,KEYBOARD:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -54,11 +54,11 @@ var{defineProperty:K8,getOwnPropertyNames:$q,getOwnPropertyDescriptor:Jq}=Object
|
|
|
54
54
|
<line x1="14" y1="12" x2="14" y2="12"></line>
|
|
55
55
|
<line x1="18" y1="12" x2="18" y2="12"></line>
|
|
56
56
|
<line x1="6" y1="16" x2="18" y2="16"></line>
|
|
57
|
-
</svg>`},s6={TYPE:e$.DIAL,FORMAT:J8.AMPM,ORIENTATION:$8.VERTICAL,SHOW_SECONDS:!1,CLOSE_ON_SELECT:!0,MINUTE_STEP:1,SECOND_STEP:1,CANCEL_TEXT:"Cancel",CONFIRM_TEXT:"OK",IS_OPEN:!1,CLOCK_ICON:v6.CLOCK,KEYBOARD_ICON:v6.KEYBOARD},y1={ROOT:"time-picker",OPEN:"time-picker--open",MODAL:"time-picker-modal",DIALOG:"time-picker-dialog",DIALOG_DIAL:"time-picker-dialog--dial",DIALOG_INPUT:"time-picker-dialog--input",DIALOG_VERTICAL:"time-picker-dialog--vertical",DIALOG_HORIZONTAL:"time-picker-dialog--horizontal",DIALOG_12H:"time-picker-dialog--12h",DIALOG_24H:"time-picker-dialog--24h",TITLE:"time-picker-title",CONTENT:"time-picker-content",DIAL:"time-picker-dial",DIAL_CANVAS:"time-picker-dial-canvas",DIAL_FACE:"time-picker-dial-face",DIAL_HAND:"time-picker-dial-hand",DIAL_CENTER:"time-picker-dial-center",DIAL_NUMBERS:"time-picker-dial-numbers",DIAL_NUMBER:"time-picker-dial-number",DIAL_NUMBER_ACTIVE:"time-picker-dial-number--active",INPUT_CONTAINER:"time-picker-input-container",HOURS_INPUT:"time-picker-hours",MINUTES_INPUT:"time-picker-minutes",SECONDS_INPUT:"time-picker-seconds",SEPARATOR:"time-picker-separator",PERIOD_CONTAINER:"time-picker-period",PERIOD_AM:"time-picker-period-am",PERIOD_PM:"time-picker-period-pm",PERIOD_ACTIVE:"time-picker-period--active",ACTIONS:"time-picker-actions",TOGGLE_TYPE:"time-picker-toggle-type",CANCEL:"time-picker-cancel",CONFIRM:"time-picker-confirm"};var $Z={type:"dial",format:"12h",orientation:"vertical",showSeconds:s6.SHOW_SECONDS,closeOnSelect:s6.CLOSE_ON_SELECT,minuteStep:s6.MINUTE_STEP,secondStep:s6.SECOND_STEP,cancelText:s6.CANCEL_TEXT,confirmText:s6.CONFIRM_TEXT,isOpen:s6.IS_OPEN,clockIcon:v6.CLOCK,keyboardIcon:v6.KEYBOARD},X2=(J={})=>b($Z,J,"time-picker"),B2=(J)=>{return f(J,{tag:"div",attributes:{role:"dialog","aria-modal":"true","aria-labelledby":`${J.prefix}-time-picker-title`},className:[J.class,J.isOpen?`${J.prefix}-time-picker--open`:""],forwardEvents:{click:!0,keydown:!0},interactive:!0})};var F2=(J)=>({events:{on:($,Q)=>J.on($,Q),off:($,Q)=>J.off($,Q),emit:($,Q)=>J.emit($,Q)},lifecycle:{destroy:()=>J.lifecycle.destroy()}});var t=(J)=>{return J.toString().padStart(2,"0")},H2=(J,$)=>{try{let Q=J.split(":"),q=parseInt(Q[0],10),Z=parseInt(Q[1],10),j=Q[2]?parseInt(Q[2],10):0;if(isNaN(q)||q<0||q>23||isNaN(Z)||Z<0||Z>59||isNaN(j)||j<0||j>59)throw new Error("Invalid time format");let K=q>=12?"PM":"AM";return{hours:q,minutes:Z,seconds:j,period:K}}catch(Q){console.error("Error parsing time:",Q);let q=new Date,Z=q.getHours(),j=q.getMinutes(),K=q.getSeconds(),Y=Z>=12?"PM":"AM";return{hours:Z,minutes:j,seconds:K,period:Y}}},M2=(J,$)=>{let{hours:Q,minutes:q,seconds:Z}=J;if($){if(Z!==void 0)return`${t(Q)}:${t(q)}:${t(Z)}`;return`${t(Q)}:${t(q)}`}else{let j=Q%12;if(j===0)j=12;if(Z!==void 0)return`${t(j)}:${t(q)}:${t(Z)} ${J.period}`;return`${t(j)}:${t(q)} ${J.period}`}};var k2=(J)=>{let $=J>=12?"PM":"AM",Q=J%12;if(Q===0)Q=12;return{hours:Q,period:$}};var j6={...n6,KNOB_SIZE:45,CENTER_SIZE:8,NUMBER_SIZE:24,INNER_RADIUS:75,OUTER_RADIUS:100,TRACK_WIDTH:1.5,HAND_WIDTH:2};function JZ(J){let $=document.documentElement,Q=getComputedStyle($),q=Q.getPropertyValue(`--${J}-sys-color-primary`).trim()||"#6750A4",Z=Q.getPropertyValue(`--${J}-sys-color-on-primary`).trim()||"#FFFFFF",j=Q.getPropertyValue(`--${J}-sys-color-on-surface`).trim()||"#1C1B1F",K=Q.getPropertyValue(`--${J}-sys-color-primary-rgb`).trim()||"103, 80, 164",G=`rgba(${Q.getPropertyValue(`--${J}-sys-color-on-surface-rgb`).trim()||"28, 27, 31"}, 0.05)`,z=`rgba(${K}, 0.1)`;return{primaryColor:q,onPrimaryColor:Z,onSurfaceColor:j,bgColor:G,selectedBgColor:z}}var _6=(J,$,Q)=>{let q=J.getContext("2d");if(!q){console.error("Could not get canvas context");return}let Z=JZ(Q.prefix),j=window.devicePixelRatio||1;J.width=j6.DIAMETER*j,J.height=j6.DIAMETER*j,q.scale(j,j);let K=j6.DIAMETER/2,Y=j6.DIAMETER/2,G=j6.DIAMETER/2;if(q.clearRect(0,0,J.width,J.height),q.beginPath(),q.arc(K,Y,G-2,0,2*Math.PI),q.fillStyle=Z.bgColor,q.fill(),q.beginPath(),q.arc(K,Y,j6.CENTER_SIZE/2,0,2*Math.PI),q.fillStyle=Z.primaryColor,q.fill(),Q.activeSelector==="hour")if(Q.format==="24h")qZ(q,K,Y,G,$.hours,Z);else QZ(q,K,Y,G,$.hours%12||12,Z);else if(Q.activeSelector==="minute")N2(q,K,Y,G,$.minutes,Z);else if(Q.activeSelector==="second"&&Q.showSeconds)N2(q,K,Y,G,$.seconds||0,Z);ZZ(q,K,Y,$,Q,Z)},QZ=(J,$,Q,q,Z,j)=>{let K=j6.OUTER_RADIUS;for(let Y=1;Y<=12;Y++){let G=Y/6*Math.PI-Math.PI/2,z=$+K*Math.cos(G),W=Q+K*Math.sin(G),X=Y===Z;if(X)J.beginPath(),J.arc(z,W,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill();J.font="16px Roboto, Arial, sans-serif",J.fillStyle=X?j.primaryColor:j.onSurfaceColor,J.textAlign="center",J.textBaseline="middle",J.fillText(Y.toString(),z,W+2)}},qZ=(J,$,Q,q,Z,j)=>{let K=j6.OUTER_RADIUS;for(let G=1;G<=12;G++){let z=G/6*Math.PI-Math.PI/2,W=$+K*Math.cos(z),X=Q+K*Math.sin(z),U=G===Z;if(U)J.beginPath(),J.arc(W,X,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill();J.font="16px Roboto, Arial, sans-serif",J.fillStyle=U?j.primaryColor:j.onSurfaceColor,J.textAlign="center",J.textBaseline="middle",J.fillText(G.toString(),W,X+2)}let Y=j6.INNER_RADIUS;for(let G=13;G<=24;G++){let z=G===24?0:G,W=(G-12)/6*Math.PI-Math.PI/2,X=$+Y*Math.cos(W),U=Q+Y*Math.sin(W),_=z===Z;if(_)J.beginPath(),J.arc(X,U,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill();J.font="14px Roboto, Arial, sans-serif",J.fillStyle=_?j.primaryColor:j.onSurfaceColor,J.textAlign="center",J.textBaseline="middle",J.fillText(t(z),X,U+2)}},N2=(J,$,Q,q,Z,j)=>{let K=j6.OUTER_RADIUS;for(let Y=0;Y<60;Y+=5){let G=Y/30*Math.PI-Math.PI/2,z=$+K*Math.cos(G),W=Q+K*Math.sin(G),X=Y===Z;if(X)J.beginPath(),J.arc(z,W,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill();J.font="16px Roboto, Arial, sans-serif",J.fillStyle=X?j.primaryColor:j.onSurfaceColor,J.textAlign="center",J.textBaseline="middle",J.fillText(t(Y),z,W)}if(Z%5!==0){let Y=Z/30*Math.PI-Math.PI/2,G=$+K*Math.cos(Y),z=Q+K*Math.sin(Y);J.beginPath(),J.arc(G,z,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill(),J.font="16px Roboto, Arial, sans-serif",J.fillStyle=j.primaryColor,J.textAlign="center",J.textBaseline="middle",J.fillText(t(Z),G,z)}},ZZ=(J,$,Q,q,Z,j)=>{let K,Y;if(Z.activeSelector==="hour")if(Z.format==="24h")if(q.hours>=12)K=(q.hours%12||12)/6*Math.PI-Math.PI/2,Y=j6.INNER_RADIUS;else{let X=q.hours;if(X===0)X=12;K=X/6*Math.PI-Math.PI/2,Y=j6.OUTER_RADIUS}else K=(q.hours%12||12)/6*Math.PI-Math.PI/2,Y=j6.OUTER_RADIUS;else if(Z.activeSelector==="minute")K=q.minutes/30*Math.PI-Math.PI/2,Y=j6.OUTER_RADIUS;else if(Z.activeSelector==="second")K=(q.seconds||0)/30*Math.PI-Math.PI/2,Y=j6.OUTER_RADIUS;else return;J.beginPath(),J.moveTo($,Q),J.lineTo($+Y*Math.cos(K),Q+Y*Math.sin(K)),J.lineWidth=j6.HAND_WIDTH,J.strokeStyle=j.primaryColor,J.stroke();let G=$+Y*Math.cos(K),z=Q+Y*Math.sin(K);J.beginPath(),J.arc(G,z,j6.KNOB_SIZE/2,0,2*Math.PI),J.fillStyle=j.primaryColor,J.fill(),J.font="16px Roboto, Arial, sans-serif",J.fillStyle=j.onPrimaryColor,J.textAlign="center",J.textBaseline="middle";let W="";if(Z.activeSelector==="hour")if(Z.format==="24h")W=t(q.hours);else W=String(q.hours%12||12);else if(Z.activeSelector==="minute")W=t(q.minutes);else if(Z.activeSelector==="second")W=t(q.seconds||0);J.fillText(W,G,z)},Q8=(J,$,Q,q)=>{let Z=j6.DIAMETER/2,j=j6.DIAMETER/2,K=$-Z,Y=Q-j,G=Math.sqrt(K*K+Y*Y),z=Math.atan2(Y,K)+Math.PI/2;if(z<0)z+=2*Math.PI;if(q.activeSelector==="hour")if(q.format==="24h"){let W=(j6.INNER_RADIUS+j6.OUTER_RADIUS)/2,X=G<W,U=Math.round(z/(Math.PI/6))%12;if(X&&U!==0)U+=12;else if(!X&&U===0)U=12;else if(X&&U===0)U=0;return U}else{let W=Math.round(z/(Math.PI/6))%12;if(W===0)W=12;return W}else if(q.activeSelector==="minute"||q.activeSelector==="second")return Math.round(z/(Math.PI/30))%60;return null};var C6=(J,$,Q,q)=>{if(J.innerHTML="",Q.title){let M=document.createElement("div");M.className=`${Q.prefix}-time-picker-title`,M.textContent=Q.title,M.id=`${Q.prefix}-time-picker-title`,J.appendChild(M)}let Z=document.createElement("div");Z.className=`${Q.prefix}-time-picker-content`,J.appendChild(Z);let j=document.createElement("div");j.className=`${Q.prefix}-time-picker-input-container`,Z.appendChild(j);let{hours:K}=Q.format==="24h"?{hours:$.hours}:k2($.hours),Y=document.createElement("div");Y.className=`${Q.prefix}-time-picker-time-input-field`;let G=document.createElement("input");G.type="number",G.className=`${Q.prefix}-time-picker-hours`,G.min=Q.format==="24h"?"0":"1",G.max=Q.format==="24h"?"23":"12",G.value=t(K),G.setAttribute("data-type","hour"),G.setAttribute("inputmode","numeric"),G.setAttribute("pattern","[0-9]*"),Y.appendChild(G),j.appendChild(Y);let z=document.createElement("div");z.className=`${Q.prefix}-time-picker-separator`,z.textContent=":",j.appendChild(z);let W=document.createElement("div");W.className=`${Q.prefix}-time-picker-time-input-field`;let X=document.createElement("input");X.type="number",X.className=`${Q.prefix}-time-picker-minutes`,X.min="0",X.max="59",X.value=t($.minutes),X.setAttribute("data-type","minute"),X.setAttribute("inputmode","numeric"),X.setAttribute("pattern","[0-9]*"),W.appendChild(X),j.appendChild(W);let U;if(Q.showSeconds){let M=document.createElement("div");M.className=`${Q.prefix}-time-picker-separator`,M.textContent=":",j.appendChild(M);let P=document.createElement("div");P.className=`${Q.prefix}-time-picker-time-input-field`,U=document.createElement("input"),U.type="number",U.className=`${Q.prefix}-time-picker-seconds`,U.min="0",U.max="59",U.value=t($.seconds||0),U.setAttribute("data-type","second"),U.setAttribute("inputmode","numeric"),U.setAttribute("pattern","[0-9]*");let R=document.createElement("label");R.className=`${Q.prefix}-time-picker-input-label`,R.textContent="Second",P.appendChild(U),P.appendChild(R),j.appendChild(P)}if(Q.format==="12h"){let M=document.createElement("div");M.className=`${Q.prefix}-time-picker-period`;let P=document.createElement("div");P.className=`${Q.prefix}-time-picker-period-am ${$.period==="AM"?`${Q.prefix}-time-picker-period--selected`:""}`,P.textContent="AM",P.setAttribute("role","button"),P.setAttribute("tabindex","0"),P.setAttribute("aria-pressed",$.period==="AM"?"true":"false");let R=document.createElement("div");R.className=`${Q.prefix}-time-picker-period-pm ${$.period==="PM"?`${Q.prefix}-time-picker-period--selected`:""}`,R.textContent="PM",R.setAttribute("role","button"),R.setAttribute("tabindex","0"),R.setAttribute("aria-pressed",$.period==="PM"?"true":"false"),M.appendChild(P),M.appendChild(R),j.appendChild(M)}let _=document.createElement("div");_.className=`${Q.prefix}-time-picker-dial`,_.style.display=Q.type==="dial"?"block":"none",Z.appendChild(_);let N=document.createElement("canvas");N.className=`${Q.prefix}-time-picker-dial-canvas`,N.width=n6.DIAMETER,N.height=n6.DIAMETER,N.style.width=`${n6.DIAMETER}px`,N.style.height=`${n6.DIAMETER}px`,_.appendChild(N);let F=document.createElement("div");F.className=`${Q.prefix}-time-picker-actions`,J.appendChild(F);let k=document.createElement("button");k.className=`${Q.prefix}-time-picker-toggle-type`,k.setAttribute("aria-label",Q.type==="dial"?"Switch to keyboard input":"Switch to dial selector"),k.innerHTML=Q.type==="dial"?Q.keyboardIcon||v6.KEYBOARD:Q.clockIcon||v6.CLOCK,F.appendChild(k);let L=document.createElement("div");L.className=`${Q.prefix}-time-picker-action-buttons`,F.appendChild(L);let D=document.createElement("button");D.className=`${Q.prefix}-time-picker-cancel`,D.textContent=Q.cancelText||"Cancel",D.setAttribute("type","button"),L.appendChild(D);let B=document.createElement("button");B.className=`${Q.prefix}-time-picker-confirm`,B.textContent=Q.confirmText||"OK",B.setAttribute("type","button"),L.appendChild(B);let H="hour";if(Q.type==="dial")setTimeout(()=>{_6(N,$,{type:Q.type,format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})},0);k.addEventListener("click",()=>{if(_.style.display==="none")_.style.display="block",k.innerHTML=Q.keyboardIcon||v6.KEYBOARD,k.setAttribute("aria-label","Switch to keyboard input"),setTimeout(()=>{N.focus(),document.querySelectorAll(`.${Q.prefix}-time-picker-hours`).forEach((y)=>y.setAttribute("data-active","true")),document.querySelectorAll(`.${Q.prefix}-time-picker-minutes`).forEach((y)=>y.setAttribute("data-active","false")),document.querySelectorAll(`.${Q.prefix}-time-picker-seconds`).forEach((y)=>y.setAttribute("data-active","false")),_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:"hour"})},50);else _.style.display="none",k.innerHTML=Q.clockIcon||v6.CLOCK,k.setAttribute("aria-label","Switch to dial selector"),setTimeout(()=>{G.focus(),G.select()},50)});let V=(M)=>{let P=M.target,R=P.getAttribute("data-type"),y=P.value;if(y==="")return;let x=parseInt(y,10);if(isNaN(x))return;if(R==="hour"){let A=x;if(Q.format==="12h"){if(x<0)A=1;if(x>12)A=12;if($.period==="PM"&&A!==12)A+=12;else if($.period==="AM"&&A===12)A=0}else{if(x<0)A=0;if(x>23)A=23}if($.hours=A,H="hour",G.setAttribute("data-active","true"),X.setAttribute("data-active","false"),U)U.setAttribute("data-active","false");if(_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H}),q)q("hours",A)}else if(R==="minute"){let A=x;if(x<0)A=0;if(x>59)A=59;if($.minutes=A,H="minute",G.setAttribute("data-active","false"),X.setAttribute("data-active","true"),U)U.setAttribute("data-active","false");if(_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H}),q)q("minutes",A)}else if(R==="second"){let A=x;if(x<0)A=0;if(x>59)A=59;if($.seconds=A,H="second",G.setAttribute("data-active","false"),X.setAttribute("data-active","false"),U)U.setAttribute("data-active","true");if(_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H}),q)q("seconds",A)}};if(G.addEventListener("input",V),X.addEventListener("input",V),U)U.addEventListener("input",V);if(G.addEventListener("keyup",(M)=>{if(M.key==="Enter")X.focus(),X.select()}),X.addEventListener("keyup",(M)=>{if(M.key==="Enter")if(Q.showSeconds&&U)U.focus(),U.select();else B.focus()}),U)U.addEventListener("keyup",(M)=>{if(M.key==="Enter")B.focus()});let O=(M)=>{if($.period!==M){let P=$.period;if($.period=M,P==="AM"&&M==="PM"){if($.hours<12)$.hours+=12}else if(P==="PM"&&M==="AM"){if($.hours>=12)$.hours-=12}if(Q.format==="12h"){let y=$.hours===0?12:$.hours>12?$.hours-12:$.hours;G.value=t(y)}document.querySelectorAll(`.${Q.prefix}-time-picker-period-am, .${Q.prefix}-time-picker-period-pm`).forEach((y)=>{y.classList.remove(`${Q.prefix}-time-picker-period--selected`),y.setAttribute("aria-pressed","false")});let R=document.querySelector(`.${Q.prefix}-time-picker-period-${M.toLowerCase()}`);if(R)R.classList.add(`${Q.prefix}-time-picker-period--selected`),R.setAttribute("aria-pressed","true");if(_.style.display==="block")_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H});if(q)q("hours",$.hours)}};if(Q.format==="12h"){let M=document.querySelector(`.${Q.prefix}-time-picker-period-am`),P=document.querySelector(`.${Q.prefix}-time-picker-period-pm`);if(M)M.addEventListener("click",()=>{O("AM")});if(P)P.addEventListener("click",()=>{O("PM")})}if(Q.type==="dial"||_.style.display==="block"){if(N.addEventListener("click",(M)=>{let P=N.getBoundingClientRect(),R=M.clientX-P.left,y=M.clientY-P.top,x=Q8(N,R,y,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H});if(x!==null){if(H==="hour"){let A=x;if(Q.format==="12h"){if($.period==="PM"&&x!==12)A+=12;else if($.period==="AM"&&x===12)A=0}if($.hours=A,Q.format==="12h"){let C=A===0?12:A>12?A-12:A;G.value=t(C)}else G.value=t(A);if(q)q("hours",A)}else if(H==="minute"){if($.minutes=x,X.value=t(x),q)q("minutes",x)}else if(H==="second"&&U){if($.seconds=x,U.value=t(x),q)q("seconds",x)}_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})}}),G.addEventListener("click",()=>{if(_.style.display==="block"){if(H="hour",G.setAttribute("data-active","true"),X.setAttribute("data-active","false"),U)U.setAttribute("data-active","false");_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})}}),X.addEventListener("click",()=>{if(_.style.display==="block"){if(H="minute",G.setAttribute("data-active","false"),X.setAttribute("data-active","true"),U)U.setAttribute("data-active","false");_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})}}),U)U.addEventListener("click",()=>{if(_.style.display==="block")H="second",G.setAttribute("data-active","false"),X.setAttribute("data-active","false"),U.setAttribute("data-active","true"),_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})})}};var L2=(J,$,Q,q,Z,j)=>{let K=!!Z.isOpen,Y=(X)=>{if(X.key==="Escape")z.close(),j.events.emit(N6.CANCEL)},G=(X)=>{if(X.target===$)z.close()},z={element:J.element,modalElement:$,dialogElement:Q,isOpen:K,open(){if(K)return this;if($.style.display="block",$.offsetWidth,$.classList.add("active"),Q.classList.add("active"),document.addEventListener("keydown",Y),$.addEventListener("click",G),K=!0,J.element.classList.add(`${Z.prefix}-time-picker--open`),setTimeout(()=>{C6(Q,q,Z)},50),j.events.emit(N6.OPEN),Z.onOpen)Z.onOpen();return this},close(){if(!K)return this;if($.classList.remove("active"),Q.classList.remove("active"),setTimeout(()=>{$.style.display="none"},300),document.removeEventListener("keydown",Y),$.removeEventListener("click",G),K=!1,J.element.classList.remove(`${Z.prefix}-time-picker--open`),j.events.emit(N6.CLOSE),Z.onClose)Z.onClose();return this},toggle(){return K?this.close():this.open()},getValue(){return M2(q,Z.format==="24h")},getTimeObject(){return{...q}},setValue(X){try{let U=X.split(":"),_=parseInt(U[0],10),N=parseInt(U[1],10),F=U[2]?parseInt(U[2],10):0;if(isNaN(_)||_<0||_>23||isNaN(N)||N<0||N>59||isNaN(F)||F<0||F>59)throw new Error("Invalid time format. Use HH:MM or HH:MM:SS (24-hour format).");if(q.hours=_,q.minutes=N,q.seconds=F,q.period=_>=12?"PM":"AM",C6(Q,q,Z),j.events.emit(N6.CHANGE,this.getValue()),Z.onChange)Z.onChange(this.getValue())}catch(U){console.error("Error setting time value:",U)}return this},setType(X){if(Z.type===X)return this;return Z.type=X,Q.classList.remove(`${Z.prefix}-time-picker-dialog--${"dial"}`,`${Z.prefix}-time-picker-dialog--${"input"}`),Q.classList.add(`${Z.prefix}-time-picker-dialog--${X}`),C6(Q,q,Z),this},getType(){return Z.type},setFormat(X){if(Z.format===X)return this;if(Z.format=X,Q.classList.remove(`${Z.prefix}-time-picker-dialog--${"12h"}`,`${Z.prefix}-time-picker-dialog--${"24h"}`),Q.classList.add(`${Z.prefix}-time-picker-dialog--${X}`),X==="24h")q.period=q.hours>=12?"PM":"AM";else q.period=q.hours>=12?"PM":"AM";return C6(Q,q,Z),j.events.emit(N6.CHANGE,this.getValue()),this},getFormat(){return Z.format},setOrientation(X){if(Z.orientation===X)return this;return Z.orientation=X,Q.classList.remove(`${Z.prefix}-time-picker-dialog--${"vertical"}`,`${Z.prefix}-time-picker-dialog--${"horizontal"}`),Q.classList.add(`${Z.prefix}-time-picker-dialog--${X}`),C6(Q,q,Z),this},getOrientation(){return Z.orientation},setTitle(X){Z.title=X;let U=Q.querySelector(e.TITLE);if(U)U.textContent=X;else C6(Q,q,Z);return this},getTitle(){return Z.title||""},destroy(){if(K)this.close();if($&&$.parentNode)$.parentNode.removeChild($);j.lifecycle.destroy()},on(X,U){return j.events.on(X,U),this},off(X,U){return j.events.off(X,U),this}};Q.addEventListener("click",(X)=>{let U=X.target;if(U.closest(e.CANCEL_BUTTON)){if(z.close(),j.events.emit(N6.CANCEL),Z.onCancel)Z.onCancel()}if(U.closest(e.CONFIRM_BUTTON)){if(z.close(),j.events.emit(N6.CONFIRM,z.getValue()),Z.onConfirm)Z.onConfirm(z.getValue())}if(U.closest(e.TOGGLE_TYPE_BUTTON)){let _=Z.type==="dial"?"input":"dial";z.setType(_)}if(U.closest(e.PERIOD_AM)){if(q.period!=="AM"){if(q.period="AM",q.hours>=12)q.hours-=12;if(C6(Q,q,Z),j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}if(U.closest(e.PERIOD_PM)){if(q.period!=="PM"){if(q.period="PM",q.hours<12)q.hours+=12;if(C6(Q,q,Z),j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}if(U.closest(e.DIAL_CANVAS)){if(Z.type==="dial"){let _=U,N=_.getBoundingClientRect(),F=X.clientX-N.left,k=X.clientY-N.top,L="hour",D=Q.querySelector(e.HOURS_INPUT),B=Q.querySelector(e.MINUTES_INPUT),H=Q.querySelector(e.SECONDS_INPUT);if(D&&D.getAttribute("data-active")==="true")L="hour";else if(B&&B.getAttribute("data-active")==="true")L="minute";else if(Z.showSeconds&&H&&H.getAttribute("data-active")==="true")L="second";let V=Q8(_,F,k,{type:Z.type,format:Z.format,showSeconds:Z.showSeconds,prefix:Z.prefix,activeSelector:L});if(V!==null){if(L==="hour"){let O=V;if(Z.format==="12h"){if(q.period==="PM"&&V!==12)O+=12;else if(q.period==="AM"&&V===12)O=0}if(q.hours!==O){q.hours=O;let M=D;if(M)M.textContent=t(Z.format==="24h"?O:O%12||12);let P=Q.querySelector(e.DIAL_CANVAS);if(P)_6(P,q,{type:Z.type,format:Z.format,showSeconds:Z.showSeconds,prefix:Z.prefix,activeSelector:L});if(j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}else if(L==="minute"){if(q.minutes!==V){q.minutes=V;let O=B;if(O)O.textContent=t(V);let M=Q.querySelector(e.DIAL_CANVAS);if(M)_6(M,q,{type:Z.type,format:Z.format,showSeconds:Z.showSeconds,prefix:Z.prefix,activeSelector:L});if(j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}else if(L==="second"&&Z.showSeconds){if(q.seconds!==V){q.seconds=V;let O=H;if(O)O.textContent=t(V);let M=Q.querySelector(e.DIAL_CANVAS);if(M)_6(M,q,{type:Z.type,format:Z.format,showSeconds:Z.showSeconds,prefix:Z.prefix,activeSelector:L});if(j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}}}}});let W=(X)=>{let U=X.target,_=U.getAttribute("data-type"),N=parseInt(U.value,10);if(isNaN(N))return;if(_==="hour"){let F=N;if(Z.format==="12h"){if(N<1)F=12;if(N>12)F=1;if(q.period==="PM"&&F!==12)F+=12;else if(q.period==="AM"&&F===12)F=0}else{if(N<0)F=0;if(N>23)F=23}q.hours=F}else if(_==="minute"){let F=N;if(F<0)F=0;if(F>59)F=59;q.minutes=F}else if(_==="second"){let F=N;if(F<0)F=0;if(F>59)F=59;q.seconds=F}if(C6(Q,q,Z),j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())};return Q.addEventListener("change",(X)=>{let U=X.target;if(U.matches(e.HOURS_INPUT)||U.matches(e.MINUTES_INPUT)||U.matches(e.SECONDS_INPUT))W(X)}),Q.addEventListener("keyup",(X)=>{let U=X.target;if(U.matches(e.HOURS_INPUT)||U.matches(e.MINUTES_INPUT)||U.matches(e.SECONDS_INPUT)){if(X.key==="Enter"){if(W(X),U.matches(e.HOURS_INPUT)){let _=Q.querySelector(e.MINUTES_INPUT);if(_)_.focus()}else if(U.matches(e.MINUTES_INPUT))if(Z.showSeconds){let _=Q.querySelector(e.SECONDS_INPUT);if(_)_.focus()}else{let _=Q.querySelector(e.CONFIRM_BUTTON);if(_)_.focus()}else if(U.matches(e.SECONDS_INPUT)){let _=Q.querySelector(e.CONFIRM_BUTTON);if(_)_.focus()}}}}),z};var jZ=(J={})=>{let $=X2(J);try{let Q=I(T,h(),S(B2($)),v())($),q=document.createElement("div");q.className=`${u}-time-picker-modal`,q.style.display="none",q.style.position="fixed",q.style.top="0",q.style.left="0",q.style.width="100%",q.style.height="100%",q.style.backgroundColor="rgba(0, 0, 0, 0.4)",q.style.zIndex=K7.MODAL.toString(),q.setAttribute("role","presentation");let Z=document.createElement("div");Z.className=[`${u}-time-picker-dialog`,`${u}-time-picker-dialog--${$.type}`,`${u}-time-picker-dialog--${$.orientation}`,`${u}-time-picker-dialog--${$.format}`].join(" "),Z.style.position="absolute",Z.style.top="50%",Z.style.left="50%",Z.style.transform="translate(-50%, -50%)",Z.style.zIndex=K7.DIALOG.toString(),q.appendChild(Z),(typeof $.container==="string"?document.querySelector($.container)||document.body:$.container||document.body).appendChild(q);let K;if($.value)K=H2($.value,$.format);else{let G=new Date;K={hours:G.getHours(),minutes:G.getMinutes(),seconds:$.showSeconds?G.getSeconds():0,period:G.getHours()>=12?"PM":"AM"}}C6(Z,K,$);let Y=L2(Q,q,Z,K,$,F2(Q));if($.isOpen)setTimeout(()=>Y.open(),0);return Y}catch(Q){throw console.error("TimePicker creation error:",Q),new Error(`Failed to create time picker: ${Q.message}`)}},A1=jZ;n();m();var q8={SMALL:"small",MEDIUM:"medium",LARGE:"large",CENTER:"center"},w1={DEFAULT:"default",SCROLLED:"scrolled",FIXED:"fixed"},K9={TAG:"header",TYPE:q8.SMALL,SCROLLABLE:!0,COMPRESSIBLE:!0,SCROLL_THRESHOLD:4},x1={ROOT:"top-app-bar",SMALL:"top-app-bar--small",MEDIUM:"top-app-bar--medium",LARGE:"top-app-bar--large",CENTER:"top-app-bar--center",SCROLLED:"top-app-bar--scrolled",FIXED:"top-app-bar--fixed",ROW:"top-app-bar-row",SECTION:"top-app-bar-section",SECTION_LEADING:"top-app-bar-section--leading",SECTION_HEADLINE:"top-app-bar-section--headline",SECTION_TRAILING:"top-app-bar-section--trailing",TITLE:"top-app-bar-title"};var KZ={tag:K9.TAG,type:K9.TYPE,scrollable:K9.SCROLLABLE,compressible:K9.COMPRESSIBLE,scrollThreshold:K9.SCROLL_THRESHOLD},V2=(J={})=>b(KZ,J,"top-app-bar");var _2=(J={})=>{let $=V2(J),Q=T($),q=()=>{let F=document.createElement("div");F.className=`${Q.getClass("top-app-bar")}-leading`;let k=document.createElement("h1");if(k.className=`${Q.getClass("top-app-bar")}-headline`,$.title)k.textContent=$.title;let L=document.createElement("div");return L.className=`${Q.getClass("top-app-bar")}-trailing`,{leadingContainer:F,headlineElement:k,trailingContainer:L}},{leadingContainer:Z,headlineElement:j,trailingContainer:K}=q(),Y=()=>{let F=[$.class];if($.type!=="small")F.push(`${Q.getClass("top-app-bar")}--${$.type}`);if($.compressible&&($.type==="medium"||$.type==="large"))F.push(`${Q.getClass("top-app-bar")}--compressible`);return F.filter(Boolean)},G=S({tag:$.tag,componentName:"top-app-bar",className:Y(),attributes:{role:"banner","aria-label":"Top app bar"},interactive:!0})(Q),z=h()(G),W=v()(z);(()=>{if($.type==="medium"||$.type==="large"){let F=document.createElement("div");F.className=`${Q.getClass("top-app-bar")}-row`,F.appendChild(Z),F.appendChild(K);let k=document.createElement("div");k.className=`${Q.getClass("top-app-bar")}-row`,k.appendChild(j),W.element.appendChild(F),W.element.appendChild(k)}else W.element.appendChild(Z),W.element.appendChild(j),W.element.appendChild(K)})();let U=!1;if($.scrollable){let F=()=>{let L=window.scrollY>$.scrollThreshold;if(U!==L){if(U=L,U)W.element.classList.add(`${Q.getClass("top-app-bar")}--scrolled`);else W.element.classList.remove(`${Q.getClass("top-app-bar")}--scrolled`);$.onScroll?.(U)}};window.addEventListener("scroll",F,{passive:!0}),F();let k=W.lifecycle.destroy;W.lifecycle.destroy=()=>{window.removeEventListener("scroll",F),k()}}let _=(F)=>{while(W.element.firstChild)W.element.removeChild(W.element.firstChild);if(["small","medium","large","center"].forEach((k)=>{W.element.classList.remove(`${Q.getClass("top-app-bar")}--${k}`)}),F!=="small")W.element.classList.add(`${Q.getClass("top-app-bar")}--${F}`);if(W.element.classList.toggle(`${Q.getClass("top-app-bar")}--compressible`,$.compressible&&(F==="medium"||F==="large")),F==="medium"||F==="large"){let k=document.createElement("div");k.className=`${Q.getClass("top-app-bar")}-row`,k.appendChild(Z),k.appendChild(K);let L=document.createElement("div");L.className=`${Q.getClass("top-app-bar")}-row`,L.appendChild(j),W.element.appendChild(k),W.element.appendChild(L)}else W.element.appendChild(Z),W.element.appendChild(j),W.element.appendChild(K)};return{...W,setTitle(F){return j.textContent=F,this},getTitle(){return j.textContent||""},addLeadingElement(F){return Z.appendChild(F),this},addTrailingElement(F){return K.appendChild(F),this},setType(F){return $.type=F,_(F),this},setScrollState(F){if(U=F,F)this.element.classList.add(`${Q.getClass("top-app-bar")}--scrolled`);else this.element.classList.remove(`${Q.getClass("top-app-bar")}--scrolled`);return this},getHeadlineElement(){return j},getLeadingContainer(){return Z},getTrailingContainer(){return K}}};var D2=_2;w6();n();s();c();var D6={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOP_START:"top-start",TOP_END:"top-end",RIGHT_START:"right-start",RIGHT_END:"right-end",BOTTOM_START:"bottom-start",BOTTOM_END:"bottom-end",LEFT_START:"left-start",LEFT_END:"left-end"};var O2=8;var P2=({lifecycle:J})=>($)=>{let Q=null,q=D6.BOTTOM,Z=!1,j=null,K=null,Y=300,G=100,z=!0,W=!0,X=document.createElement("div");X.className=`${$.getClass("tooltip")}__arrow`,$.element.appendChild(X),document.body.appendChild($.element),$.element.setAttribute("aria-hidden","true");let U=()=>{if(!Q)return{top:0,left:0};let O=$.element.getBoundingClientRect(),M=Q.getBoundingClientRect(),P=window.scrollY||window.pageYOffset,R=window.scrollX||window.pageXOffset,y=O2,x=0,A=0,C;switch(q){case D6.TOP:x=M.top+P-O.height-y,A=M.left+R+M.width/2-O.width/2,C="bottom";break;case D6.TOP_START:x=M.top+P-O.height-y,A=M.left+R,C="bottom-start";break;case D6.TOP_END:x=M.top+P-O.height-y,A=M.left+R+M.width-O.width,C="bottom-end";break;case D6.RIGHT:x=M.top+P+M.height/2-O.height/2,A=M.left+R+M.width+y,C="left";break;case D6.RIGHT_START:x=M.top+P,A=M.left+R+M.width+y,C="left-start";break;case D6.RIGHT_END:x=M.top+P+M.height-O.height,A=M.left+R+M.width+y,C="left-end";break;case D6.BOTTOM:x=M.top+P+M.height+y,A=M.left+R+M.width/2-O.width/2,C="top";break;case D6.BOTTOM_START:x=M.top+P+M.height+y,A=M.left+R,C="top-start";break;case D6.BOTTOM_END:x=M.top+P+M.height+y,A=M.left+R+M.width-O.width,C="top-end";break;case D6.LEFT:x=M.top+P+M.height/2-O.height/2,A=M.left+R-O.width-y,C="right";break;case D6.LEFT_START:x=M.top+P,A=M.left+R-O.width-y,C="right-start";break;case D6.LEFT_END:x=M.top+P+M.height-O.height,A=M.left+R-O.width-y,C="right-end";break;default:x=M.top+P+M.height+y,A=M.left+R+M.width/2-O.width/2,C="top"}let r=window.innerWidth;if(A<0)A=0;else if(A+O.width>r)A=r-O.width;return{top:x,left:A,arrowPosition:C}},_=(O)=>{if(W)O.addEventListener("mouseenter",F),O.addEventListener("mouseleave",k);if(z)O.addEventListener("focus",L),O.addEventListener("blur",D)},N=(O)=>{if(O)O.removeEventListener("mouseenter",F),O.removeEventListener("mouseleave",k),O.removeEventListener("focus",L),O.removeEventListener("blur",D)},F=()=>B.show(),k=()=>B.hide(),L=()=>B.show(),D=()=>B.hide(),B={element:$.element,target:Q,lifecycle:J,getClass:$.getClass,setText(O){let M=document.createTextNode(O);while($.element.firstChild!==X)$.element.removeChild($.element.firstChild);if($.element.insertBefore(M,X),Z)this.updatePosition();return this},getText(){let O=$.element.cloneNode(!0),M=O.querySelector(`.${$.getClass("tooltip")}__arrow`);if(M)M.remove();return O.textContent||""},setPosition(O){q=O;let M=$.getClass("tooltip"),P=Object.values(D6).map((R)=>`${M}--${R}`);if($.element.classList.remove(...P),$.element.classList.add(`${M}--${O}`),Z)this.updatePosition();return this},getPosition(){return q},setTarget(O){if(Q)N(Q);if(Q=O,this.target=O,Q.setAttribute("aria-describedby",$.element.id),_(Q),Z)this.updatePosition();return this},show(O=!1){if(j!==null)window.clearTimeout(j),j=null;if(K!==null)window.clearTimeout(K),K=null;let M=()=>{if(!Q)return this;$.element.setAttribute("aria-hidden","false"),$.element.classList.add(`${$.getClass("tooltip")}--visible`),Z=!0,this.updatePosition(),window.addEventListener("resize",H),window.addEventListener("scroll",V)};if(O)M();else j=window.setTimeout(M,Y);return this},hide(O=!1){if(K!==null)window.clearTimeout(K),K=null;if(j!==null)window.clearTimeout(j),j=null;let M=()=>{$.element.setAttribute("aria-hidden","true"),$.element.classList.remove(`${$.getClass("tooltip")}--visible`),Z=!1,window.removeEventListener("resize",H),window.removeEventListener("scroll",V)};if(O)M();else K=window.setTimeout(M,G);return this},isVisible(){return Z},updatePosition(){if(!Q)return this;let{top:O,left:M,arrowPosition:P}=U();if($.element.style.top=`${Math.round(O)}px`,$.element.style.left=`${Math.round(M)}px`,P)X.className=`${$.getClass("tooltip")}__arrow`,X.classList.add(`${$.getClass("tooltip")}__arrow--${P}`);return this},destroy(){if(j!==null)window.clearTimeout(j);if(K!==null)window.clearTimeout(K);if(Q)N(Q),Q.removeAttribute("aria-describedby");if(window.removeEventListener("resize",H),window.removeEventListener("scroll",V),$.element.parentNode)$.element.parentNode.removeChild($.element);J.destroy()}},H=()=>{B.updatePosition()},V=()=>{B.updatePosition()};return B};m();var Z8={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOP_START:"top-start",TOP_END:"top-end",RIGHT_START:"right-start",RIGHT_END:"right-end",BOTTOM_START:"bottom-start",BOTTOM_END:"bottom-end",LEFT_START:"left-start",LEFT_END:"left-end"},j8={DEFAULT:"default",RICH:"rich",PLAIN:"plain"},T1={SHOW:"show",HIDE:"hide",ENTER:"enter",LEAVE:"leave"},E6={POSITION:Z8.BOTTOM,VARIANT:j8.DEFAULT,VISIBLE:!1,SHOW_DELAY:300,HIDE_DELAY:100,OFFSET:8,ARROW_SIZE:8,SHOW_ON_FOCUS:!0,SHOW_ON_HOVER:!0,RICH:!1},I1={ROOT:"tooltip",CONTAINER:"tooltip-container",ARROW:"tooltip-arrow",CONTENT:"tooltip-content",VISIBLE:"tooltip--visible",HIDDEN:"tooltip--hidden",DEFAULT:"tooltip--default",RICH:"tooltip--rich",PLAIN:"tooltip--plain",POSITION_PREFIX:"tooltip--"};var YZ={position:E6.POSITION,variant:E6.VARIANT,visible:E6.VISIBLE,showDelay:E6.SHOW_DELAY,hideDelay:E6.HIDE_DELAY,showOnFocus:E6.SHOW_ON_FOCUS,showOnHover:E6.SHOW_ON_HOVER,rich:E6.RICH},R2=(J={})=>b(YZ,J,"tooltip"),y2=(J)=>{let $={role:"tooltip","aria-hidden":"true"};if(J.zIndex!==void 0)$.style=`z-index: ${J.zIndex};`;return f(J,{tag:"div",attributes:$,className:[J.class,`${J.prefix}-tooltip--${J.position}`,`${J.prefix}-tooltip--${J.variant}`],text:J.text||""})},A2=(J)=>({lifecycle:{destroy:()=>J.lifecycle.destroy()}});var GZ=()=>{return`${u}-tooltip-${Math.random().toString(36).substring(2,9)}`},zZ=(J={})=>{let $=R2(J);try{let Q=I(T,S(y2($)),v(),(q)=>P2(A2(q))(q))($);if(Q.element.id=GZ(),$.target)Q.setTarget($.target);if($.text)Q.setText($.text);if($.visible)Q.show(!0);return Q}catch(Q){throw console.error("Tooltip creation error:",Q),new Error(`Failed to create tooltip: ${Q.message}`)}},S1=zZ;M7();w9();s();c();var WZ=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize list renderer: missing element"),$;let Q=J.items||[],q=J.renderItem,Z=document.createElement("div");Z.className="mtrl-list-content",Z.setAttribute("role","list"),$.element.appendChild(Z);function j(z,W){let X=document.createElement("div");X.className=q6.ITEM,X.setAttribute("role","listitem");let U=document.createElement("div");U.className="mtrl-list-item-content";let _=document.createElement("div");return _.className="mtrl-list-item-text",_.textContent=z.text||z.title||z.headline||z.name||z.id||String(z),U.appendChild(_),X.appendChild(U),X}let K=()=>{if(Z.innerHTML="",!Q||Q.length===0){Z.innerHTML='<div class="mtrl-list-empty">No items</div>';return}let z=document.createDocumentFragment();Q.forEach((W,X)=>{if(W==null)return;let U=q?q(W,X):j(W,X);if(!U)return;if(!U.classList.contains(q6.ITEM))U.classList.add(q6.ITEM);if(!U.hasAttribute("role"))U.setAttribute("role","listitem");let _=W?.id||String(X);if(!U.hasAttribute("data-id"))U.setAttribute("data-id",_);z.appendChild(U)}),Z.appendChild(z),$.emit?.(Y9.LOAD,{items:Q,loading:!1,hasNext:!1,hasPrev:!1,component:$}),console.log(`\uD83D\uDCCB Rendered ${Q.length} items directly`)},Y=(z,W="start",X=!1)=>{let U=Z.querySelector(`[data-id="${z}"]`);if(U)U.scrollIntoView({behavior:X?"smooth":"auto",block:W==="center"?"center":W==="end"?"end":"start"})},G=(z,W="start",X=!1)=>{if(z<0||z>=Q.length)return;let U=Z.children[z];if(U)U.scrollIntoView({behavior:X?"smooth":"auto",block:W==="center"?"center":W==="end"?"end":"start"})};if(K(),$.lifecycle?.destroy){let z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{Z.innerHTML="",z()}}return{...$,list:{getItems:()=>Q,getAllItems:()=>Q,getVisibleItems:()=>Q,refresh:K,scrollToItem:Y,scrollToIndex:G,loadNext:()=>Promise.resolve({hasNext:!1,items:[]}),loadPage:()=>Promise.resolve({hasNext:!1,items:[]}),loadPrevious:()=>Promise.resolve({hasPrev:!1,items:[]}),scrollNext:()=>Promise.resolve({hasNext:!1,items:[]}),scrollPrevious:()=>Promise.resolve({hasPrev:!1,items:[]}),scrollToItemById:(z,W,X)=>{return Y(z,W,X),Promise.resolve()},onCollectionChange:()=>()=>{},onPageChange:()=>()=>{},getCurrentPage:()=>1,getPageSize:()=>Q.length,getCollection:()=>null,isApiMode:()=>!1,isLoading:()=>!1,hasNextPage:()=>!1}}},b1=WZ;p9();y7();var UZ=(J)=>($)=>{if(!$.element||!J.trackSelection)return{...$,getSelectedItems:()=>[],getSelectedItemIds:()=>[],isItemSelected:()=>!1,selectItem:()=>$,deselectItem:()=>$,clearSelection:()=>$,setSelection:()=>$};let Q=new Set;if(Array.isArray(J.initialSelection))J.initialSelection.forEach((K)=>Q.add(String(K)));if(Array.isArray(J.items))J.items.forEach((K,Y)=>{if(K?.selected){let G=K.id||String(Y);Q.add(String(G))}});let q=()=>{($.element?.querySelectorAll("[data-id]")||[]).forEach((Y)=>{let G=Y.getAttribute("data-id"),z=Q.has(G);if(z&&!m6(Y,q6.SELECTED))p(Y,q6.SELECTED);else if(!z&&m6(Y,q6.SELECTED))K6(Y,q6.SELECTED)})},Z=(K)=>{let Y=K.target.closest("[data-id]");if(!Y)return;let G=Y.getAttribute("data-id");if(!G)return;let z=$.list?.getItems()||[],W=z.find((U)=>String(U?.id)===G);if(!W){let U=parseInt(G,10);if(!isNaN(U)&&U>=0&&U<z.length)W=z[U]}if(!W){console.warn(`Item not found for ID: ${G}`);return}let X={item:W,element:Y,originalEvent:K,component:$,preventDefault:()=>{X.defaultPrevented=!0},defaultPrevented:!1};if($.emit?.(Y9.SELECT,X),X.defaultPrevented)return;if(J.multiSelect)if(Q.has(G))Q.delete(G),K6(Y,q6.SELECTED);else Q.add(G),p(Y,q6.SELECTED);else{let U=m6(Y,q6.SELECTED);if($.element.querySelectorAll(`.${u}-${q6.SELECTED}`).forEach((N)=>K6(N,q6.SELECTED)),Q.clear(),!U)Q.add(G),p(Y,q6.SELECTED)}},j=(K,Y)=>{let G=String(K);if(Y)Q.add(G);else Q.delete(G);let z=$.element.querySelector(`[data-id="${G}"]`);if(z){if(Y&&!m6(z,q6.SELECTED))p(z,q6.SELECTED);else if(!Y&&m6(z,q6.SELECTED))K6(z,q6.SELECTED)}};if($.element.addEventListener("click",Z),setTimeout(q,10),$.lifecycle?.destroy){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{$.element.removeEventListener("click",Z),K()}}return{...$,getSelectedItems:()=>{return($.list?.getItems()||[]).filter((Y,G)=>{let z=Y?.id||String(G);return Q.has(String(z))})},getSelectedItemIds:()=>Array.from(Q),isItemSelected:(K)=>Q.has(String(K)),selectItem:(K)=>{return j(K,!0),$},deselectItem:(K)=>{return j(K,!1),$},clearSelection:()=>{if(Q.size>0)Q.clear(),$.element.querySelectorAll(`.${u}-${q6.SELECTED}`).forEach((K)=>K6(K,q6.SELECTED));return $},setSelection:(K)=>{if(Q.clear(),Array.isArray(K))K.forEach((Y)=>Q.add(String(Y)));return q(),$}}},v1=UZ;var w2=({list:J,selection:$,events:Q,lifecycle:q,config:Z})=>(j)=>({...j,element:j.element,refresh:async()=>{return J.refresh(),j},getAllItems:()=>J.getAllItems(),getVisibleItems:()=>J.getVisibleItems(),scrollToItem:(K,Y,G)=>{let z=G!==void 0?G:Z?.animate||!1;return J.scrollToItem(K,Y,z),j},scrollToIndex:async(K,Y,G)=>{let z=G!==void 0?G:Z?.animate||!1;return J.scrollToIndex(K,Y,z),j},isLoading:()=>J.isLoading(),hasNextPage:()=>J.hasNextPage(),getSelectedItems:()=>$.getSelectedItems(),getSelectedItemIds:()=>$.getSelectedItemIds(),isItemSelected:(K)=>$.isItemSelected(K),selectItem:(K)=>{return $.selectItem(K),j},deselectItem:(K)=>{return $.deselectItem(K),j},clearSelection:()=>{return $.clearSelection(),j},setSelection:(K)=>{return $.setSelection(K),j},on:(K,Y)=>{return Q.on(K,Y),j},off:(K,Y)=>{return Q.off(K,Y),j},destroy:()=>{q.destroy()}});m();var XZ={items:[],trackSelection:!0,multiSelect:!1,animate:!1},x2=(J={})=>{if(!Array.isArray(J.items)&&!J.renderItem)throw new Error("List requires either items array or renderItem function");if(Array.isArray(J.items)&&J.items.length>0&&!J.renderItem)J.renderItem=($)=>{let Q=document.createElement("div");return Q.className="mtrl-list-item",Q.textContent=$.text||$.title||$.headline||$.name||$.id||String($),Q};return b(XZ,J,"list")},T2=(J)=>{let $={role:"list",tabindex:"0"};if(J.ariaLabel)$["aria-label"]=J.ariaLabel;return f(J,{tag:"div",attributes:$,className:[q6.CONTAINER,J.class],forwardEvents:{scroll:!0,keydown:!0}})},I2=(J,$)=>({list:{refresh:J.list?.refresh,getItems:J.list?.getItems,getAllItems:J.list?.getAllItems,getVisibleItems:J.list?.getVisibleItems,scrollToItem:J.list?.scrollToItem,scrollToIndex:J.list?.scrollToIndex,isLoading:()=>!1,hasNextPage:()=>!1},selection:{getSelectedItems:J.getSelectedItems,getSelectedItemIds:J.getSelectedItemIds,isItemSelected:J.isItemSelected,selectItem:J.selectItem,deselectItem:J.deselectItem,clearSelection:J.clearSelection,setSelection:J.setSelection},events:{on:J.on,off:J.off},lifecycle:{destroy:J.lifecycle?.destroy},config:{animate:$?.animate}});var BZ=(J={})=>{try{let $=x2(J);return console.log(`\uD83D\uDCCB Creating list with ${$.items?.length||0} items`),I(T,h(),S(T2($)),b1($),v1($),v(),(q)=>w2(I2(q,$))(q))($)}catch($){throw console.error("List creation error:",$),new Error(`Failed to create list: ${$.message}`)}},C1=BZ;var S2=(J={})=>{return{rail:null,drawer:null,activeSection:J.activeSection||null,activeSubsection:J.activeSubsection||null,items:J.items||{},mouseInDrawer:!1,mouseInRail:!1,hoverTimer:null,closeTimer:null,processingChange:!1,isMobile:!1,overlayElement:null,closeButtonElement:null,resizeObserver:null,outsideClickHandler:null,outsideClickHandlerSet:!1}},E1=(J={})=>{return{animateDrawer:J.animateDrawer!==!1,showLabelsOnRail:J.showLabelsOnRail!==!1,hideDrawerOnClick:J.hideDrawerOnClick||!1,expanded:J.expanded===!0,hoverDelay:J.hoverDelay||200,closeDelay:J.closeDelay||100,railOptions:J.railOptions||{},drawerOptions:J.drawerOptions||{}}},h1=(J={})=>{return{breakpoint:J.breakpoint||960,lockBodyScroll:J.lockBodyScroll!==!1,hideOnClickOutside:J.hideOnClickOutside!==!1,enableSwipeGestures:J.enableSwipeGestures!==!1,optimizeForTouch:J.optimizeForTouch!==!1,overlayClass:J.overlayClass||"mtrl-nav-overlay",closeButtonClass:J.closeButtonClass||"mtrl-nav-close-btn",bodyLockClass:J.bodyLockClass||"mtrl-body-drawer-open"}};U7();var b2=(J,$,Q,q)=>{if(!J.drawer||!$||!J.items[$])return;let j=J.items[$].items||[];if(j.length===0){q();return}let K=J.drawer.getAllItems();if(K?.length>0)K.forEach((Y)=>{J.drawer.removeItem(Y.config.id)});j.forEach((Y)=>{J.drawer.addItem(Y)}),Q()},v2=(J,$)=>{let Q=Object.keys(J.items||{}).map((Z)=>({id:Z,label:J.items[Z]?.label||Z,icon:J.items[Z]?.icon||"",active:Z===J.activeSection})),q=o9({variant:"rail",position:"left",showLabels:$.showLabelsOnRail,items:Q,...$.railOptions});return document.body.appendChild(q.element),q},C2=(J,$)=>{let Q=o9({variant:"drawer",position:"left",items:[],...$.drawerOptions});if(document.body.appendChild(Q.element),Q.element.dataset.id="drawer",!$.expanded)Q.element.classList.add("mtrl-nav--hidden"),Q.element.setAttribute("aria-hidden","true");return Q},E2=(J,$)=>{if(!J.drawer)return;if(J.drawer.element.classList.remove("mtrl-nav--hidden"),J.drawer.element.setAttribute("aria-hidden","false"),J.isMobile){if(J.overlayElement)J.overlayElement.classList.add("active"),J.overlayElement.setAttribute("aria-hidden","false");if($.lockBodyScroll)document.body.classList.add($.bodyLockClass);if(J.closeButtonElement)J.closeButtonElement.style.display="flex"}},h2=(J,$)=>{if(!J.drawer)return;if(J.drawer.element.classList.add("mtrl-nav--hidden"),J.drawer.element.setAttribute("aria-hidden","true"),J.overlayElement)J.overlayElement.classList.remove("active"),J.overlayElement.setAttribute("aria-hidden","true");if($.lockBodyScroll)document.body.classList.remove($.bodyLockClass)},u2=(J)=>{if(!J.drawer)return!1;return!J.drawer.element.classList.contains("mtrl-nav--hidden")},f2=(J,$,Q,q,Z)=>{let j=J.isMobile;if(J.isMobile=window.innerWidth<=$.breakpoint||NQ(),j!==J.isMobile){if(J.isMobile)Q();else q();if(Z.onViewChange)Z.onViewChange({mobile:J.isMobile,previousMobile:j,width:window.innerWidth})}},g2=(J)=>{if(J.overlayElement&&J.overlayElement.parentNode)J.overlayElement.parentNode.removeChild(J.overlayElement),J.overlayElement=null;if(J.rail)J.rail.destroy(),J.rail=null;if(J.drawer)J.drawer.destroy(),J.drawer=null;J.activeSection=null,J.activeSubsection=null,J.mouseInDrawer=!1,J.mouseInRail=!1,J.processingChange=!1,J.isMobile=!1},d2=(J,$,Q,q)=>{if(!$||!J.items[$])return;if(J.activeSection===$&&J.activeSubsection===Q)return;if(J.activeSection=$,J.rail)J.rail.setActive($,q);if(Q&&J.drawer)J.activeSubsection=Q,J.drawer.setActive(Q,q)};var r2=(J,$,Q,q,Z,j)=>{let K=J.rail;if(!K)return;K.on("change",(Y)=>{let G=Y?.id;if(!G||J.processingChange)return;let z=Y?.source==="userAction";if(J.processingChange=!0,J.activeSection=G,Q(G),j.onSectionChange&&z)j.onSectionChange(G,{source:z?"userClick":"programmatic"});setTimeout(()=>{J.processingChange=!1},50)}),K.on("mouseover",(Y)=>{let G=Y?.id;if(J.mouseInRail=!0,clearTimeout(J.hoverTimer),J.hoverTimer=null,G)if(J.items[G]?.items?.length>0)J.hoverTimer=window.setTimeout(()=>{Q(G)},$.hoverDelay);else J.closeTimer=window.setTimeout(()=>{if(J.mouseInRail&&!J.mouseInDrawer)Z()},$.hoverDelay)}),K.on("mouseenter",()=>{J.mouseInRail=!0,clearTimeout(J.closeTimer),J.closeTimer=null}),K.on("mouseleave",()=>{if(J.mouseInRail=!1,clearTimeout(J.hoverTimer),J.hoverTimer=null,!J.mouseInDrawer)J.closeTimer=window.setTimeout(()=>{if(!J.mouseInRail&&!J.mouseInDrawer)Z()},$.closeDelay)})},l2=(J,$,Q,q)=>{let Z=J.drawer;if(!Z)return;if(typeof Z.on==="function")Z.on("change",(j)=>{let K=j.id;if(J.activeSubsection=K,$.hideDrawerOnClick)Q();if(q.onItemSelect)q.onItemSelect(j)}),Z.on("mouseenter",()=>{J.mouseInDrawer=!0,clearTimeout(J.hoverTimer),clearTimeout(J.closeTimer),J.hoverTimer=null,J.closeTimer=null}),Z.on("mouseleave",()=>{if(J.mouseInDrawer=!1,!J.mouseInRail)J.closeTimer=window.setTimeout(()=>{if(!J.mouseInDrawer&&!J.mouseInRail)Q()},$.closeDelay)})},p2=(J,$)=>{if(window.ResizeObserver)J.resizeObserver=new ResizeObserver(()=>{$()}),J.resizeObserver.observe(document.body);else window.addEventListener("resize",$);window.addEventListener("orientationchange",()=>{setTimeout($,100)})},s2=(J,$)=>{if(J.resizeObserver)J.resizeObserver.disconnect(),J.resizeObserver=null;else window.removeEventListener("resize",$);if(window.removeEventListener("orientationchange",$),J.outsideClickHandler){let Q="ontouchend"in window?"touchend":"click";document.removeEventListener(Q,J.outsideClickHandler)}clearTimeout(J.hoverTimer),clearTimeout(J.closeTimer),J.hoverTimer=null,J.closeTimer=null};U7();var FZ=(J,$,Q)=>{if(J.overlayElement)return J.overlayElement;return J.overlayElement=document.createElement("div"),J.overlayElement.className=$.overlayClass,J.overlayElement.setAttribute("aria-hidden","true"),document.body.appendChild(J.overlayElement),J.overlayElement.addEventListener("click",(q)=>{if(q.target===J.overlayElement)Q()}),J.overlayElement},HZ=(J,$,Q)=>{if(!J.drawer||J.closeButtonElement)return null;if(J.closeButtonElement=document.createElement("button"),J.closeButtonElement.className=$.closeButtonClass,J.closeButtonElement.setAttribute("aria-label","Close navigation"),J.closeButtonElement.innerHTML=`
|
|
57
|
+
</svg>`},s6={TYPE:e$.DIAL,FORMAT:J8.AMPM,ORIENTATION:$8.VERTICAL,SHOW_SECONDS:!1,CLOSE_ON_SELECT:!0,MINUTE_STEP:1,SECOND_STEP:1,CANCEL_TEXT:"Cancel",CONFIRM_TEXT:"OK",IS_OPEN:!1,CLOCK_ICON:v6.CLOCK,KEYBOARD_ICON:v6.KEYBOARD},y1={ROOT:"time-picker",OPEN:"time-picker--open",MODAL:"time-picker-modal",DIALOG:"time-picker-dialog",DIALOG_DIAL:"time-picker-dialog--dial",DIALOG_INPUT:"time-picker-dialog--input",DIALOG_VERTICAL:"time-picker-dialog--vertical",DIALOG_HORIZONTAL:"time-picker-dialog--horizontal",DIALOG_12H:"time-picker-dialog--12h",DIALOG_24H:"time-picker-dialog--24h",TITLE:"time-picker-title",CONTENT:"time-picker-content",DIAL:"time-picker-dial",DIAL_CANVAS:"time-picker-dial-canvas",DIAL_FACE:"time-picker-dial-face",DIAL_HAND:"time-picker-dial-hand",DIAL_CENTER:"time-picker-dial-center",DIAL_NUMBERS:"time-picker-dial-numbers",DIAL_NUMBER:"time-picker-dial-number",DIAL_NUMBER_ACTIVE:"time-picker-dial-number--active",INPUT_CONTAINER:"time-picker-input-container",HOURS_INPUT:"time-picker-hours",MINUTES_INPUT:"time-picker-minutes",SECONDS_INPUT:"time-picker-seconds",SEPARATOR:"time-picker-separator",PERIOD_CONTAINER:"time-picker-period",PERIOD_AM:"time-picker-period-am",PERIOD_PM:"time-picker-period-pm",PERIOD_ACTIVE:"time-picker-period--active",ACTIONS:"time-picker-actions",TOGGLE_TYPE:"time-picker-toggle-type",CANCEL:"time-picker-cancel",CONFIRM:"time-picker-confirm"};var $Z={type:"dial",format:"12h",orientation:"vertical",showSeconds:s6.SHOW_SECONDS,closeOnSelect:s6.CLOSE_ON_SELECT,minuteStep:s6.MINUTE_STEP,secondStep:s6.SECOND_STEP,cancelText:s6.CANCEL_TEXT,confirmText:s6.CONFIRM_TEXT,isOpen:s6.IS_OPEN,clockIcon:v6.CLOCK,keyboardIcon:v6.KEYBOARD},X2=(J={})=>b($Z,J,"time-picker"),B2=(J)=>{return f(J,{tag:"div",attributes:{role:"dialog","aria-modal":"true","aria-labelledby":`${J.prefix}-time-picker-title`},className:[J.class,J.isOpen?`${J.prefix}-time-picker--open`:""],forwardEvents:{click:!0,keydown:!0},interactive:!0})};var F2=(J)=>({events:{on:($,Q)=>J.on($,Q),off:($,Q)=>J.off($,Q),emit:($,Q)=>J.emit($,Q)},lifecycle:{destroy:()=>J.lifecycle.destroy()}});var t=(J)=>{return J.toString().padStart(2,"0")},H2=(J,$)=>{try{let Q=J.split(":"),q=parseInt(Q[0],10),Z=parseInt(Q[1],10),j=Q[2]?parseInt(Q[2],10):0;if(isNaN(q)||q<0||q>23||isNaN(Z)||Z<0||Z>59||isNaN(j)||j<0||j>59)throw Error("Invalid time format");let K=q>=12?"PM":"AM";return{hours:q,minutes:Z,seconds:j,period:K}}catch(Q){console.error("Error parsing time:",Q);let q=new Date,Z=q.getHours(),j=q.getMinutes(),K=q.getSeconds(),Y=Z>=12?"PM":"AM";return{hours:Z,minutes:j,seconds:K,period:Y}}},M2=(J,$)=>{let{hours:Q,minutes:q,seconds:Z}=J;if($){if(Z!==void 0)return`${t(Q)}:${t(q)}:${t(Z)}`;return`${t(Q)}:${t(q)}`}else{let j=Q%12;if(j===0)j=12;if(Z!==void 0)return`${t(j)}:${t(q)}:${t(Z)} ${J.period}`;return`${t(j)}:${t(q)} ${J.period}`}};var k2=(J)=>{let $=J>=12?"PM":"AM",Q=J%12;if(Q===0)Q=12;return{hours:Q,period:$}};var j6={...n6,KNOB_SIZE:45,CENTER_SIZE:8,NUMBER_SIZE:24,INNER_RADIUS:75,OUTER_RADIUS:100,TRACK_WIDTH:1.5,HAND_WIDTH:2};function JZ(J){let $=document.documentElement,Q=getComputedStyle($),q=Q.getPropertyValue(`--${J}-sys-color-primary`).trim()||"#6750A4",Z=Q.getPropertyValue(`--${J}-sys-color-on-primary`).trim()||"#FFFFFF",j=Q.getPropertyValue(`--${J}-sys-color-on-surface`).trim()||"#1C1B1F",K=Q.getPropertyValue(`--${J}-sys-color-primary-rgb`).trim()||"103, 80, 164",G=`rgba(${Q.getPropertyValue(`--${J}-sys-color-on-surface-rgb`).trim()||"28, 27, 31"}, 0.05)`,z=`rgba(${K}, 0.1)`;return{primaryColor:q,onPrimaryColor:Z,onSurfaceColor:j,bgColor:G,selectedBgColor:z}}var _6=(J,$,Q)=>{let q=J.getContext("2d");if(!q){console.error("Could not get canvas context");return}let Z=JZ(Q.prefix),j=window.devicePixelRatio||1;J.width=j6.DIAMETER*j,J.height=j6.DIAMETER*j,q.scale(j,j);let K=j6.DIAMETER/2,Y=j6.DIAMETER/2,G=j6.DIAMETER/2;if(q.clearRect(0,0,J.width,J.height),q.beginPath(),q.arc(K,Y,G-2,0,2*Math.PI),q.fillStyle=Z.bgColor,q.fill(),q.beginPath(),q.arc(K,Y,j6.CENTER_SIZE/2,0,2*Math.PI),q.fillStyle=Z.primaryColor,q.fill(),Q.activeSelector==="hour")if(Q.format==="24h")qZ(q,K,Y,G,$.hours,Z);else QZ(q,K,Y,G,$.hours%12||12,Z);else if(Q.activeSelector==="minute")N2(q,K,Y,G,$.minutes,Z);else if(Q.activeSelector==="second"&&Q.showSeconds)N2(q,K,Y,G,$.seconds||0,Z);ZZ(q,K,Y,$,Q,Z)},QZ=(J,$,Q,q,Z,j)=>{let K=j6.OUTER_RADIUS;for(let Y=1;Y<=12;Y++){let G=Y/6*Math.PI-Math.PI/2,z=$+K*Math.cos(G),W=Q+K*Math.sin(G),X=Y===Z;if(X)J.beginPath(),J.arc(z,W,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill();J.font="16px Roboto, Arial, sans-serif",J.fillStyle=X?j.primaryColor:j.onSurfaceColor,J.textAlign="center",J.textBaseline="middle",J.fillText(Y.toString(),z,W+2)}},qZ=(J,$,Q,q,Z,j)=>{let K=j6.OUTER_RADIUS;for(let G=1;G<=12;G++){let z=G/6*Math.PI-Math.PI/2,W=$+K*Math.cos(z),X=Q+K*Math.sin(z),U=G===Z;if(U)J.beginPath(),J.arc(W,X,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill();J.font="16px Roboto, Arial, sans-serif",J.fillStyle=U?j.primaryColor:j.onSurfaceColor,J.textAlign="center",J.textBaseline="middle",J.fillText(G.toString(),W,X+2)}let Y=j6.INNER_RADIUS;for(let G=13;G<=24;G++){let z=G===24?0:G,W=(G-12)/6*Math.PI-Math.PI/2,X=$+Y*Math.cos(W),U=Q+Y*Math.sin(W),_=z===Z;if(_)J.beginPath(),J.arc(X,U,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill();J.font="14px Roboto, Arial, sans-serif",J.fillStyle=_?j.primaryColor:j.onSurfaceColor,J.textAlign="center",J.textBaseline="middle",J.fillText(t(z),X,U+2)}},N2=(J,$,Q,q,Z,j)=>{let K=j6.OUTER_RADIUS;for(let Y=0;Y<60;Y+=5){let G=Y/30*Math.PI-Math.PI/2,z=$+K*Math.cos(G),W=Q+K*Math.sin(G),X=Y===Z;if(X)J.beginPath(),J.arc(z,W,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill();J.font="16px Roboto, Arial, sans-serif",J.fillStyle=X?j.primaryColor:j.onSurfaceColor,J.textAlign="center",J.textBaseline="middle",J.fillText(t(Y),z,W)}if(Z%5!==0){let Y=Z/30*Math.PI-Math.PI/2,G=$+K*Math.cos(Y),z=Q+K*Math.sin(Y);J.beginPath(),J.arc(G,z,j6.NUMBER_SIZE/2,0,2*Math.PI),J.fillStyle=j.selectedBgColor,J.fill(),J.font="16px Roboto, Arial, sans-serif",J.fillStyle=j.primaryColor,J.textAlign="center",J.textBaseline="middle",J.fillText(t(Z),G,z)}},ZZ=(J,$,Q,q,Z,j)=>{let K,Y;if(Z.activeSelector==="hour")if(Z.format==="24h")if(q.hours>=12)K=(q.hours%12||12)/6*Math.PI-Math.PI/2,Y=j6.INNER_RADIUS;else{let X=q.hours;if(X===0)X=12;K=X/6*Math.PI-Math.PI/2,Y=j6.OUTER_RADIUS}else K=(q.hours%12||12)/6*Math.PI-Math.PI/2,Y=j6.OUTER_RADIUS;else if(Z.activeSelector==="minute")K=q.minutes/30*Math.PI-Math.PI/2,Y=j6.OUTER_RADIUS;else if(Z.activeSelector==="second")K=(q.seconds||0)/30*Math.PI-Math.PI/2,Y=j6.OUTER_RADIUS;else return;J.beginPath(),J.moveTo($,Q),J.lineTo($+Y*Math.cos(K),Q+Y*Math.sin(K)),J.lineWidth=j6.HAND_WIDTH,J.strokeStyle=j.primaryColor,J.stroke();let G=$+Y*Math.cos(K),z=Q+Y*Math.sin(K);J.beginPath(),J.arc(G,z,j6.KNOB_SIZE/2,0,2*Math.PI),J.fillStyle=j.primaryColor,J.fill(),J.font="16px Roboto, Arial, sans-serif",J.fillStyle=j.onPrimaryColor,J.textAlign="center",J.textBaseline="middle";let W="";if(Z.activeSelector==="hour")if(Z.format==="24h")W=t(q.hours);else W=String(q.hours%12||12);else if(Z.activeSelector==="minute")W=t(q.minutes);else if(Z.activeSelector==="second")W=t(q.seconds||0);J.fillText(W,G,z)},Q8=(J,$,Q,q)=>{let Z=j6.DIAMETER/2,j=j6.DIAMETER/2,K=$-Z,Y=Q-j,G=Math.sqrt(K*K+Y*Y),z=Math.atan2(Y,K)+Math.PI/2;if(z<0)z+=2*Math.PI;if(q.activeSelector==="hour")if(q.format==="24h"){let W=(j6.INNER_RADIUS+j6.OUTER_RADIUS)/2,X=G<W,U=Math.round(z/(Math.PI/6))%12;if(X&&U!==0)U+=12;else if(!X&&U===0)U=12;else if(X&&U===0)U=0;return U}else{let W=Math.round(z/(Math.PI/6))%12;if(W===0)W=12;return W}else if(q.activeSelector==="minute"||q.activeSelector==="second")return Math.round(z/(Math.PI/30))%60;return null};var C6=(J,$,Q,q)=>{if(J.innerHTML="",Q.title){let M=document.createElement("div");M.className=`${Q.prefix}-time-picker-title`,M.textContent=Q.title,M.id=`${Q.prefix}-time-picker-title`,J.appendChild(M)}let Z=document.createElement("div");Z.className=`${Q.prefix}-time-picker-content`,J.appendChild(Z);let j=document.createElement("div");j.className=`${Q.prefix}-time-picker-input-container`,Z.appendChild(j);let{hours:K}=Q.format==="24h"?{hours:$.hours}:k2($.hours),Y=document.createElement("div");Y.className=`${Q.prefix}-time-picker-time-input-field`;let G=document.createElement("input");G.type="number",G.className=`${Q.prefix}-time-picker-hours`,G.min=Q.format==="24h"?"0":"1",G.max=Q.format==="24h"?"23":"12",G.value=t(K),G.setAttribute("data-type","hour"),G.setAttribute("inputmode","numeric"),G.setAttribute("pattern","[0-9]*"),Y.appendChild(G),j.appendChild(Y);let z=document.createElement("div");z.className=`${Q.prefix}-time-picker-separator`,z.textContent=":",j.appendChild(z);let W=document.createElement("div");W.className=`${Q.prefix}-time-picker-time-input-field`;let X=document.createElement("input");X.type="number",X.className=`${Q.prefix}-time-picker-minutes`,X.min="0",X.max="59",X.value=t($.minutes),X.setAttribute("data-type","minute"),X.setAttribute("inputmode","numeric"),X.setAttribute("pattern","[0-9]*"),W.appendChild(X),j.appendChild(W);let U;if(Q.showSeconds){let M=document.createElement("div");M.className=`${Q.prefix}-time-picker-separator`,M.textContent=":",j.appendChild(M);let P=document.createElement("div");P.className=`${Q.prefix}-time-picker-time-input-field`,U=document.createElement("input"),U.type="number",U.className=`${Q.prefix}-time-picker-seconds`,U.min="0",U.max="59",U.value=t($.seconds||0),U.setAttribute("data-type","second"),U.setAttribute("inputmode","numeric"),U.setAttribute("pattern","[0-9]*");let R=document.createElement("label");R.className=`${Q.prefix}-time-picker-input-label`,R.textContent="Second",P.appendChild(U),P.appendChild(R),j.appendChild(P)}if(Q.format==="12h"){let M=document.createElement("div");M.className=`${Q.prefix}-time-picker-period`;let P=document.createElement("div");P.className=`${Q.prefix}-time-picker-period-am ${$.period==="AM"?`${Q.prefix}-time-picker-period--selected`:""}`,P.textContent="AM",P.setAttribute("role","button"),P.setAttribute("tabindex","0"),P.setAttribute("aria-pressed",$.period==="AM"?"true":"false");let R=document.createElement("div");R.className=`${Q.prefix}-time-picker-period-pm ${$.period==="PM"?`${Q.prefix}-time-picker-period--selected`:""}`,R.textContent="PM",R.setAttribute("role","button"),R.setAttribute("tabindex","0"),R.setAttribute("aria-pressed",$.period==="PM"?"true":"false"),M.appendChild(P),M.appendChild(R),j.appendChild(M)}let _=document.createElement("div");_.className=`${Q.prefix}-time-picker-dial`,_.style.display=Q.type==="dial"?"block":"none",Z.appendChild(_);let N=document.createElement("canvas");N.className=`${Q.prefix}-time-picker-dial-canvas`,N.width=n6.DIAMETER,N.height=n6.DIAMETER,N.style.width=`${n6.DIAMETER}px`,N.style.height=`${n6.DIAMETER}px`,_.appendChild(N);let F=document.createElement("div");F.className=`${Q.prefix}-time-picker-actions`,J.appendChild(F);let k=document.createElement("button");k.className=`${Q.prefix}-time-picker-toggle-type`,k.setAttribute("aria-label",Q.type==="dial"?"Switch to keyboard input":"Switch to dial selector"),k.innerHTML=Q.type==="dial"?Q.keyboardIcon||v6.KEYBOARD:Q.clockIcon||v6.CLOCK,F.appendChild(k);let L=document.createElement("div");L.className=`${Q.prefix}-time-picker-action-buttons`,F.appendChild(L);let D=document.createElement("button");D.className=`${Q.prefix}-time-picker-cancel`,D.textContent=Q.cancelText||"Cancel",D.setAttribute("type","button"),L.appendChild(D);let B=document.createElement("button");B.className=`${Q.prefix}-time-picker-confirm`,B.textContent=Q.confirmText||"OK",B.setAttribute("type","button"),L.appendChild(B);let H="hour";if(Q.type==="dial")setTimeout(()=>{_6(N,$,{type:Q.type,format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})},0);k.addEventListener("click",()=>{if(_.style.display==="none")_.style.display="block",k.innerHTML=Q.keyboardIcon||v6.KEYBOARD,k.setAttribute("aria-label","Switch to keyboard input"),setTimeout(()=>{N.focus(),document.querySelectorAll(`.${Q.prefix}-time-picker-hours`).forEach((y)=>y.setAttribute("data-active","true")),document.querySelectorAll(`.${Q.prefix}-time-picker-minutes`).forEach((y)=>y.setAttribute("data-active","false")),document.querySelectorAll(`.${Q.prefix}-time-picker-seconds`).forEach((y)=>y.setAttribute("data-active","false")),_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:"hour"})},50);else _.style.display="none",k.innerHTML=Q.clockIcon||v6.CLOCK,k.setAttribute("aria-label","Switch to dial selector"),setTimeout(()=>{G.focus(),G.select()},50)});let V=(M)=>{let P=M.target,R=P.getAttribute("data-type"),y=P.value;if(y==="")return;let x=parseInt(y,10);if(isNaN(x))return;if(R==="hour"){let A=x;if(Q.format==="12h"){if(x<0)A=1;if(x>12)A=12;if($.period==="PM"&&A!==12)A+=12;else if($.period==="AM"&&A===12)A=0}else{if(x<0)A=0;if(x>23)A=23}if($.hours=A,H="hour",G.setAttribute("data-active","true"),X.setAttribute("data-active","false"),U)U.setAttribute("data-active","false");if(_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H}),q)q("hours",A)}else if(R==="minute"){let A=x;if(x<0)A=0;if(x>59)A=59;if($.minutes=A,H="minute",G.setAttribute("data-active","false"),X.setAttribute("data-active","true"),U)U.setAttribute("data-active","false");if(_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H}),q)q("minutes",A)}else if(R==="second"){let A=x;if(x<0)A=0;if(x>59)A=59;if($.seconds=A,H="second",G.setAttribute("data-active","false"),X.setAttribute("data-active","false"),U)U.setAttribute("data-active","true");if(_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H}),q)q("seconds",A)}};if(G.addEventListener("input",V),X.addEventListener("input",V),U)U.addEventListener("input",V);if(G.addEventListener("keyup",(M)=>{if(M.key==="Enter")X.focus(),X.select()}),X.addEventListener("keyup",(M)=>{if(M.key==="Enter")if(Q.showSeconds&&U)U.focus(),U.select();else B.focus()}),U)U.addEventListener("keyup",(M)=>{if(M.key==="Enter")B.focus()});let O=(M)=>{if($.period!==M){let P=$.period;if($.period=M,P==="AM"&&M==="PM"){if($.hours<12)$.hours+=12}else if(P==="PM"&&M==="AM"){if($.hours>=12)$.hours-=12}if(Q.format==="12h"){let y=$.hours===0?12:$.hours>12?$.hours-12:$.hours;G.value=t(y)}document.querySelectorAll(`.${Q.prefix}-time-picker-period-am, .${Q.prefix}-time-picker-period-pm`).forEach((y)=>{y.classList.remove(`${Q.prefix}-time-picker-period--selected`),y.setAttribute("aria-pressed","false")});let R=document.querySelector(`.${Q.prefix}-time-picker-period-${M.toLowerCase()}`);if(R)R.classList.add(`${Q.prefix}-time-picker-period--selected`),R.setAttribute("aria-pressed","true");if(_.style.display==="block")_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H});if(q)q("hours",$.hours)}};if(Q.format==="12h"){let M=document.querySelector(`.${Q.prefix}-time-picker-period-am`),P=document.querySelector(`.${Q.prefix}-time-picker-period-pm`);if(M)M.addEventListener("click",()=>{O("AM")});if(P)P.addEventListener("click",()=>{O("PM")})}if(Q.type==="dial"||_.style.display==="block"){if(N.addEventListener("click",(M)=>{let P=N.getBoundingClientRect(),R=M.clientX-P.left,y=M.clientY-P.top,x=Q8(N,R,y,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H});if(x!==null){if(H==="hour"){let A=x;if(Q.format==="12h"){if($.period==="PM"&&x!==12)A+=12;else if($.period==="AM"&&x===12)A=0}if($.hours=A,Q.format==="12h"){let C=A===0?12:A>12?A-12:A;G.value=t(C)}else G.value=t(A);if(q)q("hours",A)}else if(H==="minute"){if($.minutes=x,X.value=t(x),q)q("minutes",x)}else if(H==="second"&&U){if($.seconds=x,U.value=t(x),q)q("seconds",x)}_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})}}),G.addEventListener("click",()=>{if(_.style.display==="block"){if(H="hour",G.setAttribute("data-active","true"),X.setAttribute("data-active","false"),U)U.setAttribute("data-active","false");_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})}}),X.addEventListener("click",()=>{if(_.style.display==="block"){if(H="minute",G.setAttribute("data-active","false"),X.setAttribute("data-active","true"),U)U.setAttribute("data-active","false");_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})}}),U)U.addEventListener("click",()=>{if(_.style.display==="block")H="second",G.setAttribute("data-active","false"),X.setAttribute("data-active","false"),U.setAttribute("data-active","true"),_6(N,$,{type:"dial",format:Q.format,showSeconds:Q.showSeconds,prefix:Q.prefix,activeSelector:H})})}};var L2=(J,$,Q,q,Z,j)=>{let K=!!Z.isOpen,Y=(X)=>{if(X.key==="Escape")z.close(),j.events.emit(N6.CANCEL)},G=(X)=>{if(X.target===$)z.close()},z={element:J.element,modalElement:$,dialogElement:Q,isOpen:K,open(){if(K)return this;if($.style.display="block",$.offsetWidth,$.classList.add("active"),Q.classList.add("active"),document.addEventListener("keydown",Y),$.addEventListener("click",G),K=!0,J.element.classList.add(`${Z.prefix}-time-picker--open`),setTimeout(()=>{C6(Q,q,Z)},50),j.events.emit(N6.OPEN),Z.onOpen)Z.onOpen();return this},close(){if(!K)return this;if($.classList.remove("active"),Q.classList.remove("active"),setTimeout(()=>{$.style.display="none"},300),document.removeEventListener("keydown",Y),$.removeEventListener("click",G),K=!1,J.element.classList.remove(`${Z.prefix}-time-picker--open`),j.events.emit(N6.CLOSE),Z.onClose)Z.onClose();return this},toggle(){return K?this.close():this.open()},getValue(){return M2(q,Z.format==="24h")},getTimeObject(){return{...q}},setValue(X){try{let U=X.split(":"),_=parseInt(U[0],10),N=parseInt(U[1],10),F=U[2]?parseInt(U[2],10):0;if(isNaN(_)||_<0||_>23||isNaN(N)||N<0||N>59||isNaN(F)||F<0||F>59)throw Error("Invalid time format. Use HH:MM or HH:MM:SS (24-hour format).");if(q.hours=_,q.minutes=N,q.seconds=F,q.period=_>=12?"PM":"AM",C6(Q,q,Z),j.events.emit(N6.CHANGE,this.getValue()),Z.onChange)Z.onChange(this.getValue())}catch(U){console.error("Error setting time value:",U)}return this},setType(X){if(Z.type===X)return this;return Z.type=X,Q.classList.remove(`${Z.prefix}-time-picker-dialog--${"dial"}`,`${Z.prefix}-time-picker-dialog--${"input"}`),Q.classList.add(`${Z.prefix}-time-picker-dialog--${X}`),C6(Q,q,Z),this},getType(){return Z.type},setFormat(X){if(Z.format===X)return this;if(Z.format=X,Q.classList.remove(`${Z.prefix}-time-picker-dialog--${"12h"}`,`${Z.prefix}-time-picker-dialog--${"24h"}`),Q.classList.add(`${Z.prefix}-time-picker-dialog--${X}`),X==="24h")q.period=q.hours>=12?"PM":"AM";else q.period=q.hours>=12?"PM":"AM";return C6(Q,q,Z),j.events.emit(N6.CHANGE,this.getValue()),this},getFormat(){return Z.format},setOrientation(X){if(Z.orientation===X)return this;return Z.orientation=X,Q.classList.remove(`${Z.prefix}-time-picker-dialog--${"vertical"}`,`${Z.prefix}-time-picker-dialog--${"horizontal"}`),Q.classList.add(`${Z.prefix}-time-picker-dialog--${X}`),C6(Q,q,Z),this},getOrientation(){return Z.orientation},setTitle(X){Z.title=X;let U=Q.querySelector(e.TITLE);if(U)U.textContent=X;else C6(Q,q,Z);return this},getTitle(){return Z.title||""},destroy(){if(K)this.close();if($&&$.parentNode)$.parentNode.removeChild($);j.lifecycle.destroy()},on(X,U){return j.events.on(X,U),this},off(X,U){return j.events.off(X,U),this}};Q.addEventListener("click",(X)=>{let U=X.target;if(U.closest(e.CANCEL_BUTTON)){if(z.close(),j.events.emit(N6.CANCEL),Z.onCancel)Z.onCancel()}if(U.closest(e.CONFIRM_BUTTON)){if(z.close(),j.events.emit(N6.CONFIRM,z.getValue()),Z.onConfirm)Z.onConfirm(z.getValue())}if(U.closest(e.TOGGLE_TYPE_BUTTON)){let _=Z.type==="dial"?"input":"dial";z.setType(_)}if(U.closest(e.PERIOD_AM)){if(q.period!=="AM"){if(q.period="AM",q.hours>=12)q.hours-=12;if(C6(Q,q,Z),j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}if(U.closest(e.PERIOD_PM)){if(q.period!=="PM"){if(q.period="PM",q.hours<12)q.hours+=12;if(C6(Q,q,Z),j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}if(U.closest(e.DIAL_CANVAS)){if(Z.type==="dial"){let _=U,N=_.getBoundingClientRect(),F=X.clientX-N.left,k=X.clientY-N.top,L="hour",D=Q.querySelector(e.HOURS_INPUT),B=Q.querySelector(e.MINUTES_INPUT),H=Q.querySelector(e.SECONDS_INPUT);if(D&&D.getAttribute("data-active")==="true")L="hour";else if(B&&B.getAttribute("data-active")==="true")L="minute";else if(Z.showSeconds&&H&&H.getAttribute("data-active")==="true")L="second";let V=Q8(_,F,k,{type:Z.type,format:Z.format,showSeconds:Z.showSeconds,prefix:Z.prefix,activeSelector:L});if(V!==null){if(L==="hour"){let O=V;if(Z.format==="12h"){if(q.period==="PM"&&V!==12)O+=12;else if(q.period==="AM"&&V===12)O=0}if(q.hours!==O){q.hours=O;let M=D;if(M)M.textContent=t(Z.format==="24h"?O:O%12||12);let P=Q.querySelector(e.DIAL_CANVAS);if(P)_6(P,q,{type:Z.type,format:Z.format,showSeconds:Z.showSeconds,prefix:Z.prefix,activeSelector:L});if(j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}else if(L==="minute"){if(q.minutes!==V){q.minutes=V;let O=B;if(O)O.textContent=t(V);let M=Q.querySelector(e.DIAL_CANVAS);if(M)_6(M,q,{type:Z.type,format:Z.format,showSeconds:Z.showSeconds,prefix:Z.prefix,activeSelector:L});if(j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}else if(L==="second"&&Z.showSeconds){if(q.seconds!==V){q.seconds=V;let O=H;if(O)O.textContent=t(V);let M=Q.querySelector(e.DIAL_CANVAS);if(M)_6(M,q,{type:Z.type,format:Z.format,showSeconds:Z.showSeconds,prefix:Z.prefix,activeSelector:L});if(j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())}}}}}});let W=(X)=>{let U=X.target,_=U.getAttribute("data-type"),N=parseInt(U.value,10);if(isNaN(N))return;if(_==="hour"){let F=N;if(Z.format==="12h"){if(N<1)F=12;if(N>12)F=1;if(q.period==="PM"&&F!==12)F+=12;else if(q.period==="AM"&&F===12)F=0}else{if(N<0)F=0;if(N>23)F=23}q.hours=F}else if(_==="minute"){let F=N;if(F<0)F=0;if(F>59)F=59;q.minutes=F}else if(_==="second"){let F=N;if(F<0)F=0;if(F>59)F=59;q.seconds=F}if(C6(Q,q,Z),j.events.emit(N6.CHANGE,z.getValue()),Z.onChange)Z.onChange(z.getValue())};return Q.addEventListener("change",(X)=>{let U=X.target;if(U.matches(e.HOURS_INPUT)||U.matches(e.MINUTES_INPUT)||U.matches(e.SECONDS_INPUT))W(X)}),Q.addEventListener("keyup",(X)=>{let U=X.target;if(U.matches(e.HOURS_INPUT)||U.matches(e.MINUTES_INPUT)||U.matches(e.SECONDS_INPUT)){if(X.key==="Enter"){if(W(X),U.matches(e.HOURS_INPUT)){let _=Q.querySelector(e.MINUTES_INPUT);if(_)_.focus()}else if(U.matches(e.MINUTES_INPUT))if(Z.showSeconds){let _=Q.querySelector(e.SECONDS_INPUT);if(_)_.focus()}else{let _=Q.querySelector(e.CONFIRM_BUTTON);if(_)_.focus()}else if(U.matches(e.SECONDS_INPUT)){let _=Q.querySelector(e.CONFIRM_BUTTON);if(_)_.focus()}}}}),z};var jZ=(J={})=>{let $=X2(J);try{let Q=I(T,h(),S(B2($)),v())($),q=document.createElement("div");q.className=`${u}-time-picker-modal`,q.style.display="none",q.style.position="fixed",q.style.top="0",q.style.left="0",q.style.width="100%",q.style.height="100%",q.style.backgroundColor="rgba(0, 0, 0, 0.4)",q.style.zIndex=K7.MODAL.toString(),q.setAttribute("role","presentation");let Z=document.createElement("div");Z.className=[`${u}-time-picker-dialog`,`${u}-time-picker-dialog--${$.type}`,`${u}-time-picker-dialog--${$.orientation}`,`${u}-time-picker-dialog--${$.format}`].join(" "),Z.style.position="absolute",Z.style.top="50%",Z.style.left="50%",Z.style.transform="translate(-50%, -50%)",Z.style.zIndex=K7.DIALOG.toString(),q.appendChild(Z),(typeof $.container==="string"?document.querySelector($.container)||document.body:$.container||document.body).appendChild(q);let K;if($.value)K=H2($.value,$.format);else{let G=new Date;K={hours:G.getHours(),minutes:G.getMinutes(),seconds:$.showSeconds?G.getSeconds():0,period:G.getHours()>=12?"PM":"AM"}}C6(Z,K,$);let Y=L2(Q,q,Z,K,$,F2(Q));if($.isOpen)setTimeout(()=>Y.open(),0);return Y}catch(Q){throw console.error("TimePicker creation error:",Q),Error(`Failed to create time picker: ${Q.message}`)}},A1=jZ;n();m();var q8={SMALL:"small",MEDIUM:"medium",LARGE:"large",CENTER:"center"},w1={DEFAULT:"default",SCROLLED:"scrolled",FIXED:"fixed"},K9={TAG:"header",TYPE:q8.SMALL,SCROLLABLE:!0,COMPRESSIBLE:!0,SCROLL_THRESHOLD:4},x1={ROOT:"top-app-bar",SMALL:"top-app-bar--small",MEDIUM:"top-app-bar--medium",LARGE:"top-app-bar--large",CENTER:"top-app-bar--center",SCROLLED:"top-app-bar--scrolled",FIXED:"top-app-bar--fixed",ROW:"top-app-bar-row",SECTION:"top-app-bar-section",SECTION_LEADING:"top-app-bar-section--leading",SECTION_HEADLINE:"top-app-bar-section--headline",SECTION_TRAILING:"top-app-bar-section--trailing",TITLE:"top-app-bar-title"};var KZ={tag:K9.TAG,type:K9.TYPE,scrollable:K9.SCROLLABLE,compressible:K9.COMPRESSIBLE,scrollThreshold:K9.SCROLL_THRESHOLD},V2=(J={})=>b(KZ,J,"top-app-bar");var _2=(J={})=>{let $=V2(J),Q=T($),q=()=>{let F=document.createElement("div");F.className=`${Q.getClass("top-app-bar")}-leading`;let k=document.createElement("h1");if(k.className=`${Q.getClass("top-app-bar")}-headline`,$.title)k.textContent=$.title;let L=document.createElement("div");return L.className=`${Q.getClass("top-app-bar")}-trailing`,{leadingContainer:F,headlineElement:k,trailingContainer:L}},{leadingContainer:Z,headlineElement:j,trailingContainer:K}=q(),Y=()=>{let F=[$.class];if($.type!=="small")F.push(`${Q.getClass("top-app-bar")}--${$.type}`);if($.compressible&&($.type==="medium"||$.type==="large"))F.push(`${Q.getClass("top-app-bar")}--compressible`);return F.filter(Boolean)},G=S({tag:$.tag,componentName:"top-app-bar",className:Y(),attributes:{role:"banner","aria-label":"Top app bar"},interactive:!0})(Q),z=h()(G),W=v()(z);(()=>{if($.type==="medium"||$.type==="large"){let F=document.createElement("div");F.className=`${Q.getClass("top-app-bar")}-row`,F.appendChild(Z),F.appendChild(K);let k=document.createElement("div");k.className=`${Q.getClass("top-app-bar")}-row`,k.appendChild(j),W.element.appendChild(F),W.element.appendChild(k)}else W.element.appendChild(Z),W.element.appendChild(j),W.element.appendChild(K)})();let U=!1;if($.scrollable){let F=()=>{let L=window.scrollY>$.scrollThreshold;if(U!==L){if(U=L,U)W.element.classList.add(`${Q.getClass("top-app-bar")}--scrolled`);else W.element.classList.remove(`${Q.getClass("top-app-bar")}--scrolled`);$.onScroll?.(U)}};window.addEventListener("scroll",F,{passive:!0}),F();let k=W.lifecycle.destroy;W.lifecycle.destroy=()=>{window.removeEventListener("scroll",F),k()}}let _=(F)=>{while(W.element.firstChild)W.element.removeChild(W.element.firstChild);if(["small","medium","large","center"].forEach((k)=>{W.element.classList.remove(`${Q.getClass("top-app-bar")}--${k}`)}),F!=="small")W.element.classList.add(`${Q.getClass("top-app-bar")}--${F}`);if(W.element.classList.toggle(`${Q.getClass("top-app-bar")}--compressible`,$.compressible&&(F==="medium"||F==="large")),F==="medium"||F==="large"){let k=document.createElement("div");k.className=`${Q.getClass("top-app-bar")}-row`,k.appendChild(Z),k.appendChild(K);let L=document.createElement("div");L.className=`${Q.getClass("top-app-bar")}-row`,L.appendChild(j),W.element.appendChild(k),W.element.appendChild(L)}else W.element.appendChild(Z),W.element.appendChild(j),W.element.appendChild(K)};return{...W,setTitle(F){return j.textContent=F,this},getTitle(){return j.textContent||""},addLeadingElement(F){return Z.appendChild(F),this},addTrailingElement(F){return K.appendChild(F),this},setType(F){return $.type=F,_(F),this},setScrollState(F){if(U=F,F)this.element.classList.add(`${Q.getClass("top-app-bar")}--scrolled`);else this.element.classList.remove(`${Q.getClass("top-app-bar")}--scrolled`);return this},getHeadlineElement(){return j},getLeadingContainer(){return Z},getTrailingContainer(){return K}}};var D2=_2;w6();n();s();c();var D6={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOP_START:"top-start",TOP_END:"top-end",RIGHT_START:"right-start",RIGHT_END:"right-end",BOTTOM_START:"bottom-start",BOTTOM_END:"bottom-end",LEFT_START:"left-start",LEFT_END:"left-end"};var O2=8;var P2=({lifecycle:J})=>($)=>{let Q=null,q=D6.BOTTOM,Z=!1,j=null,K=null,Y=300,G=100,z=!0,W=!0,X=document.createElement("div");X.className=`${$.getClass("tooltip")}__arrow`,$.element.appendChild(X),document.body.appendChild($.element),$.element.setAttribute("aria-hidden","true");let U=()=>{if(!Q)return{top:0,left:0};let O=$.element.getBoundingClientRect(),M=Q.getBoundingClientRect(),P=window.scrollY||window.pageYOffset,R=window.scrollX||window.pageXOffset,y=O2,x=0,A=0,C;switch(q){case D6.TOP:x=M.top+P-O.height-y,A=M.left+R+M.width/2-O.width/2,C="bottom";break;case D6.TOP_START:x=M.top+P-O.height-y,A=M.left+R,C="bottom-start";break;case D6.TOP_END:x=M.top+P-O.height-y,A=M.left+R+M.width-O.width,C="bottom-end";break;case D6.RIGHT:x=M.top+P+M.height/2-O.height/2,A=M.left+R+M.width+y,C="left";break;case D6.RIGHT_START:x=M.top+P,A=M.left+R+M.width+y,C="left-start";break;case D6.RIGHT_END:x=M.top+P+M.height-O.height,A=M.left+R+M.width+y,C="left-end";break;case D6.BOTTOM:x=M.top+P+M.height+y,A=M.left+R+M.width/2-O.width/2,C="top";break;case D6.BOTTOM_START:x=M.top+P+M.height+y,A=M.left+R,C="top-start";break;case D6.BOTTOM_END:x=M.top+P+M.height+y,A=M.left+R+M.width-O.width,C="top-end";break;case D6.LEFT:x=M.top+P+M.height/2-O.height/2,A=M.left+R-O.width-y,C="right";break;case D6.LEFT_START:x=M.top+P,A=M.left+R-O.width-y,C="right-start";break;case D6.LEFT_END:x=M.top+P+M.height-O.height,A=M.left+R-O.width-y,C="right-end";break;default:x=M.top+P+M.height+y,A=M.left+R+M.width/2-O.width/2,C="top"}let r=window.innerWidth;if(A<0)A=0;else if(A+O.width>r)A=r-O.width;return{top:x,left:A,arrowPosition:C}},_=(O)=>{if(W)O.addEventListener("mouseenter",F),O.addEventListener("mouseleave",k);if(z)O.addEventListener("focus",L),O.addEventListener("blur",D)},N=(O)=>{if(O)O.removeEventListener("mouseenter",F),O.removeEventListener("mouseleave",k),O.removeEventListener("focus",L),O.removeEventListener("blur",D)},F=()=>B.show(),k=()=>B.hide(),L=()=>B.show(),D=()=>B.hide(),B={element:$.element,target:Q,lifecycle:J,getClass:$.getClass,setText(O){let M=document.createTextNode(O);while($.element.firstChild!==X)$.element.removeChild($.element.firstChild);if($.element.insertBefore(M,X),Z)this.updatePosition();return this},getText(){let O=$.element.cloneNode(!0),M=O.querySelector(`.${$.getClass("tooltip")}__arrow`);if(M)M.remove();return O.textContent||""},setPosition(O){q=O;let M=$.getClass("tooltip"),P=Object.values(D6).map((R)=>`${M}--${R}`);if($.element.classList.remove(...P),$.element.classList.add(`${M}--${O}`),Z)this.updatePosition();return this},getPosition(){return q},setTarget(O){if(Q)N(Q);if(Q=O,this.target=O,Q.setAttribute("aria-describedby",$.element.id),_(Q),Z)this.updatePosition();return this},show(O=!1){if(j!==null)window.clearTimeout(j),j=null;if(K!==null)window.clearTimeout(K),K=null;let M=()=>{if(!Q)return this;$.element.setAttribute("aria-hidden","false"),$.element.classList.add(`${$.getClass("tooltip")}--visible`),Z=!0,this.updatePosition(),window.addEventListener("resize",H),window.addEventListener("scroll",V)};if(O)M();else j=window.setTimeout(M,Y);return this},hide(O=!1){if(K!==null)window.clearTimeout(K),K=null;if(j!==null)window.clearTimeout(j),j=null;let M=()=>{$.element.setAttribute("aria-hidden","true"),$.element.classList.remove(`${$.getClass("tooltip")}--visible`),Z=!1,window.removeEventListener("resize",H),window.removeEventListener("scroll",V)};if(O)M();else K=window.setTimeout(M,G);return this},isVisible(){return Z},updatePosition(){if(!Q)return this;let{top:O,left:M,arrowPosition:P}=U();if($.element.style.top=`${Math.round(O)}px`,$.element.style.left=`${Math.round(M)}px`,P)X.className=`${$.getClass("tooltip")}__arrow`,X.classList.add(`${$.getClass("tooltip")}__arrow--${P}`);return this},destroy(){if(j!==null)window.clearTimeout(j);if(K!==null)window.clearTimeout(K);if(Q)N(Q),Q.removeAttribute("aria-describedby");if(window.removeEventListener("resize",H),window.removeEventListener("scroll",V),$.element.parentNode)$.element.parentNode.removeChild($.element);J.destroy()}},H=()=>{B.updatePosition()},V=()=>{B.updatePosition()};return B};m();var Z8={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",TOP_START:"top-start",TOP_END:"top-end",RIGHT_START:"right-start",RIGHT_END:"right-end",BOTTOM_START:"bottom-start",BOTTOM_END:"bottom-end",LEFT_START:"left-start",LEFT_END:"left-end"},j8={DEFAULT:"default",RICH:"rich",PLAIN:"plain"},T1={SHOW:"show",HIDE:"hide",ENTER:"enter",LEAVE:"leave"},E6={POSITION:Z8.BOTTOM,VARIANT:j8.DEFAULT,VISIBLE:!1,SHOW_DELAY:300,HIDE_DELAY:100,OFFSET:8,ARROW_SIZE:8,SHOW_ON_FOCUS:!0,SHOW_ON_HOVER:!0,RICH:!1},I1={ROOT:"tooltip",CONTAINER:"tooltip-container",ARROW:"tooltip-arrow",CONTENT:"tooltip-content",VISIBLE:"tooltip--visible",HIDDEN:"tooltip--hidden",DEFAULT:"tooltip--default",RICH:"tooltip--rich",PLAIN:"tooltip--plain",POSITION_PREFIX:"tooltip--"};var YZ={position:E6.POSITION,variant:E6.VARIANT,visible:E6.VISIBLE,showDelay:E6.SHOW_DELAY,hideDelay:E6.HIDE_DELAY,showOnFocus:E6.SHOW_ON_FOCUS,showOnHover:E6.SHOW_ON_HOVER,rich:E6.RICH},R2=(J={})=>b(YZ,J,"tooltip"),y2=(J)=>{let $={role:"tooltip","aria-hidden":"true"};if(J.zIndex!==void 0)$.style=`z-index: ${J.zIndex};`;return f(J,{tag:"div",attributes:$,className:[J.class,`${J.prefix}-tooltip--${J.position}`,`${J.prefix}-tooltip--${J.variant}`],text:J.text||""})},A2=(J)=>({lifecycle:{destroy:()=>J.lifecycle.destroy()}});var GZ=()=>{return`${u}-tooltip-${Math.random().toString(36).substring(2,9)}`},zZ=(J={})=>{let $=R2(J);try{let Q=I(T,S(y2($)),v(),(q)=>P2(A2(q))(q))($);if(Q.element.id=GZ(),$.target)Q.setTarget($.target);if($.text)Q.setText($.text);if($.visible)Q.show(!0);return Q}catch(Q){throw console.error("Tooltip creation error:",Q),Error(`Failed to create tooltip: ${Q.message}`)}},S1=zZ;M7();w9();s();c();var WZ=(J)=>($)=>{if(!$.element)return console.warn("Cannot initialize list renderer: missing element"),$;let Q=J.items||[],q=J.renderItem,Z=document.createElement("div");Z.className="mtrl-list-content",Z.setAttribute("role","list"),$.element.appendChild(Z);function j(z,W){let X=document.createElement("div");X.className=q6.ITEM,X.setAttribute("role","listitem");let U=document.createElement("div");U.className="mtrl-list-item-content";let _=document.createElement("div");return _.className="mtrl-list-item-text",_.textContent=z.text||z.title||z.headline||z.name||z.id||String(z),U.appendChild(_),X.appendChild(U),X}let K=()=>{if(Z.innerHTML="",!Q||Q.length===0){Z.innerHTML='<div class="mtrl-list-empty">No items</div>';return}let z=document.createDocumentFragment();Q.forEach((W,X)=>{if(W==null)return;let U=q?q(W,X):j(W,X);if(!U)return;if(!U.classList.contains(q6.ITEM))U.classList.add(q6.ITEM);if(!U.hasAttribute("role"))U.setAttribute("role","listitem");let _=W?.id||String(X);if(!U.hasAttribute("data-id"))U.setAttribute("data-id",_);z.appendChild(U)}),Z.appendChild(z),$.emit?.(Y9.LOAD,{items:Q,loading:!1,hasNext:!1,hasPrev:!1,component:$}),console.log(`\uD83D\uDCCB Rendered ${Q.length} items directly`)},Y=(z,W="start",X=!1)=>{let U=Z.querySelector(`[data-id="${z}"]`);if(U)U.scrollIntoView({behavior:X?"smooth":"auto",block:W==="center"?"center":W==="end"?"end":"start"})},G=(z,W="start",X=!1)=>{if(z<0||z>=Q.length)return;let U=Z.children[z];if(U)U.scrollIntoView({behavior:X?"smooth":"auto",block:W==="center"?"center":W==="end"?"end":"start"})};if(K(),$.lifecycle?.destroy){let z=$.lifecycle.destroy;$.lifecycle.destroy=()=>{Z.innerHTML="",z()}}return{...$,list:{getItems:()=>Q,getAllItems:()=>Q,getVisibleItems:()=>Q,refresh:K,scrollToItem:Y,scrollToIndex:G,loadNext:()=>Promise.resolve({hasNext:!1,items:[]}),loadPage:()=>Promise.resolve({hasNext:!1,items:[]}),loadPrevious:()=>Promise.resolve({hasPrev:!1,items:[]}),scrollNext:()=>Promise.resolve({hasNext:!1,items:[]}),scrollPrevious:()=>Promise.resolve({hasPrev:!1,items:[]}),scrollToItemById:(z,W,X)=>{return Y(z,W,X),Promise.resolve()},onCollectionChange:()=>()=>{},onPageChange:()=>()=>{},getCurrentPage:()=>1,getPageSize:()=>Q.length,getCollection:()=>null,isApiMode:()=>!1,isLoading:()=>!1,hasNextPage:()=>!1}}},b1=WZ;p9();y7();var UZ=(J)=>($)=>{if(!$.element||!J.trackSelection)return{...$,getSelectedItems:()=>[],getSelectedItemIds:()=>[],isItemSelected:()=>!1,selectItem:()=>$,deselectItem:()=>$,clearSelection:()=>$,setSelection:()=>$};let Q=new Set;if(Array.isArray(J.initialSelection))J.initialSelection.forEach((K)=>Q.add(String(K)));if(Array.isArray(J.items))J.items.forEach((K,Y)=>{if(K?.selected){let G=K.id||String(Y);Q.add(String(G))}});let q=()=>{($.element?.querySelectorAll("[data-id]")||[]).forEach((Y)=>{let G=Y.getAttribute("data-id"),z=Q.has(G);if(z&&!m6(Y,q6.SELECTED))p(Y,q6.SELECTED);else if(!z&&m6(Y,q6.SELECTED))K6(Y,q6.SELECTED)})},Z=(K)=>{let Y=K.target.closest("[data-id]");if(!Y)return;let G=Y.getAttribute("data-id");if(!G)return;let z=$.list?.getItems()||[],W=z.find((U)=>String(U?.id)===G);if(!W){let U=parseInt(G,10);if(!isNaN(U)&&U>=0&&U<z.length)W=z[U]}if(!W){console.warn(`Item not found for ID: ${G}`);return}let X={item:W,element:Y,originalEvent:K,component:$,preventDefault:()=>{X.defaultPrevented=!0},defaultPrevented:!1};if($.emit?.(Y9.SELECT,X),X.defaultPrevented)return;if(J.multiSelect)if(Q.has(G))Q.delete(G),K6(Y,q6.SELECTED);else Q.add(G),p(Y,q6.SELECTED);else{let U=m6(Y,q6.SELECTED);if($.element.querySelectorAll(`.${u}-${q6.SELECTED}`).forEach((N)=>K6(N,q6.SELECTED)),Q.clear(),!U)Q.add(G),p(Y,q6.SELECTED)}},j=(K,Y)=>{let G=String(K);if(Y)Q.add(G);else Q.delete(G);let z=$.element.querySelector(`[data-id="${G}"]`);if(z){if(Y&&!m6(z,q6.SELECTED))p(z,q6.SELECTED);else if(!Y&&m6(z,q6.SELECTED))K6(z,q6.SELECTED)}};if($.element.addEventListener("click",Z),setTimeout(q,10),$.lifecycle?.destroy){let K=$.lifecycle.destroy;$.lifecycle.destroy=()=>{$.element.removeEventListener("click",Z),K()}}return{...$,getSelectedItems:()=>{return($.list?.getItems()||[]).filter((Y,G)=>{let z=Y?.id||String(G);return Q.has(String(z))})},getSelectedItemIds:()=>Array.from(Q),isItemSelected:(K)=>Q.has(String(K)),selectItem:(K)=>{return j(K,!0),$},deselectItem:(K)=>{return j(K,!1),$},clearSelection:()=>{if(Q.size>0)Q.clear(),$.element.querySelectorAll(`.${u}-${q6.SELECTED}`).forEach((K)=>K6(K,q6.SELECTED));return $},setSelection:(K)=>{if(Q.clear(),Array.isArray(K))K.forEach((Y)=>Q.add(String(Y)));return q(),$}}},v1=UZ;var w2=({list:J,selection:$,events:Q,lifecycle:q,config:Z})=>(j)=>({...j,element:j.element,refresh:async()=>{return J.refresh(),j},getAllItems:()=>J.getAllItems(),getVisibleItems:()=>J.getVisibleItems(),scrollToItem:(K,Y,G)=>{let z=G!==void 0?G:Z?.animate||!1;return J.scrollToItem(K,Y,z),j},scrollToIndex:async(K,Y,G)=>{let z=G!==void 0?G:Z?.animate||!1;return J.scrollToIndex(K,Y,z),j},isLoading:()=>J.isLoading(),hasNextPage:()=>J.hasNextPage(),getSelectedItems:()=>$.getSelectedItems(),getSelectedItemIds:()=>$.getSelectedItemIds(),isItemSelected:(K)=>$.isItemSelected(K),selectItem:(K)=>{return $.selectItem(K),j},deselectItem:(K)=>{return $.deselectItem(K),j},clearSelection:()=>{return $.clearSelection(),j},setSelection:(K)=>{return $.setSelection(K),j},on:(K,Y)=>{return Q.on(K,Y),j},off:(K,Y)=>{return Q.off(K,Y),j},destroy:()=>{q.destroy()}});m();var XZ={items:[],trackSelection:!0,multiSelect:!1,animate:!1},x2=(J={})=>{if(!Array.isArray(J.items)&&!J.renderItem)throw Error("List requires either items array or renderItem function");if(Array.isArray(J.items)&&J.items.length>0&&!J.renderItem)J.renderItem=($)=>{let Q=document.createElement("div");return Q.className="mtrl-list-item",Q.textContent=$.text||$.title||$.headline||$.name||$.id||String($),Q};return b(XZ,J,"list")},T2=(J)=>{let $={role:"list",tabindex:"0"};if(J.ariaLabel)$["aria-label"]=J.ariaLabel;return f(J,{tag:"div",attributes:$,className:[q6.CONTAINER,J.class],forwardEvents:{scroll:!0,keydown:!0}})},I2=(J,$)=>({list:{refresh:J.list?.refresh,getItems:J.list?.getItems,getAllItems:J.list?.getAllItems,getVisibleItems:J.list?.getVisibleItems,scrollToItem:J.list?.scrollToItem,scrollToIndex:J.list?.scrollToIndex,isLoading:()=>!1,hasNextPage:()=>!1},selection:{getSelectedItems:J.getSelectedItems,getSelectedItemIds:J.getSelectedItemIds,isItemSelected:J.isItemSelected,selectItem:J.selectItem,deselectItem:J.deselectItem,clearSelection:J.clearSelection,setSelection:J.setSelection},events:{on:J.on,off:J.off},lifecycle:{destroy:J.lifecycle?.destroy},config:{animate:$?.animate}});var BZ=(J={})=>{try{let $=x2(J);return console.log(`\uD83D\uDCCB Creating list with ${$.items?.length||0} items`),I(T,h(),S(T2($)),b1($),v1($),v(),(q)=>w2(I2(q,$))(q))($)}catch($){throw console.error("List creation error:",$),Error(`Failed to create list: ${$.message}`)}},C1=BZ;var S2=(J={})=>{return{rail:null,drawer:null,activeSection:J.activeSection||null,activeSubsection:J.activeSubsection||null,items:J.items||{},mouseInDrawer:!1,mouseInRail:!1,hoverTimer:null,closeTimer:null,processingChange:!1,isMobile:!1,overlayElement:null,closeButtonElement:null,resizeObserver:null,outsideClickHandler:null,outsideClickHandlerSet:!1}},E1=(J={})=>{return{animateDrawer:J.animateDrawer!==!1,showLabelsOnRail:J.showLabelsOnRail!==!1,hideDrawerOnClick:J.hideDrawerOnClick||!1,expanded:J.expanded===!0,hoverDelay:J.hoverDelay||200,closeDelay:J.closeDelay||100,railOptions:J.railOptions||{},drawerOptions:J.drawerOptions||{}}},h1=(J={})=>{return{breakpoint:J.breakpoint||960,lockBodyScroll:J.lockBodyScroll!==!1,hideOnClickOutside:J.hideOnClickOutside!==!1,enableSwipeGestures:J.enableSwipeGestures!==!1,optimizeForTouch:J.optimizeForTouch!==!1,overlayClass:J.overlayClass||"mtrl-nav-overlay",closeButtonClass:J.closeButtonClass||"mtrl-nav-close-btn",bodyLockClass:J.bodyLockClass||"mtrl-body-drawer-open"}};U7();var b2=(J,$,Q,q)=>{if(!J.drawer||!$||!J.items[$])return;let j=J.items[$].items||[];if(j.length===0){q();return}let K=J.drawer.getAllItems();if(K?.length>0)K.forEach((Y)=>{J.drawer.removeItem(Y.config.id)});j.forEach((Y)=>{J.drawer.addItem(Y)}),Q()},v2=(J,$)=>{let Q=Object.keys(J.items||{}).map((Z)=>({id:Z,label:J.items[Z]?.label||Z,icon:J.items[Z]?.icon||"",active:Z===J.activeSection})),q=o9({variant:"rail",position:"left",showLabels:$.showLabelsOnRail,items:Q,...$.railOptions});return document.body.appendChild(q.element),q},C2=(J,$)=>{let Q=o9({variant:"drawer",position:"left",items:[],...$.drawerOptions});if(document.body.appendChild(Q.element),Q.element.dataset.id="drawer",!$.expanded)Q.element.classList.add("mtrl-nav--hidden"),Q.element.setAttribute("aria-hidden","true");return Q},E2=(J,$)=>{if(!J.drawer)return;if(J.drawer.element.classList.remove("mtrl-nav--hidden"),J.drawer.element.setAttribute("aria-hidden","false"),J.isMobile){if(J.overlayElement)J.overlayElement.classList.add("active"),J.overlayElement.setAttribute("aria-hidden","false");if($.lockBodyScroll)document.body.classList.add($.bodyLockClass);if(J.closeButtonElement)J.closeButtonElement.style.display="flex"}},h2=(J,$)=>{if(!J.drawer)return;if(J.drawer.element.classList.add("mtrl-nav--hidden"),J.drawer.element.setAttribute("aria-hidden","true"),J.overlayElement)J.overlayElement.classList.remove("active"),J.overlayElement.setAttribute("aria-hidden","true");if($.lockBodyScroll)document.body.classList.remove($.bodyLockClass)},u2=(J)=>{if(!J.drawer)return!1;return!J.drawer.element.classList.contains("mtrl-nav--hidden")},f2=(J,$,Q,q,Z)=>{let j=J.isMobile;if(J.isMobile=window.innerWidth<=$.breakpoint||NQ(),j!==J.isMobile){if(J.isMobile)Q();else q();if(Z.onViewChange)Z.onViewChange({mobile:J.isMobile,previousMobile:j,width:window.innerWidth})}},g2=(J)=>{if(J.overlayElement&&J.overlayElement.parentNode)J.overlayElement.parentNode.removeChild(J.overlayElement),J.overlayElement=null;if(J.rail)J.rail.destroy(),J.rail=null;if(J.drawer)J.drawer.destroy(),J.drawer=null;J.activeSection=null,J.activeSubsection=null,J.mouseInDrawer=!1,J.mouseInRail=!1,J.processingChange=!1,J.isMobile=!1},d2=(J,$,Q,q)=>{if(!$||!J.items[$])return;if(J.activeSection===$&&J.activeSubsection===Q)return;if(J.activeSection=$,J.rail)J.rail.setActive($,q);if(Q&&J.drawer)J.activeSubsection=Q,J.drawer.setActive(Q,q)};var r2=(J,$,Q,q,Z,j)=>{let K=J.rail;if(!K)return;K.on("change",(Y)=>{let G=Y?.id;if(!G||J.processingChange)return;let z=Y?.source==="userAction";if(J.processingChange=!0,J.activeSection=G,Q(G),j.onSectionChange&&z)j.onSectionChange(G,{source:z?"userClick":"programmatic"});setTimeout(()=>{J.processingChange=!1},50)}),K.on("mouseover",(Y)=>{let G=Y?.id;if(J.mouseInRail=!0,clearTimeout(J.hoverTimer),J.hoverTimer=null,G)if(J.items[G]?.items?.length>0)J.hoverTimer=window.setTimeout(()=>{Q(G)},$.hoverDelay);else J.closeTimer=window.setTimeout(()=>{if(J.mouseInRail&&!J.mouseInDrawer)Z()},$.hoverDelay)}),K.on("mouseenter",()=>{J.mouseInRail=!0,clearTimeout(J.closeTimer),J.closeTimer=null}),K.on("mouseleave",()=>{if(J.mouseInRail=!1,clearTimeout(J.hoverTimer),J.hoverTimer=null,!J.mouseInDrawer)J.closeTimer=window.setTimeout(()=>{if(!J.mouseInRail&&!J.mouseInDrawer)Z()},$.closeDelay)})},l2=(J,$,Q,q)=>{let Z=J.drawer;if(!Z)return;if(typeof Z.on==="function")Z.on("change",(j)=>{let K=j.id;if(J.activeSubsection=K,$.hideDrawerOnClick)Q();if(q.onItemSelect)q.onItemSelect(j)}),Z.on("mouseenter",()=>{J.mouseInDrawer=!0,clearTimeout(J.hoverTimer),clearTimeout(J.closeTimer),J.hoverTimer=null,J.closeTimer=null}),Z.on("mouseleave",()=>{if(J.mouseInDrawer=!1,!J.mouseInRail)J.closeTimer=window.setTimeout(()=>{if(!J.mouseInDrawer&&!J.mouseInRail)Q()},$.closeDelay)})},p2=(J,$)=>{if(window.ResizeObserver)J.resizeObserver=new ResizeObserver(()=>{$()}),J.resizeObserver.observe(document.body);else window.addEventListener("resize",$);window.addEventListener("orientationchange",()=>{setTimeout($,100)})},s2=(J,$)=>{if(J.resizeObserver)J.resizeObserver.disconnect(),J.resizeObserver=null;else window.removeEventListener("resize",$);if(window.removeEventListener("orientationchange",$),J.outsideClickHandler){let Q="ontouchend"in window?"touchend":"click";document.removeEventListener(Q,J.outsideClickHandler)}clearTimeout(J.hoverTimer),clearTimeout(J.closeTimer),J.hoverTimer=null,J.closeTimer=null};U7();var FZ=(J,$,Q)=>{if(J.overlayElement)return J.overlayElement;return J.overlayElement=document.createElement("div"),J.overlayElement.className=$.overlayClass,J.overlayElement.setAttribute("aria-hidden","true"),document.body.appendChild(J.overlayElement),J.overlayElement.addEventListener("click",(q)=>{if(q.target===J.overlayElement)Q()}),J.overlayElement},HZ=(J,$,Q)=>{if(!J.drawer||J.closeButtonElement)return null;if(J.closeButtonElement=document.createElement("button"),J.closeButtonElement.className=$.closeButtonClass,J.closeButtonElement.setAttribute("aria-label","Close navigation"),J.closeButtonElement.innerHTML=`
|
|
58
58
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
59
59
|
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
60
60
|
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
61
61
|
</svg>
|
|
62
|
-
`,J.closeButtonElement.addEventListener("click",()=>{Q()}),x6()&&$.optimizeForTouch)J.closeButtonElement.style.minWidth=`${W8.COMFORTABLE}px`,J.closeButtonElement.style.minHeight=`${W8.COMFORTABLE}px`,J.closeButtonElement.addEventListener("touchstart",()=>{J.closeButtonElement.classList.add("active")},{passive:!0}),J.closeButtonElement.addEventListener("touchend",()=>{setTimeout(()=>{J.closeButtonElement.classList.remove("active")},G9.FEEDBACK_DURATION)},{passive:!0});return J.drawer.element.appendChild(J.closeButtonElement),J.closeButtonElement},m2=(J,$,Q,q)=>{let{drawer:Z,rail:j}=J;if(!Z||!j)return;if(FZ(J,$,Q),HZ(J,$,Q),MZ(J,$,Q,q),$.enableSwipeGestures&&x6())kZ(J,Q,q);Q()},MZ=(J,$,Q,q)=>{if(!$.hideOnClickOutside)return;if(J.outsideClickHandlerSet)return;J.outsideClickHandlerSet=!0;let Z=x6()?"touchend":"click",j=(K)=>{if(!J.isMobile||!q())return;let G=f6(K).target;if(J.drawer.element.contains(G)||J.rail.element.contains(G))return;Q()};J.outsideClickHandler=j,document.addEventListener(Z,j,x6()?{passive:!0}:!1)},kZ=(J,$,Q,q)=>{let{drawer:Z,rail:j}=J;if(!Z||!j)return;let K=0,Y=0;j.element.addEventListener("touchstart",(G)=>{let z=G.touches[0];K=z.clientX,Y=z.clientY},{passive:!0}),j.element.addEventListener("touchmove",(G)=>{if(!J.isMobile||Q()||!q)return;let z=G.touches[0],W=z.clientX-K,X=z.clientY-Y;if(Math.abs(W)>Math.abs(X)&&W>G9.SWIPE_THRESHOLD)q()},{passive:!0}),Z.element.addEventListener("touchstart",(G)=>{let z=G.touches[0];K=z.clientX,Y=z.clientY},{passive:!0}),Z.element.addEventListener("touchmove",(G)=>{if(!J.isMobile||!Q())return;let W=G.touches[0].clientX-K;if(W<0){if(Z.element.style.transform=`translateX(${W/2}px)`,W<-G9.SWIPE_THRESHOLD)$()}},{passive:!0}),Z.element.addEventListener("touchend",()=>{if(Z.element.style.transform)Z.element.style.transition="transform 0.2s ease",Z.element.style.transform="",setTimeout(()=>{Z.element.style.transition=""},200)},{passive:!0})},a2=(J,$)=>{if(J.overlayElement)J.overlayElement.classList.remove("active"),J.overlayElement.setAttribute("aria-hidden","true");if(J.closeButtonElement)J.closeButtonElement.style.display="none";document.body.classList.remove($.bodyLockClass)};var NZ=(J={})=>{let $=S2(J),Q=E1(J),q=h1(J),Z={initialize:()=>Z,cleanup:()=>{},navigateTo:()=>{},getRail:()=>$.rail,getDrawer:()=>$.drawer,getActiveSection:()=>$.activeSection,getActiveSubsection:()=>$.activeSubsection,showDrawer:()=>{},hideDrawer:()=>{},isDrawerVisible:()=>!1,configure:()=>Z,setProcessingChange:()=>{},isProcessingChange:()=>!1,isMobile:()=>$.isMobile,checkMobileState:()=>{},onSectionChange:void 0,onItemSelect:void 0,onViewChange:void 0},j=()=>E2($,q),K=()=>h2($,q),Y=()=>u2($),G=(F)=>{b2($,F,j,K)},z=()=>{m2($,q,K,Y)},W=()=>{f2($,q,z,()=>a2($,q),Z)},X=(F,k,L)=>{d2($,F,k,L)},U=()=>{if($.rail=v2($,Q),$.drawer=C2($,Q),r2($,Q,G,j,K,Z),l2($,Q,K,Z),p2($,W),J.activeSection&&$.items[J.activeSection]){if($.activeSection=J.activeSection,$.rail)$.rail.setActive(J.activeSection);if(G(J.activeSection),J.expanded===!0)j();else K()}return W(),Z},_=()=>{s2($,W),g2($)},N=(F)=>{return Object.assign(J,F),Object.assign(Q,E1({...J,...F})),Object.assign(q,h1({...J,...F})),Z};return Z.initialize=U,Z.cleanup=_,Z.navigateTo=X,Z.showDrawer=j,Z.hideDrawer=K,Z.isDrawerVisible=Y,Z.configure=N,Z.setProcessingChange=(F)=>{$.processingChange=F},Z.isProcessingChange=()=>$.processingChange,Z.isMobile=()=>$.isMobile,Z.checkMobileState=W,Z},i2=NZ;A8();a6();n();s();c();var c2=(J)=>($)=>{let Q="";if(J.value){let j=(J.options||[]).find((K)=>K.id===J.value);if(j)Q=j.text}let q='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>',Z=p7({label:J.label,variant:J.variant||"filled",density:J.density||"default",value:Q,name:J.name,disabled:J.disabled,required:J.required,supportingText:J.supportingText,error:J.error,trailingIcon:q,readonly:!0});return Z.element.classList.add(`${J.prefix||"mtrl"}-select`),{...$,element:Z.element,textfield:Z}},u1=(J)=>{return J.map(($)=>{if("type"in $&&$.type==="divider")return $;let Q={id:$.id.toString(),text:$.text,icon:$.icon,disabled:$.disabled,hasSubmenu:!1,data:$};if($.hasSubmenu&&Array.isArray($.submenu))Q.hasSubmenu=!0,Q.submenu=u1($.submenu);return Q})},o2=(J)=>($)=>{if(!$.textfield)return console.warn("Cannot add menu: textfield not found"),$;let Q={options:J.options||[],selectedOption:null};if(J.value)Q.selectedOption=Q.options.find((K)=>K.id===J.value);let q=u1(Q.options),Z=E7({opener:$.textfield,items:q,position:J.placement||"bottom-start",width:"100%",class:"select-menu",closeOnSelect:!0,closeOnClickOutside:!0,closeOnEscape:!0,offset:0});Z.on("select",(K)=>{if(!K.item||K.item.hasSubmenu)return;let Y=K.item.data;if(!Y||!("id"in Y)||!("text"in Y)){console.warn("Invalid menu selection: missing required data properties");return}if(Q.selectedOption=Y,$.textfield.setValue(Y.text),Z.setSelected(Y.id),$.emit)$.emit("change",{select:$,value:Y.id,text:Y.text,option:Y,originalEvent:K.originalEvent,preventDefault:()=>{K.defaultPrevented=!0},defaultPrevented:!1})}),$.textfield.element.addEventListener("keydown",(K)=>{if($.textfield.input.disabled)return;if((K.key==="Enter"||K.key===" "||K.key==="ArrowDown")&&!Z.isOpen()){if(K.preventDefault(),Z.open(K,"keyboard"),$.emit)$.emit("open",{select:$,originalEvent:K,preventDefault:()=>{},defaultPrevented:!1})}else if(K.key==="Escape"&&Z.isOpen())K.preventDefault(),Z.close(K)}),Z.on("open",()=>{$.textfield.element.classList.add(`${J.prefix||"mtrl"}-select--open`);let K=J.prefix||"mtrl";if($.textfield.element.classList.add(`${K}-textfield--focused`),$.textfield.element.classList.contains(`${K}-textfield--filled`))$.textfield.element.classList.add(`${K}-textfield--filled-focused`)}),Z.on("close",(K)=>{if($.textfield.element.classList.remove(`${J.prefix||"mtrl"}-select--open`),setTimeout(()=>{let Y=J.prefix||"mtrl";if(document.activeElement===$.textfield.input||$.textfield.element.contains(document.activeElement)){if($.textfield.element.classList.add(`${Y}-textfield--focused`),$.textfield.element.classList.contains(`${Y}-textfield--filled`))$.textfield.element.classList.add(`${Y}-textfield--filled-focused`)}else if($.textfield.element.classList.remove(`${Y}-textfield--focused`),$.textfield.element.classList.contains(`${Y}-textfield--filled`))$.textfield.element.classList.remove(`${Y}-textfield--filled-focused`)},10),$.emit)$.emit("close",{select:$,originalEvent:K.originalEvent,preventDefault:()=>{},defaultPrevented:!1})});let j=()=>{if(!Q.selectedOption)return;Z.setSelected(Q.selectedOption.id)};return Z.on("open",()=>{setTimeout(j,50)}),{...$,menu:Z,select:{getValue:()=>Q.selectedOption?.id||null,setValue:(K)=>{let Y=Q.options.find((G)=>("id"in G)&&G.id===K);if(Y&&"text"in Y)Q.selectedOption=Y,$.textfield.setValue(Y.text),Z.setSelected(Y.id);return $},getText:()=>Q.selectedOption?.text||"",getSelectedOption:()=>Q.selectedOption,getOptions:()=>[...Q.options],setOptions:(K)=>{Q.options=K;let Y=u1(K);if(Z.setItems(Y),Q.selectedOption&&!K.find((G)=>("id"in G)&&G.id===Q.selectedOption.id))Q.selectedOption=null,$.textfield.setValue("");return $},open:(K,Y="mouse")=>{return Z.open(K,Y),$},close:(K)=>{return Z.close(K),$},isOpen:()=>Z.isOpen()}}};var t2=(J)=>($)=>({...$,element:$.element,textfield:$.textfield,menu:$.menu,getValue:J.select.getValue,setValue(Q){return J.select.setValue(Q),this},getText:J.select.getText,getSelectedOption:J.select.getSelectedOption,getOptions:J.select.getOptions,setOptions(Q){return J.select.setOptions(Q),this},open(Q="mouse"){if($.menu&&typeof $.menu.open==="function")$.menu.open(void 0,Q);else J.select.open();return this},close(){return J.select.close(),this},isOpen:J.select.isOpen,setDensity(Q){if($.textfield?.setDensity)$.textfield.setDensity(Q);return this},getDensity(){if($.textfield?.getDensity)return $.textfield.getDensity();return"default"},on(Q,q){if(J.events?.on)J.events.on(Q,q);else if($.on)$.on(Q,q);return this},off(Q,q){if(J.events?.off)J.events.off(Q,q);else if($.off)$.off(Q,q);return this},enable(){return J.disabled.enable(),this},disable(){return J.disabled.disable(),this},destroy(){J.lifecycle.destroy()}});m();var LZ={options:[],variant:L9.VARIANT,placement:L9.PLACEMENT},n2=(J={options:[]})=>b(LZ,J,"select"),e2=(J)=>({select:{getValue:J.select?.getValue||(()=>null),setValue:J.select?.setValue||(()=>J),getText:J.select?.getText||(()=>""),getSelectedOption:J.select?.getSelectedOption||(()=>null),getOptions:J.select?.getOptions||(()=>[]),setOptions:J.select?.setOptions||(()=>J),open:J.select?.open||(()=>J),close:J.select?.close||(()=>J),isOpen:J.select?.isOpen||(()=>!1)},events:{on:J.on||(()=>J),off:J.off||(()=>J)},disabled:{enable:()=>{if(J.textfield?.enable)J.textfield.enable();return J},disable:()=>{if(J.textfield?.disable)J.textfield.disable();return J}},lifecycle:{destroy:()=>{if(J.textfield?.destroy)J.textfield.destroy();if(J.menu?.destroy)J.menu.destroy();if(J.lifecycle?.destroy)J.lifecycle.destroy()}}});var VZ=(J)=>{try{let $=n2(J),Q=I(T,h(),c2($),o2($),v(),(q)=>t2(e2(q))(q))($);if(J.on){if(J.on.change)Q.on("change",J.on.change);if(J.on.open)Q.on("open",J.on.open);if(J.on.close)Q.on("close",J.on.close)}return Q}catch($){throw console.error("Select creation error:",$),new Error(`Failed to create select: ${$.message}`)}},f1=VZ;y7();y7();V8();u8();var g1={DOCKED:"docked",MODAL:"modal",MODAL_INPUT:"modal-input"},d1={DAY:"day",MONTH:"month",YEAR:"year"},r1={SINGLE:"single",RANGE:"range"},l1=["S","M","T","W","T","F","S"],p1=["January","February","March","April","May","June","July","August","September","October","November","December"],s1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],m1="MM/DD/YYYY";var a1={SMALL:"small",MEDIUM:"medium",LARGE:"large",FULLWIDTH:"fullwidth",FULLSCREEN:"fullscreen"},i1={SCALE:"scale",SLIDE_UP:"slide-up",SLIDE_DOWN:"slide-down",FADE:"fade"},c1={RIGHT:"right",LEFT:"left",CENTER:"center",SPACE_BETWEEN:"space-between"};var o1={TEXT:"text",FILLED:"filled",OUTLINED:"outlined",TONAL:"tonal"},t1="Yes",n1="No";var e1={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",SURFACE:"surface"},$Q={SMALL:"small",DEFAULT:"default",LARGE:"large"},JQ={TOP_RIGHT:"top-right",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_LEFT:"bottom-left"};a6();
|
|
62
|
+
`,J.closeButtonElement.addEventListener("click",()=>{Q()}),x6()&&$.optimizeForTouch)J.closeButtonElement.style.minWidth=`${W8.COMFORTABLE}px`,J.closeButtonElement.style.minHeight=`${W8.COMFORTABLE}px`,J.closeButtonElement.addEventListener("touchstart",()=>{J.closeButtonElement.classList.add("active")},{passive:!0}),J.closeButtonElement.addEventListener("touchend",()=>{setTimeout(()=>{J.closeButtonElement.classList.remove("active")},G9.FEEDBACK_DURATION)},{passive:!0});return J.drawer.element.appendChild(J.closeButtonElement),J.closeButtonElement},m2=(J,$,Q,q)=>{let{drawer:Z,rail:j}=J;if(!Z||!j)return;if(FZ(J,$,Q),HZ(J,$,Q),MZ(J,$,Q,q),$.enableSwipeGestures&&x6())kZ(J,Q,q);Q()},MZ=(J,$,Q,q)=>{if(!$.hideOnClickOutside)return;if(J.outsideClickHandlerSet)return;J.outsideClickHandlerSet=!0;let Z=x6()?"touchend":"click",j=(K)=>{if(!J.isMobile||!q())return;let G=f6(K).target;if(J.drawer.element.contains(G)||J.rail.element.contains(G))return;Q()};J.outsideClickHandler=j,document.addEventListener(Z,j,x6()?{passive:!0}:!1)},kZ=(J,$,Q,q)=>{let{drawer:Z,rail:j}=J;if(!Z||!j)return;let K=0,Y=0;j.element.addEventListener("touchstart",(G)=>{let z=G.touches[0];K=z.clientX,Y=z.clientY},{passive:!0}),j.element.addEventListener("touchmove",(G)=>{if(!J.isMobile||Q()||!q)return;let z=G.touches[0],W=z.clientX-K,X=z.clientY-Y;if(Math.abs(W)>Math.abs(X)&&W>G9.SWIPE_THRESHOLD)q()},{passive:!0}),Z.element.addEventListener("touchstart",(G)=>{let z=G.touches[0];K=z.clientX,Y=z.clientY},{passive:!0}),Z.element.addEventListener("touchmove",(G)=>{if(!J.isMobile||!Q())return;let W=G.touches[0].clientX-K;if(W<0){if(Z.element.style.transform=`translateX(${W/2}px)`,W<-G9.SWIPE_THRESHOLD)$()}},{passive:!0}),Z.element.addEventListener("touchend",()=>{if(Z.element.style.transform)Z.element.style.transition="transform 0.2s ease",Z.element.style.transform="",setTimeout(()=>{Z.element.style.transition=""},200)},{passive:!0})},a2=(J,$)=>{if(J.overlayElement)J.overlayElement.classList.remove("active"),J.overlayElement.setAttribute("aria-hidden","true");if(J.closeButtonElement)J.closeButtonElement.style.display="none";document.body.classList.remove($.bodyLockClass)};var NZ=(J={})=>{let $=S2(J),Q=E1(J),q=h1(J),Z={initialize:()=>Z,cleanup:()=>{},navigateTo:()=>{},getRail:()=>$.rail,getDrawer:()=>$.drawer,getActiveSection:()=>$.activeSection,getActiveSubsection:()=>$.activeSubsection,showDrawer:()=>{},hideDrawer:()=>{},isDrawerVisible:()=>!1,configure:()=>Z,setProcessingChange:()=>{},isProcessingChange:()=>!1,isMobile:()=>$.isMobile,checkMobileState:()=>{},onSectionChange:void 0,onItemSelect:void 0,onViewChange:void 0},j=()=>E2($,q),K=()=>h2($,q),Y=()=>u2($),G=(F)=>{b2($,F,j,K)},z=()=>{m2($,q,K,Y)},W=()=>{f2($,q,z,()=>a2($,q),Z)},X=(F,k,L)=>{d2($,F,k,L)},U=()=>{if($.rail=v2($,Q),$.drawer=C2($,Q),r2($,Q,G,j,K,Z),l2($,Q,K,Z),p2($,W),J.activeSection&&$.items[J.activeSection]){if($.activeSection=J.activeSection,$.rail)$.rail.setActive(J.activeSection);if(G(J.activeSection),J.expanded===!0)j();else K()}return W(),Z},_=()=>{s2($,W),g2($)},N=(F)=>{return Object.assign(J,F),Object.assign(Q,E1({...J,...F})),Object.assign(q,h1({...J,...F})),Z};return Z.initialize=U,Z.cleanup=_,Z.navigateTo=X,Z.showDrawer=j,Z.hideDrawer=K,Z.isDrawerVisible=Y,Z.configure=N,Z.setProcessingChange=(F)=>{$.processingChange=F},Z.isProcessingChange=()=>$.processingChange,Z.isMobile=()=>$.isMobile,Z.checkMobileState=W,Z},i2=NZ;A8();a6();n();s();c();var c2=(J)=>($)=>{let Q="";if(J.value){let j=(J.options||[]).find((K)=>K.id===J.value);if(j)Q=j.text}let q='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>',Z=p7({label:J.label,variant:J.variant||"filled",density:J.density||"default",value:Q,name:J.name,disabled:J.disabled,required:J.required,supportingText:J.supportingText,error:J.error,trailingIcon:q,readonly:!0});return Z.element.classList.add(`${J.prefix||"mtrl"}-select`),{...$,element:Z.element,textfield:Z}},u1=(J)=>{return J.map(($)=>{if("type"in $&&$.type==="divider")return $;let Q={id:$.id.toString(),text:$.text,icon:$.icon,disabled:$.disabled,hasSubmenu:!1,data:$};if($.hasSubmenu&&Array.isArray($.submenu))Q.hasSubmenu=!0,Q.submenu=u1($.submenu);return Q})},o2=(J)=>($)=>{if(!$.textfield)return console.warn("Cannot add menu: textfield not found"),$;let Q={options:J.options||[],selectedOption:null};if(J.value)Q.selectedOption=Q.options.find((K)=>K.id===J.value);let q=u1(Q.options),Z=E7({opener:$.textfield,items:q,position:J.placement||"bottom-start",width:"100%",class:"select-menu",closeOnSelect:!0,closeOnClickOutside:!0,closeOnEscape:!0,offset:0});Z.on("select",(K)=>{if(!K.item||K.item.hasSubmenu)return;let Y=K.item.data;if(!Y||!("id"in Y)||!("text"in Y)){console.warn("Invalid menu selection: missing required data properties");return}if(Q.selectedOption=Y,$.textfield.setValue(Y.text),Z.setSelected(Y.id),$.emit)$.emit("change",{select:$,value:Y.id,text:Y.text,option:Y,originalEvent:K.originalEvent,preventDefault:()=>{K.defaultPrevented=!0},defaultPrevented:!1})}),$.textfield.element.addEventListener("keydown",(K)=>{if($.textfield.input.disabled)return;if((K.key==="Enter"||K.key===" "||K.key==="ArrowDown")&&!Z.isOpen()){if(K.preventDefault(),Z.open(K,"keyboard"),$.emit)$.emit("open",{select:$,originalEvent:K,preventDefault:()=>{},defaultPrevented:!1})}else if(K.key==="Escape"&&Z.isOpen())K.preventDefault(),Z.close(K)}),Z.on("open",()=>{$.textfield.element.classList.add(`${J.prefix||"mtrl"}-select--open`);let K=J.prefix||"mtrl";if($.textfield.element.classList.add(`${K}-textfield--focused`),$.textfield.element.classList.contains(`${K}-textfield--filled`))$.textfield.element.classList.add(`${K}-textfield--filled-focused`)}),Z.on("close",(K)=>{if($.textfield.element.classList.remove(`${J.prefix||"mtrl"}-select--open`),setTimeout(()=>{let Y=J.prefix||"mtrl";if(document.activeElement===$.textfield.input||$.textfield.element.contains(document.activeElement)){if($.textfield.element.classList.add(`${Y}-textfield--focused`),$.textfield.element.classList.contains(`${Y}-textfield--filled`))$.textfield.element.classList.add(`${Y}-textfield--filled-focused`)}else if($.textfield.element.classList.remove(`${Y}-textfield--focused`),$.textfield.element.classList.contains(`${Y}-textfield--filled`))$.textfield.element.classList.remove(`${Y}-textfield--filled-focused`)},10),$.emit)$.emit("close",{select:$,originalEvent:K.originalEvent,preventDefault:()=>{},defaultPrevented:!1})});let j=()=>{if(!Q.selectedOption)return;Z.setSelected(Q.selectedOption.id)};return Z.on("open",()=>{setTimeout(j,50)}),{...$,menu:Z,select:{getValue:()=>Q.selectedOption?.id||null,setValue:(K)=>{let Y=Q.options.find((G)=>("id"in G)&&G.id===K);if(Y&&"text"in Y)Q.selectedOption=Y,$.textfield.setValue(Y.text),Z.setSelected(Y.id);return $},getText:()=>Q.selectedOption?.text||"",getSelectedOption:()=>Q.selectedOption,getOptions:()=>[...Q.options],setOptions:(K)=>{Q.options=K;let Y=u1(K);if(Z.setItems(Y),Q.selectedOption&&!K.find((G)=>("id"in G)&&G.id===Q.selectedOption.id))Q.selectedOption=null,$.textfield.setValue("");return $},open:(K,Y="mouse")=>{return Z.open(K,Y),$},close:(K)=>{return Z.close(K),$},isOpen:()=>Z.isOpen()}}};var t2=(J)=>($)=>({...$,element:$.element,textfield:$.textfield,menu:$.menu,getValue:J.select.getValue,setValue(Q){return J.select.setValue(Q),this},getText:J.select.getText,getSelectedOption:J.select.getSelectedOption,getOptions:J.select.getOptions,setOptions(Q){return J.select.setOptions(Q),this},open(Q="mouse"){if($.menu&&typeof $.menu.open==="function")$.menu.open(void 0,Q);else J.select.open();return this},close(){return J.select.close(),this},isOpen:J.select.isOpen,setDensity(Q){if($.textfield?.setDensity)$.textfield.setDensity(Q);return this},getDensity(){if($.textfield?.getDensity)return $.textfield.getDensity();return"default"},on(Q,q){if(J.events?.on)J.events.on(Q,q);else if($.on)$.on(Q,q);return this},off(Q,q){if(J.events?.off)J.events.off(Q,q);else if($.off)$.off(Q,q);return this},enable(){return J.disabled.enable(),this},disable(){return J.disabled.disable(),this},destroy(){J.lifecycle.destroy()}});m();var LZ={options:[],variant:L9.VARIANT,placement:L9.PLACEMENT},n2=(J={options:[]})=>b(LZ,J,"select"),e2=(J)=>({select:{getValue:J.select?.getValue||(()=>null),setValue:J.select?.setValue||(()=>J),getText:J.select?.getText||(()=>""),getSelectedOption:J.select?.getSelectedOption||(()=>null),getOptions:J.select?.getOptions||(()=>[]),setOptions:J.select?.setOptions||(()=>J),open:J.select?.open||(()=>J),close:J.select?.close||(()=>J),isOpen:J.select?.isOpen||(()=>!1)},events:{on:J.on||(()=>J),off:J.off||(()=>J)},disabled:{enable:()=>{if(J.textfield?.enable)J.textfield.enable();return J},disable:()=>{if(J.textfield?.disable)J.textfield.disable();return J}},lifecycle:{destroy:()=>{if(J.textfield?.destroy)J.textfield.destroy();if(J.menu?.destroy)J.menu.destroy();if(J.lifecycle?.destroy)J.lifecycle.destroy()}}});var VZ=(J)=>{try{let $=n2(J),Q=I(T,h(),c2($),o2($),v(),(q)=>t2(e2(q))(q))($);if(J.on){if(J.on.change)Q.on("change",J.on.change);if(J.on.open)Q.on("open",J.on.open);if(J.on.close)Q.on("close",J.on.close)}return Q}catch($){throw console.error("Select creation error:",$),Error(`Failed to create select: ${$.message}`)}},f1=VZ;y7();y7();V8();u8();var g1={DOCKED:"docked",MODAL:"modal",MODAL_INPUT:"modal-input"},d1={DAY:"day",MONTH:"month",YEAR:"year"},r1={SINGLE:"single",RANGE:"range"},l1=["S","M","T","W","T","F","S"],p1=["January","February","March","April","May","June","July","August","September","October","November","December"],s1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],m1="MM/DD/YYYY";var a1={SMALL:"small",MEDIUM:"medium",LARGE:"large",FULLWIDTH:"fullwidth",FULLSCREEN:"fullscreen"},i1={SCALE:"scale",SLIDE_UP:"slide-up",SLIDE_DOWN:"slide-down",FADE:"fade"},c1={RIGHT:"right",LEFT:"left",CENTER:"center",SPACE_BETWEEN:"space-between"};var o1={TEXT:"text",FILLED:"filled",OUTLINED:"outlined",TONAL:"tonal"},t1="Yes",n1="No";var e1={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",SURFACE:"surface"},$Q={SMALL:"small",DEFAULT:"default",LARGE:"large"},JQ={TOP_RIGHT:"top-right",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_LEFT:"bottom-left"};a6();
|
|
63
63
|
|
|
64
|
-
//# debugId=
|
|
64
|
+
//# debugId=C3519E96CFE9AB1B64756E2164756E21
|