/*! * AdminLTE v3.1.0-pre (https://adminlte.io) * Copyright 2014-2020 Colorlib * Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) : typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.adminlte = {}, global.jQuery)); }(this, (function (exports, $) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var $__default = /*#__PURE__*/_interopDefaultLegacy($); /** * -------------------------------------------- * AdminLTE CardRefresh.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME = 'CardRefresh'; var DATA_KEY = 'lte.cardrefresh'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME]; var EVENT_LOADED = "loaded" + EVENT_KEY; var EVENT_OVERLAY_ADDED = "overlay.added" + EVENT_KEY; var EVENT_OVERLAY_REMOVED = "overlay.removed" + EVENT_KEY; var CLASS_NAME_CARD = 'card'; var SELECTOR_CARD = "." + CLASS_NAME_CARD; var SELECTOR_DATA_REFRESH = '[data-card-widget="card-refresh"]'; var Default = { source: '', sourceSelector: '', params: {}, trigger: SELECTOR_DATA_REFRESH, content: '.card-body', loadInContent: true, loadOnInit: true, responseType: '', overlayTemplate: '
', onLoadStart: function onLoadStart() {}, onLoadDone: function onLoadDone(response) { return response; } }; var CardRefresh = /*#__PURE__*/function () { function CardRefresh(element, settings) { this._element = element; this._parent = element.parents(SELECTOR_CARD).first(); this._settings = $__default['default'].extend({}, Default, settings); this._overlay = $__default['default'](this._settings.overlayTemplate); if (element.hasClass(CLASS_NAME_CARD)) { this._parent = element; } if (this._settings.source === '') { throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.'); } } var _proto = CardRefresh.prototype; _proto.load = function load() { var _this = this; this._addOverlay(); this._settings.onLoadStart.call($__default['default'](this)); $__default['default'].get(this._settings.source, this._settings.params, function (response) { if (_this._settings.loadInContent) { if (_this._settings.sourceSelector !== '') { response = $__default['default'](response).find(_this._settings.sourceSelector).html(); } _this._parent.find(_this._settings.content).html(response); } _this._settings.onLoadDone.call($__default['default'](_this), response); _this._removeOverlay(); }, this._settings.responseType !== '' && this._settings.responseType); $__default['default'](this._element).trigger($__default['default'].Event(EVENT_LOADED)); }; _proto._addOverlay = function _addOverlay() { this._parent.append(this._overlay); $__default['default'](this._element).trigger($__default['default'].Event(EVENT_OVERLAY_ADDED)); }; _proto._removeOverlay = function _removeOverlay() { this._parent.find(this._overlay).remove(); $__default['default'](this._element).trigger($__default['default'].Event(EVENT_OVERLAY_REMOVED)); } // Private ; _proto._init = function _init() { var _this2 = this; $__default['default'](this).find(this._settings.trigger).on('click', function () { _this2.load(); }); if (this._settings.loadOnInit) { this.load(); } } // Static ; CardRefresh._jQueryInterface = function _jQueryInterface(config) { var data = $__default['default'](this).data(DATA_KEY); var _options = $__default['default'].extend({}, Default, $__default['default'](this).data()); if (!data) { data = new CardRefresh($__default['default'](this), _options); $__default['default'](this).data(DATA_KEY, typeof config === 'string' ? data : config); } if (typeof config === 'string' && config.match(/load/)) { data[config](); } else { data._init($__default['default'](this)); } }; return CardRefresh; }(); /** * Data API * ==================================================== */ $__default['default'](document).on('click', SELECTOR_DATA_REFRESH, function (event) { if (event) { event.preventDefault(); } CardRefresh._jQueryInterface.call($__default['default'](this), 'load'); }); $__default['default'](function () { $__default['default'](SELECTOR_DATA_REFRESH).each(function () { CardRefresh._jQueryInterface.call($__default['default'](this)); }); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME] = CardRefresh._jQueryInterface; $__default['default'].fn[NAME].Constructor = CardRefresh; $__default['default'].fn[NAME].noConflict = function () { $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT; return CardRefresh._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE CardWidget.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$1 = 'CardWidget'; var DATA_KEY$1 = 'lte.cardwidget'; var EVENT_KEY$1 = "." + DATA_KEY$1; var JQUERY_NO_CONFLICT$1 = $__default['default'].fn[NAME$1]; var EVENT_EXPANDED = "expanded" + EVENT_KEY$1; var EVENT_COLLAPSED = "collapsed" + EVENT_KEY$1; var EVENT_MAXIMIZED = "maximized" + EVENT_KEY$1; var EVENT_MINIMIZED = "minimized" + EVENT_KEY$1; var EVENT_REMOVED = "removed" + EVENT_KEY$1; var CLASS_NAME_CARD$1 = 'card'; var CLASS_NAME_COLLAPSED = 'collapsed-card'; var CLASS_NAME_COLLAPSING = 'collapsing-card'; var CLASS_NAME_EXPANDING = 'expanding-card'; var CLASS_NAME_WAS_COLLAPSED = 'was-collapsed'; var CLASS_NAME_MAXIMIZED = 'maximized-card'; var SELECTOR_DATA_REMOVE = '[data-card-widget="remove"]'; var SELECTOR_DATA_COLLAPSE = '[data-card-widget="collapse"]'; var SELECTOR_DATA_MAXIMIZE = '[data-card-widget="maximize"]'; var SELECTOR_CARD$1 = "." + CLASS_NAME_CARD$1; var SELECTOR_CARD_HEADER = '.card-header'; var SELECTOR_CARD_BODY = '.card-body'; var SELECTOR_CARD_FOOTER = '.card-footer'; var Default$1 = { animationSpeed: 'normal', collapseTrigger: SELECTOR_DATA_COLLAPSE, removeTrigger: SELECTOR_DATA_REMOVE, maximizeTrigger: SELECTOR_DATA_MAXIMIZE, collapseIcon: 'fa-minus', expandIcon: 'fa-plus', maximizeIcon: 'fa-expand', minimizeIcon: 'fa-compress' }; var CardWidget = /*#__PURE__*/function () { function CardWidget(element, settings) { this._element = element; this._parent = element.parents(SELECTOR_CARD$1).first(); if (element.hasClass(CLASS_NAME_CARD$1)) { this._parent = element; } this._settings = $__default['default'].extend({}, Default$1, settings); } var _proto = CardWidget.prototype; _proto.collapse = function collapse() { var _this = this; this._parent.addClass(CLASS_NAME_COLLAPSING).children(SELECTOR_CARD_BODY + ", " + SELECTOR_CARD_FOOTER).slideUp(this._settings.animationSpeed, function () { _this._parent.addClass(CLASS_NAME_COLLAPSED).removeClass(CLASS_NAME_COLLAPSING); }); this._parent.find("> " + SELECTOR_CARD_HEADER + " " + this._settings.collapseTrigger + " ." + this._settings.collapseIcon).addClass(this._settings.expandIcon).removeClass(this._settings.collapseIcon); this._element.trigger($__default['default'].Event(EVENT_COLLAPSED), this._parent); }; _proto.expand = function expand() { var _this2 = this; this._parent.addClass(CLASS_NAME_EXPANDING).children(SELECTOR_CARD_BODY + ", " + SELECTOR_CARD_FOOTER).slideDown(this._settings.animationSpeed, function () { _this2._parent.removeClass(CLASS_NAME_COLLAPSED).removeClass(CLASS_NAME_EXPANDING); }); this._parent.find("> " + SELECTOR_CARD_HEADER + " " + this._settings.collapseTrigger + " ." + this._settings.expandIcon).addClass(this._settings.collapseIcon).removeClass(this._settings.expandIcon); this._element.trigger($__default['default'].Event(EVENT_EXPANDED), this._parent); }; _proto.remove = function remove() { this._parent.slideUp(); this._element.trigger($__default['default'].Event(EVENT_REMOVED), this._parent); }; _proto.toggle = function toggle() { if (this._parent.hasClass(CLASS_NAME_COLLAPSED)) { this.expand(); return; } this.collapse(); }; _proto.maximize = function maximize() { this._parent.find(this._settings.maximizeTrigger + " ." + this._settings.maximizeIcon).addClass(this._settings.minimizeIcon).removeClass(this._settings.maximizeIcon); this._parent.css({ height: this._parent.height(), width: this._parent.width(), transition: 'all .15s' }).delay(150).queue(function () { var $element = $__default['default'](this); $element.addClass(CLASS_NAME_MAXIMIZED); $__default['default']('html').addClass(CLASS_NAME_MAXIMIZED); if ($element.hasClass(CLASS_NAME_COLLAPSED)) { $element.addClass(CLASS_NAME_WAS_COLLAPSED); } $element.dequeue(); }); this._element.trigger($__default['default'].Event(EVENT_MAXIMIZED), this._parent); }; _proto.minimize = function minimize() { this._parent.find(this._settings.maximizeTrigger + " ." + this._settings.minimizeIcon).addClass(this._settings.maximizeIcon).removeClass(this._settings.minimizeIcon); this._parent.css('cssText', "height: " + this._parent[0].style.height + " !important; width: " + this._parent[0].style.width + " !important; transition: all .15s;").delay(10).queue(function () { var $element = $__default['default'](this); $element.removeClass(CLASS_NAME_MAXIMIZED); $__default['default']('html').removeClass(CLASS_NAME_MAXIMIZED); $element.css({ height: 'inherit', width: 'inherit' }); if ($element.hasClass(CLASS_NAME_WAS_COLLAPSED)) { $element.removeClass(CLASS_NAME_WAS_COLLAPSED); } $element.dequeue(); }); this._element.trigger($__default['default'].Event(EVENT_MINIMIZED), this._parent); }; _proto.toggleMaximize = function toggleMaximize() { if (this._parent.hasClass(CLASS_NAME_MAXIMIZED)) { this.minimize(); return; } this.maximize(); } // Private ; _proto._init = function _init(card) { var _this3 = this; this._parent = card; $__default['default'](this).find(this._settings.collapseTrigger).click(function () { _this3.toggle(); }); $__default['default'](this).find(this._settings.maximizeTrigger).click(function () { _this3.toggleMaximize(); }); $__default['default'](this).find(this._settings.removeTrigger).click(function () { _this3.remove(); }); } // Static ; CardWidget._jQueryInterface = function _jQueryInterface(config) { var data = $__default['default'](this).data(DATA_KEY$1); var _options = $__default['default'].extend({}, Default$1, $__default['default'](this).data()); if (!data) { data = new CardWidget($__default['default'](this), _options); $__default['default'](this).data(DATA_KEY$1, typeof config === 'string' ? data : config); } if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) { data[config](); } else if (typeof config === 'object') { data._init($__default['default'](this)); } }; return CardWidget; }(); /** * Data API * ==================================================== */ $__default['default'](document).on('click', SELECTOR_DATA_COLLAPSE, function (event) { if (event) { event.preventDefault(); } CardWidget._jQueryInterface.call($__default['default'](this), 'toggle'); }); $__default['default'](document).on('click', SELECTOR_DATA_REMOVE, function (event) { if (event) { event.preventDefault(); } CardWidget._jQueryInterface.call($__default['default'](this), 'remove'); }); $__default['default'](document).on('click', SELECTOR_DATA_MAXIMIZE, function (event) { if (event) { event.preventDefault(); } CardWidget._jQueryInterface.call($__default['default'](this), 'toggleMaximize'); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$1] = CardWidget._jQueryInterface; $__default['default'].fn[NAME$1].Constructor = CardWidget; $__default['default'].fn[NAME$1].noConflict = function () { $__default['default'].fn[NAME$1] = JQUERY_NO_CONFLICT$1; return CardWidget._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE ControlSidebar.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$2 = 'ControlSidebar'; var DATA_KEY$2 = 'lte.controlsidebar'; var EVENT_KEY$2 = "." + DATA_KEY$2; var JQUERY_NO_CONFLICT$2 = $__default['default'].fn[NAME$2]; var EVENT_COLLAPSED$1 = "collapsed" + EVENT_KEY$2; var EVENT_EXPANDED$1 = "expanded" + EVENT_KEY$2; var SELECTOR_CONTROL_SIDEBAR = '.control-sidebar'; var SELECTOR_CONTROL_SIDEBAR_CONTENT = '.control-sidebar-content'; var SELECTOR_DATA_TOGGLE = '[data-widget="control-sidebar"]'; var SELECTOR_HEADER = '.main-header'; var SELECTOR_FOOTER = '.main-footer'; var CLASS_NAME_CONTROL_SIDEBAR_ANIMATE = 'control-sidebar-animate'; var CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open'; var CLASS_NAME_CONTROL_SIDEBAR_SLIDE = 'control-sidebar-slide-open'; var CLASS_NAME_LAYOUT_FIXED = 'layout-fixed'; var CLASS_NAME_NAVBAR_FIXED = 'layout-navbar-fixed'; var CLASS_NAME_NAVBAR_SM_FIXED = 'layout-sm-navbar-fixed'; var CLASS_NAME_NAVBAR_MD_FIXED = 'layout-md-navbar-fixed'; var CLASS_NAME_NAVBAR_LG_FIXED = 'layout-lg-navbar-fixed'; var CLASS_NAME_NAVBAR_XL_FIXED = 'layout-xl-navbar-fixed'; var CLASS_NAME_FOOTER_FIXED = 'layout-footer-fixed'; var CLASS_NAME_FOOTER_SM_FIXED = 'layout-sm-footer-fixed'; var CLASS_NAME_FOOTER_MD_FIXED = 'layout-md-footer-fixed'; var CLASS_NAME_FOOTER_LG_FIXED = 'layout-lg-footer-fixed'; var CLASS_NAME_FOOTER_XL_FIXED = 'layout-xl-footer-fixed'; var Default$2 = { controlsidebarSlide: true, scrollbarTheme: 'os-theme-light', scrollbarAutoHide: 'l' }; /** * Class Definition * ==================================================== */ var ControlSidebar = /*#__PURE__*/function () { function ControlSidebar(element, config) { this._element = element; this._config = config; this._init(); } // Public var _proto = ControlSidebar.prototype; _proto.collapse = function collapse() { var $body = $__default['default']('body'); var $html = $__default['default']('html'); // Show the control sidebar if (this._config.controlsidebarSlide) { $html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE); $body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () { $__default['default'](SELECTOR_CONTROL_SIDEBAR).hide(); $html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE); $__default['default'](this).dequeue(); }); } else { $body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN); } $__default['default'](this._element).trigger($__default['default'].Event(EVENT_COLLAPSED$1)); }; _proto.show = function show() { var $body = $__default['default']('body'); var $html = $__default['default']('html'); // Collapse the control sidebar if (this._config.controlsidebarSlide) { $html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE); $__default['default'](SELECTOR_CONTROL_SIDEBAR).show().delay(10).queue(function () { $body.addClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () { $html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE); $__default['default'](this).dequeue(); }); $__default['default'](this).dequeue(); }); } else { $body.addClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN); } this._fixHeight(); this._fixScrollHeight(); $__default['default'](this._element).trigger($__default['default'].Event(EVENT_EXPANDED$1)); }; _proto.toggle = function toggle() { var $body = $__default['default']('body'); var shouldClose = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE); if (shouldClose) { // Close the control sidebar this.collapse(); } else { // Open the control sidebar this.show(); } } // Private ; _proto._init = function _init() { var _this = this; this._fixHeight(); this._fixScrollHeight(); $__default['default'](window).resize(function () { _this._fixHeight(); _this._fixScrollHeight(); }); $__default['default'](window).scroll(function () { var $body = $__default['default']('body'); var shouldFixHeight = $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE); if (shouldFixHeight) { _this._fixScrollHeight(); } }); }; _proto._fixScrollHeight = function _fixScrollHeight() { var $body = $__default['default']('body'); if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) { return; } var heights = { scroll: $__default['default'](document).height(), window: $__default['default'](window).height(), header: $__default['default'](SELECTOR_HEADER).outerHeight(), footer: $__default['default'](SELECTOR_FOOTER).outerHeight() }; var positions = { bottom: Math.abs(heights.window + $__default['default'](window).scrollTop() - heights.scroll), top: $__default['default'](window).scrollTop() }; var navbarFixed = ($body.hasClass(CLASS_NAME_NAVBAR_FIXED) || $body.hasClass(CLASS_NAME_NAVBAR_SM_FIXED) || $body.hasClass(CLASS_NAME_NAVBAR_MD_FIXED) || $body.hasClass(CLASS_NAME_NAVBAR_LG_FIXED) || $body.hasClass(CLASS_NAME_NAVBAR_XL_FIXED)) && $__default['default'](SELECTOR_HEADER).css('position') === 'fixed'; var footerFixed = ($body.hasClass(CLASS_NAME_FOOTER_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_SM_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_MD_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_LG_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_XL_FIXED)) && $__default['default'](SELECTOR_FOOTER).css('position') === 'fixed'; var $controlSidebar = $__default['default'](SELECTOR_CONTROL_SIDEBAR); var $controlsidebarContent = $__default['default'](SELECTOR_CONTROL_SIDEBAR + ", " + SELECTOR_CONTROL_SIDEBAR + " " + SELECTOR_CONTROL_SIDEBAR_CONTENT); if (positions.top === 0 && positions.bottom === 0) { $controlSidebar.css({ bottom: heights.footer, top: heights.header }); $controlsidebarContent.css('height', heights.window - (heights.header + heights.footer)); } else if (positions.bottom <= heights.footer) { if (footerFixed === false) { var top = heights.header - positions.top; $controlSidebar.css('bottom', heights.footer - positions.bottom).css('top', top >= 0 ? top : 0); $controlsidebarContent.css('height', heights.window - (heights.footer - positions.bottom)); } else { $controlSidebar.css('bottom', heights.footer); } } else if (positions.top <= heights.header) { if (navbarFixed === false) { $controlSidebar.css('top', heights.header - positions.top); $controlsidebarContent.css('height', heights.window - (heights.header - positions.top)); } else { $controlSidebar.css('top', heights.header); } } else if (navbarFixed === false) { $controlSidebar.css('top', 0); $controlsidebarContent.css('height', heights.window); } else { $controlSidebar.css('top', heights.header); } }; _proto._fixHeight = function _fixHeight() { var $body = $__default['default']('body'); if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED)) { return; } var heights = { window: $__default['default'](window).height(), header: $__default['default'](SELECTOR_HEADER).outerHeight(), footer: $__default['default'](SELECTOR_FOOTER).outerHeight() }; var sidebarHeight = heights.window - heights.header; if ($body.hasClass(CLASS_NAME_FOOTER_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_SM_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_MD_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_LG_FIXED) || $body.hasClass(CLASS_NAME_FOOTER_XL_FIXED)) { if ($__default['default'](SELECTOR_FOOTER).css('position') === 'fixed') { sidebarHeight = heights.window - heights.header - heights.footer; } } var $controlSidebar = $__default['default'](SELECTOR_CONTROL_SIDEBAR + " " + SELECTOR_CONTROL_SIDEBAR_CONTENT); $controlSidebar.css('height', sidebarHeight); if (typeof $__default['default'].fn.overlayScrollbars !== 'undefined') { $controlSidebar.overlayScrollbars({ className: this._config.scrollbarTheme, sizeAutoCapable: true, scrollbars: { autoHide: this._config.scrollbarAutoHide, clickScrolling: true } }); } } // Static ; ControlSidebar._jQueryInterface = function _jQueryInterface(operation) { return this.each(function () { var data = $__default['default'](this).data(DATA_KEY$2); var _options = $__default['default'].extend({}, Default$2, $__default['default'](this).data()); if (!data) { data = new ControlSidebar(this, _options); $__default['default'](this).data(DATA_KEY$2, data); } if (data[operation] === 'undefined') { throw new Error(operation + " is not a function"); } data[operation](); }); }; return ControlSidebar; }(); /** * * Data Api implementation * ==================================================== */ $__default['default'](document).on('click', SELECTOR_DATA_TOGGLE, function (event) { event.preventDefault(); ControlSidebar._jQueryInterface.call($__default['default'](this), 'toggle'); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$2] = ControlSidebar._jQueryInterface; $__default['default'].fn[NAME$2].Constructor = ControlSidebar; $__default['default'].fn[NAME$2].noConflict = function () { $__default['default'].fn[NAME$2] = JQUERY_NO_CONFLICT$2; return ControlSidebar._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE DirectChat.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$3 = 'DirectChat'; var DATA_KEY$3 = 'lte.directchat'; var EVENT_KEY$3 = "." + DATA_KEY$3; var JQUERY_NO_CONFLICT$3 = $__default['default'].fn[NAME$3]; var EVENT_TOGGLED = "toggled" + EVENT_KEY$3; var SELECTOR_DATA_TOGGLE$1 = '[data-widget="chat-pane-toggle"]'; var SELECTOR_DIRECT_CHAT = '.direct-chat'; var CLASS_NAME_DIRECT_CHAT_OPEN = 'direct-chat-contacts-open'; /** * Class Definition * ==================================================== */ var DirectChat = /*#__PURE__*/function () { function DirectChat(element) { this._element = element; } var _proto = DirectChat.prototype; _proto.toggle = function toggle() { $__default['default'](this._element).parents(SELECTOR_DIRECT_CHAT).first().toggleClass(CLASS_NAME_DIRECT_CHAT_OPEN); $__default['default'](this._element).trigger($__default['default'].Event(EVENT_TOGGLED)); } // Static ; DirectChat._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { var data = $__default['default'](this).data(DATA_KEY$3); if (!data) { data = new DirectChat($__default['default'](this)); $__default['default'](this).data(DATA_KEY$3, data); } data[config](); }); }; return DirectChat; }(); /** * * Data Api implementation * ==================================================== */ $__default['default'](document).on('click', SELECTOR_DATA_TOGGLE$1, function (event) { if (event) { event.preventDefault(); } DirectChat._jQueryInterface.call($__default['default'](this), 'toggle'); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$3] = DirectChat._jQueryInterface; $__default['default'].fn[NAME$3].Constructor = DirectChat; $__default['default'].fn[NAME$3].noConflict = function () { $__default['default'].fn[NAME$3] = JQUERY_NO_CONFLICT$3; return DirectChat._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE Dropdown.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$4 = 'Dropdown'; var DATA_KEY$4 = 'lte.dropdown'; var JQUERY_NO_CONFLICT$4 = $__default['default'].fn[NAME$4]; var SELECTOR_NAVBAR = '.navbar'; var SELECTOR_DROPDOWN_MENU = '.dropdown-menu'; var SELECTOR_DROPDOWN_MENU_ACTIVE = '.dropdown-menu.show'; var SELECTOR_DROPDOWN_TOGGLE = '[data-toggle="dropdown"]'; var CLASS_NAME_DROPDOWN_RIGHT = 'dropdown-menu-right'; var CLASS_NAME_DROPDOWN_SUBMENU = 'dropdown-submenu'; // TODO: this is unused; should be removed along with the extend? var Default$3 = {}; /** * Class Definition * ==================================================== */ var Dropdown = /*#__PURE__*/function () { function Dropdown(element, config) { this._config = config; this._element = element; } // Public var _proto = Dropdown.prototype; _proto.toggleSubmenu = function toggleSubmenu() { this._element.siblings().show().toggleClass('show'); if (!this._element.next().hasClass('show')) { this._element.parents(SELECTOR_DROPDOWN_MENU).first().find('.show').removeClass('show').hide(); } this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function () { $__default['default']('.dropdown-submenu .show').removeClass('show').hide(); }); }; _proto.fixPosition = function fixPosition() { var $element = $__default['default'](SELECTOR_DROPDOWN_MENU_ACTIVE); if ($element.length === 0) { return; } if ($element.hasClass(CLASS_NAME_DROPDOWN_RIGHT)) { $element.css({ left: 'inherit', right: 0 }); } else { $element.css({ left: 0, right: 'inherit' }); } var offset = $element.offset(); var width = $element.width(); var visiblePart = $__default['default'](window).width() - offset.left; if (offset.left < 0) { $element.css({ left: 'inherit', right: offset.left - 5 }); } else if (visiblePart < width) { $element.css({ left: 'inherit', right: 0 }); } } // Static ; Dropdown._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { var data = $__default['default'](this).data(DATA_KEY$4); var _config = $__default['default'].extend({}, Default$3, $__default['default'](this).data()); if (!data) { data = new Dropdown($__default['default'](this), _config); $__default['default'](this).data(DATA_KEY$4, data); } if (config === 'toggleSubmenu' || config === 'fixPosition') { data[config](); } }); }; return Dropdown; }(); /** * Data API * ==================================================== */ $__default['default'](SELECTOR_DROPDOWN_MENU + " " + SELECTOR_DROPDOWN_TOGGLE).on('click', function (event) { event.preventDefault(); event.stopPropagation(); Dropdown._jQueryInterface.call($__default['default'](this), 'toggleSubmenu'); }); $__default['default'](SELECTOR_NAVBAR + " " + SELECTOR_DROPDOWN_TOGGLE).on('click', function (event) { event.preventDefault(); if ($__default['default'](event.target).parent().hasClass(CLASS_NAME_DROPDOWN_SUBMENU)) { return; } setTimeout(function () { Dropdown._jQueryInterface.call($__default['default'](this), 'fixPosition'); }, 1); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$4] = Dropdown._jQueryInterface; $__default['default'].fn[NAME$4].Constructor = Dropdown; $__default['default'].fn[NAME$4].noConflict = function () { $__default['default'].fn[NAME$4] = JQUERY_NO_CONFLICT$4; return Dropdown._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE ExpandableTable.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$5 = 'ExpandableTable'; var DATA_KEY$5 = 'lte.expandableTable'; var EVENT_KEY$4 = "." + DATA_KEY$5; var JQUERY_NO_CONFLICT$5 = $__default['default'].fn[NAME$5]; var EVENT_EXPANDED$2 = "expanded" + EVENT_KEY$4; var EVENT_COLLAPSED$2 = "collapsed" + EVENT_KEY$4; var SELECTOR_TABLE = '.expandable-table'; var SELECTOR_DATA_TOGGLE$2 = '[data-widget="expandable-table"]'; var SELECTOR_ARIA_ATTR = 'aria-expanded'; /** * Class Definition * ==================================================== */ var ExpandableTable = /*#__PURE__*/function () { function ExpandableTable(element, options) { this._options = options; this._element = element; } // Public var _proto = ExpandableTable.prototype; _proto.init = function init() { $__default['default'](SELECTOR_DATA_TOGGLE$2).each(function (_, $header) { var $type = $__default['default']($header).attr(SELECTOR_ARIA_ATTR); var $body = $__default['default']($header).next().children().first().children(); if ($type === 'true') { $body.show(); } else if ($type === 'false') { $body.hide(); $body.parent().parent().addClass('d-none'); } }); }; _proto.toggleRow = function toggleRow() { var $element = this._element; var time = 500; var $type = $element.attr(SELECTOR_ARIA_ATTR); var $body = $element.next().children().first().children(); $body.stop(); if ($type === 'true') { $body.slideUp(time, function () { $element.next().addClass('d-none'); }); $element.attr(SELECTOR_ARIA_ATTR, 'false'); $element.trigger($__default['default'].Event(EVENT_COLLAPSED$2)); } else if ($type === 'false') { $element.next().removeClass('d-none'); $body.slideDown(time); $element.attr(SELECTOR_ARIA_ATTR, 'true'); $element.trigger($__default['default'].Event(EVENT_EXPANDED$2)); } } // Static ; ExpandableTable._jQueryInterface = function _jQueryInterface(operation) { return this.each(function () { var data = $__default['default'](this).data(DATA_KEY$5); if (!data) { data = new ExpandableTable($__default['default'](this)); $__default['default'](this).data(DATA_KEY$5, data); } if (typeof operation === 'string' && operation.match(/init|toggleRow/)) { data[operation](); } }); }; return ExpandableTable; }(); /** * Data API * ==================================================== */ $__default['default'](SELECTOR_TABLE).ready(function () { ExpandableTable._jQueryInterface.call($__default['default'](this), 'init'); }); $__default['default'](document).on('click', SELECTOR_DATA_TOGGLE$2, function () { ExpandableTable._jQueryInterface.call($__default['default'](this), 'toggleRow'); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$5] = ExpandableTable._jQueryInterface; $__default['default'].fn[NAME$5].Constructor = ExpandableTable; $__default['default'].fn[NAME$5].noConflict = function () { $__default['default'].fn[NAME$5] = JQUERY_NO_CONFLICT$5; return ExpandableTable._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE Fullscreen.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$6 = 'Fullscreen'; var DATA_KEY$6 = 'lte.fullscreen'; var JQUERY_NO_CONFLICT$6 = $__default['default'].fn[NAME$6]; var SELECTOR_DATA_WIDGET = '[data-widget="fullscreen"]'; var SELECTOR_ICON = SELECTOR_DATA_WIDGET + " i"; var Default$4 = { minimizeIcon: 'fa-compress-arrows-alt', maximizeIcon: 'fa-expand-arrows-alt' }; /** * Class Definition * ==================================================== */ var Fullscreen = /*#__PURE__*/function () { function Fullscreen(_element, _options) { this.element = _element; this.options = $__default['default'].extend({}, Default$4, _options); } // Public var _proto = Fullscreen.prototype; _proto.toggle = function toggle() { if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement) { this.windowed(); } else { this.fullscreen(); } }; _proto.fullscreen = function fullscreen() { if (document.documentElement.requestFullscreen) { document.documentElement.requestFullscreen(); } else if (document.documentElement.webkitRequestFullscreen) { document.documentElement.webkitRequestFullscreen(); } else if (document.documentElement.msRequestFullscreen) { document.documentElement.msRequestFullscreen(); } $__default['default'](SELECTOR_ICON).removeClass(this.options.maximizeIcon).addClass(this.options.minimizeIcon); }; _proto.windowed = function windowed() { if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } $__default['default'](SELECTOR_ICON).removeClass(this.options.minimizeIcon).addClass(this.options.maximizeIcon); } // Static ; Fullscreen._jQueryInterface = function _jQueryInterface(config) { var data = $__default['default'](this).data(DATA_KEY$6); if (!data) { data = $__default['default'](this).data(); } var _options = $__default['default'].extend({}, Default$4, typeof config === 'object' ? config : data); var plugin = new Fullscreen($__default['default'](this), _options); $__default['default'](this).data(DATA_KEY$6, typeof config === 'object' ? config : data); if (typeof config === 'string' && config.match(/toggle|fullscreen|windowed/)) { plugin[config](); } else { plugin.init(); } }; return Fullscreen; }(); /** * Data API * ==================================================== */ $__default['default'](document).on('click', SELECTOR_DATA_WIDGET, function () { Fullscreen._jQueryInterface.call($__default['default'](this), 'toggle'); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$6] = Fullscreen._jQueryInterface; $__default['default'].fn[NAME$6].Constructor = Fullscreen; $__default['default'].fn[NAME$6].noConflict = function () { $__default['default'].fn[NAME$6] = JQUERY_NO_CONFLICT$6; return Fullscreen._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE Layout.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$7 = 'Layout'; var DATA_KEY$7 = 'lte.layout'; var JQUERY_NO_CONFLICT$7 = $__default['default'].fn[NAME$7]; var SELECTOR_HEADER$1 = '.main-header'; var SELECTOR_MAIN_SIDEBAR = '.main-sidebar'; var SELECTOR_SIDEBAR = '.main-sidebar .sidebar'; var SELECTOR_CONTENT = '.content-wrapper'; var SELECTOR_CONTROL_SIDEBAR_CONTENT$1 = '.control-sidebar-content'; var SELECTOR_CONTROL_SIDEBAR_BTN = '[data-widget="control-sidebar"]'; var SELECTOR_FOOTER$1 = '.main-footer'; var SELECTOR_PUSHMENU_BTN = '[data-widget="pushmenu"]'; var SELECTOR_LOGIN_BOX = '.login-box'; var SELECTOR_REGISTER_BOX = '.register-box'; var CLASS_NAME_SIDEBAR_FOCUSED = 'sidebar-focused'; var CLASS_NAME_LAYOUT_FIXED$1 = 'layout-fixed'; var CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN = 'control-sidebar-slide-open'; var CLASS_NAME_CONTROL_SIDEBAR_OPEN$1 = 'control-sidebar-open'; var Default$5 = { scrollbarTheme: 'os-theme-light', scrollbarAutoHide: 'l', panelAutoHeight: true, loginRegisterAutoHeight: true }; /** * Class Definition * ==================================================== */ var Layout = /*#__PURE__*/function () { function Layout(element, config) { this._config = config; this._element = element; this._init(); } // Public var _proto = Layout.prototype; _proto.fixLayoutHeight = function fixLayoutHeight(extra) { if (extra === void 0) { extra = null; } var $body = $__default['default']('body'); var controlSidebar = 0; if ($body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN) || $body.hasClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN$1) || extra === 'control_sidebar') { controlSidebar = $__default['default'](SELECTOR_CONTROL_SIDEBAR_CONTENT$1).height(); } var heights = { window: $__default['default'](window).height(), header: $__default['default'](SELECTOR_HEADER$1).length !== 0 ? $__default['default'](SELECTOR_HEADER$1).outerHeight() : 0, footer: $__default['default'](SELECTOR_FOOTER$1).length !== 0 ? $__default['default'](SELECTOR_FOOTER$1).outerHeight() : 0, sidebar: $__default['default'](SELECTOR_SIDEBAR).length !== 0 ? $__default['default'](SELECTOR_SIDEBAR).height() : 0, controlSidebar: controlSidebar }; var max = this._max(heights); var offset = this._config.panelAutoHeight; if (offset === true) { offset = 0; } var $contentSelector = $__default['default'](SELECTOR_CONTENT); if (offset !== false) { if (max === heights.controlSidebar) { $contentSelector.css('min-height', max + offset); } else if (max === heights.window) { $contentSelector.css('min-height', max + offset - heights.header - heights.footer); } else { $contentSelector.css('min-height', max + offset - heights.header); } if (this._isFooterFixed()) { $contentSelector.css('min-height', parseFloat($contentSelector.css('min-height')) + heights.footer); } } if (!$body.hasClass(CLASS_NAME_LAYOUT_FIXED$1)) { return; } if (offset !== false) { $contentSelector.css('min-height', max + offset - heights.header - heights.footer); } if (typeof $__default['default'].fn.overlayScrollbars !== 'undefined') { $__default['default'](SELECTOR_SIDEBAR).overlayScrollbars({ className: this._config.scrollbarTheme, sizeAutoCapable: true, scrollbars: { autoHide: this._config.scrollbarAutoHide, clickScrolling: true } }); } }; _proto.fixLoginRegisterHeight = function fixLoginRegisterHeight() { var $body = $__default['default']('body'); var $selector = $__default['default'](SELECTOR_LOGIN_BOX + ", " + SELECTOR_REGISTER_BOX); if ($selector.length === 0) { $body.css('height', 'auto'); $__default['default']('html').css('height', 'auto'); } else { var boxHeight = $selector.height(); if ($body.css('min-height') !== boxHeight) { $body.css('min-height', boxHeight); } } } // Private ; _proto._init = function _init() { var _this = this; // Activate layout height watcher this.fixLayoutHeight(); if (this._config.loginRegisterAutoHeight === true) { this.fixLoginRegisterHeight(); } else if (this._config.loginRegisterAutoHeight === parseInt(this._config.loginRegisterAutoHeight, 10)) { setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight); } $__default['default'](SELECTOR_SIDEBAR).on('collapsed.lte.treeview expanded.lte.treeview', function () { _this.fixLayoutHeight(); }); $__default['default'](SELECTOR_PUSHMENU_BTN).on('collapsed.lte.pushmenu shown.lte.pushmenu', function () { _this.fixLayoutHeight(); }); $__default['default'](SELECTOR_CONTROL_SIDEBAR_BTN).on('collapsed.lte.controlsidebar', function () { _this.fixLayoutHeight(); }).on('expanded.lte.controlsidebar', function () { _this.fixLayoutHeight('control_sidebar'); }); $__default['default'](window).resize(function () { _this.fixLayoutHeight(); }); setTimeout(function () { $__default['default']('body.hold-transition').removeClass('hold-transition'); }, 50); }; _proto._max = function _max(numbers) { // Calculate the maximum number in a list var max = 0; Object.keys(numbers).forEach(function (key) { if (numbers[key] > max) { max = numbers[key]; } }); return max; }; _proto._isFooterFixed = function _isFooterFixed() { return $__default['default'](SELECTOR_FOOTER$1).css('position') === 'fixed'; } // Static ; Layout._jQueryInterface = function _jQueryInterface(config) { if (config === void 0) { config = ''; } return this.each(function () { var data = $__default['default'](this).data(DATA_KEY$7); var _options = $__default['default'].extend({}, Default$5, $__default['default'](this).data()); if (!data) { data = new Layout($__default['default'](this), _options); $__default['default'](this).data(DATA_KEY$7, data); } if (config === 'init' || config === '') { data._init(); } else if (config === 'fixLayoutHeight' || config === 'fixLoginRegisterHeight') { data[config](); } }); }; return Layout; }(); /** * Data API * ==================================================== */ $__default['default'](window).on('load', function () { Layout._jQueryInterface.call($__default['default']('body')); }); $__default['default'](SELECTOR_SIDEBAR + " a").on('focusin', function () { $__default['default'](SELECTOR_MAIN_SIDEBAR).addClass(CLASS_NAME_SIDEBAR_FOCUSED); }); $__default['default'](SELECTOR_SIDEBAR + " a").on('focusout', function () { $__default['default'](SELECTOR_MAIN_SIDEBAR).removeClass(CLASS_NAME_SIDEBAR_FOCUSED); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$7] = Layout._jQueryInterface; $__default['default'].fn[NAME$7].Constructor = Layout; $__default['default'].fn[NAME$7].noConflict = function () { $__default['default'].fn[NAME$7] = JQUERY_NO_CONFLICT$7; return Layout._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE PushMenu.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$8 = 'PushMenu'; var DATA_KEY$8 = 'lte.pushmenu'; var EVENT_KEY$5 = "." + DATA_KEY$8; var JQUERY_NO_CONFLICT$8 = $__default['default'].fn[NAME$8]; var EVENT_COLLAPSED$3 = "collapsed" + EVENT_KEY$5; var EVENT_SHOWN = "shown" + EVENT_KEY$5; var SELECTOR_TOGGLE_BUTTON = '[data-widget="pushmenu"]'; var SELECTOR_BODY = 'body'; var SELECTOR_OVERLAY = '#sidebar-overlay'; var SELECTOR_WRAPPER = '.wrapper'; var CLASS_NAME_COLLAPSED$1 = 'sidebar-collapse'; var CLASS_NAME_OPEN = 'sidebar-open'; var CLASS_NAME_IS_OPENING = 'sidebar-is-opening'; var CLASS_NAME_CLOSED = 'sidebar-closed'; var Default$6 = { autoCollapseSize: 992, enableRemember: false, noTransitionAfterReload: true }; /** * Class Definition * ==================================================== */ var PushMenu = /*#__PURE__*/function () { function PushMenu(element, options) { this._element = element; this._options = $__default['default'].extend({}, Default$6, options); if ($__default['default'](SELECTOR_OVERLAY).length === 0) { this._addOverlay(); } this._init(); } // Public var _proto = PushMenu.prototype; _proto.expand = function expand() { var $bodySelector = $__default['default'](SELECTOR_BODY); if (this._options.autoCollapseSize) { if ($__default['default'](window).width() <= this._options.autoCollapseSize) { $bodySelector.addClass(CLASS_NAME_OPEN); } } $bodySelector.addClass(CLASS_NAME_IS_OPENING).removeClass(CLASS_NAME_COLLAPSED$1 + " " + CLASS_NAME_CLOSED).delay(50).queue(function () { $bodySelector.removeClass(CLASS_NAME_IS_OPENING); $__default['default'](this).dequeue(); }); if (this._options.enableRemember) { localStorage.setItem("remember" + EVENT_KEY$5, CLASS_NAME_OPEN); } $__default['default'](this._element).trigger($__default['default'].Event(EVENT_SHOWN)); }; _proto.collapse = function collapse() { var $bodySelector = $__default['default'](SELECTOR_BODY); if (this._options.autoCollapseSize) { if ($__default['default'](window).width() <= this._options.autoCollapseSize) { $bodySelector.removeClass(CLASS_NAME_OPEN).addClass(CLASS_NAME_CLOSED); } } $bodySelector.addClass(CLASS_NAME_COLLAPSED$1); if (this._options.enableRemember) { localStorage.setItem("remember" + EVENT_KEY$5, CLASS_NAME_COLLAPSED$1); } $__default['default'](this._element).trigger($__default['default'].Event(EVENT_COLLAPSED$3)); }; _proto.toggle = function toggle() { if ($__default['default'](SELECTOR_BODY).hasClass(CLASS_NAME_COLLAPSED$1)) { this.expand(); } else { this.collapse(); } }; _proto.autoCollapse = function autoCollapse(resize) { if (resize === void 0) { resize = false; } if (!this._options.autoCollapseSize) { return; } var $bodySelector = $__default['default'](SELECTOR_BODY); if ($__default['default'](window).width() <= this._options.autoCollapseSize) { if (!$bodySelector.hasClass(CLASS_NAME_OPEN)) { this.collapse(); } } else if (resize === true) { if ($bodySelector.hasClass(CLASS_NAME_OPEN)) { $bodySelector.removeClass(CLASS_NAME_OPEN); } else if ($bodySelector.hasClass(CLASS_NAME_CLOSED)) { this.expand(); } } }; _proto.remember = function remember() { if (!this._options.enableRemember) { return; } var $body = $__default['default']('body'); var toggleState = localStorage.getItem("remember" + EVENT_KEY$5); if (toggleState === CLASS_NAME_COLLAPSED$1) { if (this._options.noTransitionAfterReload) { $body.addClass('hold-transition').addClass(CLASS_NAME_COLLAPSED$1).delay(50).queue(function () { $__default['default'](this).removeClass('hold-transition'); $__default['default'](this).dequeue(); }); } else { $body.addClass(CLASS_NAME_COLLAPSED$1); } } else if (this._options.noTransitionAfterReload) { $body.addClass('hold-transition').removeClass(CLASS_NAME_COLLAPSED$1).delay(50).queue(function () { $__default['default'](this).removeClass('hold-transition'); $__default['default'](this).dequeue(); }); } else { $body.removeClass(CLASS_NAME_COLLAPSED$1); } } // Private ; _proto._init = function _init() { var _this = this; this.remember(); this.autoCollapse(); $__default['default'](window).resize(function () { _this.autoCollapse(true); }); }; _proto._addOverlay = function _addOverlay() { var _this2 = this; var overlay = $__default['default']('
', { id: 'sidebar-overlay' }); overlay.on('click', function () { _this2.collapse(); }); $__default['default'](SELECTOR_WRAPPER).append(overlay); } // Static ; PushMenu._jQueryInterface = function _jQueryInterface(operation) { return this.each(function () { var data = $__default['default'](this).data(DATA_KEY$8); var _options = $__default['default'].extend({}, Default$6, $__default['default'](this).data()); if (!data) { data = new PushMenu(this, _options); $__default['default'](this).data(DATA_KEY$8, data); } if (typeof operation === 'string' && operation.match(/collapse|expand|toggle/)) { data[operation](); } }); }; return PushMenu; }(); /** * Data API * ==================================================== */ $__default['default'](document).on('click', SELECTOR_TOGGLE_BUTTON, function (event) { event.preventDefault(); var button = event.currentTarget; if ($__default['default'](button).data('widget') !== 'pushmenu') { button = $__default['default'](button).closest(SELECTOR_TOGGLE_BUTTON); } PushMenu._jQueryInterface.call($__default['default'](button), 'toggle'); }); $__default['default'](window).on('load', function () { PushMenu._jQueryInterface.call($__default['default'](SELECTOR_TOGGLE_BUTTON)); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$8] = PushMenu._jQueryInterface; $__default['default'].fn[NAME$8].Constructor = PushMenu; $__default['default'].fn[NAME$8].noConflict = function () { $__default['default'].fn[NAME$8] = JQUERY_NO_CONFLICT$8; return PushMenu._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE SidebarSearch.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$9 = 'SidebarSearch'; var DATA_KEY$9 = 'lte.sidebar-search'; var JQUERY_NO_CONFLICT$9 = $__default['default'].fn[NAME$9]; var CLASS_NAME_OPEN$1 = 'sidebar-search-open'; var CLASS_NAME_ICON_SEARCH = 'fa-search'; var CLASS_NAME_ICON_CLOSE = 'fa-times'; var CLASS_NAME_HEADER = 'nav-header'; var CLASS_NAME_SEARCH_RESULTS = 'sidebar-search-results'; var CLASS_NAME_LIST_GROUP = 'list-group'; var SELECTOR_DATA_WIDGET$1 = '[data-widget="sidebar-search"]'; var SELECTOR_SIDEBAR$1 = '.main-sidebar .nav-sidebar'; var SELECTOR_NAV_LINK = '.nav-link'; var SELECTOR_NAV_TREEVIEW = '.nav-treeview'; var SELECTOR_SEARCH_INPUT = SELECTOR_DATA_WIDGET$1 + " .form-control"; var SELECTOR_SEARCH_BUTTON = SELECTOR_DATA_WIDGET$1 + " .btn"; var SELECTOR_SEARCH_ICON = SELECTOR_SEARCH_BUTTON + " i"; var SELECTOR_SEARCH_LIST_GROUP = "." + CLASS_NAME_LIST_GROUP; var SELECTOR_SEARCH_RESULTS = "." + CLASS_NAME_SEARCH_RESULTS; var SELECTOR_SEARCH_RESULTS_GROUP = SELECTOR_SEARCH_RESULTS + " ." + CLASS_NAME_LIST_GROUP; var Default$7 = { arrowSign: '->', minLength: 3, maxResults: 7, highlightName: true, highlightPath: false, highlightClass: 'text-light', notFoundText: 'No element found!' }; var SearchItems = []; /** * Class Definition * ==================================================== */ var SidebarSearch = /*#__PURE__*/function () { function SidebarSearch(_element, _options) { this.element = _element; this.options = $__default['default'].extend({}, Default$7, _options); this.items = []; } // Public var _proto = SidebarSearch.prototype; _proto.init = function init() { var _this = this; if ($__default['default'](SELECTOR_DATA_WIDGET$1).length == 0) { return; } if ($__default['default'](SELECTOR_DATA_WIDGET$1).next(SELECTOR_SEARCH_RESULTS).length == 0) { $__default['default'](SELECTOR_DATA_WIDGET$1).after($__default['default']('
', { class: CLASS_NAME_SEARCH_RESULTS })); } if ($__default['default'](SELECTOR_SEARCH_RESULTS).children(SELECTOR_SEARCH_LIST_GROUP).length == 0) { $__default['default'](SELECTOR_SEARCH_RESULTS).append($__default['default']('
', { class: CLASS_NAME_LIST_GROUP })); } this._addNotFound(); $__default['default'](SELECTOR_SIDEBAR$1).children().each(function (i, child) { _this._parseItem(child); }); }; _proto.search = function search() { var _this2 = this; var searchValue = $__default['default'](SELECTOR_SEARCH_INPUT).val().toLowerCase(); if (searchValue.length < this.options.minLength) { $__default['default'](SELECTOR_SEARCH_RESULTS_GROUP).empty(); this._addNotFound(); this.close(); return; } var searchResults = SearchItems.filter(function (item) { return item.name.toLowerCase().includes(searchValue); }); var endResults = $__default['default'](searchResults.slice(0, this.options.maxResults)); $__default['default'](SELECTOR_SEARCH_RESULTS_GROUP).empty(); if (endResults.length === 0) { this._addNotFound(); } else { endResults.each(function (i, result) { $__default['default'](SELECTOR_SEARCH_RESULTS_GROUP).append(_this2._renderItem(result.name, result.link, result.path)); }); } this.open(); }; _proto.open = function open() { $__default['default'](SELECTOR_DATA_WIDGET$1).parent().addClass(CLASS_NAME_OPEN$1); $__default['default'](SELECTOR_SEARCH_ICON).removeClass(CLASS_NAME_ICON_SEARCH).addClass(CLASS_NAME_ICON_CLOSE); }; _proto.close = function close() { $__default['default'](SELECTOR_DATA_WIDGET$1).parent().removeClass(CLASS_NAME_OPEN$1); $__default['default'](SELECTOR_SEARCH_ICON).removeClass(CLASS_NAME_ICON_CLOSE).addClass(CLASS_NAME_ICON_SEARCH); }; _proto.toggle = function toggle() { if ($__default['default'](SELECTOR_DATA_WIDGET$1).parent().hasClass(CLASS_NAME_OPEN$1)) { this.close(); } else { this.open(); } } // Private ; _proto._parseItem = function _parseItem(item, path) { var _this3 = this; if (path === void 0) { path = []; } if ($__default['default'](item).hasClass(CLASS_NAME_HEADER)) { return; } var itemObject = {}; var navLink = $__default['default'](item).clone().find("> " + SELECTOR_NAV_LINK); var navTreeview = $__default['default'](item).clone().find("> " + SELECTOR_NAV_TREEVIEW); var link = navLink.attr('href'); var name = navLink.find('p').children().remove().end().text(); itemObject.name = this._trimText(name); itemObject.link = link; itemObject.path = path; if (navTreeview.length === 0) { SearchItems.push(itemObject); } else { var newPath = itemObject.path.concat([itemObject.name]); navTreeview.children().each(function (i, child) { _this3._parseItem(child, newPath); }); } }; _proto._trimText = function _trimText(text) { return $.trim(text.replace(/(\r\n|\n|\r)/gm, ' ')); }; _proto._renderItem = function _renderItem(name, link, path) { var _this4 = this; path = path.join(" " + this.options.arrowSign + " "); if (this.options.highlightName || this.options.highlightPath) { var searchValue = $__default['default'](SELECTOR_SEARCH_INPUT).val().toLowerCase(); var regExp = new RegExp(searchValue, 'gi'); if (this.options.highlightName) { name = name.replace(regExp, function (str) { return "" + str + ""; }); } if (this.options.highlightPath) { path = path.replace(regExp, function (str) { return "" + str + ""; }); } } return "\n
\n " + name + "\n
\n
\n " + path + "\n
\n
"; }; _proto._addNotFound = function _addNotFound() { $__default['default'](SELECTOR_SEARCH_RESULTS_GROUP).append(this._renderItem(this.options.notFoundText, '#', [])); } // Static ; SidebarSearch._jQueryInterface = function _jQueryInterface(config) { var data = $__default['default'](this).data(DATA_KEY$9); if (!data) { data = $__default['default'](this).data(); } var _options = $__default['default'].extend({}, Default$7, typeof config === 'object' ? config : data); var plugin = new SidebarSearch($__default['default'](this), _options); $__default['default'](this).data(DATA_KEY$9, typeof config === 'object' ? config : data); if (typeof config === 'string' && config.match(/init|toggle|close|open|search/)) { plugin[config](); } else { plugin.init(); } }; return SidebarSearch; }(); /** * Data API * ==================================================== */ $__default['default'](document).on('click', SELECTOR_SEARCH_BUTTON, function (event) { event.preventDefault(); SidebarSearch._jQueryInterface.call($__default['default'](SELECTOR_DATA_WIDGET$1), 'toggle'); }); $__default['default'](document).on('keyup', SELECTOR_SEARCH_INPUT, function (event) { if (event.keyCode == 38) { event.preventDefault(); $__default['default'](SELECTOR_SEARCH_RESULTS_GROUP).children().last().focus(); return; } if (event.keyCode == 40) { event.preventDefault(); $__default['default'](SELECTOR_SEARCH_RESULTS_GROUP).children().first().focus(); return; } var timer = 0; clearTimeout(timer); timer = setTimeout(function () { SidebarSearch._jQueryInterface.call($__default['default'](SELECTOR_DATA_WIDGET$1), 'search'); }, 100); }); $__default['default'](document).on('keydown', SELECTOR_SEARCH_RESULTS_GROUP, function (event) { var $focused = $__default['default'](':focus'); if (event.keyCode == 38) { event.preventDefault(); if ($focused.is(':first-child')) { $focused.siblings().last().focus(); } else { $focused.prev().focus(); } } if (event.keyCode == 40) { event.preventDefault(); if ($focused.is(':last-child')) { $focused.siblings().first().focus(); } else { $focused.next().focus(); } } }); $__default['default'](window).on('load', function () { SidebarSearch._jQueryInterface.call($__default['default'](SELECTOR_DATA_WIDGET$1), 'init'); }); /** * jQuery API * ==================================================== */ $__default['default'].fn[NAME$9] = SidebarSearch._jQueryInterface; $__default['default'].fn[NAME$9].Constructor = SidebarSearch; $__default['default'].fn[NAME$9].noConflict = function () { $__default['default'].fn[NAME$9] = JQUERY_NO_CONFLICT$9; return SidebarSearch._jQueryInterface; }; /** * -------------------------------------------- * AdminLTE Toasts.js * License MIT * -------------------------------------------- */ /** * Constants * ==================================================== */ var NAME$a = 'Toasts'; var DATA_KEY$a = 'lte.toasts'; var EVENT_KEY$6 = "." + DATA_KEY$a; var JQUERY_NO_CONFLICT$a = $__default['default'].fn[NAME$a]; var EVENT_INIT = "init" + EVENT_KEY$6; var EVENT_CREATED = "created" + EVENT_KEY$6; var EVENT_REMOVED$1 = "removed" + EVENT_KEY$6; var SELECTOR_CONTAINER_TOP_RIGHT = '#toastsContainerTopRight'; var SELECTOR_CONTAINER_TOP_LEFT = '#toastsContainerTopLeft'; var SELECTOR_CONTAINER_BOTTOM_RIGHT = '#toastsContainerBottomRight'; var SELECTOR_CONTAINER_BOTTOM_LEFT = '#toastsContainerBottomLeft'; var CLASS_NAME_TOP_RIGHT = 'toasts-top-right'; var CLASS_NAME_TOP_LEFT = 'toasts-top-left'; var CLASS_NAME_BOTTOM_RIGHT = 'toasts-bottom-right'; var CLASS_NAME_BOTTOM_LEFT = 'toasts-bottom-left'; var POSITION_TOP_RIGHT = 'topRight'; var POSITION_TOP_LEFT = 'topLeft'; var POSITION_BOTTOM_RIGHT = 'bottomRight'; var POSITION_BOTTOM_LEFT = 'bottomLeft'; var Default$8 = { position: POSITION_TOP_RIGHT, fixed: true, autohide: false, autoremove: true, delay: 1000, fade: true, icon: null, image: null, imageAlt: null, imageHeight: '25px', title: null, subtitle: null, close: true, body: null, class: null }; /** * Class Definition * ==================================================== */ var Toasts = /*#__PURE__*/function () { function Toasts(element, config) { this._config = config; this._prepareContainer(); $__default['default']('body').trigger($__default['default'].Event(EVENT_INIT)); } // Public var _proto = Toasts.prototype; _proto.create = function create() { var toast = $__default['default']('