@finqu/cool 1.2.29 → 1.3.0
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/README.md +680 -1
- package/dist/css/cool.css +23575 -16644
- package/dist/css/cool.css.map +1 -154
- package/dist/css/cool.min.css +89 -3
- package/dist/css/cool.min.css.map +1 -1
- package/dist/js/cool.bundle.js +15402 -3800
- package/dist/js/cool.bundle.js.map +1 -1
- package/dist/js/cool.bundle.min.js +20 -8
- package/dist/js/cool.bundle.min.js.map +1 -1
- package/dist/js/cool.esm.js +4269 -3360
- package/dist/js/cool.esm.js.map +1 -1
- package/dist/js/cool.esm.min.js +9 -8
- package/dist/js/cool.esm.min.js.map +1 -1
- package/dist/js/cool.js +4271 -3362
- package/dist/js/cool.js.map +1 -1
- package/dist/js/cool.min.js +9 -8
- package/dist/js/cool.min.js.map +1 -1
- package/package.json +94 -61
- package/.babelrc.js +0 -20
- package/.browserslistrc +0 -13
- package/build/.eslintrc.json +0 -10
- package/build/banner.js +0 -14
- package/build/build-plugins.js +0 -92
- package/build/rollup.config.js +0 -46
- package/dist/css/cool-grid.css +0 -4390
- package/dist/css/cool-grid.css.map +0 -30
- package/dist/css/cool-grid.min.css +0 -7
- package/dist/css/cool-grid.min.css.map +0 -1
- package/dist/css/cool-reboot.css +0 -286
- package/dist/css/cool-reboot.css.map +0 -62
- package/dist/css/cool-reboot.min.css +0 -7
- package/dist/css/cool-reboot.min.css.map +0 -1
- package/html/index.html +0 -2703
- package/js/dist/collapse.js +0 -5535
- package/js/dist/collapse.js.map +0 -1
- package/js/dist/common.js +0 -21996
- package/js/dist/common.js.map +0 -1
- package/js/dist/cooldropdown.js +0 -467
- package/js/dist/cooldropdown.js.map +0 -1
- package/js/dist/coolpopover.js +0 -391
- package/js/dist/coolpopover.js.map +0 -1
- package/js/dist/coolsectiontabs.js +0 -256
- package/js/dist/coolsectiontabs.js.map +0 -1
- package/js/dist/coolselect.js +0 -796
- package/js/dist/coolselect.js.map +0 -1
- package/js/dist/cooltooltip.js +0 -360
- package/js/dist/cooltooltip.js.map +0 -1
- package/js/dist/coolui.js +0 -73
- package/js/dist/coolui.js.map +0 -1
- package/js/dist/dropdown.js +0 -27421
- package/js/dist/dropdown.js.map +0 -1
- package/js/dist/popover.js +0 -9472
- package/js/dist/popover.js.map +0 -1
- package/js/dist/sectiontabs.js +0 -4483
- package/js/dist/sectiontabs.js.map +0 -1
- package/js/dist/select.js +0 -37080
- package/js/dist/select.js.map +0 -1
- package/js/dist/tooltip.js +0 -8786
- package/js/dist/tooltip.js.map +0 -1
- package/js/index.esm.js +0 -21
- package/js/index.umd.js +0 -21
- package/js/src/abstract-ui-component.js +0 -81
- package/js/src/collapse.js +0 -286
- package/js/src/common.js +0 -296
- package/js/src/dialog.js +0 -579
- package/js/src/dropdown.js +0 -525
- package/js/src/popover.js +0 -632
- package/js/src/section-tabs.js +0 -215
- package/js/src/select.js +0 -1342
- package/js/src/toast.js +0 -581
- package/js/src/tooltip.js +0 -591
- package/js/src/util/animate-css.js +0 -22
- package/js/src/util/index.js +0 -122
- package/js/src/util/perfect-scrollbar.js +0 -1316
- package/less/alert.less +0 -345
- package/less/badge.less +0 -38
- package/less/bootstrap-noconflict.less +0 -23
- package/less/bootstrap.less +0 -23
- package/less/button-group.less +0 -153
- package/less/buttons.less +0 -287
- package/less/dialog-noconflict.less +0 -174
- package/less/dialog.less +0 -203
- package/less/dropdown.less +0 -209
- package/less/forms.less +0 -770
- package/less/images.less +0 -242
- package/less/input-group.less +0 -163
- package/less/list-group.less +0 -73
- package/less/mixins/aspect-ratio.less +0 -23
- package/less/mixins/border-radius.less +0 -24
- package/less/mixins/box-shadow.less +0 -4
- package/less/mixins/buttons.less +0 -17
- package/less/mixins/caret.less +0 -51
- package/less/mixins/clearfix.less +0 -10
- package/less/mixins/gradients.less +0 -34
- package/less/mixins/nav-divider.less +0 -7
- package/less/mixins/object-fit.less +0 -13
- package/less/mixins/reset-text.less +0 -16
- package/less/mixins.less +0 -11
- package/less/package.json +0 -11
- package/less/pagination.less +0 -69
- package/less/popover.less +0 -143
- package/less/project.sublime-workspace +0 -774
- package/less/reboot.less +0 -235
- package/less/section.less +0 -793
- package/less/select.less +0 -150
- package/less/tables.less +0 -737
- package/less/tabs.less +0 -162
- package/less/tooltip.less +0 -87
- package/less/type.less +0 -71
- package/less/utilities/align.less +0 -27
- package/less/utilities/animate.less +0 -3512
- package/less/utilities/background.less +0 -70
- package/less/utilities/borders.less +0 -16
- package/less/utilities/color.less +0 -70
- package/less/utilities/cursor.less +0 -8
- package/less/utilities/display.less +0 -38
- package/less/utilities/embed.less +0 -61
- package/less/utilities/flex.less +0 -76
- package/less/utilities/jquery-ui.less +0 -116
- package/less/utilities/lazyload.less +0 -29
- package/less/utilities/overflow.less +0 -11
- package/less/utilities/pace.less +0 -25
- package/less/utilities/placeholder.less +0 -60
- package/less/utilities/position.less +0 -42
- package/less/utilities/scrollbar.less +0 -152
- package/less/utilities/spacing.less +0 -197
- package/less/utilities/text.less +0 -68
- package/less/utilities/transform.less +0 -7
- package/less/utilities.less +0 -21
- package/less/variables.less +0 -343
- package/scss/LISENCE +0 -15
- package/scss/_alert.scss +0 -102
- package/scss/_badge.scss +0 -102
- package/scss/_button-group.scss +0 -129
- package/scss/_buttons.scss +0 -248
- package/scss/_custom-forms.scss +0 -444
- package/scss/_dialog.scss +0 -160
- package/scss/_dropdown.scss +0 -233
- package/scss/_forms.scss +0 -258
- package/scss/_frame.scss +0 -627
- package/scss/_functions.scss +0 -124
- package/scss/_grid.scss +0 -35
- package/scss/_images.scss +0 -361
- package/scss/_input-group.scss +0 -285
- package/scss/_list-group.scss +0 -82
- package/scss/_mixins.scss +0 -34
- package/scss/_navbar.scss +0 -290
- package/scss/_notification.scss +0 -13
- package/scss/_pagination.scss +0 -88
- package/scss/_popover.scss +0 -167
- package/scss/_reboot.scss +0 -284
- package/scss/_root.scss +0 -15
- package/scss/_section.scss +0 -977
- package/scss/_select.scss +0 -187
- package/scss/_tables.scss +0 -735
- package/scss/_tabs.scss +0 -178
- package/scss/_toast.scss +0 -182
- package/scss/_tooltip.scss +0 -101
- package/scss/_type.scss +0 -129
- package/scss/_utilities.scss +0 -23
- package/scss/_variables.scss +0 -823
- package/scss/cool-grid.scss +0 -29
- package/scss/cool-reboot.scss +0 -11
- package/scss/cool.scss +0 -37
- package/scss/mixins/_alert-variant.scss +0 -20
- package/scss/mixins/_aspect-ratio.scss +0 -29
- package/scss/mixins/_background-variant.scss +0 -25
- package/scss/mixins/_badge-variant.scss +0 -36
- package/scss/mixins/_breakpoints.scss +0 -102
- package/scss/mixins/_buttons.scss +0 -104
- package/scss/mixins/_caret.scss +0 -80
- package/scss/mixins/_clearfix.scss +0 -10
- package/scss/mixins/_float.scss +0 -14
- package/scss/mixins/_forms.scss +0 -67
- package/scss/mixins/_gradients.scss +0 -40
- package/scss/mixins/_grid-framework.scss +0 -72
- package/scss/mixins/_grid.scss +0 -60
- package/scss/mixins/_nav-divider.scss +0 -9
- package/scss/mixins/_notification-variant.scss +0 -7
- package/scss/mixins/_object-fit.scss +0 -16
- package/scss/mixins/_reset-text.scss +0 -19
- package/scss/mixins/_text-emphasis.scss +0 -21
- package/scss/mixins/_text-hide.scss +0 -10
- package/scss/mixins/_text-truncate.scss +0 -81
- package/scss/mixins/_visibility.scss +0 -7
- package/scss/project.sublime-workspace +0 -491
- package/scss/utilities/_align.scss +0 -41
- package/scss/utilities/_animate.scss +0 -3512
- package/scss/utilities/_background.scss +0 -14
- package/scss/utilities/_borders.scss +0 -146
- package/scss/utilities/_clearfix.scss +0 -6
- package/scss/utilities/_collapse.scss +0 -33
- package/scss/utilities/_cursor.scss +0 -22
- package/scss/utilities/_display.scss +0 -16
- package/scss/utilities/_embed.scss +0 -78
- package/scss/utilities/_flex.scss +0 -52
- package/scss/utilities/_lazyload.scss +0 -31
- package/scss/utilities/_overflow.scss +0 -6
- package/scss/utilities/_perfect-scrollbar.scss +0 -141
- package/scss/utilities/_placeholder.scss +0 -77
- package/scss/utilities/_position.scss +0 -30
- package/scss/utilities/_sizing.scss +0 -32
- package/scss/utilities/_spacing.scss +0 -92
- package/scss/utilities/_text.scss +0 -99
- package/scss/utilities/_user-select.scss +0 -14
- package/scss/utilities/_visibility.scss +0 -10
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cool
|
|
3
|
-
* Copyright
|
|
4
|
-
* Licensed under
|
|
2
|
+
* Cool v1.3.0 (undefined)
|
|
3
|
+
* Copyright 2020-2026 Finqu Oy
|
|
4
|
+
* Licensed under ISC
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Cool=e()}(this,function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function e(e,n){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,n){if(e){if("string"==typeof e)return t(e,n);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(e))||n){i&&(e=i);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};
|
|
7
7
|
/*!
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*/function t(t){return getComputedStyle(t)}function e(t,e){for(var i in e){var o=e[i];"number"==typeof o&&(o+="px"),t.style[i]=o}return t}function i(t){var e=document.createElement("div");return e.className=t,e}var o="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function n(t,e){if(!o)throw new Error("No element matching method supported");return o.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 i=t.element.classList,o=l.state.scrolling(e);i.contains(o)?clearTimeout(r[e]):i.add(o)}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 i=this;this.handlers[t]=this.handlers[t].filter(function(o){return!(!e||o===e)||(i.element.removeEventListener(t,o,!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,i){this.eventElement(t).bind(e,i)},u.prototype.unbind=function(t,e,i){var o=this.eventElement(t);o.unbind(e,i),o.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(o),1)},u.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},u.prototype.once=function(t,e,i){var o=this.eventElement(t);o.bind(e,function t(n){o.unbind(e,t),i(n)})};var g=function(t,e,i,o,n){var s;if(void 0===o&&(o=!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,i,o,n){var s=i[0],a=i[1],l=i[2],r=i[3],d=i[4],p=i[5];void 0===o&&(o=!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)),o&&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,i,s,o,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 i=t.element,o=Math.floor(i.scrollTop);t.containerWidth=i.clientWidth,t.containerHeight=i.clientHeight,t.contentWidth=i.scrollWidth,t.contentHeight=i.scrollHeight,i.contains(t.scrollbarXRail)||(a(i,l.element.rail("x")).forEach(function(t){return s(t)}),i.appendChild(t.scrollbarXRail)),i.contains(t.scrollbarYRail)||(a(i,l.element.rail("y")).forEach(function(t){return s(t)}),i.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+i.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(o*(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,i){var o={width:i.railXWidth},n=Math.floor(t.scrollTop);i.isRtl?o.left=i.negativeScrollAdjustment+t.scrollLeft+i.containerWidth-i.contentWidth:o.left=t.scrollLeft;i.isScrollbarXUsingBottom?o.bottom=i.scrollbarXBottom-n:o.top=i.scrollbarXTop+n;e(i.scrollbarXRail,o);var s={top:n,height:i.railYHeight};i.isScrollbarYUsingRight?i.isRtl?s.right=i.contentWidth-(i.negativeScrollAdjustment+t.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth:s.right=i.scrollbarYRight-t.scrollLeft:i.isRtl?s.left=i.negativeScrollAdjustment+t.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:s.left=i.scrollbarYLeft+t.scrollLeft;e(i.scrollbarYRail,s),e(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),e(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}(i,t),t.scrollbarXActive?i.classList.add(l.state.active("x")):(i.classList.remove(l.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,i.scrollLeft=0),t.scrollbarYActive?i.classList.add(l.state.active("y")):(i.classList.remove(l.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,i.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 i=e[0],o=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[o]-t[i])/(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 i=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=i*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 i=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=i*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(i){if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&(n(e,":hover")||n(t.scrollbarX,":focus")||n(t.scrollbarY,":focus"))){var o,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(o=s,"input,[contenteditable]")||n(o,"select,[contenteditable]")||n(o,"textarea,[contenteditable]")||n(o,"button,[contenteditable]"))return}var a=0,l=0;switch(i.which){case 37:a=i.metaKey?-t.contentWidth:i.altKey?-t.containerWidth:-30;break;case 38:l=i.metaKey?t.contentHeight:i.altKey?t.containerHeight:30;break;case 39:a=i.metaKey?t.contentWidth:i.altKey?t.containerWidth:30;break;case 40:l=i.metaKey?-t.contentHeight:i.altKey?-t.containerHeight:-30;break;case 32:l=i.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(i,o){var n=Math.floor(e.scrollTop);if(0===i){if(!t.scrollbarYActive)return!1;if(0===n&&o>0||n>=t.contentHeight-t.containerHeight&&o<0)return!t.settings.wheelPropagation}var s=e.scrollLeft;if(0===o){if(!t.scrollbarXActive)return!1;if(0===s&&i<0||s>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}(a,l)&&i.preventDefault())}})},wheel:function(e){var i=e.element;function o(o){var n=function(t){var e=t.deltaX,i=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof i||(e=-1*t.wheelDeltaX/6,i=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,i*=10),e!=e&&i!=i&&(e=0,i=t.wheelDelta),t.shiftKey?[-i,-e]:[e,i]}(o),s=n[0],a=n[1];if(!function(e,o,n){if(!v.isWebKit&&i.querySelector("select:focus"))return!0;if(!i.contains(e))return!1;for(var s=e;s&&s!==i;){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&&o<0||s.scrollLeft===h&&o>0))return!0}s=s.parentNode}return!1}(o.target,s,a)){var r=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(a?i.scrollTop-=a*e.settings.wheelSpeed:i.scrollTop+=s*e.settings.wheelSpeed,r=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(s?i.scrollLeft+=s*e.settings.wheelSpeed:i.scrollLeft-=a*e.settings.wheelSpeed,r=!0):(i.scrollTop-=a*e.settings.wheelSpeed,i.scrollLeft+=s*e.settings.wheelSpeed),b(e),(r=r||function(t,o){var n=Math.floor(i.scrollTop),s=0===i.scrollTop,a=n+i.offsetHeight===i.scrollHeight,l=0===i.scrollLeft,r=i.scrollLeft+i.offsetWidth===i.scrollWidth;return!(Math.abs(o)>Math.abs(t)?s||a:l||r)||!e.settings.wheelPropagation}(s,a))&&!o.ctrlKey&&(o.stopPropagation(),o.preventDefault())}}"undefined"!=typeof window.onwheel?e.event.bind(i,"wheel",o):"undefined"!=typeof window.onmousewheel&&e.event.bind(i,"mousewheel",o)},touch:function(e){if(v.supportsTouch||v.supportsIePointer){var i=e.element,o={},n=0,s={},a=null;v.supportsTouch?(e.event.bind(i,"touchstart",d),e.event.bind(i,"touchmove",p),e.event.bind(i,"touchend",u)):v.supportsIePointer&&(window.PointerEvent?(e.event.bind(i,"pointerdown",d),e.event.bind(i,"pointermove",p),e.event.bind(i,"pointerup",u)):window.MSPointerEvent&&(e.event.bind(i,"MSPointerDown",d),e.event.bind(i,"MSPointerMove",p),e.event.bind(i,"MSPointerUp",u)))}function r(t,o){i.scrollTop-=o,i.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);o.pageX=e.pageX,o.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-o.pageX,f=p.pageY-o.pageY;if(function(e,o,n){if(!i.contains(e))return!1;for(var s=e;s&&s!==i;){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&&o<0||s.scrollLeft===h&&o>0))return!0}s=s.parentNode}return!1}(a.target,u,f))return;r(u,f),o=p;var g=(new Date).getTime(),m=g-n;m>0&&(s.x=u/m,s.y=f/m,n=g),function(t,o){var n=Math.floor(i.scrollTop),s=i.scrollLeft,a=Math.abs(t),l=Math.abs(o);if(l>a){if(o<0&&n===e.contentHeight-e.containerHeight||o>0&&0===n)return 0===window.scrollY&&o>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(o,n){var s=this;if(void 0===n&&(n={}),"string"==typeof o&&(o=document.querySelector(o)),!o||!o.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var a in this.element=o,o.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 o.classList.add(l.state.focus)},d=function(){return o.classList.remove(l.state.focus)};this.isRtl="rtl"===t(o).direction,this.isNegativeScroll=(h=o.scrollLeft,o.scrollLeft=-1,r=o.scrollLeft<0,o.scrollLeft=h,r),this.negativeScrollAdjustment=this.isNegativeScroll?o.scrollWidth-o.clientWidth:0,this.event=new u,this.ownerDocument=o.ownerDocument||document,this.scrollbarXRail=i(l.element.rail("x")),o.appendChild(this.scrollbarXRail),this.scrollbarX=i(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=i(l.element.rail("y")),o.appendChild(this.scrollbarYRail),this.scrollbarY=i(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 i=t(e);return m(i.width)+m(i.paddingLeft)+m(i.paddingRight)+m(i.borderLeftWidth)+m(i.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:o.scrollLeft<=0?"start":o.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:o.scrollTop<=0?"start":o.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return y[t](s)}),this.lastScrollTop=Math.floor(o.scrollTop),this.lastScrollLeft=o.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 i="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";this.addClass("animated "+t).one(i,function(i){$(this).removeClass("animated "+t),e&&e()}).children().on(i,function(t){t.stopPropagation()})}}),window.Cool=window.Cool||{},window.Cool.settings=window.Cool.settings||{};var T=function(){function t(){}return t.refresh=function(){$(".form-label-group").each(function(t,e){$(e).find("input, select").val()?$(e).addClass("label-on-top"):$(e).removeClass("label-on-top")})},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")}}),$(document).on("blur input change",".form-label-group",function(){$(this).find("input, select").val()?$(this).addClass("label-on-top"):$(this).removeClass("label-on-top")}),$(".form-label-group").each(function(t,e){$(e).find("input, select").val()?$(e).addClass("label-on-top"):$(e).removeClass("label-on-top")}),$.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] .table-link-exclude, [data-table-link] input, [data-table-link] button, [data-table-link] a, [data-table-link] label, [data-table-link] .td-col-select",function(t){t.stopPropagation()}),$(document).on("click","[data-table-link]",function(t){var e=$(this).parents("table, .table"),i=$(this).data("tableLink");e.hasClass("bulk-actions-active")||(t.ctrlKey||t.metaKey?window.open(i,"_blank"):window.location.href=i)}),$(document).on("click","[data-table-btn] .table-btn-exclude, [data-table-btn] input, [data-table-btn] button, [data-table-btn] a, [data-table-btn] label, [data-table-btn] .td-col-select",function(t){t.stopPropagation()}),$(document).on("click","[data-table-btn]",function(t){var e=$(this).parents("table, .table"),i=$(this).data("tableButton");(i||(i=e.find("button")[0]))&&(e.hasClass("bulk-actions-active")||$(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 i=new C(e[0],{wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0});e.find('[data-toggle="collapse"]').on("click",function(t){if($(this).data("breakpoint")&&window.matchMedia("(min-width: "+$(this).data("breakpoint")+"px)").matches){var e=$(this).next().find("li").first().children("a").first();e&&(window.location.href=e.attr("href"))}else setTimeout(function(){i.update()},300)})}var o=$(document).find(".sidebar-tab");o.length&&($.each(o,function(t,e){var i=$(e).find(".tab-content");new C(i[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 S(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}window.Cool.initialize=T.initialize,window.Cool.refresh=T.refresh;var I=function(t,e,i){var o;return function(){var n=this,s=arguments,a=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||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,i){var o;return(o=t.call(this)||this).opts={},window.Cool.settings.popover?$.extend(!0,o.opts,$.fn[P].defaults,window.Cool.settings.popover,i):$.extend(!0,o.opts,$.fn[P].defaults,i),o.el=e,o.debug=o.opts.debug,o.init(),o}S(e,t);var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$el.removeData(E),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.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())},i.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,I(function(){t.popupHasFocus||t.close()},500))):"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))},i.unbindEvents=function(){this.$el.off("."+P)},i.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)})},i.buildPopover=function(){var t,e=this;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.$container.find("#"+this.id).on("mouseenter",function(){e.popupHasFocus=!0}),this.$container.find("#"+this.id).on("mouseleave",function(){e.popupHasFocus=!1,e.close()}),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)},i.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$popover.addClass("popover-"+t);var e,i,o,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?(i=Math.round(c-(a-r)/2),o=Math.round(d-l),e=Math.round(a/2-p/2),this.$arrow.css({left:e+"px"})):"right"===t?(i=Math.round(c+r),o=Math.round(d-(l-h)/2),e=Math.round(l/2-u/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(i=Math.round(c-(a-r)/2),o=Math.round(d+h),e=Math.round(a/2-p/2),this.$arrow.css({left:e+"px"})):"left"===t&&(i=Math.round(c-a),o=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("+i+"px, "+o+"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>=i+$&&["top","bottom"].indexOf(t)<0?(this.log("Popover adjusting width"),a-=$,i+=$):(this.log("Popover adjusting position x"),i+=$,e-=$)}if(m.top){this.log("Popover overflowing from top");var v=Math.abs(g.top);this.log("Popover adjusting position y"),o+=v,e-=v}if(m.right){this.log("Popover overflowing from right");var b=Math.abs(g.right);c<=i-b&&["top","bottom"].indexOf(t)<0?(this.log("Popover adjusting width"),a-=b):(this.log("Popover adjusting position x"),i-=b,e+=b)}if(m.bottom){this.log("Popover overflowing from bottom");var w=Math.abs(g.bottom);this.log("Popover adjusting position y"),o-=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("+i+"px, "+o+"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: "+i+"px"),this.log("Popover position y: "+o+"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: "+i+"px"),this.log("Popover position y: "+o+"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")},i.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())},i.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 i=$(this).data(E);if(i||(i=new e(this,"object"==typeof t&&t),$(this).data(E,i)),"string"==typeof t){if("undefined"==typeof i[t])throw new TypeError('No method named "'+t+'"');i[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,i){var o;return(o=t.call(this)||this).opts={},window.Cool.settings.select?$.extend(!0,o.opts,$.fn[A].defaults,window.Cool.settings.select,i):$.extend(!0,o.opts,$.fn[A].defaults,i),o.el=e,o.debug=o.opts.debug,o.init(),o}S(e,t);var i=e.prototype;return i.init=function(){var t=this;this.buildCache().then(function(){t.buildScroll(),t.bindEvents(),t.data[t.name].length>0&&t.setData(),t.onInit()})},i.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolSelect"),this.onDestroy()},i.update=function(){this.buildCache(),this.bindEvents(),this.onUpdate()},i.reset=function(){this.data={},this.data[this.name]=[],this.items=[],this.$select.find(".select-item").remove(),this.$selectItems=[],this.$selectIconContainer.html(this.selectIconDefault),this.$selectHeader.removeClass("select-placeholder"),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.addClass("select-placeholder"),this.$selectIconContainer.addClass("d-none"),this.$selectTitle.html(this.dynamicTitleEmptyDefault)),this.showSearch&&(this.searchData=[],this.$searchInput.val(""),this.searchString="",this.search.call(this))},i.buildCache=function(){var t=this;return new Promise(function(e,i){var o=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[o.primaryKeyword]?-1===o.itemsToExclude.indexOf(t[o.primaryKeyword].toString()):-1===o.itemsToExclude.indexOf(t.toString())})),t.items.length>0&&t.itemsToExclude.length>0&&(t.items=t.items.filter(function(t){return t[o.primaryKeyword]?-1===o.itemsToExclude.indexOf(t[o.primaryKeyword].toString()):-1===o.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,i){if(t.$select.length){var n=t.$select.find(".select-item");n.length>0&&t.itemsToExclude.length>0&&$.each(n,function(t,e){var i=$(e).find(":input").val();o.itemsToExclude.indexOf(i)>-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"),t.$selectHeader.removeClass("select-placeholder"),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.addClass("select-placeholder"),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()})})},i.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))}},i.buildSearchData=function(){var t=this;return new Promise(function(e,i){t.searchData=[];var o=t.$select.find("[data-label]");$.each(o,function(e,i){t.searchData.push({id:e,val:$(i).text().trim()})}),e()})},i.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,i=$(this).val();e.preventClose=!0,"function"==typeof e.confirmCheck&&t.checked?(t.checked=!1,e.confirmCheck(function(o){"confirmed"==o&&(-1===e.data[e.name].indexOf(i)&&e.data[e.name].push(i),t.checked=!0,e.onSelect(t)),setTimeout(function(){e.preventClose=!1},600)},t)):t.checked?(-1===e.data[e.name].indexOf(i)&&e.data[e.name].push(i),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!=i}),e.onSelect(t),setTimeout(function(){e.preventClose=!1},600)):(t.checked=!0,e.confirmUncheck(function(o){"confirmed"==o&&(e.data[e.name]=e.data[e.name].filter(function(t){return t!=i}),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)})},i.unbindEvents=function(){this.$el.off("."+A)},i.getData=function(t){return t?this.data[t]:this.data},i.setData=function(){var t=this,e=this.opts.faPro?"fal":"fas";if(this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+e+' fa-check text-success icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.searchApi.length){var i=this.searchApi,o=this.data[this.name].length,n=0;this.data[this.name].forEach(function(t){i+=encodeURIComponent("#"+t),++n!==o&&(i+="+")}),$.ajax({method:"GET",url:i}).done(function(e){var i=e.map(function(e){return e.id=e[t.primaryKeyword].toString(),e}),o=i.map(function(t){return t.id.toString()});t.data[t.name]=t.data[t.name].filter(function(t){return o.indexOf(t.toString())>-1}),0==t.data[t.name].length&&t.$selectIconContainer.html(t.selectIconDefault),i=i.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(i);$.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(i){var o=e.filter(function(){return this.value==i});o.prop("checked",!0),t.onSelect(o[0])});else if("radio"==t.type){var i=e.filter(function(){return this.value==t.data[t.name][0]});i.prop("checked",!0),i.addClass("checked"),t.dynamicTitle&&t.$selectTitle.html(i.parent().find("[data-label]").text()),t.onSelect(i[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 i=s.filter(function(){return this.value==e});i.prop("checked",!0),t.onSelect(i[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])}}},i.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 i=e.map(function(e){return e.id=e[t.primaryKeyword].toString(),e});i=i.filter(function(e){return-1===t.data[t.name].indexOf(e.id)&&-1===t.itemsToExclude.indexOf(e.id)&&0!=e.id});var o=t._renderItemList(i);$.when(t.$scrollableContent.append(o)).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 i=this.searchData.filter(function(e){return e.val.toLocaleLowerCase().indexOf(t.searchString.toLocaleLowerCase())>-1});this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),i.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()},i.show=function(){var t=this;if(!this.$el.hasClass("show")){var e=$(".select.show"),i=1,o=this.opts.faPro?"fal":"fas";e.length&&(i=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||(i=parseInt(this.$el.css("z-index"),10)+1),this.$el.css({"z-index":i}),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="'+o+' fa-angle-up icon"></i>'),setTimeout(function(){t.$el[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},300),this.contentOpen=!0,this.onShow()}},i.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-success icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.contentOpen=!1,this.onClose()}},i.onSelect=function(t){var e=this,i=this.opts.onSelect,o=$(t).parents(".select-item").data();this.searchApi.length&&!$.isEmptyObject(o)&&($(t).length&&t.checked?this.items.push(o):this.items=$.grep(this.items,function(t){return t[e.primaryKeyword]!=o.id})),"function"==typeof i&&i.call(t,o,this)},i.appendItems=function(t,e){var i=this;return new Promise(function(e,o){var n=i;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){i.items.push(t)});var a=i._renderItemList(t);i.$scrollableContent.prepend(a),i.$selectItems=i.$select.find(".select-item"),i.buildSearchData().then(function(){if(i.$selectItems.length>0)if(i.$select.find(':input[type="checkbox"]').length?i.type="checkbox":i.$select.find(':input[type="radio"]').length&&(i.type="radio"),"checkbox"==i.type)t.forEach(function(t){var e=i.$select.find(":input").filter(function(){return this.value==t.id}),o=e.val().toString();e.prop("checked",!0),-1===i.data[i.name].indexOf(o)&&i.data[i.name].push(o),i.onSelect(e[0])});else if("radio"==i.type){var o=t[0],n=i.$select.find(":input").filter(function(){return this.value==o.id}),s=n.val().toString();n.prop("checked",!0),n.addClass("checked"),-1===i.data[i.name].indexOf(s)&&(i.data[i.name]=[s]),i.dynamicTitle&&i.$selectTitle.html(n.parent().find("[data-label]").text()),i.$select.find('input[type="radio"]').not(n).prop("checked",!1),i.$select.find('input[type="radio"]').not(n).removeClass("checked"),i.onSelect(n[0])}0==i.data[i.name].length&&i.dynamicTitle&&i.dynamicTitleDefault&&0!==i.dynamicTitleDefault&&0==i.$selectTitle.text().trim()&&(i.$selectItems.length>0||i.searchApi)&&i.$selectTitle.html(i.dynamicTitleDefault),i.$selectHeader.attr("style")&&i.$selectHeader.removeAttr("style"),i.$selectIconContainer.hasClass("d-none")&&i.$selectIconContainer.removeClass("d-none"),e()})})},i.deselectItems=function(t){var e=this;return new Promise(function(i,o){t.forEach(function(t){var i=e.$select.find(":input").filter(function(){return this.value==t});i[0].checked&&i.trigger("click")}),0==e.data[e.name].length&&e.$selectIconContainer.html(e.selectIconDefault)})},i.getItem=function(t,e){var i=$.grep(this.items,function(i){return i[t]==e})[0];return i||null},i.getSelectedItems=function(t){var e=[],i=[],o=this.data[this.name];return $.isArray(o)?e=o:e.push(o),e=e.map(String),this.items.length>0?(i=$.grep(this.items,function(t){return e.indexOf(t.id.toString())>-1}),t&&(i=i.map(function(e){return e[t]}).filter(function(t){return null!=t}))):i=e,i},i.getSelectedItem=function(t){var e=[],i=[],o=this.data[this.name];return $.isArray(o)?e=o:e.push(o),e=e.map(String),this.items.length>0?(i=$.grep(this.items,function(t){return e.indexOf(t.id.toString())>-1}),t&&(i=i.map(function(e){return e[t]}).filter(function(t){return null!=t}))):i=e,null==i[0]?null:i[0]},i._renderItemList=function(t){for(var e=[],i=0;i<t.length;++i){var o=t[i],n="";"function"==typeof this.labelTemplate?n=this.labelTemplate(o):o.name?n=o.name:o.label?n=o.label:o.value&&(n=o.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[i].id+'" value="'+t[i].id+'" tabindex="-1">\n\n <label for="select-'+this.name+"-"+t[i].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(o))}return e},i._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""},i._renderFooter=function(){return this.showFooter?'\n\n <div class="select-footer">\n\n <button class="btn btn-block btn-light btn-sm" 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 i=$(this).data("plugin_coolSelect");if(i||(i=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolSelect",i)),"string"==typeof t){if("undefined"==typeof i[t])throw new TypeError('No method named "'+t+'"');i[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,i){var o;return(o=t.call(this)||this).opts={},window.Cool.settings.dropdown?$.extend(!0,o.opts,$.fn[O].defaults,window.Cool.settings.dropdown,i):$.extend(!0,o.opts,$.fn[O].defaults,i),o.el=e,o.debug=o.opts.debug,o.init(),o}S(e,t);var i=e.prototype;return i.init=function(){var t=this;$.when(this.buildCache()).then(function(){t.buildScroll(),t.bindEvents(),t.onInit()})},i.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolDropdown"),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.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})},i.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")))},i.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))},i.unbindEvents=function(){this.$el.off("."+O)},i.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)})},i.setPosition=function(t){"undefined"!=typeof str&&null!==str||(t=this.placement);var e=this.$dropdown.outerWidth(!0),i=this.$dropdown.outerHeight(!0),o=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?o-e:s,r=a-i):"right"===t?(l=s+o,r=a):"bottom"===t?(l="end"===this.align?o-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<i?(this.$dropdown.css("max-height",f.height),i=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+o&&(l=s+o-e,a+n>r&&(r=a+n+(c>0?c:0))),r<a&&m<i&&(r=a+n+c),r>=a&&b<i&&(r=l>=s+o||s>=l+e?a-(i-b):a-i-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: "+o+"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: "+i+"px"),this.log("Dropdown position x: "+l+"px"),this.log("Dropdown position y: "+r+"px")},i.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())},i.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())},i.onItemClick=function(t){var e=this.opts.onItemClick;"function"==typeof e&&e.call(t)},e._jQueryInterface=function(t){return this.each(function(){var i=$(this).data("plugin_coolDropdown");if(i||(i=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolDropdown",i)),"string"==typeof t){if("undefined"==typeof i[t])throw new TypeError('No method named "'+t+'"');i[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,i){var o;return(o=t.call(this)||this).opts={},window.Cool.settings.tooltip?$.extend(!0,o.opts,$.fn[R].defaults,window.Cool.settings.tooltip,i):$.extend(!0,o.opts,$.fn[R].defaults,i),o.el=e,o.debug=o.opts.debug,o.init(),o}S(e,t);var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolTooltip"),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.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,this.trigger=this.$el.data("trigger")?this.$el.data("trigger"):this.opts.trigger},i.bindEvents=function(){var t=this;"auto"===this.trigger&&(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))},i.unbindEvents=function(){this.$el.off("."+R)},i.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)})},i.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),this.log("Trigger: "+this.trigger)},i.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$tooltip.addClass("tooltip-"+t);var e,i,o,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?(i=Math.round(c-(a-r)/2),o=Math.round(d-l),e=Math.round(a/2-p/2),this.$arrow.css({left:e+"px"})):"right"===t?(i=Math.round(c+r),o=Math.round(d-(l-h)/2),e=Math.round(l/2-u/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(i=Math.round(c-(a-r)/2),o=Math.round(d+h),e=Math.round(a/2-p/2),this.$arrow.css({left:e+"px"})):"left"===t&&(i=Math.round(c-a),o=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("+i+"px, "+o+"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>=i+$&&["top","bottom"].indexOf(t)<0?(this.log("Tooltip adjusting width"),a-=$,i+=$):(this.log("Tooltip adjusting position x"),i+=$,e-=$)}if(m.top){this.log("Tooltip overflowing from top");var v=Math.abs(g.top);this.log("Tooltip adjusting position y"),o+=v,e-=v}if(m.right){this.log("Tooltip overflowing from right");var b=Math.abs(g.right);c<=i-b&&["top","bottom"].indexOf(t)<0?(this.log("Tooltip adjusting width"),a-=b):(this.log("Tooltip adjusting position x"),i-=b,e+=b)}if(m.bottom){this.log("Tooltip overflowing from bottom");var w=Math.abs(g.bottom);this.log("Tooltip adjusting position y"),o-=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("+i+"px, "+o+"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: "+i+"px"),this.log("Tooltip position y: "+o+"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: "+i+"px"),this.log("Tooltip position y: "+o+"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")},i.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())},i.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 i=$(this).data("plugin_coolTooltip");if(i||(i=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolTooltip",i)),"string"==typeof t){if("undefined"==typeof i[t])throw new TypeError('No method named "'+t+'"');i[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:"",trigger:"auto",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var U="coolSectionTabs",z="plugin_coolSectionTabs",B=function(t){function e(e,i){var o;return(o=t.call(this)||this).opts={},window.Cool.settings.sectionTabs?$.extend(!0,o.opts,$.fn[U].defaults,window.Cool.settings.sectionTabs,i):$.extend(!0,o.opts,$.fn[U].defaults,i),o.el=e,o.debug=o.opts.debug,o.init(),o}S(e,t);var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.checkForChanges(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$el.removeData(z),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.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)},i.bindEvents=function(){var t=this;$(window).on("resize",I(function(){t.checkForChanges()},250))},i.unbindEvents=function(){this.$el.off("."+this._name)},i.moveToList=function(t){var e=$(t);e.find(".tab-item-action").removeClass("dropdown-item"),e.insertBefore(this.$dropdownContainer),this.checkForChanges()},i.moveToDropdown=function(t){var e=$(t),i=e.find(".tab-item-action");i.hasClass("dropdown-item")||i.addClass("dropdown-item"),e.appendTo(this.$dropdownList),this.checkForChanges()},i.overflowStatus=function(){return this.$el[0].offsetWidth<this.$el[0].scrollWidth},i.checkForChanges=function(){var t=this.$dropdownList.children(),e=this.$el.find("> .tab-item").not(this.$dropdownContainer),i=this.$el.find("> .tab-item:visible"),o=0;$.each(i,function(t,e){o+=$(e).outerWidth(!0)});var n=this.$el[0].offsetWidth-o;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 i=$(this).data(z);if(i||(i=new e(this,"object"==typeof t&&t),$(this).data(z,i)),"string"==typeof t){if("undefined"==typeof i[t])throw new TypeError('No method named "'+t+'"');i[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,i){var o;return(o=t.call(this)||this).opts={},window.Cool.settings.collapse?$.extend(!0,o.opts,$.fn[Q].defaults,window.Cool.settings.dialog,i):$.extend(!0,o.opts,$.fn[Q].defaults,i),o.el=e,o.debug=o.opts.debug,o.init(),o}S(e,t);var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolCollapse"),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.buildCache=function(){this.$el=$(this.el),this.$target=this.$el.data("target")?$(document).find(this.$el.data("target")):$(document).find(this.opts.target),this.breakpoint=this.$el.data("breakpoint"),this.expanded="true"==this.$el.attr("aria-expanded"),this.transitionendEvent=this.whichTransitionEvent(),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")},i.bindEvents=function(){var t=this;this.$el.on("click."+this.name,function(e){t.breakpoint&&window.matchMedia("(min-width: "+t.breakpoint+"px)").matches||(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))},i.unbindEvents=function(){this.$el.off("."+this.name)},i.whichTransitionEvent=function(){var t=document.createElement("text-transition"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return e[i]},i.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.on(this.transitionendEvent,function(e){$(e.target).is(this)&&(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).off(t.transitionendEvent))}),this.onShow()},i.close=function(){var t=this,e=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.on(this.transitionendEvent,function(t){$(t.target).is(this)&&(e.$target.removeClass("collapsing"),e.$el.is("button")&&e.$el.attr("disabled",!1),e.$target.removeAttr("style"),e.$target.addClass("collapse"),e.$el.attr("aria-expanded",!1),e.expanded=!1,e.targetHeight!==e.$target.height()&&(e.targetHeight=e.$target.height()),$(this).off(e.transitionendEvent))}),this.onClose()},e._jQueryInterface=function(t){return this.each(function(){var i=$(this).data("plugin_coolCollapse");if(i||(i=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolCollapse",i)),"string"==typeof t){if("undefined"==typeof i[t])throw new TypeError('No method named "'+t+'"');i[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 i=this.buildToast(e);return this.addQueue(i),this.onInit(i),i},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,i=this;t.$el.on("click","[data-toast-close]",function(){t.$el&&i.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,i,o){if("undefined"!=typeof i&&null!==i||(i=t.placementY),"undefined"!=typeof o&&null!==o||(o=t.placementX),o&&i||(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=o,a=i),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,i=this.faPro?"far":"fas",o="",n="",s="";return o="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="'+i+' fa-times icon"></i>\n </button>\n\n </div>\n ':s='\n <button type="button" data-toast-close>\n\n <i class="'+i+' fa-times icon"></i>\n\n </button>\n ',e='\n <div class="toast-body">\n\n <span>'+o+"</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 i=$(this).data("plugin_coolToast");if(i||(i=new t(this,"object"==typeof e&&e),$(this).data("plugin_coolToast",i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[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 i=this.buildDialog(e);return this.show(i),this.bindEvents(i),this.onInit(i),i},e.destroy=function(){this.$container.removeData("plugin_coolDialog"),this.onDestroy()},e.buildDialog=function(t){var e=this,i={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==i.maxBodyHeight&&(i.maxBodyHeight=window.innerHeight-200),"function"==typeof i.template?i.$el=$(i.template()):i.$el=$(this._renderTemplate(i)),i.show=function(){e.show(i)},i.close=function(){e.close(i)},this.log(i),this.dialogs.push(i),i},e.bindEvents=function(t){var e=this;t.$el.on("click","[data-dialog-close]",function(i){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(i){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(i){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 i=$(this.dialogs).eq(-2)[0].$el,o=parseInt(i.css("z-index"),10)+1;t.$el.css("z-index",o),i.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,i=null;this.dialogs.length>1&&(i=$(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")):i&&i.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")):i&&i.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 i="",o="",n="";t.actions.close.visible&&(i='\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&&(o='\n <button type="button" class="btn '+"btn-remove"+(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 <div class="spacer"></div>\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",i=t.classes?" "+t.classes:"",o=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'+i+o+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 i=$(this).data("plugin_coolDialog");if(i||(i=new t(this,"object"==typeof e&&e),$(this).data("plugin_coolDialog",i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}},t}();if("undefined"!=typeof $){var et,it=$.fn[Z];$.fn[Z]=tt._jQueryInterface,$.fn[Z].Constructor=tt,$.fn[Z].noConflict=function(){return $.fn[Z]=it,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}});
|
|
8
|
+
* jQuery JavaScript Library v3.7.1
|
|
9
|
+
* https://jquery.com/
|
|
10
|
+
*
|
|
11
|
+
* Copyright OpenJS Foundation and other contributors
|
|
12
|
+
* Released under the MIT license
|
|
13
|
+
* https://jquery.org/license
|
|
14
|
+
*
|
|
15
|
+
* Date: 2023-08-28T13:37Z
|
|
16
|
+
*/
|
|
17
|
+
!function(t){!function(e,n){t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}}("undefined"!=typeof window?window:o,function(t,e){var n=[],i=Object.getPrototypeOf,o=n.slice,s=n.flat?function(t){return n.flat.call(t)}:function(t){return n.concat.apply([],t)},r=n.push,a=n.indexOf,l={},c=l.toString,h=l.hasOwnProperty,d=h.toString,u=d.call(Object),f={},p=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},m=function(t){return null!=t&&t===t.window},g=t.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function b(t,e,n){var i,o,s=(n=n||g).createElement("script");if(s.text=t,e)for(i in v)(o=e[i]||e.getAttribute&&e.getAttribute(i))&&s.setAttribute(i,o);n.head.appendChild(s).parentNode.removeChild(s)}function y(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[c.call(t)]||"object":typeof t}var w="3.7.1",$=/HTML$/i,x=function(t,e){return new x.fn.init(t,e)};function C(t){var e=!!t&&"length"in t&&t.length,n=y(t);return!p(t)&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function E(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}x.fn=x.prototype={jquery:w,constructor:x,length:0,toArray:function(){return o.call(this)},get:function(t){return null==t?o.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=x.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return x.each(this,t)},map:function(t){return this.pushStack(x.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(x.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:r,sort:n.sort,splice:n.splice},x.extend=x.fn.extend=function(){var t,e,n,i,o,s,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==typeof r||p(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)i=t[e],"__proto__"!==e&&r!==i&&(c&&i&&(x.isPlainObject(i)||(o=Array.isArray(i)))?(n=r[e],s=o&&!Array.isArray(n)?[]:o||x.isPlainObject(n)?n:{},o=!1,r[e]=x.extend(c,s,i)):void 0!==i&&(r[e]=i));return r},x.extend({expando:"jQuery"+(w+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==c.call(t))&&(!(e=i(t))||"function"==typeof(n=h.call(e,"constructor")&&e.constructor)&&d.call(n)===u)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){b(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,i=0;if(C(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},text:function(t){var e,n="",i=0,o=t.nodeType;if(!o)for(;e=t[i++];)n+=x.text(e);return 1===o||11===o?t.textContent:9===o?t.documentElement.textContent:3===o||4===o?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(C(Object(t))?x.merge(n,"string"==typeof t?[t]:t):r.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:a.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!$.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,s=t.length,r=!n;o<s;o++)!e(t[o],o)!==r&&i.push(t[o]);return i},map:function(t,e,n){var i,o,r=0,a=[];if(C(t))for(i=t.length;r<i;r++)null!=(o=e(t[r],r,n))&&a.push(o);else for(r in t)null!=(o=e(t[r],r,n))&&a.push(o);return s(a)},guid:1,support:f}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=n[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){l["[object "+e+"]"]=e.toLowerCase()});var T=n.pop,S=n.sort,k=n.splice,A="[\\x20\\t\\r\\n\\f]",I=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g");x.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var L=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function _(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}x.escapeSelector=function(t){return(t+"").replace(L,_)};var D=g,M=r;!function(){var e,i,s,r,l,c,d,u,p,m,g=M,v=x.expando,b=0,y=0,w=tt(),$=tt(),C=tt(),L=tt(),_=function(t,e){return t===e&&(l=!0),0},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="(?:\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",O="\\["+A+"*("+N+")(?:"+A+"*([*^$|!~]?=)"+A+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+A+"*\\]",j=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",z=new RegExp(A+"+","g"),W=new RegExp("^"+A+"*,"+A+"*"),P=new RegExp("^"+A+"*([>+~]|"+A+")"+A+"*"),R=new RegExp(A+"|>"),q=new RegExp(j),F=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,B=/^h\d$/i,U=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),V=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},G=function(){lt()},J=ut(function(t){return!0===t.disabled&&E(t,"fieldset")},{dir:"parentNode",next:"legend"});try{g.apply(n=o.call(D.childNodes),D.childNodes),n[D.childNodes.length].nodeType}catch(t){g={apply:function(t,e){M.apply(t,o.call(e))},call:function(t){M.apply(t,o.call(arguments,1))}}}function Z(t,e,n,i){var o,s,r,a,l,h,d,m=e&&e.ownerDocument,b=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return n;if(!i&&(lt(e),e=e||c,u)){if(11!==b&&(l=U.exec(t)))if(o=l[1]){if(9===b){if(!(r=e.getElementById(o)))return n;if(r.id===o)return g.call(n,r),n}else if(m&&(r=m.getElementById(o))&&Z.contains(e,r)&&r.id===o)return g.call(n,r),n}else{if(l[2])return g.apply(n,e.getElementsByTagName(t)),n;if((o=l[3])&&e.getElementsByClassName)return g.apply(n,e.getElementsByClassName(o)),n}if(!(L[t+" "]||p&&p.test(t))){if(d=t,m=e,1===b&&(R.test(t)||P.test(t))){for((m=Q.test(t)&&at(e.parentNode)||e)==e&&f.scope||((a=e.getAttribute("id"))?a=x.escapeSelector(a):e.setAttribute("id",a=v)),s=(h=ht(t)).length;s--;)h[s]=(a?"#"+a:":scope")+" "+dt(h[s]);d=h.join(",")}try{return g.apply(n,m.querySelectorAll(d)),n}catch(e){L(t,!0)}finally{a===v&&e.removeAttribute("id")}}}return bt(t.replace(I,"$1"),e,n,i)}function tt(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function et(t){return t[v]=!0,t}function nt(t){var e=c.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function it(t){return function(e){return E(e,"input")&&e.type===t}}function ot(t){return function(e){return(E(e,"input")||E(e,"button"))&&e.type===t}}function st(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&J(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function rt(t){return et(function(e){return e=+e,et(function(n,i){for(var o,s=t([],n.length,e),r=s.length;r--;)n[o=s[r]]&&(n[o]=!(i[o]=n[o]))})})}function at(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function lt(t){var e,n=t?t.ownerDocument||t:D;return n!=c&&9===n.nodeType&&n.documentElement?(d=(c=n).documentElement,u=!x.isXMLDoc(c),m=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&D!=c&&(e=c.defaultView)&&e.top!==e&&e.addEventListener("unload",G),f.getById=nt(function(t){return d.appendChild(t).id=x.expando,!c.getElementsByName||!c.getElementsByName(x.expando).length}),f.disconnectedMatch=nt(function(t){return m.call(t,"*")}),f.scope=nt(function(){return c.querySelectorAll(":scope")}),f.cssHas=nt(function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}}),f.getById?(i.filter.ID=function(t){var e=t.replace(K,V);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&u){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(K,V);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&u){var n,i,o,s=e.getElementById(t);if(s){if((n=s.getAttributeNode("id"))&&n.value===t)return[s];for(o=e.getElementsByName(t),i=0;s=o[i++];)if((n=s.getAttributeNode("id"))&&n.value===t)return[s]}return[]}}),i.find.TAG=function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},i.find.CLASS=function(t,e){if("undefined"!=typeof e.getElementsByClassName&&u)return e.getElementsByClassName(t)},p=[],nt(function(t){var e;d.appendChild(t).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||p.push("\\["+A+"*(?:value|"+H+")"),t.querySelectorAll("[id~="+v+"-]").length||p.push("~="),t.querySelectorAll("a#"+v+"+*").length||p.push(".#.+[+~]"),t.querySelectorAll(":checked").length||p.push(":checked"),(e=c.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(e=c.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||p.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")}),f.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),_=function(t,e){if(t===e)return l=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!f.sortDetached&&e.compareDocumentPosition(t)===n?t===c||t.ownerDocument==D&&Z.contains(D,t)?-1:e===c||e.ownerDocument==D&&Z.contains(D,e)?1:r?a.call(r,t)-a.call(r,e):0:4&n?-1:1)},c):c}for(e in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(lt(t),u&&!L[e+" "]&&(!p||!p.test(e)))try{var n=m.call(t,e);if(n||f.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){L(e,!0)}return Z(e,c,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=c&<(t),x.contains(t,e)},Z.attr=function(t,e){(t.ownerDocument||t)!=c&<(t);var n=i.attrHandle[e.toLowerCase()],o=n&&h.call(i.attrHandle,e.toLowerCase())?n(t,e,!u):void 0;return void 0!==o?o:t.getAttribute(e)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},x.uniqueSort=function(t){var e,n=[],i=0,s=0;if(l=!f.sortStable,r=!f.sortStable&&o.call(t,0),S.call(t,_),l){for(;e=t[s++];)e===t[s]&&(i=n.push(s));for(;i--;)k.call(t,n[i],1)}return r=null,t},x.fn.uniqueSort=function(){return this.pushStack(x.uniqueSort(o.apply(this)))},i=x.expr={cacheLength:50,createPseudo:et,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,V),t[3]=(t[3]||t[4]||t[5]||"").replace(K,V),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&q.test(n)&&(e=ht(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(K,V).toLowerCase();return"*"===t?function(){return!0}:function(t){return E(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+A+")"+t+"("+A+"|$)"))&&w(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(i){var o=Z.attr(i,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o.replace(z," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,o){var s="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var c,h,d,u,f,p=s!==r?"nextSibling":"previousSibling",m=e.parentNode,g=a&&e.nodeName.toLowerCase(),y=!l&&!a,w=!1;if(m){if(s){for(;p;){for(d=e;d=d[p];)if(a?E(d,g):1===d.nodeType)return!1;f=p="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(w=(u=(c=(h=m[v]||(m[v]={}))[t]||[])[0]===b&&c[1])&&c[2],d=u&&m.childNodes[u];d=++u&&d&&d[p]||(w=u=0)||f.pop();)if(1===d.nodeType&&++w&&d===e){h[t]=[b,u,w];break}}else if(y&&(w=u=(c=(h=e[v]||(e[v]={}))[t]||[])[0]===b&&c[1]),!1===w)for(;(d=++u&&d&&d[p]||(w=u=0)||f.pop())&&(!(a?E(d,g):1===d.nodeType)||!++w||(y&&((h=d[v]||(d[v]={}))[t]=[b,w]),d!==e)););return(w-=o)===i||w%i===0&&w/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return o[v]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?et(function(t,n){for(var i,s=o(t,e),r=s.length;r--;)t[i=a.call(t,s[r])]=!(n[i]=s[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:et(function(t){var e=[],n=[],i=vt(t.replace(I,"$1"));return i[v]?et(function(t,e,n,o){for(var s,r=i(t,null,o,[]),a=t.length;a--;)(s=r[a])&&(t[a]=!(e[a]=s))}):function(t,o,s){return e[0]=t,i(e,null,s,n),e[0]=null,!n.pop()}}),has:et(function(t){return function(e){return Z(t,e).length>0}}),contains:et(function(t){return t=t.replace(K,V),function(e){return(e.textContent||x.text(e)).indexOf(t)>-1}}),lang:et(function(t){return F.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace(K,V).toLowerCase(),function(e){var n;do{if(n=u?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===function(){try{return c.activeElement}catch(t){}}()&&c.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:st(!1),disabled:st(!0),checked:function(t){return E(t,"input")&&!!t.checked||E(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return B.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){return E(t,"input")&&"button"===t.type||E(t,"button")},text:function(t){var e;return E(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:rt(function(){return[0]}),last:rt(function(t,e){return[e-1]}),eq:rt(function(t,e,n){return[n<0?n+e:n]}),even:rt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:rt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:rt(function(t,e,n){var i;for(i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t}),gt:rt(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=it(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=ot(e);function ct(){}function ht(t,e){var n,o,s,r,a,l,c,h=$[t+" "];if(h)return e?0:h.slice(0);for(a=t,l=[],c=i.preFilter;a;){for(r in n&&!(o=W.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(s=[])),n=!1,(o=P.exec(a))&&(n=o.shift(),s.push({value:n,type:o[0].replace(I," ")}),a=a.slice(n.length)),i.filter)!(o=X[r].exec(a))||c[r]&&!(o=c[r](o))||(n=o.shift(),s.push({value:n,type:r,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?Z.error(t):$(t,l).slice(0)}function dt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function ut(t,e,n){var i=e.dir,o=e.next,s=o||i,r=n&&"parentNode"===s,a=y++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o);return!1}:function(e,n,l){var c,h,d=[b,a];if(l){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,l))return!0}else for(;e=e[i];)if(1===e.nodeType||r)if(h=e[v]||(e[v]={}),o&&E(e,o))e=e[i]||e;else{if((c=h[s])&&c[0]===b&&c[1]===a)return d[2]=c[2];if(h[s]=d,d[2]=t(e,n,l))return!0}return!1}}function ft(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function pt(t,e,n,i,o){for(var s,r=[],a=0,l=t.length,c=null!=e;a<l;a++)(s=t[a])&&(n&&!n(s,i,o)||(r.push(s),c&&e.push(a)));return r}function mt(t,e,n,i,o,s){return i&&!i[v]&&(i=mt(i)),o&&!o[v]&&(o=mt(o,s)),et(function(s,r,l,c){var h,d,u,f,p=[],m=[],v=r.length,b=s||function(t,e,n){for(var i=0,o=e.length;i<o;i++)Z(t,e[i],n);return n}(e||"*",l.nodeType?[l]:l,[]),y=!t||!s&&e?b:pt(b,p,t,l,c);if(n?n(y,f=o||(s?t:v||i)?[]:r,l,c):f=y,i)for(h=pt(f,m),i(h,[],l,c),d=h.length;d--;)(u=h[d])&&(f[m[d]]=!(y[m[d]]=u));if(s){if(o||t){if(o){for(h=[],d=f.length;d--;)(u=f[d])&&h.push(y[d]=u);o(null,f=[],h,c)}for(d=f.length;d--;)(u=f[d])&&(h=o?a.call(s,u):p[d])>-1&&(s[h]=!(r[h]=u))}}else f=pt(f===r?f.splice(v,f.length):f),o?o(null,r,f,c):g.apply(r,f)})}function gt(t){for(var e,n,o,r=t.length,l=i.relative[t[0].type],c=l||i.relative[" "],h=l?1:0,d=ut(function(t){return t===e},c,!0),u=ut(function(t){return a.call(e,t)>-1},c,!0),f=[function(t,n,i){var o=!l&&(i||n!=s)||((e=n).nodeType?d(t,n,i):u(t,n,i));return e=null,o}];h<r;h++)if(n=i.relative[t[h].type])f=[ut(ft(f),n)];else{if((n=i.filter[t[h].type].apply(null,t[h].matches))[v]){for(o=++h;o<r&&!i.relative[t[o].type];o++);return mt(h>1&&ft(f),h>1&&dt(t.slice(0,h-1).concat({value:" "===t[h-2].type?"*":""})).replace(I,"$1"),n,h<o&>(t.slice(h,o)),o<r&>(t=t.slice(o)),o<r&&dt(t))}f.push(n)}return ft(f)}function vt(t,e){var n,o=[],r=[],a=C[t+" "];if(!a){for(e||(e=ht(t)),n=e.length;n--;)(a=gt(e[n]))[v]?o.push(a):r.push(a);a=C(t,function(t,e){var n=e.length>0,o=t.length>0,r=function(r,a,l,h,d){var f,p,m,v=0,y="0",w=r&&[],$=[],C=s,E=r||o&&i.find.TAG("*",d),S=b+=null==C?1:Math.random()||.1,k=E.length;for(d&&(s=a==c||a||d);y!==k&&null!=(f=E[y]);y++){if(o&&f){for(p=0,a||f.ownerDocument==c||(lt(f),l=!u);m=t[p++];)if(m(f,a||c,l)){g.call(h,f);break}d&&(b=S)}n&&((f=!m&&f)&&v--,r&&w.push(f))}if(v+=y,n&&y!==v){for(p=0;m=e[p++];)m(w,$,a,l);if(r){if(v>0)for(;y--;)w[y]||$[y]||($[y]=T.call(h));$=pt($)}g.apply(h,$),d&&!r&&$.length>0&&v+e.length>1&&x.uniqueSort(h)}return d&&(b=S,s=C),w};return n?et(r):r}(r,o)),a.selector=t}return a}function bt(t,e,n,o){var s,r,a,l,c,h="function"==typeof t&&t,d=!o&&ht(t=h.selector||t);if(n=n||[],1===d.length){if((r=d[0]=d[0].slice(0)).length>2&&"ID"===(a=r[0]).type&&9===e.nodeType&&u&&i.relative[r[1].type]){if(!(e=(i.find.ID(a.matches[0].replace(K,V),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(s=X.needsContext.test(t)?0:r.length;s--&&(a=r[s],!i.relative[l=a.type]);)if((c=i.find[l])&&(o=c(a.matches[0].replace(K,V),Q.test(r[0].type)&&at(e.parentNode)||e))){if(r.splice(s,1),!(t=o.length&&dt(r)))return g.apply(n,o),n;break}}return(h||vt(t,d))(o,e,!u,n,!e||Q.test(t)&&at(e.parentNode)||e),n}ct.prototype=i.filters=i.pseudos,i.setFilters=new ct,f.sortStable=v.split("").sort(_).join("")===v,lt(),f.sortDetached=nt(function(t){return 1&t.compareDocumentPosition(c.createElement("fieldset"))}),x.find=Z,x.expr[":"]=x.expr.pseudos,x.unique=x.uniqueSort,Z.compile=vt,Z.select=bt,Z.setDocument=lt,Z.tokenize=ht,Z.escape=x.escapeSelector,Z.getText=x.text,Z.isXML=x.isXMLDoc,Z.selectors=x.expr,Z.support=x.support,Z.uniqueSort=x.uniqueSort}();var H=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&x(t).is(n))break;i.push(t)}return i},N=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},O=x.expr.match.needsContext,j=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(t,e,n){return p(e)?x.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?x.grep(t,function(t){return t===e!==n}):"string"!=typeof e?x.grep(t,function(t){return a.call(e,t)>-1!==n}):x.filter(e,t,n)}x.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?x.find.matchesSelector(i,t)?[i]:[]:x.find.matches(t,x.grep(e,function(t){return 1===t.nodeType}))},x.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(x(t).filter(function(){for(e=0;e<i;e++)if(x.contains(o[e],this))return!0}));for(n=this.pushStack([]),e=0;e<i;e++)x.find(t,o[e],n);return i>1?x.uniqueSort(n):n},filter:function(t){return this.pushStack(z(this,t||[],!1))},not:function(t){return this.pushStack(z(this,t||[],!0))},is:function(t){return!!z(this,"string"==typeof t&&O.test(t)?x(t):t||[],!1).length}});var W,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||W,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof x?e[0]:e,x.merge(this,x.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:g,!0)),j.test(i[1])&&x.isPlainObject(e))for(i in e)p(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(o=g.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):p(t)?void 0!==n.ready?n.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,W=x(g);var R=/^(?:parents|prev(?:Until|All))/,q={children:!0,contents:!0,next:!0,prev:!0};function F(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(x.contains(this,e[t]))return!0})},closest:function(t,e){var n,i=0,o=this.length,s=[],r="string"!=typeof t&&x(t);if(!O.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(r?r.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?x.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?a.call(x(t),this[0]):a.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),x.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return H(t,"parentNode")},parentsUntil:function(t,e,n){return H(t,"parentNode",n)},next:function(t){return F(t,"nextSibling")},prev:function(t){return F(t,"previousSibling")},nextAll:function(t){return H(t,"nextSibling")},prevAll:function(t){return H(t,"previousSibling")},nextUntil:function(t,e,n){return H(t,"nextSibling",n)},prevUntil:function(t,e,n){return H(t,"previousSibling",n)},siblings:function(t){return N((t.parentNode||{}).firstChild,t)},children:function(t){return N(t.firstChild)},contents:function(t){return null!=t.contentDocument&&i(t.contentDocument)?t.contentDocument:(E(t,"template")&&(t=t.content||t),x.merge([],t.childNodes))}},function(t,e){x.fn[t]=function(n,i){var o=x.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=x.filter(i,o)),this.length>1&&(q[t]||x.uniqueSort(o),R.test(t)&&o.reverse()),this.pushStack(o)}});var X=/[^\x20\t\r\n\f]+/g;function Y(t){return t}function B(t){throw t}function U(t,e,n,i){var o;try{t&&p(o=t.promise)?o.call(t).done(e).fail(n):t&&p(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}x.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return x.each(t.match(X)||[],function(t,n){e[n]=!0}),e}(t):x.extend({},t);var e,n,i,o,s=[],r=[],a=-1,l=function(){for(o=o||t.once,i=e=!0;r.length;a=-1)for(n=r.shift();++a<s.length;)!1===s[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=s.length,n=!1);t.memory||(n=!1),e=!1,o&&(s=n?[]:"")},c={add:function(){return s&&(n&&!e&&(a=s.length-1,r.push(n)),function e(n){x.each(n,function(n,i){p(i)?t.unique&&c.has(i)||s.push(i):i&&i.length&&"string"!==y(i)&&e(i)})}(arguments),n&&!e&&l()),this},remove:function(){return x.each(arguments,function(t,e){for(var n;(n=x.inArray(e,s,n))>-1;)s.splice(n,1),n<=a&&a--}),this},has:function(t){return t?x.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=r=[],s=n="",this},disabled:function(){return!s},lock:function(){return o=r=[],n||e||(s=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],r.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},x.extend({Deferred:function(e){var n=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return x.Deferred(function(e){x.each(n,function(n,i){var o=p(t[i[4]])&&t[i[4]];s[i[1]](function(){var t=o&&o.apply(this,arguments);t&&p(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(e,i,o){var s=0;function r(e,n,i,o){return function(){var a=this,l=arguments,c=function(){var t,c;if(!(e<s)){if((t=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,p(c)?o?c.call(t,r(s,n,Y,o),r(s,n,B,o)):(s++,c.call(t,r(s,n,Y,o),r(s,n,B,o),r(s,n,Y,n.notifyWith))):(i!==Y&&(a=void 0,l=[t]),(o||n.resolveWith)(a,l))}},h=o?c:function(){try{c()}catch(t){x.Deferred.exceptionHook&&x.Deferred.exceptionHook(t,h.error),e+1>=s&&(i!==B&&(a=void 0,l=[t]),n.rejectWith(a,l))}};e?h():(x.Deferred.getErrorHook?h.error=x.Deferred.getErrorHook():x.Deferred.getStackHook&&(h.error=x.Deferred.getStackHook()),t.setTimeout(h))}}return x.Deferred(function(t){n[0][3].add(r(0,t,p(o)?o:Y,t.notifyWith)),n[1][3].add(r(0,t,p(e)?e:Y)),n[2][3].add(r(0,t,p(i)?i:B))}).promise()},promise:function(t){return null!=t?x.extend(t,o):o}},s={};return x.each(n,function(t,e){var r=e[2],a=e[5];o[e[1]]=r.add,a&&r.add(function(){i=a},n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),r.add(e[3].fire),s[e[0]]=function(){return s[e[0]+"With"](this===s?void 0:this,arguments),this},s[e[0]+"With"]=r.fireWith}),o.promise(s),e&&e.call(s,s),s},when:function(t){var e=arguments.length,n=e,i=Array(n),s=o.call(arguments),r=x.Deferred(),a=function(t){return function(n){i[t]=this,s[t]=arguments.length>1?o.call(arguments):n,--e||r.resolveWith(i,s)}};if(e<=1&&(U(t,r.done(a(n)).resolve,r.reject,!e),"pending"===r.state()||p(s[n]&&s[n].then)))return r.then();for(;n--;)U(s[n],a(n),r.reject);return r.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&Q.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},x.readyException=function(e){t.setTimeout(function(){throw e})};var K=x.Deferred();function V(){g.removeEventListener("DOMContentLoaded",V),t.removeEventListener("load",V),x.ready()}x.fn.ready=function(t){return K.then(t).catch(function(t){x.readyException(t)}),this},x.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==t&&--x.readyWait>0||K.resolveWith(g,[x]))}}),x.ready.then=K.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?t.setTimeout(x.ready):(g.addEventListener("DOMContentLoaded",V),t.addEventListener("load",V));var G=function(t,e,n,i,o,s,r){var a=0,l=t.length,c=null==n;if("object"===y(n))for(a in o=!0,n)G(t,e,a,n[a],!0,s,r);else if(void 0!==i&&(o=!0,p(i)||(r=!0),c&&(r?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(x(t),n)})),e))for(;a<l;a++)e(t[a],n,r?i:i.call(t[a],a,e(t[a],n)));return o?t:c?e.call(t):l?e(t[0],n):s},J=/^-ms-/,Z=/-([a-z])/g;function tt(t,e){return e.toUpperCase()}function et(t){return t.replace(J,"ms-").replace(Z,tt)}var nt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function it(){this.expando=x.expando+it.uid++}it.uid=1,it.prototype={cache:function(t){var e=t[this.expando];return e||(e={},nt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[et(e)]=n;else for(i in e)o[et(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][et(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(et):(e=et(e))in i?[e]:e.match(X)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||x.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!x.isEmptyObject(e)}};var ot=new it,st=new it,rt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,at=/[A-Z]/g;function lt(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(at,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:rt.test(t)?JSON.parse(t):t)}(n)}catch(t){}st.set(t,e,n)}else n=void 0;return n}x.extend({hasData:function(t){return st.hasData(t)||ot.hasData(t)},data:function(t,e,n){return st.access(t,e,n)},removeData:function(t,e){st.remove(t,e)},_data:function(t,e,n){return ot.access(t,e,n)},_removeData:function(t,e){ot.remove(t,e)}}),x.fn.extend({data:function(t,e){var n,i,o,s=this[0],r=s&&s.attributes;if(void 0===t){if(this.length&&(o=st.get(s),1===s.nodeType&&!ot.get(s,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&0===(i=r[n].name).indexOf("data-")&&(i=et(i.slice(5)),lt(s,i,o[i]));ot.set(s,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){st.set(this,t)}):G(this,function(e){var n;if(s&&void 0===e)return void 0!==(n=st.get(s,t))||void 0!==(n=lt(s,t))?n:void 0;this.each(function(){st.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){st.remove(this,t)})}}),x.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=ot.get(t,e),n&&(!i||Array.isArray(n)?i=ot.access(t,e,x.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=x.queue(t,e),i=n.length,o=n.shift(),s=x._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete s.stop,o.call(t,function(){x.dequeue(t,e)},s)),!i&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ot.get(t,n)||ot.access(t,n,{empty:x.Callbacks("once memory").add(function(){ot.remove(t,[e+"queue",n])})})}}),x.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?x.queue(this[0],t):void 0===e?this:this.each(function(){var n=x.queue(this,t,e);x._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&x.dequeue(this,t)})},dequeue:function(t){return this.each(function(){x.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=x.Deferred(),s=this,r=this.length,a=function(){--i||o.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)(n=ot.get(s[r],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var ct=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ht=new RegExp("^(?:([+-])=|)("+ct+")([a-z%]*)$","i"),dt=["Top","Right","Bottom","Left"],ut=g.documentElement,ft=function(t){return x.contains(t.ownerDocument,t)},pt={composed:!0};ut.getRootNode&&(ft=function(t){return x.contains(t.ownerDocument,t)||t.getRootNode(pt)===t.ownerDocument});var mt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ft(t)&&"none"===x.css(t,"display")};function gt(t,e,n,i){var o,s,r=20,a=i?function(){return i.cur()}:function(){return x.css(t,e,"")},l=a(),c=n&&n[3]||(x.cssNumber[e]?"":"px"),h=t.nodeType&&(x.cssNumber[e]||"px"!==c&&+l)&&ht.exec(x.css(t,e));if(h&&h[3]!==c){for(l/=2,c=c||h[3],h=+l||1;r--;)x.style(t,e,h+c),(1-s)*(1-(s=a()/l||.5))<=0&&(r=0),h/=s;h*=2,x.style(t,e,h+c),n=n||[]}return n&&(h=+h||+l||0,o=n[1]?h+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=h,i.end=o)),o}var vt={};function bt(t){var e,n=t.ownerDocument,i=t.nodeName,o=vt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=x.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),vt[i]=o,o)}function yt(t,e){for(var n,i,o=[],s=0,r=t.length;s<r;s++)(i=t[s]).style&&(n=i.style.display,e?("none"===n&&(o[s]=ot.get(i,"display")||null,o[s]||(i.style.display="")),""===i.style.display&&mt(i)&&(o[s]=bt(i))):"none"!==n&&(o[s]="none",ot.set(i,"display",n)));for(s=0;s<r;s++)null!=o[s]&&(t[s].style.display=o[s]);return t}x.fn.extend({show:function(){return yt(this,!0)},hide:function(){return yt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){mt(this)?x(this).show():x(this).hide()})}});var wt=/^(?:checkbox|radio)$/i,$t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,xt=/^$|^module$|\/(?:java|ecma)script/i;!function(){var t=g.createDocumentFragment().appendChild(g.createElement("div")),e=g.createElement("input");e.setAttribute("type","radio"),e.setAttribute("checked","checked"),e.setAttribute("name","t"),t.appendChild(e),f.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,t.innerHTML="<option></option>",f.option=!!t.lastChild}();var Ct={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Et(t,e){var n;return n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&E(t,e)?x.merge([t],n):n}function Tt(t,e){for(var n=0,i=t.length;n<i;n++)ot.set(t[n],"globalEval",!e||ot.get(e[n],"globalEval"))}Ct.tbody=Ct.tfoot=Ct.colgroup=Ct.caption=Ct.thead,Ct.th=Ct.td,f.option||(Ct.optgroup=Ct.option=[1,"<select multiple='multiple'>","</select>"]);var St=/<|&#?\w+;/;function kt(t,e,n,i,o){for(var s,r,a,l,c,h,d=e.createDocumentFragment(),u=[],f=0,p=t.length;f<p;f++)if((s=t[f])||0===s)if("object"===y(s))x.merge(u,s.nodeType?[s]:s);else if(St.test(s)){for(r=r||d.appendChild(e.createElement("div")),a=($t.exec(s)||["",""])[1].toLowerCase(),l=Ct[a]||Ct._default,r.innerHTML=l[1]+x.htmlPrefilter(s)+l[2],h=l[0];h--;)r=r.lastChild;x.merge(u,r.childNodes),(r=d.firstChild).textContent=""}else u.push(e.createTextNode(s));for(d.textContent="",f=0;s=u[f++];)if(i&&x.inArray(s,i)>-1)o&&o.push(s);else if(c=ft(s),r=Et(d.appendChild(s),"script"),c&&Tt(r),n)for(h=0;s=r[h++];)xt.test(s.type||"")&&n.push(s);return d}var At=/^([^.]*)(?:\.(.+)|)/;function It(){return!0}function Lt(){return!1}function _t(t,e,n,i,o,s){var r,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)_t(t,a,n,i,e[a],s);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=Lt;else if(!o)return t;return 1===s&&(r=o,o=function(t){return x().off(t),r.apply(this,arguments)},o.guid=r.guid||(r.guid=x.guid++)),t.each(function(){x.event.add(this,e,o,i,n)})}function Dt(t,e,n){n?(ot.set(t,e,!1),x.event.add(t,e,{namespace:!1,handler:function(t){var n,i=ot.get(this,e);if(1&t.isTrigger&&this[e]){if(i)(x.event.special[e]||{}).delegateType&&t.stopPropagation();else if(i=o.call(arguments),ot.set(this,e,i),this[e](),n=ot.get(this,e),ot.set(this,e,!1),i!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else i&&(ot.set(this,e,x.event.trigger(i[0],i.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=It)}})):void 0===ot.get(t,e)&&x.event.add(t,e,It)}x.event={global:{},add:function(t,e,n,i,o){var s,r,a,l,c,h,d,u,f,p,m,g=ot.get(t);if(nt(t))for(n.handler&&(n=(s=n).handler,o=s.selector),o&&x.find.matchesSelector(ut,o),n.guid||(n.guid=x.guid++),(l=g.events)||(l=g.events=Object.create(null)),(r=g.handle)||(r=g.handle=function(e){return"undefined"!=typeof x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(X)||[""]).length;c--;)f=m=(a=At.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=x.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,d=x.event.special[f]||{},h=x.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:p.join(".")},s),(u=l[f])||((u=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,r)||t.addEventListener&&t.addEventListener(f,r)),d.add&&(d.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),o?u.splice(u.delegateCount++,0,h):u.push(h),x.event.global[f]=!0)},remove:function(t,e,n,i,o){var s,r,a,l,c,h,d,u,f,p,m,g=ot.hasData(t)&&ot.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(X)||[""]).length;c--;)if(f=m=(a=At.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=x.event.special[f]||{},u=l[f=(i?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=s=u.length;s--;)h=u[s],!o&&m!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||i&&i!==h.selector&&("**"!==i||!h.selector)||(u.splice(s,1),h.selector&&u.delegateCount--,d.remove&&d.remove.call(t,h));r&&!u.length&&(d.teardown&&!1!==d.teardown.call(t,p,g.handle)||x.removeEvent(t,f,g.handle),delete l[f])}else for(f in l)x.event.remove(t,f+e[c],n,i,!0);x.isEmptyObject(l)&&ot.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,s,r,a=new Array(arguments.length),l=x.event.fix(t),c=(ot.get(this,"events")||Object.create(null))[l.type]||[],h=x.event.special[l.type]||{};for(a[0]=l,e=1;e<arguments.length;e++)a[e]=arguments[e];if(l.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,l)){for(r=x.event.handlers.call(this,l,c),e=0;(o=r[e++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==s.namespace&&!l.rnamespace.test(s.namespace)||(l.handleObj=s,l.data=s.data,void 0!==(i=((x.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,l),l.result}},handlers:function(t,e){var n,i,o,s,r,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(s=[],r={},n=0;n<l;n++)void 0===r[o=(i=e[n]).selector+" "]&&(r[o]=i.needsContext?x(o,this).index(c)>-1:x.find(o,this,null,[c]).length),r[o]&&s.push(i);s.length&&a.push({elem:c,handlers:s})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(x.Event.prototype,t,{enumerable:!0,configurable:!0,get:p(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[x.expando]?t:new x.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return wt.test(e.type)&&e.click&&E(e,"input")&&Dt(e,"click",!0),!1},trigger:function(t){var e=this||t;return wt.test(e.type)&&e.click&&E(e,"input")&&Dt(e,"click"),!0},_default:function(t){var e=t.target;return wt.test(e.type)&&e.click&&E(e,"input")&&ot.get(e,"click")||E(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},x.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},x.Event=function(t,e){if(!(this instanceof x.Event))return new x.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?It:Lt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&x.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[x.expando]=!0},x.Event.prototype={constructor:x.Event,isDefaultPrevented:Lt,isPropagationStopped:Lt,isImmediatePropagationStopped:Lt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=It,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=It,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=It,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},x.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},x.event.addProp),x.each({focus:"focusin",blur:"focusout"},function(t,e){function n(t){if(g.documentMode){var n=ot.get(this,"handle"),i=x.event.fix(t);i.type="focusin"===t.type?"focus":"blur",i.isSimulated=!0,n(t),i.target===i.currentTarget&&n(i)}else x.event.simulate(e,t.target,x.event.fix(t))}x.event.special[t]={setup:function(){var i;if(Dt(this,t,!0),!g.documentMode)return!1;(i=ot.get(this,e))||this.addEventListener(e,n),ot.set(this,e,(i||0)+1)},trigger:function(){return Dt(this,t),!0},teardown:function(){var t;if(!g.documentMode)return!1;(t=ot.get(this,e)-1)?ot.set(this,e,t):(this.removeEventListener(e,n),ot.remove(this,e))},_default:function(e){return ot.get(e.target,t)},delegateType:e},x.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,o=g.documentMode?this:i,s=ot.get(o,e);s||(g.documentMode?this.addEventListener(e,n):i.addEventListener(t,n,!0)),ot.set(o,e,(s||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,o=g.documentMode?this:i,s=ot.get(o,e)-1;s?ot.set(o,e,s):(g.documentMode?this.removeEventListener(e,n):i.removeEventListener(t,n,!0),ot.remove(o,e))}}}),x.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){x.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=t.relatedTarget,o=t.handleObj;return i&&(i===this||x.contains(this,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),x.fn.extend({on:function(t,e,n,i){return _t(this,t,e,n,i)},one:function(t,e,n,i){return _t(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,x(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Lt),this.each(function(){x.event.remove(this,t,n,e)})}});var Mt=/<script|<style|<link/i,Ht=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ot(t,e){return E(t,"table")&&E(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function jt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function zt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Wt(t,e){var n,i,o,s,r,a;if(1===e.nodeType){if(ot.hasData(t)&&(a=ot.get(t).events))for(o in ot.remove(e,"handle events"),a)for(n=0,i=a[o].length;n<i;n++)x.event.add(e,o,a[o][n]);st.hasData(t)&&(s=st.access(t),r=x.extend({},s),st.set(e,r))}}function Pt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&wt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Rt(t,e,n,i){e=s(e);var o,r,a,l,c,h,d=0,u=t.length,m=u-1,g=e[0],v=p(g);if(v||u>1&&"string"==typeof g&&!f.checkClone&&Ht.test(g))return t.each(function(o){var s=t.eq(o);v&&(e[0]=g.call(this,o,s.html())),Rt(s,e,n,i)});if(u&&(r=(o=kt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(l=(a=x.map(Et(o,"script"),jt)).length;d<u;d++)c=o,d!==m&&(c=x.clone(c,!0,!0),l&&x.merge(a,Et(c,"script"))),n.call(t[d],c,d);if(l)for(h=a[a.length-1].ownerDocument,x.map(a,zt),d=0;d<l;d++)c=a[d],xt.test(c.type||"")&&!ot.access(c,"globalEval")&&x.contains(h,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?x._evalUrl&&!c.noModule&&x._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},h):b(c.textContent.replace(Nt,""),c,h))}return t}function qt(t,e,n){for(var i,o=e?x.filter(e,t):t,s=0;null!=(i=o[s]);s++)n||1!==i.nodeType||x.cleanData(Et(i)),i.parentNode&&(n&&ft(i)&&Tt(Et(i,"script")),i.parentNode.removeChild(i));return t}x.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,o,s,r,a=t.cloneNode(!0),l=ft(t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(r=Et(a),i=0,o=(s=Et(t)).length;i<o;i++)Pt(s[i],r[i]);if(e)if(n)for(s=s||Et(t),r=r||Et(a),i=0,o=s.length;i<o;i++)Wt(s[i],r[i]);else Wt(t,a);return(r=Et(a,"script")).length>0&&Tt(r,!l&&Et(t,"script")),a},cleanData:function(t){for(var e,n,i,o=x.event.special,s=0;void 0!==(n=t[s]);s++)if(nt(n)){if(e=n[ot.expando]){if(e.events)for(i in e.events)o[i]?x.event.remove(n,i):x.removeEvent(n,i,e.handle);n[ot.expando]=void 0}n[st.expando]&&(n[st.expando]=void 0)}}}),x.fn.extend({detach:function(t){return qt(this,t,!0)},remove:function(t){return qt(this,t)},text:function(t){return G(this,function(t){return void 0===t?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Rt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ot(this,t).appendChild(t)})},prepend:function(){return Rt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ot(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Rt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Rt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(x.cleanData(Et(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return x.clone(this,t,e)})},html:function(t){return G(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Mt.test(t)&&!Ct[($t.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(x.cleanData(Et(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return Rt(this,arguments,function(e){var n=this.parentNode;x.inArray(this,t)<0&&(x.cleanData(Et(this)),n&&n.replaceChild(e,this))},t)}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){x.fn[t]=function(t){for(var n,i=[],o=x(t),s=o.length-1,a=0;a<=s;a++)n=a===s?this:this.clone(!0),x(o[a])[e](n),r.apply(i,n.get());return this.pushStack(i)}});var Ft=new RegExp("^("+ct+")(?!px)[a-z%]+$","i"),Xt=/^--/,Yt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Bt=function(t,e,n){var i,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];for(o in i=n.call(t),e)t.style[o]=s[o];return i},Ut=new RegExp(dt.join("|"),"i");function Qt(t,e,n){var i,o,s,r,a=Xt.test(e),l=t.style;return(n=n||Yt(t))&&(r=n.getPropertyValue(e)||n[e],a&&r&&(r=r.replace(I,"$1")||void 0),""!==r||ft(t)||(r=x.style(t,e)),!f.pixelBoxStyles()&&Ft.test(r)&&Ut.test(e)&&(i=l.width,o=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=n.width,l.width=i,l.minWidth=o,l.maxWidth=s)),void 0!==r?r+"":r}function Kt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(h){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",h.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ut.appendChild(c).appendChild(h);var e=t.getComputedStyle(h);i="1%"!==e.top,l=12===n(e.marginLeft),h.style.right="60%",r=36===n(e.right),o=36===n(e.width),h.style.position="absolute",s=12===n(h.offsetWidth/3),ut.removeChild(c),h=null}}function n(t){return Math.round(parseFloat(t))}var i,o,s,r,a,l,c=g.createElement("div"),h=g.createElement("div");h.style&&(h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===h.style.backgroundClip,x.extend(f,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),r},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),s},reliableTrDimensions:function(){var e,n,i,o;return null==a&&(e=g.createElement("table"),n=g.createElement("tr"),i=g.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;border:1px solid",n.style.height="1px",i.style.height="9px",i.style.display="block",ut.appendChild(e).appendChild(n).appendChild(i),o=t.getComputedStyle(n),a=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===n.offsetHeight,ut.removeChild(e)),a}}))}();var Vt=["Webkit","Moz","ms"],Gt=g.createElement("div").style,Jt={};function Zt(t){var e=x.cssProps[t]||Jt[t];return e||(t in Gt?t:Jt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Vt.length;n--;)if((t=Vt[n]+e)in Gt)return t}(t)||t)}var te=/^(none|table(?!-c[ea]).+)/,ee={position:"absolute",visibility:"hidden",display:"block"},ne={letterSpacing:"0",fontWeight:"400"};function ie(t,e,n){var i=ht.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function oe(t,e,n,i,o,s){var r="width"===e?1:0,a=0,l=0,c=0;if(n===(i?"border":"content"))return 0;for(;r<4;r+=2)"margin"===n&&(c+=x.css(t,n+dt[r],!0,o)),i?("content"===n&&(l-=x.css(t,"padding"+dt[r],!0,o)),"margin"!==n&&(l-=x.css(t,"border"+dt[r]+"Width",!0,o))):(l+=x.css(t,"padding"+dt[r],!0,o),"padding"!==n?l+=x.css(t,"border"+dt[r]+"Width",!0,o):a+=x.css(t,"border"+dt[r]+"Width",!0,o));return!i&&s>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-l-a-.5))||0),l+c}function se(t,e,n){var i=Yt(t),o=(!f.boxSizingReliable()||n)&&"border-box"===x.css(t,"boxSizing",!1,i),s=o,r=Qt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ft.test(r)){if(!n)return r;r="auto"}return(!f.boxSizingReliable()&&o||!f.reliableTrDimensions()&&E(t,"tr")||"auto"===r||!parseFloat(r)&&"inline"===x.css(t,"display",!1,i))&&t.getClientRects().length&&(o="border-box"===x.css(t,"boxSizing",!1,i),(s=a in t)&&(r=t[a])),(r=parseFloat(r)||0)+oe(t,e,n||(o?"border":"content"),s,i,r)+"px"}function re(t,e,n,i,o){return new re.prototype.init(t,e,n,i,o)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,r,a=et(e),l=Xt.test(e),c=t.style;if(l||(e=Zt(a)),r=x.cssHooks[e]||x.cssHooks[a],void 0===n)return r&&"get"in r&&void 0!==(o=r.get(t,!1,i))?o:c[e];"string"===(s=typeof n)&&(o=ht.exec(n))&&o[1]&&(n=gt(t,e,o),s="number"),null!=n&&n==n&&("number"!==s||l||(n+=o&&o[3]||(x.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),r&&"set"in r&&void 0===(n=r.set(t,n,i))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,i){var o,s,r,a=et(e);return Xt.test(e)||(e=Zt(a)),(r=x.cssHooks[e]||x.cssHooks[a])&&"get"in r&&(o=r.get(t,!0,n)),void 0===o&&(o=Qt(t,e,i)),"normal"===o&&e in ne&&(o=ne[e]),""===n||n?(s=parseFloat(o),!0===n||isFinite(s)?s||0:o):o}}),x.each(["height","width"],function(t,e){x.cssHooks[e]={get:function(t,n,i){if(n)return!te.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?se(t,e,i):Bt(t,ee,function(){return se(t,e,i)})},set:function(t,n,i){var o,s=Yt(t),r=!f.scrollboxSize()&&"absolute"===s.position,a=(r||i)&&"border-box"===x.css(t,"boxSizing",!1,s),l=i?oe(t,e,i,a,s):0;return a&&r&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-oe(t,e,"border",!1,s)-.5)),l&&(o=ht.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=x.css(t,e)),ie(0,n,l)}}}),x.cssHooks.marginLeft=Kt(f.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Qt(t,"marginLeft"))||t.getBoundingClientRect().left-Bt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(t,e){x.cssHooks[t+e]={expand:function(n){for(var i=0,o={},s="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+dt[i]+e]=s[i]||s[i-2]||s[0];return o}},"margin"!==t&&(x.cssHooks[t+e].set=ie)}),x.fn.extend({css:function(t,e){return G(this,function(t,e,n){var i,o,s={},r=0;if(Array.isArray(e)){for(i=Yt(t),o=e.length;r<o;r++)s[e[r]]=x.css(t,e[r],!1,i);return s}return void 0!==n?x.style(t,e,n):x.css(t,e)},t,e,arguments.length>1)}}),x.Tween=re,re.prototype={constructor:re,init:function(t,e,n,i,o,s){this.elem=t,this.prop=n,this.easing=o||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=s||(x.cssNumber[n]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,n=re.propHooks[this.prop];return this.options.duration?this.pos=e=x.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||!x.cssHooks[t.prop]&&null==t.elem.style[Zt(t.prop)]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=re.prototype.init,x.fx.step={};var ae,le,ce,he,de=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function fe(){le&&(!1===g.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(fe):t.setTimeout(fe,x.fx.interval),x.fx.tick())}function pe(){return t.setTimeout(function(){ae=void 0}),ae=Date.now()}function me(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=dt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function ge(t,e,n){for(var i,o=(ve.tweeners[e]||[]).concat(ve.tweeners["*"]),s=0,r=o.length;s<r;s++)if(i=o[s].call(n,e,t))return i}function ve(t,e,n){var i,o,s=0,r=ve.prefilters.length,a=x.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=ae||pe(),n=Math.max(0,c.startTime+c.duration-e),i=1-(n/c.duration||0),s=0,r=c.tweens.length;s<r;s++)c.tweens[s].run(i);return a.notifyWith(t,[c,i,n]),i<1&&r?n:(r||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:x.extend({},e),opts:x.extend(!0,{specialEasing:{},easing:x.easing._default},n),originalProperties:e,originalOptions:n,startTime:ae||pe(),duration:n.duration,tweens:[],createTween:function(e,n){var i=x.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),h=c.props;for(!function(t,e){var n,i,o,s,r;for(n in t)if(o=e[i=et(n)],s=t[n],Array.isArray(s)&&(o=s[1],s=t[n]=s[0]),n!==i&&(t[i]=s,delete t[n]),(r=x.cssHooks[i])&&"expand"in r)for(n in s=r.expand(s),delete t[i],s)n in t||(t[n]=s[n],e[n]=o);else e[i]=o}(h,c.opts.specialEasing);s<r;s++)if(i=ve.prefilters[s].call(c,t,h,c.opts))return p(i.stop)&&(x._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return x.map(h,ge,c),p(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),x.fx.timer(x.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}x.Animation=x.extend(ve,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return gt(n.elem,t,ht.exec(e),n),n}]},tweener:function(t,e){p(t)?(e=t,t=["*"]):t=t.match(X);for(var n,i=0,o=t.length;i<o;i++)n=t[i],ve.tweeners[n]=ve.tweeners[n]||[],ve.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,s,r,a,l,c,h,d="width"in e||"height"in e,u=this,f={},p=t.style,m=t.nodeType&&mt(t),g=ot.get(t,"fxshow");for(i in n.queue||(null==(r=x._queueHooks(t,"fx")).unqueued&&(r.unqueued=0,a=r.empty.fire,r.empty.fire=function(){r.unqueued||a()}),r.unqueued++,u.always(function(){u.always(function(){r.unqueued--,x.queue(t,"fx").length||r.empty.fire()})})),e)if(o=e[i],de.test(o)){if(delete e[i],s=s||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||x.style(t,i)}if((l=!x.isEmptyObject(e))||!x.isEmptyObject(f))for(i in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=g&&g.display)&&(c=ot.get(t,"display")),"none"===(h=x.css(t,"display"))&&(c?h=c:(yt([t],!0),c=t.style.display||c,h=x.css(t,"display"),yt([t]))),("inline"===h||"inline-block"===h&&null!=c)&&"none"===x.css(t,"float")&&(l||(u.done(function(){p.display=c}),null==c&&(h=p.display,c="none"===h?"":h)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=ot.access(t,"fxshow",{display:c}),s&&(g.hidden=!m),m&&yt([t],!0),u.done(function(){for(i in m||yt([t]),ot.remove(t,"fxshow"),f)x.style(t,i,f[i])})),l=ge(m?g[i]:0,i,u),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?ve.prefilters.unshift(t):ve.prefilters.push(t)}}),x.speed=function(t,e,n){var i=t&&"object"==typeof t?x.extend({},t):{complete:n||!n&&e||p(t)&&t,duration:t,easing:n&&e||e&&!p(e)&&e};return x.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in x.fx.speeds?i.duration=x.fx.speeds[i.duration]:i.duration=x.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){p(i.old)&&i.old.call(this),i.queue&&x.dequeue(this,i.queue)},i},x.fn.extend({fadeTo:function(t,e,n,i){return this.filter(mt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=x.isEmptyObject(t),s=x.speed(e,n,i),r=function(){var e=ve(this,x.extend({},t),s);(o||ot.get(this,"finish"))&&e.stop(!0)};return r.finish=r,o||!1===s.queue?this.each(r):this.queue(s.queue,r)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",s=x.timers,r=ot.get(this);if(o)r[o]&&r[o].stop&&i(r[o]);else for(o in r)r[o]&&r[o].stop&&ue.test(o)&&i(r[o]);for(o=s.length;o--;)s[o].elem!==this||null!=t&&s[o].queue!==t||(s[o].anim.stop(n),e=!1,s.splice(o,1));!e&&n||x.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=ot.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],s=x.timers,r=i?i.length:0;for(n.finish=!0,x.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<r;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),x.each(["toggle","show","hide"],function(t,e){var n=x.fn[e];x.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(me(e,!0),t,i,o)}}),x.each({slideDown:me("show"),slideUp:me("hide"),slideToggle:me("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){x.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),x.timers=[],x.fx.tick=function(){var t,e=0,n=x.timers;for(ae=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||x.fx.stop(),ae=void 0},x.fx.timer=function(t){x.timers.push(t),x.fx.start()},x.fx.interval=13,x.fx.start=function(){le||(le=!0,fe())},x.fx.stop=function(){le=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fn.delay=function(e,n){return e=x.fx&&x.fx.speeds[e]||e,n=n||"fx",this.queue(n,function(n,i){var o=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(o)}})},ce=g.createElement("input"),he=g.createElement("select").appendChild(g.createElement("option")),ce.type="checkbox",f.checkOn=""!==ce.value,f.optSelected=he.selected,(ce=g.createElement("input")).value="t",ce.type="radio",f.radioValue="t"===ce.value;var be,ye=x.expr.attrHandle;x.fn.extend({attr:function(t,e){return G(this,x.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){x.removeAttr(this,t)})}}),x.extend({attr:function(t,e,n){var i,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return"undefined"==typeof t.getAttribute?x.prop(t,e,n):(1===s&&x.isXMLDoc(t)||(o=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?be:void 0)),void 0!==n?null===n?void x.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=x.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&E(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(X);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),be={set:function(t,e,n){return!1===e?x.removeAttr(t,n):t.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ye[e]||x.find.attr;ye[e]=function(t,e,i){var o,s,r=e.toLowerCase();return i||(s=ye[r],ye[r]=o,o=null!=n(t,e,i)?r:null,ye[r]=s),o}});var we=/^(?:input|select|textarea|button)$/i,$e=/^(?:a|area)$/i;function xe(t){return(t.match(X)||[]).join(" ")}function Ce(t){return t.getAttribute&&t.getAttribute("class")||""}function Ee(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(X)||[]}x.fn.extend({prop:function(t,e){return G(this,x.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[x.propFix[t]||t]})}}),x.extend({prop:function(t,e,n){var i,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&x.isXMLDoc(t)||(e=x.propFix[e]||e,o=x.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=x.find.attr(t,"tabindex");return e?parseInt(e,10):we.test(t.nodeName)||$e.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(x.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(t){var e,n,i,o,s,r;return p(t)?this.each(function(e){x(this).addClass(t.call(this,e,Ce(this)))}):(e=Ee(t)).length?this.each(function(){if(i=Ce(this),n=1===this.nodeType&&" "+xe(i)+" "){for(s=0;s<e.length;s++)o=e[s],n.indexOf(" "+o+" ")<0&&(n+=o+" ");r=xe(n),i!==r&&this.setAttribute("class",r)}}):this},removeClass:function(t){var e,n,i,o,s,r;return p(t)?this.each(function(e){x(this).removeClass(t.call(this,e,Ce(this)))}):arguments.length?(e=Ee(t)).length?this.each(function(){if(i=Ce(this),n=1===this.nodeType&&" "+xe(i)+" "){for(s=0;s<e.length;s++)for(o=e[s];n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r=xe(n),i!==r&&this.setAttribute("class",r)}}):this:this.attr("class","")},toggleClass:function(t,e){var n,i,o,s,r=typeof t,a="string"===r||Array.isArray(t);return p(t)?this.each(function(n){x(this).toggleClass(t.call(this,n,Ce(this),e),e)}):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Ee(t),this.each(function(){if(a)for(s=x(this),o=0;o<n.length;o++)i=n[o],s.hasClass(i)?s.removeClass(i):s.addClass(i);else void 0!==t&&"boolean"!==r||((i=Ce(this))&&ot.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===t?"":ot.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+xe(Ce(n))+" ").indexOf(e)>-1)return!0;return!1}});var Te=/\r/g;x.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=p(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,x(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=x.map(o,function(t){return null==t?"":t+""})),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(Te,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:xe(x.text(t))}},select:{get:function(t){var e,n,i,o=t.options,s=t.selectedIndex,r="select-one"===t.type,a=r?null:[],l=r?s+1:o.length;for(i=s<0?l:r?s:0;i<l;i++)if(((n=o[i]).selected||i===s)&&!n.disabled&&(!n.parentNode.disabled||!E(n.parentNode,"optgroup"))){if(e=x(n).val(),r)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,s=x.makeArray(e),r=o.length;r--;)((i=o[r]).selected=x.inArray(x.valHooks.option.get(i),s)>-1)&&(n=!0);return n||(t.selectedIndex=-1),s}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=x.inArray(x(t).val(),e)>-1}},f.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Se=t.location,ke={guid:Date.now()},Ae=/\?/;x.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){}return i=n&&n.getElementsByTagName("parsererror")[0],n&&!i||x.error("Invalid XML: "+(i?x.map(i.childNodes,function(t){return t.textContent}).join("\n"):e)),n};var Ie=/^(?:focusinfocus|focusoutblur)$/,Le=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(e,n,i,o){var s,r,a,l,c,d,u,f,v=[i||g],b=h.call(e,"type")?e.type:e,y=h.call(e,"namespace")?e.namespace.split("."):[];if(r=f=a=i=i||g,3!==i.nodeType&&8!==i.nodeType&&!Ie.test(b+x.event.triggered)&&(b.indexOf(".")>-1&&(y=b.split("."),b=y.shift(),y.sort()),c=b.indexOf(":")<0&&"on"+b,(e=e[x.expando]?e:new x.Event(b,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:x.makeArray(n,[e]),u=x.event.special[b]||{},o||!u.trigger||!1!==u.trigger.apply(i,n))){if(!o&&!u.noBubble&&!m(i)){for(l=u.delegateType||b,Ie.test(l+b)||(r=r.parentNode);r;r=r.parentNode)v.push(r),a=r;a===(i.ownerDocument||g)&&v.push(a.defaultView||a.parentWindow||t)}for(s=0;(r=v[s++])&&!e.isPropagationStopped();)f=r,e.type=s>1?l:u.bindType||b,(d=(ot.get(r,"events")||Object.create(null))[e.type]&&ot.get(r,"handle"))&&d.apply(r,n),(d=c&&r[c])&&d.apply&&nt(r)&&(e.result=d.apply(r,n),!1===e.result&&e.preventDefault());return e.type=b,o||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(v.pop(),n)||!nt(i)||c&&p(i[b])&&!m(i)&&((a=i[c])&&(i[c]=null),x.event.triggered=b,e.isPropagationStopped()&&f.addEventListener(b,Le),i[b](),e.isPropagationStopped()&&f.removeEventListener(b,Le),x.event.triggered=void 0,a&&(i[c]=a)),e.result}},simulate:function(t,e,n){var i=x.extend(new x.Event,n,{type:t,isSimulated:!0});x.event.trigger(i,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each(function(){x.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return x.event.trigger(t,e,n,!0)}});var _e=/\[\]$/,De=/\r?\n/g,Me=/^(?:submit|button|image|reset|file)$/i,He=/^(?:input|select|textarea|keygen)/i;function Ne(t,e,n,i){var o;if(Array.isArray(e))x.each(e,function(e,o){n||_e.test(t)?i(t,o):Ne(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)});else if(n||"object"!==y(e))i(t,e);else for(o in e)Ne(t+"["+o+"]",e[o],n,i)}x.param=function(t,e){var n,i=[],o=function(t,e){var n=p(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,function(){o(this.name,this.value)});else for(n in t)Ne(n,t[n],e,o);return i.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&He.test(this.nodeName)&&!Me.test(t)&&(this.checked||!wt.test(t))}).map(function(t,e){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(t){return{name:e.name,value:t.replace(De,"\r\n")}}):{name:e.name,value:n.replace(De,"\r\n")}}).get()}});var Oe=/%20/g,je=/#.*$/,ze=/([?&])_=[^&]*/,We=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pe=/^(?:GET|HEAD)$/,Re=/^\/\//,qe={},Fe={},Xe="*/".concat("*"),Ye=g.createElement("a");function Be(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,s=e.toLowerCase().match(X)||[];if(p(n))for(;i=s[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Ue(t,e,n,i){var o={},s=t===Fe;function r(a){var l;return o[a]=!0,x.each(t[a]||[],function(t,a){var c=a(e,n,i);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}return r(e.dataTypes[0])||!o["*"]&&r("*")}function Qe(t,e){var n,i,o=x.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&x.extend(!0,t,i),t}Ye.href=Se.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Se.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Se.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Qe(Qe(t,x.ajaxSettings),e):Qe(x.ajaxSettings,t)},ajaxPrefilter:Be(qe),ajaxTransport:Be(Fe),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var i,o,s,r,a,l,c,h,d,u,f=x.ajaxSetup({},n),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?x(p):x.event,v=x.Deferred(),b=x.Callbacks("once memory"),y=f.statusCode||{},w={},$={},C="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(c){if(!r)for(r={};e=We.exec(s);)r[e[1].toLowerCase()+" "]=(r[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=r[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(t,e){return null==c&&(t=$[t.toLowerCase()]=$[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==c&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)E.always(t[E.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||C;return i&&i.abort(e),T(0,e),this}};if(v.promise(E),f.url=((e||f.url||Se.href)+"").replace(Re,Se.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(X)||[""],null==f.crossDomain){l=g.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Ye.protocol+"//"+Ye.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=x.param(f.data,f.traditional)),Ue(qe,f,n,E),c)return E;for(d in(h=x.event&&f.global)&&0===x.active++&&x.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Pe.test(f.type),o=f.url.replace(je,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Oe,"+")):(u=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(Ae.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(ze,"$1"),u=(Ae.test(o)?"&":"?")+"_="+ke.guid+++u),f.url=o+u),f.ifModified&&(x.lastModified[o]&&E.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&E.setRequestHeader("If-None-Match",x.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&E.setRequestHeader("Content-Type",f.contentType),E.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Xe+"; q=0.01":""):f.accepts["*"]),f.headers)E.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,E,f)||c))return E.abort();if(C="abort",b.add(f.complete),E.done(f.success),E.fail(f.error),i=Ue(Fe,f,n,E)){if(E.readyState=1,h&&m.trigger("ajaxSend",[E,f]),c)return E;f.async&&f.timeout>0&&(a=t.setTimeout(function(){E.abort("timeout")},f.timeout));try{c=!1,i.send(w,T)}catch(t){if(c)throw t;T(-1,t)}}else T(-1,"No Transport");function T(e,n,r,l){var d,u,g,w,$,C=n;c||(c=!0,a&&t.clearTimeout(a),i=void 0,s=l||"",E.readyState=e>0?4:0,d=e>=200&&e<300||304===e,r&&(w=function(t,e,n){for(var i,o,s,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)s=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){s=o;break}r||(r=o)}s=s||r}if(s)return s!==l[0]&&l.unshift(s),n[s]}(f,E,r)),!d&&x.inArray("script",f.dataTypes)>-1&&x.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,i){var o,s,r,a,l,c={},h=t.dataTypes.slice();if(h[1])for(r in t.converters)c[r.toLowerCase()]=t.converters[r];for(s=h.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=h.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(r=c[l+" "+s]||c["* "+s]))for(o in c)if((a=o.split(" "))[1]===s&&(r=c[l+" "+a[0]]||c["* "+a[0]])){!0===r?r=c[o]:!0!==c[o]&&(s=a[0],h.unshift(a[1]));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+l+" to "+s}}}return{state:"success",data:e}}(f,w,E,d),d?(f.ifModified&&(($=E.getResponseHeader("Last-Modified"))&&(x.lastModified[o]=$),($=E.getResponseHeader("etag"))&&(x.etag[o]=$)),204===e||"HEAD"===f.type?C="nocontent":304===e?C="notmodified":(C=w.state,u=w.data,d=!(g=w.error))):(g=C,!e&&C||(C="error",e<0&&(e=0))),E.status=e,E.statusText=(n||C)+"",d?v.resolveWith(p,[u,C,E]):v.rejectWith(p,[E,C,g]),E.statusCode(y),y=void 0,h&&m.trigger(d?"ajaxSuccess":"ajaxError",[E,f,d?u:g]),b.fireWith(p,[E,C]),h&&(m.trigger("ajaxComplete",[E,f]),--x.active||x.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,n){return x.get(t,e,n,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],function(t,e){x[e]=function(t,n,i,o){return p(n)&&(o=o||i,i=n,n=void 0),x.ajax(x.extend({url:t,type:e,dataType:o,data:n,success:i},x.isPlainObject(t)&&t))}}),x.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),x._evalUrl=function(t,e,n){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){x.globalEval(t,e,n)}})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(p(t)&&(t=t.call(this[0])),e=x(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return p(t)?this.each(function(e){x(this).wrapInner(t.call(this,e))}):this.each(function(){var e=x(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=p(t);return this.each(function(n){x(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Ke={0:200,1223:204},Ve=x.ajaxSettings.xhr();f.cors=!!Ve&&"withCredentials"in Ve,f.ajax=Ve=!!Ve,x.ajaxTransport(function(e){var n,i;if(f.cors||Ve&&!e.crossDomain)return{send:function(o,s){var r,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)a[r]=e.xhrFields[r];for(r in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(r,o[r]);n=function(t){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Ke[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}}),x.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return x.globalEval(t),t}}}),x.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),x.ajaxTransport("script",function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,o){e=x("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&o("error"===t.type?404:200,t.type)}),g.head.appendChild(e[0])},abort:function(){n&&n()}}});var Ge,Je=[],Ze=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||x.expando+"_"+ke.guid++;return this[t]=!0,t}}),x.ajaxPrefilter("json jsonp",function(e,n,i){var o,s,r,a=!1!==e.jsonp&&(Ze.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ze.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=p(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ze,"$1"+o):!1!==e.jsonp&&(e.url+=(Ae.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return r||x.error(o+" was not called"),r[0]},e.dataTypes[0]="json",s=t[o],t[o]=function(){r=arguments},i.always(function(){void 0===s?x(t).removeProp(o):t[o]=s,e[o]&&(e.jsonpCallback=n.jsonpCallback,Je.push(o)),r&&p(s)&&s(r[0]),r=s=void 0}),"script"}),f.createHTMLDocument=((Ge=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),x.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(f.createHTMLDocument?((i=(e=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,e.head.appendChild(i)):e=g),s=!n&&[],(o=j.exec(t))?[e.createElement(o[1])]:(o=kt([t],e,s),s&&s.length&&x(s).remove(),x.merge([],o.childNodes)));var i,o,s},x.fn.load=function(t,e,n){var i,o,s,r=this,a=t.indexOf(" ");return a>-1&&(i=xe(t.slice(a)),t=t.slice(0,a)),p(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),r.length>0&&x.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){s=arguments,r.html(i?x("<div>").append(x.parseHTML(t)).find(i):t)}).always(n&&function(t,e){r.each(function(){n.apply(this,s||[t.responseText,e,t])})}),this},x.expr.pseudos.animated=function(t){return x.grep(x.timers,function(e){return t===e.elem}).length},x.offset={setOffset:function(t,e,n){var i,o,s,r,a,l,c=x.css(t,"position"),h=x(t),d={};"static"===c&&(t.style.position="relative"),a=h.offset(),s=x.css(t,"top"),l=x.css(t,"left"),("absolute"===c||"fixed"===c)&&(s+l).indexOf("auto")>-1?(r=(i=h.position()).top,o=i.left):(r=parseFloat(s)||0,o=parseFloat(l)||0),p(e)&&(e=e.call(t,n,x.extend({},a))),null!=e.top&&(d.top=e.top-a.top+r),null!=e.left&&(d.left=e.left-a.left+o),"using"in e?e.using.call(t,d):h.css(d)}},x.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){x.offset.setOffset(this,t,e)});var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],o={top:0,left:0};if("fixed"===x.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===x.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((o=x(t).offset()).top+=x.css(t,"borderTopWidth",!0),o.left+=x.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-x.css(i,"marginTop",!0),left:e.left-o.left-x.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===x.css(t,"position");)t=t.offsetParent;return t||ut})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;x.fn[t]=function(i){return G(this,function(t,i,o){var s;if(m(t)?s=t:9===t.nodeType&&(s=t.defaultView),void 0===o)return s?s[e]:t[i];s?s.scrollTo(n?s.pageXOffset:o,n?o:s.pageYOffset):t[i]=o},t,i,arguments.length)}}),x.each(["top","left"],function(t,e){x.cssHooks[e]=Kt(f.pixelPosition,function(t,n){if(n)return n=Qt(t,e),Ft.test(n)?x(t).position()[e]+"px":n})}),x.each({Height:"height",Width:"width"},function(t,e){x.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){x.fn[i]=function(o,s){var r=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===s?"margin":"border");return G(this,function(e,n,o){var s;return m(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===o?x.css(e,n,a):x.style(e,n,o,a)},e,r?o:void 0,r)}})}),x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){x.fn[e]=function(t){return this.on(e,t)}}),x.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),x.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){x.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}});var tn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;x.proxy=function(t,e){var n,i,s;if("string"==typeof e&&(n=t[e],e=t,t=n),p(t))return i=o.call(arguments,2),s=function(){return t.apply(e||this,i.concat(o.call(arguments)))},s.guid=t.guid=t.guid||x.guid++,s},x.holdReady=function(t){t?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=E,x.isFunction=p,x.isWindow=m,x.camelCase=et,x.type=y,x.now=Date.now,x.isNumeric=function(t){var e=x.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},x.trim=function(t){return null==t?"":(t+"").replace(tn,"$1")};var en=t.jQuery,nn=t.$;return x.noConflict=function(e){return t.$===x&&(t.$=nn),e&&t.jQuery===x&&(t.jQuery=en),x},"undefined"==typeof e&&(t.jQuery=t.$=x),x})}({exports:{}});var s=function(){function t(){}t.initializeElement=function(t,e){void 0===e&&(e={});var n="string"==typeof t?document.querySelector(t):t;if(!n)return!1;var i=$(n);if(!i.data("plugin_"+this.NAME)){var o=new this(n,e);return i.data("plugin_"+this.NAME,o),this.instances.push(o),o}return!1},t.initializeElements=function(t,e){var n=this;return void 0===e&&(e={}),document.querySelectorAll(t).forEach(function(t){n.initializeElement(t,e)}),this.instances};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)},t}();s.instances=[];var r=function(t){function e(n){var i;return(i=t.call(this)||this).opts={},window.Cool&&window.Cool.settings&&window.Cool.settings.section?$.extend(!0,i.opts,e.DEFAULTS,window.Cool.settings.section,n):$.extend(!0,i.opts,e.DEFAULTS,n),i._eventHandlers=[],i._updateTimeout=null,i._rafId=null,i.init(),i}n(e,t);var i=e.prototype;return i.init=function(){this.opts.observeSections&&this.initializeSectionObserver(),this.opts.initFormControls&&this.initializeFormControls(),this.opts.initTableHandlers&&this.initializeTableHandlers(),this.opts.initButtonGroups&&this.initializeButtonGroups(),this.opts.initTabs&&this.initializeTabs(),this.onInit()},i.destroy=function(){this.destroySectionObserver(),this.unbindEvents(),this._updateTimeout&&clearTimeout(this._updateTimeout),this._rafId&&cancelAnimationFrame(this._rafId),this.onDestroy()},i._addEventListener=function(t,e,n,i){t.addEventListener(e,n,i),this._eventHandlers.push({element:t,event:e,handler:n,options:i})},i.initializeSectionObserver=function(){var t=this;this._isUpdating=!1,this.sectionObserver=new MutationObserver(function(e){t._isUpdating||(e.every(function(t){if("attributes"===t.type&&"class"===t.attributeName){var e=t.target,n=t.oldValue?t.oldValue.split(" "):[],i=Array.from(e.classList),o=i.filter(function(t){return!n.includes(t)}),s=n.filter(function(t){return!i.includes(t)});return[].concat(o,s).every(function(t){return"is-last-visible"===t||"is-last-visible-row"===t||"is-last-visible-cell"===t})}return!1})||(t._updateTimeout&&clearTimeout(t._updateTimeout),t._updateTimeout=setTimeout(function(){t._rafId&&cancelAnimationFrame(t._rafId),t._rafId=requestAnimationFrame(function(){t.updateLastVisibleElements()})},50)))}),this.sectionObserver.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["class","style","hidden"],attributeOldValue:!0,subtreeFilter:function(t){return t.classList&&(t.classList.contains("section")||t.classList.contains("select")||"TABLE"===t.nodeName||"TR"===t.nodeName||"TD"===t.nodeName||"TH"===t.nodeName)}}),this.updateLastVisibleElements()},i.updateLastVisibleElements=function(){var t=this;this._isUpdating=!0;var e={sections:[],tables:[],rows:[]};document.querySelectorAll(".section").forEach(function(n){var i=t.getVisibleChildren(n);i.length&&e.sections.push({section:n,lastVisible:i[i.length-1]})}),document.querySelectorAll("table").forEach(function(n){var i=n.querySelector("tbody")||n,o=t.getVisibleElements(i.querySelectorAll("tr"));o.length&&e.tables.push({tbody:i,lastVisibleRow:o[o.length-1]})}),document.querySelectorAll("table tr").forEach(function(n){var i=t.getVisibleElements(n.querySelectorAll("td, th"));i.length&&e.rows.push({row:n,lastVisibleCell:i[i.length-1]})}),requestAnimationFrame(function(){document.querySelectorAll(".is-last-visible, .is-last-visible-row, .is-last-visible-cell").forEach(function(t){t.classList.remove("is-last-visible","is-last-visible-row","is-last-visible-cell")}),e.sections.forEach(function(t){t.lastVisible.classList.add("is-last-visible")}),e.tables.forEach(function(t){t.lastVisibleRow.classList.add("is-last-visible-row")}),e.rows.forEach(function(t){t.lastVisibleCell.classList.add("is-last-visible-cell")}),setTimeout(function(){t._isUpdating=!1},0)})},i.getVisibleChildren=function(t){var e=this;return Array.from(t.children).filter(function(t){return e.isElementVisible(t)})},i.getVisibleElements=function(t){var e=this;return Array.from(t).filter(function(t){return e.isElementVisible(t)})},i.isElementVisible=function(t){return t._computedStyle&&!t._styleInvalidated||(t._computedStyle=window.getComputedStyle(t),t._styleInvalidated=!1),!t.classList.contains("d-none")&&!t.classList.contains("d-md-none")&&null!==t.offsetParent&&t.offsetHeight>0&&"none"!==t._computedStyle.display},i.destroySectionObserver=function(){this.sectionObserver&&(this.sectionObserver.disconnect(),this.sectionObserver=null),this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null)},i.initializeFormControls=function(){this._addEventListener(document,"focusin",function(t){var e=t.target.closest(".form-control");if(e&&!e.disabled&&!e.readOnly){var n=e.closest(".input-group");null==n||n.classList.add("input-group-focus")}}),this._addEventListener(document,"focusout",function(t){var e=t.target.closest(".form-control");if(e&&!e.disabled&&!e.readOnly){var n=e.closest(".input-group");null==n||n.classList.remove("input-group-focus")}});var t=function(t){var e=t.querySelector("input, select"),n=!(null==e||!e.value);t.classList.toggle("label-on-top",n)};this._addEventListener(document,"input",function(e){var n=e.target.closest(".form-label-group");n&&t(n)}),this._addEventListener(document,"change",function(e){var n=e.target.closest(".form-label-group");n&&t(n),e.target.matches("select")&&e.target.blur()}),document.querySelectorAll(".form-label-group").forEach(t)},i.initializeTableHandlers=function(){document.querySelectorAll(".table").forEach(function(t){t.querySelector("[data-table-link], [data-table-btn]")&&!t.classList.contains("table-hover")&&t.classList.add("table-hover")}),this._addEventListener(document,"click",function(t){if(t.target.closest("[data-table-link] .table-link-exclude, [data-table-link] input, [data-table-link] button, [data-table-link] a, [data-table-link] label, [data-table-link] .td-col-select"))t.stopPropagation();else{var e=t.target.closest("[data-table-link]");if(e){var n=e.closest("table, .table"),i=e.dataset.tableLink;if(null!=n&&n.classList.contains("bulk-actions-active"))return;t.ctrlKey||t.metaKey?window.open(i,"_blank"):window.location.href=i}if(t.target.closest("[data-table-btn] .table-btn-exclude, [data-table-btn] input, [data-table-btn] button, [data-table-btn] a, [data-table-btn] label, [data-table-btn] .td-col-select"))t.stopPropagation();else{var o=t.target.closest("[data-table-btn]");if(o){var s=o.closest("tr, .tr"),r=o.querySelector("button");if(!r||null!=s&&s.classList.contains("bulk-actions-active"))return;r.click()}}}})},i.initializeButtonGroups=function(){this._addEventListener(document,"click",function(t){var e=t.target.closest(".btn-group-toggle .btn");if(e&&!t.target.matches("input")){var n=e.querySelector("input");n&&(n.click(),n.dispatchEvent(new Event("change",{bubbles:!0})))}t.target.matches(".btn-group-toggle .btn > input")&&t.stopPropagation()}),this._addEventListener(document,"change",function(t){if(t.target.matches('.btn-group-toggle .btn > input[type="radio"]')){var e=t.target.parentElement.closest(".btn-group-toggle");e&&e.querySelectorAll(".btn").forEach(function(t){var e;t.classList.toggle("active",null==(e=t.querySelector("input"))?void 0:e.checked)})}else if(t.target.matches('.btn-group-toggle .btn > input[type="checkbox"]')){t.target.parentElement.classList.toggle("active",t.target.checked)}})},i.initializeTabs=function(){this._addEventListener(document,"click",function(t){var e=t.target.closest(".tabs .tab-item");e&&(t.stopPropagation(),e.closest(".tabs").querySelectorAll(".tab-item").forEach(function(t){return t.classList.remove("active")}),e.classList.add("active"))})},i.unbindEvents=function(){this._eventHandlers.forEach(function(t){var e=t.element,n=t.event,i=t.handler,o=t.options;e.removeEventListener(n,i,o)}),this._eventHandlers=[]},i.refresh=function(){document.querySelectorAll(".form-label-group").forEach(function(t){var e=t.querySelector("input, select"),n=null==e?void 0:e.value;t.classList.toggle("label-on-top",!!n)})},e}(s);
|
|
18
|
+
/*!
|
|
19
|
+
* perfect-scrollbar v1.5.6
|
|
20
|
+
* Copyright 2024 Hyunje Jun, MDBootstrap and Contributors
|
|
21
|
+
* Licensed under MIT
|
|
22
|
+
*/
|
|
23
|
+
function a(t){return getComputedStyle(t)}function l(t,e){for(var n in e){var i=e[n];"number"==typeof i&&(i+="px"),t.style[n]=i}return t}function c(t){var e=document.createElement("div");return e.className=t,e}r.DEFAULTS={observeSections:!0,initFormControls:!0,initTableHandlers:!0,initButtonGroups:!0,initTabs:!0,onInit:null,onDestroy:null};var h="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function d(t,e){if(!h)throw new Error("No element matching method supported");return h.call(t,e)}function u(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function f(t,e){return Array.prototype.filter.call(t.children,function(t){return d(t,e)})}var p="ps",m="ps__rtl",g={thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},v={focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}},b={x:null,y:null};function y(t,e){var n=t.element.classList,i=v.scrolling(e);n.contains(i)?clearTimeout(b[e]):n.add(i)}function w(t,e){b[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(v.scrolling(e))},t.settings.scrollingThreshold)}var x=function(t){this.element=t,this.handlers={}},C={isEmpty:{configurable:!0}};x.prototype.bind=function(t,e){"undefined"==typeof this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},x.prototype.unbind=function(t,e){var n=this;this.handlers[t]=this.handlers[t].filter(function(i){return!(!e||i===e)||(n.element.removeEventListener(t,i,!1),!1)})},x.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},C.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(x.prototype,C);var E=function(){this.eventElements=[]};function T(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function S(t,e,n,i,o){var s;if(void 0===i&&(i=!0),void 0===o&&(o=!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,n,i,o){var s=n[0],r=n[1],a=n[2],l=n[3],c=n[4],h=n[5];void 0===i&&(i=!0);void 0===o&&(o=!1);var d=t.element;t.reach[l]=null,d[a]<1&&(t.reach[l]="start");d[a]>t[s]-t[r]-1&&(t.reach[l]="end");e&&(d.dispatchEvent(T("ps-scroll-"+l)),e<0?d.dispatchEvent(T("ps-scroll-"+c)):e>0&&d.dispatchEvent(T("ps-scroll-"+h)),i&&function(t,e){y(t,e),w(t,e)}(t,l));t.reach[l]&&(e||o)&&d.dispatchEvent(T("ps-"+l+"-reach-"+t.reach[l]))}(t,n,s,i,o)}function k(t){return parseInt(t,10)||0}E.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new x(t),this.eventElements.push(e)),e},E.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},E.prototype.unbind=function(t,e,n){var i=this.eventElement(t);i.unbind(e,n),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},E.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},E.prototype.once=function(t,e,n){var i=this.eventElement(t),o=function(t){i.unbind(e,o),n(t)};i.bind(e,o)};var A={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function I(t){var e=t.element,n=Math.floor(e.scrollTop),i=e.getBoundingClientRect();t.containerWidth=Math.floor(i.width),t.containerHeight=Math.floor(i.height),t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(f(e,g.rail("x")).forEach(function(t){return u(t)}),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(f(e,g.rail("y")).forEach(function(t){return u(t)}),e.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=L(t,k(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=k((t.negativeScrollAdjustment+e.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=L(t,k(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=k(n*(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,e){var n={width:e.railXWidth},i=Math.floor(t.scrollTop);e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft;e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-i:n.top=e.scrollbarXTop+i;l(e.scrollbarXRail,n);var o={top:i,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?o.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth-9:o.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?o.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:o.left=e.scrollbarYLeft+t.scrollLeft;l(e.scrollbarYRail,o),l(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),l(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(e,t),t.scrollbarXActive?e.classList.add(v.active("x")):(e.classList.remove(v.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?e.classList.add(v.active("y")):(e.classList.remove(v.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)}function L(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}var _=null;function D(t,e){var n=e[0],i=e[1],o=e[2],s=e[3],r=e[4],a=e[5],l=e[6],c=e[7],h=e[8],d=t.element,u=null,f=null,p=null;function m(e){e.touches&&e.touches[0]&&(e[o]=e.touches[0]["page"+c.toUpperCase()]),_===r&&(d[l]=u+p*(e[o]-f),y(t,c),I(t),e.stopPropagation(),e.preventDefault())}function g(){w(t,c),t[h].classList.remove(v.clicking),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",g),_=null}function b(e){null===_&&(_=r,u=d[l],e.touches&&(e[o]=e.touches[0]["page"+c.toUpperCase()]),f=e[o],p=(t[i]-t[n])/(t[s]-t[a]),e.touches?(document.addEventListener("touchmove",m,{passive:!1}),document.addEventListener("touchend",g)):(document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)),t[h].classList.add(v.clicking)),e.stopPropagation(),e.cancelable&&e.preventDefault()}t[r].addEventListener("mousedown",b),t[r].addEventListener("touchstart",b)}var M={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var n=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=n*t.containerHeight,I(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var n=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=n*t.containerWidth,I(t),e.stopPropagation()})},"drag-thumb":function(t){D(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),D(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(d(e,":hover")||d(t.scrollbarX,":focus")||d(t.scrollbarY,":focus"))){var i,o=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(o){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(d(i=o,"input,[contenteditable]")||d(i,"select,[contenteditable]")||d(i,"textarea,[contenteditable]")||d(i,"button,[contenteditable]"))return}var s=0,r=0;switch(n.which){case 37:s=n.metaKey?-t.contentWidth:n.altKey?-t.containerWidth:-30;break;case 38:r=n.metaKey?t.contentHeight:n.altKey?t.containerHeight:30;break;case 39:s=n.metaKey?t.contentWidth:n.altKey?t.containerWidth:30;break;case 40:r=n.metaKey?-t.contentHeight:n.altKey?-t.containerHeight:-30;break;case 32:r=n.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:r=t.containerHeight;break;case 34:r=-t.containerHeight;break;case 36:r=t.contentHeight;break;case 35:r=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==s||t.settings.suppressScrollY&&0!==r||(e.scrollTop-=r,e.scrollLeft+=s,I(t),function(n,i){var o=Math.floor(e.scrollTop);if(0===n){if(!t.scrollbarYActive)return!1;if(0===o&&i>0||o>=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&&n<0||s>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}(s,r)&&n.preventDefault())}})},wheel:function(t){var e=t.element;function n(n){var i=function(t){var e=t.deltaX,n=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!=e&&n!=n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}(n),o=i[0],s=i[1];if(!function(t,n,i){if(!A.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(t))return!1;for(var o=t;o&&o!==e;){if(o.classList.contains(g.consuming))return!0;var s=a(o);if(i&&s.overflowY.match(/(scroll|auto)/)){var r=o.scrollHeight-o.clientHeight;if(r>0&&(o.scrollTop>0&&i<0||o.scrollTop<r&&i>0))return!0}if(n&&s.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<l&&n>0))return!0}o=o.parentNode}return!1}(n.target,o,s)){var r=!1;t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?e.scrollTop-=s*t.settings.wheelSpeed:e.scrollTop+=o*t.settings.wheelSpeed,r=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(o?e.scrollLeft+=o*t.settings.wheelSpeed:e.scrollLeft-=s*t.settings.wheelSpeed,r=!0):(e.scrollTop-=s*t.settings.wheelSpeed,e.scrollLeft+=o*t.settings.wheelSpeed),I(t),r=r||function(n,i){var o=Math.floor(e.scrollTop),s=0===e.scrollTop,r=o+e.offsetHeight===e.scrollHeight,a=0===e.scrollLeft,l=e.scrollLeft+e.offsetWidth===e.scrollWidth;return!(Math.abs(i)>Math.abs(n)?s||r:a||l)||!t.settings.wheelPropagation}(o,s),r&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}"undefined"!=typeof window.onwheel?t.event.bind(e,"wheel",n):"undefined"!=typeof window.onmousewheel&&t.event.bind(e,"mousewheel",n)},touch:function(t){if(A.supportsTouch||A.supportsIePointer){var e=t.element,n={startOffset:{},startTime:0,speed:{},easingLoop:null};A.supportsTouch?(t.event.bind(e,"touchstart",r),t.event.bind(e,"touchmove",l),t.event.bind(e,"touchend",c)):A.supportsIePointer&&(window.PointerEvent?(t.event.bind(e,"pointerdown",r),t.event.bind(e,"pointermove",l),t.event.bind(e,"pointerup",c)):window.MSPointerEvent&&(t.event.bind(e,"MSPointerDown",r),t.event.bind(e,"MSPointerMove",l),t.event.bind(e,"MSPointerUp",c)))}function i(n,i){e.scrollTop-=i,e.scrollLeft-=n,I(t)}function o(t){return t.targetTouches?t.targetTouches[0]:t}function s(e){return e.target!==t.scrollbarX&&e.target!==t.scrollbarY&&((!e.pointerType||"pen"!==e.pointerType||0!==e.buttons)&&(!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)))}function r(t){if(s(t)){var e=o(t);n.startOffset.pageX=e.pageX,n.startOffset.pageY=e.pageY,n.startTime=(new Date).getTime(),null!==n.easingLoop&&clearInterval(n.easingLoop)}}function l(r){if(s(r)){var l=o(r),c={pageX:l.pageX,pageY:l.pageY},h=c.pageX-n.startOffset.pageX,d=c.pageY-n.startOffset.pageY;if(function(t,n,i){if(!e.contains(t))return!1;for(var o=t;o&&o!==e;){if(o.classList.contains(g.consuming))return!0;var s=a(o);if(i&&s.overflowY.match(/(scroll|auto)/)){var r=o.scrollHeight-o.clientHeight;if(r>0&&(o.scrollTop>0&&i<0||o.scrollTop<r&&i>0))return!0}if(n&&s.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<l&&n>0))return!0}o=o.parentNode}return!1}(r.target,h,d))return;i(h,d),n.startOffset=c;var u=(new Date).getTime(),f=u-n.startTime;f>0&&(n.speed.x=h/f,n.speed.y=d/f,n.startTime=u),function(n,i){var o=Math.floor(e.scrollTop),s=e.scrollLeft,r=Math.abs(n),a=Math.abs(i);if(a>r){if(i<0&&o===t.contentHeight-t.containerHeight||i>0&&0===o)return 0===window.scrollY&&i>0&&A.isChrome}else if(r>a&&(n<0&&s===t.contentWidth-t.containerWidth||n>0&&0===s))return!0;return!0}(h,d)&&r.cancelable&&r.preventDefault()}}function c(){t.settings.swipeEasing&&(clearInterval(n.easingLoop),n.easingLoop=setInterval(function(){t.isInitialized?clearInterval(n.easingLoop):n.speed.x||n.speed.y?Math.abs(n.speed.x)<.01&&Math.abs(n.speed.y)<.01?clearInterval(n.easingLoop):(i(30*n.speed.x,30*n.speed.y),n.speed.x*=.8,n.speed.y*=.8):clearInterval(n.easingLoop)},10))}}},H=function(t,e){var n=this;if(void 0===e&&(e={}),"string"==typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var i in this.element=t,t.classList.add(p),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},e)this.settings[i]=e[i];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var o,s,r=function(){return t.classList.add(v.focus)},h=function(){return t.classList.remove(v.focus)};this.isRtl="rtl"===a(t).direction,!0===this.isRtl&&t.classList.add(m),this.isNegativeScroll=(s=t.scrollLeft,t.scrollLeft=-1,o=t.scrollLeft<0,t.scrollLeft=s,o),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new E,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=c(g.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=c(g.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",r),this.event.bind(this.scrollbarX,"blur",h),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var d=a(this.scrollbarXRail);this.scrollbarXBottom=parseInt(d.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=k(d.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=k(d.borderLeftWidth)+k(d.borderRightWidth),l(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=k(d.marginLeft)+k(d.marginRight),l(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=c(g.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=c(g.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",r),this.event.bind(this.scrollbarY,"blur",h),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var u=a(this.scrollbarYRail);this.scrollbarYRight=parseInt(u.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=k(u.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var e=a(t);return k(e.width)+k(e.paddingLeft)+k(e.paddingRight)+k(e.borderLeftWidth)+k(e.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=k(u.borderTopWidth)+k(u.borderBottomWidth),l(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=k(u.marginTop)+k(u.marginBottom),l(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return M[t](n)}),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",function(t){return n.onScroll(t)}),I(this)};H.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,l(this.scrollbarXRail,{display:"block"}),l(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=k(a(this.scrollbarXRail).marginLeft)+k(a(this.scrollbarXRail).marginRight),this.railYMarginHeight=k(a(this.scrollbarYRail).marginTop)+k(a(this.scrollbarYRail).marginBottom),l(this.scrollbarXRail,{display:"none"}),l(this.scrollbarYRail,{display:"none"}),I(this),S(this,"top",0,!1,!0),S(this,"left",0,!1,!0),l(this.scrollbarXRail,{display:""}),l(this.scrollbarYRail,{display:""}))},H.prototype.onScroll=function(t){this.isAlive&&(I(this),S(this,"top",this.element.scrollTop-this.lastScrollTop),S(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},H.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),u(this.scrollbarX),u(this.scrollbarY),u(this.scrollbarXRail),u(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},H.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},"undefined"==typeof window||window.PerfectScrollbar||(window.PerfectScrollbar=H);var N=function(t){function e(n,i){var o;return(o=t.call(this)||this).opts={},window.Cool&&window.Cool.settings&&window.Cool.settings.sidebar?$.extend(!0,o.opts,e.DEFAULTS,window.Cool.settings.sidebar,i):$.extend(!0,o.opts,e.DEFAULTS,i),o.el=n,o.init(),o}n(e,t);var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.initializeScrollbars(),this.initializeTabs(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.destroyScrollbars(),this.onDestroy()},i.buildCache=function(){this.$el=$(this.el),this.el=this.$el[0],this.$content=this.$el.find(".sidebar-content"),this.content=this.$content[0],this.$toggler=$(".sidebar-left-toggler"),this.toggler=this.$toggler[0],this.isFloating=this.$el.hasClass("sidebar-floating"),this.isOpen=document.body.classList.contains("sidebar-left-open"),this.$tabs=this.$el.find(".sidebar-tab"),this.$tabSelectors=$('[name="sidebar-tab-select"]')},i.bindEvents=function(){var t,e=this;(this._toggleHandler=function(t){var n=t.target.closest(".sidebar-left-toggler");n&&e.handleToggle(t,n)},this._mousedownHandler=function(t){if(t.target.matches(".sidebar-content .ps__thumb-y")){var n=t.target.closest(".sidebar-content");null==n||n.classList.add("ps-mousedown-scroll"),e.mousedownScrollbar=!0}},this._mouseupHandler=function(){e.mousedownScrollbar&&(document.querySelectorAll(".sidebar-content.ps-mousedown-scroll").forEach(function(t){return t.classList.remove("ps-mousedown-scroll")}),e.mousedownScrollbar=!1)},this._tabSelectHandler=function(t){t.target.matches('[name="sidebar-tab-select"]')&&e.switchTab(t.target.value)},this._collapseClickHandler=function(t){var n=t.target.closest('[data-toggle="collapse"]');if(n){var i=n.dataset.breakpoint;if(i&&window.matchMedia("(min-width: "+i+"px)").matches){var o,s,r=(null==(o=n.nextElementSibling)?void 0:o.querySelector("li a"))||(null==(s=n.parentElement.nextElementSibling)?void 0:s.querySelector("li a"));r&&(t.metaKey||t.ctrlKey?window.open(r.href,"_blank").focus():window.location.href=r.href)}else setTimeout(function(){var t;return null==(t=e.scrollbar)?void 0:t.update()},300)}},window.ResizeObserver)?(this.resizeObserver=new ResizeObserver(function(t){e.rafId&&cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(function(){window.innerWidth>e.opts.breakpoint&&e.removeBackdrop()})}),this.resizeObserver.observe(document.body)):(this._resizeHandler=function(){clearTimeout(t);var n=performance.now();!e.lastResizeTime||n-e.lastResizeTime>100?(window.innerWidth>e.opts.breakpoint&&e.removeBackdrop(),e.lastResizeTime=n):t=setTimeout(function(){window.innerWidth>e.opts.breakpoint&&e.removeBackdrop()},16)},window.addEventListener("resize",this._resizeHandler,{passive:!0}));document.addEventListener("click",this._toggleHandler),document.addEventListener("click",this._tabSelectHandler),document.addEventListener("mousedown",this._mousedownHandler),document.addEventListener("mouseup",this._mouseupHandler),this.content&&this.content.addEventListener("click",this._collapseClickHandler)},i.unbindEvents=function(){document.removeEventListener("click",this._toggleHandler),document.removeEventListener("click",this._tabSelectHandler),document.removeEventListener("mousedown",this._mousedownHandler),document.removeEventListener("mouseup",this._mouseupHandler),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this.content&&this.content.removeEventListener("click",this._collapseClickHandler)},i.initializeScrollbars=function(){this.content&&(this.scrollbar=new H(this.content,{wheelSpeed:this.opts.wheelSpeed,wheelPropagation:this.opts.wheelPropagation,minScrollbarLength:this.opts.minScrollbarLength,suppressScrollX:this.opts.suppressScrollX}))},i.initializeTabs=function(){var t=this;this.tabScrollbars=new Map,this.$tabs.each(function(e,n){var i=n.querySelector(".tab-content");if(i){var o=new H(i,{wheelSpeed:t.opts.wheelSpeed,wheelPropagation:t.opts.wheelPropagation,minScrollbarLength:t.opts.minScrollbarLength,suppressScrollX:t.opts.suppressScrollX});t.tabScrollbars.set(n,o)}})},i.destroyScrollbars=function(){this.scrollbar&&(this.scrollbar.destroy(),this.scrollbar=null),this.tabScrollbars.forEach(function(t){return t.destroy()}),this.tabScrollbars.clear()},i.toggleWithTransition=function(t){var e=document.documentElement;e.classList.add("sidebar-transitioning"),"open"===t?(document.body.classList.add("sidebar-left-open"),this.isFloating&&window.innerWidth<=this.opts.breakpoint&&this.createBackdrop()):(document.body.classList.remove("sidebar-left-open"),this.removeBackdrop()),setTimeout(function(){e.classList.remove("sidebar-transitioning")},330)},i.createBackdrop=function(){var t=this;if(!document.querySelector(".sidebar-backdrop")){var e=document.createElement("div");e.className="sidebar-backdrop",e.addEventListener("click",function(){t.toggleWithTransition("close"),t.toggler&&(t.toggler.classList.remove("open"),null!==t.toggler.ariaExpanded&&(t.toggler.ariaExpanded="false"))});var n=document.querySelector(".site-main");n&&(n.appendChild(e),requestAnimationFrame(function(){e.classList.add("show")}))}},i.removeBackdrop=function(){var t=document.querySelector(".sidebar-backdrop");t&&(t.classList.remove("show"),t.addEventListener("transitionend",function(){t.remove()},{once:!0}),setTimeout(function(){null==t||t.remove()},330))},i.handleToggle=function(t,e){if(t.stopPropagation(),e){null!==e.ariaExpanded&&(e.ariaExpanded="true"!==e.ariaExpanded),e.classList.toggle("open");var n=document.body.classList.contains("sidebar-left-open");this.toggleWithTransition(n?"close":"open"),n?this.onClose():this.onShow()}},i.switchTab=function(t){var e=document.getElementById("sidebar-tab-"+t);if(e){var n=this.$tabs.toArray();n.forEach(function(t){if(t.classList.toggle("active",t===e),t!==e){var i=t.querySelector(".tab-content");if(i)if(t===n[0])i.style.transform="translate3d(100%, 0px, 0px)";else if(t===n[n.length-1])i.style.transform="translate3d(-100%, 0px, 0px)";else{var o=n.indexOf(t)<n.indexOf(e);i.style.transform="translate3d("+(o?"-100%":"100%")+", 0px, 0px)"}}});var i=e.querySelector(".tab-content");i&&(i.style.transform="none"),this.$tabSelectors.each(function(){$(this).toggleClass("active",this.value===t)})}},i.toggle=function(){var t=document.body.classList.contains("sidebar-left-open");this.toggleWithTransition(t?"close":"open")},i.open=function(){document.body.classList.contains("sidebar-left-open")||this.toggleWithTransition("open")},i.close=function(){document.body.classList.contains("sidebar-left-open")&&this.toggleWithTransition("close")},e}(s);N.DEFAULTS={floating:!0,breakpoint:1046,wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0,onInit:null,onDestroy:null,onShow:null,onClose:null};var O=function(){function t(){var t=this;this.handleWindowResize=function(){t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.windowCallbacks.forEach(function(t){t({target:window,contentRect:{width:window.innerWidth,height:window.innerHeight}})})})},this.callbacks=new WeakMap,this.observer=null,this.rafId=null,this.windowCallbacks=new Set,this.isWindowListening=!1}var e=t.prototype;return e.observe=function(t,e){var n=this;this.observer||(this.observer=new ResizeObserver(function(t){n.rafId&&cancelAnimationFrame(n.rafId),n.rafId=requestAnimationFrame(function(){t.forEach(function(t){var e=n.callbacks.get(t.target);e&&e(t)})})})),this.callbacks.set(t,e),this.observer.observe(t),this.windowCallbacks.add(e),this.isWindowListening||this.startWindowListening()},e.unobserve=function(t){if(this.observer){this.observer.unobserve(t);var e=this.callbacks.get(t);e&&this.windowCallbacks.delete(e),this.callbacks.delete(t),0===this.windowCallbacks.size&&this.stopWindowListening()}},e.startWindowListening=function(){this.isWindowListening=!0,window.addEventListener("resize",this.handleWindowResize,{passive:!0})},e.stopWindowListening=function(){this.isWindowListening=!1,window.removeEventListener("resize",this.handleWindowResize)},e.disconnect=function(){this.observer&&(this.observer.disconnect(),this.callbacks=new WeakMap),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.windowCallbacks.clear(),this.stopWindowListening()},t}(),j=function(){function t(){var t=this;this.handleScroll=function(){t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.callbacks.forEach(function(t){return t()})})},this.callbacks=new Map,this.rafId=null,this.isListening=!1}var e=t.prototype;return e.add=function(t,e){this.callbacks.set(t,e),this.isListening||this.startListening()},e.remove=function(t){this.callbacks.delete(t),0===this.callbacks.size&&this.stopListening()},e.startListening=function(){this.isListening=!0;var t=document.querySelector(".site-main .content");t?(this.scrollElement=t,this.scrollElement.addEventListener("scroll",this.handleScroll,{passive:!0})):(this.scrollElement=window,window.addEventListener("scroll",this.handleScroll,{passive:!0}))},e.stopListening=function(){this.isListening=!1,this.scrollElement&&(this.scrollElement.removeEventListener("scroll",this.handleScroll),this.scrollElement=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null)},t}(),z=new O,W=new j,P=function(t,e,n){var i;return function(){var n=this,o=arguments;clearTimeout(i),i=setTimeout(function(){i=null,t.apply(n,o)},e)}},R=function(){var t=!1;return("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(t=!0),t},q=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)})},F=function(t,e){var n=t&&t.jquery?t[0]:t;return n?new Promise(function(t){var i,o=["animation",e];(i=n.classList).add.apply(i,o),n.addEventListener("animationend",function e(i){var s;i.stopPropagation(),(s=n.classList).remove.apply(s,o),n.removeEventListener("animationend",e),t()},{once:!0})}):Promise.resolve()},X=function(t){return{"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="}[t]},Y=function(t){if("string"!=typeof t){if(null===t)return"";if(!t)return String(t);t=String(t)}return/[&<>"'`=]/.test(t)?t.replace(/[&<>"'`=]/g,X):t},B=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.popover?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.popover,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$popover&&(this.$popover.remove(),this.$popover=null),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){this.buildCache(),this.$popover&&this.setPosition(),this.onUpdate()},i.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-"+q(),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.align=this.$el.data("align")?this.$el.data("align"):this.opts.align,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.offset=this.$el.data("offset")?this.$el.data("offset"):this.opts.offset,this.collisionDetection=!1!==this.$el.data("collisionDetection")?this.$el.data("collisionDetection"):this.opts.collisionDetection,this.containerAutoDetect&&(this.$container=this.$el.offsetParent())},i.bindEvents=function(){var t=this;"click"===this.trigger?this.$el.on("click."+this.constructor.NAME,function(){t.$popover?t.close():t.show()}):"hover"===this.trigger?(this.$el.on("mouseenter."+this.constructor.NAME,function(){clearTimeout(t.hoverTimeout),t.show()}),this.$el.on("mouseleave."+this.constructor.NAME,function(){t.hoverTimeout=setTimeout(function(){t.popupHasFocus||t.close()},100)})):"focus"===this.trigger&&(this.$el.on("focusin."+this.constructor.NAME,function(){t.show()}),this.$el.on("focusout."+this.constructor.NAME,function(){t.close()})),window.ResizeObserver&&(this._resizeCallback=function(){t.$popover&&t.$popover.hasClass("show")&&requestAnimationFrame(function(){t.setPosition()})},z.observe(this.el,this._resizeCallback))},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),this._resizeCallback&&(z.unobserve(this.el),this._resizeCallback=null)},i.buildPopover=function(){var t,e=this;t="function"==typeof this.content?this.content():this.content,this.$popover=$('\n <div class="popover" role="tooltip" id="'+this.id+'">\n <h3 class="popover-header">'+this.title+'</h3>\n <div class="popover-body">'+t+"</div>\n </div>\n "),this.$container.append(this.$popover),this.$container.find("#"+this.id).on("mouseenter",function(){e.popupHasFocus=!0,"hover"===e.trigger&&e.hoverTimeout&&clearTimeout(e.hoverTimeout)}),this.$container.find("#"+this.id).on("mouseleave",function(){e.popupHasFocus=!1,"hover"===e.trigger&&(e.hoverTimeout=setTimeout(function(){e.close()},100))})},i.setPosition=function(t){var e=this;"undefined"!=typeof t&&null!==t||(t=this.placement);var n,i,o=window.innerWidth,s=window.innerHeight,r=this.$popover.outerWidth(!0),a=this.$popover.outerHeight(!0),l=this.$el.outerWidth(!0),c=this.$el.outerHeight(!0),h=this.$container.offset()||{left:0,top:0},d=this.$el.offset();n=d.left-h.left,i=d.top-h.top;var u,f,p=0,m=0;if(this.offset){var g=this.offset.split(",");p=parseInt(g[0],10)||0,m=parseInt(g[1],10)||0}var v=getComputedStyle(this.$popover[0]),b=parseInt(v.getPropertyValue("--cool-popover-spacer"))||8,y=function(t,o){void 0===o&&(o=e.align);var s=0,h=0;switch(t){case"top":s="end"===o?n+l-r:"center"===o?n+(l-r)/2:n,h=i-a-b;break;case"bottom":s="end"===o?n+l-r:"center"===o?n+(l-r)/2:n,h=i+c+b;break;case"left":s=n-r-b,h="end"===o?i+c-a:"center"===o?i+(c-a)/2:i;break;case"right":s=n+l+b,h="end"===o?i+c-a:"center"===o?i+(c-a)/2:i}return{x:s+p,y:h+m}},w=t,$=this.align,x=y(t);if(this.collisionDetection){var C=function(t){var e={top:!1,bottom:!1,left:!1,right:!1},n=h.left+t.x,i=h.top+t.y,l=n+r,c=i+a;return e.top=i<5,e.bottom=c>s-5,e.left=n<5,e.right=l>o-5,e},E=C(x);"bottom"===t&&E.bottom&&!E.top?(w="top",x=y("top",$)):"top"===t&&E.top&&!E.bottom?(w="bottom",x=y("bottom",$)):"right"===t&&E.right&&!E.left?(w="left",x=y("left",$)):"left"===t&&E.left&&!E.right&&(w="right",x=y("right",$));var T=C(x);"top"!==w&&"bottom"!==w||("end"===$&&T.left&&!T.right?x=y(w,$="start"):"start"===$&&T.right&&!T.left&&(x=y(w,$="end")));var S=C(x);S.left?x.x+=5-(h.left+x.x):S.right&&(x.x-=h.left+x.x+r-(o-5)),S.top?x.y+=5-(h.top+x.y):S.bottom&&(x.y-=h.top+x.y+a-(s-5))}u=x.x,f=x.y,this.$popover.css({transform:"translate3d("+Math.round(u)+"px, "+Math.round(f)+"px, 0px)","will-change":"transform"}),this.$popover.attr("x-placement",w+"-"+$)},i.show=function(){this.$popover||(this.buildPopover(),this.setPosition(),this.$popover.addClass("show"),this.$el.attr("data-popover",this.id),this.onShow())},i.close=function(){this.$popover&&(this.$popover.remove(),this.$el.removeAttr("data-popover"),this.$popover=null,this.onClose())},e}(s);B.NAME="coolPopover",B.DEFAULTS={container:"body",containerAutoDetect:!1,trigger:"focus",placement:"bottom",align:"center",offset:null,collisionDetection:!0,title:"",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null},B._jQueryInit(),"undefined"==typeof window||window.PerfectScrollbar||(window.PerfectScrollbar=H);var U=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.select?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.select,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i.useChips=!1,i.cachedTitle="",i.lastSearchQuery="",i._resizeCallback=null,i._scrollCallback=null,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){this.buildCache(),this.buildScroll(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){var t=this;this.buildCache(),this.bindEvents();var e=Promise.resolve();return this.searchApi&&this.searchApi.length&&(e=this._performInitialSearch()),e.then(function(){t.onUpdate()})},i.reset=function(){this.data={},this.data[this.name]=[],this.items=[],this.$select.find(".select-item").remove(),this.$selectItems=[],this.$selectIconContainer.html(this.selectIconDefault),this.$selectHeader.removeClass("select-placeholder"),"function"==typeof this.dynamicTitle?this.$selectTitle.text(this.dynamicTitle.call(this)):(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.text(this.dynamicTitleDefault),0==this.$selectItems.length&&!this.searchApi&&this.dynamicTitle&&this.dynamicTitleEmptyDefault&&0!==this.dynamicTitleEmptyDefault&&(this.$selectHeader.addClass("select-placeholder"),this.$selectIconContainer.addClass("d-none"),this.$selectTitle.text(this.dynamicTitleEmptyDefault))),this.showSearch&&(this.searchData=[],this.$searchInput.val(""),this.searchString="",this.search.call(this))},i.buildCache=function(){var t=this;if(this.$el=$(this.el),this.$container=this.$el.parent(),this.$selectHeader=this.$el.find(".select-header"),this.$selectTitle=this.$el.find(".select-title"),this.cachedTitle=this.$selectTitle.text(),this.$selectIconContainer=this.$selectHeader.find(".select-icon"),this.$searchIconContainer=this.$el.find(".select-search-icon"),this.selectIconDefault=this.$selectHeader.find(".select-icon")?this.$selectHeader.find(".select-icon").html():'<i class="'+(this.opts.faPro?"fal":"fas")+'fa-angle-down icon"></i>',this.name=this.$el.data("name")?this.$el.data("name"):this.opts.name,this.scroll=null,this.scrollContentHeight=this.$el.data("scrollContentHeight")?this.$el.data("scrollContentHeight"):this.opts.scrollContentHeight,this.useNativeScroll=this.$el.data("useNativeScroll")?this.$el.data("useNativeScroll"):this.opts.useNativeScroll,this.contentWidth=this.$el.data("contentWidth")?this.$el.data("contentWidth"):this.opts.contentWidth,this.items=this.$el.data("items")?this.$el.data("items"):this.opts.items,this.data={},this.data[this.name]=[],this.searchData=[],this.searchApi=this.$el.data("searchApi")?this.$el.data("searchApi"):this.opts.searchApi,this.searchRequest=null,this.type=this.$el.data("type")?this.$el.data("type"):this.opts.type,this.contentOpen=!1,this.searchPlaceholder=this.$el.data("search-placeholder")?this.$el.data("search-placeholder"):this.opts.searchPlaceholder,this.btnCloseText=this.$el.data("btn-close-text")?this.$el.data("btn-close-text"):this.opts.btnCloseText,this.labelTemplate=this.opts.labelTemplate,this.confirmCheck=this.opts.confirmCheck,this.confirmUncheck=this.opts.confirmUncheck,this.preventUncheck=this.opts.preventUncheck,this.dynamicTitle=this.$el.data("dynamicTitle")?this.$el.data("dynamicTitle"):this.opts.dynamicTitle,this.dynamicTitleDefault=this.$el.data("dynamicTitleDefault")?this.$el.data("dynamicTitleDefault"):this.opts.dynamicTitleDefault,this.dynamicTitleEmptyDefault=this.$el.data("dynamicTitleEmptyDefault")?this.$el.data("dynamicTitleEmptyDefault"):this.opts.dynamicTitleEmptyDefault,this.allowNoneOnRadioSelect=this.$el.data("allowNoneOnRadioSelect")?this.$el.data("allowNoneOnRadioSelect"):this.opts.allowNoneOnRadioSelect,this.showValidStateIcon=this.$el.data("showValidStateIcon")?this.$el.data("showValidStateIcon"):this.opts.showValidStateIcon,this.itemsToExclude=this.$el.data("itemsToExclude")?this.$el.data("itemsToExclude").replace(/\s/g,"").split(","):this.opts.itemsToExclude,this.primaryKeyword=this.$el.data("primaryKeyword")?this.$el.data("primaryKeyword"):this.opts.primaryKeyword,this.useChips=this.$el.data("useChips")?this.$el.data("useChips"):this.opts.useChips,this.useChips&&(this.showValidStateIcon=!1),this.preventClose=!1,this.itemsToExclude.length>0&&(this.itemsToExclude=this.itemsToExclude.map(String)),this.opts.setData&&(this.data=this.opts.setData),this.$el.data("setData")&&""!=this.$el.data("setData")&&(this.data=this.$el.data("setData")),!Array.isArray(this.data[this.name])&&""!==this.data[this.name]&&this.data[this.name].length>0){var e=this.data[this.name].toString().trim().split(",");this.data[this.name]=e}if(this.data[this.name].length>0&&!this.useChips&&(this.data[this.name]=this.data[this.name].map(String)),this.data[this.name].length>0&&this.itemsToExclude.length>0&&(this.data[this.name]=this.data[this.name].filter(function(e){return e[t.primaryKeyword]?-1===t.itemsToExclude.indexOf(e[t.primaryKeyword].toString()):-1===t.itemsToExclude.indexOf(e.toString())})),this.data&&this.useChips&&this._renderChips(),this.items.length>0&&this.itemsToExclude.length>0&&(this.items=this.items.filter(function(e){return e[t.primaryKeyword]?-1===t.itemsToExclude.indexOf(e[t.primaryKeyword].toString()):-1===t.itemsToExclude.indexOf(e.toString())})),this.$el.find(".select-search").length?this.showSearch=!0:this.showSearch=this.$el.data("showSearch")?this.$el.data("showSearch"):this.opts.showSearch,this.$el.find(".select-footer").length?this.showFooter=!0:this.showFooter=this.$el.data("showFooter")?this.$el.data("showFooter"):this.opts.showFooter,this.$select=this.$el.find(".select-content"),this.$select.length){var n=this.$select.find(".select-item");n.length>0&&this.itemsToExclude.length>0&&$.each(n,function(e,n){var i=$(n).find(":input").val();t.itemsToExclude.indexOf(i)>-1&&$(n).remove()})}else{var i=this._renderItemList(this.items);this.$select=$('\n <div class="select-content">\n\n '+this._renderSearch()+'\n\n <div class="select-scrollable-content"></div>\n\n '+this._renderFooter()+"\n\n </div>\n "),this.$el.append(this.$select),this.$select.find(".select-scrollable-content").append(i)}if(this.data[this.name].length>0){var o=this.useChips?this.data[this.name].map(function(e){return e[t.primaryKeyword].toString()}):this.data[this.name].map(String);if(this.$select.find(":input").each(function(e,n){var i=$(n);o.includes(i.val())&&(i.prop("checked",!0),"radio"===t.type&&i.addClass("checked"))}),this.useChips)this._renderChips();else if("radio"===this.type&&"function"!=typeof this.dynamicTitle){var s=this.$select.find(":input:checked");s.length&&this.$selectTitle.text(s.parent().find("[data-label]").text())}}this.$scrollableContent=!!this.$select.find(".select-scrollable-content")&&this.$select.find(".select-scrollable-content"),this.$selectItems=this.$select.find(".select-item"),this.$selectHeader.removeClass("select-placeholder"),this.searchApi&&this.searchApi.length&&this._performInitialSearch(),"function"==typeof this.dynamicTitle?this.$selectTitle.text(this.dynamicTitle.call(this)):(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.text(this.dynamicTitleDefault),0==this.$selectItems.length&&!this.searchApi&&this.dynamicTitle&&this.dynamicTitleEmptyDefault&&0!==this.dynamicTitleEmptyDefault&&(this.$selectHeader.addClass("select-placeholder"),this.$selectIconContainer.addClass("d-none"),this.$selectTitle.text(this.dynamicTitleEmptyDefault))),this.showSearch&&(this.$searchContainer=this.$select.find(".select-search"),this.$searchInput=this.$select.find('[name="select-search"]'),this.$clearSearchButton=this.$select.find("[data-clear-search]"),this.$searchInput[0].tabIndex=-1),this.showFooter&&(this.$footerContainer=this.$select.find(".select-footer"),this.$closeButton=this.$select.find("[data-select-close]"),this.$closeButton.length&&(this.$closeButton[0].tabIndex=-1)),this.buildSearchData()},i._updateScrollbarVisibility=function(){if(this.scroll&&this.$scrollableContent[0]){var t=this.$scrollableContent[0];t.scrollHeight>t.clientHeight?(this.scroll.settings.suppressScrollY=!1,this.$scrollableContent.addClass("ps-show-rail-y")):(this.scroll.settings.suppressScrollY=!0,this.$scrollableContent.removeClass("ps-show-rail-y")),this.scroll.update()}},i._performInitialSearch=function(){var t=this;return this.isSearchApiEnabled()?(this._showSpinner(),new Promise(function(e,n){$.ajax({method:"GET",url:t.searchApi,timeout:1e4,success:function(n){var i=n.filter(function(e){return-1===t.itemsToExclude.indexOf(e[t.primaryKeyword].toString())&&0!=e[t.primaryKeyword]});t.useChips&&t.data[t.name].length>0&&(t.data[t.name].forEach(function(e){var n=i.find(function(n){return n[t.primaryKeyword].toString()===e[t.primaryKeyword].toString()});n&&(e.label=n.label||n.name||n.value)}),t.$selectTitle.empty(),t.data[t.name].forEach(function(e){var n=$('\n <span class="chip" data-value="'+e[t.primaryKeyword]+'">\n <span class="chip-title">'+Y(e.label)+"</span>\n </span>\n ");n.on("click",function(n){n.stopPropagation(),t.$select.find('input[value="'+e[t.primaryKeyword]+'"]').prop("checked",!1).trigger("change")}),t.$selectTitle.append(n)}));var o=t._renderItemList(i);t.$scrollableContent.html(o),t.data[t.name].length>0&&t.data[t.name].forEach(function(e){var n=t.useChips?e[t.primaryKeyword].toString():e.toString(),i=t.$scrollableContent.find('input[value="'+n+'"]');i.length&&(i.prop("checked",!0),"radio"===t.type&&i.addClass("checked"))}),t._updateScrollbarVisibility(),t._hideSpinner(),t.useChips&&t.data[t.name].length>0&&t._renderChips(),t.contentOpen&&t._recalculateContentHeight(),e()},error:function(n,i,o){t._hideSpinner(),console.error("Search API error:",i,o),t.$scrollableContent.html('<div class="p-3 text-danger">Error loading items</div>'),e()}})})):Promise.resolve()},i.buildScroll=function(){var t=this;if(this.$scrollableContent.length>0){var e=this.scrollContentHeight;this.showSearch&&(e-=this.$searchContainer.outerHeight(!0)||0),this.showFooter&&(e-=this.$footerContainer.outerHeight(!0)||0);var n=(parseInt(this.$scrollableContent.css("marginTop"),10)||0)+(parseInt(this.$scrollableContent.css("marginBottom"),10)||0),i=this.$scrollableContent[0].scrollHeight,o=Math.min(i,e+n);this.$scrollableContent.css({"max-height":o+"px"}),R()?this.$scrollableContent.css({"overflow-y":"auto"}):(!1===this.useNativeScroll&&(this.$scrollableContent.addClass("ps-dark"),this.scroll=new H(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,scrollYMarginOffset:-1,suppressScrollY:!0,suppressScrollX:!0}),setTimeout(function(){t._updateScrollbarVisibility()},0)),this.$scrollableContent.find('[tabindex="0"]').attr("tabindex",-1))}},i.buildSearchData=function(){var t=this;this.searchData=[];var e=this.$select.find("[data-label]");$.each(e,function(e,n){t.searchData.push({id:e,val:$(n).text().trim()})})},i.bindEvents=function(){var t=this,e=this;this.$selectHeader.on("click."+this.constructor.NAME,function(){t.contentOpen?t.close():(t.$selectItems.length>0||t.searchApi)&&t.show()}),this.$el.on("change."+this.constructor.NAME,'input[type="checkbox"]',function(){var t=this,n=$(this).val(),i=600;if(e.preventClose=!0,"function"==typeof e.confirmCheck&&t.checked)t.checked=!1,e.confirmCheck(function(o){if("confirmed"==o){var s;if(e.useChips){if(!e.data[e.name].find(function(t){return t[e.primaryKeyword]===n}))e.data[e.name].push(((s={})[e.primaryKeyword]=n,s.label=$(t).parent().find("[data-label]").text(),s))}else-1===e.data[e.name].indexOf(n)&&e.data[e.name].push(n);t.checked=!0,e.onSelect(t)}setTimeout(function(){e.preventClose=!1},i)},t);else if(t.checked){var o;if(e.useChips){if(!e.data[e.name].find(function(t){return t[e.primaryKeyword]===n}))e.data[e.name].push(((o={})[e.primaryKeyword]=n,o.label=$(t).parent().find("[data-label]").text(),o))}else-1===e.data[e.name].indexOf(n)&&e.data[e.name].push(n);e.onSelect(t),setTimeout(function(){e.preventClose=!1},i)}else"function"!=typeof e.confirmUncheck||t.checked?t.checked||e.preventUncheck?!t.checked&&e.preventUncheck&&(t.checked=!0,setTimeout(function(){e.preventClose=!1},i)):(e.useChips?e.data[e.name]=e.data[e.name].filter(function(t){return t[e.primaryKeyword]!=n}):e.data[e.name]=e.data[e.name].filter(function(t){return t!=n}),e.onSelect(t),setTimeout(function(){e.preventClose=!1},i)):(t.checked=!0,e.confirmUncheck(function(o){"confirmed"==o&&(e.useChips?e.data[e.name]=e.data[e.name].filter(function(t){return t[e.primaryKeyword]!=n}):e.data[e.name]=e.data[e.name].filter(function(t){return t!=n}),t.checked=!1,e.onSelect(t)),setTimeout(function(){e.preventClose=!1},i)},t))}),this.$el.on("change."+this.constructor.NAME,'input[type="radio"]',function(){var t=$(this).val();if(this.checked){var n;if(e.useChips)e.data[e.name]=[(n={},n[e.primaryKeyword]=t,n.label=$(this).parent().find("[data-label]").text(),n)];else e.data[e.name]=[t];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")}else e.data[e.name]=[]}),this.$el.on("click."+this.constructor.NAME,'input[type="radio"]',function(){$(this).hasClass("checked")&&e.allowNoneOnRadioSelect?(e.data[e.name]=[],$(this).prop("checked",!1),$(this).removeClass("checked"),e.dynamicTitle&&"function"!=typeof e.dynamicTitle&&e.$selectTitle.text(e.dynamicTitleDefault)):($(this).addClass("checked"),e.dynamicTitle&&"function"!=typeof e.dynamicTitle&&e.$selectTitle.text(Y($(this).parent().find("[data-label]").text()))),"function"==typeof e.dynamicTitle&&e.$selectTitle.text(e.dynamicTitle.call(this)),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."+this.constructor.NAME,P(function(){e.searchString=$(this).val().trim(),e.search.call(e)},250)),this.$searchInput.on("focusin."+this.constructor.NAME,function(){e.$searchContainer.addClass("focused")}),this.$searchInput.on("focusout."+this.constructor.NAME,function(){e.$searchContainer.removeClass("focused")}),this.$searchContainer.on("click."+this.constructor.NAME,"[data-clear-search]",function(){e.searchString.length&&(e.$searchInput.val(""),e.searchString="",e.search.call(e))})),this.showFooter&&this.$closeButton.on("click."+this.constructor.NAME,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)}),"fixed"===this.opts.position&&(this._scrollCallback=function(){t.$el&&t.$el.hasClass("show")&&requestAnimationFrame(function(){t.$el.find(".select-content").css({top:t.$container.offset().top-$(window).scrollTop(),left:t.$container.offset().left-$(window).scrollLeft(),width:t.contentWidth?"var(--cool-select-content-width, "+t.contentWidth+"px)":t.$container.outerWidth()})})},window.ResizeObserver&&(this._resizeCallback=function(e){t.$el&&t.$el.hasClass("show")&&requestAnimationFrame(function(){t.$el.find(".select-content").css({top:t.$container.offset().top-$(window).scrollTop(),left:t.$container.offset().left-$(window).scrollLeft(),width:t.contentWidth?"var(--cool-select-content-width, "+t.contentWidth+"px)":t.$container.outerWidth()})})},z.observe(document.body,this._resizeCallback)))},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),$(document).off("touchstart click."+this.constructor.NAME),"fixed"===this.opts.position&&(this._scrollCallback&&(W.remove("select-"+this.name),this._scrollCallback=null),this._resizeCallback&&(z.unobserve(document.body),this._resizeCallback=null))},i.getData=function(t){return t?this.data[t]:this.data},i.setData=function(){var t=this,e=this,n=this.opts.faPro?"fal":"fas";if(this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+n+' fa-check text-success icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.useChips&&this.$selectTitle.empty(),this.searchApi.length){var i=this.searchApi,o=this.data[this.name].length,s=0;this.data[e.name].forEach(function(t){i+=encodeURIComponent("#"+t),++s!==o&&(i+="+")}),$.ajax({method:"GET",url:i}).done(function(n){var i=n.map(function(t){return t.id.toString()});e.data[e.name]=e.data[e.name].filter(function(t){return e.useObjects?i.indexOf(t[e.primaryKeyword].toString())>-1:i.indexOf(t.toString())>-1}),0==e.data[e.name].length&&e.$selectIconContainer.html(e.selectIconDefault);var o=n.filter(function(t){return e.useObjects?e.data[e.name].findIndex(function(n){return n[e.primaryKeyword]==t.id})>-1&&-1===e.itemsToExclude.indexOf(t.id)&&0!=t.id:e.data[e.name].indexOf(t.id)>-1&&-1===e.itemsToExclude.indexOf(t.id)&&0!=t.id}),s=e._renderItemList(o);e.$scrollableContent.append(s);var r=e.$scrollableContent.find(":input");if(e._updateScrollbarVisibility(),e.$scrollableContent.find(':input[type="checkbox"]').length?e.type="checkbox":e.$scrollableContent.find(':input[type="radio"]').length&&(e.type="radio"),"checkbox"==e.type)e.data[e.name].forEach(function(t){var n=e.useObjects?t[e.primaryKeyword].toString():t.toString(),i=r.filter(function(){return this.value==n});i.prop("checked",!0),e.useChips&&e._renderChips(),e.onSelect(i[0])});else if("radio"==e.type){var a=t,l=t.data[t.name][0],c=r.filter(function(){return this.value==l});c.prop("checked",!0),c.addClass("checked"),a.useChips?a._renderChips():a.dynamicTitle&&"function"!=typeof a.dynamicTitle&&a.$selectTitle.text(c.parent().find("[data-label]").text()),a.onSelect(c[0])}"function"==typeof e.dynamicTitle&&e.$selectTitle.text(e.dynamicTitle.call(t))})}else{var r=this.$scrollableContent.find(":input"),a=r.length>0?r.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(t){var n=r.filter(function(){return this.value==t});n.prop("checked",!0),e.useChips&&e._renderChips(),e.onSelect(n[0])});else if("radio"==this.type){var l=r.filter(function(){return this.value==this.data[this.name][0]});l.prop("checked",!0),l.addClass("checked"),this.useChips?this._renderChips():this.dynamicTitle&&"function"!=typeof this.dynamicTitle&&this.$selectTitle.text(l.parent().find("[data-label]").text()),this.onSelect(l[0])}"function"==typeof this.dynamicTitle&&this.$selectTitle.text(this.dynamicTitle.call(this))}},i._renderChips=function(){var t=this;this.$selectTitle.empty(),0!==this.data[this.name].length?(this.data[this.name].forEach(function(e){var n=t.useChips?e[t.primaryKeyword]:e,i=t.$select?t.$select.find('input[value="'+n+'"]'):[],o=i.length?i.parent().find("[data-label]").text():e.label||e.name||e.value||n,s=$('\n <span class="chip" data-value="'+n+'">\n <span class="chip-title">'+Y(o)+"</span>\n </span>\n ");s.on("click",function(i){i.stopPropagation();var o=t.$select.find('input[value="'+n+'"]');o.length?o.prop("checked",!1).trigger("change"):(t.useChips?t.data[t.name]=t.data[t.name].filter(function(e){return e[t.primaryKeyword].toString()!==n.toString()}):t.data[t.name]=t.data[t.name].filter(function(t){return t.toString()!==n.toString()}),t.searchApi.length&&(t.items=t.items.filter(function(e){return e[t.primaryKeyword].toString()!==n.toString()})),t._renderChips(),"function"==typeof t.opts.onSelect&&t.opts.onSelect.call(t,e,t,!1))}),t.$selectTitle.append(s)}),this.contentOpen&&setTimeout(function(){t._updateScrollbarVisibility()},0)):this.dynamicTitle&&this.dynamicTitleDefault?this.$selectTitle.text(this.dynamicTitleDefault):this.$selectTitle.text(this.cachedTitle)},i.search=function(){var t=this,e=this,n=this.opts.faPro?"fal":"fas";if(this.searchString.length)if(this.isSearchApiEnabled()){if(this.searchString===this.lastSearchQuery)return;this.lastSearchQuery=this.searchString,this._showSpinner(),null!==this.searchRequest&&this.searchRequest.abort(),clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=setTimeout(function(){t.searchRequest=$.ajax({method:"GET",url:t.searchApi+t.searchString}).done(function(t){e.searchRequest=null,e.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove();var i=t.filter(function(t){return e.useObjects?-1===e.data[e.name].findIndex(function(n){return n[e.primaryKeyword]==t.id})&&-1===e.itemsToExclude.indexOf(t.id)&&0!=t.id:-1===e.data[e.name].indexOf(t.id)&&-1===e.itemsToExclude.indexOf(t.id)&&0!=t.id}),o=e._renderItemList(i);e.$scrollableContent.append(o),e.$searchIconContainer.html('<i class="'+n+' fa-times icon"></i>'),e.$searchIconContainer.attr("data-clear-search","true"),e._updateScrollbarVisibility(),e.contentOpen&&e._recalculateContentHeight()})},300)}else{var i=this.searchString.toLowerCase(),o=this.searchData.filter(function(t){return t.val.toLowerCase().indexOf(i)>-1});this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),o.forEach(function(t){$(e.$selectItems[t.id]).addClass("visible")}),this.$selectItems.not(".visible").addClass("d-none"),this.$searchIconContainer.html('<i class="'+n+' fa-times icon"></i>'),this.$searchIconContainer.attr("data-clear-search","true")}else this.lastSearchQuery="",this.isSearchApiEnabled()?(this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),this._hideSpinner(),this.$searchIconContainer.attr("data-clear-search",""),this._performInitialSearch()):(this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),this.$searchIconContainer.html('<i class="'+n+' fa-search icon"></i>'),this.$searchIconContainer.attr("data-clear-search",""));this.scroll&&this.scroll.update(),this.onUpdate()},i._recalculateContentHeight=function(){var t=this,e=this.$el.find(".select-content"),n=this.$selectHeader.outerHeight(!0),i=this.scrollContentHeight,o=$(window).height(),s=$(window).scrollTop(),r=i,a=0,l=0;if(this.$searchContainer&&this.$searchContainer.length&&(a=this.$searchContainer.outerHeight(!0)||0),this.$footerContainer&&this.$footerContainer.length&&(l=this.$footerContainer.outerHeight(!0)||0),this.$scrollableContent&&this.$scrollableContent.length){var c=this.$scrollableContent[0].scrollHeight,h=this.$scrollableContent[0].clientHeight;r=Math.min(Math.max(c,h)+a+l,i)}var d=this.$el.hasClass("select-dropup"),u=0,f=r,p=parseInt(e.css("margin-bottom")||0,10),m=parseInt(e.css("margin-top")||0,10);if("fixed"===this.opts.position){var g=this.$container.offset().top-$(window).scrollTop(),v=o-g-n-50,b=g-50;d?u=g-(f=Math.min(r,b))-p:(f=Math.min(r,v),u=g+n+m)}else{var y=this.$container.offset(),w=o-(y.top-s)-n-50,x=y.top-s-50;d?u=-(f=Math.min(r,x))-p:(f=Math.min(r,w),u=n+m)}var C=f-a-l;e.css({height:f+"px"}),this.$scrollableContent&&this.$scrollableContent.length&&this.$scrollableContent.css({"max-height":C+"px"}),this.opts.position,e.css({top:u}),this.scroll&&setTimeout(function(){t._updateScrollbarVisibility()},0)},i.show=function(){var t=this;if(!this.$el.hasClass("show")){var e=0,n=0;"fixed"===this.opts.position&&(e=this.$container.offset().top-$(window).scrollTop(),n=this.$container.offset().left-$(window).scrollLeft());var i=$(".select.show"),o=1,s=this.opts.faPro?"fal":"fas";i.length&&(o=parseInt(i.first().css("z-index"),10)+2),this.$el.addClass("show"),i.length||(o=parseInt(this.$el.css("z-index"),10)+1);var r=this.$el.find(".select-content"),a=this.$selectHeader.outerHeight(!0),l=this.scrollContentHeight,c=$(window).height(),h=$(window).scrollTop(),d=l,u=0,f=0;if(this.$searchContainer&&this.$searchContainer.length&&(u=this.$searchContainer.outerHeight(!0)||0),this.$footerContainer&&this.$footerContainer.length&&(f=this.$footerContainer.outerHeight(!0)||0),this.$scrollableContent&&this.$scrollableContent.length){var p=this.$scrollableContent[0].scrollHeight,m=this.$scrollableContent[0].clientHeight;d=Math.min(Math.max(p,m)+u+f,l)}var g=!1,v=0,b=d,y=parseInt(r.css("margin-bottom")||0,10),w=parseInt(r.css("margin-top")||0,10);if("fixed"===this.opts.position){var x=c-e-a-50,C=e-50;(g=x<d&&C>x)?v=e-(b=Math.min(d,C))-y:(b=Math.min(d,x),v=e+a+w)}else{var E=this.$container.offset(),T=c-(E.top-h)-a-50,S=E.top-h-50;(g=T<d&&S>T)?v=-(b=Math.min(d,S))-y:(b=Math.min(d,T),v=a+w)}var k=b-u-f;r.css({height:b+"px"}),this.$scrollableContent&&this.$scrollableContent.length&&this.$scrollableContent.css({"max-height":k+"px"}),this.$el.toggleClass("select-dropup",g),this.$el.toggleClass("select-dropdown",!g);var A=r.outerWidth();r.css({"z-index":o,position:"fixed"===this.opts.position?"fixed":"absolute"}),"fixed"===this.opts.position?r.css({top:v,left:n,width:this.contentWidth?"var(--cool-select-content-width, "+this.contentWidth+"px)":this.$container.outerWidth()}):r.css({top:v,width:this.contentWidth?"var(--cool-select-content-width, "+this.contentWidth+"px)":A>this.$container.outerWidth()?"var(--cool-select-content-width, auto)":this.$container.outerWidth()}),r.css({"min-width":this.$container.outerWidth()}),this.$scrollableContent.length&&this.$scrollableContent[0].offsetHeight<this.$scrollableContent[0].scrollHeight&&(this.$scrollableContent[0].scrollTop=1,this.$scrollableContent[0].scrollTop=0),g?this.$selectIconContainer.html('<i class="'+s+' fa-angle-down icon"></i>'):this.$selectIconContainer.html('<i class="'+s+' fa-angle-up icon"></i>'),setTimeout(function(){t.$el[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),t.scroll&&t._updateScrollbarVisibility()},300),this.contentOpen=!0,"fixed"===this.opts.position&&this._scrollCallback&&W.add("select-"+this.name,this._scrollCallback),this.onShow()}},i.close=function(){if(!this.preventClose){var t=this,e=this.opts.faPro?"fal":"fas";this.$el.removeClass("show"),this.$el.removeClass("select-dropup select-dropdown"),setTimeout(function(){t.$el.removeAttr("style")},300),this.data[this.name].length>0&&this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+e+' fa-check text-success icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.contentOpen=!1,"fixed"===this.opts.position&&this._scrollCallback&&W.remove("select-"+this.name),this.onClose()}},i.onSelect=function(t){var e,n=this,i=$(t).parents(".select-item").data(),o=$(t).val();this.searchApi.length&&!$.isEmptyObject(i)&&($(t).length&&t.checked?(this.items.push(i),this.useChips?this.data[this.name].find(function(t){return t[n.primaryKeyword].toString()===o.toString()})||this.data[this.name].push(((e={})[this.primaryKeyword]=o,e.label=$(t).parent().find("[data-label]").text(),e)):-1===this.data[this.name].indexOf(o)&&this.data[this.name].push(o)):(this.items=$.grep(this.items,function(t){return t[n.primaryKeyword].toString()!==o.toString()}),this.useChips?this.data[this.name]=this.data[this.name].filter(function(t){return t[n.primaryKeyword].toString()!==o.toString()}):this.data[this.name]=this.data[this.name].filter(function(t){return t.toString()!==o.toString()})));this.useChips&&this._renderChips(),"function"==typeof this.opts.onSelect&&this.opts.onSelect.call(t,i,this,t.checked)},i.getItem=function(t,e){var n=$.grep(this.items,function(n){return n[t]==e})[0];return n||null},i.getSelectedItems=function(t){var e=this,n=[],i=[],o=this.data[this.name];return $.isArray(o)?n=o:n.push(o),n=this.useChips?n.map(function(t){return t[e.primaryKeyword].toString()}):n.map(String),this.items.length>0?(i=$.grep(this.items,function(t){return n.indexOf(t.id.toString())>-1}),t&&(i=i.map(function(e){return e[t]}).filter(function(t){return null!=t}))):i=n,i},i.getSelectedItem=function(t){return this.getSelectedItems(t)[0]},i._renderItemList=function(t){var e=this;if(!t||!t.length)return[];var n=this.data[this.name].map(function(t){return e.useChips?t[e.primaryKeyword].toString():t.toString()});document.createDocumentFragment();for(var i=[],o=0;o<t.length;++o){var s=t[o],r="";"function"==typeof this.labelTemplate?r=this.labelTemplate(s):s.name?r=s.name:s.label?r=s.label:s.value&&(r=s.value);var a=this.useChips?s[this.primaryKeyword]:s.id,l=n.indexOf(a.toString())>-1,c=$(this._getItemTemplate(s,o,r,l)).data(s);i.push(c)}return i},i._getItemTemplate=function(t,e,n,i){return'\n <div class="select-item">\n <div class="select-item-'+this.type+'">\n <div class="form-check">\n <input type="'+this.type+'"\n id="select-'+this.name+"-"+t.id+'"\n value="'+t.id+'"\n tabindex="-1"\n '+(i?"checked":"")+'>\n <label for="select-'+this.name+"-"+t.id+'">\n <span class="form-check-icon">\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 <span class="form-check-label"'+("function"!=typeof this.labelTemplate?" data-label":"")+">\n "+("function"!=typeof this.labelTemplate?Y(n):n)+"\n </span>\n </label>\n </div>\n </div>\n </div>"},i._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""},i._renderFooter=function(){return this.showFooter?'\n\n <div class="select-footer">\n\n <button class="btn btn-block btn-light btn-sm" type="button" tabindex="-1" data-select-close >\n '+this.btnCloseText+"\n </button>\n\n </div>\n\n ":""},i.isSearchApiEnabled=function(){return this.searchApi&&this.searchApi.length},i._showSpinner=function(){var t=this.opts.faPro?"fal":"fas";this.$searchIconContainer.html('<i class="'+t+' fa-spinner-third fa-spin icon"></i>')},i._hideSpinner=function(){var t=this.opts.faPro?"fal":"fas";this.$searchIconContainer.html('<i class="'+t+' fa-search icon"></i>')},i.selectItem=function(t){var e=this,n=this.$select.find(':input[value="'+t+'"]');if(n.length){if("radio"===this.type)if(this.$select.find('input[type="radio"]').prop("checked",!1).removeClass("checked"),this.useChips){var i,o=n.parent().find("[data-label]").text();this.data[this.name]=[(i={},i[this.primaryKeyword]=t,i.label=o,i)]}else this.data[this.name]=[t];else if(this.useChips){if(!this.data[this.name].find(function(n){return n[e.primaryKeyword].toString()===t.toString()})){var s,r=n.parent().find("[data-label]").text();this.data[this.name].push(((s={})[this.primaryKeyword]=t,s.label=r,s))}}else-1===this.data[this.name].indexOf(t)&&this.data[this.name].push(t);return n.prop("checked",!0).addClass("checked").trigger("change"),!0}return!1},i.clear=function(){var t=this,e=this.$select.find(":input:checked");this.$select.find(":input").prop("checked",!1).removeClass("checked"),this.data[this.name]=[],this.useChips?this._renderChips():this.dynamicTitle&&"function"!=typeof this.dynamicTitle&&this.$selectTitle.text(this.dynamicTitleDefault||this.cachedTitle),this.showValidStateIcon&&this.$selectIconContainer.html(this.selectIconDefault),e.each(function(e,n){var i=$(n).parents(".select-item").data();"function"==typeof t.opts.onSelect&&t.opts.onSelect.call(n,i,t,!1)})},e}(s);U.NAME="coolSelect",U.DEFAULTS={name:"",type:"checkbox",labelTemplate:null,confirmCheck:null,confirmUncheck:null,setData:null,scrollContentHeight:300,useNativeScroll:!1,contentWidth:null,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,dynamicTitle:!1,dynamicTitleDefault:"",dynamicTitleEmptyDefault:"",allowNoneOnRadioSelect:!0,preventUncheck:!1,showValidStateIcon:!0,itemsToExclude:[],primaryKeyword:"id",position:"absolute",scrollEl:".content",useChips:!1},U._jQueryInit(),"undefined"==typeof window||window.PerfectScrollbar||(window.PerfectScrollbar=H);var Q=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.dropdown?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.dropdown,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i._resizeCallback=null,i._scrollCallback=null,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.setupResizeHandling=function(){var t,e=this;window.ResizeObserver?(this._resizeCallback=function(t){e.contentOpen&&(e.rafId&&cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(function(){e.setPosition(),e.onUpdate()}))},z.observe(this.$el[0],this._resizeCallback),z.observe(document.body,this._resizeCallback),this.$container.length&&z.observe(this.$container[0],this._resizeCallback)):(this.resizeHandler=function(){if(e.contentOpen){clearTimeout(t);var n=performance.now();!e.lastResizeTime||n-e.lastResizeTime>100?(e.setPosition(),e.onUpdate(),e.lastResizeTime=n):t=setTimeout(function(){e.setPosition(),e.onUpdate()},16)}},window.addEventListener("resize",this.resizeHandler,{passive:!0}))},i.setupScrollHandling=function(){var t=this;if("fixed"===this.position){this._scrollCallback=function(){t.contentOpen&&t.$dropdown.hasClass("show")&&(t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.setPosition(),t.onUpdate()}))},W.add("dropdown-"+this.id,this._scrollCallback);var e=this.$el.parent();for(this.scrollableParents=[];e.length&&e[0]!==document.body;){var n=e.css("overflow-y");if("scroll"===n||"auto"===n){var i=function(){return t._scrollCallback()};e[0].addEventListener("scroll",i,{passive:!0}),this.scrollableParents.push({element:e[0],handler:i})}e=e.parent()}}},i.setupVisibilityDetection=function(){var t=this;window.IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver(function(e){e.forEach(function(e){!e.isIntersecting&&t.contentOpen&&(t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.setPosition()}))})},{threshold:.1,rootMargin:"50px"}),this.intersectionObserver.observe(this.$el[0]))},i.init=function(){var t=this;this.buildCache().then(function(){t.buildScroll(),t.setupVisibilityDetection(),t.bindEvents(),t.onInit()}).catch(function(){console.error("Failed to build Dropdown")})},i.destroy=function(){this.unbindEvents(),this.scroll&&"function"==typeof this.scroll.destroy&&(this.scroll.destroy(),this.scroll=null),this.$dropdown&&this.$dropdown.remove(),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){var t=this,e=this.$scrollableContent&&this.$scrollableContent.hasClass("ps-dark");this.scroll&&"function"==typeof this.scroll.destroy&&(this.scroll.destroy(),this.scroll=null),this.unbindEvents(),this.buildCache().then(function(){e&&t.$scrollableContent&&t.$scrollableContent.addClass("ps-dark"),t.buildScroll(),t.setupVisibilityDetection(),t.bindEvents(),t.onUpdate()}).catch(function(){console.error("Failed to build Dropdown")})},i.buildCache=function(){var t=this;return new Promise(function(e,n){t.$el=$(t.el),t.$el.addClass("dropdown-trigger"),t.$container=t.$el.parent(".dropdown").length?t.$el.parent(".dropdown"):t.$el.parentsUntil(".dropdown").parent(),t.$container.length||(t.$container=t.$el.parent()),t.id="dropdown-"+q(),t.animation=t.$el.data("animation")?t.$el.data("animation"):t.opts.animation,t.animationIn=t.$el.data("animationIn")?t.$el.data("animationIn"):t.opts.animationIn,t.animationOut=t.$el.data("animationOut")?t.$el.data("animationOut"):t.opts.animationOut,t.animationSpeed=t.$el.data("animationSpeed")?t.$el.data("animationSpeed"):t.opts.animationSpeed,t.position=t.$el.data("position")?t.$el.data("position"):t.opts.position,t.placement=t.$el.data("placement")?t.$el.data("placement"):t.opts.placement,t.offset=t.$el.data("offset")?t.$el.data("offset"):t.opts.offset,t.minWidth=t.$el.data("minWidth")?t.$el.data("minWidth"):t.opts.minWidth,t.scroll=t.$el.data("scroll")?t.$el.data("scroll"):t.opts.scroll,t.scrollContentHeight=t.$el.data("scrollContentHeight")?t.$el.data("scrollContentHeight"):t.opts.scrollContentHeight,t.positionObserver=t.$el.attr("data-position-observer")?JSON.parse(t.$el.attr("data-position-observer")):t.opts.positionObserver,t.closeOnItemClick=t.$el.data("closeOnItemClick")?t.$el.data("closeOnItemClick"):t.opts.closeOnItemClick,t.preventClose=!!t.$el.data("preventClose")&&t.$el.data("preventClose"),t.content=t.$el.data("content")?t.$el.data("content"):t.opts.content,t.contentOpen=!1,t.$container.hasClass("dropup")?t.placement="top":t.$container.hasClass("dropright")?t.placement="right":t.$container.hasClass("dropbottom")?t.placement="bottom":t.$container.hasClass("dropleft")&&(t.placement="left");var i=t.$container.find(".dropdown-menu").first();if("fixed"===t.position&&i.length){t.$dropdown=i.clone(!0,!0),t.$dropdown.attr("id",t.id),t.$dropdown.removeClass("show"),t.align=i.hasClass("dropdown-menu-right")?"end":"start",$("body").append(t.$dropdown),i.remove(),t.$dropdown.find(".dropdown").each(function(e,n){var i=$(n),o=i.find('[data-toggle="dropdown"]').first(),s=i.find(".dropdown-menu").first();o.length&&s.length&&!o.data("plugin_"+t.constructor.NAME)&&o[t.constructor.NAME]({position:"absolute",closeOnItemClick:!1,positionObserver:!0,onShow:function(){var t=parseInt(this.$dropdown.css("z-index")||9999,10);s.css("z-index",t+1)}.bind(t)})});var o=t.$dropdown[0];return t.$dropdownItems=t.$dropdown.find("a, button, .dropdown-item").filter(function(){return $(this).closest(".dropdown-menu")[0]===o}),t.$scrollableContent=t.$dropdown.find(".dropdown-scrollable-content"),t.$dropdown.css({"min-width":t.minWidth?t.minWidth+"px":""}),e()}if("function"!=typeof t.content){if(t.$dropdown=!!t.$container.find(".dropdown-menu").length&&t.$container.find(".dropdown-menu").first(),!t.$dropdown.length)return n();t.$dropdown.hasClass("dropdown-menu-right")?t.align="end":t.align="start",t.$scrollableContent=!!t.$dropdown.find(".dropdown-scrollable-content").length&&t.$dropdown.find(".dropdown-scrollable-content").first();var s=t.$dropdown[0];return t.$dropdownItems=t.$dropdown.find("a, button, .dropdown-item").filter(function(){return $(this).closest(".dropdown-menu")[0]===s}),t.minWidth&&t.$dropdown.css("min-width",t.minWidth+"px"),e()}var r="end"===t.opts.align?" dropdown-menu-right":"";t.$dropdown=$('\n <div class="dropdown-menu'+r+'" id="'+t.id+'">\n '+t.content()+"\n </div>\n ");var a={fixed:function(){return $("body").append(t.$dropdown)},absolute:function(){return t.$el.after(t.$dropdown)}};$.when(a[t.position]()).then(function(){t.$scrollableContent=!!t.$dropdown.find(".dropdown-scrollable-content")&&t.$dropdown.find(".dropdown-scrollable-content").first(),t.$dropdown.hasClass("dropdown-menu-right")?t.align="end":t.align="start";var n=t.$dropdown[0];return t.$dropdownItems=t.$dropdown.find("a, button, .dropdown-item").filter(function(){return $(this).closest(".dropdown-menu")[0]===n}),t.minWidth&&t.$dropdown.css("min-width",t.minWidth+"px"),e()})})},i.buildScroll=function(){this.opts.scroll&&this.$scrollableContent.length&&(this.$scrollableContent.css({"max-height":this.scrollContentHeight+"px"}),R()?this.$scrollableContent.css({"overflow-y":"auto"}):this.scroll=new H(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,suppressScrollX:!0,scrollYMarginOffset:2}))},i.bindEvents=function(){var t=this,e=this;this.$el.on("click."+this.constructor.NAME,function(){t.contentOpen?t.close():t.show()}),"fixed"===this.position?this.$dropdown.on("click."+this.constructor.NAME,"a, button, .dropdown-item",function(t){var n=$(this);n.closest(".dropdown-menu")[0]===e.$dropdown[0]&&(n.hasClass("dropdown-trigger")||n.data("toggle")||(e.closeOnItemClick&&e.close(),e.onItemClick(this,t)))}):this.$dropdownItems.on("click."+this.constructor.NAME,function(t){var n=$(this);n.hasClass("dropdown-trigger")||n.data("toggle")||(e.closeOnItemClick&&e.close(),e.onItemClick(this,t))}),this._documentClickHandler=function(e){if(t.contentOpen){var n=t.$el.is(e.target)||t.$el.has(e.target).length>0||t.$dropdown.is(e.target)||t.$dropdown.has(e.target).length>0,i=t.$dropdown.find(e.target).closest('[data-toggle="dropdown"]').length>0;n||i||t.close()}},document.addEventListener("click",this._documentClickHandler,{passive:!0}),document.addEventListener("touchstart",this._documentClickHandler,{passive:!0}),this.setupResizeHandling(),this.setupScrollHandling()},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),this.$dropdown&&this.$dropdown.off("."+this.constructor.NAME),this.$dropdownItems&&"fixed"!==this.position&&this.$dropdownItems.off("."+this.constructor.NAME),this._resizeCallback&&(z.unobserve(this.$el[0]),z.unobserve(document.body),this.$container.length&&z.unobserve(this.$container[0]),this._resizeCallback=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this._scrollCallback&&(W.remove("dropdown-"+this.id),this._scrollCallback=null),this.scrollableParents&&(this.scrollableParents.forEach(function(t){var e=t.element,n=t.handler;e.removeEventListener("scroll",n)}),this.scrollableParents=[]),this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null),this._documentClickHandler&&(document.removeEventListener("click",this._documentClickHandler),document.removeEventListener("touchstart",this._documentClickHandler),this._documentClickHandler=null)},i.setPosition=function(t){var e=this;"undefined"!=typeof t&&null!==t||(t=this.placement);var n,i,o=this.$el[0].getBoundingClientRect(),s=window.innerWidth,r=window.innerHeight,a=this.$dropdown.outerWidth(!0),l=this.$dropdown.outerHeight(!0),c=this.$el.outerWidth(!0),h=this.$el.outerHeight(!0);if("fixed"===this.position){var d=this.$el.offset();n=d.left,i=d.top}else{var u=this.$dropdown.offsetParent().offset()||{left:0,top:0},f=this.$el.offset();n=f.left-u.left,i=f.top-u.top}var p,m,g=0,v=0;if(this.offset){var b=this.offset.split(",");g=parseInt(b[0],10)||0,v=parseInt(b[1],10)||0}var y=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--cool-dropdown-spacer"))||2,w=function(t,o){void 0===o&&(o=e.align);var s=0,r=0;switch(t){case"top":s="end"===o?n+c-a:n,r=i-l-y;break;case"bottom":s="end"===o?n+c-a:n,r=i+h+y;break;case"left":s=n-a-y,r=i;break;case"right":s=n+c+y,r=i}return{x:s+g,y:r+v}},$=t,x=this.align,C=w(t);if(this.positionObserver){var E=function(t,c,h){void 0===h&&(h=e.align);var d={top:!1,bottom:!1,left:!1,right:!1};if("fixed"===e.position)d.top=t.y<5,d.bottom=t.y+l>r-5,d.left=t.x<5,d.right=t.x+a>s-5;else{var u="fixed"===e.position?t.x:o.left+(t.x-n),f="fixed"===e.position?t.y:o.top+(t.y-i),p=u+a,m=f+l;d.top=f<5,d.bottom=m>r-5,d.left=u<5,d.right=p>s-5}return d},T=E(C,0,this.align);"bottom"===t&&T.bottom&&!T.top?($="top",C=w("top",x)):"top"===t&&T.top&&!T.bottom?($="bottom",C=w("bottom",x)):"right"===t&&T.right&&!T.left?($="left",C=w("left",x)):"left"===t&&T.left&&!T.right&&($="right",C=w("right",x));var S=E(C,0,x);if("top"!==$&&"bottom"!==$||("end"===x&&S.left&&!S.right?C=w($,x="start"):"start"===x&&S.right&&!S.left&&(C=w($,x="end"))),this.$container.removeClass("dropup dropbottom dropleft dropright"),"top"===$?this.$container.addClass("dropup"):"left"===$?this.$container.addClass("dropleft"):"right"===$?this.$container.addClass("dropright"):this.$container.addClass("dropbottom"),this.$dropdown.attr("x-placement",$+"-"+x),"fixed"===this.position)C.x=Math.max(5,Math.min(C.x,s-a-5)),C.y=Math.max(5,Math.min(C.y,r-l-5));else{var k=o.left+(C.x-n),A=o.top+(C.y-i);k<5?C.x+=5-k:k+a>s-5&&(C.x-=k+a-s+5),A<5?C.y+=5-A:A+l>r-5&&(C.y-=A+l-r+5)}}if(p=C.x,m=C.y,"fixed"===this.position)this.$dropdown.css({position:"fixed",top:Math.round(m)+"px",left:Math.round(p)+"px",right:"auto",bottom:"auto",transform:"none","will-change":"auto","z-index":9999});else{var I=this.$el.closest(".dropdown, .dropup, .dropleft, .dropright");if(I.length){var L=I.offset(),_=this.$el.offset(),D=_.left-L.left,M=_.top-L.top;switch($){case"bottom":M+=h+y,"end"===x&&(D=D+c-a);break;case"top":M-=l+y,"end"===x&&(D=D+c-a);break;case"left":D-=a+y;break;case"right":D+=c+y}D+=g,M+=v,this.$dropdown.css({position:"absolute",top:Math.round(M)+"px",left:Math.round(D)+"px",right:"auto",bottom:"auto",transform:"none","will-change":"auto"})}}},i.show=function(){var t=this;if(this.$dropdown&&!this.$dropdown.hasClass("show")){if(this.setPosition(),this.animation?(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass(this.animationSpeed),F(this.$dropdown,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)if(this.$scrollableContent[0].offsetHeight,this.animation){var e=this.$dropdown.css("animation-duration"),n=e?1e3*parseFloat(e):300;setTimeout(function(){t.scroll&&"function"==typeof t.scroll.update&&t.scroll.update()},n)}else requestAnimationFrame(function(){t.scroll&&"function"==typeof t.scroll.update&&t.scroll.update()});this.contentOpen=!0,this.onShow()}},i.close=function(){var t=this;this.$dropdown&&!this.preventClose&&(this.animation&&!this.$dropdown.hasClass("animation")?F(this.$dropdown,this.animationOut).then(function(){t.$dropdown.removeClass("show"),t.$el.removeAttr("data-dropdown")}):(this.$dropdown.removeClass("show"),this.$el.removeAttr("data-dropdown")),this.contentOpen=!1,this.onClose())},i.onItemClick=function(t,e){var n=this.opts.onItemClick;"function"==typeof n&&n.call(t,e,this)},e}(s);Q.NAME="coolDropdown",Q.DEFAULTS={animation:!0,animationIn:"zoomIn",animationOut:"zoomOut",animationSpeed:"fastest",offset:null,minWidth:null,closeOnItemClick:!0,positionObserver:!0,content:!1,scroll:!0,scrollContentHeight:100,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onItemClick:null,position:"absolute",placement:"bottom",align:"start"},Q._jQueryInit();var K=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.tooltip?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.tooltip,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$tooltip&&(this.$tooltip.remove(),this.$tooltip=null),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){this.buildCache(),this.$tooltip&&this.setPosition(),this.onUpdate()},i.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.id="tooltip-"+q(),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,this.trigger=this.$el.data("trigger")?this.$el.data("trigger"):this.opts.trigger},i.bindEvents=function(){var t=this;"auto"===this.trigger&&(this.$el.on("mouseenter."+this.constructor.NAME,function(){t.show()}),this.$el.on("mouseleave."+this.constructor.NAME,function(){t.close()}),this.$el.on("blur."+this.constructor.NAME,function(){t.close()}),this.$el.on("click."+this.constructor.NAME,function(){t.close()})),window.ResizeObserver&&(this._resizeCallback=function(){t.$tooltip&&t.$tooltip.hasClass("show")&&requestAnimationFrame(function(){t.setPosition()})},z.observe(this.el,this._resizeCallback))},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),this._resizeCallback&&(z.unobserve(this.el),this._resizeCallback=null)},i.buildTooltip=function(){this.$tooltip=$('\n <div class="tooltip" role="tooltip" id="'+this.id+'">\n <div class="arrow"></div>\n <div class="tooltip-inner">'+this.content+"</div>\n </div>\n "),this.$container.append(this.$tooltip),this.$arrow=this.$tooltip.find(".arrow")},i.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$tooltip.addClass("tooltip-"+t);var e,n,i,o=this.$container.innerWidth(),s=this.$container.innerHeight(),r=this.$tooltip.outerWidth(!0),a=this.$tooltip.outerHeight(!0),l=this.$el.outerWidth(),c=this.$el.outerHeight(),h=this.$el.offset().left,d=this.$el.offset().top,u=this.$arrow.outerWidth(!0),f=this.$arrow.outerHeight(!0);"top"===t?(n=Math.round(h-(r-l)/2),i=Math.round(d-a),e=Math.round(r/2-u/2),this.$arrow.css({left:e+"px"})):"right"===t?(n=Math.round(h+l),i=Math.round(d-(a-c)/2),e=Math.round(a/2-f/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(n=Math.round(h-(r-l)/2),i=Math.round(d+c),e=Math.round(r/2-u/2),this.$arrow.css({left:e+"px"})):"left"===t&&(n=Math.round(h-r),i=Math.round(d-(a-c)/2),e=Math.round(a/2-f/2),this.$arrow.css({top:e+"px"})),this.$tooltip.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+n+"px, "+i+"px, 0px)","will-change":"transform"});var p=0,m={left:this.$tooltip.position().left,top:this.$tooltip.position().top,right:o-(this.$tooltip.position().left+r),bottom:s-(this.$tooltip.position().top+a)},g={left:!1,top:!1,right:!1,bottom:!1};if(m.right<0&&(g.right=!0,p++),m.left<0&&(g.left=!0,p++),m.bottom<0&&(g.bottom=!0,p++),m.top<0&&(g.top=!0,p++),p>0&&(!this.placementChanged&&g.left&&m.right>r?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("right")):!this.placementChanged&&g.top&&m.top>a?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")):!this.placementChanged&&g.right&&m.left>r?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("left")):!this.placementChanged&&g.bottom&&m.top>a?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!g.left&&!g.right?this.fixTooltipPosition=!0:m.top>m.bottom?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")),this.fixTooltipPosition)){if(g.left){var v=Math.abs(m.left);h>=n+v&&["top","bottom"].indexOf(t)<0?(r-=v,n+=v):(n+=v,e-=v)}if(g.top){var b=Math.abs(m.top);i+=b,e-=b}if(g.right){var y=Math.abs(m.right);h<=n-y&&["top","bottom"].indexOf(t)<0?r-=y:(n-=y,e+=y)}if(g.bottom){var w=Math.abs(m.bottom);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:r,transform:"translate3d("+n+"px, "+i+"px, 0px)"}),this.fixTooltipPosition=!1}},i.show=function(){this.$tooltip||(this.buildTooltip(),this.setPosition(),this.animation?(this.$tooltip.addClass(this.animationSpeed),F(this.$tooltip,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())},i.close=function(){var t=this;this.$tooltip&&(this.animation&&!this.$tooltip.hasClass("animation")?F(this.$tooltip,this.animationOut).then(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}(s);K.NAME="coolTooltip",K.DEFAULTS={container:"body",animation:!1,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",placement:"bottom",content:"",trigger:"auto",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null},K._jQueryInit();var V=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.collapse?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.collapse,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.buildCache=function(){this.$el=$(this.el),this.el=this.$el[0];var t=this.$el.data("target")||this.opts.target;if(this.$target=t?$(t):this.$el.parent().find(".collapse"),this.target=this.$target[0],this.breakpoint=this.$el.data("breakpoint"),this.expanded="true"===this.$el.attr("aria-expanded"),this.target){this.$container=this.$target.closest(".section-collapse"),this.container=this.$container[0];var e=this.$el.data("target")?'[data-collapse-indicator="'+this.$el.data("target")+'"]':null;this.$indicator=e?$(e):this.$el.parent().find("[data-collapse-indicator]"),this.indicator=this.$indicator[0]}},i.bindEvents=function(){var t=this;this._clickHandler=function(e){t.breakpoint&&window.matchMedia("(min-width: "+t.breakpoint+"px)").matches||(e.preventDefault(),t.toggle())},this.el.addEventListener("click",this._clickHandler)},i.unbindEvents=function(){this._clickHandler&&this.el.removeEventListener("click",this._clickHandler),this.$el.off("."+this.constructor.NAME)},i.toggle=function(){this.expanded?this.close():this.show()},i.show=function(){this.expanded||(this.target.classList.add("show"),this.container&&this.container.classList.add("show"),this.indicator&&this.indicator.classList.add("show"),this.el.setAttribute("aria-expanded","true"),this.expanded=!0,this.onShow())},i.close=function(){this.expanded&&(this.target.classList.remove("show"),this.container&&this.container.classList.remove("show"),this.indicator&&this.indicator.classList.remove("show"),this.el.setAttribute("aria-expanded","false"),this.expanded=!1,this.onClose())},e}(s);V.NAME="coolCollapse",V.DEFAULTS={target:null,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null},V._jQueryInit();var G,J=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.sectionTabs?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.sectionTabs,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i._tabsCache=new WeakMap,i._resizeObserver=null,i._isProcessing=!1,i._rafId=null,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){var t=this;this.buildCache(),this.bindEvents(),this._rafId=requestAnimationFrame(function(){t.dropdownContainer&&t.dropdownContainer.classList.add("js-ready"),t.el.classList.add("js-initialized"),t.checkForChanges(),t.onInit()})},i.destroy=function(){this.unbindEvents(),this._rafId&&cancelAnimationFrame(this._rafId),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.buildCache=function(){this.$el=$(this.el),this.el=this.$el[0];var t=this.el.closest(".section-tabs");this.$dropdownContainer=t?$(t).find(".dropdown-container"):this.$el.find(".dropdown-container"),this.$dropdownList=t?$(t).find(".dropdown-list"):this.$el.find(".dropdown-list"),this.dropdownContainer=this.$dropdownContainer.length?this.$dropdownContainer[0]:null,this.dropdownList=this.$dropdownList.length?this.$dropdownList[0]:null},i.bindEvents=function(){var t=this,e=this.el.closest(".section-tabs"),n=(e?e.closest(".section-header"):null)||e||this.el;window.ResizeObserver?(this._resizeObserver=new ResizeObserver(function(e){t._isProcessing||(t._isProcessing=!0,t._rafId&&cancelAnimationFrame(t._rafId),t._rafId=requestAnimationFrame(function(){t.checkForChanges(),t._isProcessing=!1}))}),this._resizeObserver.observe(n)):(this._resizeHandler=P(function(){t.checkForChanges()},50),window.addEventListener("resize",this._resizeHandler,{passive:!0}))},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),this._resizeObserver&&this._resizeObserver.disconnect(),this._resizeHandler&&window.removeEventListener("resize",this._resizeHandler)},i.moveToList=function(t){var e=t.getAttribute("data-uuid"),n=this.el.querySelector(':scope > .tab-item[data-related-dropdown-item="'+e+'"]');n&&(n.removeAttribute("data-related-dropdown-item"),t.remove())},i.moveToDropdown=function(t){if(!t.hasAttribute("data-related-dropdown-item")&&this.dropdownList){var e=crypto.randomUUID(),n=t.cloneNode(!0),i=n.querySelector(".tab-item-action");i&&i.classList.add("dropdown-item"),n.setAttribute("data-uuid",e),this.dropdownList.appendChild(n),t.setAttribute("data-related-dropdown-item",e)}},i.getTabDimensions=function(t){if(this._tabsCache.has(t))return this._tabsCache.get(t);var e=t.classList.contains("invisible");e&&t.classList.remove("invisible");var n=this.el.closest(".section-tabs")||this.el,i=n.style.overflow;n.style.overflow="visible",n.offsetHeight;var o=t.offsetWidth,s=o+(parseInt(getComputedStyle(t).marginLeft,10)||0)+(parseInt(getComputedStyle(t).marginRight,10)||0);n.style.overflow=i,e&&t.classList.add("invisible");var r={width:o,totalWidth:s};return this._tabsCache.set(t,r),r},i.availableSpace=function(){var t,e,n,i=this.el.closest(".section-tabs"),o=i?i.closest(".section-header"):null;if(o){var s=getComputedStyle(o);if("column"===s.flexDirection){var r=i||this.el,a=getComputedStyle(r);t=r.offsetWidth,e=parseInt(a.paddingLeft,10)||0,n=parseInt(a.paddingRight,10)||0}else{t=o.offsetWidth,e=parseInt(s.paddingLeft,10)||0,n=parseInt(s.paddingRight,10)||0;var l=o.querySelector(".section-search");if(l)t-=l.offsetWidth,t-=parseInt(s.gap,10)||0}}else{var c=i||this.el,h=getComputedStyle(c);t=c.offsetWidth,e=parseInt(h.paddingLeft,10)||0,n=parseInt(h.paddingRight,10)||0}return t-e-n-(this.dropdownContainer?this.dropdownContainer.classList.contains("visible")?this.dropdownContainer.offsetWidth:40:0)},i.checkForChanges=function(){var t=this;if(this.dropdownList){this._tabsCache=new WeakMap;var e=Array.from(this.el.querySelectorAll(":scope > .tab-item")),n=Array.from(this.dropdownList.children),i=this.availableSpace(),o=parseInt(getComputedStyle(this.el).gap,10)||0;if(window.innerWidth<768&&i<200)return e.forEach(function(t){t.classList.remove("invisible"),t.removeAttribute("data-related-dropdown-item")}),void(this.dropdownContainer&&this.dropdownContainer.classList.remove("visible"));for(var s=0,r=[],a=[],l=0;l<e.length;l++){var c=e[l],h=s+this.getTabDimensions(c).totalWidth+(l>0?o:0);if(h<=i){s=h,r.push(c);var d=c.getAttribute("data-related-dropdown-item");if(d){var u=this.dropdownList.querySelector('[data-uuid="'+d+'"]');u&&this.moveToList(u)}}else a.push(c)}if(a.forEach(function(e,n){e.hasAttribute("data-related-dropdown-item")||t.moveToDropdown(e)}),n.length>0&&0===a.length)for(var f=i-s,p=n.length-1;p>=0;p--){var m=n[p],g=m.getAttribute("data-uuid"),v=this.el.querySelector('[data-related-dropdown-item="'+g+'"]');if(v){var b=this.getTabDimensions(v).totalWidth+(s>0?o:0);if(!(b<=f))break;this.moveToList(m),r.push(v),s+=b}}e.forEach(function(t){r.includes(t)?t.classList.remove("invisible"):t.classList.add("invisible")});var y=this.dropdownList&&this.dropdownList.children.length>0;this.dropdownContainer&&this.dropdownContainer.classList.toggle("visible",y)}},e}(s);J.NAME="coolSectionTabs",J.DEFAULTS={onInit:null,onUpdate:null,onDestroy:null},J._jQueryInit();var Z,tt=function(t){function e(e,n){var i;return(i=t.call(this)||this).settings={},window.Cool.settings.toast?$.extend(!0,i.settings,$.fn[i.constructor.NAME].defaults,window.Cool.settings.toast,n):$.extend(!0,i.settings,$.fn[i.constructor.NAME].defaults,n),i.container=e,i.$container=$(i.container),i.toasts=[],i.queue=[],i.processingQueue=!1,i.onInitialize=i.settings.onInitialize,i.onDestroy=i.settings.onDestroy,i.lastToastContent=null,i.$container.data("plugin_"+i.constructor.NAME,i),i}n(e,t),e._jQueryInterface=function(t){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.isSimilarToast=function(t){return!!this.lastToastContent&&this.lastToastContent===t.content},i.addQueue=function(t){if(this.isSimilarToast(t)&&(this.queue=this.queue.filter(function(e){return e.content!==t.content})),this.queue.push(t),this.lastToastContent=t.content,!this.processingQueue)return this.processQueue()},i.processQueue=function(){if(this.processingQueue&&this.queue.shift(),this.queue.length)return this.processingQueue=!0,this.show(this.queue[0]);this.processingQueue=!1},i.init=function(t){var e={};$.extend(!0,e,this.settings,t);var n=this.buildToast(e);return this.addQueue(n),this.onInit(n),n},i.destroy=function(){this.$container.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.buildToast=function(t){var e={uuid:"toast-"+q(),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.toasts.push(e),e},i.bindEvents=function(t){var e,n=this,i=this;(t.$el.on("click","[data-toast-close]",function(){t.$el&&i.close(t)}),window.ResizeObserver)?(t.resizeObserver=new ResizeObserver(function(e){t.$el&&(t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.$el&&n.setPosition(t)}))}),t.resizeObserver.observe(document.body)):(t.resizeHandler=function(){if(t.$el){clearTimeout(e);var i=performance.now();!t.lastResizeTime||i-t.lastResizeTime>100?(n.setPosition(t),t.lastResizeTime=i):e=setTimeout(function(){t.$el&&n.setPosition(t)},16)}},window.addEventListener("resize",t.resizeHandler,{passive:!0}))},i.setPosition=function(t,e,n,i){if("undefined"!=typeof n&&null!==n||(n=t.placementY),"undefined"!=typeof i&&null!==i||(i=t.placementX),i&&n||(e=t.placement),t.offset){var o=t.offset.split(",");parseInt(o[0],10),parseInt(o[1],10)}var s,r,a=t.$el.outerWidth(!0),l=t.$el.outerHeight(!0);e?"top-left"===e?(s=0,r=0,t.offset?(s+=offsetX,r+=offsetY):(s+=30,r+=30)):"top-center"===e?(s=this.$container.width()/2-a/2,r=0,t.offset?(s+=offsetX,r+=offsetY):r+=30):"top-right"===e?(s=this.$container.width()-a,r=0,t.offset?(s+=-offsetX,r+=offsetY):(s+=-30,r+=30)):"center-left"===e?(s=0,r=this.$container.height()/2-l/2,t.offset?(s+=offsetX,r+=offsetY):s+=30):"center-center"===e?(s=this.$container.width()/2-a/2,r=this.$container.height()/2-l/2,t.offset&&(s+=offsetX,r+=offsetY)):"center-right"===e?(s=this.$container.width()-a,r=this.$container.height()/2-l/2,t.offset?(s+=-offsetX,r+=offsetY):s+=-30):"bottom-left"===e?(s=0,r=this.$container.height()-l,t.offset?(s+=offsetX,r+=-offsetY):(s+=30,r+=-30)):"bottom-center"===e?(s=this.$container.width()/2-a/2,r=this.$container.height()-l,t.offset?(s+=offsetX,r+=-offsetY):r+=-30):"bottom-right"===e&&(s=this.$container.width()-a,r=this.$container.height()-l,t.offset?(s+=-offsetX,r+=-offsetY):(s+=-30,r+=-30)):(s=i,r=n),t.$el.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+s+"px, "+r+"px, 0px)","will-change":"transform"})},i.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),F(t.$inner,t.animationIn)):t.$el.addClass("show"),t.dismiss&&setTimeout(function(){e.close(t)},1e3*t.dismiss),this.onShow(t)},i.close=function(t){var e=this;t.resizeObserver&&(t.resizeObserver.disconnect(),t.resizeObserver=null),t.rafId&&(cancelAnimationFrame(t.rafId),t.rafId=null),t.resizeHandler&&(window.removeEventListener("resize",t.resizeHandler),t.resizeHandler=null),t.animation&&!t.$inner.hasClass("animation")?(t.$el.removeClass("show"),F(t.$inner,t.animationOut).then(function(){t.$el.remove(),e.lastToastContent=null,e.toasts=$.grep(e.toasts,function(e){return e.uuid!=t.uuid}),e.processQueue(),e.onClose(t)})):(t.$el.remove(),this.lastToastContent=null,this.toasts=$.grep(this.toasts,function(e){return e.uuid!=t.uuid}),this.processQueue(),this.onClose(t))},i.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},i.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},i.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},i.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},i.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},i._renderTemplate=function(t){var e,n="",i="",o="";return n="function"==typeof t.content?t.content():t.content,t.header?i='\n <div class="toast-header">\n\n <span>'+t.title+'</span>\n\n <button type="button" data-toast-close>\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n\n </div>\n ':o='\n <button type="button" data-toast-close>\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n ',e='\n <div class="toast-body">\n\n <span>'+n+"</span>\n "+o+"\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 '+i+"\n "+e+"\n\n </div>\n\n </div>\n "},e}(s);tt.NAME="coolToast",tt.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,onInitialize:null,onDestroy:null,onInit:null}).onDestroy=null,G.onShow=null,G.onClose=null,G),tt._jQueryInit();var et=function(t){function i(e,n){var i;return(i=t.call(this)||this).settings={},window.Cool.settings.dialog?$.extend(!0,i.settings,$.fn[i.constructor.NAME].defaults,window.Cool.settings.dialog,n):$.extend(!0,i.settings,$.fn[i.constructor.NAME].defaults,n),i.container=e,i.$container=$(i.container),i.dialogs=[],i.onInitialize=i.settings.onInitialize,i.onDestroy=i.settings.onDestroy,i.$container.data("plugin_"+i.constructor.NAME,i),i}n(i,t),i._jQueryInterface=function(t){var e=$(this),n=e.data("plugin_"+i.NAME);n||(n=new i(this,"object"==typeof t&&t),e.data("plugin_"+i.NAME,n)),"string"==typeof t&&n[t]()},i._jQueryInit=function(){if($.fn){var t=$.fn[i.NAME];$.fn[i.NAME]=i._jQueryInterface,$.fn[i.NAME].Constructor=i,$.fn[i.NAME].defaults=i.DEFAULTS||{},$.fn[i.NAME].noConflict=function(){return $.fn[i.NAME]=t,i._jQueryInterface}}};var o=i.prototype;return o.init=function(t){var e=this,n={};$.extend(!0,n,this.settings,t),t&&t.actions&&(n.actions=t.actions||{}),t&&t.callbacks&&(n.callbacks=t.callbacks||{}),n.callbacks&&"object"==typeof n.callbacks&&Object.keys(n.callbacks).forEach(function(t){n.actions.hasOwnProperty(t)?"object"!=typeof n.actions[t]||n.actions[t].hasOwnProperty("content")||e.settings.actions&&e.settings.actions[t]&&"object"==typeof e.settings.actions[t]&&e.settings.actions[t].hasOwnProperty("content")&&(n.actions[t].content=e.settings.actions[t].content):e.settings.actions&&e.settings.actions[t]?n.actions[t]=$.extend(!0,{},e.settings.actions[t]):n.actions[t]={}});var i=this.buildDialog(n);return this.show(i),this.bindEvents(i),this.onInit(i),i},o.destroy=function(){this.$container.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},o.buildDialog=function(t){var e=this,n={uuid:"dialog-"+q(),title:t.title,template:t.template,body:t.body,footer:t.footer,header:t.header,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,actionInProgress:!1,actionThreshold:300,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return null==n.maxBodyHeight&&"full"!==n.size&&(n.maxBodyHeight=window.innerHeight-200),"function"==typeof n.template?n.$el=$(n.template()):n.$el=$(this._renderTemplate(n)),n.show=function(){e.show(n)},n.close=function(){e.close(n)},this.dialogs.push(n),n},o.bindEvents=function(t){var n=this;if(t.$el.on("click","[data-dialog-action], [data-dialog-confirm], [data-dialog-close], [data-dialog-remove]",function(i){if(i.preventDefault(),t.actionInProgress)i.stopPropagation();else{t.actionInProgress=!0;var o=["confirm","close","remove"],s=$(this).data("dialogAction");if(!s)for(var r,a=e(o);!(r=a()).done;){var l=r.value;if($(this).is("[data-dialog-"+l+"]")){s=l;break}}var c=t.actions[s]||{};t.$el.trigger("dialog."+s);var h="function"==typeof c.callback?c.callback:"function"==typeof t.callbacks[s]?t.callbacks[s]:null,d=function(e){void 0===e&&(e=!1),e?t.actionInProgress=!1:setTimeout(function(){t.actionInProgress=!1},t.actionThreshold)};if("function"==typeof h)try{var u=h.call(n,function(){o.includes(s)&&n.close(t),d()},t);u&&"function"==typeof u.then?u.then(function(t){!1===t&&d()}).catch(function(t){console.error("Dialog action error:",t),d()}):d()}catch(t){console.error("Dialog action error:",t),d()}else o.includes(s)?(n.close(t),d()):d()}}),null!==t.maxBodyHeight&&"full"!==t.size){var i=function(){return t.maxBodyHeight=window.innerHeight-200,t.maxBodyHeight};if(window.ResizeObserver)t.resizeObserver=new ResizeObserver(function(e){t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){var e=i();t.$el.find(".dialog-body").css("--cool-dialog-body-height",e+"px")})}),t.resizeObserver.observe(document.body);else{var o,s=window.orientation;t.resizeHandler=function(){clearTimeout(o);var e=performance.now(),n=window.orientation!==s;if(n&&(s=window.orientation),!t.lastResizeTime||e-t.lastResizeTime>100||n){var r=i();t.$el.find(".dialog-body").css("--cool-dialog-body-height",r+"px"),t.lastResizeTime=e}else o=setTimeout(function(){var e=i();t.$el.find(".dialog-body").css("--cool-dialog-body-height",e+"px")},16)},window.addEventListener("resize",t.resizeHandler,{passive:!0}),window.addEventListener("orientationchange",t.resizeHandler,{passive:!0})}}},o.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 n=$(this.dialogs).eq(-2)[0].$el,i=parseInt(n.css("z-index"),10)+1;t.$el.css("z-index",i),n.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 o=setInterval(function(){0==e.dialogs.length&&$(".dialog-backdrop").length&&($(".dialog-backdrop").remove(),clearInterval(o))},100)}if(this.$container.append(t.$el),t.animation){var s=t.$el.find(".dialog-content");F(s,t.animationIn)}this.onShow(t)},o.close=function(t){var e=this,n=null;t.resizeObserver&&(t.resizeObserver.disconnect(),t.resizeObserver=null),t.rafId&&(cancelAnimationFrame(t.rafId),t.rafId=null),t.resizeHandler&&(window.removeEventListener("resize",t.resizeHandler),window.removeEventListener("orientationchange",t.resizeHandler),t.resizeHandler=null),this.dialogs.length>1&&(n=$(this.dialogs).eq(-2)[0].$el),0===$('.dialog[data-dialog-backdrop="true"]').length&&$(".dialog-backdrop").length&&$(".dialog-backdrop").remove(),t.animation?F(t.$el.find(".dialog-content"),t.animationOut).then(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")):n&&n.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")):n&&n.css("opacity",1)),this.onClose(t)},o.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},o.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},o.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},o.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},o.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},o._renderFooter=function(t){if("function"==typeof t.footer)return t.footer();if(""!==t.footer&&!1!==t.footer&&!0!==t.footer)return t.footer;if(!0===t.footer){if(!t.actions||"object"!=typeof t.actions)return"";var e=Object.entries(t.actions).filter(function(t){t[0];var e=t[1];return!1!==e&&("undefined"==typeof e.visible||!!e.visible)}).map(function(t,e){return{key:t[0],action:t[1],idx:e}});e.sort(function(t,n){if(2===e.length&&e.some(function(t){return"close"===t.key})&&e.some(function(t){return"remove"===t.key})){if("close"===t.key)return-1;if("close"===n.key)return 1;if("remove"===t.key)return 1;if("remove"===n.key)return-1}return"remove"===t.key?-1:"remove"===n.key||"confirm"===t.key?1:"confirm"===n.key?-1:t.idx-n.idx});var n=e.map(function(t){var e=t.key,n=t.action,i=n.style?n.style:n.primary?"btn-primary":"btn-secondary";"remove"===e&&(i="btn-remove"),"confirm"!==e||"undefined"!==n.primary&&!1===n.primary||(i="btn-primary");var o=n.content||e.charAt(0).toUpperCase()+e.slice(1);return'\n <button type="button" class="btn '+i+(n.classes?" "+n.classes:"")+'"'+(n.attrs?" "+n.attrs:"")+' data-dialog-action="'+e+'"'+(["confirm","close","remove"].includes(e)?" data-dialog-"+e:"")+">\n "+o+"\n </button>\n "});return'\n <div class="dialog-footer">\n '+(n.length>2?"\n "+n[0]+'\n <div class="spacer"></div>\n '+n[1]+"\n "+n.slice(2).join("\n")+"\n ":n.join("\n"))+"\n </div>\n "}return""},o._renderHeader=function(t){var e,n,i,o='\n <button type="button" data-dialog-action="close" class="dialog-header-close">\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n ';return"function"==typeof t.header?t.header():""!==t.header&&!1!==t.header&&!0!==t.header?t.header:!0===t.header?'\n <div class="dialog-header">\n <span class="dialog-title">\n '+(e=t.title,n=document.createTextNode(e),(i=document.createElement("p")).appendChild(n),i.innerHTML+"\n </span>\n ")+o+"\n </div>\n ":'<div class="dialog-header">'+o+"</div>"},o._renderTemplate=function(t){var e=t.classes?" "+t.classes:"",n=t.centered?" dialog-centered":"",i=t.size?" dialog-"+t.size:"",o=t.overflowVisible?" dialog-overflow-visible":"",s=' data-dialog-uuid="'+t.uuid+'"',r=t.backdrop?' data-dialog-backdrop="true"':' data-dialog-backdrop="false"',a=t.maxBodyHeight?' style="--cool-dialog-body-height: '+t.maxBodyHeight+'px"':"",l="function"==typeof t.body?t.body():t.body,c=this._renderFooter(t);return'\n <div class="dialog'+e+n+i+o+'"'+s+r+'>\n\n <div class="dialog-container">\n\n <div class="dialog-content">\n\n '+this._renderHeader(t)+'\n\n <div class="dialog-body"'+a+">\n\n "+l+"\n\n </div>\n\n "+c+"\n\n </div>\n\n </div>\n\n </div>\n "},i}(s);et.NAME="coolDialog",et.DEFAULTS=((Z={title:"",template:"",body:"",footer:!0,header:!0,size:"",classes:"",centered:!0,backdrop:!0,preventScroll:!0,closeBtn:!0,animation:!0,animationIn:"zoomIn",animationOut:"fadeOut",animationSpeed:"fastest",maxBodyHeight:null,overflowVisible:!1,onInitialize:null,onDestroy:null,onInit:null}).onDestroy=null,Z.onShow=null,Z.onClose=null,Z.callbacks={},Z.actions={},Z),et._jQueryInit(),window.Cool=window.Cool||{},window.Cool.settings=window.Cool.settings||{};var nt=function(){function t(){}return t.refresh=function(){this._sectionInstance&&this._sectionInstance.refresh&&this._sectionInstance.refresh(),B.initializeElements('[data-toggle="popover"]',window.Cool.settings.popover),U.initializeElements('[data-toggle="select"]',window.Cool.settings.select),Q.initializeElements('[data-toggle="dropdown"]',window.Cool.settings.dropdown),K.initializeElements('[data-toggle="tooltip"]',window.Cool.settings.tooltip),V.initializeElements('[data-toggle="collapse"]',window.Cool.settings.collapse),J.initializeElements('[data-toggle="section-tabs"]',window.Cool.settings.sectionTabs)},t.initialize=function(t){void 0===t&&(t={}),window.Cool.settings=t,this._sectionInstance||(this._sectionInstance=new r(t.section)),B.initializeElements('[data-toggle="popover"]',t.popover),U.initializeElements('[data-toggle="select"]',t.select),Q.initializeElements('[data-toggle="dropdown"]',t.dropdown),K.initializeElements('[data-toggle="tooltip"]',t.tooltip),V.initializeElements('[data-toggle="collapse"]',t.collapse),J.initializeElements('[data-toggle="section-tabs"]',t.sectionTabs);var e=document.querySelector(".sidebar-left");e&&(this._sidebarInstance=new N(e,t.sidebar)),new tt(document.body,t.toast),new et(document.body,t.dialog)},t.initComponent=function(t){if(t){var e=Array.isArray(t)?t:[t],n=[],i=[];e.forEach(function(t){var e="string"==typeof t?document.querySelector(t):t;if(e){var n=e.querySelectorAll("[data-toggle]");(e.hasAttribute("data-toggle")?[e].concat(Array.from(n)):Array.from(n)).forEach(function(t){i.push(t)})}});var o=[],s=[];i.forEach(function(t){var e=t.getBoundingClientRect();e.top<window.innerHeight&&e.bottom>0?o.push(t):s.push(t)});var r=[].concat(o,s),a=0,l=function(){r.slice(a,a+10).forEach(function(t){var e=null;switch(t.getAttribute("data-toggle")){case"popover":e=B.initializeElement(t,window.Cool.settings.popover);break;case"select":e=U.initializeElement(t,window.Cool.settings.select);break;case"dropdown":e=Q.initializeElement(t,window.Cool.settings.dropdown);break;case"tooltip":e=K.initializeElement(t,window.Cool.settings.tooltip);break;case"collapse":e=V.initializeElement(t,window.Cool.settings.collapse);break;case"section-tabs":e=J.initializeElement(t,window.Cool.settings.sectionTabs)}e&&n.push(e)}),(a+=10)<r.length&&("requestIdleCallback"in window?requestIdleCallback(l,{timeout:50}):setTimeout(l,0))};return o.length>0?l():"requestIdleCallback"in window?requestIdleCallback(l,{timeout:100}):l(),n}},t.destroy=function(){this._sidebarInstance&&(this._sidebarInstance.destroy(),this._sidebarInstance=null),this._sectionInstance&&(this._sectionInstance.destroy(),this._sectionInstance=null)},t.observeResize=function(t,e){if(t&&"function"==typeof e)return z.observe(t,e);console.warn("Cool.observeResize requires an element and a callback function")},t.unobserveResize=function(t){t?z.unobserve(t):console.warn("Cool.unobserveResize requires an element")},t.addScrollListener=function(t,e){t&&"function"==typeof e?W.add(t,e):console.warn("Cool.addScrollListener requires an id and a callback function")},t.removeScrollListener=function(t){t?W.remove(t):console.warn("Cool.removeScrollListener requires an id")},t.getSidebar=function(){return this._sidebarInstance},t.getSection=function(){return this._sectionInstance},t}();nt._sidebarInstance=null,nt._sectionInstance=null,window.Cool.initialize=nt.initialize.bind(nt),window.Cool.initComponent=nt.initComponent.bind(nt),window.Cool.refresh=nt.refresh.bind(nt),window.Cool.destroy=nt.destroy.bind(nt),window.Cool.observeResize=nt.observeResize.bind(nt),window.Cool.unobserveResize=nt.unobserveResize.bind(nt),window.Cool.addScrollListener=nt.addScrollListener.bind(nt),window.Cool.removeScrollListener=nt.removeScrollListener.bind(nt),window.Cool.getSidebar=nt.getSidebar.bind(nt),window.Cool.getSection=nt.getSection.bind(nt);return{Common:nt,Sidebar:N,Popover:B,Select:U,Dropdown:Q,Tooltip:K,SectionTabs:J,Collapse:V,Toast:tt,Dialog:et}});
|
|
12
24
|
//# sourceMappingURL=cool.bundle.min.js.map
|