text: (()=>{const e=(e,t)=>{try{return e instanceof HTMLElement?e:(t||document).querySelector(e)}catch{}},t=(e,t)=>{try{return Array.isArray(e)?e:(t||document).querySelectorAll(e)}catch{}},r=(e,t)=>!!e&&e.classList.contains(t),a=(e,t)=>{e&&e.classList.add(t)},i=(e,t)=>{e&&e.classList.remove(t)},c=(e,t,r)=>{e.addEventListener(t,r,!0)},l=e=>{if(e)return e.parentNode},o=(e,t,a)=>{if(!e.value&&document.activeElement!=e)return e.style.clipPath="";if(t&&r(a,"border")&&!r(a,"fill")){let i=Math.round(t.offsetWidth/(t.offsetHeight/14)),c=r(a,"round")?20:12,l=i+c+8;e.style.clipPath=`polygon(0% 0%, ${c}rem 0%, ${c}rem 8rem, ${l}rem 8rem, ${l}rem 0%, 100% 0%, 100% 100%, 0% 100%)`}else e.style.clipPath=""},n=e=>{if(!/input/i.test(e.tagName))return g(e.currentTarget)},u=t=>{e("input:not([type=checkbox]):not([type=radio]), select, textarea",l(t.currentTarget)).focus()},d=t=>{let r=l(t.currentTarget),i=e("label",r);a(i,"active"),o(t.currentTarget,i,r),t.currentTarget.getAttribute("data-ui")&&g(t.currentTarget)},v=t=>{let r=e("label",l(t.currentTarget));t.currentTarget.value||(i(r,"active"),t.currentTarget.style.clipPath=""),t.currentTarget.getAttribute("data-ui")&&g(t.currentTarget)},s=e=>{var r,a,c;t(".dropdown.active").forEach((e=>{i(e,"active")})),r=e.currentTarget,a="click",c=s,r.removeEventListener(a,c,!0)},m=e=>{i(e.currentTarget,"active"),f&&clearTimeout(f)};let f=null;const g=(t,c,l)=>(c||(c=e(t.getAttribute("data-ui"))),r(c,"modal")?p(t,c,l):r(c,"dropdown")?x(t,c,l):r(c,"toast")?b(t,c,l):r(c,"page")?y(t,c,l):r(c,"progress")?T(t,c,l):(h(t,c,l),r(c,"active")?i(c,"active"):void a(c,"active"))),h=(e,c,o)=>{let n=l(e);r(n,"tabs")&&(t("a",n).forEach((e=>{i(e,"active")})),a(e,"active"))},y=(e,t,c)=>{h(e,t,c);let o=l(t);for(let e=0;e<o.children.length;e++)r(o.children[e],"page")&&i(o.children[e],"active");a(t,"active")},x=(e,l,o)=>{if(h(e,l,o),r(l,"active"))return i(l,"active");t(".dropdown.active").forEach((e=>{i(e,"active")})),a(l,"active"),c(document,"click",s)},p=(e,c,o)=>{h(e,c,o);let n=(e=>{if(e)return e.previousElementSibling})(c);r(n,"overlay")||(n=(e=>{let t=document.createElement("div");for(let r in e)t[r]=e[r];return t})({className:"overlay active"}),((e,t)=>{if(t)t.parentNode.insertBefore(e,t)})(n,c)),n.onclick=()=>{i(e,"active"),i(c,"active"),i(n,"active")};let u=r(c,"active"),d=l(c);if(r(d,"menu")){t(".menu > .modal, .menu > a, .menu > .overlay").forEach((e=>{i(e,"active")}))}u?(i(e,"active"),i(n,"active"),i(c,"active")):(a(e,"active"),a(n,"active"),a(c,"active"))},b=(e,r,l)=>{h(e,r,l),t(".toast.active").forEach((e=>{i(e,"active")})),a(r,"active"),c(r,"click",m),f&&clearTimeout(f),l&&-1==l||(f=setTimeout((()=>{i(r,"active")}),l&&l?l:6e3))},T=(e,t,a)=>r(t,"left")?t.style.clipPath=`polygon(0% 0%, 0% 100%, ${a}% 100%, ${a}% 0%)`:r(t,"top")?t.style.clipPath=`polygon(0% 0%, 100% 0%, 100% ${a}%, 0% ${a}%)`:r(t,"right")?t.style.clipPath=`polygon(100% 0%, 100% 100%, ${100-a}% 100%, ${100-a}% 0%)`:r(t,"bottom")?t.style.clipPath=`polygon(0% 100%, 100% 100%, 100% ${100-a}%, 0% ${100-a}%)`:void 0;window.ui=(r,s)=>{if(r){if("guid"==r)return"fxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}));if("theme"==r)return(e=>{let t={light:"",dark:"",selected:"light"};if(!window.materialDynamicColors)return t;if(!e)return document.body.removeAttribute("style"),t;if(e.from&&e.mode&&e.from[e.mode]){let t={light:e.from.light,dark:e.from.dark,selected:e.mode};return document.body.setAttribute("style",t[e.mode]),t}return window.materialDynamicColors(e.from).then((t=>{const r=e=>{let t="";for(var r in e)t+="--"+r.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()+": "+e[r]+";";return t};let a={light:r(t.light)+"--active: rgba(0,0,0,.1);--mode: light;",dark:r(t.dark)+"--active: rgba(255,255,255,.2);--mode: dark;",selected:e.mode};return document.body.setAttribute("style",a[e.mode]),a}))})(s);let t=e(r),a=e("[data-ui='#"+t.id+"']");return g(a,t,s)}t("[data-ui]").forEach((e=>{c(e,"click",n)})),t(".field > label").forEach((e=>{c(e,"click",u)})),t(".field > input:not([type=checkbox]):not([type=radio]), select, textarea").forEach((t=>{let r=l(t),n=e("label",r);c(t,"focus",d),c(t,"blur",v),t.value?a(n,"active"):i(n,"active"),o(t,n,r)}))}})();