@finqu/cool 1.2.21 → 1.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/cool-grid.css +1 -1
- package/dist/css/cool-grid.css.map +1 -1
- package/dist/css/cool-grid.min.css.map +1 -1
- package/dist/css/cool-reboot.css +1 -1
- package/dist/css/cool-reboot.css.map +2 -2
- package/dist/css/cool-reboot.min.css.map +1 -1
- package/dist/css/cool.css +21 -21
- package/dist/css/cool.css.map +6 -6
- package/dist/css/cool.min.css +1 -1
- package/dist/css/cool.min.css.map +1 -1
- package/dist/js/cool.bundle.js +1 -1
- package/dist/js/cool.bundle.min.js +3 -3
- package/dist/js/cool.bundle.min.js.map +1 -1
- package/dist/js/cool.esm.js +1 -1
- package/dist/js/cool.esm.min.js +3 -3
- package/dist/js/cool.esm.min.js.map +1 -1
- package/dist/js/cool.js +1 -1
- package/dist/js/cool.min.js +3 -3
- package/dist/js/cool.min.js.map +1 -1
- package/js/dist/collapse.js +1 -1
- package/js/dist/common.js +1 -1
- package/js/dist/dropdown.js +1 -1
- package/js/dist/popover.js +1 -1
- package/js/dist/sectiontabs.js +1 -1
- package/js/dist/select.js +1 -1
- package/js/dist/tooltip.js +1 -1
- package/package.json +1 -1
- package/scss/_alert.scss +0 -16
- package/scss/_custom-forms.scss +8 -5
- package/scss/_input-group.scss +18 -18
- package/scss/_navbar.scss +6 -1
- package/scss/_variables.scss +12 -11
package/dist/js/cool.bundle.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cool UI v1.2.
|
|
3
|
-
* Copyright 2011-
|
|
2
|
+
* Cool UI v1.2.22 (https://finqu.fi)
|
|
3
|
+
* Copyright 2011-2020 Finqu Oy
|
|
4
4
|
* Licensed under the ISC license - (http://opensource.org/licenses/ISC)
|
|
5
5
|
*/
|
|
6
6
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):(t=t||self).cool=e()}(this,function(){"use strict";
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
* perfect-scrollbar v1.4.0
|
|
9
9
|
* (c) 2018 Hyunje Jun
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/function t(t){return getComputedStyle(t)}function e(t,e){for(var o in e){var i=e[o];"number"==typeof i&&(i+="px"),t.style[o]=i}return t}function o(t){var e=document.createElement("div");return e.className=t,e}var i="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function n(t,e){if(!i)throw new Error("No element matching method supported");return i.call(t,e)}function s(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function l(t,e){return Array.prototype.filter.call(t.children,function(t){return n(t,e)})}var a={main:"ps",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},r={x:null,y:null};function h(t,e){var o=t.element.classList,i=a.state.scrolling(e);o.contains(i)?clearTimeout(r[e]):o.add(i)}function c(t,e){r[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(a.state.scrolling(e))},t.settings.scrollingThreshold)}var d=function(t){this.element=t,this.handlers={}},p={isEmpty:{configurable:!0}};d.prototype.bind=function(t,e){"undefined"==typeof this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},d.prototype.unbind=function(t,e){var o=this;this.handlers[t]=this.handlers[t].filter(function(i){return!(!e||i===e)||(o.element.removeEventListener(t,i,!1),!1)})},d.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},p.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(d.prototype,p);var u=function(){this.eventElements=[]};function f(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}u.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new d(t),this.eventElements.push(e)),e},u.prototype.bind=function(t,e,o){this.eventElement(t).bind(e,o)},u.prototype.unbind=function(t,e,o){var i=this.eventElement(t);i.unbind(e,o),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},u.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},u.prototype.once=function(t,e,o){var i=this.eventElement(t);i.bind(e,function t(n){i.unbind(e,t),o(n)})};var g=function(t,e,o,i,n){var s;if(void 0===i&&(i=!0),void 0===n&&(n=!1),"top"===e)s=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");s=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,o,i,n){var s=o[0],l=o[1],a=o[2],r=o[3],d=o[4],p=o[5];void 0===i&&(i=!0);void 0===n&&(n=!1);var u=t.element;t.reach[r]=null,u[a]<1&&(t.reach[r]="start");u[a]>t[s]-t[l]-1&&(t.reach[r]="end");e&&(u.dispatchEvent(f("ps-scroll-"+r)),e<0?u.dispatchEvent(f("ps-scroll-"+d)):e>0&&u.dispatchEvent(f("ps-scroll-"+p)),i&&function(t,e){h(t,e),c(t,e)}(t,r));t.reach[r]&&(e||n)&&u.dispatchEvent(f("ps-"+r+"-reach-"+t.reach[r]))}(t,o,s,i,n)};function m(t){return parseInt(t,10)||0}var v={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},b=function(t){var o=t.element,i=Math.floor(o.scrollTop);t.containerWidth=o.clientWidth,t.containerHeight=o.clientHeight,t.contentWidth=o.scrollWidth,t.contentHeight=o.scrollHeight,o.contains(t.scrollbarXRail)||(l(o,a.element.rail("x")).forEach(function(t){return s(t)}),o.appendChild(t.scrollbarXRail)),o.contains(t.scrollbarYRail)||(l(o,a.element.rail("y")).forEach(function(t){return s(t)}),o.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=w(t,m(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=m((t.negativeScrollAdjustment+o.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=w(t,m(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=m(i*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,o){var i={width:o.railXWidth},n=Math.floor(t.scrollTop);o.isRtl?i.left=o.negativeScrollAdjustment+t.scrollLeft+o.containerWidth-o.contentWidth:i.left=t.scrollLeft;o.isScrollbarXUsingBottom?i.bottom=o.scrollbarXBottom-n:i.top=o.scrollbarXTop+n;e(o.scrollbarXRail,i);var s={top:n,height:o.railYHeight};o.isScrollbarYUsingRight?o.isRtl?s.right=o.contentWidth-(o.negativeScrollAdjustment+t.scrollLeft)-o.scrollbarYRight-o.scrollbarYOuterWidth:s.right=o.scrollbarYRight-t.scrollLeft:o.isRtl?s.left=o.negativeScrollAdjustment+t.scrollLeft+2*o.containerWidth-o.contentWidth-o.scrollbarYLeft-o.scrollbarYOuterWidth:s.left=o.scrollbarYLeft+t.scrollLeft;e(o.scrollbarYRail,s),e(o.scrollbarX,{left:o.scrollbarXLeft,width:o.scrollbarXWidth-o.railBorderXWidth}),e(o.scrollbarY,{top:o.scrollbarYTop,height:o.scrollbarYHeight-o.railBorderYWidth})}(o,t),t.scrollbarXActive?o.classList.add(a.state.active("x")):(o.classList.remove(a.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,o.scrollLeft=0),t.scrollbarYActive?o.classList.add(a.state.active("y")):(o.classList.remove(a.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,o.scrollTop=0)};function w(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function x(t,e){var o=e[0],i=e[1],n=e[2],s=e[3],l=e[4],r=e[5],d=e[6],p=e[7],u=e[8],f=t.element,g=null,m=null,$=null;function v(e){f[d]=g+$*(e[n]-m),h(t,p),b(t),e.stopPropagation(),e.preventDefault()}function w(){c(t,p),t[u].classList.remove(a.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",v)}t.event.bind(t[l],"mousedown",function(e){g=f[d],m=e[n],$=(t[i]-t[o])/(t[s]-t[r]),t.event.bind(t.ownerDocument,"mousemove",v),t.event.once(t.ownerDocument,"mouseup",w),t[u].classList.add(a.state.clicking),e.stopPropagation(),e.preventDefault()})}var y={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var o=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=o*t.containerHeight,b(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var o=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=o*t.containerWidth,b(t),e.stopPropagation()})},"drag-thumb":function(t){x(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),x(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(o){if(!(o.isDefaultPrevented&&o.isDefaultPrevented()||o.defaultPrevented)&&(n(e,":hover")||n(t.scrollbarX,":focus")||n(t.scrollbarY,":focus"))){var i,s=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(s){if("IFRAME"===s.tagName)s=s.contentDocument.activeElement;else for(;s.shadowRoot;)s=s.shadowRoot.activeElement;if(n(i=s,"input,[contenteditable]")||n(i,"select,[contenteditable]")||n(i,"textarea,[contenteditable]")||n(i,"button,[contenteditable]"))return}var l=0,a=0;switch(o.which){case 37:l=o.metaKey?-t.contentWidth:o.altKey?-t.containerWidth:-30;break;case 38:a=o.metaKey?t.contentHeight:o.altKey?t.containerHeight:30;break;case 39:l=o.metaKey?t.contentWidth:o.altKey?t.containerWidth:30;break;case 40:a=o.metaKey?-t.contentHeight:o.altKey?-t.containerHeight:-30;break;case 32:a=o.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==l||t.settings.suppressScrollY&&0!==a||(e.scrollTop-=a,e.scrollLeft+=l,b(t),function(o,i){var n=Math.floor(e.scrollTop);if(0===o){if(!t.scrollbarYActive)return!1;if(0===n&&i>0||n>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var s=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===s&&o<0||s>=t.contentWidth-t.containerWidth&&o>0)return!t.settings.wheelPropagation}return!0}(l,a)&&o.preventDefault())}})},wheel:function(e){var o=e.element;function i(i){var n=function(t){var e=t.deltaX,o=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof o||(e=-1*t.wheelDeltaX/6,o=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,o*=10),e!=e&&o!=o&&(e=0,o=t.wheelDelta),t.shiftKey?[-o,-e]:[e,o]}(i),s=n[0],l=n[1];if(!function(e,i,n){if(!v.isWebKit&&o.querySelector("select:focus"))return!0;if(!o.contains(e))return!1;for(var s=e;s&&s!==o;){if(s.classList.contains(a.element.consuming))return!0;var l=t(s);if([l.overflow,l.overflowX,l.overflowY].join("").match(/(scroll|auto)/)){var r=s.scrollHeight-s.clientHeight;if(r>0&&!(0===s.scrollTop&&n>0||s.scrollTop===r&&n<0))return!0;var h=s.scrollWidth-s.clientWidth;if(h>0&&!(0===s.scrollLeft&&i<0||s.scrollLeft===h&&i>0))return!0}s=s.parentNode}return!1}(i.target,s,l)){var r=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(l?o.scrollTop-=l*e.settings.wheelSpeed:o.scrollTop+=s*e.settings.wheelSpeed,r=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(s?o.scrollLeft+=s*e.settings.wheelSpeed:o.scrollLeft-=l*e.settings.wheelSpeed,r=!0):(o.scrollTop-=l*e.settings.wheelSpeed,o.scrollLeft+=s*e.settings.wheelSpeed),b(e),(r=r||function(t,i){var n=Math.floor(o.scrollTop),s=0===o.scrollTop,l=n+o.offsetHeight===o.scrollHeight,a=0===o.scrollLeft,r=o.scrollLeft+o.offsetWidth===o.scrollWidth;return!(Math.abs(i)>Math.abs(t)?s||l:a||r)||!e.settings.wheelPropagation}(s,l))&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault())}}"undefined"!=typeof window.onwheel?e.event.bind(o,"wheel",i):"undefined"!=typeof window.onmousewheel&&e.event.bind(o,"mousewheel",i)},touch:function(e){if(v.supportsTouch||v.supportsIePointer){var o=e.element,i={},n=0,s={},l=null;v.supportsTouch?(e.event.bind(o,"touchstart",d),e.event.bind(o,"touchmove",p),e.event.bind(o,"touchend",u)):v.supportsIePointer&&(window.PointerEvent?(e.event.bind(o,"pointerdown",d),e.event.bind(o,"pointermove",p),e.event.bind(o,"pointerup",u)):window.MSPointerEvent&&(e.event.bind(o,"MSPointerDown",d),e.event.bind(o,"MSPointerMove",p),e.event.bind(o,"MSPointerUp",u)))}function r(t,i){o.scrollTop-=i,o.scrollLeft-=t,b(e)}function h(t){return t.targetTouches?t.targetTouches[0]:t}function c(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function d(t){if(c(t)){var e=h(t);i.pageX=e.pageX,i.pageY=e.pageY,n=(new Date).getTime(),null!==l&&clearInterval(l)}}function p(l){if(c(l)){var d=h(l),p={pageX:d.pageX,pageY:d.pageY},u=p.pageX-i.pageX,f=p.pageY-i.pageY;if(function(e,i,n){if(!o.contains(e))return!1;for(var s=e;s&&s!==o;){if(s.classList.contains(a.element.consuming))return!0;var l=t(s);if([l.overflow,l.overflowX,l.overflowY].join("").match(/(scroll|auto)/)){var r=s.scrollHeight-s.clientHeight;if(r>0&&!(0===s.scrollTop&&n>0||s.scrollTop===r&&n<0))return!0;var h=s.scrollLeft-s.clientWidth;if(h>0&&!(0===s.scrollLeft&&i<0||s.scrollLeft===h&&i>0))return!0}s=s.parentNode}return!1}(l.target,u,f))return;r(u,f),i=p;var g=(new Date).getTime(),m=g-n;m>0&&(s.x=u/m,s.y=f/m,n=g),function(t,i){var n=Math.floor(o.scrollTop),s=o.scrollLeft,l=Math.abs(t),a=Math.abs(i);if(a>l){if(i<0&&n===e.contentHeight-e.containerHeight||i>0&&0===n)return 0===window.scrollY&&i>0&&v.isChrome}else if(l>a&&(t<0&&s===e.contentWidth-e.containerWidth||t>0&&0===s))return!0;return!0}(u,f)&&l.preventDefault()}}function u(){e.settings.swipeEasing&&(clearInterval(l),l=setInterval(function(){e.isInitialized?clearInterval(l):s.x||s.y?Math.abs(s.x)<.01&&Math.abs(s.y)<.01?clearInterval(l):(r(30*s.x,30*s.y),s.x*=.8,s.y*=.8):clearInterval(l)},10))}}},C=function(i,n){var s=this;if(void 0===n&&(n={}),"string"==typeof i&&(i=document.querySelector(i)),!i||!i.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var l in this.element=i,i.classList.add(a.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},n)s.settings[l]=n[l];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var r,h,c=function(){return i.classList.add(a.state.focus)},d=function(){return i.classList.remove(a.state.focus)};this.isRtl="rtl"===t(i).direction,this.isNegativeScroll=(h=i.scrollLeft,i.scrollLeft=-1,r=i.scrollLeft<0,i.scrollLeft=h,r),this.negativeScrollAdjustment=this.isNegativeScroll?i.scrollWidth-i.clientWidth:0,this.event=new u,this.ownerDocument=i.ownerDocument||document,this.scrollbarXRail=o(a.element.rail("x")),i.appendChild(this.scrollbarXRail),this.scrollbarX=o(a.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",c),this.event.bind(this.scrollbarX,"blur",d),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var p=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(p.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=m(p.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=m(p.borderLeftWidth)+m(p.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=m(p.marginLeft)+m(p.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=o(a.element.rail("y")),i.appendChild(this.scrollbarYRail),this.scrollbarY=o(a.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",c),this.event.bind(this.scrollbarY,"blur",d),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var f=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(f.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=m(f.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var o=t(e);return m(o.width)+m(o.paddingLeft)+m(o.paddingRight)+m(o.borderLeftWidth)+m(o.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=m(f.borderTopWidth)+m(f.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=m(f.marginTop)+m(f.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:i.scrollLeft<=0?"start":i.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:i.scrollTop<=0?"start":i.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return y[t](s)}),this.lastScrollTop=Math.floor(i.scrollTop),this.lastScrollLeft=i.scrollLeft,this.event.bind(this.element,"scroll",function(t){return s.onScroll(t)}),b(this)};C.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,e(this.scrollbarXRail,{display:"block"}),e(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=m(t(this.scrollbarXRail).marginLeft)+m(t(this.scrollbarXRail).marginRight),this.railYMarginHeight=m(t(this.scrollbarYRail).marginTop)+m(t(this.scrollbarYRail).marginBottom),e(this.scrollbarXRail,{display:"none"}),e(this.scrollbarYRail,{display:"none"}),b(this),g(this,"top",0,!1,!0),g(this,"left",0,!1,!0),e(this.scrollbarXRail,{display:""}),e(this.scrollbarYRail,{display:""}))},C.prototype.onScroll=function(t){this.isAlive&&(b(this),g(this,"top",this.element.scrollTop-this.lastScrollTop),g(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},C.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),s(this.scrollbarX),s(this.scrollbarY),s(this.scrollbarXRail),s(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},C.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},$.fn.extend({animateCss:function(t,e){var o="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";this.addClass("animated "+t).one(o,function(o){$(this).removeClass("animated "+t),e&&e()}).children().on(o,function(t){t.stopPropagation()})}}),window.Cool=window.Cool||{},window.Cool.settings=window.Cool.settings||{};var T=function(){function t(){}return t.initialize=function(t){t=t||{},window.Cool.settings=t,$('[data-toggle="popover"]').coolPopover(t.popover),$('[data-toggle="select"]').coolSelect(t.select),$('[data-toggle="dropdown"]').coolDropdown(t.dropdown),$('[data-toggle="tooltip"]').coolTooltip(t.tooltip),$('[data-toggle="collapse"]').coolCollapse(t.collapse),$('[data-toggle="section-tabs"]').coolSectionTabs(t.sectionTabs),$("body").coolToast(t.toast),$("body").coolDialog(t.dialog),$("html").addClass("dom-ready"),$(document).on("focus",".form-control",function(){if(!$(this).hasClass("disabled")&&$(this).not(":disabled")&&!$(this).attr("readonly")){var t=$(this).closest(".input-group");t.hasClass("input-group-focus")||t.addClass("input-group-focus")}}),$(document).on("blur",".form-control",function(){if(!$(this).hasClass("disabled")&&$(this).not(":disabled")&&!$(this).attr("readonly")){var t=$(this).closest(".input-group");t.hasClass("input-group-focus")&&t.removeClass("input-group-focus")}}),$(".form-label-group").each(function(t,e){$(e).find("input").on("blur input change",function(){$(this).val()?$(e).addClass("label-on-top"):$(e).removeClass("label-on-top")}).trigger("change")}),$.each($(".table"),function(){$(this).find("[data-table-link], [data-table-btn]").length&&!$(this).hasClass("table-hover")&&$(this).addClass("table-hover")}),$(document).on("click","[data-table-link]",function(t){var e=$(this).parents("table, .table"),o=$(this).data("tableLink"),i=$(t.target),n=!1;$.each(["input","button","a","label","td.col-select"],function(t){(i.is(t)||"a"==t&&i.parent().is(t))&&(n=!0)}),e.hasClass("bulk-actions-active")&&(n=!0),i.hasClass("table-link-exclude")&&(n=!0),i.is("td, .td, img")&&!n&&(t.ctrlKey||t.metaKey?window.open(o,"_blank"):window.location.href=o)}),$(document).on("click","[data-table-btn]",function(t){var e=$(this).parents("table, .table"),o=$(this),i=$(this).data("tableButton"),n=$(t.target),s=!1;(i||(i=o.find("button")[0]))&&($.each(["input","button","a","label","td.col-select"],function(t){(n.is(t)||"a"==t&&n.parent().is(t))&&(s=!0)}),e.hasClass("bulk-actions-active")&&(s=!0),n.hasClass("table-btn-exclude")&&(s=!0),n.is("td, .td, img")&&!s&&$(i).click())}),$(document).on("click",".btn-group-toggle .btn > input",function(t){t.stopPropagation()}),$(document).on("click",".btn-group-toggle .btn",function(){$(this).find("input").trigger("click"),$(this).parent().find("input").trigger("change")}),$(document).on("change",".btn-group-toggle .btn > input",function(){$(this).is(":checked")?$(this).parent().addClass("active"):$(this).parent().removeClass("active")}),$("select").on("change",function(){$(this).blur()}),$(".tab-toggler").on("click",function(t){t.stopPropagation(),$(this).parent().toggleClass("open")}),$(document).on("click",function(){$(".tabs-container").removeClass("open")}),$(".sidebar-left-toggler").on("click",function(t){t.stopPropagation(),$(this).toggleClass("open"),$("body").toggleClass("sidebar-left-open")}),$(".sidebar-right-toggler").on("click",function(t){t.stopPropagation(),$(this).toggleClass("open"),$("body").toggleClass("sidebar-right-open")}),$(".sidebar-content .ps__thumb-y").mousedown(function(){$(this).parent().parent().addClass("ps-mousedown-scroll")}),$(document).mouseup(function(){$(".sidebar-content").hasClass("ps-mousedown-scroll")&&$(".sidebar-content").removeClass("ps-mousedown-scroll")});var e=$(".sidebar-left").find(".sidebar-content");if(e.length)new C(e[0],{wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0});var o=$(document).find(".sidebar-tab");o.length&&($.each(o,function(t,e){var o=$(e).find(".tab-content");new C(o[0],{wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0})}),$('[name="sidebar-tab-select"]').on("click",function(){var t=$(this).val(),e=$("#sidebar-tab-"+t);o.not(e).removeClass("active"),e.addClass("active"),$('[name="sidebar-tab-select"]').not($(this)).removeClass("active"),$(this).addClass("active"),e[0]==o.first()[0]?o.not(e).find(".tab-content").css({transform:"translate3d(100%, 0px, 0px)"}):e[0]==o.last()[0]?o.not(e).find(".tab-content").css({transform:"translate3d(-100%, 0px, 0px)"}):(o.first().not(e).find(".tab-content").css({transform:"translate3d(-100%, 0px, 0px)"}),o.last().not(e).find(".tab-content").css({transform:"translate3d(100%, 0px, 0px)"})),e.find(".tab-content").css({transform:"none"})}))},t}();function I(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}window.Cool.initialize=T.initialize;var S=function(t,e,o){var i;return function(){var n=this,s=arguments,l=o&&!i;clearTimeout(i),i=setTimeout(function(){i=null,o||t.apply(n,s)},e),l&&t.apply(n,s)}},k=function(){var t=!1;return("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(t=!0),t};$.event.special.destroyed={remove:function(t){t.handler&&t.handler()}};var P=function(){function t(){}var e=t.prototype;return e.onInit=function(){var t=this.opts.onInit;"function"==typeof t&&t.call(this)},e.onUpdate=function(){var t=this.opts.onUpdate;"function"==typeof t&&t.call(this)},e.onDestroy=function(){var t=this.opts.onDestroy;"function"==typeof t&&t.call(this)},e.onShow=function(){var t=this.opts.onShow;"function"==typeof t&&t.call(this)},e.onClose=function(){var t=this.opts.onClose;"function"==typeof t&&t.call(this)},e.onReset=function(){var t=this.opts.onReset;"function"==typeof t&&t.call(this)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},t}(),D="coolPopover",E="plugin_coolPopover",H=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.popover?$.extend(!0,i.opts,$.fn[D].defaults,window.Cool.settings.popover,o):$.extend(!0,i.opts,$.fn[D].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData(E),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.id="popover-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.trigger=this.$el.data("trigger")?this.$el.data("trigger"):this.opts.trigger,this.placement=this.$el.data("placement")?this.$el.data("placement"):this.opts.placement,this.placementChanged=!1,this.title=this.$el.data("title")?this.$el.data("title"):this.opts.title,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content},o.bindEvents=function(){var t=this;"click"===this.trigger?this.$el.on("click."+D,function(){t.$popover?t.close():t.show()}):"hover"===this.trigger?(this.$el.on("mouseenter."+D,function(){t.show()}),this.$el.on("mouseleave."+D,function(){t.close()})):"focus"===this.trigger&&(this.$el.on("focusin."+D,function(){t.show()}),this.$el.on("focusout."+D,function(){t.close()})),$(window).on("resize",S(function(){t.$popover&&(t.setPosition(),t.onUpdate())},250))},o.unbindEvents=function(){this.$el.off("."+D)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.buildPopover=function(){var t;t="function"==typeof this.content?this.content():this.content,this.$popover=$('\n \t\t<div class="popover" role="tooltip" id="'+this.id+'">\n\n\t\t\t <div class="arrow"></div>\n\n\t\t\t <h3 class="popover-header">'+this.title+'</h3>\n\n\t\t\t <div class="popover-body">'+t+"</div>\n\n\t\t\t</div>\n \t"),this.$container.append(this.$popover),this.$arrow=!!this.$popover.find(".arrow")&&this.$popover.find(".arrow"),this.log(this.$el),this.log(this.$container),this.log(this.$popover),this.log(this.$arrow),this.log("Id: "+this.id),this.log("Trigger: "+this.trigger),this.log("Placement: "+this.placement),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Title: "+this.title),this.log("Content: "+this.content)},o.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$popover.addClass("popover-"+t);var e,o,i,n=this.$container.innerWidth(),s=this.$container.innerHeight(),l=this.$popover.outerWidth(!0),a=this.$popover.outerHeight(!0),r=this.$el.outerWidth(),h=this.$el.outerHeight(),c=this.$el.position().left,d=this.$el.position().top,p=this.$arrow.outerWidth(!0),u=this.$arrow.outerHeight(!0);"top"===t?(o=Math.round(c-(l-r)/2),i=Math.round(d-a),e=Math.round(l/2-p/2),this.$arrow.css({left:e+"px"})):"right"===t?(o=Math.round(c+r),i=Math.round(d-(a-h)/2),e=Math.round(a/2-u/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(o=Math.round(c-(l-r)/2),i=Math.round(d+h),e=Math.round(l/2-p/2),this.$arrow.css({left:e+"px"})):"left"===t&&(o=Math.round(c-l),i=Math.round(d-(a-h)/2),e=Math.round(a/2-u/2),this.$arrow.css({top:e+"px"})),this.$popover.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+o+"px, "+i+"px, 0px)","will-change":"transform"});var f=0,g={left:this.$popover.position().left,top:this.$popover.position().top,right:n-(this.$popover.position().left+l),bottom:s-(this.$popover.position().top+a)},m={left:!1,top:!1,right:!1,bottom:!1};if(g.right<0&&(m.right=!0,f++,this.log("Popover overflowing from right")),g.left<0&&(m.left=!0,f++,this.log("Popover overflowing from left")),g.bottom<0&&(m.bottom=!0,f++,this.log("Popover overflowing from bottom")),g.top<0&&(m.top=!0,f++,this.log("Popover overflowing from top")),f>0){if(!this.placementChanged&&m.left&&g.right>l?(this.log("Changing popover placement to right"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("right")):!this.placementChanged&&m.top&&g.top>a?(this.log("Changing popover placement to bottom"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")):!this.placementChanged&&m.right&&g.left>l?(this.log("Changing popover placement to left"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("left")):!this.placementChanged&&m.bottom&&g.top>a?(this.log("Changing popover placement to top"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!m.left&&!m.right?this.fixPopoverPosition=!0:g.top>g.bottom?(this.log("Changing popover placement to top"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):(this.log("Changing popover placement to bottom"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")),this.fixPopoverPosition){if(this.log("Adjusting popover size or position in order to popover fit in the container"),m.left){this.log("Popover overflowing from left");var $=Math.abs(g.left);c>=o+$&&["top","bottom"].indexOf(t)<0?(this.log("Popover adjusting width"),l-=$,o+=$):(this.log("Popover adjusting position x"),o+=$,e-=$)}if(m.top){this.log("Popover overflowing from top");var v=Math.abs(g.top);this.log("Popover adjusting position y"),i+=v,e-=v}if(m.right){this.log("Popover overflowing from right");var b=Math.abs(g.right);c<=o-b&&["top","bottom"].indexOf(t)<0?(this.log("Popover adjusting width"),l-=b):(this.log("Popover adjusting position x"),o-=b,e+=b)}if(m.bottom){this.log("Popover overflowing from bottom");var w=Math.abs(g.bottom);this.log("Popover adjusting position y"),i-=w,e+=w}"top"===t?this.$arrow.css({left:e+"px"}):"right"===t?this.$arrow.css({top:e+"px"}):"bottom"===t?this.$arrow.css({left:e+"px"}):"left"===t&&this.$arrow.css({top:e+"px"}),this.$popover.css({width:l,transform:"translate3d("+o+"px, "+i+"px, 0px)"}),this.fixPopoverPosition=!1,this.log("Popover placement changed: "+this.placementChanged),this.log("Popover container inner width: "+n+"px"),this.log("Popover container inner height: "+s+"px"),this.log("Popover trigger width: "+r+"px"),this.log("Popover trigger height: "+h+"px"),this.log("popover trigger position x: "+c+"px"),this.log("Popover trigger position Y: "+d+"px"),this.log("Popover width: "+l+"px"),this.log("Popover height: "+a+"px"),this.log("Popover position x: "+o+"px"),this.log("Popover position y: "+i+"px"),this.log("Popover position left: "+g.left+"px"),this.log("Popover position top: "+g.top+"px"),this.log("Popover position right: "+g.right+"px"),this.log("Popover position bottom: "+g.bottom+"px")}}else this.log("Popover placement changed: "+this.placementChanged),this.log("Popover container inner width: "+n+"px"),this.log("Popover container inner height: "+s+"px"),this.log("Popover trigger width: "+r+"px"),this.log("Popover trigger height: "+h+"px"),this.log("popover trigger position x: "+c+"px"),this.log("Popover trigger position Y: "+d+"px"),this.log("Popover width: "+l+"px"),this.log("Popover height: "+a+"px"),this.log("Popover position x: "+o+"px"),this.log("Popover position y: "+i+"px"),this.log("Popover position left: "+g.left+"px"),this.log("Popover position top: "+g.top+"px"),this.log("Popover position right: "+g.right+"px"),this.log("Popover position bottom: "+g.bottom+"px")},o.show=function(){this.$popover||(this.buildPopover(),this.setPosition(),this.animation?(this.$popover.addClass(this.animationSpeed),this.$popover.animateCss(this.animationIn),this.$popover.addClass("show"),this.$popover.attr("id",this.id),this.$el.attr("data-popover",this.id)):(this.$popover.addClass("show"),this.$popover.attr("id",this.id),this.$el.attr("data-popover",this.id)),this.onShow())},o.close=function(){var t=this;this.$popover&&(this.animation&&!this.$popover.hasClass("animated")?this.$popover.animateCss(this.animationOut,function(){t.$popover.remove(),t.$el.removeAttr("data-popover"),t.$popover=null,t.placementChanged=!1,t.onClose()}):(this.$popover.remove(),this.$el.removeAttr("data-popover"),this.$popover=null,this.placementChanged=!1,this.onClose()))},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data(E);if(o||(o=new e(this,"object"==typeof t&&t),$(this).data(E,o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(P);if("undefined"!=typeof $){var Y=$.fn[D];$.fn[D]=H._jQueryInterface,$.fn[D].Constructor=H,$.fn[D].noConflict=function(){return $.fn[D]=Y,H._jQueryInterface},$.fn[D].defaults={container:".content-inner",trigger:"focus",placement:"bottom",animation:!0,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",title:"",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var W="coolSelect",X=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.select?$.extend(!0,i.opts,$.fn[W].defaults,window.Cool.settings.select,o):$.extend(!0,i.opts,$.fn[W].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){var t=this;this.buildCache().then(function(){t.buildScroll(),t.bindEvents(),t.data[t.name].length>0&&t.setData(),t.onInit()})},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolSelect"),this.onDestroy()},o.update=function(){this.buildCache(),this.bindEvents(),this.onUpdate()},o.reset=function(){this.data={},this.data[this.name]=[],this.items=[],this.$select.find(".select-item").remove(),this.$selectItems=[],this.$selectIconContainer.html(this.selectIconDefault),0==this.data[this.name].length&&this.dynamicTitle&&this.dynamicTitleDefault&&0!==this.dynamicTitleDefault&&0==this.$selectTitle.text().trim()&&(this.$selectItems.length>0||this.searchApi)&&this.$selectTitle.html(this.dynamicTitleDefault),0==this.$selectItems.length&&!this.searchApi&&this.dynamicTitle&&this.dynamicTitleEmptyDefault&&0!==this.dynamicTitleEmptyDefault&&(this.$selectHeader.css("cursor","default"),this.$selectIconContainer.addClass("d-none"),this.$selectTitle.html(this.dynamicTitleEmptyDefault)),this.showSearch&&(this.searchData=[],this.$searchInput.val(""),this.searchString="",this.search.call(this))},o.buildCache=function(){var t=this;return new Promise(function(e,o){var i=t;t.$el=$(t.el),t.$container=t.$el.parent(),t.$selectHeader=t.$el.find(".select-header"),t.$selectTitle=t.$el.find(".select-title"),t.$selectIconContainer=t.$selectHeader.find(".select-icon"),t.selectIconDefault=t.$selectHeader.find(".select-icon")?t.$selectHeader.find(".select-icon").html():'<i class="'+(t.opts.faPro?"fal":"fas")+'fa-angle-down icon"></i>',t.name=t.$el.data("name")?t.$el.data("name"):t.opts.name,t.scrollContentHeight=t.$el.data("scrollContentHeight")?t.$el.data("scrollContentHeight"):t.opts.scrollContentHeight,t.items=t.$el.data("items")?t.$el.data("items"):t.opts.items,t.data={},t.data[t.name]=[],t.searchData=[],t.searchApi=t.$el.data("searchApi")?t.$el.data("searchApi"):t.opts.searchApi,t.type=t.$el.data("type")?t.$el.data("type"):t.opts.type,t.contentOpen=!1,t.searchPlaceholder=t.$el.data("search-placeholder")?t.$el.data("search-placeholder"):t.opts.searchPlaceholder,t.btnCloseText=t.$el.data("btn-close-text")?t.$el.data("btn-close-text"):t.opts.btnCloseText,t.labelTemplate=t.opts.labelTemplate,t.confirmCheck=t.opts.confirmCheck,t.confirmUncheck=t.opts.confirmUncheck,t.preventUncheck=t.opts.preventUncheck,t.dynamicTitle=t.$el.data("dynamicTitle")?t.$el.data("dynamicTitle"):t.opts.dynamicTitle,t.dynamicTitleDefault=t.$el.data("dynamicTitleDefault")?t.$el.data("dynamicTitleDefault"):t.opts.dynamicTitleDefault,t.dynamicTitleEmptyDefault=t.$el.data("dynamicTitleEmptyDefault")?t.$el.data("dynamicTitleEmptyDefault"):t.opts.dynamicTitleEmptyDefault,t.allowNoneOnRadioSelect=t.$el.data("allowNoneOnRadioSelect")?t.$el.data("allowNoneOnRadioSelect"):t.opts.allowNoneOnRadioSelect,t.showValidStateIcon=t.$el.data("showValidStateIcon")?t.$el.data("showValidStateIcon"):t.opts.showValidStateIcon,t.itemsToExclude=t.$el.data("itemsToExclude")?t.$el.data("itemsToExclude").replace(/\s/g,"").split(","):t.opts.itemsToExclude,t.preventClose=!1,t.itemsToExclude.length>0&&(t.itemsToExclude=t.itemsToExclude.map(Number)),t.opts.setData&&(t.data=t.opts.setData),t.$el.data("setData")&&""!=t.$el.data("setData")&&(t.data=t.$el.data("setData")),"undefined"!=typeof t.data[t.name].filter&&i.itemsToExclude&&(t.data[t.name]=t.data[t.name].filter(function(t){return-1===i.itemsToExclude.indexOf(parseInt(t.id,10))})),"undefined"!=typeof t.items.filter&&i.itemsToExclude&&(t.items=t.items.filter(function(t){return-1===i.itemsToExclude.indexOf(parseInt(t.id,10))})),t.$el.find(".select-search").length?t.showSearch=!0:t.showSearch=t.$el.data("showSearch")?t.$el.data("showSearch"):t.opts.showSearch,t.$el.find(".select-footer").length?t.showFooter=!0:t.showFooter=t.$el.data("showFooter")?t.$el.data("showFooter"):t.opts.showFooter,t.$select=t.$el.find(".select-content"),new Promise(function(e,o){if(t.$select.length)e();else{var i=t._renderItemList(t.items);t.$select=$('\n <div class="select-content">\n\n '+t._renderSearch()+'\n\n <div class="select-scrollable-content">'+i+"</div>\n\n "+t._renderFooter()+"\n\n </div>\n "),t.$el.append(t.$select),e()}}).then(function(){t.$scrollableContent=!!t.$select.find(".select-scrollable-content")&&t.$select.find(".select-scrollable-content"),t.$selectItems=t.$select.find(".select-item"),0==t.data[t.name].length&&t.dynamicTitle&&t.dynamicTitleDefault&&0!==t.dynamicTitleDefault&&0==t.$selectTitle.text().trim()&&(t.$selectItems.length>0||t.searchApi)&&t.$selectTitle.html(t.dynamicTitleDefault),0==t.$selectItems.length&&!t.searchApi&&t.dynamicTitle&&t.dynamicTitleEmptyDefault&&0!==t.dynamicTitleEmptyDefault&&(t.$selectHeader.css("cursor","default"),t.$selectIconContainer.addClass("d-none"),t.$selectTitle.html(t.dynamicTitleEmptyDefault)),t.showSearch&&(t.$searchContainer=t.$select.find(".select-search"),t.$searchInput=t.$select.find('[name="select-search"]'),t.$searchIconContainer=t.$select.find(".select-search-icon"),t.$clearSearchButton=t.$select.find("[data-clear-search]"),t.$searchInput[0].tabIndex=-1),t.showFooter&&(t.$footerContainer=t.$select.find(".select-footer"),t.$closeButton=t.$select.find("[data-select-close]"),t.$closeButton[0].tabIndex=-1),t.buildSearchData(),t.log(t.$el),t.log(t.$select),t.log(t.$scrollableContent),t.log("Name: "+t.name),t.log("Show search: "+t.showSearch),t.log("Show footer: "+t.showFooter),t.log("Scroll content height: "+t.scrollContentHeight+"px"),t.log(t.items),t.log(t.searchData),e()})})},o.buildScroll=function(){if(this.$scrollableContent.length>0){var t=this.scrollContentHeight;this.showSearch&&(t-=this.$searchContainer.outerHeight(!0)||0),this.showFooter&&(t-=this.$footerContainer.outerHeight(!0)||0),this.$scrollableContent.css({"max-height":t-parseInt(this.$scrollableContent.css("marginTop"),10)-parseInt(this.$scrollableContent.css("marginBottom"),10)+"px"}),k()?this.$scrollableContent.css({"overflow-y":"auto"}):(this.$scrollableContent.addClass("ps-dark"),this.scroll=new C(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,scrollYMarginOffset:-1,suppressScrollY:!0,suppressScrollX:!0}),this.$scrollableContent.find('[tabindex="0"]').attr("tabindex",-1),this.$scrollableContent[0].offsetHeight<this.$scrollableContent[0].scrollHeight&&(this.$scrollableContent.addClass("ps-show-rail-y"),this.scroll.settings.suppressScrollY=!1))}},o.buildSearchData=function(){var t=this;return new Promise(function(e,o){t.searchData=[];var i=t.$select.find("[data-label]");$.each(i,function(e,o){t.searchData.push({id:e,val:$(o).text().trim()})}),e()})},o.bindEvents=function(){var t=this,e=this;this.$selectHeader.on("click."+W,function(){t.contentOpen?t.close():(t.$selectItems.length>0||t.searchApi)&&t.show()}),this.$el.on("change."+W,'input[type="checkbox"]',function(){var t=this,o=$(this).val();e.preventClose=!0,"function"==typeof e.confirmCheck&&t.checked?(t.checked=!1,e.confirmCheck(function(i){"confirmed"==i&&(-1===e.data[e.name].indexOf(o)&&e.data[e.name].push(o),t.checked=!0,e.onSelect(t)),setTimeout(function(){e.preventClose=!1},600)},t)):t.checked?(-1===e.data[e.name].indexOf(o)&&e.data[e.name].push(o),e.onSelect(t),setTimeout(function(){e.preventClose=!1},600)):"function"!=typeof e.confirmUncheck||t.checked?t.checked||e.preventUncheck?!t.checked&&e.preventUncheck&&(t.checked=!0,setTimeout(function(){e.preventClose=!1},600)):(e.data[e.name]=e.data[e.name].filter(function(t){return t!=o}),e.onSelect(t),setTimeout(function(){e.preventClose=!1},600)):(t.checked=!0,e.confirmUncheck(function(i){"confirmed"==i&&(e.data[e.name]=e.data[e.name].filter(function(t){return t!=o}),t.checked=!1,e.onSelect(t)),setTimeout(function(){e.preventClose=!1},600)},t))}),this.$el.on("change."+W,'input[type="radio"]',function(){var t=$(this).val();this.checked?(e.data[e.name]=t,e.$select.find('input[type="radio"]').not($(this)).prop("checked",!1),e.$select.find('input[type="radio"]').not($(this)).removeClass("checked")):e.data[e.name]=[]}),this.$el.on("click."+W,'input[type="radio"]',function(){$(this).hasClass("checked")&&e.allowNoneOnRadioSelect?(e.data[e.name]=[],$(this).prop("checked",!1),$(this).removeClass("checked"),e.dynamicTitle&&e.$selectTitle.html(e.dynamicTitleDefault)):($(this).addClass("checked"),e.dynamicTitle&&e.$selectTitle.html($(this).parent().find("[data-label]").text())),e.onSelect(this)}),this.scroll&&(this.$scrollableContent.find(".ps__thumb-y").mousedown(function(){e.$scrollableContent.addClass("ps-mousedown-scroll")}),$(document).mouseup(function(){e.$scrollableContent.hasClass("ps-mousedown-scroll")&&e.$scrollableContent.removeClass("ps-mousedown-scroll")})),this.showSearch&&(this.$searchInput.on("keydown."+W,S(function(){e.searchString=$(this).val().trim(),e.search.call(e)},250)),this.$searchInput.on("focusin."+W,function(){e.$searchContainer.addClass("focused")}),this.$searchInput.on("focusout."+W,function(){e.$searchContainer.removeClass("focused")}),this.$searchContainer.on("click."+W,"[data-clear-search]",function(){e.searchString.length&&(e.$searchInput.val(""),e.searchString="",e.search.call(e))})),this.showFooter&&this.$closeButton.on("click."+W,function(){t.close()}),$(document).on("touchstart click",function(t){e.$el.is(t.target)||e.$el.has(t.target).length||!e.contentOpen||e.preventClose||e.close.call(e)})},o.unbindEvents=function(){this.$el.off("."+W)},o.getData=function(t){return t?this.data[t]:this.data},o.setData=function(){var t=this,e=this.opts.faPro?"fal":"fas";if(this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+e+' fa-check text-green icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.searchApi.length){var o=this.searchApi,i=this.data[this.name].length,n=0;this.data[this.name].forEach(function(t){o+=encodeURIComponent("#"+t),++n!==i&&(o+="+")}),$.ajax({method:"GET",url:o}).done(function(e){var o=e.map(function(t){return t.id=t.id.toString(),t});o=o.filter(function(e){return t.data[t.name].indexOf(e.id)>-1&&-1===t.itemsToExclude.indexOf(parseInt(e.id,10))&&parseInt(e.id,10)>0});var i=$(t._renderItemList(o));$.when(t.$scrollableContent.append(i)).then(function(){if(t.$scrollableContent[0].offsetHeight<t.$scrollableContent[0].scrollHeight?(t.scroll.update(),t.scroll.settings.suppressScrollY=!1,t.$scrollableContent.addClass("ps-show-rail-y")):(t.scroll.update(),t.scroll.settings.suppressScrollY=!0,t.$scrollableContent.removeClass("ps-show-rail-y")),t.$select.find(':input[type="checkbox"]').length?t.type="checkbox":t.$select.find(':input[type="radio"]').length&&(t.type="radio"),"checkbox"==t.type)t.data[t.name].forEach(function(e){var o=t.$select.find(":input").filter(function(){return this.value==e});o.prop("checked",!0),t.onSelect(o[0])});else if("radio"==t.type){var e=t.$select.find(":input").filter(function(){return this.value==t.data[t.name]});e.prop("checked",!0),e.addClass("checked"),t.dynamicTitle&&t.$selectTitle.html(e.parent().find("[data-label]").text()),t.onSelect(e[0])}})})}else if(this.$select.find(':input[type="checkbox"]').length?this.type="checkbox":this.$select.find(':input[type="radio"]').length&&(this.type="radio"),"checkbox"==this.type)this.data[this.name].forEach(function(e){var o=t.$select.find(":input").filter(function(){return this.value==e});o.prop("checked",!0),t.onSelect(o[0])});else if("radio"==this.type){var s=this.$select.find(":input").filter(function(){return this.value==t.data[t.name]});s.prop("checked",!0),s.addClass("checked"),this.dynamicTitle&&this.$selectTitle.html(s.parent().find("[data-label]").text()),this.onSelect(s[0])}},o.search=function(){var t=this,e=this.opts.faPro?"fal":"fas";if(this.searchString.length)if(this.searchApi.length)this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),$.ajax({method:"GET",url:this.searchApi+this.searchString}).done(function(e){var o=e.map(function(t){return t.id=t.id.toString(),t});o=o.filter(function(e){return-1===t.data[t.name].indexOf(e.id)&&-1===t.itemsToExclude.indexOf(parseInt(e.id,10))&&parseInt(e.id,10)>0});var i=$(t._renderItemList(o));$.when(t.$scrollableContent.append(i)).then(function(){var e=t.opts.faPro?"fal":"fas";t.$searchIconContainer.html('<i class="'+e+' fa-times icon"></i>'),t.$searchIconContainer.attr("data-clear-search","true"),t.$scrollableContent[0].offsetHeight<t.$scrollableContent[0].scrollHeight?(t.scroll.update(),t.scroll.settings.suppressScrollY=!1,t.$scrollableContent.addClass("ps-show-rail-y")):(t.scroll.update(),t.scroll.settings.suppressScrollY=!0,t.$scrollableContent.removeClass("ps-show-rail-y"))})});else{var o=this.searchData.filter(function(e){return e.val.toLocaleLowerCase().indexOf(t.searchString.toLocaleLowerCase())>-1});this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),o.forEach(function(e){$(t.$selectItems[e.id]).addClass("visible")}),this.$selectItems.not(".visible").addClass("d-none"),this.$searchIconContainer.html('<i class="'+e+' fa-times icon"></i>'),this.$searchIconContainer.attr("data-clear-search","true")}else this.searchApi.length?(this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),this.$searchIconContainer.html('<i class="'+e+' fa-search icon"></i>'),this.$searchIconContainer.attr("data-clear-search","")):(this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),this.$searchIconContainer.html('<i class="'+e+' fa-search icon"></i>'),this.$searchIconContainer.attr("data-clear-search",""));this.scroll&&this.scroll.update(),this.onUpdate()},o.show=function(){var t=this;if(!this.$el.hasClass("show")){var e=$(".select.show"),o=1,i=this.opts.faPro?"fal":"fas";e.length&&(o=parseInt(e.first().css("z-index"),10)+2),this.$el.css({"max-height":this.scrollContentHeight+this.$selectHeader.outerHeight(!0)+"px"}),this.$el.addClass("show"),e.length||(o=parseInt(this.$el.css("z-index"),10)+1),this.$el.css({"z-index":o}),this.scroll&&this.$scrollableContent.length&&this.$scrollableContent[0].offsetHeight<this.$scrollableContent[0].scrollHeight&&(this.$scrollableContent[0].scrollTop=1,this.$scrollableContent[0].scrollTop=0),this.$selectIconContainer.html('<i class="'+i+' fa-angle-up icon"></i>'),setTimeout(function(){t.$el[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},300),this.contentOpen=!0,this.onShow()}},o.close=function(){if(!this.preventClose){var t=this,e=this.opts.faPro?"fal":"fas";this.$el.css("max-height",""),this.$el.removeClass("show"),setTimeout(function(){t.$el.removeAttr("style")},300),this.data[this.name].length>0&&this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+e+' fa-check text-green icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.contentOpen=!1,this.onClose()}},o.onSelect=function(t){var e=this.opts.onSelect;"function"==typeof e&&e.call(t)},o.appendItems=function(t,e){var o=this;return new Promise(function(e,i){var n=o;if(!$.isArray(t)){var s=[];s.push(t),t=s}(t=t.filter(function(t){return-1===n.itemsToExclude.indexOf(parseInt(t.id,10))})).forEach(function(t){o.items.push(t)});var l=o._renderItemList(t);o.$scrollableContent.prepend(l),o.$selectItems=o.$select.find(".select-item"),o.buildSearchData().then(function(){if(o.$selectItems.length>0)if(o.$select.find(':input[type="checkbox"]').length?o.type="checkbox":o.$select.find(':input[type="radio"]').length&&(o.type="radio"),"checkbox"==o.type)t.forEach(function(t){var e=o.$select.find(":input").filter(function(){return this.value==t.id}),i=parseInt(e.val(),10);e.prop("checked",!0),-1===o.data[o.name].indexOf(i)&&o.data[o.name].push(i),o.onSelect(e[0])});else if("radio"==o.type){var i=t[0],n=o.$select.find(":input").filter(function(){return this.value==i.id}),s=parseInt(n.val(),10);n.prop("checked",!0),n.addClass("checked"),-1===o.data[o.name].indexOf(s)&&(o.data[o.name]=[s]),o.dynamicTitle&&o.$selectTitle.html(n.parent().find("[data-label]").text()),o.$select.find('input[type="radio"]').not(n).prop("checked",!1),o.$select.find('input[type="radio"]').not(n).removeClass("checked"),o.onSelect(n[0])}0==o.data[o.name].length&&o.dynamicTitle&&o.dynamicTitleDefault&&0!==o.dynamicTitleDefault&&0==o.$selectTitle.text().trim()&&(o.$selectItems.length>0||o.searchApi)&&o.$selectTitle.html(o.dynamicTitleDefault),o.$selectHeader.attr("style")&&o.$selectHeader.removeAttr("style"),o.$selectIconContainer.hasClass("d-none")&&o.$selectIconContainer.removeClass("d-none"),e()})})},o.deselectItems=function(t){var e=this;return new Promise(function(o,i){t.forEach(function(t){var o=e.$select.find(":input").filter(function(){return this.value==t});o[0].checked&&o.trigger("click")}),0==e.data[e.name].length&&e.$selectIconContainer.html(e.selectIconDefault)})},o.getItem=function(t,e){var o=$.grep(this.items,function(o){return o[t]==e})[0];return o||null},o.getSelectedItems=function(t){var e=[],o=[],i=this.data[this.name];return $.isArray(i)?e=i:e.push(i),e=e.map(Number),this.items.length>0?(o=$.grep(this.items,function(t){return e.indexOf(parseInt(t.id,10))>-1}),t&&(o=o.map(function(e){return e[t]}).filter(function(t){return null!=t}))):o=e,o},o.getSelectedItem=function(t){var e=[],o=[],i=this.data[this.name];return $.isArray(i)?e=i:e.push(i),e=e.map(Number),this.items.length>0?(o=$.grep(this.items,function(t){return e.indexOf(parseInt(t.id,10))>-1}),t&&(o=o.map(function(e){return e[t]}).filter(function(t){return null!=t}))):o=e,null==o[0]?null:o[0]},o._renderItemList=function(t){for(var e="",o=0;o<t.length;++o){var i=t[o],n="";"function"==typeof this.labelTemplate?n=this.labelTemplate(i):i.name?n=i.name:i.label?n=i.label:i.value&&(n=i.value),e+='\n\n <div class="select-item">\n\n <div class="select-item-'+this.type+'">\n\n <div class="styled-'+this.type+'">\n\n <input type="'+this.type+'" id="select-'+this.name+"-"+t[o].id+'" value="'+t[o].id+'" tabindex="-1">\n\n <label for="select-'+this.name+"-"+t[o].id+'">\n\n <span class="radio-inner">\n <svg viewBox="0 0 18 18">\n <polyline points="1.5 6 4.5 9 10.5 1"></polyline>\n </svg>\n </span>\n\n <span class="'+this.type+'-label"'+("function"!=typeof this.labelTemplate?" data-label":"")+">\n "+n+"\n </span>\n\n </label>\n\n </div>\n\n </div>\n\n </div>\n\n "}return e},o._renderSearch=function(){if(this.showSearch){var t=this.opts.faPro?"fal":"fas";return'\n\n <div class="select-search">\n\n <div class="select-search-input">\n\n <input type="text" name="select-search" value="" placeholder="'+this.searchPlaceholder+'" tabindex="-1">\n\n </div>\n\n <div class="select-search-icon">\n\n <i class="'+t+' fa-search icon"></i>\n\n </div>\n\n </div>\n\n '}return""},o._renderFooter=function(){return this.showFooter?'\n\n <div class="select-footer">\n\n <button class="btn btn-block btn-secondary" type="button" tabindex="-1" data-select-close >\n '+this.btnCloseText+"\n </button>\n\n </div>\n\n ":""},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolSelect");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolSelect",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(P);if("undefined"!=typeof $){var A=$.fn[W];$.fn[W]=X._jQueryInterface,$.fn[W].Constructor=X,$.fn[W].noConflict=function(){return $.fn[W]=A,X._jQueryInterface},$.fn[W].defaults={name:"",type:"checkbox",labelTemplate:null,confirmCheck:null,confirmUncheck:null,setData:null,scrollContentHeight:100,faPro:!1,items:[],showSearch:!1,showFooter:!1,searchApi:!1,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onReset:null,onSearch:null,onSelect:null,buildScroll:null,searchPlaceholder:null,btnCloseText:null,debug:!1,dynamicTitle:!1,dynamicTitleDefault:"",dynamicTitleEmptyDefault:"",allowNoneOnRadioSelect:!0,preventUncheck:!1,showValidStateIcon:!0,itemsToExclude:[]}}var O="coolDropdown",L=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.dropdown?$.extend(!0,i.opts,$.fn[O].defaults,window.Cool.settings.dropdown,o):$.extend(!0,i.opts,$.fn[O].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){var t=this;$.when(this.buildCache()).then(function(){t.buildScroll(),t.bindEvents(),t.onInit()})},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolDropdown"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){var t=this;if(this.$el=$(this.el),this.$el.addClass("dropdown-trigger"),this.$container=this.$el.parent(".dropdown"),this.id="dropdown-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.offset=this.$el.data("offset")?this.$el.data("offset"):this.opts.offset,this.minWidth=this.$el.data("minWidth")?this.$el.data("minWidth"):this.opts.minWidth,this.scroll=this.$el.data("scroll")?this.$el.data("scroll"):this.opts.scroll,this.scrollContentHeight=this.$el.data("scrollContentHeight")?this.$el.data("scrollContentHeight"):this.opts.scrollContentHeight,this.positionObserver=this.$el.attr("data-position-observer")?JSON.parse(this.$el.attr("data-position-observer")):this.opts.positionObserver,this.closeOnItemClick=this.$el.data("closeOnItemClick")?this.$el.data("closeOnItemClick"):this.opts.closeOnItemClick,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content,this.contentOpen=!1,this.$container.hasClass("dropup")?this.placement="top":this.$container.hasClass("dropright")?this.placement="right":this.$container.hasClass("dropbottom")?this.placement="bottom":this.placement="left","function"!=typeof this.content)return this.$dropdown=!!this.$el.next(".dropdown-menu")&&this.$el.next(".dropdown-menu"),this.$dropdown.hasClass("dropdown-menu-right")?this.align="end":this.align="start",this.$scrollableContent=!!this.$dropdown.find(".dropdown-scrollable-content")&&this.$dropdown.find(".dropdown-scrollable-content"),this.$dropdownItem=this.$dropdown.find(".dropdown-item"),this.minWidth&&this.$dropdown.css("min-width",this.minWidth+"px"),this.log(this.$el),this.log(this.$container),this.log(this.$dropdown),this.log(this.$scrollableContent),this.log("Id: "+this.id),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Offset: "+this.offset),this.log("Min width: "+this.minWidth),this.log("Content: "+this.opts.content),this.log("Scroll: "+this.scroll),this.log("Scroll content height: "+this.scrollContentHeight+"px"),!0;var e="end"===this.opts.align?" dropdown-menu-right":"";this.$dropdown=$('\n <div class="dropdown-menu'+e+'" id="'+this.id+'">\n '+this.content+"\n </div>\n "),$.when(this.$el.after(this.$dropdown)).then(function(){return t.$scrollableContent=!!t.$dropdown.find(".dropdown-scrollable-content")&&t.$dropdown.find(".dropdown-scrollable-content"),t.$dropdown.hasClass("dropdown-menu-right")?t.align="end":t.align="start",t.$dropdownItem=t.$dropdown.find(".dropdown-item"),t.minWidth&&t.$dropdown.css("min-width",t.minWidth+"px"),t.log(t.$el),t.log(t.$container),t.log(t.$dropdown),t.log(t.$scrollableContent),t.log("Id: "+t.id),t.log("Animation: "+t.animation),t.log("Animation in: "+t.animationIn),t.log("Animation out: "+t.animationOut),t.log("Animation speed: "+t.animationSpeed),t.log("Offset: "+t.offset),t.log("Min width: "+t.minWidth),t.log("Content: "+t.content),t.log("Scroll: "+t.scroll),t.log("Scroll content height: "+t.scrollContentHeight+"px"),!0})},o.buildScroll=function(){this.opts.scroll&&this.$scrollableContent.length&&(this.$scrollableContent.css({"max-height":this.scrollContentHeight+"px"}),k()?this.$scrollableContent.css({"overflow-y":"auto"}):(this.$scrollableContent.css({"overflow-y":"auto"}),this.scroll=new C(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20}),this.$scrollableContent.addClass("ps-show-rail-y")))},o.bindEvents=function(){var t=this,e=this;this.$el.on("click."+O,function(){t.contentOpen?t.close():t.show()}),this.$dropdownItem.on("click."+O,function(){e.closeOnItemClick&&e.close(),e.onItemClick(this)}),$(document).on("touchstart click",function(e){t.$el.is(e.target)||t.$dropdown.is(e.target)||0!==t.$dropdown.has(e.target).length||!t.contentOpen||t.close()}),$(window).on("resize",S(function(){t.setPosition(),t.onUpdate()},250))},o.unbindEvents=function(){this.$el.off("."+O)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.setPosition=function(t){"undefined"!=typeof str&&null!==str||(t=this.placement);var e=this.$dropdown.outerWidth(!0),o=this.$dropdown.outerHeight(!0),i=this.$el.outerWidth(!0),n=this.$el.outerHeight(!0),s=this.$el.position().left,l=this.$el.position().top,a=0,r=0,h=0,c=0;if("top"===t?(a="end"===this.align?i-e:s,r=l-o):"right"===t?(a=s+i,r=l):"bottom"===t?(a="end"===this.align?i-e:s,r=l+n):"left"===t&&(a=s-e,r=l),this.offset){var d=this.offset.split(",");h=d[0],c=d[1],a+=parseInt(h,10),r+=parseInt(c,10)}if(this.positionObserver&&this.$container.length>0){for(var p=this.$container.parent(),u=0;"hidden"!==p.css("overflow-x")&&"hidden"!==p.css("overflow")&&"body"!==(p.prop("tagName")||"").toLowerCase()&&u<100;){if(!(p=p.parent()).get(0))return;++u}if(!p.get(0))return;var f=p.get(0).getBoundingClientRect(),g=this.$container.get(0).getBoundingClientRect();f.width<e?(this.$dropdown.css("max-width",f.width),e=f.width):this.$dropdown.css("max-width",""),f.height<o?(this.$dropdown.css("max-height",f.height),o=f.height):this.$dropdown.css("max-height","");var m=Math.max(Math.abs(f.y-g.y),0),$=Math.max(Math.abs(f.x-g.x),0),v=p.get(0).scrollWidth-(g.x+g.width),b=p.get(0).scrollHeight-(g.y+("dropbottom"===t?g.height:0));$<e&&a<s&&(a=s,l+n>r&&(r=l+n+(c>0?c:0))),v<e&&a+e>s+i&&(a=s+i-e,l+n>r&&(r=l+n+(c>0?c:0))),r<l&&m<o&&(r=l+n+c),r>=l&&b<o&&(r=a>=s+i||s>=a+e?l-(o-b):l-o-c)}this.$dropdown.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+Math.round(a)+"px, "+Math.round(r)+"px, 0px)","will-change":"transform"}),this.log("Dropdown trigger width: "+i+"px"),this.log("Dropdown trigger height: "+n+"px"),this.log("Dropdown trigger position x: "+s+"px"),this.log("Dropdown trigger position Y: "+l+"px"),this.log("Dropdown width: "+e+"px"),this.log("Dropdown height: "+o+"px"),this.log("Dropdown position x: "+a+"px"),this.log("Dropdown position y: "+r+"px")},o.show=function(){this.$dropdown&&!this.$dropdown.hasClass("show")&&(this.setPosition(),this.animation?(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass(this.animationSpeed),this.$dropdown.animateCss(this.animationIn),this.$dropdown.addClass("show"),this.$dropdown.attr("id",this.id),this.$el.attr("data-dropdown",this.id)):(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass("show"),this.$dropdown.attr("id",this.id),this.$el.attr("data-dropdown",this.id)),this.opts.scroll&&this.scroll&&this.$scrollableContent.length&&(this.$scrollableContent[0].scrollTop=1,this.$scrollableContent[0].scrollTop=0),this.contentOpen=!0,this.onShow())},o.close=function(){var t=this;this.$dropdown&&(this.animation&&!this.$dropdown.hasClass("animated")?this.$dropdown.animateCss(this.animationOut,function(){t.$dropdown.removeClass("show"),t.$el.removeAttr("data-dropdown")}):(this.$dropdown.removeClass("show"),this.$el.removeAttr("data-dropdown")),this.contentOpen=!1,this.onClose())},o.onItemClick=function(t){var e=this.opts.onItemClick;"function"==typeof e&&e.call(t)},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolDropdown");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolDropdown",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(P);if("undefined"!=typeof $){var M=$.fn[O];$.fn[O]=L._jQueryInterface,$.fn[O].Constructor=L,$.fn[O].noConflict=function(){return $.fn[O]=M,L._jQueryInterface},$.fn[O].defaults={animation:!0,animationIn:"zoomIn",animationOut:"zoomOut",animationSpeed:"fastest",offset:null,minWidth:null,align:"start",closeOnItemClick:!0,positionObserver:!0,content:!1,scroll:!0,scrollContentHeight:100,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onItemClick:null,debug:!1}}var R="coolTooltip",_=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.tooltip?$.extend(!0,i.opts,$.fn[R].defaults,window.Cool.settings.tooltip,o):$.extend(!0,i.opts,$.fn[R].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolTooltip"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.id="tooltip-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.placement=this.$el.data("placement")?this.$el.data("placement"):this.opts.placement,this.placementChanged=!1,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content},o.bindEvents=function(){var t=this;this.$el.on("mouseenter."+R,function(){t.show()}),this.$el.on("mouseleave."+R,function(){t.close()}),this.$el.on("destroyed."+R,function(){t.close()}),$(window).on("resize",S(function(){t.$tooltip&&(t.setPosition(),t.onUpdate())},250))},o.unbindEvents=function(){this.$el.off("."+R)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.buildTooltip=function(){this.$tooltip=$('\n\n <div class="tooltip" role="tooltip" id="'+this.id+'">\n\n <div class="arrow"></div>\n\n <div class="tooltip-inner">'+this.content+"</div>\n\n </div>\n\n "),this.$container.append(this.$tooltip),this.$arrow=this.$tooltip.find(".arrow"),this.log(this.$el),this.log(this.$container),this.log(this.$tooltip),this.log(this.$arrow),this.log("Id: "+this.id),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Placement: "+this.placement),this.log("Content: "+this.content)},o.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$tooltip.addClass("tooltip-"+t);var e,o,i,n=this.$container.innerWidth(),s=this.$container.innerHeight(),l=this.$tooltip.outerWidth(!0),a=this.$tooltip.outerHeight(!0),r=this.$el.outerWidth(),h=this.$el.outerHeight(),c=this.$el.offset().left,d=this.$el.offset().top,p=this.$arrow.outerWidth(!0),u=this.$arrow.outerHeight(!0);"top"===t?(o=Math.round(c-(l-r)/2),i=Math.round(d-a),e=Math.round(l/2-p/2),this.$arrow.css({left:e+"px"})):"right"===t?(o=Math.round(c+r),i=Math.round(d-(a-h)/2),e=Math.round(a/2-u/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(o=Math.round(c-(l-r)/2),i=Math.round(d+h),e=Math.round(l/2-p/2),this.$arrow.css({left:e+"px"})):"left"===t&&(o=Math.round(c-l),i=Math.round(d-(a-h)/2),e=Math.round(a/2-u/2),this.$arrow.css({top:e+"px"})),this.$tooltip.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+o+"px, "+i+"px, 0px)","will-change":"transform"});var f=0,g={left:this.$tooltip.position().left,top:this.$tooltip.position().top,right:n-(this.$tooltip.position().left+l),bottom:s-(this.$tooltip.position().top+a)},m={left:!1,top:!1,right:!1,bottom:!1};if(g.right<0&&(m.right=!0,f++,this.log("Tooltip overflowing from right")),g.left<0&&(m.left=!0,f++,this.log("Tooltip overflowing from left")),g.bottom<0&&(m.bottom=!0,f++,this.log("Tooltip overflowing from bottom")),g.top<0&&(m.top=!0,f++,this.log("Tooltip overflowing from top")),f>0){if(!this.placementChanged&&m.left&&g.right>l?(this.log("Changing tooltip placement to right"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("right")):!this.placementChanged&&m.top&&g.top>a?(this.log("Changing tooltip placement to bottom"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")):!this.placementChanged&&m.right&&g.left>l?(this.log("Changing tooltip placement to left"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("left")):!this.placementChanged&&m.bottom&&g.top>a?(this.log("Changing tooltip placement to top"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!m.left&&!m.right?this.fixTooltipPosition=!0:g.top>g.bottom?(this.log("Changing tooltip placement to top"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):(this.log("Changing tooltip placement to bottom"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")),this.fixTooltipPosition){if(this.log("Adjusting tooltip size or position in order to tooltip fit in the container"),m.left){this.log("Tooltip overflowing from left");var $=Math.abs(g.left);c>=o+$&&["top","bottom"].indexOf(t)<0?(this.log("Tooltip adjusting width"),l-=$,o+=$):(this.log("Tooltip adjusting position x"),o+=$,e-=$)}if(m.top){this.log("Tooltip overflowing from top");var v=Math.abs(g.top);this.log("Tooltip adjusting position y"),i+=v,e-=v}if(m.right){this.log("Tooltip overflowing from right");var b=Math.abs(g.right);c<=o-b&&["top","bottom"].indexOf(t)<0?(this.log("Tooltip adjusting width"),l-=b):(this.log("Tooltip adjusting position x"),o-=b,e+=b)}if(m.bottom){this.log("Tooltip overflowing from bottom");var w=Math.abs(g.bottom);this.log("Tooltip adjusting position y"),i-=w,e+=w}"top"===t?this.$arrow.css({left:e+"px"}):"right"===t?this.$arrow.css({top:e+"px"}):"bottom"===t?this.$arrow.css({left:e+"px"}):"left"===t&&this.$arrow.css({top:e+"px"}),this.$tooltip.css({width:l,transform:"translate3d("+o+"px, "+i+"px, 0px)"}),this.fixTooltipPosition=!1,this.log("Tooltip placement changed: "+this.placementChanged),this.log("Tooltip container inner width: "+n+"px"),this.log("Tooltip container inner height: "+s+"px"),this.log("Tooltip trigger width: "+r+"px"),this.log("Tooltip trigger height: "+h+"px"),this.log("Tooltip trigger position x: "+c+"px"),this.log("Tooltip trigger position Y: "+d+"px"),this.log("Tooltip width: "+l+"px"),this.log("Tooltip height: "+a+"px"),this.log("Tooltip position x: "+o+"px"),this.log("Tooltip position y: "+i+"px"),this.log("Tooltip position left: "+g.left+"px"),this.log("Tooltip position top: "+g.top+"px"),this.log("Tooltip position right: "+g.right+"px"),this.log("Tooltip position bottom: "+g.bottom+"px")}}else this.log("Tooltip placement changed: "+this.placementChanged),this.log("Tooltip container inner width: "+n+"px"),this.log("Tooltip container inner height: "+s+"px"),this.log("Tooltip trigger width: "+r+"px"),this.log("Tooltip trigger height: "+h+"px"),this.log("Tooltip trigger position x: "+c+"px"),this.log("Tooltip trigger position Y: "+d+"px"),this.log("Tooltip width: "+l+"px"),this.log("Tooltip height: "+a+"px"),this.log("Tooltip position x: "+o+"px"),this.log("Tooltip position y: "+i+"px"),this.log("Tooltip position left: "+g.left+"px"),this.log("Tooltip position top: "+g.top+"px"),this.log("Tooltip position right: "+g.right+"px"),this.log("Tooltip position bottom: "+g.bottom+"px")},o.show=function(){this.$tooltip||(this.buildTooltip(),this.setPosition(),this.animation?(this.$tooltip.addClass(this.animationSpeed),this.$tooltip.animateCss(this.animationIn),this.$tooltip.addClass("show"),this.$tooltip.attr("id",this.id),this.$el.attr("data-tooltip",this.id)):(this.$tooltip.addClass("show"),this.$tooltip.attr("id",this.id),this.$el.attr("data-tooltip",this.id)),this.onShow())},o.close=function(){var t=this;this.$tooltip&&(this.animation&&!this.$tooltip.hasClass("animated")?this.$tooltip.animateCss(this.animationOut,function(){t.$tooltip.remove(),t.$el.removeAttr("data-tooltip"),t.$tooltip=null,t.placementChanged=!1,t.onClose()}):(this.$tooltip.remove(),this.$el.removeAttr("data-tooltip"),this.$tooltip=null,this.placementChanged=!1,this.onClose()))},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolTooltip");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolTooltip",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(P);if("undefined"!=typeof $){var j=$.fn[R];$.fn[R]=_._jQueryInterface,$.fn[R].Constructor=_,$.fn[R].noConflict=function(){return $.fn[R]=j,_._jQueryInterface},$.fn[R].defaults={container:"body",animation:!1,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",placement:"bottom",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var U="coolSectionTabs",z="plugin_coolSectionTabs",B=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.sectionTabs?$.extend(!0,i.opts,$.fn[U].defaults,window.Cool.settings.sectionTabs,o):$.extend(!0,i.opts,$.fn[U].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.checkForChanges(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData(z),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$dropdownContainer=this.$el.find(".dropdown-container"),this.$dropdownList=this.$el.find(".dropdown-list"),this.tabsCount=this.$el.find("> .tab-item").length,this.tabs=this.$el.find("> .tab-item:visible"),$.each(this.tabs,function(t,e){$(e).data("width",$(e).outerWidth(!0))}),this.log(this.$el),this.log(this.$dropdownContainer),this.log(this.$dropdownList),this.log(this.tabsCount)},o.bindEvents=function(){var t=this;$(window).on("resize",S(function(){t.checkForChanges()},250))},o.unbindEvents=function(){this.$el.off("."+this._name)},o.moveToList=function(t){$(t).insertBefore(this.$dropdownContainer),this.checkForChanges()},o.moveToDropdown=function(t){$(t).appendTo(this.$dropdownList),this.checkForChanges()},o.overflowStatus=function(){return this.$el[0].offsetWidth<this.$el[0].scrollWidth},o.checkForChanges=function(){var t=this.$dropdownList.children(),e=this.$el.find("> .tab-item").not(this.$dropdownContainer),o=this.$el.find("> .tab-item:visible"),i=0;$.each(o,function(t,e){i+=$(e).outerWidth(!0)});var n=this.$el[0].offsetWidth-i;t.length>0?this.$dropdownContainer.hasClass("visible")||this.$dropdownContainer.addClass("visible"):this.$dropdownContainer.hasClass("visible")&&this.$dropdownContainer.removeClass("visible"),1==this.overflowStatus()?e.length>0&&this.moveToDropdown(e.last()):t.length>0&&n>t.last().data("width")&&this.moveToList(t.last())},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data(z);if(o||(o=new e(this,"object"==typeof t&&t),$(this).data(z,o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(P);if("undefined"!=typeof $){var N=$.fn[U];$.fn[U]=B._jQueryInterface,$.fn[U].Constructor=B,$.fn[U].noConflict=function(){return $.fn[U]=N,B._jQueryInterface},$.fn[U].defaults={onInit:null,onUpdate:null,onDestroy:null,debug:!1}}var Q="coolCollapse",F=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.collapse?$.extend(!0,i.opts,$.fn[Q].defaults,window.Cool.settings.dialog,o):$.extend(!0,i.opts,$.fn[Q].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolCollapse"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$target=this.$el.data("target")?$(document).find(this.$el.data("target")):$(document).find(this.opts.target),this.expanded="true"==this.$el.attr("aria-expanded"),this.$target.length?(this.targetHeight=this.$target.height(),this.$container=this.$target.closest(".section-collapse"),this.$indicator=$(document).find('[data-collapse-indicator="'+this.$el.data("target")+'"]')):(this.$target=$(this.$el).parent().find(".collapse"),this.targetHeight=this.$target.height(),this.$container=this.$target.closest(".section-collapse"),this.$indicator=$(this.$el).parent().find("[data-collapse-indicator]")),this.expanded&&this.$target.css("height","auto"),this.log(this.$el),this.log(this.$target),this.log(this.$container),this.log(this.$indicator),this.log("Expanded: "+this.expanded),this.log("Target height: "+this.targetHeight+"px")},o.bindEvents=function(){var t=this;this.$el.on("click."+this.name,function(e){t.expanded?t.close():t.show()}),$(window).on("resize",S(function(){t.$target.length&&(t.targetHeight=t.$target.height(),t.log("Target height: "+t.targetHeight+"px"))},250))},o.unbindEvents=function(){this.$el.off("."+this.name)},o.whichTransitionEvent=function(){var t=document.createElement("text-transition"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",transition:"transitionend"};for(var o in e)if(void 0!==t.style[o])return e[o]},o.show=function(){var t=this;this.targetHeight!==this.$target.height()&&(this.targetHeight=this.$target.height()),this.$target.removeClass("collapse show"),this.$target.addClass("collapsing"),this.$el.is("button")&&this.$el.attr("disabled",!0),this.$container.length&&this.$container.addClass("show"),this.$target.css("height"),this.$target.css("height",this.targetHeight),this.$indicator.length&&this.$indicator.addClass("show"),this.$target.one(this.whichTransitionEvent(),function(){t.$target.removeClass("collapsing"),t.$el.is("button")&&t.$el.attr("disabled",!1),t.$target.removeAttr("style"),t.$target.addClass("collapse show"),t.$el.attr("aria-expanded",!0),t.$target.css("height","auto"),t.expanded=!0}),this.onShow()},o.close=function(){var t=this;this.$target.removeClass("collapse show"),this.$target.addClass("collapsing"),this.$el.is("button")&&this.$el.attr("disabled",!0),this.$container.length&&this.$container.removeClass("show"),this.$target.css("height",this.$target.height()),setTimeout(function(){t.$target.css("height",0)},10),this.$indicator.length&&this.$indicator.hasClass("show")&&this.$indicator.removeClass("show"),this.$target.one(this.whichTransitionEvent(),function(){t.$target.removeClass("collapsing"),t.$el.is("button")&&t.$el.attr("disabled",!1),t.$target.removeAttr("style"),t.$target.addClass("collapse"),t.$el.attr("aria-expanded",!1),t.expanded=!1,t.targetHeight!==t.$target.height()&&(t.targetHeight=t.$target.height())}),this.onClose()},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolCollapse");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolCollapse",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(P);if("undefined"!=typeof $){var K=$.fn[Q];$.fn[Q]=F._jQueryInterface,$.fn[Q].Constructor=F,$.fn[Q].noConflict=function(){return $.fn[Q]=K,F._jQueryInterface},$.fn[Q].defaults={target:null,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var q="coolToast",V=function(){function t(t,e){this.settings={},window.Cool.settings.toast?$.extend(!0,this.settings,$.fn[q].defaults,window.Cool.settings.toast,e):$.extend(!0,this.settings,$.fn[q].defaults,e),this.container=t,this.$container=$(this.container),this.debug=this.settings.debug,this.faPro=this.settings.faPro,this.toasts=[],this.queue=[],this.processingQueue=!1,this.onInitialize=this.settings.onInitialize,this.onDestroy=this.settings.onDestroy}var e=t.prototype;return e.addQueue=function(t){if(this.queue.push(t),!this.processingQueue)return this.processQueue()},e.processQueue=function(){if(this.processingQueue&&this.queue.shift(),this.queue.length)return this.processingQueue=!0,this.show(this.queue[0]);this.processingQueue=!1},e.init=function(t){var e={};$.extend(!0,e,this.settings,t);var o=this.buildToast(e);return this.addQueue(o),this.onInit(o),o},e.destroy=function(){this.$container.removeData("plugin_coolToast"),this.onDestroy()},e.buildToast=function(t){var e={uuid:"toast-"+this.generateUUID(),placement:t.placement,placementX:t.placementX,placementY:t.placementY,offset:t.offset,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,dismiss:t.dismiss,size:t.size,header:t.header,theme:t.theme,title:t.title,content:t.content,template:t.template,maxBodyHeight:t.maxBodyHeight,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return"function"==typeof e.content?e.$el=$(e.template()):e.$el=$(this._renderTemplate(e)),e.$inner=e.$el.find(".toast-inner"),e.$closeBtn=e.$el.find("[data-toast-close]"),this.log(e),this.toasts.push(e),e},e.bindEvents=function(t){var e=this,o=this;t.$el.on("click","[data-toast-close]",function(){t.$el&&o.close(t)}),$(window).on("resize",S(function(){t.$el&&e.setPosition(t)},250))},e.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},e.setPosition=function(t,e,o,i){if("undefined"!=typeof o&&null!==o||(o=t.placementY),"undefined"!=typeof i&&null!==i||(i=t.placementX),i&&o||(e=t.placement),t.offset){var n=t.offset.split(",");parseInt(n[0],10),parseInt(n[1],10)}var s,l,a=t.$el.outerWidth(!0),r=t.$el.outerHeight(!0);e?"top-left"===e?(s=0,l=0,t.offset?(s+=offsetX,l+=offsetY):(s+=30,l+=30)):"top-center"===e?(s=this.$container.width()/2-a/2,l=0,this.log(this.$container.width),t.offset?(s+=offsetX,l+=offsetY):l+=30):"top-right"===e?(s=this.$container.width()-a,l=0,t.offset?(s+=-offsetX,l+=offsetY):(s+=-30,l+=30)):"center-left"===e?(s=0,l=this.$container.height()/2-r/2,t.offset?(s+=offsetX,l+=offsetY):s+=30):"center-center"===e?(s=this.$container.width()/2-a/2,l=this.$container.height()/2-r/2,t.offset&&(s+=offsetX,l+=offsetY)):"center-right"===e?(s=this.$container.width()-a,l=this.$container.height()/2-r/2,t.offset?(s+=-offsetX,l+=offsetY):s+=-30):"bottom-left"===e?(s=0,l=this.$container.height()-r,t.offset?(s+=offsetX,l+=-offsetY):(s+=30,l+=-30)):"bottom-center"===e?(s=this.$container.width()/2-a/2,l=this.$container.height()-r,t.offset?(s+=offsetX,l+=-offsetY):l+=-30):"bottom-right"===e&&(s=this.$container.width()-a,l=this.$container.height()-r,t.offset?(s+=-offsetX,l+=-offsetY):(s+=-30,l+=-30)):(s=i,l=o),t.$el.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+s+"px, "+l+"px, 0px)","will-change":"transform"}),this.log("Toast width: "+a+"px"),this.log("Toast height: "+r+"px"),this.log("Toast position Y: "+s+"px"),this.log("Toast position x: "+l+"px")},e.show=function(t){var e=this;this.$container.append(t.$el),this.bindEvents(t),this.setPosition(t),t.animation?(t.$el.addClass("show"),t.$inner.addClass(t.animationSpeed),t.$inner.animateCss(t.animationIn)):t.$el.addClass("show"),t.dismiss&&setTimeout(function(){e.close(t)},1e3*t.dismiss),this.onShow(t)},e.close=function(t){var e=this;t.animation&&!t.$inner.hasClass("animated")?(t.$el.removeClass("show"),t.$inner.animateCss(t.animationOut,function(){t.$el.remove(),e.toasts=$.grep(e.toasts,function(e){return e.uuid!=t.uuid}),e.processQueue(),e.onClose(t)})):(t.$el.remove(),this.toasts=$.grep(this.toasts,function(e){return e.uuid!=t.uuid}),this.processQueue(),this.onClose(t))},e.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},e.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},e.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},e.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},e.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},e._renderTemplate=function(t){var e,o=this.faPro?"far":"fas",i="",n="",s="";return i="function"==typeof t.content?t.content():t.content,t.header?n='\n <div class="toast-header">\n\n <span>'+t.title+'</span>\n\n <button type="button" data-toast-close>\n <i class="'+o+' fa-times icon"></i>\n </button>\n\n </div>\n ':s='\n <button type="button" data-toast-close>\n\n <i class="'+o+' fa-times icon"></i>\n\n </button>\n ',e='\n <div class="toast-body">\n\n <span>'+i+"</span>\n "+s+"\n\n </div>\n ",'\n <div class="toast toast-'+t.size+" toast-"+t.theme+'" role="alert" id="'+t.uuid+'">\n\n <div class="toast-inner">\n\n '+n+"\n "+e+"\n\n </div>\n\n </div>\n "},t._jQueryInterface=function(e){return this.each(function(){var o=$(this).data("plugin_coolToast");if(o||(o=new t(this,"object"==typeof e&&e),$(this).data("plugin_coolToast",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}})},t}();if("undefined"!=typeof $){var G,J=$.fn[q];$.fn[q]=V._jQueryInterface,$.fn[q].Constructor=V,$.fn[q].noConflict=function(){return $.fn[q]=J,V._jQueryInterface},$.fn[q].defaults=((G={title:"",content:"",template:"",theme:"dark",placement:"bottom-center",placementX:null,placementY:null,animation:!0,animationIn:"slideInUp",animationOut:"slideOutDown",animationSpeed:"faster",offset:null,size:null,dismiss:3,header:!1,faPro:!1,debug:!1,onInitialize:null,onDestroy:null,onInit:null}).onDestroy=null,G.onShow=null,G.onClose=null,G)}var Z="coolDialog",tt=function(){function t(t,e){this.settings={},window.Cool.settings.dialog?$.extend(!0,this.settings,$.fn[Z].defaults,window.Cool.settings.dialog,e):$.extend(!0,this.settings,$.fn[Z].defaults,e),this.container=t,this.$container=$(this.container),this.debug=this.settings.debug,this.faPro=this.settings.faPro,this.dialogs=[],this.onInitialize=this.settings.onInitialize,this.onDestroy=this.settings.onDestroy}var e=t.prototype;return e.init=function(t){var e={};$.extend(!0,e,this.settings,t);var o=this.buildDialog(e);return this.show(o),this.bindEvents(o),this.onInit(o),o},e.destroy=function(){this.$container.removeData("plugin_coolDialog"),this.onDestroy()},e.buildDialog=function(t){var e=this,o={uuid:"dialog-"+this.generateUUID(),title:t.title,template:t.template,body:t.body,footer:t.footer,size:t.size,classes:t.classes,centered:t.centered,backdrop:t.backdrop,preventScroll:t.preventScroll,closeBtn:t.closeBtn,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,callbacks:t.callbacks,maxBodyHeight:t.maxBodyHeight,overflowVisible:t.overflowVisible,actions:t.actions,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return null==o.maxBodyHeight&&(o.maxBodyHeight=window.innerHeight-200),"function"==typeof o.template?o.$el=$(o.template()):o.$el=$(this._renderTemplate(o)),o.show=function(){e.show(o)},o.close=function(){e.close(o)},this.log(o),this.dialogs.push(o),o},e.bindEvents=function(t){var e=this;t.$el.on("click","[data-dialog-close]",function(o){t.$el.trigger("dialog.close"),"function"==typeof t.callbacks.close?t.callbacks.close.call(e,function(){e.close(t)},t):e.close(t)}),t.$el.on("click","[data-dialog-remove]",function(o){t.$el.trigger("dialog.remove"),"function"==typeof t.callbacks.remove&&t.callbacks.remove.call(e,function(){e.close(t)},t)}),t.$el.on("click","[data-dialog-confirm]",S(function(o){t.$el.trigger("dialog.close"),"function"==typeof t.callbacks.confirm?t.callbacks.confirm.call(e,function(){e.close(t)},t):e.close(t)}))},e.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},e.show=function(t){var e=this;if(this.$container.hasClass("has-dialogs")||this.$container.addClass("has-dialogs"),t.preventScroll&&!this.$container.hasClass("dialog-prevent-scroll")&&this.$container.addClass("dialog-prevent-scroll"),this.dialogs.length>1){var o=$(this.dialogs).eq(-2)[0].$el,i=parseInt(o.css("z-index"),10)+1;t.$el.css("z-index",i),o.css({transition:"opacity 0.3s",opacity:0,visibility:"visible"})}if(t.backdrop&&$(".dialog-backdrop").length<1){this.$container.append('<div class="dialog-backdrop"></div>');var n=setInterval(function(){0==e.dialogs.length&&$(".dialog-backdrop").length&&($(".dialog-backdrop").remove(),clearInterval(n))},100)}this.$container.append(t.$el),t.animation&&t.$el.find(".dialog-content").addClass(t.animationSpeed).animateCss(t.animationIn),this.onShow(t)},e.close=function(t){var e=this,o=null;this.dialogs.length>1&&(o=$(this.dialogs).eq(-2)[0].$el),0===$('.dialog[data-dialog-backdrop="true"]').length&&$(".dialog-backdrop").length&&$(".dialog-backdrop").remove(),t.animation?t.$el.find(".dialog-content").animateCss(t.animationOut,function(){t.$el.remove(),e.dialogs=$.grep(e.dialogs,function(e){return e.uuid!=t.uuid}),0==e.dialogs.length?(e.$container.removeClass("has-dialogs"),e.$container.hasClass("dialog-prevent-scroll")&&e.$container.removeClass("dialog-prevent-scroll")):o&&o.css("opacity",1)}):(t.$el.remove(),this.dialogs=$.grep(this.dialogs,function(e){return e.uuid!=t.uuid}),0==this.dialogs.length?(this.$container.removeClass("has-dialogs"),this.$container.hasClass("dialog-prevent-scroll")&&this.$container.removeClass("dialog-prevent-scroll")):o&&o.css("opacity",1)),this.onClose(t)},e.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},e.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},e.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},e.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},e.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},e._renderFooter=function(t){var e="";if("function"==typeof t.footer)e=t.footer();else if(""!==t.footer&&!1!==t.footer&&!0!==t.footer)e=t.footer;else{if(!0!==t.footer)return e;var o="",i="",n="";t.actions.close.visible&&(o='\n <button type="button" class="btn '+(t.actions.close.primary?"btn-primary":"btn-secondary")+(t.actions.close.classes?" "+t.actions.close.classes:"")+'"'+(t.actions.close.attrs?" "+t.actions.close.attrs:"")+" data-dialog-close>\n "+t.actions.close.content+"\n </button>\n "),t.actions.remove.visible&&(i='\n <button type="button" class="btn '+(t.actions.remove.primary?"btn-primary":"btn-secondary")+(t.actions.remove.classes?" "+t.actions.remove.classes:"")+'"'+(t.actions.remove.attrs?" "+t.actions.remove.attrs:"")+" data-dialog-remove>\n "+t.actions.remove.content+"\n </button>\n "),t.actions.confirm.visible&&(n='\n <button type="button" class="btn '+(t.actions.confirm.primary?"btn-primary":"btn-secondary")+(t.actions.confirm.classes?" "+t.actions.confirm.classes:"")+'"'+(t.actions.confirm.attrs?" "+t.actions.confirm.attrs:"")+" data-dialog-confirm>\n "+t.actions.confirm.content+"\n </button>\n "),e="\n "+o+"\n "+i+"\n "+n+"\n "}if(e)return'\n <div class="dialog-footer">\n '+e+"\n </div>\n "},e._renderTemplate=function(t){var e=this.faPro?"far":"fas",o=t.classes?" "+t.classes:"",i=t.centered?" dialog-centered":"",n=t.size?" dialog-"+t.size:"",s=t.overflowVisible?" dialog-overflow-visible":"",l=' data-dialog-uuid="'+t.uuid+'"',a=t.backdrop?' data-dialog-backdrop="true"':' data-dialog-backdrop="false"',r=t.title,h=t.closeBtn?'<button type="button" data-dialog-close><i class="'+e+' fa-times icon"></i></button>':"",c=t.maxBodyHeight?' style="max-height: '+t.maxBodyHeight+'px"':"",d=this._renderFooter(t);return'\n <div class="dialog'+o+i+n+s+'"'+l+a+'>\n\n <div class="dialog-container">\n\n <div class="dialog-content">\n\n <div class="dialog-header">\n\n <span class="dialog-title">\n '+r+"\n </span>\n\n "+h+'\n\n </div>\n\n <div class="dialog-body"'+c+">\n\n "+("function"==typeof t.body?t.body():t.body)+"\n\n </div>\n\n "+d+"\n\n </div>\n\n </div>\n\n </div>\n "},t._jQueryInterface=function(e){var o=$(this).data("plugin_coolDialog");if(o||(o=new t(this,"object"==typeof e&&e),$(this).data("plugin_coolDialog",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}},t}();if("undefined"!=typeof $){var et,ot=$.fn[Z];$.fn[Z]=tt._jQueryInterface,$.fn[Z].Constructor=tt,$.fn[Z].noConflict=function(){return $.fn[Z]=ot,tt._jQueryInterface},$.fn[Z].defaults=((et={title:"",template:"",body:"",footer:!0,size:"",classes:"",centered:!0,backdrop:!0,preventScroll:!0,closeBtn:!0,animation:!0,animationIn:"zoomIn",animationOut:"fadeOut",animationSpeed:"fastest",callbacks:{},maxBodyHeight:null,overflowVisible:!1,faPro:!1,debug:!0,onInitialize:null,onDestroy:null,onInit:null}).onDestroy=null,et.onShow=null,et.onClose=null,et.actions={close:{primary:!1,visible:!0,content:"Close",classes:"",attrs:""},remove:{primary:!1,visible:!0,content:"Remove",classes:"",attrs:""},confirm:{primary:!0,visible:!0,content:"Confirm",classes:"",attrs:""}},et)}return{Common:T,Popover:H,Select:X,Dropdown:L,Tooltip:_,SectionTabs:B,Collapse:F,Toast:V,Dialog:tt}});
|
|
11
|
+
*/function t(t){return getComputedStyle(t)}function e(t,e){for(var o in e){var i=e[o];"number"==typeof i&&(i+="px"),t.style[o]=i}return t}function o(t){var e=document.createElement("div");return e.className=t,e}var i="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function n(t,e){if(!i)throw new Error("No element matching method supported");return i.call(t,e)}function s(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function a(t,e){return Array.prototype.filter.call(t.children,function(t){return n(t,e)})}var l={main:"ps",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},r={x:null,y:null};function h(t,e){var o=t.element.classList,i=l.state.scrolling(e);o.contains(i)?clearTimeout(r[e]):o.add(i)}function c(t,e){r[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(l.state.scrolling(e))},t.settings.scrollingThreshold)}var d=function(t){this.element=t,this.handlers={}},p={isEmpty:{configurable:!0}};d.prototype.bind=function(t,e){"undefined"==typeof this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},d.prototype.unbind=function(t,e){var o=this;this.handlers[t]=this.handlers[t].filter(function(i){return!(!e||i===e)||(o.element.removeEventListener(t,i,!1),!1)})},d.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},p.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(d.prototype,p);var u=function(){this.eventElements=[]};function f(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}u.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new d(t),this.eventElements.push(e)),e},u.prototype.bind=function(t,e,o){this.eventElement(t).bind(e,o)},u.prototype.unbind=function(t,e,o){var i=this.eventElement(t);i.unbind(e,o),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},u.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},u.prototype.once=function(t,e,o){var i=this.eventElement(t);i.bind(e,function t(n){i.unbind(e,t),o(n)})};var g=function(t,e,o,i,n){var s;if(void 0===i&&(i=!0),void 0===n&&(n=!1),"top"===e)s=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");s=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,o,i,n){var s=o[0],a=o[1],l=o[2],r=o[3],d=o[4],p=o[5];void 0===i&&(i=!0);void 0===n&&(n=!1);var u=t.element;t.reach[r]=null,u[l]<1&&(t.reach[r]="start");u[l]>t[s]-t[a]-1&&(t.reach[r]="end");e&&(u.dispatchEvent(f("ps-scroll-"+r)),e<0?u.dispatchEvent(f("ps-scroll-"+d)):e>0&&u.dispatchEvent(f("ps-scroll-"+p)),i&&function(t,e){h(t,e),c(t,e)}(t,r));t.reach[r]&&(e||n)&&u.dispatchEvent(f("ps-"+r+"-reach-"+t.reach[r]))}(t,o,s,i,n)};function m(t){return parseInt(t,10)||0}var v={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},b=function(t){var o=t.element,i=Math.floor(o.scrollTop);t.containerWidth=o.clientWidth,t.containerHeight=o.clientHeight,t.contentWidth=o.scrollWidth,t.contentHeight=o.scrollHeight,o.contains(t.scrollbarXRail)||(a(o,l.element.rail("x")).forEach(function(t){return s(t)}),o.appendChild(t.scrollbarXRail)),o.contains(t.scrollbarYRail)||(a(o,l.element.rail("y")).forEach(function(t){return s(t)}),o.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=w(t,m(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=m((t.negativeScrollAdjustment+o.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=w(t,m(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=m(i*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,o){var i={width:o.railXWidth},n=Math.floor(t.scrollTop);o.isRtl?i.left=o.negativeScrollAdjustment+t.scrollLeft+o.containerWidth-o.contentWidth:i.left=t.scrollLeft;o.isScrollbarXUsingBottom?i.bottom=o.scrollbarXBottom-n:i.top=o.scrollbarXTop+n;e(o.scrollbarXRail,i);var s={top:n,height:o.railYHeight};o.isScrollbarYUsingRight?o.isRtl?s.right=o.contentWidth-(o.negativeScrollAdjustment+t.scrollLeft)-o.scrollbarYRight-o.scrollbarYOuterWidth:s.right=o.scrollbarYRight-t.scrollLeft:o.isRtl?s.left=o.negativeScrollAdjustment+t.scrollLeft+2*o.containerWidth-o.contentWidth-o.scrollbarYLeft-o.scrollbarYOuterWidth:s.left=o.scrollbarYLeft+t.scrollLeft;e(o.scrollbarYRail,s),e(o.scrollbarX,{left:o.scrollbarXLeft,width:o.scrollbarXWidth-o.railBorderXWidth}),e(o.scrollbarY,{top:o.scrollbarYTop,height:o.scrollbarYHeight-o.railBorderYWidth})}(o,t),t.scrollbarXActive?o.classList.add(l.state.active("x")):(o.classList.remove(l.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,o.scrollLeft=0),t.scrollbarYActive?o.classList.add(l.state.active("y")):(o.classList.remove(l.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,o.scrollTop=0)};function w(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function x(t,e){var o=e[0],i=e[1],n=e[2],s=e[3],a=e[4],r=e[5],d=e[6],p=e[7],u=e[8],f=t.element,g=null,m=null,$=null;function v(e){f[d]=g+$*(e[n]-m),h(t,p),b(t),e.stopPropagation(),e.preventDefault()}function w(){c(t,p),t[u].classList.remove(l.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",v)}t.event.bind(t[a],"mousedown",function(e){g=f[d],m=e[n],$=(t[i]-t[o])/(t[s]-t[r]),t.event.bind(t.ownerDocument,"mousemove",v),t.event.once(t.ownerDocument,"mouseup",w),t[u].classList.add(l.state.clicking),e.stopPropagation(),e.preventDefault()})}var y={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var o=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=o*t.containerHeight,b(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var o=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=o*t.containerWidth,b(t),e.stopPropagation()})},"drag-thumb":function(t){x(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),x(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(o){if(!(o.isDefaultPrevented&&o.isDefaultPrevented()||o.defaultPrevented)&&(n(e,":hover")||n(t.scrollbarX,":focus")||n(t.scrollbarY,":focus"))){var i,s=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(s){if("IFRAME"===s.tagName)s=s.contentDocument.activeElement;else for(;s.shadowRoot;)s=s.shadowRoot.activeElement;if(n(i=s,"input,[contenteditable]")||n(i,"select,[contenteditable]")||n(i,"textarea,[contenteditable]")||n(i,"button,[contenteditable]"))return}var a=0,l=0;switch(o.which){case 37:a=o.metaKey?-t.contentWidth:o.altKey?-t.containerWidth:-30;break;case 38:l=o.metaKey?t.contentHeight:o.altKey?t.containerHeight:30;break;case 39:a=o.metaKey?t.contentWidth:o.altKey?t.containerWidth:30;break;case 40:l=o.metaKey?-t.contentHeight:o.altKey?-t.containerHeight:-30;break;case 32:l=o.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:l=t.containerHeight;break;case 34:l=-t.containerHeight;break;case 36:l=t.contentHeight;break;case 35:l=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==a||t.settings.suppressScrollY&&0!==l||(e.scrollTop-=l,e.scrollLeft+=a,b(t),function(o,i){var n=Math.floor(e.scrollTop);if(0===o){if(!t.scrollbarYActive)return!1;if(0===n&&i>0||n>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var s=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===s&&o<0||s>=t.contentWidth-t.containerWidth&&o>0)return!t.settings.wheelPropagation}return!0}(a,l)&&o.preventDefault())}})},wheel:function(e){var o=e.element;function i(i){var n=function(t){var e=t.deltaX,o=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof o||(e=-1*t.wheelDeltaX/6,o=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,o*=10),e!=e&&o!=o&&(e=0,o=t.wheelDelta),t.shiftKey?[-o,-e]:[e,o]}(i),s=n[0],a=n[1];if(!function(e,i,n){if(!v.isWebKit&&o.querySelector("select:focus"))return!0;if(!o.contains(e))return!1;for(var s=e;s&&s!==o;){if(s.classList.contains(l.element.consuming))return!0;var a=t(s);if([a.overflow,a.overflowX,a.overflowY].join("").match(/(scroll|auto)/)){var r=s.scrollHeight-s.clientHeight;if(r>0&&!(0===s.scrollTop&&n>0||s.scrollTop===r&&n<0))return!0;var h=s.scrollWidth-s.clientWidth;if(h>0&&!(0===s.scrollLeft&&i<0||s.scrollLeft===h&&i>0))return!0}s=s.parentNode}return!1}(i.target,s,a)){var r=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(a?o.scrollTop-=a*e.settings.wheelSpeed:o.scrollTop+=s*e.settings.wheelSpeed,r=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(s?o.scrollLeft+=s*e.settings.wheelSpeed:o.scrollLeft-=a*e.settings.wheelSpeed,r=!0):(o.scrollTop-=a*e.settings.wheelSpeed,o.scrollLeft+=s*e.settings.wheelSpeed),b(e),(r=r||function(t,i){var n=Math.floor(o.scrollTop),s=0===o.scrollTop,a=n+o.offsetHeight===o.scrollHeight,l=0===o.scrollLeft,r=o.scrollLeft+o.offsetWidth===o.scrollWidth;return!(Math.abs(i)>Math.abs(t)?s||a:l||r)||!e.settings.wheelPropagation}(s,a))&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault())}}"undefined"!=typeof window.onwheel?e.event.bind(o,"wheel",i):"undefined"!=typeof window.onmousewheel&&e.event.bind(o,"mousewheel",i)},touch:function(e){if(v.supportsTouch||v.supportsIePointer){var o=e.element,i={},n=0,s={},a=null;v.supportsTouch?(e.event.bind(o,"touchstart",d),e.event.bind(o,"touchmove",p),e.event.bind(o,"touchend",u)):v.supportsIePointer&&(window.PointerEvent?(e.event.bind(o,"pointerdown",d),e.event.bind(o,"pointermove",p),e.event.bind(o,"pointerup",u)):window.MSPointerEvent&&(e.event.bind(o,"MSPointerDown",d),e.event.bind(o,"MSPointerMove",p),e.event.bind(o,"MSPointerUp",u)))}function r(t,i){o.scrollTop-=i,o.scrollLeft-=t,b(e)}function h(t){return t.targetTouches?t.targetTouches[0]:t}function c(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function d(t){if(c(t)){var e=h(t);i.pageX=e.pageX,i.pageY=e.pageY,n=(new Date).getTime(),null!==a&&clearInterval(a)}}function p(a){if(c(a)){var d=h(a),p={pageX:d.pageX,pageY:d.pageY},u=p.pageX-i.pageX,f=p.pageY-i.pageY;if(function(e,i,n){if(!o.contains(e))return!1;for(var s=e;s&&s!==o;){if(s.classList.contains(l.element.consuming))return!0;var a=t(s);if([a.overflow,a.overflowX,a.overflowY].join("").match(/(scroll|auto)/)){var r=s.scrollHeight-s.clientHeight;if(r>0&&!(0===s.scrollTop&&n>0||s.scrollTop===r&&n<0))return!0;var h=s.scrollLeft-s.clientWidth;if(h>0&&!(0===s.scrollLeft&&i<0||s.scrollLeft===h&&i>0))return!0}s=s.parentNode}return!1}(a.target,u,f))return;r(u,f),i=p;var g=(new Date).getTime(),m=g-n;m>0&&(s.x=u/m,s.y=f/m,n=g),function(t,i){var n=Math.floor(o.scrollTop),s=o.scrollLeft,a=Math.abs(t),l=Math.abs(i);if(l>a){if(i<0&&n===e.contentHeight-e.containerHeight||i>0&&0===n)return 0===window.scrollY&&i>0&&v.isChrome}else if(a>l&&(t<0&&s===e.contentWidth-e.containerWidth||t>0&&0===s))return!0;return!0}(u,f)&&a.preventDefault()}}function u(){e.settings.swipeEasing&&(clearInterval(a),a=setInterval(function(){e.isInitialized?clearInterval(a):s.x||s.y?Math.abs(s.x)<.01&&Math.abs(s.y)<.01?clearInterval(a):(r(30*s.x,30*s.y),s.x*=.8,s.y*=.8):clearInterval(a)},10))}}},C=function(i,n){var s=this;if(void 0===n&&(n={}),"string"==typeof i&&(i=document.querySelector(i)),!i||!i.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var a in this.element=i,i.classList.add(l.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},n)s.settings[a]=n[a];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var r,h,c=function(){return i.classList.add(l.state.focus)},d=function(){return i.classList.remove(l.state.focus)};this.isRtl="rtl"===t(i).direction,this.isNegativeScroll=(h=i.scrollLeft,i.scrollLeft=-1,r=i.scrollLeft<0,i.scrollLeft=h,r),this.negativeScrollAdjustment=this.isNegativeScroll?i.scrollWidth-i.clientWidth:0,this.event=new u,this.ownerDocument=i.ownerDocument||document,this.scrollbarXRail=o(l.element.rail("x")),i.appendChild(this.scrollbarXRail),this.scrollbarX=o(l.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",c),this.event.bind(this.scrollbarX,"blur",d),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var p=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(p.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=m(p.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=m(p.borderLeftWidth)+m(p.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=m(p.marginLeft)+m(p.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=o(l.element.rail("y")),i.appendChild(this.scrollbarYRail),this.scrollbarY=o(l.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",c),this.event.bind(this.scrollbarY,"blur",d),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var f=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(f.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=m(f.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var o=t(e);return m(o.width)+m(o.paddingLeft)+m(o.paddingRight)+m(o.borderLeftWidth)+m(o.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=m(f.borderTopWidth)+m(f.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=m(f.marginTop)+m(f.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:i.scrollLeft<=0?"start":i.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:i.scrollTop<=0?"start":i.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return y[t](s)}),this.lastScrollTop=Math.floor(i.scrollTop),this.lastScrollLeft=i.scrollLeft,this.event.bind(this.element,"scroll",function(t){return s.onScroll(t)}),b(this)};C.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,e(this.scrollbarXRail,{display:"block"}),e(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=m(t(this.scrollbarXRail).marginLeft)+m(t(this.scrollbarXRail).marginRight),this.railYMarginHeight=m(t(this.scrollbarYRail).marginTop)+m(t(this.scrollbarYRail).marginBottom),e(this.scrollbarXRail,{display:"none"}),e(this.scrollbarYRail,{display:"none"}),b(this),g(this,"top",0,!1,!0),g(this,"left",0,!1,!0),e(this.scrollbarXRail,{display:""}),e(this.scrollbarYRail,{display:""}))},C.prototype.onScroll=function(t){this.isAlive&&(b(this),g(this,"top",this.element.scrollTop-this.lastScrollTop),g(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},C.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),s(this.scrollbarX),s(this.scrollbarY),s(this.scrollbarXRail),s(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},C.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},$.fn.extend({animateCss:function(t,e){var o="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";this.addClass("animated "+t).one(o,function(o){$(this).removeClass("animated "+t),e&&e()}).children().on(o,function(t){t.stopPropagation()})}}),window.Cool=window.Cool||{},window.Cool.settings=window.Cool.settings||{};var T=function(){function t(){}return t.initialize=function(t){t=t||{},window.Cool.settings=t,$('[data-toggle="popover"]').coolPopover(t.popover),$('[data-toggle="select"]').coolSelect(t.select),$('[data-toggle="dropdown"]').coolDropdown(t.dropdown),$('[data-toggle="tooltip"]').coolTooltip(t.tooltip),$('[data-toggle="collapse"]').coolCollapse(t.collapse),$('[data-toggle="section-tabs"]').coolSectionTabs(t.sectionTabs),$("body").coolToast(t.toast),$("body").coolDialog(t.dialog),$("html").addClass("dom-ready"),$(document).on("focus",".form-control",function(){if(!$(this).hasClass("disabled")&&$(this).not(":disabled")&&!$(this).attr("readonly")){var t=$(this).closest(".input-group");t.hasClass("input-group-focus")||t.addClass("input-group-focus")}}),$(document).on("blur",".form-control",function(){if(!$(this).hasClass("disabled")&&$(this).not(":disabled")&&!$(this).attr("readonly")){var t=$(this).closest(".input-group");t.hasClass("input-group-focus")&&t.removeClass("input-group-focus")}}),$(".form-label-group").each(function(t,e){$(e).find("input").on("blur input change",function(){$(this).val()?$(e).addClass("label-on-top"):$(e).removeClass("label-on-top")}).trigger("change")}),$.each($(".table"),function(){$(this).find("[data-table-link], [data-table-btn]").length&&!$(this).hasClass("table-hover")&&$(this).addClass("table-hover")}),$(document).on("click","[data-table-link]",function(t){var e=$(this).parents("table, .table"),o=$(this).data("tableLink"),i=$(t.target),n=!1;$.each(["input","button","a","label","td.col-select"],function(t){(i.is(t)||"a"==t&&i.parent().is(t))&&(n=!0)}),e.hasClass("bulk-actions-active")&&(n=!0),i.hasClass("table-link-exclude")&&(n=!0),i.is("td, .td, img")&&!n&&(t.ctrlKey||t.metaKey?window.open(o,"_blank"):window.location.href=o)}),$(document).on("click","[data-table-btn]",function(t){var e=$(this).parents("table, .table"),o=$(this),i=$(this).data("tableButton"),n=$(t.target),s=!1;(i||(i=o.find("button")[0]))&&($.each(["input","button","a","label","td.col-select"],function(t){(n.is(t)||"a"==t&&n.parent().is(t))&&(s=!0)}),e.hasClass("bulk-actions-active")&&(s=!0),n.hasClass("table-btn-exclude")&&(s=!0),n.is("td, .td, img")&&!s&&$(i).click())}),$(document).on("click",".btn-group-toggle .btn > input",function(t){t.stopPropagation()}),$(document).on("click",".btn-group-toggle .btn",function(){$(this).find("input").trigger("click"),$(this).parent().find("input").trigger("change")}),$(document).on("change",".btn-group-toggle .btn > input",function(){$(this).is(":checked")?$(this).parent().addClass("active"):$(this).parent().removeClass("active")}),$("select").on("change",function(){$(this).blur()}),$(".tab-toggler").on("click",function(t){t.stopPropagation(),$(this).parent().toggleClass("open")}),$(document).on("click",function(){$(".tabs-container").removeClass("open")}),$(".sidebar-left-toggler").on("click",function(t){t.stopPropagation(),$(this).toggleClass("open"),$("body").toggleClass("sidebar-left-open")}),$(".sidebar-right-toggler").on("click",function(t){t.stopPropagation(),$(this).toggleClass("open"),$("body").toggleClass("sidebar-right-open")}),$(".sidebar-content .ps__thumb-y").mousedown(function(){$(this).parent().parent().addClass("ps-mousedown-scroll")}),$(document).mouseup(function(){$(".sidebar-content").hasClass("ps-mousedown-scroll")&&$(".sidebar-content").removeClass("ps-mousedown-scroll")});var e=$(".sidebar-left").find(".sidebar-content");if(e.length){var o=new C(e[0],{wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0});e.find('[data-toggle="collapse"]').on("click",function(){setTimeout(function(){o.update()},300)})}var i=$(document).find(".sidebar-tab");i.length&&($.each(i,function(t,e){var o=$(e).find(".tab-content");new C(o[0],{wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0})}),$('[name="sidebar-tab-select"]').on("click",function(){var t=$(this).val(),e=$("#sidebar-tab-"+t);i.not(e).removeClass("active"),e.addClass("active"),$('[name="sidebar-tab-select"]').not($(this)).removeClass("active"),$(this).addClass("active"),e[0]==i.first()[0]?i.not(e).find(".tab-content").css({transform:"translate3d(100%, 0px, 0px)"}):e[0]==i.last()[0]?i.not(e).find(".tab-content").css({transform:"translate3d(-100%, 0px, 0px)"}):(i.first().not(e).find(".tab-content").css({transform:"translate3d(-100%, 0px, 0px)"}),i.last().not(e).find(".tab-content").css({transform:"translate3d(100%, 0px, 0px)"})),e.find(".tab-content").css({transform:"none"})}))},t}();function S(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}window.Cool.initialize=T.initialize;var I=function(t,e,o){var i;return function(){var n=this,s=arguments,a=o&&!i;clearTimeout(i),i=setTimeout(function(){i=null,o||t.apply(n,s)},e),a&&t.apply(n,s)}},k=function(){var t=!1;return("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(t=!0),t};$.event.special.destroyed={remove:function(t){t.handler&&t.handler()}};var D=function(){function t(){}var e=t.prototype;return e.onInit=function(){var t=this.opts.onInit;"function"==typeof t&&t.call(this)},e.onUpdate=function(){var t=this.opts.onUpdate;"function"==typeof t&&t.call(this)},e.onDestroy=function(){var t=this.opts.onDestroy;"function"==typeof t&&t.call(this)},e.onShow=function(){var t=this.opts.onShow;"function"==typeof t&&t.call(this)},e.onClose=function(){var t=this.opts.onClose;"function"==typeof t&&t.call(this)},e.onReset=function(){var t=this.opts.onReset;"function"==typeof t&&t.call(this)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},t}(),P="coolPopover",E="plugin_coolPopover",H=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.popover?$.extend(!0,i.opts,$.fn[P].defaults,window.Cool.settings.popover,o):$.extend(!0,i.opts,$.fn[P].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}S(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData(E),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.containerAutoDetect=this.$el.data("containerAutoDetect")?this.$el.data("containerAutoDetect"):this.opts.containerAutoDetect,this.id="popover-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.trigger=this.$el.data("trigger")?this.$el.data("trigger"):this.opts.trigger,this.placement=this.$el.data("placement")?this.$el.data("placement"):this.opts.placement,this.placementChanged=!1,this.title=this.$el.data("title")?this.$el.data("title"):this.opts.title,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content,this.containerAutoDetect&&(this.$container=this.$el.offsetParent())},o.bindEvents=function(){var t=this;"click"===this.trigger?this.$el.on("click."+P,function(){t.$popover?t.close():t.show()}):"hover"===this.trigger?(this.$el.on("mouseenter."+P,function(){t.show()}),this.$el.on("mouseleave."+P,function(){t.close()})):"focus"===this.trigger&&(this.$el.on("focusin."+P,function(){t.show()}),this.$el.on("focusout."+P,function(){t.close()})),$(window).on("resize",I(function(){t.$popover&&(t.setPosition(),t.onUpdate())},250))},o.unbindEvents=function(){this.$el.off("."+P)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.buildPopover=function(){var t;t="function"==typeof this.content?this.content():this.content,this.$popover=$('\n \t\t<div class="popover" role="tooltip" id="'+this.id+'">\n\n\t\t\t <div class="arrow"></div>\n\n\t\t\t <h3 class="popover-header">'+this.title+'</h3>\n\n\t\t\t <div class="popover-body">'+t+"</div>\n\n\t\t\t</div>\n \t"),this.$container.append(this.$popover),this.$arrow=!!this.$popover.find(".arrow")&&this.$popover.find(".arrow"),this.log(this.$el),this.log(this.$container),this.log(this.$popover),this.log(this.$arrow),this.log("Id: "+this.id),this.log("Trigger: "+this.trigger),this.log("Placement: "+this.placement),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Title: "+this.title),this.log("Content: "+this.content)},o.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$popover.addClass("popover-"+t);var e,o,i,n=this.$container.innerWidth(),s=this.$container.innerHeight(),a=this.$popover.outerWidth(!0),l=this.$popover.outerHeight(!0),r=this.$el.outerWidth(),h=this.$el.outerHeight(),c=this.$el.position().left,d=this.$el.position().top,p=this.$arrow.outerWidth(!0),u=this.$arrow.outerHeight(!0);"top"===t?(o=Math.round(c-(a-r)/2),i=Math.round(d-l),e=Math.round(a/2-p/2),this.$arrow.css({left:e+"px"})):"right"===t?(o=Math.round(c+r),i=Math.round(d-(l-h)/2),e=Math.round(l/2-u/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(o=Math.round(c-(a-r)/2),i=Math.round(d+h),e=Math.round(a/2-p/2),this.$arrow.css({left:e+"px"})):"left"===t&&(o=Math.round(c-a),i=Math.round(d-(l-h)/2),e=Math.round(l/2-u/2),this.$arrow.css({top:e+"px"})),this.$popover.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+o+"px, "+i+"px, 0px)","will-change":"transform"});var f=0,g={left:this.$popover.position().left,top:this.$popover.position().top,right:n-(this.$popover.position().left+a),bottom:s-(this.$popover.position().top+l)},m={left:!1,top:!1,right:!1,bottom:!1};if(g.right<0&&(m.right=!0,f++,this.log("Popover overflowing from right")),g.left<0&&(m.left=!0,f++,this.log("Popover overflowing from left")),g.bottom<0&&(m.bottom=!0,f++,this.log("Popover overflowing from bottom")),g.top<0&&(m.top=!0,f++,this.log("Popover overflowing from top")),f>0){if(!this.placementChanged&&m.left&&g.right>a?(this.log("Changing popover placement to right"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("right")):!this.placementChanged&&m.top&&g.top>l?(this.log("Changing popover placement to bottom"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")):!this.placementChanged&&m.right&&g.left>a?(this.log("Changing popover placement to left"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("left")):!this.placementChanged&&m.bottom&&g.top>l?(this.log("Changing popover placement to top"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!m.left&&!m.right?this.fixPopoverPosition=!0:g.top>g.bottom?(this.log("Changing popover placement to top"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):(this.log("Changing popover placement to bottom"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")),this.fixPopoverPosition){if(this.log("Adjusting popover size or position in order to popover fit in the container"),m.left){this.log("Popover overflowing from left");var $=Math.abs(g.left);c>=o+$&&["top","bottom"].indexOf(t)<0?(this.log("Popover adjusting width"),a-=$,o+=$):(this.log("Popover adjusting position x"),o+=$,e-=$)}if(m.top){this.log("Popover overflowing from top");var v=Math.abs(g.top);this.log("Popover adjusting position y"),i+=v,e-=v}if(m.right){this.log("Popover overflowing from right");var b=Math.abs(g.right);c<=o-b&&["top","bottom"].indexOf(t)<0?(this.log("Popover adjusting width"),a-=b):(this.log("Popover adjusting position x"),o-=b,e+=b)}if(m.bottom){this.log("Popover overflowing from bottom");var w=Math.abs(g.bottom);this.log("Popover adjusting position y"),i-=w,e+=w}"top"===t?this.$arrow.css({left:e+"px"}):"right"===t?this.$arrow.css({top:e+"px"}):"bottom"===t?this.$arrow.css({left:e+"px"}):"left"===t&&this.$arrow.css({top:e+"px"}),this.$popover.css({width:a,transform:"translate3d("+o+"px, "+i+"px, 0px)"}),this.fixPopoverPosition=!1,this.log("Popover placement changed: "+this.placementChanged),this.log("Popover container inner width: "+n+"px"),this.log("Popover container inner height: "+s+"px"),this.log("Popover trigger width: "+r+"px"),this.log("Popover trigger height: "+h+"px"),this.log("popover trigger position x: "+c+"px"),this.log("Popover trigger position Y: "+d+"px"),this.log("Popover width: "+a+"px"),this.log("Popover height: "+l+"px"),this.log("Popover position x: "+o+"px"),this.log("Popover position y: "+i+"px"),this.log("Popover position left: "+g.left+"px"),this.log("Popover position top: "+g.top+"px"),this.log("Popover position right: "+g.right+"px"),this.log("Popover position bottom: "+g.bottom+"px")}}else this.log("Popover placement changed: "+this.placementChanged),this.log("Popover container inner width: "+n+"px"),this.log("Popover container inner height: "+s+"px"),this.log("Popover trigger width: "+r+"px"),this.log("Popover trigger height: "+h+"px"),this.log("popover trigger position x: "+c+"px"),this.log("Popover trigger position Y: "+d+"px"),this.log("Popover width: "+a+"px"),this.log("Popover height: "+l+"px"),this.log("Popover position x: "+o+"px"),this.log("Popover position y: "+i+"px"),this.log("Popover position left: "+g.left+"px"),this.log("Popover position top: "+g.top+"px"),this.log("Popover position right: "+g.right+"px"),this.log("Popover position bottom: "+g.bottom+"px")},o.show=function(){this.$popover||(this.buildPopover(),this.setPosition(),this.animation?(this.$popover.addClass(this.animationSpeed),this.$popover.animateCss(this.animationIn),this.$popover.addClass("show"),this.$popover.attr("id",this.id),this.$el.attr("data-popover",this.id)):(this.$popover.addClass("show"),this.$popover.attr("id",this.id),this.$el.attr("data-popover",this.id)),this.onShow())},o.close=function(){var t=this;this.$popover&&(this.animation&&!this.$popover.hasClass("animated")?this.$popover.animateCss(this.animationOut,function(){t.$popover.remove(),t.$el.removeAttr("data-popover"),t.$popover=null,t.placementChanged=!1,t.onClose()}):(this.$popover.remove(),this.$el.removeAttr("data-popover"),this.$popover=null,this.placementChanged=!1,this.onClose()))},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data(E);if(o||(o=new e(this,"object"==typeof t&&t),$(this).data(E,o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(D);if("undefined"!=typeof $){var Y=$.fn[P];$.fn[P]=H._jQueryInterface,$.fn[P].Constructor=H,$.fn[P].noConflict=function(){return $.fn[P]=Y,H._jQueryInterface},$.fn[P].defaults={container:".content-inner",containerAutoDetect:!1,trigger:"focus",placement:"bottom",animation:!0,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",title:"",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var A="coolSelect",W=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.select?$.extend(!0,i.opts,$.fn[A].defaults,window.Cool.settings.select,o):$.extend(!0,i.opts,$.fn[A].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}S(e,t);var o=e.prototype;return o.init=function(){var t=this;this.buildCache().then(function(){t.buildScroll(),t.bindEvents(),t.data[t.name].length>0&&t.setData(),t.onInit()})},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolSelect"),this.onDestroy()},o.update=function(){this.buildCache(),this.bindEvents(),this.onUpdate()},o.reset=function(){this.data={},this.data[this.name]=[],this.items=[],this.$select.find(".select-item").remove(),this.$selectItems=[],this.$selectIconContainer.html(this.selectIconDefault),0==this.data[this.name].length&&this.dynamicTitle&&this.dynamicTitleDefault&&0!==this.dynamicTitleDefault&&0==this.$selectTitle.text().trim()&&(this.$selectItems.length>0||this.searchApi)&&this.$selectTitle.html(this.dynamicTitleDefault),0==this.$selectItems.length&&!this.searchApi&&this.dynamicTitle&&this.dynamicTitleEmptyDefault&&0!==this.dynamicTitleEmptyDefault&&(this.$selectHeader.css("cursor","default"),this.$selectIconContainer.addClass("d-none"),this.$selectTitle.html(this.dynamicTitleEmptyDefault)),this.showSearch&&(this.searchData=[],this.$searchInput.val(""),this.searchString="",this.search.call(this))},o.buildCache=function(){var t=this;return new Promise(function(e,o){var i=t;if(t.$el=$(t.el),t.$container=t.$el.parent(),t.$selectHeader=t.$el.find(".select-header"),t.$selectTitle=t.$el.find(".select-title"),t.$selectIconContainer=t.$selectHeader.find(".select-icon"),t.selectIconDefault=t.$selectHeader.find(".select-icon")?t.$selectHeader.find(".select-icon").html():'<i class="'+(t.opts.faPro?"fal":"fas")+'fa-angle-down icon"></i>',t.name=t.$el.data("name")?t.$el.data("name"):t.opts.name,t.scrollContentHeight=t.$el.data("scrollContentHeight")?t.$el.data("scrollContentHeight"):t.opts.scrollContentHeight,t.items=t.$el.data("items")?t.$el.data("items"):t.opts.items,t.data={},t.data[t.name]=[],t.searchData=[],t.searchApi=t.$el.data("searchApi")?t.$el.data("searchApi"):t.opts.searchApi,t.searchRequest=null,t.type=t.$el.data("type")?t.$el.data("type"):t.opts.type,t.contentOpen=!1,t.searchPlaceholder=t.$el.data("search-placeholder")?t.$el.data("search-placeholder"):t.opts.searchPlaceholder,t.btnCloseText=t.$el.data("btn-close-text")?t.$el.data("btn-close-text"):t.opts.btnCloseText,t.labelTemplate=t.opts.labelTemplate,t.confirmCheck=t.opts.confirmCheck,t.confirmUncheck=t.opts.confirmUncheck,t.preventUncheck=t.opts.preventUncheck,t.dynamicTitle=t.$el.data("dynamicTitle")?t.$el.data("dynamicTitle"):t.opts.dynamicTitle,t.dynamicTitleDefault=t.$el.data("dynamicTitleDefault")?t.$el.data("dynamicTitleDefault"):t.opts.dynamicTitleDefault,t.dynamicTitleEmptyDefault=t.$el.data("dynamicTitleEmptyDefault")?t.$el.data("dynamicTitleEmptyDefault"):t.opts.dynamicTitleEmptyDefault,t.allowNoneOnRadioSelect=t.$el.data("allowNoneOnRadioSelect")?t.$el.data("allowNoneOnRadioSelect"):t.opts.allowNoneOnRadioSelect,t.showValidStateIcon=t.$el.data("showValidStateIcon")?t.$el.data("showValidStateIcon"):t.opts.showValidStateIcon,t.itemsToExclude=t.$el.data("itemsToExclude")?t.$el.data("itemsToExclude").replace(/\s/g,"").split(","):t.opts.itemsToExclude,t.primaryKeyword=t.$el.data("primaryKeyword")?t.$el.data("primaryKeyword"):t.opts.primaryKeyword,t.preventClose=!1,t.itemsToExclude.length>0&&(t.itemsToExclude=t.itemsToExclude.map(String)),t.opts.setData&&(t.data=t.opts.setData),t.$el.data("setData")&&""!=t.$el.data("setData")&&(t.data=t.$el.data("setData")),!Array.isArray(t.data[t.name])&&""!==t.data[t.name]&&t.data[t.name].length>0){var n=t.data[t.name].toString().trim().split(",");t.data[t.name]=n}t.data[t.name].length>0&&(t.data[t.name]=t.data[t.name].map(String)),t.data[t.name].length>0&&t.itemsToExclude.length>0&&(t.data[t.name]=t.data[t.name].filter(function(t){return t[i.primaryKeyword]?-1===i.itemsToExclude.indexOf(t[i.primaryKeyword].toString()):-1===i.itemsToExclude.indexOf(t.toString())})),t.items.length>0&&t.itemsToExclude.length>0&&(t.items=t.items.filter(function(t){return t[i.primaryKeyword]?-1===i.itemsToExclude.indexOf(t[i.primaryKeyword].toString()):-1===i.itemsToExclude.indexOf(t.toString())})),t.$el.find(".select-search").length?t.showSearch=!0:t.showSearch=t.$el.data("showSearch")?t.$el.data("showSearch"):t.opts.showSearch,t.$el.find(".select-footer").length?t.showFooter=!0:t.showFooter=t.$el.data("showFooter")?t.$el.data("showFooter"):t.opts.showFooter,t.$select=t.$el.find(".select-content"),new Promise(function(e,o){if(t.$select.length){var n=t.$select.find(".select-item");n.length>0&&t.itemsToExclude.length>0&&$.each(n,function(t,e){var o=$(e).find(":input").val();i.itemsToExclude.indexOf(o)>-1&&$(e).remove()}),e()}else{var s=t._renderItemList(t.items);t.$select=$('\n <div class="select-content">\n\n '+t._renderSearch()+'\n\n <div class="select-scrollable-content"></div>\n\n '+t._renderFooter()+"\n\n </div>\n "),t.$el.append(t.$select),t.$select.find(".select-scrollable-content").append(s),e()}}).then(function(){t.$scrollableContent=!!t.$select.find(".select-scrollable-content")&&t.$select.find(".select-scrollable-content"),t.$selectItems=t.$select.find(".select-item"),0==t.data[t.name].length&&t.dynamicTitle&&t.dynamicTitleDefault&&0!==t.dynamicTitleDefault&&0==t.$selectTitle.text().trim()&&(t.$selectItems.length>0||t.searchApi)&&t.$selectTitle.html(t.dynamicTitleDefault),0==t.$selectItems.length&&!t.searchApi&&t.dynamicTitle&&t.dynamicTitleEmptyDefault&&0!==t.dynamicTitleEmptyDefault&&(t.$selectHeader.css("cursor","default"),t.$selectIconContainer.addClass("d-none"),t.$selectTitle.html(t.dynamicTitleEmptyDefault)),t.showSearch&&(t.$searchContainer=t.$select.find(".select-search"),t.$searchInput=t.$select.find('[name="select-search"]'),t.$searchIconContainer=t.$select.find(".select-search-icon"),t.$clearSearchButton=t.$select.find("[data-clear-search]"),t.$searchInput[0].tabIndex=-1),t.showFooter&&(t.$footerContainer=t.$select.find(".select-footer"),t.$closeButton=t.$select.find("[data-select-close]"),t.$closeButton[0].tabIndex=-1),t.buildSearchData(),t.log(t.$el),t.log(t.$select),t.log(t.$scrollableContent),t.log("Name: "+t.name),t.log("Show search: "+t.showSearch),t.log("Show footer: "+t.showFooter),t.log("Scroll content height: "+t.scrollContentHeight+"px"),t.log(t.items),t.log(t.searchData),e()})})},o.buildScroll=function(){if(this.$scrollableContent.length>0){var t=this.scrollContentHeight;this.showSearch&&(t-=this.$searchContainer.outerHeight(!0)||0),this.showFooter&&(t-=this.$footerContainer.outerHeight(!0)||0),this.$scrollableContent.css({"max-height":t-parseInt(this.$scrollableContent.css("marginTop"),10)-parseInt(this.$scrollableContent.css("marginBottom"),10)+"px"}),k()?this.$scrollableContent.css({"overflow-y":"auto"}):(this.$scrollableContent.addClass("ps-dark"),this.scroll=new C(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,scrollYMarginOffset:-1,suppressScrollY:!0,suppressScrollX:!0}),this.$scrollableContent.find('[tabindex="0"]').attr("tabindex",-1),this.$scrollableContent[0].offsetHeight<this.$scrollableContent[0].scrollHeight&&(this.$scrollableContent.addClass("ps-show-rail-y"),this.scroll.settings.suppressScrollY=!1))}},o.buildSearchData=function(){var t=this;return new Promise(function(e,o){t.searchData=[];var i=t.$select.find("[data-label]");$.each(i,function(e,o){t.searchData.push({id:e,val:$(o).text().trim()})}),e()})},o.bindEvents=function(){var t=this,e=this;this.$selectHeader.on("click."+A,function(){t.contentOpen?t.close():(t.$selectItems.length>0||t.searchApi)&&t.show()}),this.$el.on("change."+A,'input[type="checkbox"]',function(){var t=this,o=$(this).val();e.preventClose=!0,"function"==typeof e.confirmCheck&&t.checked?(t.checked=!1,e.confirmCheck(function(i){"confirmed"==i&&(-1===e.data[e.name].indexOf(o)&&e.data[e.name].push(o),t.checked=!0,e.onSelect(t)),setTimeout(function(){e.preventClose=!1},600)},t)):t.checked?(-1===e.data[e.name].indexOf(o)&&e.data[e.name].push(o),e.onSelect(t),setTimeout(function(){e.preventClose=!1},600)):"function"!=typeof e.confirmUncheck||t.checked?t.checked||e.preventUncheck?!t.checked&&e.preventUncheck&&(t.checked=!0,setTimeout(function(){e.preventClose=!1},600)):(e.data[e.name]=e.data[e.name].filter(function(t){return t!=o}),e.onSelect(t),setTimeout(function(){e.preventClose=!1},600)):(t.checked=!0,e.confirmUncheck(function(i){"confirmed"==i&&(e.data[e.name]=e.data[e.name].filter(function(t){return t!=o}),t.checked=!1,e.onSelect(t)),setTimeout(function(){e.preventClose=!1},600)},t))}),this.$el.on("change."+A,'input[type="radio"]',function(){var t=$(this).val();this.checked?(e.data[e.name]=[t],e.$select.find('input[type="radio"]').not($(this)).prop("checked",!1),e.$select.find('input[type="radio"]').not($(this)).removeClass("checked")):e.data[e.name]=[]}),this.$el.on("click."+A,'input[type="radio"]',function(){$(this).hasClass("checked")&&e.allowNoneOnRadioSelect?(e.data[e.name]=[],$(this).prop("checked",!1),$(this).removeClass("checked"),e.dynamicTitle&&e.$selectTitle.html(e.dynamicTitleDefault)):($(this).addClass("checked"),e.dynamicTitle&&e.$selectTitle.html($(this).parent().find("[data-label]").text())),e.onSelect(this)}),this.scroll&&(this.$scrollableContent.find(".ps__thumb-y").mousedown(function(){e.$scrollableContent.addClass("ps-mousedown-scroll")}),$(document).mouseup(function(){e.$scrollableContent.hasClass("ps-mousedown-scroll")&&e.$scrollableContent.removeClass("ps-mousedown-scroll")})),this.showSearch&&(this.$searchInput.on("keydown."+A,I(function(){e.searchString=$(this).val().trim(),e.search.call(e)},250)),this.$searchInput.on("focusin."+A,function(){e.$searchContainer.addClass("focused")}),this.$searchInput.on("focusout."+A,function(){e.$searchContainer.removeClass("focused")}),this.$searchContainer.on("click."+A,"[data-clear-search]",function(){e.searchString.length&&(e.$searchInput.val(""),e.searchString="",e.search.call(e))})),this.showFooter&&this.$closeButton.on("click."+A,function(){t.close()}),$(document).on("touchstart click",function(t){e.$el.is(t.target)||e.$el.has(t.target).length||!e.contentOpen||e.preventClose||e.close.call(e)})},o.unbindEvents=function(){this.$el.off("."+A)},o.getData=function(t){return t?this.data[t]:this.data},o.setData=function(){var t=this,e=this.opts.faPro?"fal":"fas";if(this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+e+' fa-check text-green icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.searchApi.length){var o=this.searchApi,i=this.data[this.name].length,n=0;this.data[this.name].forEach(function(t){o+=encodeURIComponent("#"+t),++n!==i&&(o+="+")}),$.ajax({method:"GET",url:o}).done(function(e){var o=e.map(function(e){return e.id=e[t.primaryKeyword].toString(),e}),i=o.map(function(t){return t.id.toString()});t.data[t.name]=t.data[t.name].filter(function(t){return i.indexOf(t.toString())>-1}),0==t.data[t.name].length&&t.$selectIconContainer.html(t.selectIconDefault),o=o.filter(function(e){return t.data[t.name].indexOf(e.id)>-1&&-1===t.itemsToExclude.indexOf(e.id)&&0!=e.id});var n=t._renderItemList(o);$.when(t.$scrollableContent.append(n)).then(function(){var e=t.$scrollableContent.find(":input");if(t.$scrollableContent[0].offsetHeight<t.$scrollableContent[0].scrollHeight?(t.scroll.update(),t.scroll.settings.suppressScrollY=!1,t.$scrollableContent.addClass("ps-show-rail-y")):(t.scroll.update(),t.scroll.settings.suppressScrollY=!0,t.$scrollableContent.removeClass("ps-show-rail-y")),t.$scrollableContent.find(':input[type="checkbox"]').length?t.type="checkbox":t.$scrollableContent.find(':input[type="radio"]').length&&(t.type="radio"),"checkbox"==t.type)t.data[t.name].forEach(function(o){var i=e.filter(function(){return this.value==o});i.prop("checked",!0),t.onSelect(i[0])});else if("radio"==t.type){var o=e.filter(function(){return this.value==t.data[t.name][0]});o.prop("checked",!0),o.addClass("checked"),t.dynamicTitle&&t.$selectTitle.html(o.parent().find("[data-label]").text()),t.onSelect(o[0])}})})}else{var s=this.$scrollableContent.find(":input"),a=s.length>0?s.map(function(){return this.value.toString()}).get():[];if(this.data[this.name]=this.data[this.name].filter(function(t){return a.indexOf(t.toString())>-1}),0==this.data[this.name].length&&this.$selectIconContainer.html(this.selectIconDefault),this.$scrollableContent.find(':input[type="checkbox"]').length?this.type="checkbox":this.$scrollableContent.find(':input[type="radio"]').length&&(this.type="radio"),"checkbox"==this.type)this.data[this.name].forEach(function(e){var o=s.filter(function(){return this.value==e});o.prop("checked",!0),t.onSelect(o[0])});else if("radio"==this.type){var l=s.filter(function(){return this.value==t.data[t.name][0]});l.prop("checked",!0),l.addClass("checked"),this.dynamicTitle&&this.$selectTitle.html(l.parent().find("[data-label]").text()),this.onSelect(l[0])}}},o.search=function(){var t=this,e=this.opts.faPro?"fal":"fas";if(this.searchString.length)if(this.searchApi.length)this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),null!==this.searchRequest&&this.searchRequest.abort(),this.searchRequest=$.ajax({method:"GET",url:this.searchApi+this.searchString}).done(function(e){t.searchRequest=null;var o=e.map(function(e){return e.id=e[t.primaryKeyword].toString(),e});o=o.filter(function(e){return-1===t.data[t.name].indexOf(e.id)&&-1===t.itemsToExclude.indexOf(e.id)&&0!=e.id});var i=t._renderItemList(o);$.when(t.$scrollableContent.append(i)).then(function(){var e=t.opts.faPro?"fal":"fas";t.$searchIconContainer.html('<i class="'+e+' fa-times icon"></i>'),t.$searchIconContainer.attr("data-clear-search","true"),t.$scrollableContent[0].offsetHeight<t.$scrollableContent[0].scrollHeight?(t.scroll.update(),t.scroll.settings.suppressScrollY=!1,t.$scrollableContent.addClass("ps-show-rail-y")):(t.scroll.update(),t.scroll.settings.suppressScrollY=!0,t.$scrollableContent.removeClass("ps-show-rail-y"))})});else{var o=this.searchData.filter(function(e){return e.val.toLocaleLowerCase().indexOf(t.searchString.toLocaleLowerCase())>-1});this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),o.forEach(function(e){$(t.$selectItems[e.id]).addClass("visible")}),this.$selectItems.not(".visible").addClass("d-none"),this.$searchIconContainer.html('<i class="'+e+' fa-times icon"></i>'),this.$searchIconContainer.attr("data-clear-search","true")}else this.searchApi.length?(this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),this.$searchIconContainer.html('<i class="'+e+' fa-search icon"></i>'),this.$searchIconContainer.attr("data-clear-search","")):(this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),this.$searchIconContainer.html('<i class="'+e+' fa-search icon"></i>'),this.$searchIconContainer.attr("data-clear-search",""));this.scroll&&this.scroll.update(),this.onUpdate()},o.show=function(){var t=this;if(!this.$el.hasClass("show")){var e=$(".select.show"),o=1,i=this.opts.faPro?"fal":"fas";e.length&&(o=parseInt(e.first().css("z-index"),10)+2),this.$el.css({"max-height":this.scrollContentHeight+this.$selectHeader.outerHeight(!0)+"px"}),this.$el.addClass("show"),e.length||(o=parseInt(this.$el.css("z-index"),10)+1),this.$el.css({"z-index":o}),this.scroll&&this.$scrollableContent.length&&this.$scrollableContent[0].offsetHeight<this.$scrollableContent[0].scrollHeight&&(this.$scrollableContent[0].scrollTop=1,this.$scrollableContent[0].scrollTop=0),this.$selectIconContainer.html('<i class="'+i+' fa-angle-up icon"></i>'),setTimeout(function(){t.$el[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},300),this.contentOpen=!0,this.onShow()}},o.close=function(){if(!this.preventClose){var t=this,e=this.opts.faPro?"fal":"fas";this.$el.css("max-height",""),this.$el.removeClass("show"),setTimeout(function(){t.$el.removeAttr("style")},300),this.data[this.name].length>0&&this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+e+' fa-check text-green icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.contentOpen=!1,this.onClose()}},o.onSelect=function(t){var e=this,o=this.opts.onSelect,i=$(t).parents(".select-item").data();this.searchApi.length&&!$.isEmptyObject(i)&&($(t).length&&t.checked?this.items.push(i):this.items=$.grep(this.items,function(t){return t[e.primaryKeyword]!=i.id})),"function"==typeof o&&o.call(t,i,this)},o.appendItems=function(t,e){var o=this;return new Promise(function(e,i){var n=o;if(!$.isArray(t)){var s=[];s.push(t),t=s}(t=t.filter(function(t){return-1===n.itemsToExclude.indexOf(t[n.primaryKeyword].toString())})).forEach(function(t){o.items.push(t)});var a=o._renderItemList(t);o.$scrollableContent.prepend(a),o.$selectItems=o.$select.find(".select-item"),o.buildSearchData().then(function(){if(o.$selectItems.length>0)if(o.$select.find(':input[type="checkbox"]').length?o.type="checkbox":o.$select.find(':input[type="radio"]').length&&(o.type="radio"),"checkbox"==o.type)t.forEach(function(t){var e=o.$select.find(":input").filter(function(){return this.value==t.id}),i=e.val().toString();e.prop("checked",!0),-1===o.data[o.name].indexOf(i)&&o.data[o.name].push(i),o.onSelect(e[0])});else if("radio"==o.type){var i=t[0],n=o.$select.find(":input").filter(function(){return this.value==i.id}),s=n.val().toString();n.prop("checked",!0),n.addClass("checked"),-1===o.data[o.name].indexOf(s)&&(o.data[o.name]=[s]),o.dynamicTitle&&o.$selectTitle.html(n.parent().find("[data-label]").text()),o.$select.find('input[type="radio"]').not(n).prop("checked",!1),o.$select.find('input[type="radio"]').not(n).removeClass("checked"),o.onSelect(n[0])}0==o.data[o.name].length&&o.dynamicTitle&&o.dynamicTitleDefault&&0!==o.dynamicTitleDefault&&0==o.$selectTitle.text().trim()&&(o.$selectItems.length>0||o.searchApi)&&o.$selectTitle.html(o.dynamicTitleDefault),o.$selectHeader.attr("style")&&o.$selectHeader.removeAttr("style"),o.$selectIconContainer.hasClass("d-none")&&o.$selectIconContainer.removeClass("d-none"),e()})})},o.deselectItems=function(t){var e=this;return new Promise(function(o,i){t.forEach(function(t){var o=e.$select.find(":input").filter(function(){return this.value==t});o[0].checked&&o.trigger("click")}),0==e.data[e.name].length&&e.$selectIconContainer.html(e.selectIconDefault)})},o.getItem=function(t,e){var o=$.grep(this.items,function(o){return o[t]==e})[0];return o||null},o.getSelectedItems=function(t){var e=[],o=[],i=this.data[this.name];return $.isArray(i)?e=i:e.push(i),e=e.map(String),this.items.length>0?(o=$.grep(this.items,function(t){return e.indexOf(t.id.toString())>-1}),t&&(o=o.map(function(e){return e[t]}).filter(function(t){return null!=t}))):o=e,o},o.getSelectedItem=function(t){var e=[],o=[],i=this.data[this.name];return $.isArray(i)?e=i:e.push(i),e=e.map(String),this.items.length>0?(o=$.grep(this.items,function(t){return e.indexOf(t.id.toString())>-1}),t&&(o=o.map(function(e){return e[t]}).filter(function(t){return null!=t}))):o=e,null==o[0]?null:o[0]},o._renderItemList=function(t){for(var e=[],o=0;o<t.length;++o){var i=t[o],n="";"function"==typeof this.labelTemplate?n=this.labelTemplate(i):i.name?n=i.name:i.label?n=i.label:i.value&&(n=i.value),e.push($('\n\n <div class="select-item">\n\n <div class="select-item-'+this.type+'">\n\n <div class="styled-'+this.type+'">\n\n <input type="'+this.type+'" id="select-'+this.name+"-"+t[o].id+'" value="'+t[o].id+'" tabindex="-1">\n\n <label for="select-'+this.name+"-"+t[o].id+'">\n\n <span class="radio-inner">\n <svg viewBox="0 0 18 18">\n <polyline points="1.5 6 4.5 9 10.5 1"></polyline>\n </svg>\n </span>\n\n <span class="'+this.type+'-label"'+("function"!=typeof this.labelTemplate?" data-label":"")+">\n "+n+"\n </span>\n\n </label>\n\n </div>\n\n </div>\n\n </div>\n\n ").data(i))}return e},o._renderSearch=function(){if(this.showSearch){var t=this.opts.faPro?"fal":"fas";return'\n\n <div class="select-search">\n\n <div class="select-search-input">\n\n <input type="text" name="select-search" value="" placeholder="'+this.searchPlaceholder+'" tabindex="-1">\n\n </div>\n\n <div class="select-search-icon">\n\n <i class="'+t+' fa-search icon"></i>\n\n </div>\n\n </div>\n\n '}return""},o._renderFooter=function(){return this.showFooter?'\n\n <div class="select-footer">\n\n <button class="btn btn-block btn-secondary" type="button" tabindex="-1" data-select-close >\n '+this.btnCloseText+"\n </button>\n\n </div>\n\n ":""},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolSelect");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolSelect",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(D);if("undefined"!=typeof $){var X=$.fn[A];$.fn[A]=W._jQueryInterface,$.fn[A].Constructor=W,$.fn[A].noConflict=function(){return $.fn[A]=X,W._jQueryInterface},$.fn[A].defaults={name:"",type:"checkbox",labelTemplate:null,confirmCheck:null,confirmUncheck:null,setData:null,scrollContentHeight:100,faPro:!1,items:[],showSearch:!1,showFooter:!1,searchApi:!1,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onReset:null,onSearch:null,onSelect:null,buildScroll:null,searchPlaceholder:null,btnCloseText:null,debug:!1,dynamicTitle:!1,dynamicTitleDefault:"",dynamicTitleEmptyDefault:"",allowNoneOnRadioSelect:!0,preventUncheck:!1,showValidStateIcon:!0,itemsToExclude:[],primaryKeyword:"id"}}var O="coolDropdown",L=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.dropdown?$.extend(!0,i.opts,$.fn[O].defaults,window.Cool.settings.dropdown,o):$.extend(!0,i.opts,$.fn[O].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}S(e,t);var o=e.prototype;return o.init=function(){var t=this;$.when(this.buildCache()).then(function(){t.buildScroll(),t.bindEvents(),t.onInit()})},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolDropdown"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){var t=this;if(this.$el=$(this.el),this.$el.addClass("dropdown-trigger"),this.$container=this.$el.parent(".dropdown"),this.id="dropdown-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.offset=this.$el.data("offset")?this.$el.data("offset"):this.opts.offset,this.minWidth=this.$el.data("minWidth")?this.$el.data("minWidth"):this.opts.minWidth,this.scroll=this.$el.data("scroll")?this.$el.data("scroll"):this.opts.scroll,this.scrollContentHeight=this.$el.data("scrollContentHeight")?this.$el.data("scrollContentHeight"):this.opts.scrollContentHeight,this.positionObserver=this.$el.attr("data-position-observer")?JSON.parse(this.$el.attr("data-position-observer")):this.opts.positionObserver,this.closeOnItemClick=this.$el.data("closeOnItemClick")?this.$el.data("closeOnItemClick"):this.opts.closeOnItemClick,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content,this.contentOpen=!1,this.$container.hasClass("dropup")?this.placement="top":this.$container.hasClass("dropright")?this.placement="right":this.$container.hasClass("dropbottom")?this.placement="bottom":this.placement="left","function"!=typeof this.content)return this.$dropdown=!!this.$el.next(".dropdown-menu")&&this.$el.next(".dropdown-menu"),this.$dropdown.hasClass("dropdown-menu-right")?this.align="end":this.align="start",this.$scrollableContent=!!this.$dropdown.find(".dropdown-scrollable-content")&&this.$dropdown.find(".dropdown-scrollable-content"),this.$dropdownItem=this.$dropdown.find(".dropdown-item"),this.minWidth&&this.$dropdown.css("min-width",this.minWidth+"px"),this.log(this.$el),this.log(this.$container),this.log(this.$dropdown),this.log(this.$scrollableContent),this.log("Id: "+this.id),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Offset: "+this.offset),this.log("Min width: "+this.minWidth),this.log("Content: "+this.opts.content),this.log("Scroll: "+this.scroll),this.log("Scroll content height: "+this.scrollContentHeight+"px"),!0;var e="end"===this.opts.align?" dropdown-menu-right":"";this.$dropdown=$('\n <div class="dropdown-menu'+e+'" id="'+this.id+'">\n '+this.content+"\n </div>\n "),$.when(this.$el.after(this.$dropdown)).then(function(){return t.$scrollableContent=!!t.$dropdown.find(".dropdown-scrollable-content")&&t.$dropdown.find(".dropdown-scrollable-content"),t.$dropdown.hasClass("dropdown-menu-right")?t.align="end":t.align="start",t.$dropdownItem=t.$dropdown.find(".dropdown-item"),t.minWidth&&t.$dropdown.css("min-width",t.minWidth+"px"),t.log(t.$el),t.log(t.$container),t.log(t.$dropdown),t.log(t.$scrollableContent),t.log("Id: "+t.id),t.log("Animation: "+t.animation),t.log("Animation in: "+t.animationIn),t.log("Animation out: "+t.animationOut),t.log("Animation speed: "+t.animationSpeed),t.log("Offset: "+t.offset),t.log("Min width: "+t.minWidth),t.log("Content: "+t.content),t.log("Scroll: "+t.scroll),t.log("Scroll content height: "+t.scrollContentHeight+"px"),!0})},o.buildScroll=function(){this.opts.scroll&&this.$scrollableContent.length&&(this.$scrollableContent.css({"max-height":this.scrollContentHeight+"px"}),k()?this.$scrollableContent.css({"overflow-y":"auto"}):(this.$scrollableContent.css({"overflow-y":"auto"}),this.scroll=new C(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20}),this.$scrollableContent.addClass("ps-show-rail-y")))},o.bindEvents=function(){var t=this,e=this;this.$el.on("click."+O,function(){t.contentOpen?t.close():t.show()}),this.$dropdownItem.on("click."+O,function(){e.closeOnItemClick&&e.close(),e.onItemClick(this)}),$(document).on("touchstart click",function(e){t.$el.is(e.target)||t.$dropdown.is(e.target)||0!==t.$dropdown.has(e.target).length||!t.contentOpen||t.close()}),$(window).on("resize",I(function(){t.setPosition(),t.onUpdate()},250))},o.unbindEvents=function(){this.$el.off("."+O)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.setPosition=function(t){"undefined"!=typeof str&&null!==str||(t=this.placement);var e=this.$dropdown.outerWidth(!0),o=this.$dropdown.outerHeight(!0),i=this.$el.outerWidth(!0),n=this.$el.outerHeight(!0),s=this.$el.position().left,a=this.$el.position().top,l=0,r=0,h=0,c=0;if("top"===t?(l="end"===this.align?i-e:s,r=a-o):"right"===t?(l=s+i,r=a):"bottom"===t?(l="end"===this.align?i-e:s,r=a+n):"left"===t&&(l=s-e,r=a),this.offset){var d=this.offset.split(",");h=d[0],c=d[1],l+=parseInt(h,10),r+=parseInt(c,10)}if(this.positionObserver&&this.$container.length>0){for(var p=this.$container.parent(),u=0;"hidden"!==p.css("overflow-x")&&"hidden"!==p.css("overflow")&&"body"!==(p.prop("tagName")||"").toLowerCase()&&u<100;){if(!(p=p.parent()).get(0))return;++u}if(!p.get(0))return;var f=p.get(0).getBoundingClientRect(),g=this.$container.get(0).getBoundingClientRect();f.width<e?(this.$dropdown.css("max-width",f.width),e=f.width):this.$dropdown.css("max-width",""),f.height<o?(this.$dropdown.css("max-height",f.height),o=f.height):this.$dropdown.css("max-height","");var m=Math.max(Math.abs(f.y-g.y),0),$=Math.max(Math.abs(f.x-g.x),0),v=p.get(0).scrollWidth-(g.x+g.width),b=p.get(0).scrollHeight-(g.y+("dropbottom"===t?g.height:0));$<e&&l<s&&(l=s,a+n>r&&(r=a+n+(c>0?c:0))),v<e&&l+e>s+i&&(l=s+i-e,a+n>r&&(r=a+n+(c>0?c:0))),r<a&&m<o&&(r=a+n+c),r>=a&&b<o&&(r=l>=s+i||s>=l+e?a-(o-b):a-o-c)}this.$dropdown.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+Math.round(l)+"px, "+Math.round(r)+"px, 0px)","will-change":"transform"}),this.log("Dropdown trigger width: "+i+"px"),this.log("Dropdown trigger height: "+n+"px"),this.log("Dropdown trigger position x: "+s+"px"),this.log("Dropdown trigger position Y: "+a+"px"),this.log("Dropdown width: "+e+"px"),this.log("Dropdown height: "+o+"px"),this.log("Dropdown position x: "+l+"px"),this.log("Dropdown position y: "+r+"px")},o.show=function(){this.$dropdown&&!this.$dropdown.hasClass("show")&&(this.setPosition(),this.animation?(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass(this.animationSpeed),this.$dropdown.animateCss(this.animationIn),this.$dropdown.addClass("show"),this.$dropdown.attr("id",this.id),this.$el.attr("data-dropdown",this.id)):(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass("show"),this.$dropdown.attr("id",this.id),this.$el.attr("data-dropdown",this.id)),this.opts.scroll&&this.scroll&&this.$scrollableContent.length&&(this.$scrollableContent[0].scrollTop=1,this.$scrollableContent[0].scrollTop=0),this.contentOpen=!0,this.onShow())},o.close=function(){var t=this;this.$dropdown&&(this.animation&&!this.$dropdown.hasClass("animated")?this.$dropdown.animateCss(this.animationOut,function(){t.$dropdown.removeClass("show"),t.$el.removeAttr("data-dropdown")}):(this.$dropdown.removeClass("show"),this.$el.removeAttr("data-dropdown")),this.contentOpen=!1,this.onClose())},o.onItemClick=function(t){var e=this.opts.onItemClick;"function"==typeof e&&e.call(t)},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolDropdown");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolDropdown",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(D);if("undefined"!=typeof $){var M=$.fn[O];$.fn[O]=L._jQueryInterface,$.fn[O].Constructor=L,$.fn[O].noConflict=function(){return $.fn[O]=M,L._jQueryInterface},$.fn[O].defaults={animation:!0,animationIn:"zoomIn",animationOut:"zoomOut",animationSpeed:"fastest",offset:null,minWidth:null,align:"start",closeOnItemClick:!0,positionObserver:!0,content:!1,scroll:!0,scrollContentHeight:100,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onItemClick:null,debug:!1}}var R="coolTooltip",_=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.tooltip?$.extend(!0,i.opts,$.fn[R].defaults,window.Cool.settings.tooltip,o):$.extend(!0,i.opts,$.fn[R].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}S(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolTooltip"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.id="tooltip-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.placement=this.$el.data("placement")?this.$el.data("placement"):this.opts.placement,this.placementChanged=!1,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content},o.bindEvents=function(){var t=this;this.$el.on("mouseenter."+R,function(){t.show()}),this.$el.on("mouseleave."+R,function(){t.close()}),this.$el.on("blur."+R,function(){t.close()}),this.$el.on("destroyed."+R,function(){t.close()}),$(window).on("resize",I(function(){t.$tooltip&&(t.setPosition(),t.onUpdate())},250))},o.unbindEvents=function(){this.$el.off("."+R)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.buildTooltip=function(){this.$tooltip=$('\n\n <div class="tooltip" role="tooltip" id="'+this.id+'">\n\n <div class="arrow"></div>\n\n <div class="tooltip-inner">'+this.content+"</div>\n\n </div>\n\n "),this.$container.append(this.$tooltip),this.$arrow=this.$tooltip.find(".arrow"),this.log(this.$el),this.log(this.$container),this.log(this.$tooltip),this.log(this.$arrow),this.log("Id: "+this.id),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Placement: "+this.placement),this.log("Content: "+this.content)},o.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$tooltip.addClass("tooltip-"+t);var e,o,i,n=this.$container.innerWidth(),s=this.$container.innerHeight(),a=this.$tooltip.outerWidth(!0),l=this.$tooltip.outerHeight(!0),r=this.$el.outerWidth(),h=this.$el.outerHeight(),c=this.$el.offset().left,d=this.$el.offset().top,p=this.$arrow.outerWidth(!0),u=this.$arrow.outerHeight(!0);"top"===t?(o=Math.round(c-(a-r)/2),i=Math.round(d-l),e=Math.round(a/2-p/2),this.$arrow.css({left:e+"px"})):"right"===t?(o=Math.round(c+r),i=Math.round(d-(l-h)/2),e=Math.round(l/2-u/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(o=Math.round(c-(a-r)/2),i=Math.round(d+h),e=Math.round(a/2-p/2),this.$arrow.css({left:e+"px"})):"left"===t&&(o=Math.round(c-a),i=Math.round(d-(l-h)/2),e=Math.round(l/2-u/2),this.$arrow.css({top:e+"px"})),this.$tooltip.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+o+"px, "+i+"px, 0px)","will-change":"transform"});var f=0,g={left:this.$tooltip.position().left,top:this.$tooltip.position().top,right:n-(this.$tooltip.position().left+a),bottom:s-(this.$tooltip.position().top+l)},m={left:!1,top:!1,right:!1,bottom:!1};if(g.right<0&&(m.right=!0,f++,this.log("Tooltip overflowing from right")),g.left<0&&(m.left=!0,f++,this.log("Tooltip overflowing from left")),g.bottom<0&&(m.bottom=!0,f++,this.log("Tooltip overflowing from bottom")),g.top<0&&(m.top=!0,f++,this.log("Tooltip overflowing from top")),f>0){if(!this.placementChanged&&m.left&&g.right>a?(this.log("Changing tooltip placement to right"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("right")):!this.placementChanged&&m.top&&g.top>l?(this.log("Changing tooltip placement to bottom"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")):!this.placementChanged&&m.right&&g.left>a?(this.log("Changing tooltip placement to left"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("left")):!this.placementChanged&&m.bottom&&g.top>l?(this.log("Changing tooltip placement to top"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!m.left&&!m.right?this.fixTooltipPosition=!0:g.top>g.bottom?(this.log("Changing tooltip placement to top"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):(this.log("Changing tooltip placement to bottom"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")),this.fixTooltipPosition){if(this.log("Adjusting tooltip size or position in order to tooltip fit in the container"),m.left){this.log("Tooltip overflowing from left");var $=Math.abs(g.left);c>=o+$&&["top","bottom"].indexOf(t)<0?(this.log("Tooltip adjusting width"),a-=$,o+=$):(this.log("Tooltip adjusting position x"),o+=$,e-=$)}if(m.top){this.log("Tooltip overflowing from top");var v=Math.abs(g.top);this.log("Tooltip adjusting position y"),i+=v,e-=v}if(m.right){this.log("Tooltip overflowing from right");var b=Math.abs(g.right);c<=o-b&&["top","bottom"].indexOf(t)<0?(this.log("Tooltip adjusting width"),a-=b):(this.log("Tooltip adjusting position x"),o-=b,e+=b)}if(m.bottom){this.log("Tooltip overflowing from bottom");var w=Math.abs(g.bottom);this.log("Tooltip adjusting position y"),i-=w,e+=w}"top"===t?this.$arrow.css({left:e+"px"}):"right"===t?this.$arrow.css({top:e+"px"}):"bottom"===t?this.$arrow.css({left:e+"px"}):"left"===t&&this.$arrow.css({top:e+"px"}),this.$tooltip.css({width:a,transform:"translate3d("+o+"px, "+i+"px, 0px)"}),this.fixTooltipPosition=!1,this.log("Tooltip placement changed: "+this.placementChanged),this.log("Tooltip container inner width: "+n+"px"),this.log("Tooltip container inner height: "+s+"px"),this.log("Tooltip trigger width: "+r+"px"),this.log("Tooltip trigger height: "+h+"px"),this.log("Tooltip trigger position x: "+c+"px"),this.log("Tooltip trigger position Y: "+d+"px"),this.log("Tooltip width: "+a+"px"),this.log("Tooltip height: "+l+"px"),this.log("Tooltip position x: "+o+"px"),this.log("Tooltip position y: "+i+"px"),this.log("Tooltip position left: "+g.left+"px"),this.log("Tooltip position top: "+g.top+"px"),this.log("Tooltip position right: "+g.right+"px"),this.log("Tooltip position bottom: "+g.bottom+"px")}}else this.log("Tooltip placement changed: "+this.placementChanged),this.log("Tooltip container inner width: "+n+"px"),this.log("Tooltip container inner height: "+s+"px"),this.log("Tooltip trigger width: "+r+"px"),this.log("Tooltip trigger height: "+h+"px"),this.log("Tooltip trigger position x: "+c+"px"),this.log("Tooltip trigger position Y: "+d+"px"),this.log("Tooltip width: "+a+"px"),this.log("Tooltip height: "+l+"px"),this.log("Tooltip position x: "+o+"px"),this.log("Tooltip position y: "+i+"px"),this.log("Tooltip position left: "+g.left+"px"),this.log("Tooltip position top: "+g.top+"px"),this.log("Tooltip position right: "+g.right+"px"),this.log("Tooltip position bottom: "+g.bottom+"px")},o.show=function(){this.$tooltip||(this.buildTooltip(),this.setPosition(),this.animation?(this.$tooltip.addClass(this.animationSpeed),this.$tooltip.animateCss(this.animationIn),this.$tooltip.addClass("show"),this.$tooltip.attr("id",this.id),this.$el.attr("data-tooltip",this.id)):(this.$tooltip.addClass("show"),this.$tooltip.attr("id",this.id),this.$el.attr("data-tooltip",this.id)),this.onShow())},o.close=function(){var t=this;this.$tooltip&&(this.animation&&!this.$tooltip.hasClass("animated")?this.$tooltip.animateCss(this.animationOut,function(){t.$tooltip.remove(),t.$el.removeAttr("data-tooltip"),t.$tooltip=null,t.placementChanged=!1,t.onClose()}):(this.$tooltip.remove(),this.$el.removeAttr("data-tooltip"),this.$tooltip=null,this.placementChanged=!1,this.onClose()))},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolTooltip");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolTooltip",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(D);if("undefined"!=typeof $){var j=$.fn[R];$.fn[R]=_._jQueryInterface,$.fn[R].Constructor=_,$.fn[R].noConflict=function(){return $.fn[R]=j,_._jQueryInterface},$.fn[R].defaults={container:"body",animation:!1,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",placement:"bottom",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var U="coolSectionTabs",z="plugin_coolSectionTabs",B=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.sectionTabs?$.extend(!0,i.opts,$.fn[U].defaults,window.Cool.settings.sectionTabs,o):$.extend(!0,i.opts,$.fn[U].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}S(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.checkForChanges(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData(z),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$dropdownContainer=this.$el.find(".dropdown-container"),this.$dropdownList=this.$el.find(".dropdown-list"),this.tabsCount=this.$el.find("> .tab-item").length,this.tabs=this.$el.find("> .tab-item:visible"),$.each(this.tabs,function(t,e){$(e).data("width",$(e).outerWidth(!0))}),this.log(this.$el),this.log(this.$dropdownContainer),this.log(this.$dropdownList),this.log(this.tabsCount)},o.bindEvents=function(){var t=this;$(window).on("resize",I(function(){t.checkForChanges()},250))},o.unbindEvents=function(){this.$el.off("."+this._name)},o.moveToList=function(t){$(t).insertBefore(this.$dropdownContainer),this.checkForChanges()},o.moveToDropdown=function(t){$(t).appendTo(this.$dropdownList),this.checkForChanges()},o.overflowStatus=function(){return this.$el[0].offsetWidth<this.$el[0].scrollWidth},o.checkForChanges=function(){var t=this.$dropdownList.children(),e=this.$el.find("> .tab-item").not(this.$dropdownContainer),o=this.$el.find("> .tab-item:visible"),i=0;$.each(o,function(t,e){i+=$(e).outerWidth(!0)});var n=this.$el[0].offsetWidth-i;t.length>0?this.$dropdownContainer.hasClass("visible")||this.$dropdownContainer.addClass("visible"):this.$dropdownContainer.hasClass("visible")&&this.$dropdownContainer.removeClass("visible"),1==this.overflowStatus()?e.length>0&&this.moveToDropdown(e.last()):t.length>0&&n>t.last().data("width")&&this.moveToList(t.last())},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data(z);if(o||(o=new e(this,"object"==typeof t&&t),$(this).data(z,o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(D);if("undefined"!=typeof $){var N=$.fn[U];$.fn[U]=B._jQueryInterface,$.fn[U].Constructor=B,$.fn[U].noConflict=function(){return $.fn[U]=N,B._jQueryInterface},$.fn[U].defaults={onInit:null,onUpdate:null,onDestroy:null,debug:!1}}var Q="coolCollapse",K=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.collapse?$.extend(!0,i.opts,$.fn[Q].defaults,window.Cool.settings.dialog,o):$.extend(!0,i.opts,$.fn[Q].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}S(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolCollapse"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$target=this.$el.data("target")?$(document).find(this.$el.data("target")):$(document).find(this.opts.target),this.expanded="true"==this.$el.attr("aria-expanded"),this.$target.length?(this.targetHeight=this.$target.height(),this.$container=this.$target.closest(".section-collapse"),this.$indicator=$(document).find('[data-collapse-indicator="'+this.$el.data("target")+'"]')):(this.$target=$(this.$el).parent().find(".collapse"),this.targetHeight=this.$target.height(),this.$container=this.$target.closest(".section-collapse"),this.$indicator=$(this.$el).parent().find("[data-collapse-indicator]")),this.expanded&&this.$target.css("height","auto"),this.log(this.$el),this.log(this.$target),this.log(this.$container),this.log(this.$indicator),this.log("Expanded: "+this.expanded),this.log("Target height: "+this.targetHeight+"px")},o.bindEvents=function(){var t=this;this.$el.on("click."+this.name,function(e){t.expanded?t.close():t.show()}),$(window).on("resize",I(function(){t.$target.length&&(t.targetHeight=t.$target.height(),t.log("Target height: "+t.targetHeight+"px"))},250))},o.unbindEvents=function(){this.$el.off("."+this.name)},o.whichTransitionEvent=function(){var t=document.createElement("text-transition"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",transition:"transitionend"};for(var o in e)if(void 0!==t.style[o])return e[o]},o.show=function(){var t=this;this.targetHeight!==this.$target.height()&&(this.targetHeight=this.$target.height()),this.$target.removeClass("collapse show"),this.$target.addClass("collapsing"),this.$el.is("button")&&this.$el.attr("disabled",!0),this.$container.length&&this.$container.addClass("show"),this.$target.css("height"),this.$target.css("height",this.targetHeight),this.$indicator.length&&this.$indicator.addClass("show"),this.$target.one(this.whichTransitionEvent(),function(){t.$target.removeClass("collapsing"),t.$el.is("button")&&t.$el.attr("disabled",!1),t.$target.removeAttr("style"),t.$target.addClass("collapse show"),t.$el.attr("aria-expanded",!0),t.$target.css("height","auto"),t.expanded=!0}),this.onShow()},o.close=function(){var t=this;this.$target.removeClass("collapse show"),this.$target.addClass("collapsing"),this.$el.is("button")&&this.$el.attr("disabled",!0),this.$container.length&&this.$container.removeClass("show"),this.$target.css("height",this.$target.height()),setTimeout(function(){t.$target.css("height",0)},10),this.$indicator.length&&this.$indicator.hasClass("show")&&this.$indicator.removeClass("show"),this.$target.one(this.whichTransitionEvent(),function(){t.$target.removeClass("collapsing"),t.$el.is("button")&&t.$el.attr("disabled",!1),t.$target.removeAttr("style"),t.$target.addClass("collapse"),t.$el.attr("aria-expanded",!1),t.expanded=!1,t.targetHeight!==t.$target.height()&&(t.targetHeight=t.$target.height())}),this.onClose()},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolCollapse");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolCollapse",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(D);if("undefined"!=typeof $){var F=$.fn[Q];$.fn[Q]=K._jQueryInterface,$.fn[Q].Constructor=K,$.fn[Q].noConflict=function(){return $.fn[Q]=F,K._jQueryInterface},$.fn[Q].defaults={target:null,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var q="coolToast",V=function(){function t(t,e){this.settings={},window.Cool.settings.toast?$.extend(!0,this.settings,$.fn[q].defaults,window.Cool.settings.toast,e):$.extend(!0,this.settings,$.fn[q].defaults,e),this.container=t,this.$container=$(this.container),this.debug=this.settings.debug,this.faPro=this.settings.faPro,this.toasts=[],this.queue=[],this.processingQueue=!1,this.onInitialize=this.settings.onInitialize,this.onDestroy=this.settings.onDestroy}var e=t.prototype;return e.addQueue=function(t){if(this.queue.push(t),!this.processingQueue)return this.processQueue()},e.processQueue=function(){if(this.processingQueue&&this.queue.shift(),this.queue.length)return this.processingQueue=!0,this.show(this.queue[0]);this.processingQueue=!1},e.init=function(t){var e={};$.extend(!0,e,this.settings,t);var o=this.buildToast(e);return this.addQueue(o),this.onInit(o),o},e.destroy=function(){this.$container.removeData("plugin_coolToast"),this.onDestroy()},e.buildToast=function(t){var e={uuid:"toast-"+this.generateUUID(),placement:t.placement,placementX:t.placementX,placementY:t.placementY,offset:t.offset,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,dismiss:t.dismiss,size:t.size,header:t.header,theme:t.theme,title:t.title,content:t.content,template:t.template,maxBodyHeight:t.maxBodyHeight,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return"function"==typeof e.content?e.$el=$(e.template()):e.$el=$(this._renderTemplate(e)),e.$inner=e.$el.find(".toast-inner"),e.$closeBtn=e.$el.find("[data-toast-close]"),this.log(e),this.toasts.push(e),e},e.bindEvents=function(t){var e=this,o=this;t.$el.on("click","[data-toast-close]",function(){t.$el&&o.close(t)}),$(window).on("resize",I(function(){t.$el&&e.setPosition(t)},250))},e.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},e.setPosition=function(t,e,o,i){if("undefined"!=typeof o&&null!==o||(o=t.placementY),"undefined"!=typeof i&&null!==i||(i=t.placementX),i&&o||(e=t.placement),t.offset){var n=t.offset.split(",");parseInt(n[0],10),parseInt(n[1],10)}var s,a,l=t.$el.outerWidth(!0),r=t.$el.outerHeight(!0);e?"top-left"===e?(s=0,a=0,t.offset?(s+=offsetX,a+=offsetY):(s+=30,a+=30)):"top-center"===e?(s=this.$container.width()/2-l/2,a=0,this.log(this.$container.width),t.offset?(s+=offsetX,a+=offsetY):a+=30):"top-right"===e?(s=this.$container.width()-l,a=0,t.offset?(s+=-offsetX,a+=offsetY):(s+=-30,a+=30)):"center-left"===e?(s=0,a=this.$container.height()/2-r/2,t.offset?(s+=offsetX,a+=offsetY):s+=30):"center-center"===e?(s=this.$container.width()/2-l/2,a=this.$container.height()/2-r/2,t.offset&&(s+=offsetX,a+=offsetY)):"center-right"===e?(s=this.$container.width()-l,a=this.$container.height()/2-r/2,t.offset?(s+=-offsetX,a+=offsetY):s+=-30):"bottom-left"===e?(s=0,a=this.$container.height()-r,t.offset?(s+=offsetX,a+=-offsetY):(s+=30,a+=-30)):"bottom-center"===e?(s=this.$container.width()/2-l/2,a=this.$container.height()-r,t.offset?(s+=offsetX,a+=-offsetY):a+=-30):"bottom-right"===e&&(s=this.$container.width()-l,a=this.$container.height()-r,t.offset?(s+=-offsetX,a+=-offsetY):(s+=-30,a+=-30)):(s=i,a=o),t.$el.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+s+"px, "+a+"px, 0px)","will-change":"transform"}),this.log("Toast width: "+l+"px"),this.log("Toast height: "+r+"px"),this.log("Toast position Y: "+s+"px"),this.log("Toast position x: "+a+"px")},e.show=function(t){var e=this;this.$container.append(t.$el),this.bindEvents(t),this.setPosition(t),t.animation?(t.$el.addClass("show"),t.$inner.addClass(t.animationSpeed),t.$inner.animateCss(t.animationIn)):t.$el.addClass("show"),t.dismiss&&setTimeout(function(){e.close(t)},1e3*t.dismiss),this.onShow(t)},e.close=function(t){var e=this;t.animation&&!t.$inner.hasClass("animated")?(t.$el.removeClass("show"),t.$inner.animateCss(t.animationOut,function(){t.$el.remove(),e.toasts=$.grep(e.toasts,function(e){return e.uuid!=t.uuid}),e.processQueue(),e.onClose(t)})):(t.$el.remove(),this.toasts=$.grep(this.toasts,function(e){return e.uuid!=t.uuid}),this.processQueue(),this.onClose(t))},e.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},e.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},e.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},e.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},e.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},e._renderTemplate=function(t){var e,o=this.faPro?"far":"fas",i="",n="",s="";return i="function"==typeof t.content?t.content():t.content,t.header?n='\n <div class="toast-header">\n\n <span>'+t.title+'</span>\n\n <button type="button" data-toast-close>\n <i class="'+o+' fa-times icon"></i>\n </button>\n\n </div>\n ':s='\n <button type="button" data-toast-close>\n\n <i class="'+o+' fa-times icon"></i>\n\n </button>\n ',e='\n <div class="toast-body">\n\n <span>'+i+"</span>\n "+s+"\n\n </div>\n ",'\n <div class="toast toast-'+t.size+" toast-"+t.theme+'" role="alert" id="'+t.uuid+'">\n\n <div class="toast-inner">\n\n '+n+"\n "+e+"\n\n </div>\n\n </div>\n "},t._jQueryInterface=function(e){return this.each(function(){var o=$(this).data("plugin_coolToast");if(o||(o=new t(this,"object"==typeof e&&e),$(this).data("plugin_coolToast",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}})},t}();if("undefined"!=typeof $){var G,J=$.fn[q];$.fn[q]=V._jQueryInterface,$.fn[q].Constructor=V,$.fn[q].noConflict=function(){return $.fn[q]=J,V._jQueryInterface},$.fn[q].defaults=((G={title:"",content:"",template:"",theme:"dark",placement:"bottom-center",placementX:null,placementY:null,animation:!0,animationIn:"slideInUp",animationOut:"slideOutDown",animationSpeed:"faster",offset:null,size:null,dismiss:3,header:!1,faPro:!1,debug:!1,onInitialize:null,onDestroy:null,onInit:null}).onDestroy=null,G.onShow=null,G.onClose=null,G)}var Z="coolDialog",tt=function(){function t(t,e){this.settings={},window.Cool.settings.dialog?$.extend(!0,this.settings,$.fn[Z].defaults,window.Cool.settings.dialog,e):$.extend(!0,this.settings,$.fn[Z].defaults,e),this.container=t,this.$container=$(this.container),this.debug=this.settings.debug,this.faPro=this.settings.faPro,this.dialogs=[],this.onInitialize=this.settings.onInitialize,this.onDestroy=this.settings.onDestroy}var e=t.prototype;return e.init=function(t){var e={};$.extend(!0,e,this.settings,t);var o=this.buildDialog(e);return this.show(o),this.bindEvents(o),this.onInit(o),o},e.destroy=function(){this.$container.removeData("plugin_coolDialog"),this.onDestroy()},e.buildDialog=function(t){var e=this,o={uuid:"dialog-"+this.generateUUID(),title:t.title,template:t.template,body:t.body,footer:t.footer,size:t.size,classes:t.classes,centered:t.centered,backdrop:t.backdrop,preventScroll:t.preventScroll,closeBtn:t.closeBtn,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,callbacks:t.callbacks,maxBodyHeight:t.maxBodyHeight,overflowVisible:t.overflowVisible,actions:t.actions,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return null==o.maxBodyHeight&&(o.maxBodyHeight=window.innerHeight-200),"function"==typeof o.template?o.$el=$(o.template()):o.$el=$(this._renderTemplate(o)),o.show=function(){e.show(o)},o.close=function(){e.close(o)},this.log(o),this.dialogs.push(o),o},e.bindEvents=function(t){var e=this;t.$el.on("click","[data-dialog-close]",function(o){t.$el.trigger("dialog.close"),"function"==typeof t.callbacks.close?t.callbacks.close.call(e,function(){e.close(t)},t):e.close(t)}),t.$el.on("click","[data-dialog-remove]",function(o){t.$el.trigger("dialog.remove"),"function"==typeof t.callbacks.remove&&t.callbacks.remove.call(e,function(){e.close(t)},t)}),t.$el.on("click","[data-dialog-confirm]",I(function(o){t.$el.trigger("dialog.close"),"function"==typeof t.callbacks.confirm?t.callbacks.confirm.call(e,function(){e.close(t)},t):e.close(t)}))},e.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},e.show=function(t){var e=this;if(this.$container.hasClass("has-dialogs")||this.$container.addClass("has-dialogs"),t.preventScroll&&!this.$container.hasClass("dialog-prevent-scroll")&&this.$container.addClass("dialog-prevent-scroll"),this.dialogs.length>1){var o=$(this.dialogs).eq(-2)[0].$el,i=parseInt(o.css("z-index"),10)+1;t.$el.css("z-index",i),o.css({transition:"opacity 0.3s",opacity:0,visibility:"visible"})}if(t.backdrop&&$(".dialog-backdrop").length<1){this.$container.append('<div class="dialog-backdrop"></div>');var n=setInterval(function(){0==e.dialogs.length&&$(".dialog-backdrop").length&&($(".dialog-backdrop").remove(),clearInterval(n))},100)}this.$container.append(t.$el),t.animation&&t.$el.find(".dialog-content").addClass(t.animationSpeed).animateCss(t.animationIn),this.onShow(t)},e.close=function(t){var e=this,o=null;this.dialogs.length>1&&(o=$(this.dialogs).eq(-2)[0].$el),0===$('.dialog[data-dialog-backdrop="true"]').length&&$(".dialog-backdrop").length&&$(".dialog-backdrop").remove(),t.animation?t.$el.find(".dialog-content").animateCss(t.animationOut,function(){t.$el.remove(),e.dialogs=$.grep(e.dialogs,function(e){return e.uuid!=t.uuid}),0==e.dialogs.length?(e.$container.removeClass("has-dialogs"),e.$container.hasClass("dialog-prevent-scroll")&&e.$container.removeClass("dialog-prevent-scroll")):o&&o.css("opacity",1)}):(t.$el.remove(),this.dialogs=$.grep(this.dialogs,function(e){return e.uuid!=t.uuid}),0==this.dialogs.length?(this.$container.removeClass("has-dialogs"),this.$container.hasClass("dialog-prevent-scroll")&&this.$container.removeClass("dialog-prevent-scroll")):o&&o.css("opacity",1)),this.onClose(t)},e.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},e.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},e.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},e.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},e.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},e._renderFooter=function(t){var e="";if("function"==typeof t.footer)e=t.footer();else if(""!==t.footer&&!1!==t.footer&&!0!==t.footer)e=t.footer;else{if(!0!==t.footer)return e;var o="",i="",n="";t.actions.close.visible&&(o='\n <button type="button" class="btn '+(t.actions.close.primary?"btn-primary":"btn-secondary")+(t.actions.close.classes?" "+t.actions.close.classes:"")+'"'+(t.actions.close.attrs?" "+t.actions.close.attrs:"")+" data-dialog-close>\n "+t.actions.close.content+"\n </button>\n "),t.actions.remove.visible&&(i='\n <button type="button" class="btn '+(t.actions.remove.primary?"btn-primary":"btn-secondary")+(t.actions.remove.classes?" "+t.actions.remove.classes:"")+'"'+(t.actions.remove.attrs?" "+t.actions.remove.attrs:"")+" data-dialog-remove>\n "+t.actions.remove.content+"\n </button>\n "),t.actions.confirm.visible&&(n='\n <button type="button" class="btn '+(t.actions.confirm.primary?"btn-primary":"btn-secondary")+(t.actions.confirm.classes?" "+t.actions.confirm.classes:"")+'"'+(t.actions.confirm.attrs?" "+t.actions.confirm.attrs:"")+" data-dialog-confirm>\n "+t.actions.confirm.content+"\n </button>\n "),e="\n "+o+"\n "+i+"\n "+n+"\n "}if(e)return'\n <div class="dialog-footer">\n '+e+"\n </div>\n "},e._renderTemplate=function(t){var e=this.faPro?"far":"fas",o=t.classes?" "+t.classes:"",i=t.centered?" dialog-centered":"",n=t.size?" dialog-"+t.size:"",s=t.overflowVisible?" dialog-overflow-visible":"",a=' data-dialog-uuid="'+t.uuid+'"',l=t.backdrop?' data-dialog-backdrop="true"':' data-dialog-backdrop="false"',r=t.title,h=t.closeBtn?'<button type="button" data-dialog-close><i class="'+e+' fa-times icon"></i></button>':"",c=t.maxBodyHeight?' style="max-height: '+t.maxBodyHeight+'px"':"",d=this._renderFooter(t);return'\n <div class="dialog'+o+i+n+s+'"'+a+l+'>\n\n <div class="dialog-container">\n\n <div class="dialog-content">\n\n <div class="dialog-header">\n\n <span class="dialog-title">\n '+r+"\n </span>\n\n "+h+'\n\n </div>\n\n <div class="dialog-body"'+c+">\n\n "+("function"==typeof t.body?t.body():t.body)+"\n\n </div>\n\n "+d+"\n\n </div>\n\n </div>\n\n </div>\n "},t._jQueryInterface=function(e){var o=$(this).data("plugin_coolDialog");if(o||(o=new t(this,"object"==typeof e&&e),$(this).data("plugin_coolDialog",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}},t}();if("undefined"!=typeof $){var et,ot=$.fn[Z];$.fn[Z]=tt._jQueryInterface,$.fn[Z].Constructor=tt,$.fn[Z].noConflict=function(){return $.fn[Z]=ot,tt._jQueryInterface},$.fn[Z].defaults=((et={title:"",template:"",body:"",footer:!0,size:"",classes:"",centered:!0,backdrop:!0,preventScroll:!0,closeBtn:!0,animation:!0,animationIn:"zoomIn",animationOut:"fadeOut",animationSpeed:"fastest",callbacks:{},maxBodyHeight:null,overflowVisible:!1,faPro:!1,debug:!0,onInitialize:null,onDestroy:null,onInit:null}).onDestroy=null,et.onShow=null,et.onClose=null,et.actions={close:{primary:!1,visible:!0,content:"Close",classes:"",attrs:""},remove:{primary:!1,visible:!0,content:"Remove",classes:"",attrs:""},confirm:{primary:!0,visible:!0,content:"Confirm",classes:"",attrs:""}},et)}return{Common:T,Popover:H,Select:W,Dropdown:L,Tooltip:_,SectionTabs:B,Collapse:K,Toast:V,Dialog:tt}});
|
|
12
12
|
//# sourceMappingURL=cool.bundle.min.js.map
|