/*! * AdminLTE v4.0.0-alpha2 (https://adminlte.io) * Copyright 2014-2023 Colorlib * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE) */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).adminlte={})}(this,(function(e){"use strict";const t=[],s=e=>{"loading"===document.readyState?(t.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of t)e()})),t.push(e)):e()},i=(e,t=500)=>{e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=`${t}ms`,e.style.boxSizing="border-box",e.style.height=`${e.offsetHeight}px`,e.style.overflow="hidden",window.setTimeout((()=>{e.style.height="0",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.marginTop="0",e.style.marginBottom="0"}),1),window.setTimeout((()=>{e.style.display="none",e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")}),t)},n=(e,t=500)=>{e.style.removeProperty("display");let{display:s}=window.getComputedStyle(e);"none"===s&&(s="block"),e.style.display=s;const i=e.offsetHeight;e.style.overflow="hidden",e.style.height="0",e.style.paddingTop="0",e.style.paddingBottom="0",e.style.marginTop="0",e.style.marginBottom="0",window.setTimeout((()=>{e.style.boxSizing="border-box",e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=`${t}ms`,e.style.height=`${i}px`,e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom")}),1),window.setTimeout((()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")}),t)},o="hold-transition";class a{constructor(e){this._element=e}holdTransition(){let e;window.addEventListener("resize",(()=>{document.body.classList.add(o),clearTimeout(e),e=setTimeout((()=>{document.body.classList.remove(o)}),400)}))}}s((()=>{new a(document.body).holdTransition(),setTimeout((()=>{document.body.classList.add("app-loaded")}),400)}));const r=".lte.push-menu",l=`open${r}`,d=`collapse${r}`,c="sidebar-mini",p="sidebar-collapse",m="sidebar-open",h="sidebar-expand",v=`[class*="${h}"]`,u='[data-lte-toggle="sidebar"]',y={sidebarBreakpoint:992};class g{constructor(e,t){this._element=e,this._config=Object.assign(Object.assign({},y),t)}menusClose(){document.querySelectorAll(".nav-treeview").forEach((e=>{e.style.removeProperty("display"),e.style.removeProperty("height")}));const e=document.querySelector(".sidebar-menu"),t=null==e?void 0:e.querySelectorAll(".nav-item");t&&t.forEach((e=>{e.classList.remove("menu-open")}))}expand(){const e=new Event(l);document.body.classList.remove(p),document.body.classList.add(m),this._element.dispatchEvent(e)}collapse(){const e=new Event(d);document.body.classList.remove(m),document.body.classList.add(p),this._element.dispatchEvent(e)}addSidebarBreakPoint(){var e,t,s;const i=null!==(t=null===(e=document.querySelector(v))||void 0===e?void 0:e.classList)&&void 0!==t?t:[],n=null!==(s=Array.from(i).find((e=>e.startsWith(h))))&&void 0!==s?s:"",o=document.getElementsByClassName(n)[0],a=window.getComputedStyle(o,"::before").getPropertyValue("content");this._config=Object.assign(Object.assign({},this._config),{sidebarBreakpoint:Number(a.replace(/[^\d.-]/g,""))}),window.innerWidth<=this._config.sidebarBreakpoint?this.collapse():(document.body.classList.contains(c)||this.expand(),document.body.classList.contains(c)&&document.body.classList.contains(p)&&this.collapse())}toggle(){document.body.classList.contains(p)?this.expand():this.collapse()}init(){this.addSidebarBreakPoint()}}s((()=>{var e;const t=null===document||void 0===document?void 0:document.querySelector(".app-sidebar");if(t){const e=new g(t,y);e.init(),window.addEventListener("resize",(()=>{e.init()}))}const s=document.createElement("div");s.className="sidebar-overlay",null===(e=document.querySelector(".app-wrapper"))||void 0===e||e.append(s),s.addEventListener("touchstart",(e=>{e.preventDefault();const t=e.currentTarget;new g(t,y).collapse()})),s.addEventListener("click",(e=>{e.preventDefault();const t=e.currentTarget;new g(t,y).collapse()})),document.querySelectorAll(u).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();let t=e.currentTarget;"sidebar"!==(null==t?void 0:t.dataset.lteToggle)&&(t=null==t?void 0:t.closest(u)),t&&(null==e||e.preventDefault(),new g(t,y).toggle())}))}))}));const _=".lte.treeview",f=`expanded${_}`,b=`collapsed${_}`,w="menu-open",L=".nav-treeview",E={animationSpeed:300};class S{constructor(e,t){this._element=e,this._config=Object.assign(Object.assign({},E),t)}open(){var e;const t=new Event(f);this._element.classList.add(w);const s=null===(e=this._element)||void 0===e?void 0:e.querySelector(L);s&&n(s,this._config.animationSpeed),this._element.dispatchEvent(t)}close(){var e;const t=new Event(b);this._element.classList.remove(w);const s=null===(e=this._element)||void 0===e?void 0:e.querySelector(L);s&&i(s,this._config.animationSpeed),this._element.dispatchEvent(t)}toggle(){this._element.classList.contains(w)?this.close():this.open()}}s((()=>{document.querySelectorAll('[data-lte-toggle="treeview"]').forEach((e=>{e.addEventListener("click",(e=>{const t=e.target,s=t.closest(".nav-item"),i=t.closest(".nav-link");"#"!==(null==t?void 0:t.getAttribute("href"))&&"#"!==(null==i?void 0:i.getAttribute("href"))||e.preventDefault(),s&&new S(s,E).toggle()}))}))}));const T=".lte.card-widget",x=`collapsed${T}`,P=`expanded${T}`,$=`remove${T}`,q=`maximized${T}`,z=`minimized${T}`,k="card",A="collapsed-card",D="collapsing-card",B="expanding-card",j="was-collapsed",O="maximized-card",C='[data-lte-toggle="card-remove"]',M='[data-lte-toggle="card-collapse"]',H='[data-lte-toggle="card-maximize"]',W=`.${k}`,N=".card-body",V=".card-footer",F={animationSpeed:500,collapseTrigger:M,removeTrigger:C,maximizeTrigger:H};class G{constructor(e,t){this._element=e,this._parent=e.closest(W),e.classList.contains(k)&&(this._parent=e),this._config=Object.assign(Object.assign({},F),t)}collapse(){var e,t;const s=new Event(x);this._parent&&(this._parent.classList.add(D),(null===(e=this._parent)||void 0===e?void 0:e.querySelectorAll(`${N}, ${V}`)).forEach((e=>{e instanceof HTMLElement&&i(e,this._config.animationSpeed)})),setTimeout((()=>{this._parent&&(this._parent.classList.add(A),this._parent.classList.remove(D))}),this._config.animationSpeed)),null===(t=this._element)||void 0===t||t.dispatchEvent(s)}expand(){var e,t;const s=new Event(P);this._parent&&(this._parent.classList.add(B),(null===(e=this._parent)||void 0===e?void 0:e.querySelectorAll(`${N}, ${V}`)).forEach((e=>{e instanceof HTMLElement&&n(e,this._config.animationSpeed)})),setTimeout((()=>{this._parent&&(this._parent.classList.remove(A),this._parent.classList.remove(B))}),this._config.animationSpeed)),null===(t=this._element)||void 0===t||t.dispatchEvent(s)}remove(){var e;const t=new Event($);this._parent&&i(this._parent,this._config.animationSpeed),null===(e=this._element)||void 0===e||e.dispatchEvent(t)}toggle(){var e;(null===(e=this._parent)||void 0===e?void 0:e.classList.contains(A))?this.expand():this.collapse()}maximize(){var e;const t=new Event(q);this._parent&&(this._parent.style.height=`${this._parent.offsetHeight}px`,this._parent.style.width=`${this._parent.offsetWidth}px`,this._parent.style.transition="all .15s",setTimeout((()=>{const e=document.querySelector("html");e&&e.classList.add(O),this._parent&&(this._parent.classList.add(O),this._parent.classList.contains(A)&&this._parent.classList.add(j))}),150)),null===(e=this._element)||void 0===e||e.dispatchEvent(t)}minimize(){var e;const t=new Event(z);this._parent&&(this._parent.style.height="auto",this._parent.style.width="auto",this._parent.style.transition="all .15s",setTimeout((()=>{var e;const t=document.querySelector("html");t&&t.classList.remove(O),this._parent&&(this._parent.classList.remove(O),(null===(e=this._parent)||void 0===e?void 0:e.classList.contains(j))&&this._parent.classList.remove(j))}),10)),null===(e=this._element)||void 0===e||e.dispatchEvent(t)}toggleMaximize(){var e;(null===(e=this._parent)||void 0===e?void 0:e.classList.contains(O))?this.minimize():this.maximize()}}s((()=>{document.querySelectorAll(M).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.target;new G(t,F).toggle()}))})),document.querySelectorAll(C).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.target;new G(t,F).remove()}))})),document.querySelectorAll(H).forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.target;new G(t,F).toggleMaximize()}))}))})),e.CardWidget=G,e.Layout=a,e.PushMenu=g,e.Treeview=S})); //# sourceMappingURL=adminlte.min.js.map