text: /*!
   * remark (http://getbootstrapadmin.com/remark)
   * Copyright 2017 amazingsurge
   * Licensed under the Themeforest Standard Licenses
   */
  !function(global,factory){if("function"==typeof define&&define.amd)define("/Site",["exports","jquery","Base","Menubar","Sidebar","PageAside","GridMenu"],factory);else if("undefined"!=typeof exports)factory(exports,require("jquery"),require("Base"),require("Menubar"),require("Sidebar"),require("PageAside"),require("GridMenu"));else{var mod={exports:{}};factory(mod.exports,global.jQuery,global.Base,global.SectionMenubar,global.SectionSidebar,global.SectionPageAside,global.SectionGridMenu),global.Site=mod.exports}}(this,function(exports,_jquery,_Base2,_Menubar,_Sidebar,_PageAside,_GridMenu){"use strict";function getInstance(){return instance||(instance=new Site),instance}function run(){var site=getInstance();site.run()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getInstance=exports.run=exports.Site=void 0;var _jquery2=babelHelpers.interopRequireDefault(_jquery),_Base3=babelHelpers.interopRequireDefault(_Base2),_Menubar2=babelHelpers.interopRequireDefault(_Menubar),_Sidebar2=babelHelpers.interopRequireDefault(_Sidebar),_PageAside2=babelHelpers.interopRequireDefault(_PageAside),_GridMenu2=babelHelpers.interopRequireDefault(_GridMenu),DOC=document,$DOC=(0,_jquery2.default)(document),$BODY=(0,_jquery2.default)("body"),Site=function(_Base){function Site(){return babelHelpers.classCallCheck(this,Site),babelHelpers.possibleConstructorReturn(this,(Site.__proto__||Object.getPrototypeOf(Site)).apply(this,arguments))}return babelHelpers.inherits(Site,_Base),babelHelpers.createClass(Site,[{key:"willProcess",value:function(){this.startLoading(),this.initializePluginAPIs(),this.initializePlugins()}},{key:"processed",value:function(){this.polyfillIEWidth(),this.initBootstrap(),this.setupMenubar(),this.setupFullScreen(),this.setupMegaNavbar(),this.setupNavbarCollpase(),this.setupGridMenu(),this.$el.on("click",".dropdown-menu-media",function(e){e.stopPropagation()})}},{key:"_getDefaultMeunbarType",value:function(){var breakpoint=this.getCurrentBreakpoint(),type=!1;switch(($BODY.data("autoMenubar")===!1||$BODY.is(".site-menubar-keep"))&&($BODY.hasClass("site-menubar-fold")?type="fold":$BODY.hasClass("site-menubar-unfold")&&(type="unfold")),breakpoint){case"lg":case"md":case"sm":type=type||"fold";break;case"xs":type="hide"}return type}},{key:"getDefaultState",value:function(){var menubarType=this._getDefaultMeunbarType();return{menubarType:menubarType}}},{key:"getDefaultActions",value:function(){return{menubarType:function(type){var toggle=function($el){$el.toggleClass("hided",!("open"===type)),$el.toggleClass("unfolded",!("fold"===type))};(0,_jquery2.default)('[data-toggle="menubar"]').each(function(){var $this=(0,_jquery2.default)(this),$hamburger=(0,_jquery2.default)(this).find(".hamburger");toggle($hamburger.length>0?$hamburger:$this)})}}}},{key:"getDefaultChildren",value:function(){var menubar=new _Menubar2.default({$el:(0,_jquery2.default)(".site-menubar")}),gridmenu=new _GridMenu2.default({$el:(0,_jquery2.default)(".site-gridmenu")}),sidebar=new _Sidebar2.default,children=[menubar,gridmenu,sidebar],$aside=(0,_jquery2.default)(".page-aside");return $aside.length>0&&children.push(new _PageAside2.default({$el:$aside})),children}},{key:"getCurrentBreakpoint",value:function(){var bp=Breakpoints.current();return bp?bp.name:"lg"}},{key:"initBootstrap",value:function(){$DOC.tooltip({selector:"[data-tooltip=true]",container:"body"}),(0,_jquery2.default)('[data-toggle="tooltip"]').tooltip(),(0,_jquery2.default)('[data-toggle="popover"]').popover()}},{key:"polyfillIEWidth",value:function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var msViewportStyle=DOC.createElement("style");msViewportStyle.appendChild(DOC.createTextNode("@-ms-viewport{width:auto!important}")),DOC.querySelector("head").appendChild(msViewportStyle)}}},{key:"setupGridMenu",value:function(){var self=this;$DOC.on("click",'[data-toggle="gridmenu"]',function(){var $this=(0,_jquery2.default)(this),isOpened=self.getState("gridmenu");isOpened?$this.addClass("active").attr("aria-expanded",!0):$this.removeClass("active").attr("aria-expanded",!1),self.setState("gridmenu",!isOpened)})}},{key:"setupFullScreen",value:function(){"undefined"!=typeof screenfull&&($DOC.on("click",'[data-toggle="fullscreen"]',function(){return screenfull.enabled&&screenfull.toggle(),!1}),screenfull.enabled&&DOC.addEventListener(screenfull.raw.fullscreenchange,function(){(0,_jquery2.default)('[data-toggle="fullscreen"]').toggleClass("active",screenfull.isFullscreen)}))}},{key:"setupMegaNavbar",value:function(){$DOC.on("click",".navbar-mega .dropdown-menu",function(e){e.stopPropagation()}).on("show.bs.dropdown",function(e){var $target=(0,_jquery2.default)(e.target),$trigger=e.relatedTarget?(0,_jquery2.default)(e.relatedTarget):$target.children('[data-toggle="dropdown"]'),animation=$trigger.data("animation");animation&&!function(){var $menu=$target.children(".dropdown-menu");$menu.addClass("animation-"+animation).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$menu.removeClass("animation-"+animation)})}()}).on("shown.bs.dropdown",function(e){var $menu=(0,_jquery2.default)(e.target).find(".dropdown-menu-media > .list-group");if($menu.length>0){var api=$menu.data("asScrollable");api?api.update():$menu.asScrollable({namespace:"scrollable",contentSelector:"> [data-role='content']",containerSelector:"> [data-role='container']"})}})}},{key:"setupMenubar",value:function(){var _this2=this;(0,_jquery2.default)(document).on("click",'[data-toggle="menubar"]',function(){var type=_this2.getState("menubarType");switch(type){case"fold":type="unfold";break;case"unfold":type="fold";break;case"open":type="hide";break;case"hide":type="open"}return _this2.setState("menubarType",type),!1}),Breakpoints.on("change",function(){_this2.setState("menubarType",_this2._getDefaultMeunbarType())})}},{key:"setupNavbarCollpase",value:function(){(0,_jquery2.default)(document).on("click","[data-target='#site-navbar-collapse']",function(e){var $trigger=(0,_jquery2.default)(this),isClose=$trigger.hasClass("collapsed");$BODY.addClass("site-navbar-collapsing"),$BODY.toggleClass("site-navbar-collapse-show",!isClose),setTimeout(function(){$BODY.removeClass("site-navbar-collapsing")},350)})}},{key:"startLoading",value:function(){return"undefined"!=typeof _jquery2.default.fn.animsition&&void $BODY.animsition({inClass:"fade-in",inDuration:800,loading:!0,loadingClass:"loader-overlay",loadingParentElement:"html",loadingInner:'\n      <div class="loader-content">\n        <div class="loader-index">\n          <div></div>\n          <div></div>\n          <div></div>\n          <div></div>\n          <div></div>\n          <div></div>\n        </div>\n      </div>',onLoadEvent:!0})}}]),Site}(_Base3.default),instance=null;exports.default=Site,exports.Site=Site,exports.run=run,exports.getInstance=getInstance});