@finqu/cool 1.1.3 → 1.1.5
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/.babelrc.js +20 -0
- package/.browserslistrc +13 -0
- package/build/rollup.config.js +14 -46
- package/dist/js/cool.bundle.js +4972 -15304
- package/dist/js/cool.bundle.js.map +1 -1
- package/dist/js/cool.bundle.min.js +6 -39
- package/dist/js/cool.bundle.min.js.map +1 -1
- package/dist/js/cool.esm.js +941 -741
- package/dist/js/cool.esm.js.map +1 -1
- package/dist/js/cool.esm.min.js +7 -2
- package/dist/js/cool.esm.min.js.map +1 -1
- package/dist/js/cool.js +992 -968
- package/dist/js/cool.js.map +1 -1
- package/dist/js/cool.min.js +7 -2
- package/dist/js/cool.min.js.map +1 -1
- package/js/dist/collapse.js +4860 -296
- package/js/dist/collapse.js.map +1 -1
- package/js/dist/common.js +20674 -450
- package/js/dist/common.js.map +1 -1
- package/js/dist/dropdown.js +25325 -1280
- package/js/dist/dropdown.js.map +1 -1
- package/js/dist/popover.js +8958 -566
- package/js/dist/popover.js.map +1 -1
- package/js/dist/sectiontabs.js +4117 -230
- package/js/dist/sectiontabs.js.map +1 -1
- package/js/dist/select.js +28823 -1514
- package/js/dist/select.js.map +1 -1
- package/js/dist/tooltip.js +8328 -525
- package/js/dist/tooltip.js.map +1 -1
- package/js/src/select.js +14 -12
- package/package.json +1 -1
|
@@ -1,45 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cool UI v1.
|
|
2
|
+
* Cool UI v1.1.3 (https://finqu.fi)
|
|
3
3
|
* Copyright 2011-2019 Finqu Oy
|
|
4
4
|
* Licensed under the ISC license - (http://opensource.org/licenses/ISC)
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).cool=e()}(this,function(){"use strict";
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):(t=t||self).cool=e()}(this,function(){"use strict";
|
|
7
7
|
/*!
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* Includes Sizzle.js
|
|
12
|
-
* https://sizzlejs.com/
|
|
13
|
-
*
|
|
14
|
-
* Copyright JS Foundation and other contributors
|
|
15
|
-
* Released under the MIT license
|
|
16
|
-
* https://jquery.org/license
|
|
17
|
-
*
|
|
18
|
-
* Date: 2018-01-20T17:24Z
|
|
19
|
-
*/
|
|
20
|
-
/*!
|
|
21
|
-
* jQuery JavaScript Library v3.3.1
|
|
22
|
-
* https://jquery.com/
|
|
23
|
-
*
|
|
24
|
-
* Includes Sizzle.js
|
|
25
|
-
* https://sizzlejs.com/
|
|
26
|
-
*
|
|
27
|
-
* Copyright JS Foundation and other contributors
|
|
28
|
-
* Released under the MIT license
|
|
29
|
-
* https://jquery.org/license
|
|
30
|
-
*
|
|
31
|
-
* Date: 2018-01-20T17:24Z
|
|
32
|
-
*/
|
|
33
|
-
var t,e;t="undefined"!=typeof window?window:void 0,e=function(t,e){var n=[],i=t.document,o=Object.getPrototypeOf,s=n.slice,r=n.concat,a=n.push,l=n.indexOf,c={},u=c.toString,h=c.hasOwnProperty,d=h.toString,p=d.call(Object),f={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},m=function(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function y(t,e,n){var o,s=(e=e||i).createElement("script");if(s.text=t,n)for(o in v)n[o]&&(s[o]=n[o]);e.head.appendChild(s).parentNode.removeChild(s)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?c[u.call(t)]||"object":typeof t}var $=function(t,e){return new $.fn.init(t,e)},x=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function w(t){var e=!!t&&"length"in t&&t.length,n=b(t);return!g(t)&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}$.fn=$.prototype={jquery:"3.3.1",constructor:$,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=$.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return $.each(this,t)},map:function(t){return this.pushStack($.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},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:a,sort:n.sort,splice:n.splice},$.extend=$.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||g(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=r[e],r!==(i=t[e])&&(c&&i&&($.isPlainObject(i)||(o=Array.isArray(i)))?(o?(o=!1,s=n&&Array.isArray(n)?n:[]):s=n&&$.isPlainObject(n)?n:{},r[e]=$.extend(c,s,i)):void 0!==i&&(r[e]=i));return r},$.extend({expando:"jQuery"+("3.3.1"+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]"!==u.call(t))&&(!(e=o(t))||"function"==typeof(n=h.call(e,"constructor")&&e.constructor)&&d.call(n)===p)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t){y(t)},each:function(t,e){var n,i=0;if(w(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},trim:function(t){return null==t?"":(t+"").replace(x,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(w(Object(t))?$.merge(n,"string"==typeof t?[t]:t):a.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},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,s=0,a=[];if(w(t))for(i=t.length;s<i;s++)null!=(o=e(t[s],s,n))&&a.push(o);else for(s in t)null!=(o=e(t[s],s,n))&&a.push(o);return r.apply([],a)},guid:1,support:f}),"function"==typeof Symbol&&($.fn[Symbol.iterator]=n[Symbol.iterator]),$.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){c["[object "+e+"]"]=e.toLowerCase()});var C=
|
|
34
|
-
/*!
|
|
35
|
-
* Sizzle CSS Selector Engine v2.3.3
|
|
36
|
-
* https://sizzlejs.com/
|
|
37
|
-
*
|
|
38
|
-
* Copyright jQuery Foundation and other contributors
|
|
39
|
-
* Released under the MIT license
|
|
40
|
-
* http://jquery.org/license
|
|
41
|
-
*
|
|
42
|
-
* Date: 2016-08-08
|
|
43
|
-
*/
|
|
44
|
-
function(t){var e,n,i,o,s,r,a,l,c,u,h,d,p,f,g,m,v,y,b,$="sizzle"+1*new Date,x=t.document,w=0,C=0,T=rt(),S=rt(),k=rt(),E=function(t,e){return t===e&&(h=!0),0},D={}.hasOwnProperty,A=[],j=A.pop,I=A.push,N=A.push,O=A.slice,L=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",q="[\\x20\\t\\r\\n\\f]",P="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+q+"*("+P+")(?:"+q+"*([*^$|!~]?=)"+q+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+q+"*\\]",W=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",F=new RegExp(q+"+","g"),R=new RegExp("^"+q+"+|((?:^|[^\\\\])(?:\\\\.)*)"+q+"+$","g"),_=new RegExp("^"+q+"*,"+q+"*"),B=new RegExp("^"+q+"*([>+~]|"+q+")"+q+"*"),U=new RegExp("="+q+"*([^\\]'\"]*?)"+q+"*\\]","g"),z=new RegExp(W),Q=new RegExp("^"+P+"$"),X={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+q+"?|("+q+")|.)","ig"),tt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,nt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},it=function(){d()},ot=yt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{N.apply(A=O.call(x.childNodes),x.childNodes),A[x.childNodes.length].nodeType}catch(t){N={apply:A.length?function(t,e){I.apply(t,O.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function st(t,e,i,o){var s,a,c,u,h,f,v,y=e&&e.ownerDocument,w=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return i;if(!o&&((e?e.ownerDocument||e:x)!==p&&d(e),e=e||p,g)){if(11!==w&&(h=J.exec(t)))if(s=h[1]){if(9===w){if(!(c=e.getElementById(s)))return i;if(c.id===s)return i.push(c),i}else if(y&&(c=y.getElementById(s))&&b(e,c)&&c.id===s)return i.push(c),i}else{if(h[2])return N.apply(i,e.getElementsByTagName(t)),i;if((s=h[3])&&n.getElementsByClassName&&e.getElementsByClassName)return N.apply(i,e.getElementsByClassName(s)),i}if(n.qsa&&!k[t+" "]&&(!m||!m.test(t))){if(1!==w)y=e,v=t;else if("object"!==e.nodeName.toLowerCase()){for((u=e.getAttribute("id"))?u=u.replace(et,nt):e.setAttribute("id",u=$),a=(f=r(t)).length;a--;)f[a]="#"+u+" "+vt(f[a]);v=f.join(","),y=K.test(t)&>(e.parentNode)||e}if(v)try{return N.apply(i,y.querySelectorAll(v)),i}catch(t){}finally{u===$&&e.removeAttribute("id")}}}return l(t.replace(R,"$1"),e,i,o)}function rt(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function at(t){return t[$]=!0,t}function lt(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var n=t.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=e}function ut(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function pt(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&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ft(t){return at(function(e){return e=+e,at(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 gt(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}for(e in n=st.support={},s=st.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},d=st.setDocument=function(t){var e,o,r=t?t.ownerDocument||t:x;return r!==p&&9===r.nodeType&&r.documentElement?(f=(p=r).documentElement,g=!s(p),x!==p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",it,!1):o.attachEvent&&o.attachEvent("onunload",it)),n.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=lt(function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=lt(function(t){return f.appendChild(t).id=$,!p.getElementsByName||!p.getElementsByName($).length}),n.getById?(i.filter.ID=function(t){var e=t.replace(Z,tt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&g){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(Z,tt);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&&g){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=n.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,s=e.getElementsByTagName(t);if("*"===t){for(;n=s[o++];)1===n.nodeType&&i.push(n);return i}return s},i.find.CLASS=n.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&g)return e.getElementsByClassName(t)},v=[],m=[],(n.qsa=G.test(p.querySelectorAll))&&(lt(function(t){f.appendChild(t).innerHTML="<a id='"+$+"'></a><select id='"+$+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+q+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+q+"*(?:value|"+H+")"),t.querySelectorAll("[id~="+$+"-]").length||m.push("~="),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+$+"+*").length||m.push(".#.+[+~]")}),lt(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+q+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=G.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<(function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",W)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=G.test(f.compareDocumentPosition),b=e||G.test(f.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},E=e?function(t,e){if(t===e)return h=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t===p||t.ownerDocument===x&&b(x,t)?-1:e===p||e.ownerDocument===x&&b(x,e)?1:u?L(u,t)-L(u,e):0:4&i?-1:1)}:function(t,e){if(t===e)return h=!0,0;var n,i=0,o=t.parentNode,s=e.parentNode,r=[t],a=[e];if(!o||!s)return t===p?-1:e===p?1:o?-1:s?1:u?L(u,t)-L(u,e):0;if(o===s)return ut(t,e);for(n=t;n=n.parentNode;)r.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;r[i]===a[i];)i++;return i?ut(r[i],a[i]):r[i]===x?-1:a[i]===x?1:0},p):p},st.matches=function(t,e){return st(t,null,null,e)},st.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&d(t),e=e.replace(U,"='$1']"),n.matchesSelector&&g&&!k[e+" "]&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return st(e,p,null,[t]).length>0},st.contains=function(t,e){return(t.ownerDocument||t)!==p&&d(t),b(t,e)},st.attr=function(t,e){(t.ownerDocument||t)!==p&&d(t);var o=i.attrHandle[e.toLowerCase()],s=o&&D.call(i.attrHandle,e.toLowerCase())?o(t,e,!g):void 0;return void 0!==s?s:n.attributes||!g?t.getAttribute(e):(s=t.getAttributeNode(e))&&s.specified?s.value:null},st.escape=function(t){return(t+"").replace(et,nt)},st.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},st.uniqueSort=function(t){var e,i=[],o=0,s=0;if(h=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(E),h){for(;e=t[s++];)e===t[s]&&(o=i.push(s));for(;o--;)t.splice(i[o],1)}return u=null,t},o=st.getText=function(t){var e,n="",i=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[i++];)n+=o(e);return n},(i=st.selectors={cacheLength:50,createPseudo:at,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(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===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]||st.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]&&st.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&&z.test(n)&&(e=r(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(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=T[t+" "];return e||(e=new RegExp("(^|"+q+")"+t+"("+q+"|$)"))&&T(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=st.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(F," ")+" ").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,u,h,d,p,f,g=s!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(s){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(b=(p=(c=(u=(h=(d=m)[$]||(d[$]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===w&&c[1])&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){u[t]=[w,p,b];break}}else if(y&&(b=p=(c=(u=(h=(d=e)[$]||(d[$]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]||[])[0]===w&&c[1]),!1===b)for(;(d=++p&&d&&d[g]||(b=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((u=(h=d[$]||(d[$]={}))[d.uniqueID]||(h[d.uniqueID]={}))[t]=[w,b]),d!==e)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||st.error("unsupported pseudo: "+t);return o[$]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?at(function(t,n){for(var i,s=o(t,e),r=s.length;r--;)t[i=L(t,s[r])]=!(n[i]=s[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:at(function(t){var e=[],n=[],i=a(t.replace(R,"$1"));return i[$]?at(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:at(function(t){return function(e){return st(t,e).length>0}}),contains:at(function(t){return t=t.replace(Z,tt),function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}}),lang:at(function(t){return Q.test(t||"")||st.error("unsupported lang: "+t),t=t.replace(Z,tt).toLowerCase(),function(e){var n;do{if(n=g?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===f},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:pt(!1),disabled:pt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!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 Y.test(t.nodeName)},input:function(t){return V.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ft(function(){return[0]}),last:ft(function(t,e){return[e-1]}),eq:ft(function(t,e,n){return[n<0?n+e:n]}),even:ft(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:ft(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:ft(function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t}),gt:ft(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=dt(e);function mt(){}function vt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function yt(t,e,n){var i=e.dir,o=e.next,s=o||i,r=n&&"parentNode"===s,a=C++;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,u,h,d=[w,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(u=(h=e[$]||(e[$]={}))[e.uniqueID]||(h[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[i]||e;else{if((c=u[s])&&c[0]===w&&c[1]===a)return d[2]=c[2];if(u[s]=d,d[2]=t(e,n,l))return!0}return!1}}function bt(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 $t(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 xt(t,e,n,i,o,s){return i&&!i[$]&&(i=xt(i)),o&&!o[$]&&(o=xt(o,s)),at(function(s,r,a,l){var c,u,h,d=[],p=[],f=r.length,g=s||function(t,e,n){for(var i=0,o=e.length;i<o;i++)st(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),m=!t||!s&&e?g:$t(g,d,t,a,l),v=n?o||(s?t:f||i)?[]:r:m;if(n&&n(m,v,a,l),i)for(c=$t(v,p),i(c,[],a,l),u=c.length;u--;)(h=c[u])&&(v[p[u]]=!(m[p[u]]=h));if(s){if(o||t){if(o){for(c=[],u=v.length;u--;)(h=v[u])&&c.push(m[u]=h);o(null,v=[],c,l)}for(u=v.length;u--;)(h=v[u])&&(c=o?L(s,h):d[u])>-1&&(s[c]=!(r[c]=h))}}else v=$t(v===r?v.splice(f,v.length):v),o?o(null,r,v,l):N.apply(r,v)})}function wt(t){for(var e,n,o,s=t.length,r=i.relative[t[0].type],a=r||i.relative[" "],l=r?1:0,u=yt(function(t){return t===e},a,!0),h=yt(function(t){return L(e,t)>-1},a,!0),d=[function(t,n,i){var o=!r&&(i||n!==c)||((e=n).nodeType?u(t,n,i):h(t,n,i));return e=null,o}];l<s;l++)if(n=i.relative[t[l].type])d=[yt(bt(d),n)];else{if((n=i.filter[t[l].type].apply(null,t[l].matches))[$]){for(o=++l;o<s&&!i.relative[t[o].type];o++);return xt(l>1&&bt(d),l>1&&vt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(R,"$1"),n,l<o&&wt(t.slice(l,o)),o<s&&wt(t=t.slice(o)),o<s&&vt(t))}d.push(n)}return bt(d)}return mt.prototype=i.filters=i.pseudos,i.setFilters=new mt,r=st.tokenize=function(t,e){var n,o,s,r,a,l,c,u=S[t+" "];if(u)return e?0:u.slice(0);for(a=t,l=[],c=i.preFilter;a;){for(r in n&&!(o=_.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(s=[])),n=!1,(o=B.exec(a))&&(n=o.shift(),s.push({value:n,type:o[0].replace(R," ")}),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?st.error(t):S(t,l).slice(0)},a=st.compile=function(t,e){var n,o=[],s=[],a=k[t+" "];if(!a){for(e||(e=r(t)),n=e.length;n--;)(a=wt(e[n]))[$]?o.push(a):s.push(a);(a=k(t,function(t,e){var n=e.length>0,o=t.length>0,s=function(s,r,a,l,u){var h,f,m,v=0,y="0",b=s&&[],$=[],x=c,C=s||o&&i.find.TAG("*",u),T=w+=null==x?1:Math.random()||.1,S=C.length;for(u&&(c=r===p||r||u);y!==S&&null!=(h=C[y]);y++){if(o&&h){for(f=0,r||h.ownerDocument===p||(d(h),a=!g);m=t[f++];)if(m(h,r||p,a)){l.push(h);break}u&&(w=T)}n&&((h=!m&&h)&&v--,s&&b.push(h))}if(v+=y,n&&y!==v){for(f=0;m=e[f++];)m(b,$,r,a);if(s){if(v>0)for(;y--;)b[y]||$[y]||($[y]=j.call(l));$=$t($)}N.apply(l,$),u&&!s&&$.length>0&&v+e.length>1&&st.uniqueSort(l)}return u&&(w=T,c=x),b};return n?at(s):s}(s,o))).selector=t}return a},l=st.select=function(t,e,n,o){var s,l,c,u,h,d="function"==typeof t&&t,p=!o&&r(t=d.selector||t);if(n=n||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&g&&i.relative[l[1].type]){if(!(e=(i.find.ID(c.matches[0].replace(Z,tt),e)||[])[0]))return n;d&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(s=X.needsContext.test(t)?0:l.length;s--&&(c=l[s],!i.relative[u=c.type]);)if((h=i.find[u])&&(o=h(c.matches[0].replace(Z,tt),K.test(l[0].type)&>(e.parentNode)||e))){if(l.splice(s,1),!(t=o.length&&vt(l)))return N.apply(n,o),n;break}}return(d||a(t,p))(o,e,!g,n,!e||K.test(t)&>(e.parentNode)||e),n},n.sortStable=$.split("").sort(E).join("")===$,n.detectDuplicates=!!h,d(),n.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))}),lt(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||ct("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&<(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ct("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ct(H,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),st}(t);$.find=C,$.expr=C.selectors,$.expr[":"]=$.expr.pseudos,$.uniqueSort=$.unique=C.uniqueSort,$.text=C.getText,$.isXMLDoc=C.isXML,$.contains=C.contains,$.escapeSelector=C.escape;var T=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&$(t).is(n))break;i.push(t)}return i},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},k=$.expr.match.needsContext;function E(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(t,e,n){return g(e)?$.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?$.grep(t,function(t){return t===e!==n}):"string"!=typeof e?$.grep(t,function(t){return l.call(e,t)>-1!==n}):$.filter(e,t,n)}$.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?$.find.matchesSelector(i,t)?[i]:[]:$.find.matches(t,$.grep(e,function(t){return 1===t.nodeType}))},$.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack($(t).filter(function(){for(e=0;e<i;e++)if($.contains(o[e],this))return!0}));for(n=this.pushStack([]),e=0;e<i;e++)$.find(t,o[e],n);return i>1?$.uniqueSort(n):n},filter:function(t){return this.pushStack(A(this,t||[],!1))},not:function(t){return this.pushStack(A(this,t||[],!0))},is:function(t){return!!A(this,"string"==typeof t&&k.test(t)?$(t):t||[],!1).length}});var j,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;($.fn.init=function(t,e,n){var o,s;if(!t)return this;if(n=n||j,"string"==typeof t){if(!(o="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.exec(t))||!o[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(o[1]){if(e=e instanceof $?e[0]:e,$.merge(this,$.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:i,!0)),D.test(o[1])&&$.isPlainObject(e))for(o in e)g(this[o])?this[o](e[o]):this.attr(o,e[o]);return this}return(s=i.getElementById(o[2]))&&(this[0]=s,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==n.ready?n.ready(t):t($):$.makeArray(t,this)}).prototype=$.fn,j=$(i);var N=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function L(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}$.fn.extend({has:function(t){var e=$(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if($.contains(this,e[t]))return!0})},closest:function(t,e){var n,i=0,o=this.length,s=[],r="string"!=typeof t&&$(t);if(!k.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&&$.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?$.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?l.call($(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack($.uniqueSort($.merge(this.get(),$(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),$.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return T(t,"parentNode")},parentsUntil:function(t,e,n){return T(t,"parentNode",n)},next:function(t){return L(t,"nextSibling")},prev:function(t){return L(t,"previousSibling")},nextAll:function(t){return T(t,"nextSibling")},prevAll:function(t){return T(t,"previousSibling")},nextUntil:function(t,e,n){return T(t,"nextSibling",n)},prevUntil:function(t,e,n){return T(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return E(t,"iframe")?t.contentDocument:(E(t,"template")&&(t=t.content||t),$.merge([],t.childNodes))}},function(t,e){$.fn[t]=function(n,i){var o=$.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=$.filter(i,o)),this.length>1&&(O[t]||$.uniqueSort(o),N.test(t)&&o.reverse()),this.pushStack(o)}});var H=/[^\x20\t\r\n\f]+/g;function q(t){return t}function P(t){throw t}function M(t,e,n,i){var o;try{t&&g(o=t.promise)?o.call(t).done(e).fail(n):t&&g(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}$.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return $.each(t.match(H)||[],function(t,n){e[n]=!0}),e}(t):$.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){$.each(n,function(n,i){g(i)?t.unique&&c.has(i)||s.push(i):i&&i.length&&"string"!==b(i)&&e(i)})}(arguments),n&&!e&&l()),this},remove:function(){return $.each(arguments,function(t,e){for(var n;(n=$.inArray(e,s,n))>-1;)s.splice(n,1),n<=a&&a--}),this},has:function(t){return t?$.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},$.extend({Deferred:function(e){var n=[["notify","progress",$.Callbacks("memory"),$.Callbacks("memory"),2],["resolve","done",$.Callbacks("once memory"),$.Callbacks("once memory"),0,"resolved"],["reject","fail",$.Callbacks("once memory"),$.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 $.Deferred(function(e){$.each(n,function(n,i){var o=g(t[i[4]])&&t[i[4]];s[i[1]](function(){var t=o&&o.apply(this,arguments);t&&g(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,g(c)?o?c.call(t,r(s,n,q,o),r(s,n,P,o)):(s++,c.call(t,r(s,n,q,o),r(s,n,P,o),r(s,n,q,n.notifyWith))):(i!==q&&(a=void 0,l=[t]),(o||n.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(t){$.Deferred.exceptionHook&&$.Deferred.exceptionHook(t,u.stackTrace),e+1>=s&&(i!==P&&(a=void 0,l=[t]),n.rejectWith(a,l))}};e?u():($.Deferred.getStackHook&&(u.stackTrace=$.Deferred.getStackHook()),t.setTimeout(u))}}return $.Deferred(function(t){n[0][3].add(r(0,t,g(o)?o:q,t.notifyWith)),n[1][3].add(r(0,t,g(e)?e:q)),n[2][3].add(r(0,t,g(i)?i:P))}).promise()},promise:function(t){return null!=t?$.extend(t,o):o}},s={};return $.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),o=s.call(arguments),r=$.Deferred(),a=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?s.call(arguments):n,--e||r.resolveWith(i,o)}};if(e<=1&&(M(t,r.done(a(n)).resolve,r.reject,!e),"pending"===r.state()||g(o[n]&&o[n].then)))return r.then();for(;n--;)M(o[n],a(n),r.reject);return r.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;$.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&W.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},$.readyException=function(e){t.setTimeout(function(){throw e})};var F=$.Deferred();function R(){i.removeEventListener("DOMContentLoaded",R),t.removeEventListener("load",R),$.ready()}$.fn.ready=function(t){return F.then(t).catch(function(t){$.readyException(t)}),this},$.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--$.readyWait:$.isReady)||($.isReady=!0,!0!==t&&--$.readyWait>0||F.resolveWith(i,[$]))}}),$.ready.then=F.then,"complete"===i.readyState||"loading"!==i.readyState&&!i.documentElement.doScroll?t.setTimeout($.ready):(i.addEventListener("DOMContentLoaded",R),t.addEventListener("load",R));var _=function(t,e,n,i,o,s,r){var a=0,l=t.length,c=null==n;if("object"===b(n))for(a in o=!0,n)_(t,e,a,n[a],!0,s,r);else if(void 0!==i&&(o=!0,g(i)||(r=!0),c&&(r?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call($(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},B=/^-ms-/,U=/-([a-z])/g;function z(t,e){return e.toUpperCase()}function Q(t){return t.replace(B,"ms-").replace(U,z)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function V(){this.expando=$.expando+V.uid++}V.uid=1,V.prototype={cache:function(t){var e=t[this.expando];return e||(e={},X(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[Q(e)]=n;else for(i in e)o[Q(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][Q(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(Q):(e=Q(e))in i?[e]:e.match(H)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||$.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&&!$.isEmptyObject(e)}};var Y=new V,G=new V,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(K,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:J.test(t)?JSON.parse(t):t)}(n)}catch(t){}G.set(t,e,n)}else n=void 0;return n}$.extend({hasData:function(t){return G.hasData(t)||Y.hasData(t)},data:function(t,e,n){return G.access(t,e,n)},removeData:function(t,e){G.remove(t,e)},_data:function(t,e,n){return Y.access(t,e,n)},_removeData:function(t,e){Y.remove(t,e)}}),$.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=G.get(s),1===s.nodeType&&!Y.get(s,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&0===(i=r[n].name).indexOf("data-")&&(i=Q(i.slice(5)),Z(s,i,o[i]));Y.set(s,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){G.set(this,t)}):_(this,function(e){var n;if(s&&void 0===e)return void 0!==(n=G.get(s,t))?n:void 0!==(n=Z(s,t))?n:void 0;this.each(function(){G.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){G.remove(this,t)})}}),$.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Y.get(t,e),n&&(!i||Array.isArray(n)?i=Y.access(t,e,$.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=$.queue(t,e),i=n.length,o=n.shift(),s=$._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete s.stop,o.call(t,function(){$.dequeue(t,e)},s)),!i&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Y.get(t,n)||Y.access(t,n,{empty:$.Callbacks("once memory").add(function(){Y.remove(t,[e+"queue",n])})})}}),$.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?$.queue(this[0],t):void 0===e?this:this.each(function(){var n=$.queue(this,t,e);$._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&$.dequeue(this,t)})},dequeue:function(t){return this.each(function(){$.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=$.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=Y.get(s[r],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var tt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,et=new RegExp("^(?:([+-])=|)("+tt+")([a-z%]*)$","i"),nt=["Top","Right","Bottom","Left"],it=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&$.contains(t.ownerDocument,t)&&"none"===$.css(t,"display")},ot=function(t,e,n,i){var o,s,r={};for(s in e)r[s]=t.style[s],t.style[s]=e[s];for(s in o=n.apply(t,i||[]),e)t.style[s]=r[s];return o};function st(t,e,n,i){var o,s,r=20,a=i?function(){return i.cur()}:function(){return $.css(t,e,"")},l=a(),c=n&&n[3]||($.cssNumber[e]?"":"px"),u=($.cssNumber[e]||"px"!==c&&+l)&&et.exec($.css(t,e));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;r--;)$.style(t,e,u+c),(1-s)*(1-(s=a()/l||.5))<=0&&(r=0),u/=s;u*=2,$.style(t,e,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}var rt={};function at(t){var e,n=t.ownerDocument,i=t.nodeName,o=rt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=$.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),rt[i]=o,o)}function lt(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]=Y.get(i,"display")||null,o[s]||(i.style.display="")),""===i.style.display&&it(i)&&(o[s]=at(i))):"none"!==n&&(o[s]="none",Y.set(i,"display",n)));for(s=0;s<r;s++)null!=o[s]&&(t[s].style.display=o[s]);return t}$.fn.extend({show:function(){return lt(this,!0)},hide:function(){return lt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){it(this)?$(this).show():$(this).hide()})}});var ct=/^(?:checkbox|radio)$/i,ut=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ht=/^$|^module$|\/(?:java|ecma)script/i,dt={option:[1,"<select multiple='multiple'>","</select>"],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 pt(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)?$.merge([t],n):n}function ft(t,e){for(var n=0,i=t.length;n<i;n++)Y.set(t[n],"globalEval",!e||Y.get(e[n],"globalEval"))}dt.optgroup=dt.option,dt.tbody=dt.tfoot=dt.colgroup=dt.caption=dt.thead,dt.th=dt.td;var gt,mt,vt=/<|&#?\w+;/;function yt(t,e,n,i,o){for(var s,r,a,l,c,u,h=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if((s=t[p])||0===s)if("object"===b(s))$.merge(d,s.nodeType?[s]:s);else if(vt.test(s)){for(r=r||h.appendChild(e.createElement("div")),a=(ut.exec(s)||["",""])[1].toLowerCase(),l=dt[a]||dt._default,r.innerHTML=l[1]+$.htmlPrefilter(s)+l[2],u=l[0];u--;)r=r.lastChild;$.merge(d,r.childNodes),(r=h.firstChild).textContent=""}else d.push(e.createTextNode(s));for(h.textContent="",p=0;s=d[p++];)if(i&&$.inArray(s,i)>-1)o&&o.push(s);else if(c=$.contains(s.ownerDocument,s),r=pt(h.appendChild(s),"script"),c&&ft(r),n)for(u=0;s=r[u++];)ht.test(s.type||"")&&n.push(s);return h}gt=i.createDocumentFragment().appendChild(i.createElement("div")),(mt=i.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),gt.appendChild(mt),f.checkClone=gt.cloneNode(!0).cloneNode(!0).lastChild.checked,gt.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!gt.cloneNode(!0).lastChild.defaultValue;var bt=i.documentElement,$t=/^key/,xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,wt=/^([^.]*)(?:\.(.+)|)/;function Ct(){return!0}function Tt(){return!1}function St(){try{return i.activeElement}catch(t){}}function kt(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)kt(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=Tt;else if(!o)return t;return 1===s&&(r=o,(o=function(t){return $().off(t),r.apply(this,arguments)}).guid=r.guid||(r.guid=$.guid++)),t.each(function(){$.event.add(this,e,o,i,n)})}$.event={global:{},add:function(t,e,n,i,o){var s,r,a,l,c,u,h,d,p,f,g,m=Y.get(t);if(m)for(n.handler&&(n=(s=n).handler,o=s.selector),o&&$.find.matchesSelector(bt,o),n.guid||(n.guid=$.guid++),(l=m.events)||(l=m.events={}),(r=m.handle)||(r=m.handle=function(e){return"undefined"!=typeof $&&$.event.triggered!==e.type?$.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(H)||[""]).length;c--;)p=g=(a=wt.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=$.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=$.event.special[p]||{},u=$.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&$.expr.match.needsContext.test(o),namespace:f.join(".")},s),(d=l[p])||((d=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,i,f,r)||t.addEventListener&&t.addEventListener(p,r)),h.add&&(h.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),$.event.global[p]=!0)},remove:function(t,e,n,i,o){var s,r,a,l,c,u,h,d,p,f,g,m=Y.hasData(t)&&Y.get(t);if(m&&(l=m.events)){for(c=(e=(e||"").match(H)||[""]).length;c--;)if(p=g=(a=wt.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=$.event.special[p]||{},d=l[p=(i?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=s=d.length;s--;)u=d[s],!o&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(s,1),u.selector&&d.delegateCount--,h.remove&&h.remove.call(t,u));r&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,f,m.handle)||$.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)$.event.remove(t,p+e[c],n,i,!0);$.isEmptyObject(l)&&Y.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,s,r,a=$.event.fix(t),l=new Array(arguments.length),c=(Y.get(this,"events")||{})[a.type]||[],u=$.event.special[a.type]||{};for(l[0]=a,e=1;e<arguments.length;e++)l[e]=arguments[e];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(r=$.event.handlers.call(this,a,c),e=0;(o=r[e++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(s.namespace)||(a.handleObj=s,a.data=s.data,void 0!==(i=(($.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.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?$(o,this).index(c)>-1:$.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($.Event.prototype,t,{enumerable:!0,configurable:!0,get:g(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[$.expando]?t:new $.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==St()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===St()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&E(this,"input"))return this.click(),!1},_default:function(t){return E(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},$.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},$.Event=function(t,e){if(!(this instanceof $.Event))return new $.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Ct:Tt,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&&$.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[$.expando]=!0},$.Event.prototype={constructor:$.Event,isDefaultPrevented:Tt,isPropagationStopped:Tt,isImmediatePropagationStopped:Tt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Ct,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Ct,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Ct,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},$.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,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:function(t){var e=t.button;return null==t.which&&$t.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&xt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},$.event.addProp),$.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){$.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=t.relatedTarget,o=t.handleObj;return i&&(i===this||$.contains(this,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),$.fn.extend({on:function(t,e,n,i){return kt(this,t,e,n,i)},one:function(t,e,n,i){return kt(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,$(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=Tt),this.each(function(){$.event.remove(this,t,n,e)})}});var Et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Dt=/<script|<style|<link/i,At=/checked\s*(?:[^=]|=\s*.checked.)/i,jt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function It(t,e){return E(t,"table")&&E(11!==e.nodeType?e:e.firstChild,"tr")&&$(t).children("tbody")[0]||t}function Nt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(t,e){var n,i,o,s,r,a,l,c;if(1===e.nodeType){if(Y.hasData(t)&&(s=Y.access(t),r=Y.set(e,s),c=s.events))for(o in delete r.handle,r.events={},c)for(n=0,i=c[o].length;n<i;n++)$.event.add(e,o,c[o][n]);G.hasData(t)&&(a=G.access(t),l=$.extend({},a),G.set(e,l))}}function Ht(t,e,n,i){e=r.apply([],e);var o,s,a,l,c,u,h=0,d=t.length,p=d-1,m=e[0],v=g(m);if(v||d>1&&"string"==typeof m&&!f.checkClone&&At.test(m))return t.each(function(o){var s=t.eq(o);v&&(e[0]=m.call(this,o,s.html())),Ht(s,e,n,i)});if(d&&(s=(o=yt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=s),s||i)){for(l=(a=$.map(pt(o,"script"),Nt)).length;h<d;h++)c=o,h!==p&&(c=$.clone(c,!0,!0),l&&$.merge(a,pt(c,"script"))),n.call(t[h],c,h);if(l)for(u=a[a.length-1].ownerDocument,$.map(a,Ot),h=0;h<l;h++)c=a[h],ht.test(c.type||"")&&!Y.access(c,"globalEval")&&$.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?$._evalUrl&&$._evalUrl(c.src):y(c.textContent.replace(jt,""),u,c))}return t}function qt(t,e,n){for(var i,o=e?$.filter(e,t):t,s=0;null!=(i=o[s]);s++)n||1!==i.nodeType||$.cleanData(pt(i)),i.parentNode&&(n&&$.contains(i.ownerDocument,i)&&ft(pt(i,"script")),i.parentNode.removeChild(i));return t}$.extend({htmlPrefilter:function(t){return t.replace(Et,"<$1></$2>")},clone:function(t,e,n){var i,o,s,r,a,l,c,u=t.cloneNode(!0),h=$.contains(t.ownerDocument,t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||$.isXMLDoc(t)))for(r=pt(u),i=0,o=(s=pt(t)).length;i<o;i++)a=s[i],l=r[i],c=void 0,"input"===(c=l.nodeName.toLowerCase())&&ct.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(e)if(n)for(s=s||pt(t),r=r||pt(u),i=0,o=s.length;i<o;i++)Lt(s[i],r[i]);else Lt(t,u);return(r=pt(u,"script")).length>0&&ft(r,!h&&pt(t,"script")),u},cleanData:function(t){for(var e,n,i,o=$.event.special,s=0;void 0!==(n=t[s]);s++)if(X(n)){if(e=n[Y.expando]){if(e.events)for(i in e.events)o[i]?$.event.remove(n,i):$.removeEvent(n,i,e.handle);n[Y.expando]=void 0}n[G.expando]&&(n[G.expando]=void 0)}}}),$.fn.extend({detach:function(t){return qt(this,t,!0)},remove:function(t){return qt(this,t)},text:function(t){return _(this,function(t){return void 0===t?$.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 Ht(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||It(this,t).appendChild(t)})},prepend:function(){return Ht(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=It(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Ht(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Ht(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&&($.cleanData(pt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return $.clone(this,t,e)})},html:function(t){return _(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&&!Dt.test(t)&&!dt[(ut.exec(t)||["",""])[1].toLowerCase()]){t=$.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&($.cleanData(pt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return Ht(this,arguments,function(e){var n=this.parentNode;$.inArray(this,t)<0&&($.cleanData(pt(this)),n&&n.replaceChild(e,this))},t)}}),$.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){$.fn[t]=function(t){for(var n,i=[],o=$(t),s=o.length-1,r=0;r<=s;r++)n=r===s?this:this.clone(!0),$(o[r])[e](n),a.apply(i,n.get());return this.pushStack(i)}});var Pt=new RegExp("^("+tt+")(?!px)[a-z%]+$","i"),Mt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Wt=new RegExp(nt.join("|"),"i");function Ft(t,e,n){var i,o,s,r,a=t.style;return(n=n||Mt(t))&&(""!==(r=n.getPropertyValue(e)||n[e])||$.contains(t.ownerDocument,t)||(r=$.style(t,e)),!f.pixelBoxStyles()&&Pt.test(r)&&Wt.test(e)&&(i=a.width,o=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=n.width,a.width=i,a.minWidth=o,a.maxWidth=s)),void 0!==r?r+"":r}function Rt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",bt.appendChild(c).appendChild(u);var e=t.getComputedStyle(u);o="1%"!==e.top,l=12===n(e.marginLeft),u.style.right="60%",a=36===n(e.right),s=36===n(e.width),u.style.position="absolute",r=36===u.offsetWidth||"absolute",bt.removeChild(c),u=null}}function n(t){return Math.round(parseFloat(t))}var o,s,r,a,l,c=i.createElement("div"),u=i.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,$.extend(f,{boxSizingReliable:function(){return e(),s},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),o},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),r}}))}();var _t=/^(none|table(?!-c[ea]).+)/,Bt=/^--/,Ut={position:"absolute",visibility:"hidden",display:"block"},zt={letterSpacing:"0",fontWeight:"400"},Qt=["Webkit","Moz","ms"],Xt=i.createElement("div").style;function Vt(t){var e=$.cssProps[t];return e||(e=$.cssProps[t]=function(t){if(t in Xt)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=Qt.length;n--;)if((t=Qt[n]+e)in Xt)return t}(t)||t),e}function Yt(t,e,n){var i=et.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function Gt(t,e,n,i,o,s){var r="width"===e?1:0,a=0,l=0;if(n===(i?"border":"content"))return 0;for(;r<4;r+=2)"margin"===n&&(l+=$.css(t,n+nt[r],!0,o)),i?("content"===n&&(l-=$.css(t,"padding"+nt[r],!0,o)),"margin"!==n&&(l-=$.css(t,"border"+nt[r]+"Width",!0,o))):(l+=$.css(t,"padding"+nt[r],!0,o),"padding"!==n?l+=$.css(t,"border"+nt[r]+"Width",!0,o):a+=$.css(t,"border"+nt[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))),l}function Jt(t,e,n){var i=Mt(t),o=Ft(t,e,i),s="border-box"===$.css(t,"boxSizing",!1,i),r=s;if(Pt.test(o)){if(!n)return o;o="auto"}return r=r&&(f.boxSizingReliable()||o===t.style[e]),("auto"===o||!parseFloat(o)&&"inline"===$.css(t,"display",!1,i))&&(o=t["offset"+e[0].toUpperCase()+e.slice(1)],r=!0),(o=parseFloat(o)||0)+Gt(t,e,n||(s?"border":"content"),r,i,o)+"px"}function Kt(t,e,n,i,o){return new Kt.prototype.init(t,e,n,i,o)}$.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ft(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,r,a=Q(e),l=Bt.test(e),c=t.style;if(l||(e=Vt(a)),r=$.cssHooks[e]||$.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=et.exec(n))&&o[1]&&(n=st(t,e,o),s="number"),null!=n&&n==n&&("number"===s&&(n+=o&&o[3]||($.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=Q(e);return Bt.test(e)||(e=Vt(a)),(r=$.cssHooks[e]||$.cssHooks[a])&&"get"in r&&(o=r.get(t,!0,n)),void 0===o&&(o=Ft(t,e,i)),"normal"===o&&e in zt&&(o=zt[e]),""===n||n?(s=parseFloat(o),!0===n||isFinite(s)?s||0:o):o}}),$.each(["height","width"],function(t,e){$.cssHooks[e]={get:function(t,n,i){if(n)return!_t.test($.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?Jt(t,e,i):ot(t,Ut,function(){return Jt(t,e,i)})},set:function(t,n,i){var o,s=Mt(t),r="border-box"===$.css(t,"boxSizing",!1,s),a=i&&Gt(t,e,i,r,s);return r&&f.scrollboxSize()===s.position&&(a-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-Gt(t,e,"border",!1,s)-.5)),a&&(o=et.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=$.css(t,e)),Yt(0,n,a)}}}),$.cssHooks.marginLeft=Rt(f.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Ft(t,"marginLeft"))||t.getBoundingClientRect().left-ot(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),$.each({margin:"",padding:"",border:"Width"},function(t,e){$.cssHooks[t+e]={expand:function(n){for(var i=0,o={},s="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+nt[i]+e]=s[i]||s[i-2]||s[0];return o}},"margin"!==t&&($.cssHooks[t+e].set=Yt)}),$.fn.extend({css:function(t,e){return _(this,function(t,e,n){var i,o,s={},r=0;if(Array.isArray(e)){for(i=Mt(t),o=e.length;r<o;r++)s[e[r]]=$.css(t,e[r],!1,i);return s}return void 0!==n?$.style(t,e,n):$.css(t,e)},t,e,arguments.length>1)}}),$.Tween=Kt,Kt.prototype={constructor:Kt,init:function(t,e,n,i,o,s){this.elem=t,this.prop=n,this.easing=o||$.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=s||($.cssNumber[n]?"":"px")},cur:function(){var t=Kt.propHooks[this.prop];return t&&t.get?t.get(this):Kt.propHooks._default.get(this)},run:function(t){var e,n=Kt.propHooks[this.prop];return this.options.duration?this.pos=e=$.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):Kt.propHooks._default.set(this),this}},Kt.prototype.init.prototype=Kt.prototype,Kt.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=$.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){$.fx.step[t.prop]?$.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[$.cssProps[t.prop]]&&!$.cssHooks[t.prop]?t.elem[t.prop]=t.now:$.style(t.elem,t.prop,t.now+t.unit)}}},Kt.propHooks.scrollTop=Kt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},$.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},$.fx=Kt.prototype.init,$.fx.step={};var Zt,te,ee=/^(?:toggle|show|hide)$/,ne=/queueHooks$/;function ie(){te&&(!1===i.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(ie):t.setTimeout(ie,$.fx.interval),$.fx.tick())}function oe(){return t.setTimeout(function(){Zt=void 0}),Zt=Date.now()}function se(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=nt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function re(t,e,n){for(var i,o=(ae.tweeners[e]||[]).concat(ae.tweeners["*"]),s=0,r=o.length;s<r;s++)if(i=o[s].call(n,e,t))return i}function ae(t,e,n){var i,o,s=0,r=ae.prefilters.length,a=$.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=Zt||oe(),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:$.extend({},e),opts:$.extend(!0,{specialEasing:{},easing:$.easing._default},n),originalProperties:e,originalOptions:n,startTime:Zt||oe(),duration:n.duration,tweens:[],createTween:function(e,n){var i=$.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}}),u=c.props;for(!function(t,e){var n,i,o,s,r;for(n in t)if(o=e[i=Q(n)],s=t[n],Array.isArray(s)&&(o=s[1],s=t[n]=s[0]),n!==i&&(t[i]=s,delete t[n]),(r=$.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}(u,c.opts.specialEasing);s<r;s++)if(i=ae.prefilters[s].call(c,t,u,c.opts))return g(i.stop)&&($._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return $.map(u,re,c),g(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),$.fx.timer($.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}$.Animation=$.extend(ae,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return st(n.elem,t,et.exec(e),n),n}]},tweener:function(t,e){g(t)?(e=t,t=["*"]):t=t.match(H);for(var n,i=0,o=t.length;i<o;i++)n=t[i],ae.tweeners[n]=ae.tweeners[n]||[],ae.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,s,r,a,l,c,u,h="width"in e||"height"in e,d=this,p={},f=t.style,g=t.nodeType&&it(t),m=Y.get(t,"fxshow");for(i in n.queue||(null==(r=$._queueHooks(t,"fx")).unqueued&&(r.unqueued=0,a=r.empty.fire,r.empty.fire=function(){r.unqueued||a()}),r.unqueued++,d.always(function(){d.always(function(){r.unqueued--,$.queue(t,"fx").length||r.empty.fire()})})),e)if(o=e[i],ee.test(o)){if(delete e[i],s=s||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[i])continue;g=!0}p[i]=m&&m[i]||$.style(t,i)}if((l=!$.isEmptyObject(e))||!$.isEmptyObject(p))for(i in h&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=m&&m.display)&&(c=Y.get(t,"display")),"none"===(u=$.css(t,"display"))&&(c?u=c:(lt([t],!0),c=t.style.display||c,u=$.css(t,"display"),lt([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===$.css(t,"float")&&(l||(d.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),l=!1,p)l||(m?"hidden"in m&&(g=m.hidden):m=Y.access(t,"fxshow",{display:c}),s&&(m.hidden=!g),g&<([t],!0),d.done(function(){for(i in g||lt([t]),Y.remove(t,"fxshow"),p)$.style(t,i,p[i])})),l=re(g?m[i]:0,i,d),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?ae.prefilters.unshift(t):ae.prefilters.push(t)}}),$.speed=function(t,e,n){var i=t&&"object"==typeof t?$.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return $.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in $.fx.speeds?i.duration=$.fx.speeds[i.duration]:i.duration=$.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){g(i.old)&&i.old.call(this),i.queue&&$.dequeue(this,i.queue)},i},$.fn.extend({fadeTo:function(t,e,n,i){return this.filter(it).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=$.isEmptyObject(t),s=$.speed(e,n,i),r=function(){var e=ae(this,$.extend({},t),s);(o||Y.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&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",s=$.timers,r=Y.get(this);if(o)r[o]&&r[o].stop&&i(r[o]);else for(o in r)r[o]&&r[o].stop&&ne.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||$.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=Y.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],s=$.timers,r=i?i.length:0;for(n.finish=!0,$.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})}}),$.each(["toggle","show","hide"],function(t,e){var n=$.fn[e];$.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(se(e,!0),t,i,o)}}),$.each({slideDown:se("show"),slideUp:se("hide"),slideToggle:se("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){$.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),$.timers=[],$.fx.tick=function(){var t,e=0,n=$.timers;for(Zt=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||$.fx.stop(),Zt=void 0},$.fx.timer=function(t){$.timers.push(t),$.fx.start()},$.fx.interval=13,$.fx.start=function(){te||(te=!0,ie())},$.fx.stop=function(){te=null},$.fx.speeds={slow:600,fast:200,_default:400},$.fn.delay=function(e,n){return e=$.fx&&$.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)}})},function(){var t=i.createElement("input"),e=i.createElement("select").appendChild(i.createElement("option"));t.type="checkbox",f.checkOn=""!==t.value,f.optSelected=e.selected,(t=i.createElement("input")).value="t",t.type="radio",f.radioValue="t"===t.value}();var le,ce=$.expr.attrHandle;$.fn.extend({attr:function(t,e){return _(this,$.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){$.removeAttr(this,t)})}}),$.extend({attr:function(t,e,n){var i,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return"undefined"==typeof t.getAttribute?$.prop(t,e,n):(1===s&&$.isXMLDoc(t)||(o=$.attrHooks[e.toLowerCase()]||($.expr.match.bool.test(e)?le:void 0)),void 0!==n?null===n?void $.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=$.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(H);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),le={set:function(t,e,n){return!1===e?$.removeAttr(t,n):t.setAttribute(n,n),n}},$.each($.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ce[e]||$.find.attr;ce[e]=function(t,e,i){var o,s,r=e.toLowerCase();return i||(s=ce[r],ce[r]=o,o=null!=n(t,e,i)?r:null,ce[r]=s),o}});var ue=/^(?:input|select|textarea|button)$/i,he=/^(?:a|area)$/i;function de(t){return(t.match(H)||[]).join(" ")}function pe(t){return t.getAttribute&&t.getAttribute("class")||""}function fe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(H)||[]}$.fn.extend({prop:function(t,e){return _(this,$.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[$.propFix[t]||t]})}}),$.extend({prop:function(t,e,n){var i,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&$.isXMLDoc(t)||(e=$.propFix[e]||e,o=$.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=$.find.attr(t,"tabindex");return e?parseInt(e,10):ue.test(t.nodeName)||he.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||($.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)}}),$.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){$.propFix[this.toLowerCase()]=this}),$.fn.extend({addClass:function(t){var e,n,i,o,s,r,a,l=0;if(g(t))return this.each(function(e){$(this).addClass(t.call(this,e,pe(this)))});if((e=fe(t)).length)for(;n=this[l++];)if(o=pe(n),i=1===n.nodeType&&" "+de(o)+" "){for(r=0;s=e[r++];)i.indexOf(" "+s+" ")<0&&(i+=s+" ");o!==(a=de(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,o,s,r,a,l=0;if(g(t))return this.each(function(e){$(this).removeClass(t.call(this,e,pe(this)))});if(!arguments.length)return this.attr("class","");if((e=fe(t)).length)for(;n=this[l++];)if(o=pe(n),i=1===n.nodeType&&" "+de(o)+" "){for(r=0;s=e[r++];)for(;i.indexOf(" "+s+" ")>-1;)i=i.replace(" "+s+" "," ");o!==(a=de(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):g(t)?this.each(function(n){$(this).toggleClass(t.call(this,n,pe(this),e),e)}):this.each(function(){var e,o,s,r;if(i)for(o=0,s=$(this),r=fe(t);e=r[o++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else void 0!==t&&"boolean"!==n||((e=pe(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Y.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+de(pe(n))+" ").indexOf(e)>-1)return!0;return!1}});var ge=/\r/g;$.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=g(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,$(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=$.map(o,function(t){return null==t?"":t+""})),(e=$.valHooks[this.type]||$.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=$.valHooks[o.type]||$.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(ge,""):null==n?"":n:void 0}}),$.extend({valHooks:{option:{get:function(t){var e=$.find.attr(t,"value");return null!=e?e:de($.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=$(n).val(),r)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,s=$.makeArray(e),r=o.length;r--;)((i=o[r]).selected=$.inArray($.valHooks.option.get(i),s)>-1)&&(n=!0);return n||(t.selectedIndex=-1),s}}}}),$.each(["radio","checkbox"],function(){$.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=$.inArray($(t).val(),e)>-1}},f.checkOn||($.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),f.focusin="onfocusin"in t;var me=/^(?:focusinfocus|focusoutblur)$/,ve=function(t){t.stopPropagation()};$.extend($.event,{trigger:function(e,n,o,s){var r,a,l,c,u,d,p,f,v=[o||i],y=h.call(e,"type")?e.type:e,b=h.call(e,"namespace")?e.namespace.split("."):[];if(a=f=l=o=o||i,3!==o.nodeType&&8!==o.nodeType&&!me.test(y+$.event.triggered)&&(y.indexOf(".")>-1&&(b=y.split("."),y=b.shift(),b.sort()),u=y.indexOf(":")<0&&"on"+y,(e=e[$.expando]?e:new $.Event(y,"object"==typeof e&&e)).isTrigger=s?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=o),n=null==n?[e]:$.makeArray(n,[e]),p=$.event.special[y]||{},s||!p.trigger||!1!==p.trigger.apply(o,n))){if(!s&&!p.noBubble&&!m(o)){for(c=p.delegateType||y,me.test(c+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),l=a;l===(o.ownerDocument||i)&&v.push(l.defaultView||l.parentWindow||t)}for(r=0;(a=v[r++])&&!e.isPropagationStopped();)f=a,e.type=r>1?c:p.bindType||y,(d=(Y.get(a,"events")||{})[e.type]&&Y.get(a,"handle"))&&d.apply(a,n),(d=u&&a[u])&&d.apply&&X(a)&&(e.result=d.apply(a,n),!1===e.result&&e.preventDefault());return e.type=y,s||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(v.pop(),n)||!X(o)||u&&g(o[y])&&!m(o)&&((l=o[u])&&(o[u]=null),$.event.triggered=y,e.isPropagationStopped()&&f.addEventListener(y,ve),o[y](),e.isPropagationStopped()&&f.removeEventListener(y,ve),$.event.triggered=void 0,l&&(o[u]=l)),e.result}},simulate:function(t,e,n){var i=$.extend(new $.Event,n,{type:t,isSimulated:!0});$.event.trigger(i,null,e)}}),$.fn.extend({trigger:function(t,e){return this.each(function(){$.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return $.event.trigger(t,e,n,!0)}}),f.focusin||$.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){$.event.simulate(e,t.target,$.event.fix(t))};$.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=Y.access(i,e);o||i.addEventListener(t,n,!0),Y.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=Y.access(i,e)-1;o?Y.access(i,e,o):(i.removeEventListener(t,n,!0),Y.remove(i,e))}}});var ye=t.location,be=Date.now(),$e=/\?/;$.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||$.error("Invalid XML: "+e),n};var xe=/\[\]$/,we=/\r?\n/g,Ce=/^(?:submit|button|image|reset|file)$/i,Te=/^(?:input|select|textarea|keygen)/i;function Se(t,e,n,i){var o;if(Array.isArray(e))$.each(e,function(e,o){n||xe.test(t)?i(t,o):Se(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)});else if(n||"object"!==b(e))i(t,e);else for(o in e)Se(t+"["+o+"]",e[o],n,i)}$.param=function(t,e){var n,i=[],o=function(t,e){var n=g(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!$.isPlainObject(t))$.each(t,function(){o(this.name,this.value)});else for(n in t)Se(n,t[n],e,o);return i.join("&")},$.fn.extend({serialize:function(){return $.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=$.prop(this,"elements");return t?$.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!$(this).is(":disabled")&&Te.test(this.nodeName)&&!Ce.test(t)&&(this.checked||!ct.test(t))}).map(function(t,e){var n=$(this).val();return null==n?null:Array.isArray(n)?$.map(n,function(t){return{name:e.name,value:t.replace(we,"\r\n")}}):{name:e.name,value:n.replace(we,"\r\n")}}).get()}});var ke=/%20/g,Ee=/#.*$/,De=/([?&])_=[^&]*/,Ae=/^(.*?):[ \t]*([^\r\n]*)$/gm,je=/^(?:GET|HEAD)$/,Ie=/^\/\//,Ne={},Oe={},Le="*/".concat("*"),He=i.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,s=e.toLowerCase().match(H)||[];if(g(n))for(;i=s[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Pe(t,e,n,i){var o={},s=t===Oe;function r(a){var l;return o[a]=!0,$.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 Me(t,e){var n,i,o=$.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&$.extend(!0,t,i),t}He.href=ye.href,$.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ye.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ye.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Le,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":$.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Me(Me(t,$.ajaxSettings),e):Me($.ajaxSettings,t)},ajaxPrefilter:qe(Ne),ajaxTransport:qe(Oe),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var o,s,r,a,l,c,u,h,d,p,f=$.ajaxSetup({},n),g=f.context||f,m=f.context&&(g.nodeType||g.jquery)?$(g):$.event,v=$.Deferred(),y=$.Callbacks("once memory"),b=f.statusCode||{},x={},w={},C="canceled",T={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=Ae.exec(r);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return u?r:null},setRequestHeader:function(t,e){return null==u&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)T.always(t[T.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||C;return o&&o.abort(e),S(0,e),this}};if(v.promise(T),f.url=((e||f.url||ye.href)+"").replace(Ie,ye.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(H)||[""],null==f.crossDomain){c=i.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=He.protocol+"//"+He.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=$.param(f.data,f.traditional)),Pe(Ne,f,n,T),u)return T;for(d in(h=$.event&&f.global)&&0==$.active++&&$.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!je.test(f.type),s=f.url.replace(Ee,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(ke,"+")):(p=f.url.slice(s.length),f.data&&(f.processData||"string"==typeof f.data)&&(s+=($e.test(s)?"&":"?")+f.data,delete f.data),!1===f.cache&&(s=s.replace(De,"$1"),p=($e.test(s)?"&":"?")+"_="+be+++p),f.url=s+p),f.ifModified&&($.lastModified[s]&&T.setRequestHeader("If-Modified-Since",$.lastModified[s]),$.etag[s]&&T.setRequestHeader("If-None-Match",$.etag[s])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Le+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(g,T,f)||u))return T.abort();if(C="abort",y.add(f.complete),T.done(f.success),T.fail(f.error),o=Pe(Oe,f,n,T)){if(T.readyState=1,h&&m.trigger("ajaxSend",[T,f]),u)return T;f.async&&f.timeout>0&&(l=t.setTimeout(function(){T.abort("timeout")},f.timeout));try{u=!1,o.send(x,S)}catch(t){if(u)throw t;S(-1,t)}}else S(-1,"No Transport");function S(e,n,i,a){var c,d,p,x,w,C=n;u||(u=!0,l&&t.clearTimeout(l),o=void 0,r=a||"",T.readyState=e>0?4:0,c=e>=200&&e<300||304===e,i&&(x=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,T,i)),x=function(t,e,n,i){var o,s,r,a,l,c={},u=t.dataTypes.slice();if(u[1])for(r in t.converters)c[r.toLowerCase()]=t.converters[r];for(s=u.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=u.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],u.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,x,T,c),c?(f.ifModified&&((w=T.getResponseHeader("Last-Modified"))&&($.lastModified[s]=w),(w=T.getResponseHeader("etag"))&&($.etag[s]=w)),204===e||"HEAD"===f.type?C="nocontent":304===e?C="notmodified":(C=x.state,d=x.data,c=!(p=x.error))):(p=C,!e&&C||(C="error",e<0&&(e=0))),T.status=e,T.statusText=(n||C)+"",c?v.resolveWith(g,[d,C,T]):v.rejectWith(g,[T,C,p]),T.statusCode(b),b=void 0,h&&m.trigger(c?"ajaxSuccess":"ajaxError",[T,f,c?d:p]),y.fireWith(g,[T,C]),h&&(m.trigger("ajaxComplete",[T,f]),--$.active||$.event.trigger("ajaxStop")))}return T},getJSON:function(t,e,n){return $.get(t,e,n,"json")},getScript:function(t,e){return $.get(t,void 0,e,"script")}}),$.each(["get","post"],function(t,e){$[e]=function(t,n,i,o){return g(n)&&(o=o||i,i=n,n=void 0),$.ajax($.extend({url:t,type:e,dataType:o,data:n,success:i},$.isPlainObject(t)&&t))}}),$._evalUrl=function(t){return $.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},$.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=$(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 g(t)?this.each(function(e){$(this).wrapInner(t.call(this,e))}):this.each(function(){var e=$(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=g(t);return this.each(function(n){$(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){$(this).replaceWith(this.childNodes)}),this}}),$.expr.pseudos.hidden=function(t){return!$.expr.pseudos.visible(t)},$.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},$.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Fe=$.ajaxSettings.xhr();f.cors=!!Fe&&"withCredentials"in Fe,f.ajax=Fe=!!Fe,$.ajaxTransport(function(e){var n,i;if(f.cors||Fe&&!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(We[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()}}}),$.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),$.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 $.globalEval(t),t}}}),$.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),$.ajaxTransport("script",function(t){var e,n;if(t.crossDomain)return{send:function(o,s){e=$("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&s("error"===t.type?404:200,t.type)}),i.head.appendChild(e[0])},abort:function(){n&&n()}}});var Re,_e=[],Be=/(=)\?(?=&|$)|\?\?/;$.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=_e.pop()||$.expando+"_"+be++;return this[t]=!0,t}}),$.ajaxPrefilter("json jsonp",function(e,n,i){var o,s,r,a=!1!==e.jsonp&&(Be.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Be.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Be,"$1"+o):!1!==e.jsonp&&(e.url+=($e.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return r||$.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?$(t).removeProp(o):t[o]=s,e[o]&&(e.jsonpCallback=n.jsonpCallback,_e.push(o)),r&&g(s)&&s(r[0]),r=s=void 0}),"script"}),f.createHTMLDocument=((Re=i.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Re.childNodes.length),$.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(f.createHTMLDocument?((o=(e=i.implementation.createHTMLDocument("")).createElement("base")).href=i.location.href,e.head.appendChild(o)):e=i),r=!n&&[],(s=D.exec(t))?[e.createElement(s[1])]:(s=yt([t],e,r),r&&r.length&&$(r).remove(),$.merge([],s.childNodes)));var o,s,r},$.fn.load=function(t,e,n){var i,o,s,r=this,a=t.indexOf(" ");return a>-1&&(i=de(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),r.length>0&&$.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){s=arguments,r.html(i?$("<div>").append($.parseHTML(t)).find(i):t)}).always(n&&function(t,e){r.each(function(){n.apply(this,s||[t.responseText,e,t])})}),this},$.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){$.fn[e]=function(t){return this.on(e,t)}}),$.expr.pseudos.animated=function(t){return $.grep($.timers,function(e){return t===e.elem}).length},$.offset={setOffset:function(t,e,n){var i,o,s,r,a,l,c=$.css(t,"position"),u=$(t),h={};"static"===c&&(t.style.position="relative"),a=u.offset(),s=$.css(t,"top"),l=$.css(t,"left"),("absolute"===c||"fixed"===c)&&(s+l).indexOf("auto")>-1?(r=(i=u.position()).top,o=i.left):(r=parseFloat(s)||0,o=parseFloat(l)||0),g(e)&&(e=e.call(t,n,$.extend({},a))),null!=e.top&&(h.top=e.top-a.top+r),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):u.css(h)}},$.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){$.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"===$.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"===$.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((o=$(t).offset()).top+=$.css(t,"borderTopWidth",!0),o.left+=$.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-$.css(i,"marginTop",!0),left:e.left-o.left-$.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===$.css(t,"position");)t=t.offsetParent;return t||bt})}}),$.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;$.fn[t]=function(i){return _(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)}}),$.each(["top","left"],function(t,e){$.cssHooks[e]=Rt(f.pixelPosition,function(t,n){if(n)return n=Ft(t,e),Pt.test(n)?$(t).position()[e]+"px":n})}),$.each({Height:"height",Width:"width"},function(t,e){$.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){$.fn[i]=function(o,s){var r=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===s?"margin":"border");return _(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?$.css(e,n,a):$.style(e,n,o,a)},e,r?o:void 0,r)}})}),$.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){$.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),$.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),$.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)}}),$.proxy=function(t,e){var n,i,o;if("string"==typeof e&&(n=t[e],e=t,t=n),g(t))return i=s.call(arguments,2),(o=function(){return t.apply(e||this,i.concat(s.call(arguments)))}).guid=t.guid=t.guid||$.guid++,o},$.holdReady=function(t){t?$.readyWait++:$.ready(!0)},$.isArray=Array.isArray,$.parseJSON=JSON.parse,$.nodeName=E,$.isFunction=g,$.isWindow=m,$.camelCase=Q,$.type=b,$.now=Date.now,$.isNumeric=function(t){var e=$.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return $});var Ue=t.jQuery,ze=t.$;return $.noConflict=function(e){return t.$===$&&(t.$=ze),e&&t.jQuery===$&&(t.jQuery=Ue),$},e||(t.jQuery=t.$=$),$},"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t),$.fn.extend({animateCss:function(t,e){var n="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";this.addClass("animated "+t).one(n,function(n){$(this).removeClass("animated "+t),e&&e()}).children().on(n,function(t){t.stopPropagation()})}});class n{static initialize(){$("html").addClass("dom-ready"),$(document).on("focus",".form-control",function(){if(!$(this).hasClass("disabled")&&$(this).not(":disabled")&&!$(this).attr("readonly")){var t=$(this).closest(".input-group");t.hasClass("input-group-focus")||t.addClass("input-group-focus")}}),$(document).on("blur",".form-control",function(){if(!$(this).hasClass("disabled")&&$(this).not(":disabled")&&!$(this).attr("readonly")){var t=$(this).closest(".input-group");t.hasClass("input-group-focus")&&t.removeClass("input-group-focus")}}),$(".form-label-group").each(function(t,e){$(e).find("input").on("blur input change",function(){$(this).val()?$(e).addClass("label-on-top"):$(e).removeClass("label-on-top")}).trigger("change")})}}window.Cool=window.Cool||{},window.Cool.initialize=n.initialize;const i=function(t,e,n){var i;return function(){var o=this,s=arguments,r=n&&!i;clearTimeout(i),i=setTimeout(function(){i=null,n||t.apply(o,s)},e),r&&t.apply(o,s)}},o=function(){if("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)return!0};class s{onCreate(){var t=this.opts.onCreate;"function"==typeof t&&t.call(this.el)}onUpdate(){var t=this.opts.onUpdate;"function"==typeof t&&t.call(this.el)}onDestroy(){var t=this.opts.onDestroy;"function"==typeof t&&t.call(this.el)}onShow(){var t=this.opts.onShow;"function"==typeof t&&t.call(this.el)}onClose(){var t=this.opts.onClose;"function"==typeof t&&t.call(this.el)}debug(...t){this.opts.debug&&("function"==typeof this.opts.debug?this.opts.debug(...t):console.log(...t))}}const r="coolPopover",a="plugin_coolPopover";class l extends s{constructor(t,e){super(),this.el=t,this.opts=$.extend({},$.fn[r].defaults,e),this.init()}init(){this.buildCache(),this.bindEvents(),this.onCreate()}destroy(){this.unbindEvents(),this.$el.removeData(),this.onDestroy()}update(){this.buildCache(),this.onUpdate()}buildCache(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.id="popover-"+this.generateUUID(),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.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.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.template=this.$el.data("template")?this.$el.data("template"):this.opts.template,this.templateAttrs=this.$el.data("templateAttrs")?this.$el.data("templateAttrs"):this.opts.templateAttrs}bindEvents(){"click"===this.trigger?this.$el.on("click."+r,()=>{this.$popover?this.close():this.show()}):"hover"===this.trigger?(this.$el.on("mouseenter."+r,()=>{this.show()}),this.$el.on("mouseleave."+r,()=>{this.close()})):"focus"===this.trigger&&(this.$el.on("focusin."+r,()=>{this.show()}),this.$el.on("focusout."+r,()=>{this.close()})),$(window).on("resize",i(()=>{this.$popover&&(this.setPosition(),this.onUpdate())},250))}unbindEvents(){this.$el.off("."+r)}generateUUID(){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)})}buildPopover(){let t=this.content;"function"==typeof this.opts.template&&(t=this.opts.template()),this.$popover=$(`\n \t\t<div class="popover popover-${this.placement}" role="tooltip" id="${this.id}">\n\n\t\t\t <div class="arrow"></div>\n\n\t\t\t <h3 class="popover-header">${this.title}</h3>\n\n\t\t\t <div class="popover-body">${t}</div>\n\n\t\t\t</div>\n \t`),this.$container.append(this.$popover),this.$arrow=!!this.$popover.find(".arrow")&&this.$popover.find(".arrow"),this.debug(this.$el),this.debug(this.$container),this.debug(this.$popover),this.debug(this.$arrow),this.debug("Id: "+this.id),this.debug("Trigger: "+this.trigger),this.debug("Placement: "+this.placement),this.debug("Animation: "+this.animation),this.debug("Animation in: "+this.animationIn),this.debug("Animation out: "+this.animationOut),this.debug("Animation speed: "+this.animationSpeed),this.debug("Title: "+this.title),this.debug("Content: "+this.content),this.debug("Template: "+this.template),this.debug(this.templateAttrs)}setPosition(t){"undefined"!=typeof str&&null!==str||(t=this.placement);var e=this.$popover.outerWidth(!0),n=this.$popover.outerHeight(!0),i=this.$el.outerWidth(),o=this.$el.outerHeight(),s=this.$el.position().left,r=this.$el.position().top,a=this.$arrow.outerWidth(!0),l=this.$arrow.outerHeight(!0);if("top"===t){var c=s-(e-i)/2,u=r-n,h=e/2-a/2;this.$arrow.css({left:h+"px"})}else if("right"===t){c=s+i,u=r-(n-o)/2,h=n/2-l/2;this.$arrow.css({top:h+"px"})}else if("bottom"===t){c=s-(e-i)/2,u=r+o,h=e/2-a/2;this.$arrow.css({left:h+"px"})}else if("left"===t){c=s-e,u=r-(n-o)/2,h=n/2-l/2;this.$arrow.css({top:h+"px"})}this.$popover.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+c+"px, "+u+"px, 0px)","will-change":"transform"}),this.debug("Popover trigger width: "+i+"px"),this.debug("Popover trigger height: "+o+"px"),this.debug("popover trigger position x: "+s+"px"),this.debug("Popover trigger position Y: "+r+"px"),this.debug("Popover width: "+e+"px"),this.debug("Popover height: "+n+"px"),this.debug("Popover position x: "+c+"px"),this.debug("Popover position y: "+u+"px")}show(){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())}close(){this.$popover&&(this.animation&&!this.$popover.hasClass("animated")?this.$popover.animateCss(this.animationOut,()=>{this.$popover.remove(),this.$el.removeAttr("data-popover"),this.$popover=!1,this.onClose()}):(this.$popover.remove(),this.$el.removeAttr("data-popover"),this.$popover=!1,this.onClose()))}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(a);if(e||(e=new l(this,"object"==typeof t&&t),$(this).data(a,e)),"string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}if("undefined"!=typeof $){const t=$.fn[r];$.fn[r]=l._jQueryInterface,$.fn[r].Constructor=l,$.fn[r].noConflict=(()=>($.fn[r]=t,l._jQueryInterface)),$.fn[r].defaults={container:"body",trigger:"focus",placement:"bottom",animation:!0,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",title:"",content:"",template:!1,templateAttrs:{},onCreate:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}const c="coolSelect",u="plugin_coolSelect";class h extends s{constructor(t,e){super(),this.el=t,this.opts=$.extend({},$.fn[c].defaults,e),this.name=null,this.scrollContentHeight=null,this.items=[],this.data={},this.searchData=[],this.searchApi=this.opts.searchApi,this.type=null,this.contentOpen=null,this.showSearch=null,this.showFooter=null,this.scroll=null,this.init()}init(){$.when(this.buildCache()).then(()=>{this.buildScroll(),this.bindEvents(),this.data[this.name].length>0&&this.setData(),this.onCreate()})}destroy(){this.unbindEvents(),this.$el.removeData(),this.onDestroy()}update(){this.buildCache(),this.bindEvents(),this.onUpdate()}buildCache(){if(this.$el=$(this.el),this.$selectHeader=this.$el.find(".select-header"),this.$selectIconContainer=this.$selectHeader.find(".select-icon"),this.name=this.$el.data("name")?this.$el.data("name"):this.opts.name,this.scrollContentHeight=this.$el.data("scrollContentHeight")?this.$el.data("scrollContentHeight"):this.opts.scrollContentHeight,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.type=this.$el.data("type")?this.$el.data("type"):this.opts.type,this.contentOpen=!1,this.$el.data("setData")&&""!=this.$el.data("setData")&&(this.data=this.$el.data("setData")),this.$el.find(".select-search")?this.showSearch=!0:this.showSearch=this.$el.data("showSearch")?this.$el.data("showSearch"):this.opts.showSearch,this.$el.find(".select-footer")?this.showFooter=!0:this.showFooter=this.$el.data("showFooter")?this.$el.data("showFooter"):this.opts.showFooter,!this.items.length)return this.$select=this.$el.find(".select-content"),this.$scrollableContent=this.$select.find(".select-scrollable-content"),this.$selectItems=this.$select.find(".select-item"),this.$selectLabels=this.$select.find("[data-label]"),this.showSearch&&(this.$searchContainer=this.$select.find(".select-search"),this.$searchInput=this.$select.find('[name="select-search"]'),this.$searchIconContainer=this.$select.find(".select-search-icon"),this.$clearSearchButton=this.$select.find("[data-clear-search]")),this.showFooter&&(this.$footerContainer=this.$select.find(".select-footer"),this.$closeButton=this.$select.find("[data-select-close]")),$.each(this.$selectLabels,(t,e)=>{this.searchData.push({id:t,val:$(e).text().trim()})}),this.opts.debug&&(this.debug(this.$el),this.debug(this.$select),this.debug(this.$scrollableContent),this.debug("Name: "+this.name),this.debug("Show search: "+this.showSearch),this.debug("Show footer: "+this.showFooter),this.debug("Scroll content height: "+this.scrollContentHeight+"px"),this.debug(this.items),this.debug(this.searchData)),!0;{let t=this._renderItemList(this.items);this.$select=$(`\n <div class="select-content">\n\n ${this._renderSearch()}\n\n <div class="select-scrollable-content">${t}</div>\n\n ${this._renderFooter()}\n\n </div>\n `),this.$el.append(this.$select),this.$scrollableContent=!!this.$select.find(".select-scrollable-content")&&this.$select.find(".select-scrollable-content"),this.$selectItems=this.$select.find(".select-item"),this.$selectLabels=this.$select.find("[data-label]"),this.showSearch&&(this.$searchContainer=this.$select.find(".select-search"),this.$searchInput=this.$select.find('[name="select-search"]'),this.$searchIconContainer=this.$select.find(".select-search-icon"),this.$clearSearchButton=this.$select.find("[data-clear-search]")),this.showFooter&&(this.$footerContainer=this.$select.find(".select-footer"),this.$closeButton=this.$select.find("[data-select-close]")),$.each(this.$selectLabels,function(t,e){this.searchData.push({id:t,val:$(e).text().trim()})}),this.opts.debug&&(this.debug(this.$el),this.debug(this.$select),this.debug(this.$scrollableContent),this.debug("Name: "+this.name),this.debug("Show search: "+this.showSearch),this.debug("Show footer: "+this.showFooter),this.debug("Scroll content height: "+this.scrollContentHeight+"px"),this.debug(this.items),this.debug(this.searchData))}}buildScroll(){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"}),o||"function"!=typeof this.opts.buildScroll?this.$scrollableContent.css({"overflow-y":"auto"}):"function"==typeof this.opts.buildScroll&&(this.scroll=this.opts.buildScroll(this.$scrollableContent))}}bindEvents(){var t=this;t.$selectHeader.on("click."+c,function(){t.contentOpen?t.close.call(t):t.show.call(t)}),t.$el.on("change."+c,'input[type="checkbox"]',function(){var e=$(this).val();this.checked?-1===t.data[t.name].indexOf(e)&&t.data[t.name].push(e):t.data[t.name]=t.data[t.name].filter(t=>t!=e),t.onSelect(this)}),t.$el.on("change."+c,'input[type="radio"]',function(){var e=$(this).val();this.checked?(t.data[t.name]=e,t.$select.find('input[type="radio"]').not($(this)).prop("checked",!1),t.$select.find('input[type="radio"]').not($(this)).removeClass("checked")):t.data[t.name]=[]}),t.$el.on("click."+c,'input[type="radio"]',function(){$(this).hasClass("checked")?(t.data[t.name]=[],$(this).prop("checked",!1),$(this).removeClass("checked")):$(this).addClass("checked"),t.onSelect(this)}),this.showSearch&&(t.$searchInput.on("keydown."+c,i(function(){t.searchString=$(this).val().trim(),t.search.call(t)},250)),t.$searchInput.on("focusin."+c,function(){t.$searchContainer.addClass("focused")}),t.$searchInput.on("focusout."+c,function(){t.$searchContainer.removeClass("focused")}),t.$clearSearchButton.on("click."+c,function(){t.searchString.length&&(t.$searchInput.val(""),t.searchString="",t.search.call(t))})),this.showFooter&&t.$closeButton.on("click."+c,function(){t.close.call(t)}),$(document).on("touchstart click",function(e){!t.$el.is(e.target)&&0===t.$el.has(e.target).length&&t.contentOpen&&t.close.call(t)})}unbindEvents(){this.$el.off("."+c)}getData(t){return t?this.data[t]:this.data}setData(){var t=this,e=null;if(this.$selectIconContainer.html((this.opts.faPro,"fal")),this.searchApi.length){var n=this.searchApi,i=this.data[this.name].length,o=0;this.data[this.name].forEach(function(t){n+=encodeURIComponent("#"+t),++o!==i&&(n+="+")}),app.request(n).success(function(n){var i=(i=n.map(function(t){if(t.name)var e=t.name;else if(t.label)e=t.label;else if(t.value)e=t.value;return{id:t.id.toString(),label:e}})).filter(function(e){return t.data[t.name].indexOf(e.id)>-1}),o=$(t._renderItemList(i));$.when(t.$scrollableContent.append(o)).then(function(){if(t.scroll&&"function"==typeof t.scroll.update&&t.scroll.update(),t.$select.find(':input[type="checkbox"]').length?e="checkbox":t.$select.find(':input[type="radio"]').length&&(e="radio"),"checkbox"==e)t.data[t.name].forEach(function(e){var n=t.$select.find(":input").filter(function(){return this.value==e});n.prop("checked",!0),t.onSelect(n[0])});else if("radio"==e){var n=t.$select.find(":input").filter(function(){return this.value==t.data[t.name]});n.prop("checked",!0),n.addClass("checked"),t.onSelect(n[0])}})}).get()}else if(t.$select.find(':input[type="checkbox"]').length?e="checkbox":t.$select.find(':input[type="radio"]').length&&(e="radio"),"checkbox"==e)this.data[this.name].forEach(function(e){var n=t.$select.find(":input").filter(function(){return this.value==e});n.prop("checked",!0),t.onSelect(n[0])});else if("radio"==e){var s=t.$select.find(":input").filter(function(){return this.value==t.data[t.name]});s.prop("checked",!0),s.addClass("checked"),t.onSelect(s[0])}}search(){var t=this;if(this.searchString.length)if(this.searchApi.length)this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),app.request(this.searchApi+this.searchString).success(function(e){var n=(n=(n=e.map(function(t){return{id:t.id.toString(),label:t.name||t.label||t.value||null}})).filter(function(e){return!(t.data[t.name].indexOf(e.id)>-1)})).filter(function(t){return[0].indexOf(t.id)>-1}),i=$(t._renderItemList(n));$.when(t.$scrollableContent.append(i)).then(function(){this.scroll&&"function"==typeof this.scroll.update&&this.scroll.update()})}).get();else{var e=this.searchData.filter(function(e){return e.val.toLocaleLowerCase().indexOf(t.searchString.toLocaleLowerCase())>-1});this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),e.forEach(function(e){$(t.$selectItems[e.id]).addClass("visible")}),this.$selectItems.not(".visible").addClass("d-none"),this.$searchIconContainer.html((this.opts.faPro,"fal")),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((this.opts.faPro,"fal")),this.$searchIconContainer.attr("data-clear-search","")):(this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),this.$searchIconContainer.html((this.opts.faPro,"fal")),this.$searchIconContainer.attr("data-clear-search",""));this.scroll&&"function"==typeof this.scroll.update&&this.scroll.update(),this.onUpdate()}show(){if(!this.$el.hasClass("show")){var t=$(".select.show");if(t.length)var e=parseInt(t.first().css("z-index"),10)+2;if(this.$el.css({"max-height":this.scrollContentHeight+this.$selectHeader.outerHeight(!0)+"px"}),this.$el.addClass("show"),!t.length)e=parseInt(this.$el.css("z-index"),10)+1;this.$el.css({"z-index":e}),this.scroll&&"function"==typeof this.scroll.show&&this.scroll.update(),this.$selectIconContainer.html(`<i class="${this.opts.faPro?"fal":"fas"} fa-angle-up"></i`),this.contentOpen=!0,this.onShow()}}close(){var t=this;this.$el.css("max-height",""),this.$el.removeClass("show"),setTimeout(()=>{t.$el.removeAttr("style")},300),this.data[this.name].length>0?this.$selectIconContainer.html(`<i class="${this.opts.faPro?"fal":"fas"} fa-check text-green icon"></i>`):this.$selectIconContainer.html(`<i class="${this.opts.faPro?"fal":"fas"} fa-angle-down"></i>`),this.contentOpen=!1,this.onClose()}onSelect(t){var e=this.opts.onSelect;"function"==typeof e&&e.call(t)}_renderItemList(t){let e="";for(let n=0;n<t.length;++n)e+=`\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[n].id}" value="${t[n].id}">\n\n <label for="select-${this.name}-${t[n].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" data-label>\n ${t[n].label}\n </span>\n\n </label>\n\n </div>\n\n </div>\n\n </div>\n `}_renderSearch(){return this.showSearch?`\n <div class="select-search">\n\n <div class="select-search-input">\n\n <input type="text" name="select-search" value="" placeholder="${this.opts.searchPlaceholder}">\n\n </div>\n\n <div class="select-search-icon">\n\n <i class="${this.opts.faPro?"fal":"fas"} fa-search icon"></i>\n\n </div>\n\n </div>\n `:""}_renderFooter(){return this.showFooter?`\n <div class="select-footer">\n\n <button class="btn btn-primary" type="button" data-select-close>\n ${this.opts.btnCloseText}\n </button>\n\n </div>\n `:""}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(u);if(e||(e=new h(this,"object"==typeof t&&t),$(this).data(u,e)),"string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}if("undefined"!=typeof $){const t=$.fn[c];$.fn[c]=h._jQueryInterface,$.fn[c].Constructor=h,$.fn[c].noConflict=(()=>($.fn[c]=t,h._jQueryInterface)),$.fn[c].defaults={name:"",type:"checkbox",scrollContentHeight:100,faPro:!1,items:[],showSearch:!1,showFooter:!1,searchApi:!1,onCreate:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onSearch:null,onSelect:null,buildScroll:null,searchPlaceholder:null,btnCloseText:null,debug:!1}}const d="coolDropdown",p="plugin_coolDropdown";class f extends s{constructor(t,e){super(),this.el=t,this.opts=$.extend({},$.fn[d].defaults,e),this.init()}init(){$.when(this.buildCache()).then(()=>{this.buildScroll(),this.bindEvents(),this.onCreate()})}destroy(){this.unbindEvents(),this.$el.removeData(),this.onDestroy()}update(){this.buildCache(),this.onUpdate()}buildCache(){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.template=this.$el.data("template")?this.$el.data("template"):this.opts.template,this.templateAttrs=this.$el.data("templateAttrs")?this.$el.data("templateAttrs"):this.opts.templateAttrs,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.closeOnItemClick=this.$el.data("closeOnItemClick")?this.$el.data("closeOnItemClick"):this.opts.closeOnItemClick,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.opts.template)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.opts.debug&&(this.debug(this.$el),this.debug(this.$container),this.debug(this.$dropdown),this.debug(this.$scrollableContent),this.debug("Id: "+this.id),this.debug("Animation: "+this.animation),this.debug("Animation in: "+this.animationIn),this.debug("Animation out: "+this.animationOut),this.debug("Animation speed: "+this.animationSpeed),this.debug("Offset: "+this.offset),this.debug("Min width: "+this.minWidth),this.debug("Template: "+this.template),this.debug(this.templateAttrs),this.debug("Scroll: "+this.scroll),this.debug("Scroll content height: "+this.scrollContentHeight+"px")),!0;{let t="end"===this.opts.align?" dropdown-menu-right":"";this.$dropdown=$(`<div class="dropdown-menu${t}" id="${this.id}">${this.template()}</div>`),$.when(this.$el.after(this.$dropdown)).then(()=>(this.$scrollableContent=!!this.$dropdown.find(".dropdown-scrollable-content")&&this.$dropdown.find(".dropdown-scrollable-content"),this.$dropdown.hasClass("dropdown-menu-right")?this.align="end":this.align="start",this.$dropdownItem=this.$dropdown.find(".dropdown-item"),this.minWidth&&this.$dropdown.css("min-width",this.minWidth+"px"),this.opts.debug&&(this.debug(this.$el),this.debug(this.$container),this.debug(this.$dropdown),this.debug(this.$scrollableContent),this.debug("Id: "+this.id),this.debug("Animation: "+this.animation),this.debug("Animation in: "+this.animationIn),this.debug("Animation out: "+this.animationOut),this.debug("Animation speed: "+this.animationSpeed),this.debug("Offset: "+this.offset),this.debug("Min width: "+this.minWidth),this.debug("Template: "+this.template),this.debug(this.templateAttrs),this.debug("Scroll: "+this.scroll),this.debug("Scroll content height: "+this.scrollContentHeight+"px")),!0))}}buildScroll(){this.opts.scroll&&this.$scrollableContent.length&&(this.$scrollableContent.css({"max-height":this.scrollContentHeight+"px"}),o||"function"!=typeof this.opts.buildScroll?this.$scrollableContent.css({"overflow-y":"auto"}):"function"==typeof this.opts.buildScroll&&(this.scroll=this.opts.buildScroll(this.$scrollableContent)))}bindEvents(){var t=this;this.$el.on("click."+d,()=>{this.contentOpen?this.close():this.show()}),this.$dropdownItem.on("click."+d,function(){t.closeOnItemClick&&t.close(),t.onItemClick(this)}),$(document).on("touchstart click",t=>{this.$el.is(t.target)||this.$dropdown.is(t.target)||0!==this.$dropdown.has(t.target).length||!this.contentOpen||this.close()}),$(window).on("resize",i(()=>{this.setPosition(),this.onUpdate()},250))}unbindEvents(){this.$el.off("."+d)}generateUUID(){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)})}setPosition(t){"undefined"!=typeof str&&null!==str||(t=this.placement);var e=this.$dropdown.outerWidth(!0),n=this.$dropdown.outerHeight(!0),i=this.$el.outerWidth(!0),o=this.$el.outerHeight(!0),s=this.$el.position().left,r=this.$el.position().top;if("top"===t){if("end"===this.align)var a=i-e;else a=s;var l=r-n}else if("right"===t)a=s+i,l=r;else if("bottom"===t){if("end"===this.align)a=i-e;else a=s;l=r+o}else if("left"===t)a=s-e,l=r;if(this.offset){var c=this.offset.split(","),u=c[0],h=c[1];a+=parseInt(u,10),l+=parseInt(h,10)}this.$dropdown.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+Math.round(a)+"px, "+Math.round(l)+"px, 0px)","will-change":"transform"}),this.opts.debug&&(this.debug("Dropdown trigger width: "+i+"px"),this.debug("Dropdown trigger height: "+o+"px"),this.debug("Dropdown trigger position x: "+s+"px"),this.debug("Dropdown trigger position Y: "+r+"px"),this.debug("Dropdown width: "+e+"px"),this.debug("Dropdown height: "+n+"px"),this.debug("Dropdown position x: "+a+"px"),this.debug("Dropdown position y: "+l+"px"))}show(){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.scroll&&"function"==typeof this.scroll.show&&this.scroll.update(),this.contentOpen=!0,this.onShow())}close(){this.$dropdown&&(this.animation&&!this.$dropdown.hasClass("animated")?this.$dropdown.animateCss(this.animationOut,()=>{this.$dropdown.removeClass("show"),this.$el.removeAttr("data-dropdown")}):(this.$dropdown.removeClass("show"),this.$el.removeAttr("data-dropdown")),this.contentOpen=!1,this.onClose())}onItemClick(t){var e=this.opts.onItemClick;"function"==typeof e&&e.call(t)}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(p);if(e||(e=new f(this,"object"==typeof t&&t),$(this).data(p,e)),"string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}if("undefined"!=typeof $){const t=$.fn[d];$.fn[d]=f._jQueryInterface,$.fn[d].Constructor=f,$.fn[d].noConflict=(()=>($.fn[d]=t,f._jQueryInterface)),$.fn[d].defaults={animation:!0,animationIn:"zoomIn",animationOut:"zoomOut",animationSpeed:"fastest",offset:null,minWidth:null,align:"start",closeOnItemClick:!0,template:!1,templateAttrs:{},scroll:!0,scrollContentHeight:100,onCreate:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onItemClick:null,debug:!1}}const g="coolTooltip",m="plugin_coolTooltip";class v extends s{constructor(t,e){super(),this.el=t,this.opts=$.extend({},$.fn[g].defaults,e),this.init()}init(){this.buildCache(),this.bindEvents(),this.onCreate()}destroy(){this.unbindEvents(),this.$el.removeData(),this.onDestroy()}update(){this.buildCache(),this.onUpdate()}buildCache(){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.content=this.$el.data("content")?this.$el.data("content"):this.opts.content}bindEvents(){this.$el.on("mouseenter."+g,()=>{this.show()}),this.$el.on("mouseleave."+g,()=>{this.close()}),$(window).on("resize",i(()=>{this.$tooltip&&(this.setPosition(),this.onUpdate())},250))}unbindEvents(){this.$el.off("."+g)}generateUUID(){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)})}buildTooltip(){this.$tooltip=$(`\n <div class="tooltip tooltip-${this.placement}" role="tooltip" id="${this.id}">\n\n <div class="arrow"></div>\n\n <div class="tooltip-inner">${this.content}</div>\n\n </div>\n `),this.$container.append(this.$tooltip),this.$arrow=this.$tooltip.find(".arrow"),this.opts.debug&&(this.debug(this.$el),this.debug(this.$container),this.debug(this.$tooltip),this.debug(this.$arrow),this.debug("Id: "+this.id),this.debug("Animation: "+this.animation),this.debug("Animation in: "+this.animationIn),this.debug("Animation out: "+this.animationOut),this.debug("Animation speed: "+this.animationSpeed),this.debug("Placement: "+this.placement),this.debug("Content: "+this.content))}setPosition(t){"undefined"!=typeof str&&null!==str||(t=this.placement);var e=this.$tooltip.outerWidth(!0),n=this.$tooltip.outerHeight(!0),i=this.$el.outerWidth(),o=this.$el.outerHeight(),s=this.$el.offset().left,r=this.$el.offset().top,a=this.$arrow.outerWidth(!0),l=this.$arrow.outerHeight(!0);if("top"===t){var c=Math.round(s-(e-i)/2),u=Math.round(r-n),h=Math.round(e/2-a/2);this.$arrow.css({left:h+"px"})}else if("right"===t){c=Math.round(s+i),u=Math.round(r-(n-o)/2),h=Math.round(n/2-l/2);this.$arrow.css({top:h+"px"})}else if("bottom"===t){c=Math.round(s-(e-i)/2),u=Math.round(r+o),h=Math.round(e/2-a/2);this.$arrow.css({left:h+"px"})}else if("left"===t){c=Math.round(s-e),u=Math.round(r-(n-o)/2),h=Math.round(n/2-l/2);this.$arrow.css({top:h+"px"})}this.$tooltip.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+c+"px, "+u+"px, 0px)","will-change":"transform"}),this.opts.debug&&(this.debug("Tooltip trigger width: "+i+"px"),this.debug("Tooltip trigger height: "+o+"px"),this.debug("Tooltip trigger position x: "+s+"px"),this.debug("Tooltip trigger position Y: "+r+"px"),this.debug("Tooltip width: "+e+"px"),this.debug("Tooltip height: "+n+"px"),this.debug("Tooltip position x: "+c+"px"),this.debug("Tooltip position y: "+u+"px"))}show(){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())}close(){this.$tooltip&&(this.animation&&!this.$tooltip.hasClass("animated")?this.$tooltip.animateCss(this.animationOut,()=>{this.$tooltip.remove(),this.$el.removeAttr("data-tooltip"),this.$tooltip=null,this.onClose()}):(this.$tooltip.remove(),this.$el.removeAttr("data-tooltip"),this.$tooltip=null,this.onClose()))}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(m);if(e||(e=new v(this,"object"==typeof t&&t),$(this).data(m,e)),"string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}if("undefined"!=typeof $){const t=$.fn[g];$.fn[g]=v._jQueryInterface,$.fn[g].Constructor=v,$.fn[g].noConflict=(()=>($.fn[g]=t,v._jQueryInterface)),$.fn[g].defaults={container:"body",animation:!1,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",placement:"bottom",content:"",onCreate:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}const y="coolSectionTabs",b="plugin_coolSectionTabs";class x extends s{constructor(t,e){super(),this.el=t,this.opts=$.extend({},$.fn[y].defaults,e),this.init()}init(){this.buildCache(),this.bindEvents(),this.onCreate()}destroy(){this.unbindEvents(),this.$el.removeData(),this.onDestroy()}update(){this.buildCache(),this.onUpdate()}buildCache(){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.opts.debug&&(this.debug(this.$el),this.debug(this.$dropdownContainer),this.debug(this.$dropdownList),this.debug(this.tabsCount))}bindEvents(){var t=this;$(window).on("resize",i(function(){t.checkForChanges.call(t)},250)).trigger("resize")}unbindEvents(){this.$el.off("."+this._name)}moveToList(t){$(t).insertBefore(this.$dropdownContainer),this.checkForChanges()}moveToDropdown(t){$(t).appendTo(this.$dropdownList),this.checkForChanges()}overflowStatus(){return this.$el[0].offsetWidth<this.$el[0].scrollWidth}checkForChanges(){var t=this.$dropdownList.children(),e=this.$el.find("> .tab-item").not(this.$dropdownContainer),n=this.$el.find("> .tab-item:visible"),i=0;$.each(n,function(t,e){i+=$(e).outerWidth(!0)});var o=this.$el[0].offsetWidth-i;t.length>0?this.$dropdownContainer.hasClass("visible")||this.$dropdownContainer.addClass("visible"):this.$dropdownContainer.hasClass("visible")&&this.$dropdownContainer.removeClass("visible"),1==this.overflowStatus()?e.length>0&&this.moveToDropdown(e.last()):t.length>0&&o>t.last().data("width")&&this.moveToList(t.last())}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(b);if(e||(e=new CoolPopover(this,"object"==typeof t&&t),$(this).data(b,e)),"string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}if("undefined"!=typeof $){const t=$.fn[y];$.fn[y]=x._jQueryInterface,$.fn[y].Constructor=x,$.fn[y].noConflict=(()=>($.fn[y]=t,x._jQueryInterface)),$.fn[y].defaults={onCreate:null,onUpdate:null,onDestroy:null,debug:!1}}const w="coolCollapse",C="plugin_coolCollapse";class T extends s{constructor(t,e){super(),this.el=t,this.opts=$.extend({},$.fn[w].defaults,e),this.init()}init(){$(this.el).on("click",function(t){t.preventDefault();var e=$(this),n=$(this).attr("data-target"),i=$(document).find(n),o=$(i).height(),s=$(document).find('[data-collapse-indicator="'+n+'"]'),r=$(i).closest(".section-collapse");s.length||(s=$(e).parent().find("[data-collapse-indicator]")),i.length||(i=$(e).parent().find(".collapse"),o=$(i).height()),$(i).removeClass("collapse visible"),$(i).addClass("collapsing"),$(e).hasClass("target-collapsed")?($(e).is("button")&&$(e).attr("disabled",!0),r.length&&$(r).removeClass("collapsed"),$(i).css("height",$(i).height()),setTimeout(function(){$(i).css("height",0)},10),s.length&&$(s).hasClass("collapsed")&&$(s).removeClass("collapsed")):($(e).is("button")&&$(e).attr("disabled",!0),r.length&&$(r).addClass("collapsed"),$(i).css("height"),$(i).css("height",o),s.length&&$(s).addClass("collapsed"));var a=function(){var t=document.createElement("text-transition"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return e[n]}();$(i).one(a,function(){$(i).removeClass("collapsing"),$(e).hasClass("target-collapsed")?($(e).is("button")&&$(e).attr("disabled",!1),$(i).removeAttr("style"),$(i).addClass("collapse"),$(e).removeClass("target-collapsed")):($(e).is("button")&&$(e).attr("disabled",!1),$(i).removeAttr("style"),$(i).addClass("collapse visible"),$(e).addClass("target-collapsed"),$(i).css("height","auto"))})})}static _jQueryInterface(t){return this.each(function(){let e=$(this).data(C);if(e||(e=new T(this,"object"==typeof t&&t),$(this).data(C,e)),"string"==typeof t){if("undefined"==typeof e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}if("undefined"!=typeof $){const t=$.fn[w];$.fn[w]=T._jQueryInterface,$.fn[w].Constructor=T,$.fn[w].noConflict=(()=>($.fn[w]=t,T._jQueryInterface)),$.fn[w].defaults={}}return{Common:n,Popover:l,Select:h,Dropdown:f,Tooltip:v,SectionTabs:x,Collapse:T}});
|
|
8
|
+
* perfect-scrollbar v1.4.0
|
|
9
|
+
* (c) 2018 Hyunje Jun
|
|
10
|
+
* @license MIT
|
|
11
|
+
*/function t(t){return getComputedStyle(t)}function e(t,e){for(var o in e){var i=e[o];"number"==typeof i&&(i+="px"),t.style[o]=i}return t}function o(t){var e=document.createElement("div");return e.className=t,e}var i="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function n(t,e){if(!i)throw new Error("No element matching method supported");return i.call(t,e)}function s(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function l(t,e){return Array.prototype.filter.call(t.children,function(t){return n(t,e)})}var a={main:"ps",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},r={x:null,y:null};function h(t,e){var o=t.element.classList,i=a.state.scrolling(e);o.contains(i)?clearTimeout(r[e]):o.add(i)}function c(t,e){r[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(a.state.scrolling(e))},t.settings.scrollingThreshold)}var d=function(t){this.element=t,this.handlers={}},p={isEmpty:{configurable:!0}};d.prototype.bind=function(t,e){"undefined"==typeof this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},d.prototype.unbind=function(t,e){var o=this;this.handlers[t]=this.handlers[t].filter(function(i){return!(!e||i===e)||(o.element.removeEventListener(t,i,!1),!1)})},d.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},p.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(d.prototype,p);var u=function(){this.eventElements=[]};function f(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}u.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new d(t),this.eventElements.push(e)),e},u.prototype.bind=function(t,e,o){this.eventElement(t).bind(e,o)},u.prototype.unbind=function(t,e,o){var i=this.eventElement(t);i.unbind(e,o),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},u.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},u.prototype.once=function(t,e,o){var i=this.eventElement(t);i.bind(e,function t(n){i.unbind(e,t),o(n)})};var g=function(t,e,o,i,n){var s;if(void 0===i&&(i=!0),void 0===n&&(n=!1),"top"===e)s=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");s=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,o,i,n){var s=o[0],l=o[1],a=o[2],r=o[3],d=o[4],p=o[5];void 0===i&&(i=!0);void 0===n&&(n=!1);var u=t.element;t.reach[r]=null,u[a]<1&&(t.reach[r]="start");u[a]>t[s]-t[l]-1&&(t.reach[r]="end");e&&(u.dispatchEvent(f("ps-scroll-"+r)),e<0?u.dispatchEvent(f("ps-scroll-"+d)):e>0&&u.dispatchEvent(f("ps-scroll-"+p)),i&&function(t,e){h(t,e),c(t,e)}(t,r));t.reach[r]&&(e||n)&&u.dispatchEvent(f("ps-"+r+"-reach-"+t.reach[r]))}(t,o,s,i,n)};function m(t){return parseInt(t,10)||0}var v={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},b=function(t){var o=t.element,i=Math.floor(o.scrollTop);t.containerWidth=o.clientWidth,t.containerHeight=o.clientHeight,t.contentWidth=o.scrollWidth,t.contentHeight=o.scrollHeight,o.contains(t.scrollbarXRail)||(l(o,a.element.rail("x")).forEach(function(t){return s(t)}),o.appendChild(t.scrollbarXRail)),o.contains(t.scrollbarYRail)||(l(o,a.element.rail("y")).forEach(function(t){return s(t)}),o.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=w(t,m(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=m((t.negativeScrollAdjustment+o.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=w(t,m(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=m(i*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,o){var i={width:o.railXWidth},n=Math.floor(t.scrollTop);o.isRtl?i.left=o.negativeScrollAdjustment+t.scrollLeft+o.containerWidth-o.contentWidth:i.left=t.scrollLeft;o.isScrollbarXUsingBottom?i.bottom=o.scrollbarXBottom-n:i.top=o.scrollbarXTop+n;e(o.scrollbarXRail,i);var s={top:n,height:o.railYHeight};o.isScrollbarYUsingRight?o.isRtl?s.right=o.contentWidth-(o.negativeScrollAdjustment+t.scrollLeft)-o.scrollbarYRight-o.scrollbarYOuterWidth:s.right=o.scrollbarYRight-t.scrollLeft:o.isRtl?s.left=o.negativeScrollAdjustment+t.scrollLeft+2*o.containerWidth-o.contentWidth-o.scrollbarYLeft-o.scrollbarYOuterWidth:s.left=o.scrollbarYLeft+t.scrollLeft;e(o.scrollbarYRail,s),e(o.scrollbarX,{left:o.scrollbarXLeft,width:o.scrollbarXWidth-o.railBorderXWidth}),e(o.scrollbarY,{top:o.scrollbarYTop,height:o.scrollbarYHeight-o.railBorderYWidth})}(o,t),t.scrollbarXActive?o.classList.add(a.state.active("x")):(o.classList.remove(a.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,o.scrollLeft=0),t.scrollbarYActive?o.classList.add(a.state.active("y")):(o.classList.remove(a.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,o.scrollTop=0)};function w(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function x(t,e){var o=e[0],i=e[1],n=e[2],s=e[3],l=e[4],r=e[5],d=e[6],p=e[7],u=e[8],f=t.element,g=null,m=null,$=null;function v(e){f[d]=g+$*(e[n]-m),h(t,p),b(t),e.stopPropagation(),e.preventDefault()}function w(){c(t,p),t[u].classList.remove(a.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",v)}t.event.bind(t[l],"mousedown",function(e){g=f[d],m=e[n],$=(t[i]-t[o])/(t[s]-t[r]),t.event.bind(t.ownerDocument,"mousemove",v),t.event.once(t.ownerDocument,"mouseup",w),t[u].classList.add(a.state.clicking),e.stopPropagation(),e.preventDefault()})}var C={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var o=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=o*t.containerHeight,b(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var o=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=o*t.containerWidth,b(t),e.stopPropagation()})},"drag-thumb":function(t){x(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),x(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(o){if(!(o.isDefaultPrevented&&o.isDefaultPrevented()||o.defaultPrevented)&&(n(e,":hover")||n(t.scrollbarX,":focus")||n(t.scrollbarY,":focus"))){var i,s=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(s){if("IFRAME"===s.tagName)s=s.contentDocument.activeElement;else for(;s.shadowRoot;)s=s.shadowRoot.activeElement;if(n(i=s,"input,[contenteditable]")||n(i,"select,[contenteditable]")||n(i,"textarea,[contenteditable]")||n(i,"button,[contenteditable]"))return}var l=0,a=0;switch(o.which){case 37:l=o.metaKey?-t.contentWidth:o.altKey?-t.containerWidth:-30;break;case 38:a=o.metaKey?t.contentHeight:o.altKey?t.containerHeight:30;break;case 39:l=o.metaKey?t.contentWidth:o.altKey?t.containerWidth:30;break;case 40:a=o.metaKey?-t.contentHeight:o.altKey?-t.containerHeight:-30;break;case 32:a=o.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==l||t.settings.suppressScrollY&&0!==a||(e.scrollTop-=a,e.scrollLeft+=l,b(t),function(o,i){var n=Math.floor(e.scrollTop);if(0===o){if(!t.scrollbarYActive)return!1;if(0===n&&i>0||n>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var s=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===s&&o<0||s>=t.contentWidth-t.containerWidth&&o>0)return!t.settings.wheelPropagation}return!0}(l,a)&&o.preventDefault())}})},wheel:function(e){var o=e.element;function i(i){var n=function(t){var e=t.deltaX,o=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof o||(e=-1*t.wheelDeltaX/6,o=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,o*=10),e!=e&&o!=o&&(e=0,o=t.wheelDelta),t.shiftKey?[-o,-e]:[e,o]}(i),s=n[0],l=n[1];if(!function(e,i,n){if(!v.isWebKit&&o.querySelector("select:focus"))return!0;if(!o.contains(e))return!1;for(var s=e;s&&s!==o;){if(s.classList.contains(a.element.consuming))return!0;var l=t(s);if([l.overflow,l.overflowX,l.overflowY].join("").match(/(scroll|auto)/)){var r=s.scrollHeight-s.clientHeight;if(r>0&&!(0===s.scrollTop&&n>0||s.scrollTop===r&&n<0))return!0;var h=s.scrollWidth-s.clientWidth;if(h>0&&!(0===s.scrollLeft&&i<0||s.scrollLeft===h&&i>0))return!0}s=s.parentNode}return!1}(i.target,s,l)){var r=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(l?o.scrollTop-=l*e.settings.wheelSpeed:o.scrollTop+=s*e.settings.wheelSpeed,r=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(s?o.scrollLeft+=s*e.settings.wheelSpeed:o.scrollLeft-=l*e.settings.wheelSpeed,r=!0):(o.scrollTop-=l*e.settings.wheelSpeed,o.scrollLeft+=s*e.settings.wheelSpeed),b(e),(r=r||function(t,i){var n=Math.floor(o.scrollTop),s=0===o.scrollTop,l=n+o.offsetHeight===o.scrollHeight,a=0===o.scrollLeft,r=o.scrollLeft+o.offsetWidth===o.scrollWidth;return!(Math.abs(i)>Math.abs(t)?s||l:a||r)||!e.settings.wheelPropagation}(s,l))&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault())}}"undefined"!=typeof window.onwheel?e.event.bind(o,"wheel",i):"undefined"!=typeof window.onmousewheel&&e.event.bind(o,"mousewheel",i)},touch:function(e){if(v.supportsTouch||v.supportsIePointer){var o=e.element,i={},n=0,s={},l=null;v.supportsTouch?(e.event.bind(o,"touchstart",d),e.event.bind(o,"touchmove",p),e.event.bind(o,"touchend",u)):v.supportsIePointer&&(window.PointerEvent?(e.event.bind(o,"pointerdown",d),e.event.bind(o,"pointermove",p),e.event.bind(o,"pointerup",u)):window.MSPointerEvent&&(e.event.bind(o,"MSPointerDown",d),e.event.bind(o,"MSPointerMove",p),e.event.bind(o,"MSPointerUp",u)))}function r(t,i){o.scrollTop-=i,o.scrollLeft-=t,b(e)}function h(t){return t.targetTouches?t.targetTouches[0]:t}function c(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function d(t){if(c(t)){var e=h(t);i.pageX=e.pageX,i.pageY=e.pageY,n=(new Date).getTime(),null!==l&&clearInterval(l)}}function p(l){if(c(l)){var d=h(l),p={pageX:d.pageX,pageY:d.pageY},u=p.pageX-i.pageX,f=p.pageY-i.pageY;if(function(e,i,n){if(!o.contains(e))return!1;for(var s=e;s&&s!==o;){if(s.classList.contains(a.element.consuming))return!0;var l=t(s);if([l.overflow,l.overflowX,l.overflowY].join("").match(/(scroll|auto)/)){var r=s.scrollHeight-s.clientHeight;if(r>0&&!(0===s.scrollTop&&n>0||s.scrollTop===r&&n<0))return!0;var h=s.scrollLeft-s.clientWidth;if(h>0&&!(0===s.scrollLeft&&i<0||s.scrollLeft===h&&i>0))return!0}s=s.parentNode}return!1}(l.target,u,f))return;r(u,f),i=p;var g=(new Date).getTime(),m=g-n;m>0&&(s.x=u/m,s.y=f/m,n=g),function(t,i){var n=Math.floor(o.scrollTop),s=o.scrollLeft,l=Math.abs(t),a=Math.abs(i);if(a>l){if(i<0&&n===e.contentHeight-e.containerHeight||i>0&&0===n)return 0===window.scrollY&&i>0&&v.isChrome}else if(l>a&&(t<0&&s===e.contentWidth-e.containerWidth||t>0&&0===s))return!0;return!0}(u,f)&&l.preventDefault()}}function u(){e.settings.swipeEasing&&(clearInterval(l),l=setInterval(function(){e.isInitialized?clearInterval(l):s.x||s.y?Math.abs(s.x)<.01&&Math.abs(s.y)<.01?clearInterval(l):(r(30*s.x,30*s.y),s.x*=.8,s.y*=.8):clearInterval(l)},10))}}},y=function(i,n){var s=this;if(void 0===n&&(n={}),"string"==typeof i&&(i=document.querySelector(i)),!i||!i.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var l in this.element=i,i.classList.add(a.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},n)s.settings[l]=n[l];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var r,h,c=function(){return i.classList.add(a.state.focus)},d=function(){return i.classList.remove(a.state.focus)};this.isRtl="rtl"===t(i).direction,this.isNegativeScroll=(h=i.scrollLeft,i.scrollLeft=-1,r=i.scrollLeft<0,i.scrollLeft=h,r),this.negativeScrollAdjustment=this.isNegativeScroll?i.scrollWidth-i.clientWidth:0,this.event=new u,this.ownerDocument=i.ownerDocument||document,this.scrollbarXRail=o(a.element.rail("x")),i.appendChild(this.scrollbarXRail),this.scrollbarX=o(a.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",c),this.event.bind(this.scrollbarX,"blur",d),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var p=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(p.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=m(p.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=m(p.borderLeftWidth)+m(p.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=m(p.marginLeft)+m(p.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=o(a.element.rail("y")),i.appendChild(this.scrollbarYRail),this.scrollbarY=o(a.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",c),this.event.bind(this.scrollbarY,"blur",d),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var f=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(f.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=m(f.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var o=t(e);return m(o.width)+m(o.paddingLeft)+m(o.paddingRight)+m(o.borderLeftWidth)+m(o.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=m(f.borderTopWidth)+m(f.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=m(f.marginTop)+m(f.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:i.scrollLeft<=0?"start":i.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:i.scrollTop<=0?"start":i.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return C[t](s)}),this.lastScrollTop=Math.floor(i.scrollTop),this.lastScrollLeft=i.scrollLeft,this.event.bind(this.element,"scroll",function(t){return s.onScroll(t)}),b(this)};y.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:""}))},y.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)},y.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)},y.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},$.fn.extend({animateCss:function(t,e){var o="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";this.addClass("animated "+t).one(o,function(o){$(this).removeClass("animated "+t),e&&e()}).children().on(o,function(t){t.stopPropagation()})}}),window.Cool=window.Cool||{},window.Cool.settings=window.Cool.settings||{};var S=function(){function t(){}return t.initialize=function(t){t=t||{},window.Cool.settings=t,$('[data-toggle="popover"]').coolPopover(t.popover),$('[data-toggle="select"]').coolSelect(t.select),$('[data-toggle="dropdown"]').coolDropdown(t.dropdown),$('[data-toggle="tooltip"]').coolTooltip(t.tooltip),$('[data-toggle="collapse"]').coolCollapse(t.collapse),$('[data-toggle="section-tabs"]').coolSectionTabs(t.sectionTabs),$("body").coolToast(t.toast),$("body").coolDialog(t.dialog),$("html").addClass("dom-ready"),$(document).on("focus",".form-control",function(){if(!$(this).hasClass("disabled")&&$(this).not(":disabled")&&!$(this).attr("readonly")){var t=$(this).closest(".input-group");t.hasClass("input-group-focus")||t.addClass("input-group-focus")}}),$(document).on("blur",".form-control",function(){if(!$(this).hasClass("disabled")&&$(this).not(":disabled")&&!$(this).attr("readonly")){var t=$(this).closest(".input-group");t.hasClass("input-group-focus")&&t.removeClass("input-group-focus")}}),$(".form-label-group").each(function(t,e){$(e).find("input").on("blur input change",function(){$(this).val()?$(e).addClass("label-on-top"):$(e).removeClass("label-on-top")}).trigger("change")}),$.each($(".table"),function(){$(this).find("[data-table-link], [data-table-btn]").length&&!$(this).hasClass("table-hover")&&$(this).addClass("table-hover")}),$(document).on("click","[data-table-link]",function(t){var e=$(this).parents("table, .table"),o=$(this).data("tableLink"),i=$(t.target),n=!1;$.each(["input","button","a","label","td.col-select"],function(t){(i.is(t)||"a"==t&&i.parent().is(t))&&(n=!0)}),e.hasClass("bulk-actions-active")&&(n=!0),i.is("td, .td, img")&&!n&&(t.ctrlKey||t.metaKey?window.open(o,"_blank"):window.location.href=o)}),$(document).on("click","[data-table-btn]",function(t){var e=$(this).parents("table, .table"),o=$(this),i=$(this).data("tableButton"),n=$(t.target),s=!1;(i||(i=o.find("button")[0]))&&($.each(["input","button","a","label","td.col-select"],function(t){(n.is(t)||"a"==t&&n.parent().is(t))&&(s=!0)}),e.hasClass("bulk-actions-active")&&(s=!0),n.is("td, .td, img")&&!s&&$(i).click())}),$("select").on("change",function(){$(this).blur()}),$(".tab-toggler").on("click",function(t){t.stopPropagation(),$(this).parent().toggleClass("open")}),$(document).on("click",function(){$(".tabs-container").removeClass("open")}),$(".sidebar-left-toggler").on("click",function(t){t.stopPropagation(),$(this).toggleClass("open"),$("body").toggleClass("sidebar-left-open")}),$(".sidebar-right-toggler").on("click",function(t){t.stopPropagation(),$(this).toggleClass("open"),$("body").toggleClass("sidebar-right-open")}),$(".sidebar-content .ps__thumb-y").mousedown(function(){$(this).parent().parent().addClass("ps-mousedown-scroll")}),$(document).mouseup(function(){$(".sidebar-content").hasClass("ps-mousedown-scroll")&&$(".sidebar-content").removeClass("ps-mousedown-scroll")});var e=$(".sidebar-left").find(".sidebar-content");if(e.length)new y(e[0],{wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0});var o=$(document).find(".sidebar-tab");o.length&&($.each(o,function(t,e){var o=$(e).find(".tab-content");new y(o[0],{wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0})}),$('[name="sidebar-tab-select"]').on("click",function(){var t=$(this).val(),e=$("#sidebar-tab-"+t);o.not(e).removeClass("active"),e.addClass("active"),$('[name="sidebar-tab-select"]').not($(this)).removeClass("active"),$(this).addClass("active"),e[0]==o.first()[0]?o.not(e).find(".tab-content").css({transform:"translate3d(100%, 0px, 0px)"}):e[0]==o.last()[0]?o.not(e).find(".tab-content").css({transform:"translate3d(-100%, 0px, 0px)"}):(o.first().not(e).find(".tab-content").css({transform:"translate3d(-100%, 0px, 0px)"}),o.last().not(e).find(".tab-content").css({transform:"translate3d(100%, 0px, 0px)"})),e.find(".tab-content").css({transform:"none"})}))},t}();function I(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}window.Cool.initialize=S.initialize;var T=function(t,e,o){var i;return function(){var n=this,s=arguments,l=o&&!i;clearTimeout(i),i=setTimeout(function(){i=null,o||t.apply(n,s)},e),l&&t.apply(n,s)}},P=function(){var t=!1;return("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(t=!0),t},Y=function(){function t(){}var e=t.prototype;return e.onInit=function(){var t=this.opts.onInit;"function"==typeof t&&t.call(this.el)},e.onUpdate=function(){var t=this.opts.onUpdate;"function"==typeof t&&t.call(this.el)},e.onDestroy=function(){var t=this.opts.onDestroy;"function"==typeof t&&t.call(this.el)},e.onShow=function(){var t=this.opts.onShow;"function"==typeof t&&t.call(this.el)},e.onClose=function(){var t=this.opts.onClose;"function"==typeof t&&t.call(this.el)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},t}(),k="coolPopover",H="plugin_coolPopover",X=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.popover?$.extend(!0,i.opts,$.fn[k].defaults,window.Cool.settings.popover,o):$.extend(!0,i.opts,$.fn[k].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData(H),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.id="popover-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.trigger=this.$el.data("trigger")?this.$el.data("trigger"):this.opts.trigger,this.placement=this.$el.data("placement")?this.$el.data("placement"):this.opts.placement,this.placementChanged=!1,this.title=this.$el.data("title")?this.$el.data("title"):this.opts.title,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content},o.bindEvents=function(){var t=this;"click"===this.trigger?this.$el.on("click."+k,function(){t.$popover?t.close():t.show()}):"hover"===this.trigger?(this.$el.on("mouseenter."+k,function(){t.show()}),this.$el.on("mouseleave."+k,function(){t.close()})):"focus"===this.trigger&&(this.$el.on("focusin."+k,function(){t.show()}),this.$el.on("focusout."+k,function(){t.close()})),$(window).on("resize",T(function(){t.$popover&&(t.setPosition(),t.onUpdate())},250))},o.unbindEvents=function(){this.$el.off("."+k)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.buildPopover=function(){var t;t="function"==typeof this.content?this.content():this.content,this.$popover=$('\n \t\t<div class="popover" role="tooltip" id="'+this.id+'">\n\n\t\t\t <div class="arrow"></div>\n\n\t\t\t <h3 class="popover-header">'+this.title+'</h3>\n\n\t\t\t <div class="popover-body">'+t+"</div>\n\n\t\t\t</div>\n \t"),this.$container.append(this.$popover),this.$arrow=!!this.$popover.find(".arrow")&&this.$popover.find(".arrow"),this.log(this.$el),this.log(this.$container),this.log(this.$popover),this.log(this.$arrow),this.log("Id: "+this.id),this.log("Trigger: "+this.trigger),this.log("Placement: "+this.placement),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Title: "+this.title),this.log("Content: "+this.content)},o.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$popover.addClass("popover-"+t);var e,o,i,n=this.$container.innerWidth(),s=this.$container.innerHeight(),l=this.$popover.outerWidth(!0),a=this.$popover.outerHeight(!0),r=this.$el.outerWidth(),h=this.$el.outerHeight(),c=this.$el.position().left,d=this.$el.position().top,p=this.$arrow.outerWidth(!0),u=this.$arrow.outerHeight(!0);"top"===t?(o=Math.round(c-(l-r)/2),i=Math.round(d-a),e=Math.round(l/2-p/2),this.$arrow.css({left:e+"px"})):"right"===t?(o=Math.round(c+r),i=Math.round(d-(a-h)/2),e=Math.round(a/2-u/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(o=Math.round(c-(l-r)/2),i=Math.round(d+h),e=Math.round(l/2-p/2),this.$arrow.css({left:e+"px"})):"left"===t&&(o=Math.round(c-l),i=Math.round(d-(a-h)/2),e=Math.round(a/2-u/2),this.$arrow.css({top:e+"px"})),this.$popover.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+o+"px, "+i+"px, 0px)","will-change":"transform"});var f=0,g={left:this.$popover.position().left,top:this.$popover.position().top,right:n-(this.$popover.position().left+l),bottom:s-(this.$popover.position().top+a)},m={left:!1,top:!1,right:!1,bottom:!1};if(g.right<0&&(m.right=!0,f++,this.log("Popover overflowing from right")),g.left<0&&(m.left=!0,f++,this.log("Popover overflowing from left")),g.bottom<0&&(m.bottom=!0,f++,this.log("Popover overflowing from bottom")),g.top<0&&(m.top=!0,f++,this.log("Popover overflowing from top")),f>0){if(!this.placementChanged&&m.left&&g.right>l?(this.log("Changing popover placement to right"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("right")):!this.placementChanged&&m.top&&g.top>a?(this.log("Changing popover placement to bottom"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")):!this.placementChanged&&m.right&&g.left>l?(this.log("Changing popover placement to left"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("left")):!this.placementChanged&&m.bottom&&g.top>a?(this.log("Changing popover placement to top"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!m.left&&!m.right?this.fixPopoverPosition=!0:g.top>g.bottom?(this.log("Changing popover placement to top"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):(this.log("Changing popover placement to bottom"),this.placementChanged=!0,this.$popover.removeClass("popover-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")),this.fixPopoverPosition){if(this.log("Adjusting popover size or position in order to popover fit in the container"),m.left){this.log("Popover overflowing from left");var $=Math.abs(g.left);c>=o+$&&["top","bottom"].indexOf(t)<0?(this.log("Popover adjusting width"),l-=$,o+=$):(this.log("Popover adjusting position x"),o+=$,e-=$)}if(m.top){this.log("Popover overflowing from top");var v=Math.abs(g.top);this.log("Popover adjusting position y"),i+=v,e-=v}if(m.right){this.log("Popover overflowing from right");var b=Math.abs(g.right);c<=o-b&&["top","bottom"].indexOf(t)<0?(this.log("Popover adjusting width"),l-=b):(this.log("Popover adjusting position x"),o-=b,e+=b)}if(m.bottom){this.log("Popover overflowing from bottom");var w=Math.abs(g.bottom);this.log("Popover adjusting position y"),i-=w,e+=w}"top"===t?this.$arrow.css({left:e+"px"}):"right"===t?this.$arrow.css({top:e+"px"}):"bottom"===t?this.$arrow.css({left:e+"px"}):"left"===t&&this.$arrow.css({top:e+"px"}),this.$popover.css({width:l,transform:"translate3d("+o+"px, "+i+"px, 0px)"}),this.fixPopoverPosition=!1,this.log("Popover placement changed: "+this.placementChanged),this.log("Popover container inner width: "+n+"px"),this.log("Popover container inner height: "+s+"px"),this.log("Popover trigger width: "+r+"px"),this.log("Popover trigger height: "+h+"px"),this.log("popover trigger position x: "+c+"px"),this.log("Popover trigger position Y: "+d+"px"),this.log("Popover width: "+l+"px"),this.log("Popover height: "+a+"px"),this.log("Popover position x: "+o+"px"),this.log("Popover position y: "+i+"px"),this.log("Popover position left: "+g.left+"px"),this.log("Popover position top: "+g.top+"px"),this.log("Popover position right: "+g.right+"px"),this.log("Popover position bottom: "+g.bottom+"px")}}else this.log("Popover placement changed: "+this.placementChanged),this.log("Popover container inner width: "+n+"px"),this.log("Popover container inner height: "+s+"px"),this.log("Popover trigger width: "+r+"px"),this.log("Popover trigger height: "+h+"px"),this.log("popover trigger position x: "+c+"px"),this.log("Popover trigger position Y: "+d+"px"),this.log("Popover width: "+l+"px"),this.log("Popover height: "+a+"px"),this.log("Popover position x: "+o+"px"),this.log("Popover position y: "+i+"px"),this.log("Popover position left: "+g.left+"px"),this.log("Popover position top: "+g.top+"px"),this.log("Popover position right: "+g.right+"px"),this.log("Popover position bottom: "+g.bottom+"px")},o.show=function(){this.$popover||(this.buildPopover(),this.setPosition(),this.animation?(this.$popover.addClass(this.animationSpeed),this.$popover.animateCss(this.animationIn),this.$popover.addClass("show"),this.$popover.attr("id",this.id),this.$el.attr("data-popover",this.id)):(this.$popover.addClass("show"),this.$popover.attr("id",this.id),this.$el.attr("data-popover",this.id)),this.onShow())},o.close=function(){var t=this;this.$popover&&(this.animation&&!this.$popover.hasClass("animated")?this.$popover.animateCss(this.animationOut,function(){t.$popover.remove(),t.$el.removeAttr("data-popover"),t.$popover=null,t.placementChanged=!1,t.onClose()}):(this.$popover.remove(),this.$el.removeAttr("data-popover"),this.$popover=null,this.placementChanged=!1,this.onClose()))},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data(H);if(o||(o=new e(this,"object"==typeof t&&t),$(this).data(H,o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(Y);if("undefined"!=typeof $){var W=$.fn[k];$.fn[k]=X._jQueryInterface,$.fn[k].Constructor=X,$.fn[k].noConflict=function(){return $.fn[k]=W,X._jQueryInterface},$.fn[k].defaults={container:".content-inner",trigger:"focus",placement:"bottom",animation:!0,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",title:"",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var D="coolSelect",E=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.select?$.extend(!0,i.opts,$.fn[D].defaults,window.Cool.settings.select,o):$.extend(!0,i.opts,$.fn[D].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){var t=this;$.when(this.buildCache()).then(function(){t.buildScroll(),t.bindEvents(),t.data[t.name].length>0&&t.setData(),t.onInit()})},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolSelect"),this.onDestroy()},o.update=function(){this.buildCache(),this.bindEvents(),this.onUpdate()},o.buildCache=function(){var t=this;if(this.$el=$(this.el),this.$selectHeader=this.$el.find(".select-header"),this.$selectIconContainer=this.$selectHeader.find(".select-icon"),this.name=this.$el.data("name")?this.$el.data("name"):this.opts.name,this.scrollContentHeight=this.$el.data("scrollContentHeight")?this.$el.data("scrollContentHeight"):this.opts.scrollContentHeight,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.type=this.$el.data("type")?this.$el.data("type"):this.opts.type,this.contentOpen=!1,this.$el.data("setData")&&""!=this.$el.data("setData")&&(this.data=this.$el.data("setData")),this.$el.find(".select-search")?this.showSearch=!0:this.showSearch=this.$el.data("showSearch")?this.$el.data("showSearch"):this.opts.showSearch,this.$el.find(".select-footer")?this.showFooter=!0:this.showFooter=this.$el.data("showFooter")?this.$el.data("showFooter"):this.opts.showFooter,!this.items.length)return this.$select=this.$el.find(".select-content"),this.$scrollableContent=this.$select.find(".select-scrollable-content"),this.$selectItems=this.$select.find(".select-item"),this.$selectLabels=this.$select.find("[data-label]"),this.showSearch&&(this.$searchContainer=this.$select.find(".select-search"),this.$searchInput=this.$select.find('[name="select-search"]'),this.$searchIconContainer=this.$select.find(".select-search-icon"),this.$clearSearchButton=this.$select.find("[data-clear-search]")),this.showFooter&&(this.$footerContainer=this.$select.find(".select-footer"),this.$closeButton=this.$select.find("[data-select-close]")),$.each(this.$selectLabels,function(e,o){t.searchData.push({id:e,val:$(o).text().trim()})}),this.log(this.$el),this.log(this.$select),this.log(this.$scrollableContent),this.log("Name: "+this.name),this.log("Show search: "+this.showSearch),this.log("Show footer: "+this.showFooter),this.log("Scroll content height: "+this.scrollContentHeight+"px"),this.log(this.items),this.log(this.searchData),!0;var e=this._renderItemList(this.items);this.$select=$('\n <div class="select-content">\n\n '+this._renderSearch()+'\n\n <div class="select-scrollable-content">'+e+"</div>\n\n "+this._renderFooter()+"\n\n </div>\n "),this.$el.append(this.$select),this.$scrollableContent=!!this.$select.find(".select-scrollable-content")&&this.$select.find(".select-scrollable-content"),this.$selectItems=this.$select.find(".select-item"),this.$selectLabels=this.$select.find("[data-label]"),this.showSearch&&(this.$searchContainer=this.$select.find(".select-search"),this.$searchInput=this.$select.find('[name="select-search"]'),this.$searchIconContainer=this.$select.find(".select-search-icon"),this.$clearSearchButton=this.$select.find("[data-clear-search]")),this.showFooter&&(this.$footerContainer=this.$select.find(".select-footer"),this.$closeButton=this.$select.find("[data-select-close]")),$.each(this.$selectLabels,function(t,e){this.searchData.push({id:t,val:$(e).text().trim()})}),this.log(this.$el),this.log(this.$select),this.log(this.$scrollableContent),this.log("Name: "+this.name),this.log("Show search: "+this.showSearch),this.log("Show footer: "+this.showFooter),this.log("Scroll content height: "+this.scrollContentHeight+"px"),this.log(this.items),this.log(this.searchData)},o.buildScroll=function(){if(this.$scrollableContent.length>0){var t=this.scrollContentHeight;this.showSearch&&(t-=this.$searchContainer.outerHeight(!0)||0),this.showFooter&&(t-=this.$footerContainer.outerHeight(!0)||0),this.$scrollableContent.css({"max-height":t-parseInt(this.$scrollableContent.css("marginTop"),10)-parseInt(this.$scrollableContent.css("marginBottom"),10)+"px"}),P()?this.$scrollableContent.css({"overflow-y":"auto"}):(this.$scrollableContent.addClass("ps-dark"),this.scroll=new y(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,scrollYMarginOffset:-1,suppressScrollY:!0,suppressScrollX:!0}),this.$scrollableContent[0].offsetHeight<this.$scrollableContent[0].scrollHeight&&(this.$scrollableContent.addClass("ps-show-rail-y"),this.scroll.settings.suppressScrollY=!1))}},o.bindEvents=function(){var t=this,e=this;this.$selectHeader.on("click."+D,function(){t.contentOpen?t.close():t.show()}),this.$el.on("change."+D,'input[type="checkbox"]',function(){var t=$(this).val();this.checked?-1===e.data[e.name].indexOf(t)&&e.data[e.name].push(t):e.data[e.name]=e.data[e.name].filter(function(e){return e!=t}),e.onSelect(this)}),this.$el.on("change."+D,'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."+D,'input[type="radio"]',function(){$(this).hasClass("checked")?(e.data[plugin.name]=[],$(this).prop("checked",!1),$(this).removeClass("checked")):$(this).addClass("checked"),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."+D,T(function(){e.searchString=$(this).val().trim(),e.search.call(e)},250)),this.$searchInput.on("focusin."+D,function(){e.$searchContainer.addClass("focused")}),this.$searchInput.on("focusout."+D,function(){e.$searchContainer.removeClass("focused")}),this.$clearSearchButton.on("click."+D,function(){e.searchString.length&&(e.$searchInput.val(""),e.searchString="",e.search.call(e))})),this.showFooter&&this.$closeButton.on("click."+D,function(){t.close()}),$(document).on("touchstart click",function(t){!e.$el.is(t.target)&&0===e.$el.has(t.target).length&&e.contentOpen&&e.close.call(e)})},o.unbindEvents=function(){this.$el.off("."+D)},o.getData=function(t){return t?this.data[t]:this.data},o.setData=function(){var t=this,e=null,o=this.opts.faPro?"fal":"fas";if(this.$selectIconContainer.html('<i class="'+o+' fa-check text-green icon"></i>'),this.searchApi.length){var i=this.searchApi,n=this.data[this.name].length,s=0;this.data[this.name].forEach(function(t){i+=encodeURIComponent("#"+t),++s!==n&&(i+="+")}),$.ajax({method:"GET",url:i}).done(function(o){var i=o.map(function(t){var e="";return t.name?e=t.name:t.label?e=t.label:t.value&&(e=t.value),{id:t.id.toString(),label:e}});i=i.filter(function(e){return t.data[t.name].indexOf(e.id)>-1});var n=$(t._renderItemList(i));$.when(t.$scrollableContent.append(n)).then(function(){if(t.$scrollableContent[0].offsetHeight<t.$scrollableContent[0].scrollHeight?(t.scroll.update(),t.scroll.settings.suppressScrollY=!1,t.$scrollableContent.addClass("ps-show-rail-y")):(t.scroll.update(),t.scroll.settings.suppressScrollY=!0,t.$scrollableContent.removeClass("ps-show-rail-y")),t.$select.find(':input[type="checkbox"]').length?e="checkbox":t.$select.find(':input[type="radio"]').length&&(e="radio"),"checkbox"==e)t.data[t.name].forEach(function(e){var o=t.$select.find(":input").filter(function(){return this.value==e});o.prop("checked",!0),t.onSelect(o[0])});else if("radio"==e){var o=t.$select.find(":input").filter(function(){return this.value==t.data[t.name]});o.prop("checked",!0),o.addClass("checked"),t.onSelect(o[0])}})})}else if(this.$select.find(':input[type="checkbox"]').length?e="checkbox":this.$select.find(':input[type="radio"]').length&&(e="radio"),"checkbox"==e)this.data[this.name].forEach(function(e){var o=t.$select.find(":input").filter(function(){return this.value==e});o.prop("checked",!0),t.onSelect(o[0])});else if("radio"==e){var l=this.$select.find(":input").filter(function(){return this.value==t.data[t.name]});l.prop("checked",!0),l.addClass("checked"),this.onSelect(l[0])}},o.search=function(){var t=this,e=this.opts.faPro?"fal":"fas";if(this.searchString.length)if(this.searchApi.length)this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),$.ajax({method:"GET",url:this.searchApi+this.searchString}).done(function(e){var o=e.map(function(t){return{id:t.id.toString(),label:t.name||t.label||t.value||null}});o=(o=o.filter(function(e){return!(t.data[t.name].indexOf(e.id)>-1)})).filter(function(t){return t.id>0});var i=$(t._renderItemList(o));$.when(t.$scrollableContent.append(i)).then(function(){var e=t.opts.faPro?"fal":"fas";t.$searchIconContainer.html('<i class="'+e+' fa-times icon"></i>'),t.$searchIconContainer.attr("data-clear-search","true"),t.$scrollableContent[0].offsetHeight<t.$scrollableContent[0].scrollHeight?(t.scroll.update(),t.scroll.settings.suppressScrollY=!1,t.$scrollableContent.addClass("ps-show-rail-y")):(t.scroll.update(),t.scroll.settings.suppressScrollY=!0,t.$scrollableContent.removeClass("ps-show-rail-y"))})});else{var o=this.searchData.filter(function(e){return e.val.toLocaleLowerCase().indexOf(t.searchString.toLocaleLowerCase())>-1});this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),o.forEach(function(e){$(t.$selectItems[e.id]).addClass("visible")}),this.$selectItems.not(".visible").addClass("d-none"),this.$searchIconContainer.html('<i class="'+e+' fa-times icon"></i>'),this.$searchIconContainer.attr("data-clear-search","true")}else this.searchApi.length?(this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),this.$searchIconContainer.html('<i class="'+e+' fa-search icon"></i>'),this.$searchIconContainer.attr("data-clear-search","")):(this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),this.$searchIconContainer.html('<i class="'+e+' fa-search icon"></i>'),this.$searchIconContainer.attr("data-clear-search",""));this.scroll&&this.scroll.update(),this.onUpdate()},o.show=function(){if(!this.$el.hasClass("show")){var t=$(".select.show"),e=1,o=this.opts.faPro?"fal":"fas";t.length&&(e=parseInt(t.first().css("z-index"),10)+2),this.$el.css({"max-height":this.scrollContentHeight+this.$selectHeader.outerHeight(!0)+"px"}),this.$el.addClass("show"),t.length||(e=parseInt(this.$el.css("z-index"),10)+1),this.$el.css({"z-index":e}),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>'),this.contentOpen=!0,this.onShow()}},o.close=function(){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.$selectIconContainer.html('<i class="'+e+' fa-check text-green icon"></i>'):this.$selectIconContainer.html('<i class="'+e+' fa-angle-down icon"></i>'),this.contentOpen=!1,this.onClose()},o.onSelect=function(t){var e=this.opts.onSelect;"function"==typeof e&&e.call(t)},o._renderItemList=function(t){for(var e="",o=0;o<t.length;++o)e+='\n\n <div class="select-item">\n\n <div class="select-item-'+this.type+'">\n\n <div class="styled-'+this.type+'">\n\n <input type="'+this.type+'" id="select-'+this.name+"-"+t[o].id+'" value="'+t[o].id+'">\n\n <label for="select-'+this.name+"-"+t[o].id+'">\n\n <span class="radio-inner">\n <svg viewBox="0 0 18 18">\n <polyline points="1.5 6 4.5 9 10.5 1"></polyline>\n </svg>\n </span>\n\n <span class="'+this.type+'-label" data-label>\n '+t[o].label+"\n </span>\n\n </label>\n\n </div>\n\n </div>\n\n </div>\n\n ";return e},o._renderSearch=function(){if(!this.showSearch)return"";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.opts.searchPlaceholder+'">\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 '},o._renderFooter=function(){return this.showFooter?'\n\n <div class="select-footer">\n\n <button class="btn btn-primary" type="button" data-select-close>\n '+this.opts.btnCloseText+"\n </button>\n\n </div>\n\n ":""},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolSelect");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolSelect",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(Y);if("undefined"!=typeof $){var L=$.fn[D];$.fn[D]=E._jQueryInterface,$.fn[D].Constructor=E,$.fn[D].noConflict=function(){return $.fn[D]=L,E._jQueryInterface},$.fn[D].defaults={name:"",type:"checkbox",scrollContentHeight:100,faPro:!1,items:[],showSearch:!1,showFooter:!1,searchApi:!1,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onSearch:null,onSelect:null,buildScroll:null,searchPlaceholder:null,btnCloseText:null,debug:!1}}var A="coolDropdown",M=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.dropdown?$.extend(!0,i.opts,$.fn[A].defaults,window.Cool.settings.dropdown,o):$.extend(!0,i.opts,$.fn[A].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){var t=this;$.when(this.buildCache()).then(function(){t.buildScroll(),t.bindEvents(),t.onInit()})},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolDropdown"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){var t=this;if(this.$el=$(this.el),this.$el.addClass("dropdown-trigger"),this.$container=this.$el.parent(".dropdown"),this.id="dropdown-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.offset=this.$el.data("offset")?this.$el.data("offset"):this.opts.offset,this.minWidth=this.$el.data("minWidth")?this.$el.data("minWidth"):this.opts.minWidth,this.scroll=this.$el.data("scroll")?this.$el.data("scroll"):this.opts.scroll,this.scrollContentHeight=this.$el.data("scrollContentHeight")?this.$el.data("scrollContentHeight"):this.opts.scrollContentHeight,this.closeOnItemClick=this.$el.data("closeOnItemClick")?this.$el.data("closeOnItemClick"):this.opts.closeOnItemClick,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content,this.contentOpen=!1,this.$container.hasClass("dropup")?this.placement="top":this.$container.hasClass("dropright")?this.placement="right":this.$container.hasClass("dropbottom")?this.placement="bottom":this.placement="left","function"!=typeof this.content)return this.$dropdown=!!this.$el.next(".dropdown-menu")&&this.$el.next(".dropdown-menu"),this.$dropdown.hasClass("dropdown-menu-right")?this.align="end":this.align="start",this.$scrollableContent=!!this.$dropdown.find(".dropdown-scrollable-content")&&this.$dropdown.find(".dropdown-scrollable-content"),this.$dropdownItem=this.$dropdown.find(".dropdown-item"),this.minWidth&&this.$dropdown.css("min-width",this.minWidth+"px"),this.log(this.$el),this.log(this.$container),this.log(this.$dropdown),this.log(this.$scrollableContent),this.log("Id: "+this.id),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Offset: "+this.offset),this.log("Min width: "+this.minWidth),this.log("Content: "+this.opts.content),this.log("Scroll: "+this.scroll),this.log("Scroll content height: "+this.scrollContentHeight+"px"),!0;var e="end"===this.opts.align?" dropdown-menu-right":"";this.$dropdown=$('\n <div class="dropdown-menu'+e+'" id="'+this.id+'">\n '+this.content+"\n </div>\n "),$.when(this.$el.after(this.$dropdown)).then(function(){return t.$scrollableContent=!!t.$dropdown.find(".dropdown-scrollable-content")&&t.$dropdown.find(".dropdown-scrollable-content"),t.$dropdown.hasClass("dropdown-menu-right")?t.align="end":t.align="start",t.$dropdownItem=t.$dropdown.find(".dropdown-item"),t.minWidth&&t.$dropdown.css("min-width",t.minWidth+"px"),t.log(t.$el),t.log(t.$container),t.log(t.$dropdown),t.log(t.$scrollableContent),t.log("Id: "+t.id),t.log("Animation: "+t.animation),t.log("Animation in: "+t.animationIn),t.log("Animation out: "+t.animationOut),t.log("Animation speed: "+t.animationSpeed),t.log("Offset: "+t.offset),t.log("Min width: "+t.minWidth),t.log("Content: "+t.content),t.log("Scroll: "+t.scroll),t.log("Scroll content height: "+t.scrollContentHeight+"px"),!0})},o.buildScroll=function(){this.opts.scroll&&this.$scrollableContent.length&&(this.$scrollableContent.css({"max-height":this.scrollContentHeight+"px"}),P()?this.$scrollableContent.css({"overflow-y":"auto"}):(this.$scrollableContent.css({"overflow-y":"auto"}),this.scroll=new y(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20}),this.$scrollableContent.addClass("ps-show-rail-y")))},o.bindEvents=function(){var t=this,e=this;this.$el.on("click."+A,function(){t.contentOpen?t.close():t.show()}),this.$dropdownItem.on("click."+A,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",T(function(){t.setPosition(),t.onUpdate()},250))},o.unbindEvents=function(){this.$el.off("."+A)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.setPosition=function(t){"undefined"!=typeof str&&null!==str||(t=this.placement);var e,o,i=this.$dropdown.outerWidth(!0),n=this.$dropdown.outerHeight(!0),s=this.$el.outerWidth(!0),l=this.$el.outerHeight(!0),a=this.$el.position().left,r=this.$el.position().top;if("top"===t?(e="end"===this.align?s-i:a,o=r-n):"right"===t?(e=a+s,o=r):"bottom"===t?(e="end"===this.align?s-i:a,o=r+l):"left"===t&&(e=a-i,o=r),this.offset){var h=this.offset.split(","),c=h[0],d=h[1];e+=parseInt(c,10),o+=parseInt(d,10)}this.$dropdown.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+Math.round(e)+"px, "+Math.round(o)+"px, 0px)","will-change":"transform"}),this.log("Dropdown trigger width: "+s+"px"),this.log("Dropdown trigger height: "+l+"px"),this.log("Dropdown trigger position x: "+a+"px"),this.log("Dropdown trigger position Y: "+r+"px"),this.log("Dropdown width: "+i+"px"),this.log("Dropdown height: "+n+"px"),this.log("Dropdown position x: "+e+"px"),this.log("Dropdown position y: "+o+"px")},o.show=function(){this.$dropdown&&!this.$dropdown.hasClass("show")&&(this.setPosition(),this.animation?(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass(this.animationSpeed),this.$dropdown.animateCss(this.animationIn),this.$dropdown.addClass("show"),this.$dropdown.attr("id",this.id),this.$el.attr("data-dropdown",this.id)):(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass("show"),this.$dropdown.attr("id",this.id),this.$el.attr("data-dropdown",this.id)),this.opts.scroll&&this.scroll&&this.$scrollableContent.length&&(this.$scrollableContent[0].scrollTop=1,this.$scrollableContent[0].scrollTop=0),this.contentOpen=!0,this.onShow())},o.close=function(){var t=this;this.$dropdown&&(this.animation&&!this.$dropdown.hasClass("animated")?this.$dropdown.animateCss(this.animationOut,function(){t.$dropdown.removeClass("show"),t.$el.removeAttr("data-dropdown")}):(this.$dropdown.removeClass("show"),this.$el.removeAttr("data-dropdown")),this.contentOpen=!1,this.onClose())},o.onItemClick=function(t){var e=this.opts.onItemClick;"function"==typeof e&&e.call(t)},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolDropdown");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolDropdown",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(Y);if("undefined"!=typeof $){var O=$.fn[A];$.fn[A]=M._jQueryInterface,$.fn[A].Constructor=M,$.fn[A].noConflict=function(){return $.fn[A]=O,M._jQueryInterface},$.fn[A].defaults={animation:!0,animationIn:"zoomIn",animationOut:"zoomOut",animationSpeed:"fastest",offset:null,minWidth:null,align:"start",closeOnItemClick:!0,content:!1,scroll:!0,scrollContentHeight:100,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onItemClick:null,debug:!1}}var _="coolTooltip",R=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.tooltip?$.extend(!0,i.opts,$.fn[_].defaults,window.Cool.settings.tooltip,o):$.extend(!0,i.opts,$.fn[_].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolTooltip"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.id="tooltip-"+this.generateUUID(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.placement=this.$el.data("placement")?this.$el.data("placement"):this.opts.placement,this.placementChanged=!1,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content},o.bindEvents=function(){var t=this;this.$el.on("mouseenter."+_,function(){t.show()}),this.$el.on("mouseleave."+_,function(){t.close()}),$(window).on("resize",T(function(){t.$tooltip&&(t.setPosition(),t.onUpdate())},250))},o.unbindEvents=function(){this.$el.off("."+_)},o.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},o.buildTooltip=function(){this.$tooltip=$('\n\n <div class="tooltip" role="tooltip" id="'+this.id+'">\n\n <div class="arrow"></div>\n\n <div class="tooltip-inner">'+this.content+"</div>\n\n </div>\n\n "),this.$container.append(this.$tooltip),this.$arrow=this.$tooltip.find(".arrow"),this.log(this.$el),this.log(this.$container),this.log(this.$tooltip),this.log(this.$arrow),this.log("Id: "+this.id),this.log("Animation: "+this.animation),this.log("Animation in: "+this.animationIn),this.log("Animation out: "+this.animationOut),this.log("Animation speed: "+this.animationSpeed),this.log("Placement: "+this.placement),this.log("Content: "+this.content)},o.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$tooltip.addClass("tooltip-"+t);var e,o,i,n=this.$container.innerWidth(),s=this.$container.innerHeight(),l=this.$tooltip.outerWidth(!0),a=this.$tooltip.outerHeight(!0),r=this.$el.outerWidth(),h=this.$el.outerHeight(),c=this.$el.offset().left,d=this.$el.offset().top,p=this.$arrow.outerWidth(!0),u=this.$arrow.outerHeight(!0);"top"===t?(o=Math.round(c-(l-r)/2),i=Math.round(d-a),e=Math.round(l/2-p/2),this.$arrow.css({left:e+"px"})):"right"===t?(o=Math.round(c+r),i=Math.round(d-(a-h)/2),e=Math.round(a/2-u/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(o=Math.round(c-(l-r)/2),i=Math.round(d+h),e=Math.round(l/2-p/2),this.$arrow.css({left:e+"px"})):"left"===t&&(o=Math.round(c-l),i=Math.round(d-(a-h)/2),e=Math.round(a/2-u/2),this.$arrow.css({top:e+"px"})),this.$tooltip.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+o+"px, "+i+"px, 0px)","will-change":"transform"});var f=0,g={left:this.$tooltip.position().left,top:this.$tooltip.position().top,right:n-(this.$tooltip.position().left+l),bottom:s-(this.$tooltip.position().top+a)},m={left:!1,top:!1,right:!1,bottom:!1};if(g.right<0&&(m.right=!0,f++,this.log("Tooltip overflowing from right")),g.left<0&&(m.left=!0,f++,this.log("Tooltip overflowing from left")),g.bottom<0&&(m.bottom=!0,f++,this.log("Tooltip overflowing from bottom")),g.top<0&&(m.top=!0,f++,this.log("Tooltip overflowing from top")),f>0){if(!this.placementChanged&&m.left&&g.right>l?(this.log("Changing tooltip placement to right"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("right")):!this.placementChanged&&m.top&&g.top>a?(this.log("Changing tooltip placement to bottom"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")):!this.placementChanged&&m.right&&g.left>l?(this.log("Changing tooltip placement to left"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("left")):!this.placementChanged&&m.bottom&&g.top>a?(this.log("Changing tooltip placement to top"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!m.left&&!m.right?this.fixTooltipPosition=!0:g.top>g.bottom?(this.log("Changing tooltip placement to top"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):(this.log("Changing tooltip placement to bottom"),this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")),this.fixTooltipPosition){if(this.log("Adjusting tooltip size or position in order to tooltip fit in the container"),m.left){this.log("Tooltip overflowing from left");var $=Math.abs(g.left);c>=o+$&&["top","bottom"].indexOf(t)<0?(this.log("Tooltip adjusting width"),l-=$,o+=$):(this.log("Tooltip adjusting position x"),o+=$,e-=$)}if(m.top){this.log("Tooltip overflowing from top");var v=Math.abs(g.top);this.log("Tooltip adjusting position y"),i+=v,e-=v}if(m.right){this.log("Tooltip overflowing from right");var b=Math.abs(g.right);c<=o-b&&["top","bottom"].indexOf(t)<0?(this.log("Tooltip adjusting width"),l-=b):(this.log("Tooltip adjusting position x"),o-=b,e+=b)}if(m.bottom){this.log("Tooltip overflowing from bottom");var w=Math.abs(g.bottom);this.log("Tooltip adjusting position y"),i-=w,e+=w}"top"===t?this.$arrow.css({left:e+"px"}):"right"===t?this.$arrow.css({top:e+"px"}):"bottom"===t?this.$arrow.css({left:e+"px"}):"left"===t&&this.$arrow.css({top:e+"px"}),this.$tooltip.css({width:l,transform:"translate3d("+o+"px, "+i+"px, 0px)"}),this.fixTooltipPosition=!1,this.log("Tooltip placement changed: "+this.placementChanged),this.log("Tooltip container inner width: "+n+"px"),this.log("Tooltip container inner height: "+s+"px"),this.log("Tooltip trigger width: "+r+"px"),this.log("Tooltip trigger height: "+h+"px"),this.log("Tooltip trigger position x: "+c+"px"),this.log("Tooltip trigger position Y: "+d+"px"),this.log("Tooltip width: "+l+"px"),this.log("Tooltip height: "+a+"px"),this.log("Tooltip position x: "+o+"px"),this.log("Tooltip position y: "+i+"px"),this.log("Tooltip position left: "+g.left+"px"),this.log("Tooltip position top: "+g.top+"px"),this.log("Tooltip position right: "+g.right+"px"),this.log("Tooltip position bottom: "+g.bottom+"px")}}else this.log("Tooltip placement changed: "+this.placementChanged),this.log("Tooltip container inner width: "+n+"px"),this.log("Tooltip container inner height: "+s+"px"),this.log("Tooltip trigger width: "+r+"px"),this.log("Tooltip trigger height: "+h+"px"),this.log("Tooltip trigger position x: "+c+"px"),this.log("Tooltip trigger position Y: "+d+"px"),this.log("Tooltip width: "+l+"px"),this.log("Tooltip height: "+a+"px"),this.log("Tooltip position x: "+o+"px"),this.log("Tooltip position y: "+i+"px"),this.log("Tooltip position left: "+g.left+"px"),this.log("Tooltip position top: "+g.top+"px"),this.log("Tooltip position right: "+g.right+"px"),this.log("Tooltip position bottom: "+g.bottom+"px")},o.show=function(){this.$tooltip||(this.buildTooltip(),this.setPosition(),this.animation?(this.$tooltip.addClass(this.animationSpeed),this.$tooltip.animateCss(this.animationIn),this.$tooltip.addClass("show"),this.$tooltip.attr("id",this.id),this.$el.attr("data-tooltip",this.id)):(this.$tooltip.addClass("show"),this.$tooltip.attr("id",this.id),this.$el.attr("data-tooltip",this.id)),this.onShow())},o.close=function(){var t=this;this.$tooltip&&(this.animation&&!this.$tooltip.hasClass("animated")?this.$tooltip.animateCss(this.animationOut,function(){t.$tooltip.remove(),t.$el.removeAttr("data-tooltip"),t.$tooltip=null,t.placementChanged=!1,t.onClose()}):(this.$tooltip.remove(),this.$el.removeAttr("data-tooltip"),this.$tooltip=null,this.placementChanged=!1,this.onClose()))},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolTooltip");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolTooltip",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(Y);if("undefined"!=typeof $){var j=$.fn[_];$.fn[_]=R._jQueryInterface,$.fn[_].Constructor=R,$.fn[_].noConflict=function(){return $.fn[_]=j,R._jQueryInterface},$.fn[_].defaults={container:"body",animation:!1,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",placement:"bottom",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var U="coolSectionTabs",z="plugin_coolSectionTabs",B=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.sectionTabs?$.extend(!0,i.opts,$.fn[U].defaults,window.Cool.settings.sectionTabs,o):$.extend(!0,i.opts,$.fn[U].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.checkForChanges(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData(z),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$dropdownContainer=this.$el.find(".dropdown-container"),this.$dropdownList=this.$el.find(".dropdown-list"),this.tabsCount=this.$el.find("> .tab-item").length,this.tabs=this.$el.find("> .tab-item:visible"),$.each(this.tabs,function(t,e){$(e).data("width",$(e).outerWidth(!0))}),this.log(this.$el),this.log(this.$dropdownContainer),this.log(this.$dropdownList),this.log(this.tabsCount)},o.bindEvents=function(){var t=this;$(window).on("resize",T(function(){t.checkForChanges()},250))},o.unbindEvents=function(){this.$el.off("."+this._name)},o.moveToList=function(t){$(t).insertBefore(this.$dropdownContainer),this.checkForChanges()},o.moveToDropdown=function(t){$(t).appendTo(this.$dropdownList),this.checkForChanges()},o.overflowStatus=function(){return this.$el[0].offsetWidth<this.$el[0].scrollWidth},o.checkForChanges=function(){var t=this.$dropdownList.children(),e=this.$el.find("> .tab-item").not(this.$dropdownContainer),o=this.$el.find("> .tab-item:visible"),i=0;$.each(o,function(t,e){i+=$(e).outerWidth(!0)});var n=this.$el[0].offsetWidth-i;t.length>0?this.$dropdownContainer.hasClass("visible")||this.$dropdownContainer.addClass("visible"):this.$dropdownContainer.hasClass("visible")&&this.$dropdownContainer.removeClass("visible"),1==this.overflowStatus()?e.length>0&&this.moveToDropdown(e.last()):t.length>0&&n>t.last().data("width")&&this.moveToList(t.last())},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data(z);if(o||(o=new e(this,"object"==typeof t&&t),$(this).data(z,o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(Y);if("undefined"!=typeof $){var Q=$.fn[U];$.fn[U]=B._jQueryInterface,$.fn[U].Constructor=B,$.fn[U].noConflict=function(){return $.fn[U]=Q,B._jQueryInterface},$.fn[U].defaults={onInit:null,onUpdate:null,onDestroy:null,debug:!1}}var N="coolCollapse",F=function(t){function e(e,o){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.collapse?$.extend(!0,i.opts,$.fn[N].defaults,window.Cool.settings.dialog,o):$.extend(!0,i.opts,$.fn[N].defaults,o),i.el=e,i.debug=i.opts.debug,i.init(),i}I(e,t);var o=e.prototype;return o.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},o.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_coolCollapse"),this.onDestroy()},o.update=function(){this.buildCache(),this.onUpdate()},o.buildCache=function(){this.$el=$(this.el),this.$target=this.$el.data("target")?$(document).find(this.$el.data("target")):$(document).find(this.opts.target),this.expanded="true"==this.$el.attr("aria-expanded"),this.$target.length?(this.targetHeight=this.$target.height(),this.$container=this.$target.closest(".section-collapse"),this.$indicator=$(document).find('[data-collapse-indicator="'+this.$el.data("target")+'"]')):(this.$target=$(this.$el).parent().find(".collapse"),this.targetHeight=this.$target.height(),this.$container=this.$target.closest(".section-collapse"),this.$indicator=$(this.$el).parent().find("[data-collapse-indicator]")),this.log(this.$el),this.log(this.$target),this.log(this.$container),this.log(this.$indicator),this.log("Expanded: "+this.expanded),this.log("Target height: "+this.targetHeight+"px")},o.bindEvents=function(){var t=this;this.$el.on("click."+this.name,function(e){t.expanded?t.close():t.show()}),$(window).on("resize",T(function(){t.$target.length&&(t.targetHeight=t.$target.height(),t.log("Target height: "+t.targetHeight+"px"))},250))},o.unbindEvents=function(){this.$el.off("."+this.name)},o.whichTransitionEvent=function(){var t=document.createElement("text-transition"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",transition:"transitionend"};for(var o in e)if(void 0!==t.style[o])return e[o]},o.show=function(){var t=this;this.$target.removeClass("collapse visible"),this.$target.addClass("collapsing"),this.$el.is("button")&&this.$el.attr("disabled",!0),this.$container.length&&this.$container.addClass("visible"),this.$target.css("height"),this.$target.css("height",this.targetHeight),this.$indicator.length&&this.$indicator.addClass("visible"),this.$target.one(this.whichTransitionEvent(),function(){t.$target.removeClass("collapsing"),t.$el.is("button")&&t.$el.attr("disabled",!1),t.$target.removeAttr("style"),t.$target.addClass("collapse visible"),t.$el.attr("aria-expanded",!0),t.$target.css("height","auto"),t.expanded=!0}),this.onShow()},o.close=function(){var t=this;this.$target.removeClass("collapse visible"),this.$target.addClass("collapsing"),this.$el.is("button")&&this.$el.attr("disabled",!0),this.$container.length&&this.$container.removeClass("visible"),this.$target.css("height",this.$target.height()),setTimeout(function(){t.$target.css("height",0)},10),this.$indicator.length&&this.$indicator.hasClass("visible")&&this.$indicator.removeClass("visible"),this.$target.one(this.whichTransitionEvent(),function(){t.$target.removeClass("collapsing"),t.$el.is("button")&&t.$el.attr("disabled",!1),t.$target.removeAttr("style"),t.$target.addClass("collapse"),t.$el.attr("aria-expanded",!1),t.expanded=!1}),this.onClose()},e._jQueryInterface=function(t){return this.each(function(){var o=$(this).data("plugin_coolCollapse");if(o||(o=new e(this,"object"==typeof t&&t),$(this).data("plugin_coolCollapse",o)),"string"==typeof t){if("undefined"==typeof o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},e}(Y);if("undefined"!=typeof $){var K=$.fn[N];$.fn[N]=F._jQueryInterface,$.fn[N].Constructor=F,$.fn[N].noConflict=function(){return $.fn[N]=K,F._jQueryInterface},$.fn[N].defaults={target:null,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,debug:!1}}var q="coolToast",G=function(){function t(t,e){this.settings={},window.Cool.settings.toast?$.extend(!0,this.settings,$.fn[q].defaults,window.Cool.settings.toast,e):$.extend(!0,this.settings,$.fn[q].defaults,e),this.container=t,this.$container=$(this.container),this.debug=this.settings.debug,this.faPro=this.settings.faPro,this.toasts=[],this.queue=[],this.processingQueue=!1,this.onInitialize=this.settings.onInitialize,this.onDestroy=this.settings.onDestroy}var e=t.prototype;return e.addQueue=function(t){if(this.queue.push(t),!this.processingQueue)return this.processQueue()},e.processQueue=function(){if(this.processingQueue&&this.queue.shift(),this.queue.length)return this.processingQueue=!0,this.show(this.queue[0]);this.processingQueue=!1},e.init=function(t){var e={};$.extend(!0,e,this.settings,t);var o=this.buildToast(e);return this.addQueue(o),this.onInit(o),o},e.destroy=function(){this.$container.removeData("plugin_coolToast"),this.onDestroy()},e.buildToast=function(t){var e={uuid:"toast-"+this.generateUUID(),placement:t.placement,placementX:t.placementX,placementY:t.placementY,offset:t.offset,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,dismiss:t.dismiss,size:t.size,header:t.header,theme:t.theme,title:t.title,content:t.content,template:t.template,maxBodyHeight:t.maxBodyHeight,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return"function"==typeof e.content?e.$el=$(e.template()):e.$el=$(this._renderTemplate(e)),e.$inner=e.$el.find(".toast-inner"),e.$closeBtn=e.$el.find("[data-toast-close]"),this.log(e),this.toasts.push(e),e},e.bindEvents=function(t){var e=this,o=this;t.$el.on("click","[data-toast-close]",function(){t.$el&&o.close(t)}),$(window).on("resize",T(function(){t.$el&&e.setPosition(t)},250))},e.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},e.setPosition=function(t,e,o,i){if("undefined"!=typeof o&&null!==o||(o=t.placementY),"undefined"!=typeof i&&null!==i||(i=t.placementX),i&&o||(e=t.placement),t.offset){var n=t.offset.split(",");parseInt(n[0],10),parseInt(n[1],10)}var s,l,a=t.$el.outerWidth(!0),r=t.$el.outerHeight(!0);e?"top-left"===e?(s=0,l=0,t.offset?(s+=offsetX,l+=offsetY):(s+=30,l+=30)):"top-center"===e?(s=this.$container.width()/2-a/2,l=0,this.log(this.$container.width),t.offset?(s+=offsetX,l+=offsetY):l+=30):"top-right"===e?(s=this.$container.width()-a,l=0,t.offset?(s+=-offsetX,l+=offsetY):(s+=-30,l+=30)):"center-left"===e?(s=0,l=this.$container.height()/2-r/2,t.offset?(s+=offsetX,l+=offsetY):s+=30):"center-center"===e?(s=this.$container.width()/2-a/2,l=this.$container.height()/2-r/2,t.offset&&(s+=offsetX,l+=offsetY)):"center-right"===e?(s=this.$container.width()-a,l=this.$container.height()/2-r/2,t.offset?(s+=-offsetX,l+=offsetY):s+=-30):"bottom-left"===e?(s=0,l=this.$container.height()-r,t.offset?(s+=offsetX,l+=-offsetY):(s+=30,l+=-30)):"bottom-center"===e?(s=this.$container.width()/2-a/2,l=this.$container.height()-r,t.offset?(s+=offsetX,l+=-offsetY):l+=-30):"bottom-right"===e&&(s=this.$container.width()-a,l=this.$container.height()-r,t.offset?(s+=-offsetX,l+=-offsetY):(s+=-30,l+=-30)):(s=i,l=o),t.$el.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+s+"px, "+l+"px, 0px)","will-change":"transform"}),this.log("Toast width: "+a+"px"),this.log("Toast height: "+r+"px"),this.log("Toast position Y: "+s+"px"),this.log("Toast position x: "+l+"px")},e.show=function(t){var e=this;this.$container.append(t.$el),this.bindEvents(t),this.setPosition(t),t.animation?(t.$el.addClass("show"),t.$inner.addClass(t.animationSpeed),t.$inner.animateCss(t.animationIn)):t.$el.addClass("show"),t.dismiss&&setTimeout(function(){e.close(t)},1e3*t.dismiss),this.onShow(t)},e.close=function(t){var e=this;t.animation&&!t.$inner.hasClass("animated")?(t.$el.removeClass("show"),t.$inner.animateCss(t.animationOut,function(){t.$el.remove(),e.toasts=$.grep(e.toasts,function(e){return e.uuid!=t.uuid}),e.processQueue(),e.onClose(t)})):(t.$el.remove(),this.toasts=$.grep(this.toasts,function(e){return e.uuid!=t.uuid}),this.processQueue(),this.onClose(t))},e.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},e.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},e.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},e.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},e.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},e._renderTemplate=function(t){var e,o=this.faPro?"far":"fas",i="",n="",s="";return i="function"==typeof t.content?t.content():t.content,t.header?n='\n <div class="toast-header">\n\n <span>'+t.title+'</span>\n\n <button type="button" data-toast-close>\n <i class="'+o+' fa-times icon"></i>\n </button>\n\n </div>\n ':s='\n <button type="button" data-toast-close>\n\n <i class="'+o+' fa-times icon"></i>\n\n </button>\n ',e='\n <div class="toast-body">\n\n <span>'+i+"</span>\n "+s+"\n\n </div>\n ",'\n <div class="toast toast-'+t.size+" toast-"+t.theme+'" role="alert" id="'+t.uuid+'">\n\n <div class="toast-inner">\n\n '+n+"\n "+e+"\n\n </div>\n\n </div>\n "},t._jQueryInterface=function(e){return this.each(function(){var o=$(this).data("plugin_coolToast");if(o||(o=new t(this,"object"==typeof e&&e),$(this).data("plugin_coolToast",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}})},t}();if("undefined"!=typeof $){var J,V=$.fn[q];$.fn[q]=G._jQueryInterface,$.fn[q].Constructor=G,$.fn[q].noConflict=function(){return $.fn[q]=V,G._jQueryInterface},$.fn[q].defaults=((J={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,J.onShow=null,J.onClose=null,J)}var Z="coolDialog",tt=function(){function t(t,e){this.settings={},window.Cool.settings.dialog?$.extend(!0,this.settings,$.fn[Z].defaults,window.Cool.settings.dialog,e):$.extend(!0,this.settings,$.fn[Z].defaults,e),this.container=t,this.$container=$(this.container),this.debug=this.settings.debug,this.faPro=this.settings.faPro,this.dialogs=[],this.onInitialize=this.settings.onInitialize,this.onDestroy=this.settings.onDestroy}var e=t.prototype;return e.init=function(t){var e={};$.extend(!0,e,this.settings,t);var o=this.buildDialog(e);return this.show(o),this.bindEvents(o),this.onInit(o),o},e.destroy=function(){this.$container.removeData("plugin_coolDialog"),this.onDestroy()},e.buildDialog=function(t){var e=this,o={uuid:"dialog-"+this.generateUUID(),title:t.title,template:t.template,body:t.body,footer:t.footer,size:t.size,classes:t.classes,centered:t.centered,backdrop:t.backdrop,preventScroll:t.preventScroll,closeBtn:t.closeBtn,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,callbacks:t.callbacks,maxBodyHeight:t.maxBodyHeight,actions:t.actions,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return"function"==typeof o.template?o.$el=$(o.template()):o.$el=$(this._renderTemplate(o)),o.show=function(){e.show(o)},o.close=function(){e.close(o)},this.log(o),this.dialogs.push(o),o},e.bindEvents=function(t){var e=this;t.$el.on("click","[data-dialog-close]",function(o){t.$el.trigger("dialog.close"),"function"==typeof t.callbacks.close?t.callbacks.close.call(e,function(){e.close(t)},t):e.close(t)}),t.$el.on("click","[data-dialog-remove]",function(o){t.$el.trigger("dialog.remove"),"function"==typeof t.callbacks.remove&&t.callbacks.remove.call(e,function(){e.close(t)},t)}),t.$el.on("click","[data-dialog-confirm]",T(function(o){t.$el.trigger("dialog.close"),"function"==typeof t.callbacks.confirm?t.callbacks.confirm.call(e,function(){e.close(t)},t):e.close(t)}))},e.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},e.show=function(t){var e=this;if(this.$container.hasClass("has-dialogs")||this.$container.addClass("has-dialogs"),t.preventScroll&&!this.$container.hasClass("dialog-prevent-scroll")&&this.$container.addClass("dialog-prevent-scroll"),this.dialogs.length>1){var o=$(this.dialogs).eq(-2)[0].$el,i=parseInt(o.css("z-index"),10)+1;t.$el.css("z-index",i),o.css({transition:"opacity 0.3s",opacity:0,visibility:"visible"})}if(t.backdrop&&$(".dialog-backdrop").length<1){this.$container.append('<div class="dialog-backdrop"></div>');var n=setInterval(function(){0==e.dialogs.length&&$(".dialog-backdrop").length&&($(".dialog-backdrop").remove(),clearInterval(n))},100)}this.$container.append(t.$el),""===t.template&&0==P()&&(t.$el.find(".dialog-body").addClass("ps-dark"),new y(t.$el.find(".dialog-body")[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20}),t.$el.find(".dialog-body").addClass("ps-show-rail-y")),t.animation&&t.$el.find(".dialog-content").addClass(t.animationSpeed).animateCss(t.animationIn),this.onShow(t)},e.close=function(t){var e=this,o=null;this.dialogs.length>1&&(o=$(this.dialogs).eq(-2)[0].$el),0===$('.dialog[data-dialog-backdrop="true"]').length&&$(".dialog-backdrop").length&&$(".dialog-backdrop").remove(),t.animation?t.$el.find(".dialog-content").animateCss(t.animationOut,function(){t.$el.remove(),e.dialogs=$.grep(e.dialogs,function(e){return e.uuid!=t.uuid}),0==e.dialogs.length?(e.$container.removeClass("has-dialogs"),e.$container.hasClass("dialog-prevent-scroll")&&e.$container.removeClass("dialog-prevent-scroll")):o&&o.css("opacity",1)}):(t.$el.remove(),this.dialogs=$.grep(this.dialogs,function(e){return e.uuid!=t.uuid}),0==this.dialogs.length?(this.$container.removeClass("has-dialogs"),this.$container.hasClass("dialog-prevent-scroll")&&this.$container.removeClass("dialog-prevent-scroll")):o&&o.css("opacity",1)),this.onClose(t)},e.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},e.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},e.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},e.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},e.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},e.log=function(){var t;this.debug&&("function"==typeof this.debug?this.debug.apply(this,arguments):(t=console).log.apply(t,arguments))},e._renderFooter=function(t){var e="";if("function"==typeof t.footer)e=t.footer();else if(""!==t.footer&&!1!==t.footer&&!0!==t.footer)e=t.footer;else{if(!0!==t.footer)return e;var o="",i="",n="";t.actions.close.visible&&(o='\n <button type="button" class="btn '+(t.actions.close.primary?"btn-primary":"btn-secondary")+(t.actions.close.classes?" "+t.actions.close.classes:"")+'"'+(t.actions.close.attrs?" "+t.actions.close.attrs:"")+" data-dialog-close>\n "+t.actions.close.content+"\n </button>\n "),t.actions.remove.visible&&(i='\n <button type="button" class="btn '+(t.actions.remove.primary?"btn-primary":"btn-secondary")+(t.actions.remove.classes?" "+t.actions.remove.classes:"")+'"'+(t.actions.remove.attrs?" "+t.actions.remove.attrs:"")+" data-dialog-remove>\n "+t.actions.remove.content+"\n </button>\n "),t.actions.confirm.visible&&(n='\n <button type="button" class="btn '+(t.actions.confirm.primary?"btn-primary":"btn-secondary")+(t.actions.confirm.classes?" "+t.actions.confirm.classes:"")+'"'+(t.actions.confirm.attrs?" "+t.actions.confirm.attrs:"")+" data-dialog-confirm>\n "+t.actions.confirm.content+"\n </button>\n "),e="\n "+o+"\n "+i+"\n "+n+"\n "}if(e)return'\n <div class="dialog-footer">\n '+e+"\n </div>\n "},e._renderTemplate=function(t){var e=this.faPro?"far":"fas",o=t.classes?" "+t.classes:"",i=t.centered?" dialog-centered":"",n=t.size?" dialog-"+t.size:"",s=' data-dialog-uuid="'+t.uuid+'"',l=t.backdrop?' data-dialog-backdrop="true"':' data-dialog-backdrop="false"',a=t.title,r=t.closeBtn?'<button type="button" data-dialog-close><i class="'+e+' fa-times icon"></i></button>':"",h=t.maxBodyHeight?' style="max-height: '+t.maxBodyHeight+'px"':"",c=this._renderFooter(t);return'\n <div class="dialog'+o+i+n+'"'+s+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 '+a+"\n </span>\n\n "+r+'\n\n </div>\n\n <div class="dialog-body"'+h+">\n\n "+("function"==typeof t.body?t.body():t.body)+"\n\n </div>\n\n "+c+"\n\n </div>\n\n </div>\n\n </div>\n "},t._jQueryInterface=function(e){var o=$(this).data("plugin_coolDialog");if(o||(o=new t(this,"object"==typeof e&&e),$(this).data("plugin_coolDialog",o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}},t}();if("undefined"!=typeof $){var et,ot=$.fn[Z];$.fn[Z]=tt._jQueryInterface,$.fn[Z].Constructor=tt,$.fn[Z].noConflict=function(){return $.fn[Z]=ot,tt._jQueryInterface},$.fn[Z].defaults=((et={title:"",template:"",body:"",footer:!0,size:"",classes:"",centered:!0,backdrop:!0,preventScroll:!0,closeBtn:!0,animation:!0,animationIn:"zoomIn",animationOut:"fadeOut",animationSpeed:"fastest",callbacks:{},maxBodyHeight:window.innerHeight-200,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:S,Popover:X,Select:E,Dropdown:M,Tooltip:R,SectionTabs:B,Collapse:F,Toast:G,Dialog:tt}});
|
|
45
12
|
//# sourceMappingURL=cool.bundle.min.js.map
|