{"version":3,"file":"ace.js","sources":["../../application/js/src/util.js","../../application/js/src/general.js","../../application/js/src/scrollbar.js","../../application/js/src/sidebar.js","../../application/js/src/aside.js","../../application/js/src/toaster.js","../../application/js/src/widget.js","../../application/js/src/fileinput.js","../../application/js/src/wysiwyg.js","../../application/js/index.umd.js"],"sourcesContent":["/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): util.js\r\n Some Utility Functions\r\n*/\r\n\r\n// import $ from 'jquery'\r\n// import bootstrap from 'bootstrap'\r\n\r\nclass Util {\r\n static isReducedMotion () {\r\n return window.matchMedia('(prefers-reduced-motion)').matches\r\n }\r\n\r\n /**\r\n static hasTransitionStart () {\r\n if (Util._supportsTransitionStart !== null) return Util._supportsTransitionStart\r\n\r\n Util._supportsTransitionStart = 'ontransitionstart' in window// doesn't work in Chrome\r\n if (!Util._supportsTransitionStart) {\r\n var tmp = $('<div style=\"opacity: 0; transition: opacity 1ms\" />').appendTo(document.body)\r\n tmp.on('transitionstart', function () {\r\n Util._supportsTransitionStart = true\r\n }).on('transitionend', function () {\r\n tmp.remove()\r\n })\r\n\r\n tmp.get(0).offsetTop\r\n tmp.css('opacity', '1')\r\n }\r\n\r\n return Util._supportsTransitionStart\r\n }\r\n */\r\n\r\n static getScrollbarInfo (recalc = false) {\r\n if (recalc === false && Util._scrollbarInfo !== null) return Util._scrollbarInfo\r\n\r\n const scrollDiv = document.createElement('div')\r\n scrollDiv.style.overflow = 'scroll'\r\n scrollDiv.style.position = 'absolute'\r\n scrollDiv.style.width = '50px'\r\n scrollDiv.style.height = '50px'\r\n\r\n var scrollbar = {}\r\n\r\n document.body.appendChild(scrollDiv)\r\n scrollbar.width = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\r\n document.documentElement.style.setProperty('--scrollbar-width', scrollbar.width + 'px')\r\n\r\n var thinWidth = scrollbar.width\r\n if (window.CSS) {\r\n scrollbar.thin = window.CSS.supports('scrollbar-width', 'thin')// currently only firefox 64+ supports it\r\n if (scrollbar.thin) {\r\n scrollDiv.style['scrollbar-width'] = 'thin'\r\n thinWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\r\n }\r\n\r\n scrollbar.overlay = window.CSS.supports('overflow', 'overlay')\r\n } else {\r\n scrollbar.thin = false\r\n\r\n scrollDiv.style.overflow = 'overlay'// Webkit/Chromium based browsers support it\r\n scrollbar.overlay = scrollbar.width > 0 && scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth === 0\r\n }\r\n document.documentElement.style.setProperty('--moz-scrollbar-thin', thinWidth + 'px')\r\n\r\n scrollDiv.style['-ms-overflow-style'] = '-ms-autohiding-scrollbar'// IE\r\n scrollbar.autohide = scrollbar.width > 0 && scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth === 0\r\n\r\n /// //////////////////////////////////\r\n document.body.removeChild(scrollDiv)\r\n Util._scrollbarInfo = scrollbar\r\n\r\n return Util._scrollbarInfo\r\n }\r\n}\r\nUtil._supportsTransitionStart = null// static property\r\nUtil._scrollbarInfo = null// static property\r\n\r\n/**\r\n* ------------------------------------------------------------------------\r\n* jQuery\r\n* ------------------------------------------------------------------------\r\n*/\r\n\r\nexport default Util\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): general.js\r\n General Ace Function\r\n*/\r\n\r\nimport $ from 'jquery'\r\n// import bootstrap from 'bootstrap'\r\nimport Util from './util'\r\n\r\nclass Basic {\r\n static _HandleBasics () {\r\n Basic._handleAlerts()\r\n Basic._handleDropdowns()\r\n Basic._handleNavbar()\r\n Basic._handleTabScroll()\r\n Basic._handleScrollTop()\r\n\r\n Basic._handleSticky()\r\n Basic._handleOther()\r\n }\r\n\r\n static _handleAlerts () {\r\n // collapse alert instead of fading it out\r\n $(document).on('close.bs.alert.alert-collapse', '.alert.alert-collapse', function (e) {\r\n e.preventDefault()\r\n $(this).wrap('<div class=\"collapse show alert-collapse\"></div>').parent().collapse('hide').one('hidden.bs.collapse', function () {\r\n $(this).remove()\r\n })\r\n })\r\n }\r\n\r\n static _handleDropdowns () {\r\n // hide dropdown when clicked on an element inside it with \"data-dismiss=dropdown\" attr\r\n $(document).on('click', '[data-dismiss=dropdown]', function (e) {\r\n $(e.target).closest('.dropdown-menu').removeClass('show').parent().removeClass('show')\r\n })\r\n\r\n // don't hide dropdown when clicked inside a .dropdown-clickable element\r\n $(document).on('click.dropdown-clickable', '.dropdown-clickable', function (e) {\r\n e.stopImmediatePropagation()\r\n })\r\n }\r\n\r\n static _handleNavbar () {\r\n // hide navbar-collapse when clicked on it (i.e. the backdrop)\r\n $(document).on('click', '.navbar-backdrop.show', function (e) {\r\n if (e.target === this) $(this).collapse('hide')\r\n })\r\n\r\n var hideBodyScrollbar = false\r\n $('.navbar-collapse')\r\n .on('shown.bs.collapse', function () {\r\n hideBodyScrollbar = false\r\n\r\n // move focus to it\r\n $(this).find('.autofocus').focus()\r\n\r\n if (this.classList.contains('navbar-backdrop')) {\r\n var scrollbarInfo = Util.getScrollbarInfo()\r\n if (scrollbarInfo.width === 0) {\r\n document.body.classList.add('mob-navbar-body')\r\n hideBodyScrollbar = true\r\n }\r\n }\r\n })\r\n .on('hidden.bs.collapse', function () {\r\n if ($(this).hasClass('auto-collapsing')) {\r\n $(this).removeClass('auto-collapsing')\r\n return\r\n }\r\n\r\n $('.navbar').removeClass('navbar-expanded')\r\n\r\n if (hideBodyScrollbar) {\r\n document.body.classList.remove('mob-navbar-body')\r\n }\r\n })\r\n .on('show.bs.collapse', function () {\r\n $('.navbar').addClass('navbar-expanded')\r\n // hide other ones\r\n $('.navbar-collapse.show').addClass('auto-collapsing').css('transition-duration', '.1ms').collapse('hide').css('transition-duration', '')\r\n })\r\n\r\n // if navbar dropdowns are not entirely inside window area, move them accordingly\r\n var _adjustDropdown = function () {\r\n var isRTL = document.documentElement.classList.contains('rtl')\r\n var prop = !isRTL ? 'marginLeft' : 'marginRight'\r\n this.style[prop] = ''\r\n\r\n var rect = this.getBoundingClientRect()\r\n if (rect.left < 0) this.style[prop] = parseInt(-1 * rect.left) + 5 + 'px'\r\n else {\r\n var sw = document.body.scrollWidth\r\n if (rect.right > sw) {\r\n this.style[prop] = parseInt(sw - rect.right - 5) + 'px'\r\n }\r\n }\r\n }\r\n $('.navbar').on('transitionstart.adjust', '.dropdown-mega .dropdown-menu', function (ev) {\r\n if (ev.target !== this || ev.originalEvent.propertyName !== 'transform') return\r\n _adjustDropdown.call(this)\r\n })\r\n $('.navbar').on('shown.bs.dropdown', '.dropdown-mega .dropdown-menu', function () {\r\n var pos = window.getComputedStyle(this).position\r\n if (pos === 'absolute') _adjustDropdown.call(this)\r\n })\r\n }\r\n\r\n static _handleTabScroll () {\r\n var _firefox = 'MozAppearance' in document.documentElement.style\r\n // scroll tab button elements into view when clicked\r\n var _scrollIntoView = function (smooth = true) {\r\n var li = this.parentNode\r\n var nav = li.parentNode\r\n // if (!nav.classList.contains('nav-tabs-scroll')) return\r\n\r\n var navClientWidth = nav.clientWidth\r\n if (nav.scrollWidth <= navClientWidth) return // don't scroll if not needed\r\n\r\n // scroll to this element (center it)\r\n var _scrollLeft = li.offsetLeft - (navClientWidth - li.clientWidth) / 2\r\n if (_scrollLeft < 0) _scrollLeft = 0\r\n\r\n smooth = !Util.isReducedMotion() && smooth === true\r\n try {\r\n nav.scrollTo({\r\n top: 0,\r\n left: _scrollLeft,\r\n behavior: smooth ? 'smooth' : 'auto'\r\n })\r\n\r\n // firefox needs double push when scrolling back\r\n if (_firefox && _scrollLeft < nav.scrollLeft) {\r\n setTimeout(function () {\r\n nav.scrollTo({\r\n top: 0,\r\n left: _scrollLeft,\r\n behavior: smooth ? 'smooth' : 'auto'\r\n })\r\n }, 0)\r\n }\r\n } catch (e) {\r\n nav.scrollLeft = _scrollLeft\r\n }\r\n }\r\n\r\n $('.nav-tabs-scroll').each(function () {\r\n var active = this.querySelector('.active')\r\n // scroll to active element on page load\r\n if (active) {\r\n if (!_firefox) {\r\n _scrollIntoView.call(active, 0)\r\n } else { // still firefox doesn't scroll back to zero on page load!\r\n setTimeout(() => {\r\n this.scrollLeft = 1\r\n _scrollIntoView.call(active, 0)\r\n }, 500)\r\n }\r\n }\r\n\r\n $(this).find('a').on('click', function () {\r\n _scrollIntoView.call(this)\r\n })\r\n })\r\n\r\n // tab pane swiping\r\n if ('ontouchstart' in window) {\r\n $('.tab-sliding:not([data-swipe=\"none\"]').each(function () {\r\n var allowedDir = $(this).attr('data-swipe') || null\r\n $(this).find('.tab-pane').on('touchstart', function (ev) {\r\n if (!this.classList.contains('active')) return\r\n var curPane = this\r\n var isRTL = document.documentElement.classList.contains('rtl')\r\n var initialTransform = !isRTL ? 'translateX(100%)' : 'translateX(-100%)'\r\n\r\n var touches = ev.originalEvent.changedTouches[0]\r\n\r\n var swipeDir = 0\r\n var x1 = touches.pageX\r\n var y1 = touches.pageY\r\n var t1 = Date.now()\r\n\r\n var curDir = 0\r\n\r\n var paneWidth = curPane.clientWidth\r\n var siblingPane = null\r\n\r\n function _dismiss () {\r\n $(curPane).off('touchmove touchend touchcancel')\r\n curPane.style.transform = ''\r\n curPane.classList.remove('tab-swiping')\r\n\r\n if (siblingPane) {\r\n siblingPane.style.transform = ''\r\n siblingPane.classList.remove('tab-swiping')\r\n }\r\n }\r\n\r\n function _reset (sibling) {\r\n sibling.style.transform = ''\r\n sibling.style.transitionDuration = '1ms'\r\n sibling.classList.remove('tab-swiping')\r\n function _transitionEnd () {\r\n this.style.transitionDuration = ''\r\n this.removeEventListener('transitionend', _transitionEnd)\r\n }\r\n sibling.addEventListener('transitionend', _transitionEnd)\r\n }\r\n\r\n $(this).on('touchmove', function (ev) {\r\n var touches = ev.changedTouches[0]\r\n var newX = touches.pageX\r\n var newY = touches.pageY\r\n\r\n if (swipeDir === 0) {\r\n var diffY = Math.abs(y1 - newY)\r\n var diffX = Math.abs(x1 - newX)\r\n\r\n if (diffY > diffX) {\r\n swipeDir = 2// vertical i.e. scroll\r\n $(curPane).off('touchmove')\r\n } else if (diffX > 10) {\r\n swipeDir = 1// horizontal swipe\r\n }\r\n }\r\n if (swipeDir !== 1) return // return if not horizontal swipe\r\n\r\n var moveX = parseInt(x1 - newX)\r\n var newDir = 0\r\n\r\n if ((allowedDir === null || (allowedDir === 'left')) && ((!isRTL && moveX > 0) || (isRTL && moveX < 0))) newDir = 1\r\n else if ((allowedDir === null || (allowedDir === 'right')) && ((!isRTL && moveX < 0) || (isRTL && moveX > 0))) newDir = -1\r\n\r\n if (newDir !== 0 && newDir !== curDir) {\r\n if (siblingPane !== null) _reset(siblingPane)// undo previous direction for when we change swipe direction before a touchend\r\n curDir = newDir\r\n\r\n var targetPane = curPane.getAttribute('data-swipe-' + (curDir === 1 ? 'next' : 'prev'))\r\n if (targetPane) targetPane = document.querySelector(targetPane)\r\n siblingPane = targetPane || (curDir === 1 ? curPane.nextElementSibling : curPane.previousElementSibling)\r\n\r\n if (siblingPane === null || siblingPane === curPane) {\r\n curDir = 0\r\n } else {\r\n curPane.classList.add('tab-swiping')\r\n siblingPane.classList.add('tab-swiping')\r\n }\r\n }\r\n\r\n var moveXabs = Math.abs(moveX)\r\n if (curDir !== 0 && moveXabs < paneWidth + 24) { // don't move more than 32px beyond its size\r\n curPane.style.transform = initialTransform + ' translateX(' + (-1 * moveX) + 'px)'\r\n siblingPane.style.transform = 'translateX(' + (-1 * moveX) + 'px)'\r\n } else if (curDir === 0 && moveXabs < 24) {\r\n curPane.style.transform = initialTransform + ' translateX(' + (-1 * moveX) + 'px)'\r\n }\r\n })// touchmove\r\n .on('touchend touchcancel', function (ev) {\r\n var touches = ev.originalEvent.changedTouches[0]\r\n var x2 = touches.pageX\r\n var t2 = Date.now()\r\n var diff = Math.abs(x2 - x1)\r\n\r\n _dismiss()\r\n\r\n if (curDir !== 0 && swipeDir === 1 &&\r\n ((diff > paneWidth / 4 || diff > 100) || (diff > paneWidth / 6 && t2 - t1 < 300))\r\n ) { // if moved more than 1/4 of its width or 100px or 1/6 in less than 300ms\r\n siblingPane.classList.add('active', 'show')\r\n curPane.classList.remove('active', 'show')\r\n\r\n var id1 = curPane.id; var id2 = siblingPane.id\r\n $('[href=\"#' + id1 + '\"],[data-target=\"#' + id1 + '\"]').removeClass('active')\r\n\r\n var newActive = $('[href=\"#' + id2 + '\"],[data-target=\"#' + id2 + '\"]')\r\n newActive.addClass('active')\r\n\r\n _scrollIntoView.call(newActive.get(0))\r\n }\r\n })// touchend\r\n })// tab-pane touchstart\r\n })// each\r\n }// 'ontouchstart' in window\r\n }\r\n\r\n static _handleScrollTop () {\r\n // scroll to top button\r\n var _scrollBtn = document.querySelector('.btn-scroll-up')\r\n // return if button is not visible\r\n if (_scrollBtn === null || _scrollBtn.offsetParent === null) return\r\n\r\n var showScrollbtn = function () {\r\n _scrollBtn.classList.add('scroll-btn-visible')\r\n }\r\n\r\n var hideScrollBtn = function () {\r\n _scrollBtn.classList.remove('scroll-btn-visible')\r\n }\r\n\r\n var scrollToTop = function () {\r\n try {\r\n // ScrollToOptions parameter may not be supported on some older browsers\r\n var smoothScroll = !Util.isReducedMotion()\r\n window.scroll({\r\n top: 0,\r\n behavior: smoothScroll ? 'smooth' : 'auto'\r\n })\r\n } catch (e) {\r\n window.scroll(0, 0)\r\n }\r\n }\r\n\r\n var _modernBrowser = 'IntersectionObserver' in window\r\n _scrollBtn.addEventListener('click', function (e) {\r\n e.preventDefault()\r\n\r\n if (_modernBrowser) hideScrollBtn()\r\n scrollToTop()\r\n })\r\n\r\n if (_modernBrowser) {\r\n var _scrollBtnObserve = document.createElement('DIV')\r\n _scrollBtnObserve.classList.add('scroll-btn-observe')\r\n document.body.appendChild(_scrollBtnObserve)\r\n\r\n const observer = new window.IntersectionObserver(([entry]) => {\r\n var isOut = entry.intersectionRatio < 1 && entry.boundingClientRect.y < 0\r\n if (isOut) {\r\n showScrollbtn()\r\n } else {\r\n hideScrollBtn()\r\n }\r\n },\r\n {\r\n threshold: [1.0],\r\n delay: 100\r\n }\r\n )\r\n\r\n observer.observe(_scrollBtnObserve)\r\n\r\n /**\r\n setTimeout(function () {\r\n // initial check!\r\n if (observedEl.getBoundingClientRect().y < 0) {\r\n showScrollbtn()\r\n }\r\n }, 200)\r\n */\r\n } else {\r\n // if browser doesn't support `IntersectionObserver` show the scroll to top button\r\n // we used to listen to 'scroll' event, but not anymore\r\n showScrollbtn()\r\n }\r\n }\r\n\r\n /// /\r\n // we use it when a sticky element becomes stuck on top and 1 pixel of it goes out of view (because of top: -1px)\r\n // so IntersectionObserver is triggered with intersectionRatio < 1 and y < 0\r\n // then we trigger an event for it, so we may for example change its classlist to update styling\r\n static _handleSticky () {\r\n if (!window.IntersectionObserver) return\r\n const stickyElements = document.querySelectorAll('[class*=\"sticky-nav\"]')\r\n if (stickyElements.length > 0) {\r\n const observer = new window.IntersectionObserver(([entry]) => {\r\n var isSticky = entry.intersectionRatio < 1 && entry.boundingClientRect.y < 0\r\n\r\n // isSticky=true means we are at sticky position\r\n // so if our sticky element is for example 'sticky-nav-md' and we are at sticky position\r\n // but our window size is above 'md' and therefore CSS rule 'position: sticky' is not applied at all\r\n // so we check if we are really sticky or not\r\n var stickyNav = entry.target.parentElement// entry.target is the `.sticky-trigger` and parentElement is the `.sticky-nav` element\r\n\r\n if (isSticky && !stickyNav.classList.contains('sticky-nav')) { // don't check `.sticky-nav` element because it's sticky regardless of window size\r\n var pos = window.getComputedStyle(stickyNav).position\r\n if (!(pos === 'sticky' || pos === '-webkit-sticky')) isSticky = false\r\n }\r\n\r\n const evt = new window.CustomEvent('sticky-change', { detail: { isSticky } })\r\n stickyNav.dispatchEvent(evt)\r\n },\r\n {\r\n threshold: [1.0],\r\n delay: 100\r\n }\r\n )\r\n\r\n stickyElements.forEach((stickyEl) => {\r\n // var pos = window.getComputedStyle(stickyEl).position\r\n // if (!(pos === 'sticky' || pos === '-webkit-sticky')) return\r\n\r\n // add a dummy child to watch\r\n // when it goes out of window it means sticky-nav is sticky now\r\n // because dummy element is top: -1px or when below navbar it's top : -1 * ($navbar-height + 1px);\r\n var observedChild = document.createElement(stickyEl.tagName === 'UL' ? 'LI' : 'DIV')\r\n observedChild.classList.add('sticky-trigger')\r\n stickyEl.insertBefore(observedChild, stickyEl.firstChild)\r\n\r\n observer.observe(observedChild)\r\n\r\n setTimeout(function () {\r\n if (observedChild.getBoundingClientRect().y < 0) {\r\n var isSticky = true\r\n if (isSticky && !stickyEl.classList.contains('sticky-nav')) {\r\n var pos = window.getComputedStyle(stickyEl).position\r\n if (!(pos === 'sticky' || pos === '-webkit-sticky')) isSticky = false\r\n }\r\n const evt = new window.CustomEvent('sticky-change', { detail: { isSticky: isSticky, initialCheck: true } })\r\n stickyEl.dispatchEvent(evt)\r\n }\r\n }, 200)\r\n })\r\n }\r\n }\r\n\r\n // /////////\r\n\r\n static _handleOther () {\r\n $('.input-floating-label input').each(function () {\r\n if (this.value !== '') this.classList.add('has-content')\r\n else this.classList.remove('has-content')\r\n })\r\n $(document).on('focusout', '.input-floating-label input', function (e) {\r\n if (this.value !== '') this.classList.add('has-content')\r\n else this.classList.remove('has-content')\r\n })\r\n }\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * jQuery\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\nif (typeof $ !== 'undefined') {\r\n Basic._HandleBasics()\r\n}\r\n\r\nexport default Basic\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): scrollbar.js\r\n*/\r\n\r\nimport $ from 'jquery'\r\nimport bootstrap from 'bootstrap'\r\nimport Util from './util'\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nconst NAME = 'aceScroll'\r\nconst VERSION = '2.1.0'\r\nconst DATA_KEY = 'ace.scroll'\r\nconst EVENT_KEY = `.${DATA_KEY}`\r\nconst DATA_API_KEY = '.data-api'\r\n\r\nconst Event = {\r\n LOAD_DATA_API: `load${EVENT_KEY}${DATA_API_KEY}`\r\n}\r\n\r\nconst Selector = {\r\n ACE_SCROLL: '[ace-scroll]'\r\n}\r\n\r\nconst DefaultType = {\r\n type: 'string',\r\n smooth: 'boolean',\r\n\r\n height: '(number|null)',\r\n lock: 'boolean',\r\n\r\n ignore: '(string|null)',\r\n\r\n plugin: 'string',\r\n options: '(object|null)'// plugin settings\r\n}\r\n\r\nconst Default = {\r\n type: 'native',\r\n smooth: false,\r\n\r\n height: null,\r\n lock: false,\r\n\r\n ignore: null,\r\n\r\n plugin: 'SimpleBar',\r\n options: null\r\n}\r\n\r\nclass Scrollbar {\r\n constructor (element, config) {\r\n this._element\t= element\r\n this.$element\t= $(element)\r\n this._config = this._getConfig(config)\r\n\r\n this._scrollbarInfo = Util.getScrollbarInfo()\r\n\r\n this.enableScrollbars()\r\n }\r\n\r\n static get VERSION () {\r\n return VERSION\r\n }\r\n\r\n static get DefaultType () {\r\n return DefaultType\r\n }\r\n\r\n static get Default () {\r\n return Default\r\n }\r\n\r\n enableScrollbars () {\r\n /**\r\n this._element.scrollTop = 0\r\n // For firefox. Because it has persistent scroll position on page reload\r\n // which doesn't look good when changing overflow: hidden to overflow: scroll on hover\r\n */\r\n\r\n // no scrollbars when specified\r\n if (this._config.ignore !== null) {\r\n if (this._config.ignore === 'mobile' && this._scrollbarInfo.width === 0 && 'ontouchstart' in window && window.matchMedia('(max-width: 840px)')) return\r\n else if (this._config.ignore === 'desktop' && this._scrollbarInfo.width > 0) return\r\n }\r\n\r\n this.update(this._config.height)\r\n this.lock(this._config.lock)\r\n\r\n this._element.classList.remove('ace-scroll', 'ace-scroll-mob', 'ace-scroll-wrap')\r\n if (this._config.type === 'native') {\r\n this._addNativeScrolls()\r\n } else if (this._config.type === 'auto') {\r\n this._preferNativeScrolls()\r\n } else if (this._config.type === 'plugin') {\r\n this._addPluginScrolls()\r\n }\r\n }\r\n\r\n update (_height) {\r\n if (!_height) return\r\n if (!isNaN(_height)) _height += 'px'\r\n this._element.style.maxHeight = _height\r\n }\r\n\r\n lock (_lock) {\r\n if (_lock) this._element.classList.add('ace-scroll-lock')\r\n else this._element.classList.remove('ace-scroll-lock')\r\n }\r\n\r\n _addNativeScrolls (smooth) {\r\n if (this._scrollbarInfo.width === 0) this._element.classList.add('ace-scroll-mob')// mobile device\r\n else {\r\n this._element.classList.add('ace-scroll')\r\n\r\n var _smooth = typeof smooth !== 'undefined' ? smooth : this._config.smooth\r\n if (_smooth) {\r\n // wrap children inside an .ace-scroll-inner\r\n var wrapper = document.createElement('div')\r\n wrapper.classList.add('ace-scroll-inner')\r\n wrapper.style.color = window.getComputedStyle(this._element).color\r\n\r\n while (this._element.firstChild) {\r\n wrapper.appendChild(this._element.firstChild)\r\n }\r\n this._element.appendChild(wrapper)\r\n\r\n /// ///////\r\n // disable the initial transition effects\r\n this._element.style.transition = 'none'\r\n\r\n this._element.classList.add('ace-scroll-wrap')\r\n\r\n this._element.offsetLeft// reflow\r\n this._element.style.transition = ''\r\n }\r\n }\r\n }\r\n\r\n _preferNativeScrolls () {\r\n if (this._scrollbarInfo.width === 0 || this._scrollbarInfo.overlay || this._scrollbarInfo.thin || !this._hasScrollbarPlugin()) {\r\n this._addNativeScrolls()\r\n } else {\r\n this._addPluginScrolls()\r\n }\r\n }\r\n\r\n _addPluginScrolls () {\r\n if (this._hasScrollbarPlugin()) {\r\n return new window[this._config.plugin](this._element, this._config.options)\r\n } else {\r\n this._addNativeScrolls()\r\n }\r\n }\r\n\r\n _hasScrollbarPlugin () {\r\n return !!window[this._config.plugin]\r\n }\r\n\r\n _getConfig (config) {\r\n config = {\r\n ...Default,\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (typeof bootstrap !== 'undefined') {\r\n bootstrap.Util.typeCheckConfig(\r\n NAME,\r\n config,\r\n this.constructor.DefaultType\r\n )\r\n }\r\n\r\n return config\r\n }\r\n\r\n // Static methods\r\n static _jQueryInterface (config) {\r\n return this.each(function () {\r\n const $this = $(this)\r\n let data = $this.data(DATA_KEY)\r\n\r\n let options = this.getAttribute('ace-scroll') || {}\r\n if (!isNaN(options)) options = { height: parseInt(options) }\r\n else if (options.length > 1) {\r\n try {\r\n options = JSON.parse(options)\r\n } catch (e) {}\r\n }\r\n\r\n const _config = {\r\n ...Default,\r\n ...$this.data(),\r\n ...typeof config === 'object' && config ? config : {},\r\n ...typeof options === 'object' && options ? options : {}\r\n }\r\n\r\n if (!data) {\r\n data = new Scrollbar(this, _config)\r\n $this.data(DATA_KEY, data)\r\n }\r\n\r\n if (typeof config === 'string') {\r\n if (typeof data[config] === 'undefined') {\r\n throw new TypeError(`No method named \"${config}\"`)\r\n }\r\n data[config]()\r\n }\r\n })\r\n }\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Data Api implementation\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\n$(window).on(Event.LOAD_DATA_API, () => {\r\n const scrollbars = [].slice.call(document.querySelectorAll(Selector.ACE_SCROLL))\r\n\r\n for (let i = 0; i < scrollbars.length; i++) {\r\n const $scrollbars = $(scrollbars[i])\r\n Scrollbar._jQueryInterface.call($scrollbars, $scrollbars.data())\r\n }\r\n})\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * jQuery\r\n * ------------------------------------------------------------------------\r\n*/\r\nif (typeof $ !== 'undefined') {\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n $.fn[NAME] = Scrollbar._jQueryInterface\r\n $.fn[NAME].Constructor = Scrollbar\r\n $.fn[NAME].noConflict = () => {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Scrollbar._jQueryInterface\r\n }\r\n}\r\n\r\nexport default Scrollbar\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): sidebar.js\r\n Handling Sidebar\r\n*/\r\n\r\nimport $ from 'jquery'\r\nimport bootstrap from 'bootstrap'\r\nimport Util from './util'\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nconst NAME = 'aceSidebar'\r\nconst VERSION = '2.1.0'\r\nconst DATA_KEY = 'ace.sidebar'\r\nconst EVENT_KEY = `.${DATA_KEY}`\r\nconst DATA_API_KEY = '.data-api'\r\n\r\nconst Event = {\r\n SHOW: `show${EVENT_KEY}`,\r\n HIDE: `hide${EVENT_KEY}`,\r\n COLLAPSE: `collapse${EVENT_KEY}`,\r\n EXPAND: `expand${EVENT_KEY}`,\r\n SHOWN: `shown${EVENT_KEY}`,\r\n HIDDEN: `hidden${EVENT_KEY}`,\r\n COLLAPSED: `collapsed${EVENT_KEY}`,\r\n EXPANDED: `expanded${EVENT_KEY}`,\r\n LOAD_DATA_API: `load${EVENT_KEY}${DATA_API_KEY}`,\r\n CLICK_DATA_API: `click${EVENT_KEY}${DATA_API_KEY}`\r\n}\r\n\r\nconst Selector = {\r\n SIDEBAR: '.sidebar',\r\n DATA_TOGGLE: '[data-toggle=\"sidebar\"]',\r\n DATA_TOGGLE_MOBILE: '[data-toggle-mobile=\"sidebar\"]'\r\n}\r\n\r\nconst DefaultType = {\r\n swipe: 'boolean',\r\n dismiss: 'boolean',\r\n backdrop: 'boolean',\r\n\r\n gotoactive: 'boolean',\r\n subscroll: 'boolean',\r\n\r\n pullup: 'boolean'\r\n}\r\n\r\nconst Default = {\r\n swipe: false,\r\n dismiss: false,\r\n backdrop: false,\r\n\r\n gotoactive: false,\r\n subscroll: true,\r\n\r\n pullup: false\r\n}\r\n\r\nconst ClassName = {\r\n DESKTOP_HIDE: 'collapsed',\r\n MOBILE_SHOW: 'sidebar-visible',\r\n COLLAPSED:\t'collapsed',\r\n\r\n TOGGLING: 'toggling',\r\n\r\n INNER_HOVER: 'is-hover',\r\n\r\n BACKDROP: 'sidebar-backdrop',\r\n\r\n HORIZONTAL: 'sidebar-h'\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Class Definition\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nclass Sidebar {\r\n constructor (element, config) {\r\n this._hasTransitionEvent = false\r\n this._hasTransitionEvent2 = false\r\n this._isTransitioning = false\r\n this._isBeingDismissed = false\r\n\r\n this._sidebar = element\r\n this._sidebar.classList.remove(...['d-none', 'd-xl-block'])\r\n this._inner = this._sidebar.querySelector('.sidebar-inner')\r\n this._config = this._getConfig(config)\r\n this._scroller = \tthis._sidebar.querySelector('[class*=\"ace-scroll\"]')\r\n\r\n this._pullupEnabled = false\r\n\r\n this._triggerArray = [].slice.call(document.querySelectorAll(\r\n `[data-toggle=\"sidebar\"][href=\"#${element.id}\"],` +\r\n `[data-toggle=\"sidebar\"][data-target=\"#${element.id}\"]`\r\n ))\r\n this._triggerArrayMobile = [].slice.call(document.querySelectorAll(\r\n `[data-toggle-mobile=\"sidebar\"][href=\"#${element.id}\"],` +\r\n `[data-toggle-mobile=\"sidebar\"][data-target=\"#${element.id}\"]`\r\n ))\r\n\r\n this._horizontal = this._sidebar.classList.contains(ClassName.HORIZONTAL)\r\n this._desktopCollapsedClass = this._triggerArray.length > 0 ? (this._triggerArray[0].getAttribute('data-toggle-class') || ClassName.DESKTOP_HIDE) : ClassName.DESKTOP_HIDE\r\n\r\n //\r\n this._collapsed = this._sidebar.classList.contains(this._desktopCollapsedClass)\r\n\r\n $(this._inner).on('focus', 'input', (e) => {\r\n if (!this._collapsed) return\r\n this._inner.classList.add('has-focus')\r\n $(e.target).one('blur', () => {\r\n this._inner.classList.remove('has-focus')\r\n })\r\n })\r\n //\r\n\r\n this._handleTriggerEvents()\r\n this.enableSubmenuToggle()\r\n\r\n if (this._config.pullup) this.enableSubmenuPullup()\r\n if (this._config.gotoactive) this.scrollToActive()\r\n if (this._config.backdrop) {\r\n this._sidebar.classList.add(ClassName.BACKDROP)\r\n } else if (this._sidebar.classList.contains(ClassName.BACKDROP)) {\r\n this._config.backdrop = true\r\n }\r\n\r\n if (!this._horizontal && this._collapsed) {\r\n this._addTransitionEvent()\r\n }\r\n }\r\n\r\n // Getters\r\n static get VERSION () {\r\n return VERSION\r\n }\r\n\r\n static get Default () {\r\n return Default\r\n }\r\n\r\n static get DefaultType () {\r\n return DefaultType\r\n }\r\n\r\n _handleTriggerEvents () {\r\n var This = this\r\n $(this._triggerArray).on('click', function () {\r\n This.toggle(this)\r\n })\r\n\r\n $(this._triggerArrayMobile).on('click', function () {\r\n This.toggleMobile(this)\r\n })\r\n }\r\n\r\n toggle (btn = null) {\r\n if (this._sidebar.classList.contains(this._desktopCollapsedClass)) {\r\n this.expand(btn)\r\n } else {\r\n this.collapse(btn)\r\n }\r\n }\r\n\r\n toggleMobile (btn = null) {\r\n if (!this._sidebar.classList.contains(ClassName.MOBILE_SHOW)) {\r\n this.show(btn)\r\n } else {\r\n this.hide(btn)\r\n }\r\n }\r\n /// ////\r\n\r\n expand (btn = null) {\r\n if (!this._hasTransitionEvent) this._addTransitionEvent()\r\n if (this._isTransitioning) return\r\n\r\n const ev = new $.Event(Event.EXPAND)\r\n $(this._sidebar).trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n this._isTransitioning = true\r\n\r\n this._sidebar.classList.add(ClassName.TOGGLING)\r\n this._sidebar.classList.remove(this._desktopCollapsedClass)\r\n\r\n this._updateTriggerBtns(this._triggerArray, true)\r\n\r\n this._collapsed = false\r\n\r\n if (Util.isReducedMotion() || this._horizontal) this._toggleCompleted()// call completion now\r\n\r\n //\r\n if (this._pullupEnabled) this._resetPullUp()\r\n\r\n this._inner.classList.remove(ClassName.INNER_HOVER)\r\n }\r\n\r\n collapse (btn = null) {\r\n if (!this._hasTransitionEvent) this._addTransitionEvent()\r\n if (this._isTransitioning) return\r\n\r\n const ev = new $.Event(Event.COLLAPSE)\r\n $(this._sidebar).trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n this._isTransitioning = true\r\n\r\n this._sidebar.classList.add(ClassName.TOGGLING)\r\n this._sidebar.classList.add(this._desktopCollapsedClass)\r\n\r\n this._updateTriggerBtns(this._triggerArray, false)\r\n\r\n this._collapsed = true\r\n\r\n if (Util.isReducedMotion() || this._horizontal) this._toggleCompleted()// call completion now\r\n\r\n //\r\n if (this._pullupEnabled) this._resetPullUp()\r\n\r\n // if the triggering button is inside sidebar, add is-hover class\r\n if (btn !== null && this._sidebar.classList.contains('expandable') && this._inner.contains(btn)) {\r\n this._inner.classList.add(ClassName.INNER_HOVER)\r\n }\r\n }\r\n\r\n show (btn = null) {\r\n if (!this._hasTransitionEvent2) this._addTransitionEvent2()\r\n\r\n const ev = new $.Event(Event.SHOW)\r\n $(this._sidebar).trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n this._sidebar.classList.add(ClassName.MOBILE_SHOW)\r\n this._updateTriggerBtns(this._triggerArrayMobile, true)\r\n\r\n // hide sidebar if clicked outside of it\r\n if (this._config.dismiss) {\r\n // document.body.classList.add('overflow-hidden')\r\n $(this._triggerArrayMobile).css('pointer-events', 'none') // disable this button, because if we click on it, it will hide and then instantly show the sidebar again\r\n $(document).on('mouseup.sidebar-dismiss', (e) => {\r\n if (!$.contains(this._sidebar, e.target)) { // if clicked outside sidebar\r\n this._dismiss()\r\n }\r\n })\r\n }\r\n\r\n if (this._config.swipe) this.enableSwipeHide()\r\n\r\n if (Util.isReducedMotion()) this._toggleMobileCompleted()// call completion now\r\n\r\n // in some webkit mobile browsers, sidebar scrolling works but scrollbars are not visible, unless something like this forces it to become visible\r\n if (this._scroller && !this._scroller.classList.contains('overflow-hidden')) {\r\n this._scroller.classList.add('overflow-hidden')\r\n this._scroller.offsetHeight// force redraw\r\n this._scroller.classList.remove('overflow-hidden')\r\n }\r\n\r\n // hide body scrollbars\r\n // if sidebar has backdrop or it's .sidebar-push & fixed\r\n var scrollbarInfo = Util.getScrollbarInfo()\r\n if (scrollbarInfo.width === 0 && (this._config.backdrop || (this._sidebar.classList.contains('sidebar-push') && this._sidebar.classList.contains('sidebar-fixed')))) {\r\n document.body.classList.add('mob-sidebar-body')\r\n }\r\n }\r\n\r\n hide (btn = null) {\r\n if (!this._hasTransitionEvent2) this._addTransitionEvent2()\r\n\r\n const ev = new $.Event(Event.HIDE)\r\n $(this._sidebar).trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n this._sidebar.classList.remove(ClassName.MOBILE_SHOW)\r\n this._updateTriggerBtns(this._triggerArrayMobile, false)\r\n\r\n // if (this._config.backdrop || this._sidebar.classList.contains('sidebar-push')) {\r\n document.body.classList.remove('mob-sidebar-body')\r\n // }\r\n\r\n if (Util.isReducedMotion()) this._toggleMobileCompleted()// call completion now\r\n }\r\n\r\n _dismiss () {\r\n this.hide()\r\n // document.body.classList.remove('overflow-hidden');\r\n $(this._triggerArrayMobile).css('pointer-events', '')\r\n\r\n $(document).off('.sidebar-dismiss')\r\n $(document).off('.sidebar-swipe')\r\n }\r\n\r\n _updateTriggerBtns (btns, expanded = false) {\r\n for (let i = 0, len = btns.length; i < len; i++) {\r\n if (expanded) btns[i].classList.remove(ClassName.COLLAPSED)\r\n else btns[i].classList.add(ClassName.COLLAPSED)\r\n\r\n btns[i].setAttribute('aria-expanded', expanded)\r\n }\r\n }\r\n\r\n _toggleCompleted () {\r\n this._isTransitioning = false\r\n this._sidebar.classList.remove(ClassName.TOGGLING)\r\n\r\n var expanded = !this._sidebar.classList.contains(this._desktopCollapsedClass)\r\n if (expanded) $(this._sidebar).trigger(Event.EXPANDED)\r\n else $(this._sidebar).trigger(Event.COLLAPSED)\r\n\r\n if (expanded) this._inner.classList.remove(ClassName.INNER_HOVER)\r\n }\r\n\r\n _toggleMobileCompleted () {\r\n var shown = this._sidebar.classList.contains(ClassName.MOBILE_SHOW)\r\n if (shown) $(this._sidebar).trigger(Event.SHOWN)\r\n else $(this._sidebar).trigger(Event.HIDDEN)\r\n }\r\n\r\n _addTransitionEvent () {\r\n if (this._hasTransitionEvent) return\r\n this._hasTransitionEvent = true\r\n\r\n $(this._sidebar)\r\n .on('transitionend', (e) => {\r\n if (e.target !== this._sidebar) return// make sure its not the children triggerring the event!\r\n\r\n this._toggleCompleted()\r\n })\r\n\r\n // add 'is-hover' class to '.sidebar-inner' when it becomes expanded (i.e. when mouse hovers it)\r\n var counter = 0\r\n $(this._inner)\r\n .on('transitionstart', (e) => {\r\n // skip on mobile (in which propertyName is 'transform')\r\n if (e.target !== this._inner || e.originalEvent.propertyName !== 'width') return\r\n\r\n counter++\r\n if (counter === 1) this._inner.classList.add(ClassName.INNER_HOVER)\r\n // else if (counter >= 2) {\r\n // this.classList.remove(ClassName.INNER_HOVER)\r\n // counter = 0\r\n // }\r\n })\r\n .on('transitionend', (e) => {\r\n // skip on mobile (in which propertyName is transform)\r\n if (e.target !== this._inner || e.originalEvent.propertyName !== 'width') return\r\n if (this._inner.clientWidth < 120) {\r\n // just to make sure we remove the extra class name when not needed\r\n this._inner.classList.remove(ClassName.INNER_HOVER)\r\n counter = 0\r\n // blur input element\r\n if (document.activeElement.tagName === 'INPUT' && this._inner.contains(document.activeElement)) document.activeElement.blur()\r\n }\r\n })\r\n }\r\n\r\n _addTransitionEvent2 () {\r\n if (this._hasTransitionEvent2) return\r\n this._hasTransitionEvent2 = true\r\n\r\n $(this._inner).on('transitionend', (e) => {\r\n if (e.target !== this._inner || e.originalEvent.propertyName !== 'transform') return\r\n\r\n this._toggleMobileCompleted()\r\n })\r\n }\r\n\r\n enableSwipeHide () {\r\n // swipe to hide sidebar\r\n var x1 = 0\r\n var y1 = 0\r\n var swipeDir = 0\r\n var aceScroll = this._scroller\r\n\r\n var This = this\r\n var isRTL = false\r\n\r\n var touchMoveCallback = function (ev) {\r\n var touches = ev.changedTouches[0]\r\n var newX = touches.pageX\r\n var newY = touches.pageY\r\n\r\n if (swipeDir === 0) {\r\n var diffY = Math.abs(y1 - newY)\r\n var diffX = Math.abs(x1 - newX)\r\n\r\n if (diffY > diffX) {\r\n swipeDir = 2// vertical i.e. scroll\r\n if (aceScroll) aceScroll.classList.remove('overflow-hidden')\r\n // document.body.classList.remove('overflow-hidden')\r\n\r\n $(document).off('touchmove.sidebar-swipe')\r\n } else if (diffX > 10) {\r\n swipeDir = 1// horizontal swipe\r\n This._inner.setAttribute('style', 'transition: none !important; will-change: transform; touch-action: none;')\r\n if (aceScroll) aceScroll.classList.add('overflow-hidden')\r\n // document.body.classList.add('overflow-hidden')\r\n }\r\n }\r\n if (swipeDir !== 1) return\r\n\r\n var moveX = parseInt(x1 - newX)\r\n if ((!isRTL && moveX > 0) || (isRTL && moveX < 0)) { // move it outside of view\r\n This._inner.style.transform = 'translateX(' + (-1 * moveX) + 'px)'\r\n } else This._inner.style.transform = ''\r\n }\r\n\r\n var t1 = 0\r\n $(document)\r\n .on('touchstart.sidebar-swipe', function (e) {\r\n var touches = e.originalEvent.changedTouches[0]\r\n x1 = touches.pageX\r\n y1 = touches.pageY\r\n\r\n t1 = Date.now()\r\n isRTL = document.documentElement.classList.contains('rtl')\r\n\r\n $(this).on('touchmove.sidebar-swipe', function (e) {\r\n touchMoveCallback(e.originalEvent)\r\n })\r\n })\r\n .on('touchend.sidebar-swipe touchcancel.sidebar-swipe', function (e) {\r\n var touches = e.originalEvent.changedTouches[0]\r\n var x2 = touches.pageX\r\n var t2 = Date.now()\r\n\r\n if (swipeDir === 1 &&\r\n ( // dismiss if moved by more than 100px or moved more than 40px in a short time (less than 300ms)\r\n (!isRTL && (x1 - x2 > 100 || (x1 - x2 > 40 && t2 - t1 < 300))) || (isRTL && (x1 - x2 < -100 || (x1 - x2 < -40 && t2 - t1 < 300)))\r\n )\r\n ) { // if moved more than 100px or 40px in less than 300ms\r\n This._dismiss()\r\n }\r\n\r\n This._inner.setAttribute('style', '')\r\n if (aceScroll) aceScroll.classList.remove('overflow-hidden')\r\n // document.body.classList.remove('overflow-hidden')\r\n\r\n swipeDir = 0\r\n })\r\n }\r\n\r\n enableSubmenuToggle () {\r\n var _firefox = 'MozAppearance' in document.documentElement.style\r\n var _scrollIntoViewOptions = 'scrollBehavior' in document.documentElement.style\r\n\r\n var This = this\r\n $(this._sidebar).on('click', '.dropdown-toggle', function (ev) {\r\n ev.preventDefault()\r\n\r\n var navItem = $(this).closest('.nav-item')// get the parent LI.nav-item\r\n var subMenu = navItem.find('> .submenu').eq(0)// get the direct submenu (not the children)\r\n\r\n var subPos = null\r\n if (This._sidebar.classList.contains('hoverable') || This._sidebar.classList.contains('sidebar-hover')) {\r\n // don't toggle submenu if submenu is supposed to be displayed as popup\r\n subPos = window.getComputedStyle(subMenu.get(0)).position\r\n if (subPos === 'absolute') return\r\n }\r\n\r\n if (subMenu.hasClass('collapsing')) return// don't toggle in the middle of toggling\r\n\r\n // hide sibling submenus\r\n navItem.addClass('is-toggling')\r\n navItem.parent().find('> .nav-item.open').addClass('is-toggling').not(navItem).removeClass('open').find('> .submenu.show').collapse('hide')\r\n\r\n // toggle submenu\r\n navItem.toggleClass('open')\r\n subMenu.collapse('toggle')\r\n\r\n // scroll submenu into view\r\n if (This._config.subscroll && This._sidebar.classList.contains('sidebar-fixed') && navItem.hasClass('open')) {\r\n if (This._sidebar.classList.contains('sidebar-h')) {\r\n subPos = window.getComputedStyle(subMenu.get(0)).position\r\n if (subPos === 'absolute') return\r\n return // no scroll for horizontal menu\r\n }\r\n\r\n var smooth = !Util.isReducedMotion()\r\n setTimeout(function () {\r\n try {\r\n if (_scrollIntoViewOptions) {\r\n subMenu.get(0).scrollIntoView({\r\n behavior: smooth ? 'smooth' : 'auto',\r\n block: 'nearest'\r\n })\r\n } else {\r\n subMenu.get(0).scrollIntoView(false)\r\n }\r\n } catch (err) {}\r\n }, smooth ? 150 : 0)\r\n }\r\n\r\n subMenu.on('shown.bs.collapse.is-toggling hidden.bs.collapse.is-toggling', function () {\r\n subMenu.off('.is-toggling')\r\n $('.nav-item.is-toggling').removeClass('is-toggling')\r\n })\r\n\r\n // firefox continues to disable scroll chaining when sidebar is not scrollable anymore, so a little fix around here\r\n if (_firefox) {\r\n subMenu.one('shown.bs.collapse.ff-fix hidden.bs.collapse.ff-fix', () => {\r\n subMenu.off('.ff-fix')\r\n if (This._scroller === null) return\r\n if (This._scroller.scrollHeight <= This._scroller.clientHeight) {\r\n This._scroller.style.overscrollBehavior = 'auto'\r\n } else This._scroller.style.overscrollBehavior = ''\r\n })\r\n }\r\n })\r\n }\r\n\r\n enableSubmenuPullup () {\r\n if (this._pullupEnabled) return\r\n this._pullupEnabled = true\r\n\r\n var This = this\r\n $(this._sidebar).on('transitionstart', '.submenu', function (ev) {\r\n if (ev.target !== this || ev.originalEvent.propertyName !== 'margin-left' || !(This._collapsed || This._sidebar.classList.contains('sidebar-hover'))) return\r\n\r\n var navItem = $(this).parent()\r\n var submenu = $(this)\r\n\r\n var navtxt = navItem.find('> .nav-link > .nav-text.fadeable')// only first level nav-text items\r\n\r\n navItem.removeClass('submenu-pullup')\r\n submenu.css('transform', '')\r\n navtxt.css('transform', '')\r\n\r\n /// ///////////////////////\r\n\r\n var rect = submenu.get(0).getBoundingClientRect()\r\n var wh = $(window).height()\r\n\r\n var diff = parseInt(rect.bottom - wh)\r\n\r\n if (diff > 0) { // if submenu bottom is below window area\r\n // check to see if submenu top will go out of window if we move it up by \"diff\" pixels\r\n // also consider that the first level item's .nav-text shouldn't go out of window's top\r\n var navtxtHeight = navtxt.height() || 0\r\n\r\n var diff2 = rect.top - navtxtHeight - diff - $('.navbar').height()// don't go above navbar\r\n if (diff2 < 0) diff = diff + diff2\r\n\r\n diff = parseInt(diff) + 1// so that submenu's border is visible\r\n if (This._collapsed) {\r\n if (navtxtHeight && diff > navtxtHeight / 2) navItem.addClass('submenu-pullup')// this class makes the .sub-arrow's color white, to match submenu color\r\n } else {\r\n navItem.addClass('submenu-pullup')\r\n }\r\n\r\n submenu.css('transform', 'translateY(-' + diff + 'px)')\r\n if (This._collapsed) {\r\n navtxt.css('transform', 'translateY(-' + diff + 'px)')\r\n }\r\n }\r\n })\r\n }\r\n\r\n disableSubmenuPullup () {\r\n this._pullupEnabled = false\r\n $(this._sidebar).off('transitionstart.pullup')\r\n this._resetPullUp()\r\n }\r\n\r\n _resetPullUp () {\r\n $(this._sidebar).find('.submenu-pullup').removeClass('submenu-pullup').find('.nav-text, .submenu').css('transform', '')\r\n }\r\n\r\n // scroll active item into view\r\n scrollToActive () {\r\n if (!this._sidebar.classList.contains('sidebar-fixed') || this._scroller === null) return\r\n\r\n var active = this._sidebar.querySelector('.nav-item.active:not(.open) > .nav-link')\r\n try {\r\n active.scrollIntoView({ behavior: 'auto', block: 'end' })// or block: \"center\"?\r\n this._scroller.scrollTop = this._scroller.scrollTop + 30\r\n } catch (e) {}\r\n }\r\n\r\n _getConfig (config) {\r\n config = {\r\n ...Default,\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (typeof bootstrap !== 'undefined') {\r\n bootstrap.Util.typeCheckConfig(\r\n NAME,\r\n config,\r\n this.constructor.DefaultType\r\n )\r\n }\r\n\r\n return config\r\n }\r\n\r\n // Static methods\r\n static _jQueryInterface (config) {\r\n return this.each(function () {\r\n const $this = $(this)\r\n let data = $this.data(DATA_KEY)\r\n const _config = {\r\n ...Default,\r\n ...$this.data(),\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (!data) {\r\n data = new Sidebar(this, _config)\r\n $this.data(DATA_KEY, data)\r\n }\r\n\r\n if (typeof config === 'string') {\r\n if (typeof data[config] === 'undefined') {\r\n throw new TypeError(`No method named \"${config}\"`)\r\n }\r\n data[config]()\r\n }\r\n })\r\n }\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Data Api implementation\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\n$(window).on(Event.LOAD_DATA_API, () => {\r\n const sidebars = [].slice.call(document.querySelectorAll(Selector.SIDEBAR))\r\n\r\n for (let i = 0; i < sidebars.length; i++) {\r\n const $sidebar = $(sidebars[i])\r\n Sidebar._jQueryInterface.call($sidebar, $sidebar.data())\r\n }\r\n})\r\n\r\n/**\r\n$(document).on(Event.CLICK_DATA_API, `${Selector.DATA_TOGGLE} , ${Selector.DATA_TOGGLE_MOBILE}`, function (event) {\r\n\tif (event.currentTarget.tagName === 'A') {\r\n\t event.preventDefault()\r\n\t}\r\n\r\n\tconst $trigger = $(this)\r\n\tconst selector = bootstrap.Util.getSelectorFromElement(this)\r\n\tconst selectors = [].slice.call(document.querySelectorAll(selector))\r\n\r\n\t$(selectors).each(function () {\r\n\t const $target = $(this)\r\n\t const data = $target.data(DATA_KEY)\r\n\t const config = data ? 'toggle' : $trigger.data()\r\n\t Sidebar._jQueryInterface.call($target, config)\r\n\t})\r\n})\r\n*/\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * jQuery\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\nif (typeof $ !== 'undefined') {\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n $.fn[NAME] = Sidebar._jQueryInterface\r\n $.fn[NAME].Constructor = Sidebar\r\n $.fn[NAME].noConflict = () => {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Sidebar._jQueryInterface\r\n }\r\n}\r\n\r\nexport default Sidebar\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): aside.js\r\n Aside element based on Bootstrap's modal\r\n*/\r\n\r\nimport $ from 'jquery'\r\nimport bootstrap from 'bootstrap'\r\nimport Util from './util'\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nconst NAME = 'aceAside'\r\nconst VERSION = '2.1.0'\r\nconst DATA_KEY = 'ace.aside'\r\nconst EVENT_KEY = `.${DATA_KEY}`\r\n\r\nconst Event = {\r\n SHOW: `show${EVENT_KEY}`,\r\n HIDE: `hide${EVENT_KEY}`\r\n}\r\n\r\nconst DefaultType = {\r\n placement: 'string',\r\n margin: 'number',\r\n\r\n fade: 'boolean',\r\n\r\n autohide: '(boolean|number)',\r\n dismiss: 'boolean',\r\n\r\n blocking: 'boolean',\r\n backdrop: '(boolean|string)',\r\n\r\n container: 'boolean',\r\n belowNav: 'boolean',\r\n\r\n width: '(boolean|number)',\r\n height: '(boolean|number)',\r\n\r\n scroll: '(boolean|string)'\r\n}\r\n\r\nconst Default = {\r\n placement: 'center',\r\n margin: 0,\r\n\r\n fade: false,\r\n\r\n autohide: false,\r\n dismiss: false,\r\n\r\n blocking: false,\r\n backdrop: false,\r\n\r\n container: false,\r\n belowNav: false,\r\n\r\n width: false,\r\n height: false,\r\n\r\n scroll: 'body'\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Class Definition\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nclass Aside {\r\n constructor (element, config) {\r\n this._config = this._getConfig(config)\r\n this._element = element\r\n this.$element = $(element)\r\n\r\n this._init(this._config)\r\n }\r\n\r\n static get VERSION () {\r\n return VERSION\r\n }\r\n\r\n static get DefaultType () {\r\n return DefaultType\r\n }\r\n\r\n static get Default () {\r\n return Default\r\n }\r\n\r\n // update(config) {\r\n // this._config = this._getConfig(config);\r\n // this._clear();//clear previously assigned classes\r\n\r\n // this._init();\r\n // }\r\n\r\n _init (config) {\r\n this._setPlacement(config.placement)\r\n\r\n this._element.classList.add('ace-aside')\r\n\r\n if (!config.blocking) {\r\n this._element.classList.add('modal-nb')\r\n this.$element.attr('data-backdrop', 'false').data('backdrop', false)\r\n } else {\r\n if (config.backdrop) {\r\n this.$element.attr('data-backdrop-bg', config.backdrop).data('backdrop', config.backdrop)\r\n } else {\r\n this.$element.attr('data-backdrop-bg', 'bg-transparent')\r\n }\r\n }\r\n\r\n if (config.dismiss) this._element.classList.add('modal-dismiss')\r\n\r\n if (config.fade) {\r\n this._element.classList.add('aside-fade', 'fade')\r\n }\r\n\r\n if (config.belowNav) this._element.classList.add('aside-below-nav')\r\n\r\n if (config.extraClass) this._element.classList.add(...config.extraClass.split(' '))\r\n\r\n if (config.container) this._element.classList.add('container')\r\n\r\n if (config.width) {\r\n this.$element.find('.modal-dialog').css('width', isNaN(config.width) ? config.width : this._config.width + 'px')\r\n }\r\n if (config.height) {\r\n this.$element.find('.modal-dialog').css('height', isNaN(config.height) ? config.height : this._config.height + 'px')\r\n }\r\n\r\n // if (/^(content|body)$/.test(config.scroll)) {\r\n // this.$element.find('.modal-content').addClass('scroll-' + config.scroll)\r\n // }\r\n\r\n this.$element.off('shown.bs.modal.autohide')\r\n if (config.autohide) {\r\n const This = this\r\n this.$element.on('shown.bs.modal.autohide', function () {\r\n setTimeout(function () {\r\n This.hide()\r\n }, config.autohide)\r\n })\r\n }\r\n }\r\n\r\n _setPlacement (placement = 'center') {\r\n const placementMap = {\r\n t: 'aside-top',\r\n top: 'aside-top',\r\n tc: 'aside-top aside-c',\r\n tr: 'aside-top aside-r',\r\n tl: 'aside-top aside-l',\r\n\r\n b: 'aside-bottom',\r\n bottom: 'aside-bottom',\r\n bc: 'aside-bottom aside-c',\r\n br: 'aside-bottom aside-r',\r\n bl: 'aside-bottom aside-l',\r\n\r\n r: 'aside-right',\r\n right: 'aside-right',\r\n rc: 'aside-right aside-m',\r\n\r\n l: 'aside-left',\r\n left: 'aside-left',\r\n lc: 'aside-left aside-m',\r\n\r\n c: 'aside-center',\r\n center: 'aside-center'\r\n }\r\n\r\n placement = placement || 'c'\r\n const className = placementMap[placement] || 'aside-center'\r\n if (placement === 'c' || placement === 'center') {\r\n this._config.fade = true\r\n this._element.classList.remove('container')\r\n }\r\n\r\n this._element.className = this._element.className + ' ' + className\r\n }\r\n\r\n /**\r\n _clear() {\r\n this._element.classList.remove('modal-nb');\r\n this._element.classList.remove('modal-dismiss');\r\n this._element.classList.remove('aside-fade');\r\n this._element.classList.remove('container');\r\n\r\n this._element.className = this._element.className.replace(/aside\\-\\w+\\s/ , ' ');\r\n }\r\n */\r\n\r\n // Public methods\r\n show () {\r\n const showEvent = new $.Event(Event.SHOW)\r\n this.$element.trigger(showEvent)\r\n if (showEvent.isDefaultPrevented()) {\r\n return\r\n }\r\n\r\n this.$element.modal('show')\r\n }\r\n\r\n hide () {\r\n const hideEvent = new $.Event(Event.HIDE)\r\n this.$element.trigger(hideEvent)\r\n if (hideEvent.isDefaultPrevented()) {\r\n return\r\n }\r\n\r\n this.$element.modal('hide')\r\n }\r\n\r\n // Private methods\r\n _getConfig (config) {\r\n config = {\r\n ...Default,\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (typeof bootstrap !== 'undefined') {\r\n bootstrap.Util.typeCheckConfig(\r\n NAME,\r\n config,\r\n this.constructor.DefaultType\r\n )\r\n }\r\n\r\n return config\r\n }\r\n\r\n // Static methods\r\n static _jQueryInterface (config) {\r\n return this.each(function () {\r\n const $element = $(this)\r\n\r\n let data = $element.data(DATA_KEY)\r\n\r\n // return if it's a function call\r\n if (typeof config === 'string' && data) {\r\n if (typeof data[config] === 'undefined') {\r\n throw new TypeError(`No method named \"${config}\"`)\r\n }\r\n\r\n data[config]()// call function\r\n return\r\n }\r\n\r\n const _config = {\r\n ...Default,\r\n ...$(this).data(),\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (!data) {\r\n data = new Aside(this, _config)\r\n $element.data(DATA_KEY, data)\r\n } else {\r\n // update config\r\n if (typeof config === 'object') data.update(_config)\r\n }\r\n })\r\n }\r\n\r\n //\r\n static _HandleAside () {\r\n var visibleModalSelector = '.modal.show:not(.modal-nb)'\r\n var dismissEventId = 0\r\n\r\n $(document)\r\n .on('show.bs.modal', '.modal', function (e) {\r\n if (e.isDefaultPrevented()) return\r\n\r\n var modal = this\r\n if (modal.classList.contains('modal-nb')) {\r\n if ($(visibleModalSelector).length === 0) {\r\n document.body.classList.add('modal-nb')// disable .modal-open effects for .modal-nb\r\n }\r\n } else {\r\n if (!modal.classList.contains('ace-aside')) {\r\n // check to see if we will have modal scrollbars\r\n modal.style.display = 'block'\r\n if (modal.scrollHeight > modal.clientHeight) document.body.classList.add('modal-scroll')\r\n var scrollbars = Util.getScrollbarInfo()\r\n if (scrollbars.width === 0) document.body.classList.add('scrollbar-w0')\r\n modal.style.display = ''\r\n }\r\n\r\n // set modal padding value (equal to scrollbar width)\r\n document.body.style.setProperty('--modal-padding', (window.innerWidth - document.body.scrollWidth) + 'px')\r\n\r\n var backdropBg = $(modal).attr('data-backdrop-bg')\r\n if (backdropBg) {\r\n setTimeout(function () {\r\n $('.modal-backdrop').addClass(backdropBg)\r\n }, 0)\r\n }\r\n }\r\n })\r\n .on('shown.bs.modal', '.modal', function (e) {\r\n var modal = this\r\n\r\n if (modal.classList.contains('modal-nb')) {\r\n document.body.classList.remove('modal-nb')\r\n\r\n if ($(visibleModalSelector).length === 0) { // if no blocking modals\r\n document.body.classList.remove('modal-open')// disable .modal-open effects\r\n document.body.style.paddingRight = ''// and remove paddingRight\r\n }\r\n\r\n if (modal.classList.contains('modal-dismiss')) {\r\n // we add an extra ID to our event namespace\r\n // because sometimes before a dismissible modal is hidden inside the below setTimeout, another dismissible gets shown and registers the following event which gets\r\n // cleared in the on.hidden event below ... so we use different IDs for each one ...\r\n modal.setAttribute('data-dismiss-event-id', ++dismissEventId)\r\n $(document.body).on('mouseup.aside-dismiss.' + dismissEventId + ' touchend.aside-dismiss.' + dismissEventId, function (e) {\r\n // why mouseup? because 'click' may get 'stopPropagated' in some plugins such as Bootstrap's dropdown\r\n if (!$.contains(modal, e.target)) { // clicked outside modal\r\n // $(document.body).off('.aside-dismiss.'+dismissEventId);//not needed, handled in hidden event callback\r\n\r\n // why timeout?\r\n // because if we click on the same button that triggers this modal, its 'hide' function will be called and instantly followed by 'show' function\r\n // so we first let 'show' be called and then we call 'hide'\r\n setTimeout(function () {\r\n $(modal).modal('hide')\r\n }, 0)\r\n }\r\n })\r\n }\r\n }\r\n })\r\n\r\n .on('hidden.bs.modal', '.modal', function () {\r\n if ($(visibleModalSelector).length === 0) document.body.style.paddingRight = ''// required for rare cases that body padding is still not cleared\r\n\r\n if (!this.classList.contains('modal-nb')) {\r\n document.body.classList.remove('modal-scroll')\r\n document.body.classList.remove('scrollbar-w0')\r\n }\r\n\r\n // we might have dismissed modal dialog using the close button inside it, so we turn off the events looking for clicks outside modal\r\n if (this.classList.contains('modal-dismiss')) {\r\n var eid = this.getAttribute('data-dismiss-event-id')\r\n $(document.body).off('.aside-dismiss.' + eid)\r\n }\r\n })\r\n\r\n //\r\n\r\n // enable modal functionality for modal boxes and asides that are shown (.show) by default\r\n $('.modal.show').modal('show')\r\n }\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * jQuery\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\nif (typeof $ !== 'undefined') {\r\n Aside._HandleAside()\r\n\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n $.fn[NAME] = Aside._jQueryInterface\r\n $.fn[NAME].Constructor = Aside\r\n $.fn[NAME].noConflict = () => {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Aside._jQueryInterface\r\n }\r\n}\r\n\r\nexport default Aside\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): toaster.js\r\n Wrapper for Bootstrap's toast elements\r\n*/\r\n\r\nimport $ from 'jquery'\r\nimport bootstrap from 'bootstrap'\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nconst NAME = 'aceToaster'\r\nconst VERSION = '2.1.0'\r\nconst DATA_KEY = 'ace.toaster'\r\nconst EVENT_KEY = `.${DATA_KEY}`\r\n\r\nconst Event = {\r\n CLEAR: `clear${EVENT_KEY}`,\r\n ADD: `add${EVENT_KEY}`,\r\n ADDED: `added${EVENT_KEY}`\r\n}\r\n\r\nconst DefaultType = {\r\n placement: 'string',\r\n close: 'boolean',\r\n autoremove: 'boolean',\r\n delay: 'number',\r\n template: 'string',\r\n alert: 'boolean'\r\n}\r\n\r\nconst Default = {\r\n placement: 'tr',\r\n close: true,\r\n autoremove: true,\r\n delay: 2500,\r\n template: '<div class=\"toast\"><div class=\"d-flex\"><div class=\"toast-image\"></div><div class=\"toast-main\"><div class=\"toast-header\"></div><div class=\"toast-body\"></div></div></div></div>',\r\n alert: true\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Class Definition\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nclass Toaster {\r\n constructor () {\r\n this._lastToastId = 0\r\n this._toast = null\r\n }\r\n\r\n static get VERSION () {\r\n return VERSION\r\n }\r\n\r\n static get DefaultType () {\r\n return DefaultType\r\n }\r\n\r\n static get Default () {\r\n return Default\r\n }\r\n\r\n // Public methods\r\n add (config) {\r\n const _config = this._getConfig(config)\r\n\r\n const $newToast = $(_config.template)\r\n this._toast = $newToast[0]\r\n\r\n this._lastToastId++\r\n $newToast.addClass('ace-toaster-item').attr({ id: `ace-toaster-item-${this._lastToastId}`, 'aria-atomic': 'true' })\r\n if (_config.alert) {\r\n $newToast.attr({ role: 'alert', 'aria-live': 'assertive' })\r\n } else {\r\n $newToast.attr({ role: 'status', 'aria-live': 'polite' })\r\n }\r\n\r\n const $toastHeader = $newToast.find('.toast-header')\r\n if (_config.title) {\r\n let title = typeof _config.title === 'function' ? _config.title.call(this._toast, _config) : _config.title\r\n title = $(`<div class=\"toast-title\">${title}</div>`)\r\n\r\n if (_config.titleClass) {\r\n title.addClass(_config.titleClass)\r\n }\r\n $toastHeader.append(title)\r\n }\r\n\r\n if (_config.close) {\r\n let close = $newToast.find('[data-dismiss=\"toast\"]')\r\n if (close.length === 0) {\r\n close = $('<button type=\"button\" data-dismiss=\"toast\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>')\r\n $toastHeader.append(close)\r\n }\r\n close.addClass(_config.closeClass ? _config.closeClass : 'close')\r\n }\r\n\r\n if (_config.body) {\r\n $newToast.find('.toast-body').append(typeof _config.body === 'function' ? _config.body.call(this._toast, _config) : _config.body)\r\n if (_config.bodyClass) {\r\n $newToast.find('.toast-body').addClass(_config.bodyClass)\r\n }\r\n }\r\n\r\n if (_config.image) {\r\n $newToast.find('.toast-image').append(`<img src=\"${_config.image}\" />`)\r\n }\r\n if (_config.icon) {\r\n $newToast.find('.toast-image').append(_config.icon)\r\n }\r\n if (!(_config.image || _config.icon)) $newToast.find('.toast-image').remove()\r\n\r\n if (_config.className) {\r\n $newToast.addClass(_config.className)\r\n }\r\n if (_config.headerClass) {\r\n $toastHeader.addClass(_config.headerClass)\r\n }\r\n\r\n this._addToContainer($newToast, _config)\r\n\r\n return $newToast.get(0)\r\n }\r\n\r\n // add an existing toast element to our container\r\n addEl (element, config) {\r\n const _config = this._getConfig(config)\r\n\r\n this._toast = element\r\n const $existingToast = $(this._toast).addClass('ace-toaster-item')\r\n if (!$existingToast.attr('id')) $existingToast.attr('id', `ace-toaster-item-${++this._lastToastId}`)\r\n\r\n this._addToContainer($existingToast, _config, false)\r\n }\r\n\r\n // add toast element to container\r\n _addToContainer ($toast, _config, isNewElement = true) {\r\n // trigger ADD event before adding it to our container\r\n const addEvent = new $.Event(Event.ADD)\r\n addEvent.target = this._toast\r\n\r\n $(document).trigger(addEvent)\r\n if (addEvent.isDefaultPrevented()) {\r\n if (isNewElement) $toast.remove()\r\n return\r\n }\r\n // end of trigger\r\n\r\n // add the toaster container to body\r\n let container = $(`.ace-toaster-container.position-${_config.placement}`).eq(0)\r\n if (container.length === 0) {\r\n container = $(`<div class=\"ace-toaster-container position-${_config.placement}\"/>`).appendTo(document.body)\r\n }\r\n if (_config.belowNav) {\r\n container.addClass('toaster-below-nav')\r\n }\r\n\r\n // add to container\r\n if (_config.placement.indexOf('b') === 0) { // bottom placement\r\n container.prepend($toast)\r\n } else {\r\n container.append($toast)\r\n }\r\n\r\n // without having an initial .toast element, fade-in animation isn't taking place??!!\r\n let dummy = $('#ace-toaster-dummy-toast-1')\r\n if (dummy.length === 0) dummy = $('<div id=\"ace-toaster-dummy-toast-1\" class=\"toast d-none invisible\"></div>').appendTo('body')\r\n dummy.toast('show')\r\n /// ///////////////////////////////////////////////\r\n\r\n const _toastOptions = {}\r\n if (_config.sticky === true || _config.autohide === false) _toastOptions.autohide = false\r\n if (_config.animation === false) _toastOptions.animation = false\r\n // if delay is below 30, we consider it as seconds, not milliseconds\r\n _toastOptions.delay = _config.delay > 30 ? _config.delay : _config.delay * 1000\r\n\r\n if (_config.width) $toast.css('width', isNaN(_config.width) ? _config.width : _config.width + 'px')\r\n\r\n $toast\r\n .toast(_toastOptions)\r\n .toast('show')\r\n .one('hidden.bs.toast.1', function () {\r\n // show it again (invisibly with opacity = 0) and use bootstrap Collapse plugin to hide it, so that other toasts stacked below it move up smoothly\r\n $toast.removeClass('hide').addClass('show').collapse('hide').one('hidden.bs.collapse', function () {\r\n $toast.toast('dispose')\r\n if (_config.autoremove) {\r\n $toast.remove()\r\n }\r\n })\r\n })\r\n\r\n // trigger ADDED event before adding it to DOM\r\n const addedEvent = new $.Event(Event.ADDED)\r\n addedEvent.target = this._toast\r\n\r\n $(document).trigger(addedEvent)\r\n }\r\n\r\n // hide toasts\r\n remove (id) {\r\n this.hide(id, true)\r\n }\r\n\r\n removeAll (placement = null) {\r\n this.hideAll(placement, true)\r\n }\r\n\r\n // remove toast by ID or element reference\r\n hide (id, remove = false) {\r\n const selector = isNaN(id) ? id : '#ace-toaster-item-' + parseInt(id)\r\n this._hideBySelector(selector, remove)\r\n }\r\n\r\n // remove ALL toasts\r\n hideAll (placement = null, remove = false) {\r\n // trigger CLEAR event before removing ALL\r\n const clearEvent = new $.Event(Event.CLEAR) // , { placement: placement || 'all', remove: remove })\r\n $(document).trigger(clearEvent, { placement: placement || 'all', remove: remove })\r\n if (clearEvent.isDefaultPrevented()) {\r\n return\r\n }\r\n // end of trigger\r\n\r\n let selector = '.toast.ace-toaster-item'\r\n if (placement) selector = `.ace-toaster-container.position-${placement} ${selector}`\r\n this._hideBySelector(selector, remove)\r\n }\r\n\r\n _hideBySelector (selector, remove = false) {\r\n $(selector).each(function () {\r\n var $toast = $(this)\r\n if ($toast.is(':visible')) {\r\n // fade out and then remove\r\n $toast.toast('hide')\r\n .off('hidden.bs.toast.1')// remove the previous handler above (because it has autoremove)\r\n .one('hidden.bs.toast.2', function () {\r\n $toast.toast('dispose')\r\n if (remove) $toast.remove()\r\n })\r\n } else {\r\n $toast.toast('dispose')\r\n // instantly remove if not visible\r\n if (remove) $toast.remove()\r\n }\r\n })\r\n }\r\n\r\n // Private methods\r\n _getConfig (config) {\r\n config = {\r\n ...Default,\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (typeof bootstrap !== 'undefined') {\r\n bootstrap.Util.typeCheckConfig(\r\n NAME,\r\n config,\r\n this.constructor.DefaultType\r\n )\r\n }\r\n\r\n return config\r\n }\r\n\r\n // Static methods\r\n static _jQueryInterface (config) {\r\n return this.each(function () {\r\n config = {\r\n ...{ autoremove: false }, // don't autoremove it\r\n ...$(this).data(),\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n $.aceToaster.addEl(this, config)\r\n })\r\n }\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * jQuery\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\nif (typeof $ !== 'undefined') {\r\n $[NAME] = new Toaster()\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n $.fn[NAME] = Toaster._jQueryInterface\r\n $.fn[NAME].Constructor = Toaster\r\n $.fn[NAME].noConflict = () => {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Toaster._jQueryInterface\r\n }\r\n}\r\n\r\nexport default Toaster\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): widget.js\r\n Widgets based on Bootstrap's cards\r\n*/\r\n\r\nimport $ from 'jquery'\r\nimport bootstrap from 'bootstrap'\r\nimport Util from './util'\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nconst NAME = 'aceWidget'\r\nconst VERSION = '2.1.0'\r\nconst DATA_KEY = 'ace.widget'\r\nconst EVENT_KEY = `.${DATA_KEY}`\r\nconst DATA_API_KEY = '.data-api'\r\n\r\nconst Event = {\r\n SHOW: `show${EVENT_KEY}`,\r\n HIDE: `hide${EVENT_KEY}`,\r\n SHOWN: `show${EVENT_KEY}`,\r\n HIDDEN: `hide${EVENT_KEY}`,\r\n CLOSE: `close${EVENT_KEY}`,\r\n CLOSED: `closed${EVENT_KEY}`,\r\n EXPAND: `expand${EVENT_KEY}`,\r\n EXPANDED: `expanded${EVENT_KEY}`,\r\n RESTORE: `restore${EVENT_KEY}`,\r\n RESTORED: `restored${EVENT_KEY}`,\r\n // RELOADED: `reloaded${EVENT_KEY}`,\r\n RELOAD: `reload${EVENT_KEY}`,\r\n CLICK_DATA_API: `click${EVENT_KEY}${DATA_API_KEY}`\r\n}\r\nconst Selector = {\r\n DATA_ACTION: '.card-toolbar a[data-action]'\r\n}\r\n\r\n/**\r\nconst DefaultType = {\r\n loadingHtml: 'string'\r\n}\r\n\r\nconst Default = {\r\n loadingHtml: '<i class=\"bs-card-loading-icon fa fa-spinner fa-spin fa-2x text-white\"></i>'\r\n}\r\n*/\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Class Definition\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nclass Widget {\r\n constructor (element, config) {\r\n this._config = this._getConfig(config)\r\n this._element = element\r\n this.$box = $(element)\r\n }\r\n\r\n static get VERSION () {\r\n return VERSION\r\n }\r\n\r\n /**\r\n static get DefaultType () {\r\n return DefaultType\r\n }\r\n\r\n static get Default () {\r\n return Default\r\n }\r\n */\r\n\r\n reload () {\r\n const ev = new $.Event(Event.RELOAD)\r\n this.$box.trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n this.startLoading()\r\n }\r\n\r\n startLoading (loadingHtml = '<i class=\"bs-card-loading-icon fa fa-spinner fa-spin fa-2x text-white\"></i>') {\r\n this.$box.append('<div class=\"bs-card-loading-overlay\">' + loadingHtml + '</div>')\r\n }\r\n\r\n stopLoading () {\r\n this.$box.find('.bs-card-loading-overlay').remove()\r\n }\r\n\r\n closeFast () {\r\n const ev = new $.Event(Event.CLOSE)\r\n this.$box.trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n this.$box.trigger(Event.CLOSED).remove()\r\n }\r\n\r\n close () {\r\n const ev = new $.Event(Event.CLOSE)\r\n this.$box.trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n var $box = this.$box\r\n\r\n var _closeComplete = function () {\r\n if (this.hasClass('card-expand')) this.next('.card-expanded-placeholder').remove()// remove the placeholder\r\n this.trigger(Event.CLOSED).remove()\r\n }\r\n\r\n if (Util.isReducedMotion()) _closeComplete.call($box)\r\n else {\r\n $box.addClass('fade').on('transitionend.close', function (e) {\r\n if (e.target !== this) return// because transitionend might fire for children elements (like animated toolbar buttons)\r\n _closeComplete.call($box)\r\n })\r\n }\r\n }\r\n\r\n toggle (type) {\r\n var $box = this.$box\r\n var $body = $box.find('.card-body').eq(0)\r\n\r\n var action = (type && typeof type === 'string' && type.match(/show|hide/)[0]) || ($body.is(':visible') ? 'hide' : 'show')\r\n\r\n var eventName = action === 'hide' ? 'hide' : 'show'\r\n const ev = new $.Event(eventName + EVENT_KEY)\r\n this.$box.trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n this._toggleIcon(type && typeof type === 'object' && type instanceof window.HTMLElement ? type : null, action)\r\n\r\n ///\r\n\r\n if (action === 'hide') $body.addClass('show')// .show class required for bs collapse plugin\r\n\r\n var eventCompleteName = action === 'hide' ? 'hidden' : 'shown'\r\n $body.collapse(action).on(eventCompleteName + '.bs.collapse', function () {\r\n $box.trigger(eventCompleteName + EVENT_KEY)\r\n })\r\n }\r\n\r\n hide () {\r\n this.toggle('hide')\r\n }\r\n\r\n show () {\r\n this.toggle('show')\r\n }\r\n\r\n toggleFast (type) {\r\n var $body = this.$box.find('.card-body').eq(0)\r\n var action = (type && typeof type === 'string' && type.match(/show|hide/)[0]) || ($body.is(':visible') ? 'hide' : 'show')\r\n\r\n var eventName = action === 'hide' ? 'hide' : 'show'\r\n const ev = new $.Event(eventName + EVENT_KEY)\r\n this.$box.trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n $body.addClass('collapse')\r\n if (action === 'hide') $body.removeClass('show')\r\n else $body.addClass('show')\r\n\r\n this._toggleIcon(type && typeof type === 'object' && type instanceof window.HTMLElement ? type : null, action)\r\n\r\n var eventCompleteName = action === 'hide' ? 'hidden' : 'shown'\r\n this.$box.trigger(eventCompleteName + EVENT_KEY)\r\n }\r\n\r\n hideFast () {\r\n this.toggleFast('hide')\r\n }\r\n\r\n showFast () {\r\n this.toggleFast('show')\r\n }\r\n\r\n _toggleIcon (button, action) {\r\n if (!button) {\r\n button = this.$box.find('a[data-action=toggle]').get(0)\r\n }\r\n\r\n //\r\n if (button) {\r\n if (action === 'show') {\r\n button.classList.remove('collapsed')\r\n } else {\r\n button.classList.add('collapsed')\r\n }\r\n }\r\n }\r\n\r\n // fullscreen\r\n expand (expand, animate) {\r\n var button = this.$box.find('> .card-header a[data-action=expand]')\r\n\r\n var $expand = expand === true || !this.$box.hasClass('card-expand')\r\n animate = !((animate === false || Util.isReducedMotion()))// default is true\r\n\r\n var $box = this.$box\r\n var box = $box[0]\r\n\r\n if ($expand) {\r\n const ev = new $.Event(Event.EXPAND)\r\n this.$box.trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n button.addClass('active')\r\n\r\n if (animate) {\r\n var rect = box.getBoundingClientRect()\r\n box.setAttribute('style', `left: ${rect.left}px; top: ${rect.top}px; width: ${rect.width}px; height: ${rect.height}px;`)\r\n box.classList.add('card-expanding')\r\n\r\n $box.on('transitionend.expanding', function (e) {\r\n if (e.target !== this) return// because transitionend might fire for children elements (like animated icons of toolbar)\r\n\r\n $box.off('.expanding')\r\n .removeClass('card-expanding')\r\n .trigger(Event.EXPANDED)\r\n })\r\n\r\n var placeholder = document.createElement('DIV')\r\n placeholder.classList.add('card-expanded-placeholder')\r\n placeholder.setAttribute('style', `width: ${rect.width}px; height: ${rect.height}px;`)\r\n box.parentNode.insertBefore(placeholder, box.nextSibling)// insert after\r\n\r\n box.offsetHeight// reflow...to force browser apply css/dom changes\r\n box.removeAttribute('style')\r\n }\r\n\r\n box.classList.add('card-expand')\r\n if (!animate) $box.trigger(Event.EXPANDED)\r\n } else { // restore\r\n const ev = new $.Event(Event.RESTORE)\r\n this.$box.trigger(ev)\r\n if (ev.isDefaultPrevented()) return\r\n\r\n button.removeClass('active')\r\n\r\n animate = animate && box.nextElementSibling !== null && box.nextElementSibling.classList.contains('card-expanded-placeholder')\r\n if (animate) {\r\n var rect1 = box.nextElementSibling.getBoundingClientRect()\r\n\r\n box.classList.add('card-expanding')\r\n box.setAttribute('style', `left: ${rect1.left}px; top: ${rect1.top}px; width: ${rect1.width}px; height: ${rect1.height}px;`)\r\n\r\n $box.on('transitionend.restoring', function (e) {\r\n if (e.target !== this) return// because transitionend might fire for children elements (like animated icons of toolbar)\r\n $box.next().remove()\r\n $box.off('.restoring')\r\n .removeClass('card-expanding')\r\n .attr('style', '')\r\n .trigger(Event.RESTORED)\r\n })\r\n }\r\n\r\n box.classList.remove('card-expand')\r\n if (!animate) $box.trigger(Event.RESTORED)\r\n }\r\n }// function expand\r\n\r\n expandFast () {\r\n return this.expand(true, false)\r\n }\r\n\r\n restore () {\r\n return this.expand(false)\r\n }\r\n\r\n restoreFast () {\r\n return this.expand(false, false)\r\n }\r\n\r\n _getConfig (config) {\r\n config = {\r\n // ...Default,\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (typeof bootstrap !== 'undefined') {\r\n bootstrap.Util.typeCheckConfig(\r\n NAME,\r\n config,\r\n this.constructor.DefaultType\r\n )\r\n }\r\n\r\n return config\r\n }\r\n\r\n // Static methods\r\n static _jQueryInterface (config, value) {\r\n return this.each(function () {\r\n const $this = $(this)\r\n let data = $this.data(DATA_KEY)\r\n const _config = {\r\n // ...Default,\r\n ...$this.data(),\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (!data) {\r\n data = new Widget(this, _config)\r\n $this.data(DATA_KEY, data)\r\n }\r\n\r\n if (typeof config === 'string') {\r\n if (typeof data[config] === 'undefined') {\r\n throw new TypeError(`No method named \"${config}\"`)\r\n }\r\n data[config](value)\r\n }\r\n })\r\n }\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Data Api implementation\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\n$(document).on(Event.CLICK_DATA_API, `${Selector.DATA_ACTION}`, function (event) {\r\n if (event.currentTarget.tagName === 'A') {\r\n event.preventDefault()\r\n }\r\n\r\n const $actionBtn = $(this)\r\n const $box = $actionBtn.closest('.card')\r\n if ($box.length === 0) return\r\n\r\n const $action = $actionBtn.data('action')\r\n $box.trigger(event = $.Event($action + EVENT_KEY))\r\n if (event.isDefaultPrevented()) return\r\n\r\n $box.aceWidget($action, this)\r\n})\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * jQuery\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\nif (typeof $ !== 'undefined') {\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n $.fn[NAME] = Widget._jQueryInterface\r\n $.fn[NAME].Constructor = Widget\r\n $.fn[NAME].noConflict = () => {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Widget._jQueryInterface\r\n }\r\n}\r\n\r\nexport default Widget\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): fileinput.js\r\n * Custom styling for default browser file input\r\n*/\r\n\r\nimport $ from 'jquery'\r\nimport bootstrap from 'bootstrap'\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\nconst NAME = 'aceFileInput'\r\nconst VERSION = '2.1.0'\r\nconst DATA_KEY = 'ace.file'\r\nconst EVENT_KEY = `.${DATA_KEY}`\r\n\r\nconst Event = {\r\n // PREVIEW: `preview${EVENT_KEY}`,\r\n INVALID: `invalid${EVENT_KEY}`,\r\n RESET: `reset${EVENT_KEY}`,\r\n PREVIEW_FAILED: `preview_failed${EVENT_KEY}`\r\n}\r\n\r\nconst Default = {\r\n style: false,\r\n persistent: false,\r\n\r\n container: 'border-1 brc-grey-l2 brc-h-warning-m1',\r\n\r\n btnChooseClass: 'bgc-default text-white px-2 pt-2 text-90 my-1px mr-1px',\r\n btnChangeClass: 'bgc-blue text-white px-2 pt-2 text-90 my-1px mr-1px',\r\n\r\n btnChooseText: 'Choose',\r\n btnChangeText: 'Change',\r\n\r\n placeholderClass: 'text-grey-m2 px-1',\r\n placeholderText: 'No file chosen',\r\n placeholderIcon: '<i class=\"fa fa-upload bgc-grey-m1 text-white w-4 py-2 text-center\"></i>',\r\n\r\n iconClass: 'mx-2px',\r\n\r\n reset: '',\r\n resetText: '',\r\n resetIcon: '<i class=\"fa fa-times\"></i>',\r\n\r\n droppable: false,\r\n thumbnail: false, // large, fit, small\r\n previewImage: true,\r\n\r\n allowExt: null,\r\n denyExt: null,\r\n allowMime: null,\r\n denyMime: null,\r\n maxSize: null,\r\n\r\n previewSize: false,\r\n previewWidth: false,\r\n previewHeight: false,\r\n\r\n // callbacks\r\n beforeChange: null,\r\n\r\n fileIcons: {\r\n file: '<i class=\"fa fa-file bgc-grey-m1 text-white w-4 py-2 text-center\"></i>',\r\n image: '<i class=\"far fa-image bgc-purple-m1 text-white w-4 py-2 text-center\"></i>',\r\n video: '<i class=\"fas fa-video bgc-success-m1 text-white w-4 py-2 text-center\"></i>',\r\n audio: '<i class=\"fas fa-music bgc-pink-m1 text-white w-4 py-2 text-center\"></i>',\r\n document: '<i class=\"far fa-file-alt bgc-default-d1 text-white w-4 py-2 text-center\"></i>',\r\n archive: '<i class=\"far fa-file-archive bgc-warning text-white w-4 py-2 text-center\"></i>',\r\n code: '<i class=\"fas fa-code file-code bgc-secondary text-white w-4 py-2 text-center\"></i>'\r\n }\r\n}\r\n\r\nconst DefaultType = {\r\n persistent: 'boolean',\r\n\r\n style: '(boolean|string)',\r\n\r\n btn: '(string|undefined)',\r\n container: '(string|undefined)',\r\n icon: '(string|undefined)',\r\n\r\n placeholderText: '(string|undefined)',\r\n placeholderIcon: '(string|undefined)',\r\n btnChooseText: '(string|undefined)',\r\n btnChangeText: '(string|undefined)',\r\n\r\n reset: '(string|undefined)',\r\n resetText: '(string|undefined)',\r\n resetIcon: '(string|undefined)',\r\n\r\n droppable: 'boolean',\r\n thumbnail: '(boolean|string)',\r\n previewImage: 'boolean',\r\n\r\n allowExt: '(string|null)',\r\n denyExt: '(string|null)',\r\n allowMime: '(string|null)',\r\n denyMime: '(string|null)',\r\n maxSize: '(number|null)',\r\n\r\n previewSize: '(boolean|number)',\r\n previewWidth: '(boolean|number)',\r\n previewHeight: '(boolean|number)',\r\n\r\n fileIcons: '(object|null)',\r\n\r\n // callbacks\r\n beforeChange: '(function|null)'\r\n}\r\n\r\nconst PreviewError = {\r\n FILE_LOAD_FAILED: 1,\r\n IMAGE_LOAD_FAILED: 2,\r\n THUMBNAIL_FAILED: 3\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Class Definition\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nclass FileInput {\r\n constructor (element, config) {\r\n this.settings = this._getConfig(config)\r\n this.settings.fileIcons = $.extend({}, Default.fileIcons, this.settings.fileIcons)\r\n\r\n this.fileList = []\r\n this.selectMethod = ''\r\n\r\n this._hasMultiple = 'multiple' in document.createElement('INPUT')\r\n this._hasFileList = 'FileList' in window// file list enabled in modern browsers\r\n this._hasFileReader = 'FileReader' in window\r\n this._hasFile = 'File' in window\r\n\r\n this.element = element\r\n this.$element = $(element)\r\n this.disabled = false\r\n this.canReset = true\r\n\r\n this.$element\r\n .off('change.aceInnerCall')\r\n .on('change.aceInnerCall', (e, aceInnerCall) => {\r\n if (this.disabled) return\r\n\r\n if (aceInnerCall === true) return// this change Event is called from within this class (_enableFileDrop) and extra checkings are taken care of there\r\n return this._handleOnChange()\r\n })\r\n\r\n var parentLabel = this.$element.closest('label').addClass('d-block')\r\n var tagName = parentLabel.length === 0 ? 'label' : 'span'// if not inside a \"LABEL\" tag, use \"LABEL\" tag, otherwise use \"SPAN\"\r\n this.$element.wrap('<' + tagName + ' class=\"ace-file-input\" />')\r\n\r\n this.$wrap = this.$element.parent()\r\n\r\n this._applySettings()\r\n }\r\n\r\n // Getters\r\n static get VERSION () {\r\n return VERSION\r\n }\r\n\r\n static get DefaultType () {\r\n return DefaultType\r\n }\r\n\r\n _getConfig (config, Default) {\r\n config = {\r\n ...Default,\r\n ...config\r\n }\r\n bootstrap.Util.typeCheckConfig(NAME, config, DefaultType)\r\n return config\r\n }\r\n\r\n _applySettings () {\r\n this._isMulti = this.$element.attr('multiple') && this._hasMultiple\r\n this._isDropStyle = this.settings.style === 'drop'\r\n\r\n if (this._isDropStyle) {\r\n if (!this.settings.thumbnail) this.settings.thumbnail = 'small'\r\n this.$wrap.addClass('ace-file-multiple')\r\n } else {\r\n this.$wrap.removeClass('ace-file-multiple')\r\n }\r\n\r\n this.$wrap.find('*:not(input[type=file])').remove()// remove all except our input, good for when changing settings\r\n\r\n var placeholder = `<div class=\"ace-file-placeholder h-100\">\r\n<span class=\"ace-file-icon align-self-center ${this.settings.iconClass || ''}\">\r\n ${this.settings.placeholderIcon || ''}\r\n</span>\r\n<span class=\"ace-file-name ${this.settings.placeholderClass || ''}\">\r\n ${this.settings.placeholderText}\r\n</span>` + (!this._isDropStyle ? `<span class=\"ace-file-btn ml-auto ${this.settings.btnChooseClass || ''}\">${this.settings.btnChooseText}</span>` : '') + '</div>'\r\n\r\n this.$element.after(`<div class=\"ace-file-container d-flex flex-column ${this.settings.container || ''}\">${placeholder}</div>`)\r\n\r\n this.$container = this.$element.next()\r\n\r\n if (this.settings.reset !== false) {\r\n var remove = this.settings.reset.length > 0 ? this.settings.reset : (\r\n !this._isDropStyle ? 'position-rc text-danger mr-n25 w-3 radius-2 border-1 brc-h-danger-m4 text-center'\r\n : 'position-tr bgc-white text-danger mt-n25 mr-n25 w-4 h-4 text-center pt-2px radius-round border-2 brc-grey-m4 brc-h-danger-m3'\r\n\r\n )\r\n\r\n var btn = $(`<a title=\"${this.settings.resetText || ''}\" class=\"remove ${remove}\" href=\"#\">${this.settings.resetIcon}</a>`).appendTo(this.$wrap)\r\n\r\n if (this.settings.resetText) btn.tooltip({ container: 'body' })\r\n\r\n btn.on('click', (e) => {\r\n e.preventDefault()\r\n if (!this.canReset) return false\r\n\r\n var event\r\n this.$element.trigger(event = new $.Event(Event.RESET))\r\n if (event.isDefaultPrevented()) return false\r\n\r\n this.resetInput()\r\n this.stopLoading()\r\n\r\n return false\r\n })\r\n }\r\n\r\n if (this.settings.droppable && this._hasFileList) {\r\n this._enableFileDrop()\r\n }\r\n }\r\n\r\n showFileList ($files, innerCall) {\r\n const files = $files || this.fileList\r\n if (!files || !files.length) return\r\n\r\n /// ///////////////////////////////////////////////////////////////\r\n if (!this.settings.persistent) {\r\n this.resetInputUI()\r\n }\r\n\r\n this.$container.addClass('selected')\r\n this.$container.find('.ace-file-placeholder').addClass('d-none')\r\n\r\n for (let i = 0; i < files.length; i++) {\r\n let filename = ''; let format = false\r\n if (typeof files[i] === 'string') filename = files[i]\r\n else if (this._hasFile && files[i] instanceof window.File) filename = $.trim(files[i].name)\r\n else if (files[i] instanceof Object && Object.prototype.hasOwnProperty.call(files[i], 'name')) {\r\n // format & name specified by user (pre-displaying name, etc)\r\n filename = files[i].name\r\n if (Object.prototype.hasOwnProperty.call(files[i], 'type')) format = files[i].type\r\n if (Object.prototype.hasOwnProperty.call(files[i], 'path')) files[i].path = files[i].name\r\n } else continue\r\n\r\n let index = filename.lastIndexOf('\\\\') + 1\r\n if (index === 0) index = filename.lastIndexOf('/') + 1\r\n filename = filename.substr(index)\r\n\r\n if (!format) {\r\n if ((/\\.(jpe?g|png|gif|svg|bmp|tiff?|webp)$/i).test(filename)) {\r\n format = 'image'\r\n } else if ((/\\.(mpe?g|flv|mov|avi|swf|mp4|mkv|webm|wmv|3gp)$/i).test(filename)) {\r\n format = 'video'\r\n } else if ((/\\.(mp3|ogg|wav|wma|amr|aac)$/i).test(filename)) {\r\n format = 'audio'\r\n } else if ((/\\.(pdf|docx?|rtf|txt)$/i).test(filename)) {\r\n format = 'document'\r\n } else if ((/\\.(zip|rar|tar)$/i).test(filename)) {\r\n format = 'archive'\r\n } else if ((/\\.(html?|js|s?css|less|php|py|aspx?|rb|c|cpp|java|cs)$/i).test(filename)) {\r\n format = 'code'\r\n } else format = 'file'\r\n }\r\n\r\n var fileIcon = this.settings.fileIcons[format]\r\n\r\n var className = 'ace-file-item d-flex h-100'\r\n if (this.settings.thumbnail) className += ` ${this.settings.thumbnail !== 'small' ? 'flex-column my-2px py-2' : 'mx-1 py-1'} align-items-center`\r\n\r\n var label = $(`<div class=\"${className}\">\r\n<span class=\"ace-file-icon align-self-center ${this.settings.iconClass || ''}\">${fileIcon}</span>\r\n<span class=\"ace-file-name ${this.settings.thumbnail && this.settings.thumbnail !== 'small' ? 'px-2' : 'px-1'}\">${filename}</span>` +\r\n (!this._isDropStyle ? `<span class=\"ace-file-btn ml-auto ${this.settings.btnChangeClass || ''}\">${this.settings.btnChangeText}</span>` : '') +\r\n '</div>').appendTo(this.$container)\r\n\r\n var type = (innerCall === true && this._hasFile && files[i] instanceof window.File) ? $.trim(files[i].type) : ''\r\n var canPreview = this.settings.previewImage !== false && this._hasFileReader && this.settings.thumbnail\t\t\t\t\t&&\r\n\t\t\t\t\t((type.length > 0 && type.match('image')) || (type.length === 0 && format === 'image'))// the second one is for older Android's default browser which gives an empty text for file.type\r\n if (canPreview) {\r\n $.when(this._previewImage(files[i], label))\r\n // .done( () => {\r\n // if( this.settings.thumbnail === 'small' ) label.find('.ace-file-icon').addClass('thumbnail-img');\r\n // })\r\n .fail((result) => {\r\n this.$element.trigger(Event.PREVIEW_FAILED, { filename: filename, code: result.code })\r\n })\r\n }\r\n }\r\n\r\n return true\r\n }\r\n\r\n resetInput () {\r\n this.resetInputUI()\r\n this.resetInputField()\r\n this.resetInputData()\r\n\r\n this.$container.removeClass('selected')\r\n }\r\n\r\n resetInputUI () {\r\n this.$container.find('div:not(.ace-file-placeholder)').remove()\r\n this.$container.find('.ace-file-placeholder').removeClass('d-none')\r\n\r\n // this.resetInputData();\r\n }\r\n\r\n resetInputField () {\r\n // http://stackoverflow.com/questions/1043957/clearing-input-type-file-using-jquery/13351234#13351234\r\n this.$element.wrap('<form>').parent().each((index, formEl) => {\r\n formEl.reset()\r\n })\r\n this.$element.unwrap()\r\n\r\n // when reset is called on this temporary inner form\r\n // only **IE10** triggers 'reset' on the outer form as well\r\n // and as we have mentioned to reset input on outer form reset\r\n // it causes infinite recusrsion by coming back to resetInputField\r\n // thus calling reset again and again and again\r\n // so because when \"reset\" button of outer form is hit, file input is automatically reset\r\n // we just resetInputUI to avoid recursion\r\n }\r\n\r\n resetInputData () {\r\n this.fileList = []\r\n this.selectMethod = ''\r\n\r\n if (this.$element.data('ace_input_files')) {\r\n this.$element.removeData('ace_input_files')\r\n this.$element.removeData('ace_input_method')\r\n }\r\n }\r\n\r\n enableReset () {\r\n this.canReset = true\r\n }\r\n\r\n disableReset () {\r\n this.canReset = false\r\n }\r\n\r\n disable () {\r\n this.disabled = true\r\n this.$element.attr('disabled', 'disabled').addClass('disabled')\r\n }\r\n\r\n enable () {\r\n this.disabled = false\r\n this.$element.removeAttr('disabled').removeClass('disabled')\r\n }\r\n\r\n files () {\r\n return this.fileList.length > 0 ? this.fileList : null\r\n }\r\n\r\n method () {\r\n return this.selectMethod\r\n }\r\n\r\n updateSettings (newSettings) {\r\n this.settings = $.extend({}, this.settings, newSettings)\r\n this._applySettings()\r\n }\r\n\r\n startLoading (loadingHtml = '<i class=\"overlay-content fa fa-spin fa-spinner text-white fa-2x\"></i>') {\r\n var loader = this.$wrap.find('.ace-file-overlay')\r\n if (loader.length === 0) {\r\n loader = $('<div class=\"ace-file-overlay text-center\"></div>').appendTo(this.$wrap)\r\n loader.on('click', (e) => {\r\n e.stopImmediatePropagation()\r\n e.preventDefault()\r\n return false\r\n })\r\n\r\n this.element.setAttribute('readonly', 'true')// for IE\r\n }\r\n loader.empty().append(loadingHtml)\r\n }\r\n\r\n stopLoading () {\r\n this.$wrap.find('.ace-file-overlay').remove()\r\n this.element.removeAttribute('readonly')\r\n }\r\n\r\n _enableFileDrop () {\r\n var dropbox = this.$element.parent()\r\n\r\n dropbox\r\n .off('dragenter')\r\n .on('dragenter', (e) => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n })\r\n .off('dragover')\r\n .on('dragover', (e) => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n })\r\n .off('drop')\r\n .on('drop', (e) => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n\r\n if (this.disabled) return\r\n\r\n var dt = e.originalEvent.dataTransfer\r\n var tmpFileList = dt.files\r\n if (!this._isMulti && tmpFileList.length > 1) { // single file upload, but dragged multiple files\r\n var tmpfiles = []\r\n tmpfiles.push(tmpFileList[0])\r\n tmpFileList = tmpfiles// keep only first file\r\n }\r\n\r\n tmpFileList = this._processFiles(tmpFileList, true)// true means files have been dropped\r\n if (tmpFileList === false) return false\r\n\r\n this.$element.data('ace_input_method', 'drop')\r\n this.selectMethod = 'drop'\r\n\r\n // const fileArray = [...tmpFileList]\r\n var fileArray = []\r\n for (var f = 0; f < tmpFileList.length; f++) fileArray.push(tmpFileList[f])\r\n\r\n if (this.settings.persistent) {\r\n this.fileList = this.fileList.concat(fileArray)\r\n } else {\r\n this.fileList = fileArray\r\n }\r\n this.$element.data('ace_input_files', this.fileList)\r\n this.$element.data('ace_input_method', this.selectMethod)\r\n\r\n this.showFileList(fileArray, true)\r\n\r\n this.$element.triggerHandler('change', [true])// true means aceInnerCall\r\n return true\r\n })\r\n }\r\n\r\n /// ///////////\r\n\r\n _handleOnChange () {\r\n let tmpFileList = this.element.files || [this.element.value]// make it an array\r\n\r\n tmpFileList = this._processFiles(tmpFileList, false)// false means files have been selected, not dropped\r\n if (tmpFileList === false) return false\r\n\r\n // const fileArray = [...tmpFileList];\r\n var fileArray = []\r\n for (var f = 0; f < tmpFileList.length; f++) fileArray.push(tmpFileList[f])\r\n\r\n this.selectMethod = 'select'\r\n\r\n if (this.settings.persistent) {\r\n this.fileList = this.fileList.concat(fileArray)\r\n } else {\r\n this.fileList = fileArray\r\n }\r\n\r\n this.$element.data('ace_input_files', this.fileList)\r\n this.$element.data('ace_input_method', this.selectMethod)\r\n\r\n this.showFileList(fileArray, true)\r\n\r\n return true\r\n }\r\n\r\n _previewImage (file, label) {\r\n var $icon = label.find('.ace-file-icon')// it should be out of onload, otherwise all onloads may target the same $icon because of delays\r\n $icon.empty()\r\n\r\n var deferred = new $.Deferred()\r\n\r\n const getImage = function (src, $file) {\r\n $icon.prepend(\"<img style='display: none;' />\")\r\n var img = $icon.find('img:last').get(0)\r\n\r\n $(img).one('load', function () {\r\n imgLoaded(img, $file)\r\n }).one('error', function () {\r\n imgFailed(img)\r\n })\r\n\r\n img.src = src\r\n }\r\n const This = this\r\n const imgLoaded = function (img, $file) { // if image loaded successfully\r\n var size = This.settings.previewSize\r\n\r\n if (!size) {\r\n if (This.settings.previewWidth || This.settings.previewHeight) {\r\n size = { previewWidth: This.settings.previewWidth, previewHeight: This.settings.previewHeight }\r\n } else {\r\n size = 50\r\n if (This.settings.thumbnail === 'large') size = 150\r\n }\r\n }\r\n if (This.settings.thumbnail === 'fit') size = $icon.parent().width()\r\n else if (typeof size === 'number') size = parseInt(Math.min(size, $icon.parent().width()))\r\n\r\n var svg = /svg/.test($file.type)\r\n var thumb = !svg ? This._getThumbnail(img, size, $file.type) : false//, file.type;\r\n if (thumb === null) {\r\n // if making thumbnail fails\r\n $(This).remove()\r\n deferred.reject({ code: PreviewError.THUMBNAIL_FAILED })\r\n return\r\n }\r\n\r\n var showPreview = true\r\n /**\r\n // add width/height info to \"file\" and trigger preview finished event for each image!\r\n if ($file && $file instanceof window.File) {\r\n if (thumb) {\r\n $file.width = thumb.width\r\n $file.height = thumb.height\r\n }\r\n\r\n var event\r\n This.$element.trigger(event = new $.Event(Event.PREVIEW), { file: $file })\r\n if (event.isDefaultPrevented()) showPreview = false\r\n }\r\n */\r\n\r\n if (showPreview) {\r\n if (svg) {\r\n if (This.settings.thumbnail === 'small') {\r\n $(img).css({ width: size })\r\n } else {\r\n if (img.width > img.height) { $(img).css({ width: size }) } else $(img).css({ height: size })\r\n }\r\n } else {\r\n var w = thumb.previewWidth; var h = thumb.previewHeight\r\n\r\n if (This.settings.thumbnail === 'small') { w = h = parseInt(Math.max(w, h)) } else $icon.addClass('thumbnail-large')\r\n\r\n $(img).css({ background: 'url(' + thumb.src + ') center no-repeat', width: w, height: h })\r\n .data('src', thumb.src)\r\n .attr({ src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==' })\r\n }\r\n\r\n img.style.display = ''\r\n }\r\n\r\n /// ////////////////\r\n deferred.resolve()\r\n }\r\n var imgFailed = function () {\r\n // for example when a file has image extenstion, but format is something else\r\n $icon.find('img').remove()\r\n deferred.reject({ code: PreviewError.IMAGE_LOAD_FAILED })\r\n }\r\n\r\n if (this._hasFile && file instanceof window.File) {\r\n var reader = new window.FileReader()\r\n reader.onload = function (e) {\r\n getImage(e.target.result, file)\r\n }\r\n reader.onerror = function (e) {\r\n deferred.reject({ code: PreviewError.FILE_LOAD_FAILED })\r\n }\r\n reader.readAsDataURL(file)\r\n } else {\r\n if (file instanceof Object && Object.prototype.hasOwnProperty.call(file, 'path')) {\r\n getImage(file.path, null)// file is a file name (path) --- this is used to pre-show user-selected image\r\n }\r\n }\r\n\r\n return deferred.promise()\r\n }\r\n\r\n /// //////////\r\n\r\n _getThumbnail (img, size, type) {\r\n var imgWidth = img.width; var imgHeight = img.height\r\n\r\n //* *IE10** is not giving correct width using img.width so we use $(img).width()\r\n imgWidth = imgWidth > 0 ? imgWidth : $(img).width()\r\n imgHeight = imgHeight > 0 ? imgHeight : $(img).height()\r\n\r\n var previewSize = false; var previewHeight = false; var previewWidth = false\r\n if (typeof size === 'number') previewSize = size\r\n else if (size instanceof Object) {\r\n if (size.previewWidth && !size.previewHeight) previewWidth = size.previewWidth\r\n else if (size.previewHeight && !size.previewWidth) previewHeight = size.previewHeight\r\n else if (size.previewWidth && size.previewHeight) {\r\n previewWidth = size.previewWidth\r\n previewHeight = size.previewHeight\r\n }\r\n }\r\n\r\n if (previewSize) {\r\n if (imgWidth > imgHeight) {\r\n previewWidth = previewSize\r\n previewHeight = parseInt(imgHeight / imgWidth * previewWidth)\r\n } else {\r\n previewHeight = previewSize\r\n previewWidth = parseInt(imgWidth / imgHeight * previewHeight)\r\n }\r\n } else {\r\n if (!previewHeight && previewWidth) {\r\n previewHeight = parseInt(imgHeight / imgWidth * previewWidth)\r\n } else if (previewHeight && !previewWidth) {\r\n previewWidth = parseInt(imgWidth / imgHeight * previewHeight)\r\n }\r\n }\r\n\r\n var dataURL\r\n try {\r\n var canvas = document.createElement('canvas')\r\n canvas.width = previewWidth; canvas.height = previewHeight\r\n var context = canvas.getContext('2d')\r\n context.imageSmoothingQuality = 'medium'\r\n context.drawImage(img, 0, 0, imgWidth, imgHeight, 0, 0, previewWidth, previewHeight)\r\n dataURL = canvas.toDataURL(type, 0.8)\r\n // dataURL = canvas.toDataURL();\r\n } catch (e) {\r\n dataURL = null\r\n }\r\n if (!dataURL) return null\r\n\r\n // there was only one image that failed in firefox completely randomly! so let's double check things\r\n if (!(/^data:image\\/(png|jpe?g|gif|svg);base64,[0-9A-Za-z+/=]+$/.test(dataURL))) dataURL = null\r\n if (!dataURL) return null\r\n\r\n return { src: dataURL, previewWidth: previewWidth, previewHeight: previewHeight, width: imgWidth, height: imgHeight }\r\n }\r\n\r\n _processFiles (tmpFileList, dropped) {\r\n var ret = this._checkFileList(tmpFileList, dropped)\r\n if (ret === -1) {\r\n this.resetInput()\r\n return false\r\n }\r\n if (!ret || ret.length === 0) {\r\n if (!this.$element.data('ace_input_files')) this.resetInput()\r\n // if nothing selected before, reset because of the newly unacceptable (ret=false||length=0) selection\r\n // otherwise leave the previous selection intact?!!!\r\n return false\r\n }\r\n if (ret instanceof Array || (this._hasFileList && ret instanceof window.FileList)) tmpFileList = ret\r\n\r\n ret = true\r\n\r\n if (this.settings.beforeChange) ret = this.settings.beforeChange.call(this.element, tmpFileList, dropped)\r\n if (ret === -1) {\r\n this.resetInput()\r\n return false\r\n }\r\n if (!ret || ret.length === 0) {\r\n if (!this.$element.data('ace_input_files')) this.resetInput()\r\n return false\r\n }\r\n\r\n // inside beforeChange you can return a modified File Array as result\r\n if (ret instanceof Array || (this._hasFileList && ret instanceof window.FileList)) tmpFileList = ret\r\n\r\n return tmpFileList\r\n }\r\n\r\n /// ///////\r\n\r\n _checkFileList (files, dropped) {\r\n var allowExt = this._getExtRegex(this.settings.allowExt)\r\n\r\n var denyExt = this._getExtRegex(this.settings.denyExt)\r\n\r\n var allowMime = this._getMimeRegex(this.settings.allowMime)\r\n\r\n var denyMime = this._getMimeRegex(this.settings.denyMime)\r\n\r\n var maxSize = this.settings.maxSize || false\r\n\r\n if (!(allowExt || denyExt || allowMime || denyMime || maxSize)) return true// no checking required\r\n\r\n var safeFiles = []\r\n var errorList = {}\r\n // for (const file of files) {\r\n for (var i = 0; i < files.length; i++) {\r\n var file = files[i]\r\n // file is either a string(file name) or a File object\r\n var filename = !this._hasFile ? file : file.name\r\n if (allowExt && !allowExt.test(filename)) {\r\n // extension not matching whitelist, so drop it\r\n if (!('ext' in errorList)) errorList.ext = []\r\n errorList.ext.push(filename)\r\n\r\n continue\r\n } else if (denyExt && denyExt.test(filename)) {\r\n // extension is matching blacklist, so drop it\r\n if (!('ext' in errorList)) errorList.ext = []\r\n errorList.ext.push(filename)\r\n\r\n continue\r\n }\r\n\r\n var type\r\n if (!this._hasFile) {\r\n // in browsers that don't support FileReader API\r\n safeFiles.push(file)\r\n continue\r\n } else if ((type = $.trim(file.type)).length > 0) {\r\n // there is a mimetype for file so let's check against are rules\r\n if (allowMime && !allowMime.test(type)) {\r\n // mimeType is not matching whitelist, so drop it\r\n if (!('mime' in errorList)) errorList.mime = []\r\n errorList.mime.push(filename)\r\n continue\r\n } else if (denyMime && denyMime.test(type)) {\r\n // mimeType is matching blacklist, so drop it\r\n if (!('mime' in errorList)) errorList.mime = []\r\n errorList.mime.push(filename)\r\n continue\r\n }\r\n }\r\n\r\n if (maxSize && file.size > maxSize) {\r\n // file size is not acceptable\r\n if (!('size' in errorList)) errorList.size = []\r\n errorList.size.push(filename)\r\n continue\r\n }\r\n\r\n safeFiles.push(file)\r\n }\r\n\r\n if (safeFiles.length === files.length) return files// return original file list if all are valid\r\n\r\n /// //////\r\n var errorCount = { ext: 0, mime: 0, size: 0 }\r\n if ('ext' in errorList) errorCount.ext = errorList.ext.length\r\n if ('mime' in errorList) errorCount.mime = errorList.mime.length\r\n if ('size' in errorList) errorCount.size = errorList.size.length\r\n\r\n var event\r\n this.$element.trigger(\r\n event = new $.Event(Event.INVALID),\r\n {\r\n fileCount: files.length,\r\n invalidCount: files.length - safeFiles.length,\r\n errorList: errorList,\r\n errorCount: errorCount,\r\n dropped: dropped\r\n }\r\n )\r\n if (event.isDefaultPrevented()) return -1// it will reset input\r\n /// ///////\r\n\r\n return safeFiles// return safeFiles\r\n }\r\n\r\n _getExtRegex (ext) {\r\n if (!ext) return null\r\n if (Array.isArray(ext)) ext = ext.join('|')\r\n if (ext.length === 0) return null\r\n return new RegExp('\\\\.(?:' + ext + ')$', 'i')\r\n }\r\n\r\n _getMimeRegex (mime) {\r\n if (!mime) return null\r\n if (Array.isArray(mime)) mime = mime.join('|')\r\n if (mime.length === 0) return null\r\n return new RegExp('^(?:' + mime.replace(/\\//g, '\\\\/') + ')$', 'i')\r\n }\r\n\r\n static _jQueryInterface (config, value) {\r\n return this.each(function () {\r\n const $this = $(this)\r\n let data = $this.data(DATA_KEY)\r\n const _config = {\r\n ...Default,\r\n ...$this.data(),\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n // if (!data && _config.toggle && /show|hide/.test(config)) {\r\n // _config.toggle = false\r\n // }\r\n\r\n if (!data) {\r\n data = new FileInput(this, _config)\r\n $this.data(DATA_KEY, data)\r\n }\r\n\r\n if (typeof config === 'string') {\r\n if (typeof data[config] === 'undefined') {\r\n throw new TypeError(`No method named \"${config}\"`)\r\n }\r\n data[config](value)\r\n }\r\n })\r\n }\r\n}\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * jQuery\r\n * ------------------------------------------------------------------------\r\n*/\r\n\r\nif (typeof $ !== 'undefined') {\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n $.fn[NAME] = FileInput._jQueryInterface\r\n $.fn[NAME].Constructor = FileInput\r\n $.fn[NAME].noConflict = () => {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return FileInput._jQueryInterface\r\n }\r\n}\r\n\r\nexport default FileInput\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): wysiwyg.js\r\n Wrapper for Bootstrap wyswiwyg plugin\r\n*/\r\n\r\nimport $ from 'jquery'\r\nimport bootstrap from 'bootstrap'\r\n\r\n/**\r\n * ------------------------------------------------------------------------\r\n * Constants\r\n * ------------------------------------------------------------------------\r\n */\r\n\r\nconst NAME = 'aceWysiwyg'\r\nconst VERSION = '2.1.0'\r\nconst DATA_KEY = 'ace.wysiwyg'\r\n\r\nconst DefaultType = {\r\n wysiwyg: 'object',\r\n colors: 'array',\r\n // speech: 'boolean',\r\n toolbar: 'array',\r\n toolbarPlacement: '(function|null)',\r\n toolbarStyle: '(string|number)'\r\n}\r\n\r\nconst Default = {\r\n wysiwyg: {},\r\n // speech: true,\r\n toolbarPlacement: null,\r\n toolbarStyle: '',\r\n\r\n colors: ['#ac725e', '#d06b64', '#f83a22', '#fa573c', '#ff7537', '#ffad46',\r\n '#42d692', '#16a765', '#7bd148', '#b3dc6c', '#fbe983', '#fad165',\r\n '#92e1c0', '#9fe1e7', '#9fc6e7', '#4986e7', '#9a9cff', '#b99aff',\r\n '#c2c2c2', '#cabdbf', '#cca6ac', '#f691b2', '#cd74e6', '#a47ae2',\r\n '#444444'],\r\n toolbar: ['font', null, 'fontSize', null, 'bold', 'italic', 'strikethrough', 'underline', null, 'insertunorderedlist', 'insertorderedlist',\r\n 'outdent', 'indent', null, 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', null, 'createLink', 'unlink', null,\r\n 'insertImage', null, 'foreColor', null, 'undo', 'redo', null, 'viewSource']\r\n}\r\n\r\nclass Wysiwyg {\r\n constructor (element, config) {\r\n this._element\t= element\r\n this._config = this._getConfig(config)\r\n\r\n this.initEditor()\r\n }\r\n\r\n static get VERSION () {\r\n return VERSION\r\n }\r\n\r\n static get DefaultType () {\r\n return DefaultType\r\n }\r\n\r\n static get Default () {\r\n return Default\r\n }\r\n\r\n initEditor () {\r\n var toolbarHtml = this._createToolbarHtml()\r\n var toolbar\r\n // if we have a function to decide where to put the toolbar, then call that\r\n if (this._config.toolbarPlacement) toolbar = this._config.toolbarPlacement.call(this._element, toolbarHtml)\r\n else toolbar = $(this._element).before(toolbarHtml).prev()// otherwise put it just before our DIV\r\n\r\n if (this._config.toolbarStyle) toolbar.addClass('bsw-toolbar-style-' + this._config.toolbarStyle)\r\n\r\n // enable tooltips\r\n if ($.fn.tooltip) toolbar.find('a[title]').tooltip({ animation: false, container: 'body' })\r\n\r\n toolbar.find('.dropdown-menu input[type=text]').on('click', function () { return false })\r\n .on('change', function () { $(this).closest('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle') })\r\n .on('keydown', function (e) {\r\n if (e.which === 27) {\r\n this.value = ''\r\n $(this).change()\r\n } else if (e.which === 13) {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n $(this).change()\r\n }\r\n })\r\n\r\n toolbar.find('input[type=file]').prev().on('click', function (e) {\r\n $(this).next().click()\r\n })\r\n\r\n var self = $(this._element)\r\n // view source\r\n var viewSource = false\r\n toolbar.find('a[data-toggle=source]').on('click', function (e) {\r\n e.preventDefault()\r\n\r\n if (!viewSource) {\r\n $('<textarea />')\r\n .css({ width: self.outerWidth(), height: self.outerHeight() })\r\n .val(self.html())\r\n .insertAfter(self)\r\n self.addClass('d-none')\r\n\r\n $(this).addClass('active')\r\n } else {\r\n var textarea = self.next()\r\n self.html(textarea.val()).removeClass('d-none')\r\n textarea.remove()\r\n\r\n $(this).removeClass('active')\r\n }\r\n\r\n viewSource = !viewSource\r\n })\r\n\r\n // initiate wysiwyg plugin\r\n var $options = $.extend({}, { activeToolbarClass: 'active', toolbarSelector: toolbar }, this._config.wysiwyg || {})\r\n $(this._element).wysiwyg($options)\r\n\r\n this._handleImages()\r\n }\r\n\r\n _createToolbarHtml () {\r\n var _buttonDefaults =\t{\r\n font: {\r\n values: ['Arial', 'Courier', 'Comic Sans MS', 'Helvetica', 'Open Sans', 'Tahoma', 'Verdana'],\r\n icon: 'fa fa-font text-secondary-m1',\r\n title: 'Font'\r\n },\r\n fontSize: {\r\n values: { 5: 'Huge', 3: 'Normal', 1: 'Small' },\r\n icon: 'fa fa-text-height text-secondary-m1',\r\n title: 'Font Size'\r\n },\r\n bold: {\r\n icon: 'fa fa-bold text-secondary-m1',\r\n title: 'Bold (Ctrl/Cmd+B)'\r\n },\r\n italic: {\r\n icon: 'fa fa-italic text-secondary-m1',\r\n title: 'Italic (Ctrl/Cmd+I)'\r\n },\r\n strikethrough: {\r\n icon: 'fa fa-strikethrough text-secondary-m1',\r\n title: 'Strikethrough'\r\n },\r\n underline: {\r\n icon: 'fa fa-underline text-secondary-m1',\r\n title: 'Underline'\r\n },\r\n insertunorderedlist: {\r\n icon: 'fa fa-list-ul text-secondary-m1',\r\n title: 'Bullet list'\r\n },\r\n insertorderedlist: {\r\n icon: 'fa fa-list-ol text-secondary-m1',\r\n title: 'Number list'\r\n },\r\n outdent: {\r\n icon: 'fa fa-outdent text-secondary-m1',\r\n title: 'Reduce indent (Shift+Tab)'\r\n },\r\n indent: {\r\n icon: 'fa fa-indent text-secondary-m1',\r\n title: 'Indent (Tab)'\r\n },\r\n justifyleft: {\r\n icon: 'fa fa-align-left text-secondary-m1',\r\n title: 'Align Left (Ctrl/Cmd+L)'\r\n },\r\n justifycenter: {\r\n icon: 'fa fa-align-center text-secondary-m1',\r\n title: 'Center (Ctrl/Cmd+E)'\r\n },\r\n justifyright: {\r\n icon: 'fa fa-align-right text-secondary-m1',\r\n title: 'Align Right (Ctrl/Cmd+R)'\r\n },\r\n justifyfull: {\r\n icon: 'fa fa-align-justify text-secondary-m1',\r\n title: 'Justify (Ctrl/Cmd+J)'\r\n },\r\n createLink: {\r\n icon: 'fa fa-link text-secondary-m1',\r\n title: 'Hyperlink',\r\n button_text: 'Add',\r\n placeholder: 'URL',\r\n button_class: 'btn-primary'\r\n },\r\n unlink: {\r\n icon: 'fa fa-unlink text-secondary-m1',\r\n title: 'Remove Hyperlink'\r\n },\r\n insertImage: {\r\n icon: 'fa fa-image text-secondary-m1',\r\n title: 'Insert picture',\r\n button_text: '<i class=\"fa fa-file mr-1\"></i> Choose an Image …',\r\n placeholder: 'Remote Image URL',\r\n button_insert: 'Insert',\r\n button_class: 'btn-success',\r\n button_insert_class: 'btn-primary',\r\n choose_file: true // show the choose file button?\r\n },\r\n foreColor: {\r\n icon: 'fas fa-eye-dropper text-pink-m2',\r\n values: this._config.colors,\r\n title: 'Foreground Color'\r\n },\r\n backColor: {\r\n icon: 'fas fa-fill-drip text-secondary-m1',\r\n values: this._config.colors,\r\n title: 'Background Color'\r\n },\r\n undo: {\r\n icon: 'fa fa-undo text-secondary-m1',\r\n title: 'Undo (Ctrl/Cmd+Z)'\r\n },\r\n redo: {\r\n icon: 'fa fa-redo text-secondary-m1',\r\n title: 'Redo (Ctrl/Cmd+Y)'\r\n },\r\n viewSource: {\r\n icon: 'fa fa-code text-secondary-m1',\r\n title: 'View Source'\r\n }\r\n }\r\n\r\n const toolbarButtons = this._config.toolbar\r\n let toolbarHtml = ' <div class=\"bootstrap-wysiwyg-toolbar btn-toolbar text-center\"> <div class=\"btn-group\"> '\r\n\r\n for (var tb in toolbarButtons) {\r\n if (Object.prototype.hasOwnProperty.call(toolbarButtons, tb)) {\r\n var button = toolbarButtons[tb]\r\n if (button === null) {\r\n toolbarHtml += ' </div> <div class=\"btn-group\"> '\r\n continue\r\n }\r\n\r\n if (typeof button === 'string' && button in _buttonDefaults) {\r\n button = _buttonDefaults[button]\r\n button.name = toolbarButtons[tb]\r\n } else if (typeof button === 'object' && button.name in _buttonDefaults) {\r\n button = $.extend(_buttonDefaults[button.name], button)\r\n } else continue\r\n\r\n var className = 'className' in button ? button.className : 'my-2px btn-sm btn-outline-secondary btn-h-outline-primary btn-a-light-primary'\r\n switch (button.name) {\r\n case 'font':\r\n toolbarHtml += ` <a class=\"btn btn-sm ${className} dropdown-toggle\" data-toggle=\"dropdown\" title=\"${button.title}\"><i class=\"${button.icon}\">${button.iconText || ''}</i><i class=\"fa fa-angle-down ml-1 text-secondary-m2\"></i></a> `\r\n toolbarHtml += ' <div class=\"dropdown-menu\">'\r\n for (var font in button.values) {\r\n if (Object.prototype.hasOwnProperty.call(button.values, font)) {\r\n toolbarHtml += ` <div class=\"dropdown-item\"><a data-edit=\"fontName ${button.values[font]}\" style=\"font-family:'${button.values[font]}'\">${button.values[font]}</a></div> `\r\n }\r\n }\r\n toolbarHtml += ' </div>'\r\n break\r\n\r\n case 'fontSize':\r\n toolbarHtml += ` <a class=\"btn btn-sm ${className} dropdown-toggle\" data-toggle=\"dropdown\" title=\"${button.title}\"><i class=\"${button.icon}\">${button.iconText || ''}</i> <i class=\"fa fa-angle-down ml-1 text-secondary-m2\"></i></a> `\r\n toolbarHtml += ' <div class=\"dropdown-menu\"> '\r\n for (var size in button.values) {\r\n if (Object.prototype.hasOwnProperty.call(button.values, size)) {\r\n toolbarHtml += ` <div class=\"dropdown-item\"><a data-edit=\"fontSize ${size}\"><font size=\"${size}\">${button.values[size]}</font></a></div> `\r\n }\r\n }\r\n toolbarHtml += ' </div> '\r\n break\r\n\r\n case 'createLink':\r\n toolbarHtml += ` <div class=\"btn-group\"> <a class=\"btn btn-sm ${className} dropdown-toggle\" data-toggle=\"dropdown\" title=\"${button.title}\"><i class=\"${button.icon}\">${button.iconText || ''}</i></a> `\r\n toolbarHtml += ` <div class=\"dropdown-menu py-1 px-3 brc-primary-tp2 border-2\" style=\"min-width: 300px;\">\r\n\t\t\t\t\t\t <div class=\"input-group my-3\">\r\n\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"${button.placeholder}\" type=\"text\" data-edit=\"${button.name}\" />\r\n\t\t\t\t\t\t\t<div class=\"input-group-append\">\r\n\t\t\t\t\t\t\t\t<button class=\"btn btn-sm ${button.button_class}\" type=\"button\">${button.button_text}</button>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t </div>\r\n\t\t\t\t\t</div> </div>`\r\n break\r\n\r\n case 'insertImage':\r\n toolbarHtml += ` <div class=\"btn-group\"> <a class=\"btn btn-sm ${className} dropdown-toggle\" data-toggle=\"dropdown\" title=\"${button.title}\"><i class=\"${button.icon}\">${button.iconText || ''}</i></a> `\r\n toolbarHtml += ' <div class=\"dropdown-menu p-3 brc-primary-tp2 border-2\" style=\"min-width: 300px;\">'\r\n if (button.choose_file && 'FileReader' in window) {\r\n toolbarHtml +=\r\n `<div class=\"text-muted\">Drag & drop images into editor or</div>\r\n\t\t\t\t\t\t <label class=\"text-center d-block mt-2 mb-0\">\r\n\t\t\t\t\t\t\t<button class=\"btn btn-sm ${button.button_class} wysiwyg-choose-file\" type=\"button\">${button.button_text}</button>\r\n\t\t\t\t\t\t\t<input type=\"file\" class=\"file-input-invisible\" data-edit=\"${button.name}\" />\r\n\t\t\t\t\t\t </label><hr /> `\r\n }\r\n\r\n toolbarHtml += `<div class=\"input-group my-3\">\r\n\t\t\t\t\t\t\t<input class=\"form-control\" placeholder=\"${button.placeholder}\" type=\"text\" data-edit=\"${button.name}\" />\r\n\t\t\t\t\t\t\t<div class=\"input-group-append\">\r\n\t\t\t\t\t\t\t\t<button class=\"btn btn-sm ${button.button_insert_class}\" type=\"button\">${button.button_insert}</button>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t </div>`\r\n toolbarHtml += ' </div> </div>'\r\n\r\n break\r\n\r\n case 'foreColor':\r\n case 'backColor':\r\n toolbarHtml += `<div class=\"mr-1px\"><a class=\"btn btn-sm ${className} dropdown-toggle\" data-toggle=\"dropdown\" title=\"${button.title}\"><i class=\"${button.icon}\">${button.iconText || ''}</i></a> `\r\n toolbarHtml += ' <div class=\"dropdown-menu p-1 brc-primary-tp2 border-1\" style=\"min-width:auto; width:128px;\">'\r\n for (var color in button.values) {\r\n if (Object.prototype.hasOwnProperty.call(button.values, color)) {\r\n toolbarHtml += ` <div class=\"dropdown-item p-0 d-inline-block w-auto\"><a class=\"p-0\" data-edit=\"${button.name} ${button.values[color]}\" style=\"cursor:pointer;width:1.25rem;height:1.25rem;background-color:${button.values[color]};\"></a></div> `\r\n }\r\n }\r\n toolbarHtml += ' </div></div>'\r\n break\r\n\r\n case 'viewSource':\r\n toolbarHtml += ` <a class=\"btn btn-sm ${className}\" data-toggle=\"source\" title=\"${button.title}\"><i class=\"${button.icon}\">${button.iconText || ''}</i></a> `\r\n break\r\n default:\r\n toolbarHtml += ` <a class=\"btn btn-sm ${className}\" data-edit=\"${button.name}\" title=\"${button.title}\"><i class=\"${button.icon}\">${button.iconText || ''}</i></a> `\r\n break\r\n }\r\n }\r\n }\r\n toolbarHtml += ' </div> '// for .btn-group\r\n\r\n // var speech_input;\r\n // if (this._config.speech && 'onwebkitspeechchange' in (speech_input = document.createElement('input'))) {\r\n // toolbarHtml += ' <input class=\"wysiwyg-speech-input\" type=\"text\" data-edit=\"inserttext\" x-webkit-speech />';\r\n // }\r\n // speech_input = null;\r\n /// /////////\r\n toolbarHtml += ' </div> '// for .btn-toolbar\r\n\r\n return toolbarHtml\r\n }\r\n\r\n _handleImages () {\r\n // option for resizing an image\r\n var currentImg = null\r\n $(this._element).on('click', 'img', function (ev) {\r\n if (currentImg) $(currentImg).popover('dispose')\r\n\r\n currentImg = this\r\n if (!$(currentImg).data('original-width')) $(currentImg).data('original-width', currentImg.width)\r\n\r\n $(currentImg).popover({\r\n container: 'body',\r\n html: true,\r\n placement: function (popover) {\r\n var offset = currentImg.getBoundingClientRect()\r\n var scrollTop = document.scrollTop || document.documentElement.scrollTop || document.body.scrollTop\r\n $(popover).addClass('popover-wysiwyg-image shadow brc-secondary-m4').css({ 'margin-left': (offset.left + 4) + 'px', 'margin-top': (offset.top + scrollTop + 4) + 'px' })\r\n\r\n return 'auto'\r\n },\r\n title: 'Image Size & Position',\r\n trigger: 'manual',\r\n content: function () {\r\n return $(`<div class='btn-group'>\r\n\t\t\t\t\t\t\t\t<button type='button' class='btn btn-xs btn-outline-default' data-action='resize' data-value='0.25'>25%</button>\r\n\t\t\t\t\t\t\t\t<button type='button' class='btn btn-xs btn-outline-default' data-action='resize' data-value='0.50'>50%</button>\r\n\t\t\t\t\t\t\t\t<button type='button' class='btn btn-xs btn-outline-default' data-action='resize' data-value='1'>100%</button>\r\n\t\t\t\t\t\t\t </div>\r\n\t\t\t\t\t\t\t <input type='number' class='form-control d-inline-block form-control-sm' data-action='resize' style='max-width: 96px;' placeholder='specify width' value='${currentImg.width}' />\r\n\t\t\t\t\t\t\t <hr class='my-2' />\r\n\t\t\t\t\t\t\t <div class='btn-group'>\r\n\t\t\t\t\t\t\t\t<button type='button' class='btn btn-xs btn-outline-secondary' data-action='align' data-value='left'>left</button>\r\n\t\t\t\t\t\t\t\t<button type='button' class='btn btn-xs btn-outline-secondary' data-action='align' data-value='right'>right</button>\r\n\t\t\t\t\t\t\t\t<button type='button' class='btn btn-xs btn-outline-secondary' data-action='align' data-value='none'>none</button>\r\n\t\t\t\t\t\t\t </div>\r\n\t\t\t\t\t\t\t <div class='btn-group float-right'>\r\n\t\t\t\t\t\t\t\t<button type='button' tooltip='Remove image' class='btn btn-sm btn-outline-warning btn-h-outline-danger btn-a-light-danger btn-bold radius-round' data-action='remove'><i class='fa fa-trash text-red'></i></button>\r\n\t\t\t\t\t\t\t </div>`)\r\n }\r\n }).popover('show')\r\n\r\n $(document).on('click.popover-wysiwyg-image', function (ev) {\r\n if (ev.target === currentImg) return\r\n\r\n if ($(ev.target).closest('.popover-wysiwyg-image').length > 0) {\r\n return\r\n }\r\n\r\n if (currentImg) $(currentImg).popover('hide')\r\n\r\n currentImg = null\r\n $(document).off('click.popover-wysiwyg-image')\r\n })\r\n })\r\n\r\n $(document).on('click', '.popover-wysiwyg-image button.btn', function () {\r\n if (!currentImg) return\r\n var action = $(this).data('action')\r\n var value = $(this).data('value')\r\n\r\n if (action === 'resize') {\r\n var width = parseInt($(currentImg).data('original-width') * value)\r\n $(currentImg).css({ width: width })\r\n $('.popover-wysiwyg-image input[type=number]').val(width)\r\n }\r\n if (action === 'align') $(currentImg).attr('class', 'float-' + value)\r\n else if (action === 'remove') {\r\n $(currentImg).popover('dispose').remove()// fadeOut(200, function() { $(this).remove() });\r\n currentImg = null\r\n }\r\n })\r\n\r\n $(document).on('change', '.popover-wysiwyg-image input[type=number]', function () {\r\n if (currentImg) $(currentImg).css({ width: $(this).val() + 'px' })\r\n })\r\n /// //////////////\r\n }\r\n\r\n _getConfig (config) {\r\n config = {\r\n ...Default,\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (typeof bootstrap !== 'undefined') {\r\n bootstrap.Util.typeCheckConfig(\r\n NAME,\r\n config,\r\n this.constructor.DefaultType\r\n )\r\n }\r\n\r\n return config\r\n }\r\n\r\n // Static methods\r\n static _jQueryInterface (config) {\r\n return this.each(function () {\r\n const $this = $(this)\r\n let data = $this.data(DATA_KEY)\r\n const _config = {\r\n ...Default,\r\n ...$this.data(),\r\n ...typeof config === 'object' && config ? config : {}\r\n }\r\n\r\n if (!data) {\r\n data = new Wysiwyg(this, _config)\r\n $this.data(DATA_KEY, data)\r\n }\r\n\r\n if (typeof config === 'string') {\r\n if (typeof data[config] === 'undefined') {\r\n throw new TypeError(`No method named \"${config}\"`)\r\n }\r\n data[config]()\r\n }\r\n })\r\n }\r\n}\r\n\r\nif (typeof $ !== 'undefined') {\r\n const JQUERY_NO_CONFLICT = $.fn[NAME]\r\n $.fn[NAME] = Wysiwyg._jQueryInterface\r\n $.fn[NAME].Constructor = Wysiwyg\r\n $.fn[NAME].noConflict = () => {\r\n $.fn[NAME] = JQUERY_NO_CONFLICT\r\n return Wysiwyg._jQueryInterface\r\n }\r\n}\r\n\r\nexport default Wysiwyg\r\n","/**\r\n * --------------------------------------------------------------------------\r\n * Ace (v2.1.0): index.umd.js\r\n * --------------------------------------------------------------------------\r\n */\r\n\r\nimport Util from './src/util'\r\nimport Basic from './src/general'\r\nimport Scrollbar from './src/scrollbar'\r\nimport Sidebar from './src/sidebar'\r\nimport Aside from './src/aside'\r\nimport Toaster from './src/toaster'\r\nimport Widget from './src/widget'\r\nimport FileInput from './src/fileinput'\r\nimport Wysiwyg from './src/wysiwyg'\r\n\r\nexport default {\r\n Util,\r\n Basic,\r\n Scrollbar,\r\n Sidebar,\r\n Aside,\r\n Toaster,\r\n Widget,\r\n FileInput,\r\n Wysiwyg\r\n}\r\n"],"names":["Util","window","matchMedia","matches","recalc","_scrollbarInfo","scrollDiv","document","createElement","style","overflow","position","width","height","scrollbar","body","appendChild","getBoundingClientRect","clientWidth","documentElement","setProperty","thinWidth","CSS","thin","supports","overlay","autohide","removeChild","_supportsTransitionStart","Basic","_handleAlerts","_handleDropdowns","_handleNavbar","_handleTabScroll","_handleScrollTop","_handleSticky","_handleOther","$","on","e","preventDefault","wrap","parent","collapse","one","remove","target","closest","removeClass","stopImmediatePropagation","hideBodyScrollbar","find","focus","classList","contains","scrollbarInfo","getScrollbarInfo","add","hasClass","addClass","css","_adjustDropdown","isRTL","prop","rect","left","parseInt","sw","scrollWidth","right","ev","originalEvent","propertyName","call","pos","getComputedStyle","_firefox","_scrollIntoView","smooth","li","parentNode","nav","navClientWidth","_scrollLeft","offsetLeft","isReducedMotion","scrollTo","top","behavior","scrollLeft","setTimeout","each","active","querySelector","allowedDir","attr","curPane","initialTransform","touches","changedTouches","swipeDir","x1","pageX","y1","pageY","t1","Date","now","curDir","paneWidth","siblingPane","_dismiss","off","transform","_reset","sibling","transitionDuration","_transitionEnd","removeEventListener","addEventListener","newX","newY","diffY","Math","abs","diffX","moveX","newDir","targetPane","getAttribute","nextElementSibling","previousElementSibling","moveXabs","x2","t2","diff","id1","id","id2","newActive","get","_scrollBtn","offsetParent","showScrollbtn","hideScrollBtn","scrollToTop","smoothScroll","scroll","_modernBrowser","_scrollBtnObserve","observer","IntersectionObserver","entry","isOut","intersectionRatio","boundingClientRect","y","threshold","delay","observe","stickyElements","querySelectorAll","length","isSticky","stickyNav","parentElement","evt","CustomEvent","detail","dispatchEvent","forEach","stickyEl","observedChild","tagName","insertBefore","firstChild","initialCheck","value","_HandleBasics","NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","Event","LOAD_DATA_API","Selector","ACE_SCROLL","DefaultType","type","lock","ignore","plugin","options","Default","Scrollbar","element","config","_element","$element","_config","_getConfig","enableScrollbars","update","_addNativeScrolls","_preferNativeScrolls","_addPluginScrolls","_height","isNaN","maxHeight","_lock","_smooth","wrapper","color","transition","_hasScrollbarPlugin","bootstrap","typeCheckConfig","constructor","$this","data","JSON","parse","TypeError","scrollbars","slice","i","$scrollbars","_jQueryInterface","JQUERY_NO_CONFLICT","fn","Constructor","noConflict","SHOW","HIDE","COLLAPSE","EXPAND","SHOWN","HIDDEN","COLLAPSED","EXPANDED","CLICK_DATA_API","SIDEBAR","DATA_TOGGLE","DATA_TOGGLE_MOBILE","swipe","dismiss","backdrop","gotoactive","subscroll","pullup","ClassName","DESKTOP_HIDE","MOBILE_SHOW","TOGGLING","INNER_HOVER","BACKDROP","HORIZONTAL","Sidebar","_hasTransitionEvent","_hasTransitionEvent2","_isTransitioning","_isBeingDismissed","_sidebar","_inner","_scroller","_pullupEnabled","_triggerArray","_triggerArrayMobile","_horizontal","_desktopCollapsedClass","_collapsed","_handleTriggerEvents","enableSubmenuToggle","enableSubmenuPullup","scrollToActive","_addTransitionEvent","This","toggle","toggleMobile","btn","expand","show","hide","trigger","isDefaultPrevented","_updateTriggerBtns","_toggleCompleted","_resetPullUp","_addTransitionEvent2","enableSwipeHide","_toggleMobileCompleted","offsetHeight","btns","expanded","len","setAttribute","shown","counter","activeElement","blur","aceScroll","touchMoveCallback","_scrollIntoViewOptions","navItem","subMenu","eq","subPos","not","toggleClass","scrollIntoView","block","err","scrollHeight","clientHeight","overscrollBehavior","submenu","navtxt","wh","bottom","navtxtHeight","diff2","scrollTop","sidebars","$sidebar","placement","margin","fade","blocking","container","belowNav","Aside","_init","_setPlacement","extraClass","split","placementMap","t","tc","tr","tl","b","bc","br","bl","r","rc","l","lc","c","center","className","showEvent","modal","hideEvent","visibleModalSelector","dismissEventId","display","innerWidth","backdropBg","paddingRight","eid","_HandleAside","CLEAR","ADD","ADDED","close","autoremove","template","alert","Toaster","_lastToastId","_toast","$newToast","role","$toastHeader","title","titleClass","append","closeClass","bodyClass","image","icon","headerClass","_addToContainer","$existingToast","$toast","isNewElement","addEvent","appendTo","indexOf","prepend","dummy","toast","_toastOptions","sticky","animation","addedEvent","hideAll","selector","_hideBySelector","clearEvent","is","aceToaster","addEl","CLOSE","CLOSED","RESTORE","RESTORED","RELOAD","DATA_ACTION","Widget","$box","startLoading","loadingHtml","_closeComplete","next","$body","action","match","eventName","_toggleIcon","HTMLElement","eventCompleteName","toggleFast","button","animate","$expand","box","placeholder","nextSibling","removeAttribute","rect1","event","currentTarget","$actionBtn","$action","aceWidget","INVALID","RESET","PREVIEW_FAILED","persistent","btnChooseClass","btnChangeClass","btnChooseText","btnChangeText","placeholderClass","placeholderText","placeholderIcon","iconClass","reset","resetText","resetIcon","droppable","thumbnail","previewImage","allowExt","denyExt","allowMime","denyMime","maxSize","previewSize","previewWidth","previewHeight","beforeChange","fileIcons","file","video","audio","archive","code","PreviewError","FILE_LOAD_FAILED","IMAGE_LOAD_FAILED","THUMBNAIL_FAILED","FileInput","settings","extend","fileList","selectMethod","_hasMultiple","_hasFileList","_hasFileReader","_hasFile","disabled","canReset","aceInnerCall","_handleOnChange","parentLabel","$wrap","_applySettings","_isMulti","_isDropStyle","after","$container","tooltip","resetInput","stopLoading","_enableFileDrop","$files","innerCall","files","resetInputUI","filename","format","File","trim","name","Object","prototype","hasOwnProperty","path","index","lastIndexOf","substr","test","fileIcon","label","canPreview","when","_previewImage","fail","result","resetInputField","resetInputData","formEl","unwrap","removeData","removeAttr","newSettings","loader","empty","dropbox","stopPropagation","dt","dataTransfer","tmpFileList","tmpfiles","push","_processFiles","fileArray","f","concat","showFileList","triggerHandler","$icon","deferred","Deferred","getImage","src","$file","img","imgLoaded","imgFailed","size","min","svg","thumb","_getThumbnail","reject","w","h","max","background","resolve","reader","FileReader","onload","onerror","readAsDataURL","promise","imgWidth","imgHeight","dataURL","canvas","context","getContext","imageSmoothingQuality","drawImage","toDataURL","dropped","ret","_checkFileList","Array","FileList","_getExtRegex","_getMimeRegex","safeFiles","errorList","ext","mime","errorCount","fileCount","invalidCount","isArray","join","RegExp","replace","wysiwyg","colors","toolbar","toolbarPlacement","toolbarStyle","Wysiwyg","initEditor","toolbarHtml","_createToolbarHtml","before","prev","siblings","dropdown","which","change","click","self","viewSource","outerWidth","outerHeight","val","html","insertAfter","textarea","$options","activeToolbarClass","toolbarSelector","_handleImages","_buttonDefaults","font","values","fontSize","bold","italic","strikethrough","underline","insertunorderedlist","insertorderedlist","outdent","indent","justifyleft","justifycenter","justifyright","justifyfull","createLink","button_text","button_class","unlink","insertImage","button_insert","button_insert_class","choose_file","foreColor","backColor","undo","redo","toolbarButtons","tb","iconText","currentImg","popover","offset","content"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;;EAMA;EACA;MAEMA;;;;;;;;;wCACsB;EACxB,aAAOC,MAAM,CAACC,UA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