/home/smartonegroup/www/veroserv/ui/theme/default/js/app.min.js
!function(t,e){"use strict";"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)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var i=[],n=Object.getPrototypeOf,o=i.slice,r=i.flat?function(t){return i.flat.call(t)}:function(t){return i.concat.apply([],t)},s=i.push,a=i.indexOf,l={},c=l.toString,d=l.hasOwnProperty,h=d.toString,u=h.call(Object),p={},f=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},g=function(t){return null!=t&&t===t.window},m=t.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(t,e,i){var n,o,r=(i=i||m).createElement("script");if(r.text=t,e)for(n in v)(o=e[n]||e.getAttribute&&e.getAttribute(n))&&r.setAttribute(n,o);i.head.appendChild(r).parentNode.removeChild(r)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[c.call(t)]||"object":typeof t}var x="3.5.1",w=function(t,e){return new w.fn.init(t,e)};function S(t){var e=!!t&&"length"in t&&t.length,i=b(t);return!f(t)&&!g(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}w.fn=w.prototype={jquery:x,constructor:w,length:0,toArray:function(){return o.call(this)},get:function(t){return null==t?o.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=w.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return w.each(this,t)},map:function(t){return this.pushStack(w.map(this,(function(e,i){return t.call(e,i,e)})))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:i.sort,splice:i.splice},w.extend=w.fn.extend=function(){var t,e,i,n,o,r,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||f(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=t[e],"__proto__"!==e&&s!==n&&(c&&n&&(w.isPlainObject(n)||(o=Array.isArray(n)))?(i=s[e],r=o&&!Array.isArray(i)?[]:o||w.isPlainObject(i)?i:{},o=!1,s[e]=w.extend(c,r,n)):void 0!==n&&(s[e]=n));return s},w.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==c.call(t)||(e=n(t))&&("function"!=typeof(i=d.call(e,"constructor")&&e.constructor)||h.call(i)!==u))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,i){y(t,{nonce:e&&e.nonce},i)},each:function(t,e){var i,n=0;if(S(t))for(i=t.length;n<i&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},makeArray:function(t,e){var i=e||[];return null!=t&&(S(Object(t))?w.merge(i,"string"==typeof t?[t]:t):s.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:a.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,o=t.length;n<i;n++)t[o++]=e[n];return t.length=o,t},grep:function(t,e,i){for(var n=[],o=0,r=t.length,s=!i;o<r;o++)!e(t[o],o)!==s&&n.push(t[o]);return n},map:function(t,e,i){var n,o,s=0,a=[];if(S(t))for(n=t.length;s<n;s++)null!=(o=e(t[s],s,i))&&a.push(o);else for(s in t)null!=(o=e(t[s],s,i))&&a.push(o);return r(a)},guid:1,support:p}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=i[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){l["[object "+e+"]"]=e.toLowerCase()}));var C=function(t){var e,i,n,o,r,s,a,l,c,d,h,u,p,f,g,m,v,y,b,x="sizzle"+1*new Date,w=t.document,S=0,C=0,k=lt(),_=lt(),T=lt(),D=lt(),E=function(t,e){return t===e&&(h=!0),0},A={}.hasOwnProperty,I=[],P=I.pop,M=I.push,L=I.push,R=I.slice,O=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="[\\x20\\t\\r\\n\\f]",H="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",z="\\[[\\x20\\t\\r\\n\\f]*("+H+")(?:"+N+"*([*^$|!~]?=)"+N+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+H+"))|)"+N+"*\\]",B=":("+H+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",$=new RegExp(N+"+","g"),j=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),W=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),Y=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),X=new RegExp(N+"|>"),V=new RegExp(B),q=new RegExp("^"+H+"$"),U={ID:new RegExp("^#("+H+")"),CLASS:new RegExp("^\\.("+H+")"),TAG:new RegExp("^("+H+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),it=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},nt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){u()},st=xt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(I=R.call(w.childNodes),w.childNodes),I[w.childNodes.length].nodeType}catch(t){L={apply:I.length?function(t,e){M.apply(t,R.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function at(t,e,n,o){var r,a,c,d,h,f,v,y=e&&e.ownerDocument,w=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return n;if(!o&&(u(e),e=e||p,g)){if(11!==w&&(h=J.exec(t)))if(r=h[1]){if(9===w){if(!(c=e.getElementById(r)))return n;if(c.id===r)return n.push(c),n}else if(y&&(c=y.getElementById(r))&&b(e,c)&&c.id===r)return n.push(c),n}else{if(h[2])return L.apply(n,e.getElementsByTagName(t)),n;if((r=h[3])&&i.getElementsByClassName&&e.getElementsByClassName)return L.apply(n,e.getElementsByClassName(r)),n}if(i.qsa&&!D[t+" "]&&(!m||!m.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(v=t,y=e,1===w&&(X.test(t)||Y.test(t))){for((y=tt.test(t)&&vt(e.parentNode)||e)===e&&i.scope||((d=e.getAttribute("id"))?d=d.replace(nt,ot):e.setAttribute("id",d=x)),a=(f=s(t)).length;a--;)f[a]=(d?"#"+d:":scope")+" "+bt(f[a]);v=f.join(",")}try{return L.apply(n,y.querySelectorAll(v)),n}catch(e){D(t,!0)}finally{d===x&&e.removeAttribute("id")}}}return l(t.replace(j,"$1"),e,n,o)}function lt(){var t=[];return function e(i,o){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=o}}function ct(t){return t[x]=!0,t}function dt(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ht(t,e){for(var i=t.split("|"),o=i.length;o--;)n.attrHandle[i[o]]=e}function ut(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function pt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function gt(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&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ct((function(e){return e=+e,ct((function(i,n){for(var o,r=t([],i.length,e),s=r.length;s--;)i[o=r[s]]&&(i[o]=!(n[o]=i[o]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=at.support={},r=at.isXML=function(t){var e=t.namespaceURI,i=(t.ownerDocument||t).documentElement;return!G.test(e||i&&i.nodeName||"HTML")},u=at.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:w;return s!=p&&9===s.nodeType&&s.documentElement?(f=(p=s).documentElement,g=!r(p),w!=p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",rt,!1):o.attachEvent&&o.attachEvent("onunload",rt)),i.scope=dt((function(t){return f.appendChild(t).appendChild(p.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),i.attributes=dt((function(t){return t.className="i",!t.getAttribute("className")})),i.getElementsByTagName=dt((function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length})),i.getElementsByClassName=Q.test(p.getElementsByClassName),i.getById=dt((function(t){return f.appendChild(t).id=x,!p.getElementsByName||!p.getElementsByName(x).length})),i.getById?(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&g){var i,n,o,r=e.getElementById(t);if(r){if((i=r.getAttributeNode("id"))&&i.value===t)return[r];for(o=e.getElementsByName(t),n=0;r=o[n++];)if((i=r.getAttributeNode("id"))&&i.value===t)return[r]}return[]}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&g)return e.getElementsByClassName(t)},v=[],m=[],(i.qsa=Q.test(p.querySelectorAll))&&(dt((function(t){var e;f.appendChild(t).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+F+")"),t.querySelectorAll("[id~="+x+"-]").length||m.push("~="),(e=p.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||m.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]"),t.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),dt((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[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),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(",.*:")}))),(i.matchesSelector=Q.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&dt((function(t){i.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",B)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),e=Q.test(f.compareDocumentPosition),b=e||Q.test(f.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}: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 n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t==p||t.ownerDocument==w&&b(w,t)?-1:e==p||e.ownerDocument==w&&b(w,e)?1:d?O(d,t)-O(d,e):0:4&n?-1:1)}:function(t,e){if(t===e)return h=!0,0;var i,n=0,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t==p?-1:e==p?1:o?-1:r?1:d?O(d,t)-O(d,e):0;if(o===r)return ut(t,e);for(i=t;i=i.parentNode;)s.unshift(i);for(i=e;i=i.parentNode;)a.unshift(i);for(;s[n]===a[n];)n++;return n?ut(s[n],a[n]):s[n]==w?-1:a[n]==w?1:0},p):p},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(u(t),i.matchesSelector&&g&&!D[e+" "]&&(!v||!v.test(e))&&(!m||!m.test(e)))try{var n=y.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){D(e,!0)}return at(e,p,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=p&&u(t),b(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=p&&u(t);var o=n.attrHandle[e.toLowerCase()],r=o&&A.call(n.attrHandle,e.toLowerCase())?o(t,e,!g):void 0;return void 0!==r?r:i.attributes||!g?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},at.escape=function(t){return(t+"").replace(nt,ot)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,n=[],o=0,r=0;if(h=!i.detectDuplicates,d=!i.sortStable&&t.slice(0),t.sort(E),h){for(;e=t[r++];)e===t[r]&&(o=n.push(r));for(;o--;)t.splice(n[o],1)}return d=null,t},o=at.getText=function(t){var e,i="",n=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[n++];)i+=o(e);return i},n=at.selectors={cacheLength:50,createPseudo:ct,match:U,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(et,it),t[3]=(t[3]||t[4]||t[5]||"").replace(et,it),"~="===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]||at.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]&&at.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return U.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&V.test(i)&&(e=s(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,it).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=k[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+N+"|$)"))&&k(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var o=at.attr(n,t);return null==o?"!="===e:!e||(o+="","="===e?o===i:"!="===e?o!==i:"^="===e?i&&0===o.indexOf(i):"*="===e?i&&o.indexOf(i)>-1:"$="===e?i&&o.slice(-i.length)===i:"~="===e?(" "+o.replace($," ")+" ").indexOf(i)>-1:"|="===e&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,o){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===o?function(t){return!!t.parentNode}:function(e,i,l){var c,d,h,u,p,f,g=r!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(r){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?m.firstChild:m.lastChild],s&&y){for(b=(p=(c=(d=(h=(u=m)[x]||(u[x]={}))[u.uniqueID]||(h[u.uniqueID]={}))[t]||[])[0]===S&&c[1])&&c[2],u=p&&m.childNodes[p];u=++p&&u&&u[g]||(b=p=0)||f.pop();)if(1===u.nodeType&&++b&&u===e){d[t]=[S,p,b];break}}else if(y&&(b=p=(c=(d=(h=(u=e)[x]||(u[x]={}))[u.uniqueID]||(h[u.uniqueID]={}))[t]||[])[0]===S&&c[1]),!1===b)for(;(u=++p&&u&&u[g]||(b=p=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++b||(y&&((d=(h=u[x]||(u[x]={}))[u.uniqueID]||(h[u.uniqueID]={}))[t]=[S,b]),u!==e)););return(b-=o)===n||b%n==0&&b/n>=0}}},PSEUDO:function(t,e){var i,o=n.pseudos[t]||n.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return o[x]?o(e):o.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?ct((function(t,i){for(var n,r=o(t,e),s=r.length;s--;)t[n=O(t,r[s])]=!(i[n]=r[s])})):function(t){return o(t,0,i)}):o}},pseudos:{not:ct((function(t){var e=[],i=[],n=a(t.replace(j,"$1"));return n[x]?ct((function(t,e,i,o){for(var r,s=n(t,null,o,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))})):function(t,o,r){return e[0]=t,n(e,null,r,i),e[0]=null,!i.pop()}})),has:ct((function(t){return function(e){return at(t,e).length>0}})),contains:ct((function(t){return t=t.replace(et,it),function(e){return(e.textContent||o(e)).indexOf(t)>-1}})),lang:ct((function(t){return q.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,it).toLowerCase(),function(e){var i;do{if(i=g?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var i=t.location&&t.location.hash;return i&&i.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:gt(!1),disabled:gt(!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!n.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return Z.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:mt((function(){return[0]})),last:mt((function(t,e){return[e-1]})),eq:mt((function(t,e,i){return[i<0?i+e:i]})),even:mt((function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t})),odd:mt((function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t})),lt:mt((function(t,e,i){for(var n=i<0?i+e:i>e?e:i;--n>=0;)t.push(n);return t})),gt:mt((function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t}))}},n.pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=pt(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=ft(e);function yt(){}function bt(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function xt(t,e,i){var n=e.dir,o=e.next,r=o||n,s=i&&"parentNode"===r,a=C++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,o);return!1}:function(e,i,l){var c,d,h,u=[S,a];if(l){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,l))return!0}else for(;e=e[n];)if(1===e.nodeType||s)if(d=(h=e[x]||(e[x]={}))[e.uniqueID]||(h[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[n]||e;else{if((c=d[r])&&c[0]===S&&c[1]===a)return u[2]=c[2];if(d[r]=u,u[2]=t(e,i,l))return!0}return!1}}function wt(t){return t.length>1?function(e,i,n){for(var o=t.length;o--;)if(!t[o](e,i,n))return!1;return!0}:t[0]}function St(t,e,i,n,o){for(var r,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(r=t[a])&&(i&&!i(r,n,o)||(s.push(r),c&&e.push(a)));return s}function Ct(t,e,i,n,o,r){return n&&!n[x]&&(n=Ct(n)),o&&!o[x]&&(o=Ct(o,r)),ct((function(r,s,a,l){var c,d,h,u=[],p=[],f=s.length,g=r||function(t,e,i){for(var n=0,o=e.length;n<o;n++)at(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),m=!t||!r&&e?g:St(g,u,t,a,l),v=i?o||(r?t:f||n)?[]:s:m;if(i&&i(m,v,a,l),n)for(c=St(v,p),n(c,[],a,l),d=c.length;d--;)(h=c[d])&&(v[p[d]]=!(m[p[d]]=h));if(r){if(o||t){if(o){for(c=[],d=v.length;d--;)(h=v[d])&&c.push(m[d]=h);o(null,v=[],c,l)}for(d=v.length;d--;)(h=v[d])&&(c=o?O(r,h):u[d])>-1&&(r[c]=!(s[c]=h))}}else v=St(v===s?v.splice(f,v.length):v),o?o(null,s,v,l):L.apply(s,v)}))}function kt(t){for(var e,i,o,r=t.length,s=n.relative[t[0].type],a=s||n.relative[" "],l=s?1:0,d=xt((function(t){return t===e}),a,!0),h=xt((function(t){return O(e,t)>-1}),a,!0),u=[function(t,i,n){var o=!s&&(n||i!==c)||((e=i).nodeType?d(t,i,n):h(t,i,n));return e=null,o}];l<r;l++)if(i=n.relative[t[l].type])u=[xt(wt(u),i)];else{if((i=n.filter[t[l].type].apply(null,t[l].matches))[x]){for(o=++l;o<r&&!n.relative[t[o].type];o++);return Ct(l>1&&wt(u),l>1&&bt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(j,"$1"),i,l<o&&kt(t.slice(l,o)),o<r&&kt(t=t.slice(o)),o<r&&bt(t))}u.push(i)}return wt(u)}return yt.prototype=n.filters=n.pseudos,n.setFilters=new yt,s=at.tokenize=function(t,e){var i,o,r,s,a,l,c,d=_[t+" "];if(d)return e?0:d.slice(0);for(a=t,l=[],c=n.preFilter;a;){for(s in i&&!(o=W.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),i=!1,(o=Y.exec(a))&&(i=o.shift(),r.push({value:i,type:o[0].replace(j," ")}),a=a.slice(i.length)),n.filter)!(o=U[s].exec(a))||c[s]&&!(o=c[s](o))||(i=o.shift(),r.push({value:i,type:s,matches:o}),a=a.slice(i.length));if(!i)break}return e?a.length:a?at.error(t):_(t,l).slice(0)},a=at.compile=function(t,e){var i,o=[],r=[],a=T[t+" "];if(!a){for(e||(e=s(t)),i=e.length;i--;)(a=kt(e[i]))[x]?o.push(a):r.push(a);a=T(t,function(t,e){var i=e.length>0,o=t.length>0,r=function(r,s,a,l,d){var h,f,m,v=0,y="0",b=r&&[],x=[],w=c,C=r||o&&n.find.TAG("*",d),k=S+=null==w?1:Math.random()||.1,_=C.length;for(d&&(c=s==p||s||d);y!==_&&null!=(h=C[y]);y++){if(o&&h){for(f=0,s||h.ownerDocument==p||(u(h),a=!g);m=t[f++];)if(m(h,s||p,a)){l.push(h);break}d&&(S=k)}i&&((h=!m&&h)&&v--,r&&b.push(h))}if(v+=y,i&&y!==v){for(f=0;m=e[f++];)m(b,x,s,a);if(r){if(v>0)for(;y--;)b[y]||x[y]||(x[y]=P.call(l));x=St(x)}L.apply(l,x),d&&!r&&x.length>0&&v+e.length>1&&at.uniqueSort(l)}return d&&(S=k,c=w),b};return i?ct(r):r}(r,o)),a.selector=t}return a},l=at.select=function(t,e,i,o){var r,l,c,d,h,u="function"==typeof t&&t,p=!o&&s(t=u.selector||t);if(i=i||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&g&&n.relative[l[1].type]){if(!(e=(n.find.ID(c.matches[0].replace(et,it),e)||[])[0]))return i;u&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(r=U.needsContext.test(t)?0:l.length;r--&&(c=l[r],!n.relative[d=c.type]);)if((h=n.find[d])&&(o=h(c.matches[0].replace(et,it),tt.test(l[0].type)&&vt(e.parentNode)||e))){if(l.splice(r,1),!(t=o.length&&bt(l)))return L.apply(i,o),i;break}}return(u||a(t,p))(o,e,!g,i,!e||tt.test(t)&&vt(e.parentNode)||e),i},i.sortStable=x.split("").sort(E).join("")===x,i.detectDuplicates=!!h,u(),i.sortDetached=dt((function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))})),dt((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ht("type|href|height|width",(function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),i.attributes&&dt((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ht("value",(function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),dt((function(t){return null==t.getAttribute("disabled")}))||ht(F,(function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null})),at}(t);w.find=C,w.expr=C.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=C.uniqueSort,w.text=C.getText,w.isXMLDoc=C.isXML,w.contains=C.contains,w.escapeSelector=C.escape;var k=function(t,e,i){for(var n=[],o=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&w(t).is(i))break;n.push(t)}return n},_=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},T=w.expr.match.needsContext;function D(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(t,e,i){return f(e)?w.grep(t,(function(t,n){return!!e.call(t,n,t)!==i})):e.nodeType?w.grep(t,(function(t){return t===e!==i})):"string"!=typeof e?w.grep(t,(function(t){return a.call(e,t)>-1!==i})):w.filter(e,t,i)}w.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?w.find.matchesSelector(n,t)?[n]:[]:w.find.matches(t,w.grep(e,(function(t){return 1===t.nodeType})))},w.fn.extend({find:function(t){var e,i,n=this.length,o=this;if("string"!=typeof t)return this.pushStack(w(t).filter((function(){for(e=0;e<n;e++)if(w.contains(o[e],this))return!0})));for(i=this.pushStack([]),e=0;e<n;e++)w.find(t,o[e],i);return n>1?w.uniqueSort(i):i},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&&T.test(t)?w(t):t||[],!1).length}});var I,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||I,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof w?e[0]:e,w.merge(this,w.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:m,!0)),E.test(n[1])&&w.isPlainObject(e))for(n in e)f(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(o=m.getElementById(n[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):f(t)?void 0!==i.ready?i.ready(t):t(w):w.makeArray(t,this)}).prototype=w.fn,I=w(m);var M=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function R(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}w.fn.extend({has:function(t){var e=w(t,this),i=e.length;return this.filter((function(){for(var t=0;t<i;t++)if(w.contains(this,e[t]))return!0}))},closest:function(t,e){var i,n=0,o=this.length,r=[],s="string"!=typeof t&&w(t);if(!T.test(t))for(;n<o;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&w.find.matchesSelector(i,t))){r.push(i);break}return this.pushStack(r.length>1?w.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?a.call(w(t),this[0]):a.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),w.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,e,i){return k(t,"parentNode",i)},next:function(t){return R(t,"nextSibling")},prev:function(t){return R(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,e,i){return k(t,"nextSibling",i)},prevUntil:function(t,e,i){return k(t,"previousSibling",i)},siblings:function(t){return _((t.parentNode||{}).firstChild,t)},children:function(t){return _(t.firstChild)},contents:function(t){return null!=t.contentDocument&&n(t.contentDocument)?t.contentDocument:(D(t,"template")&&(t=t.content||t),w.merge([],t.childNodes))}},(function(t,e){w.fn[t]=function(i,n){var o=w.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=w.filter(n,o)),this.length>1&&(L[t]||w.uniqueSort(o),M.test(t)&&o.reverse()),this.pushStack(o)}}));var O=/[^\x20\t\r\n\f]+/g;function F(t){return t}function N(t){throw t}function H(t,e,i,n){var o;try{t&&f(o=t.promise)?o.call(t).done(e).fail(i):t&&f(o=t.then)?o.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}w.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return w.each(t.match(O)||[],(function(t,i){e[i]=!0})),e}(t):w.extend({},t);var e,i,n,o,r=[],s=[],a=-1,l=function(){for(o=o||t.once,n=e=!0;s.length;a=-1)for(i=s.shift();++a<r.length;)!1===r[a].apply(i[0],i[1])&&t.stopOnFalse&&(a=r.length,i=!1);t.memory||(i=!1),e=!1,o&&(r=i?[]:"")},c={add:function(){return r&&(i&&!e&&(a=r.length-1,s.push(i)),function e(i){w.each(i,(function(i,n){f(n)?t.unique&&c.has(n)||r.push(n):n&&n.length&&"string"!==b(n)&&e(n)}))}(arguments),i&&!e&&l()),this},remove:function(){return w.each(arguments,(function(t,e){for(var i;(i=w.inArray(e,r,i))>-1;)r.splice(i,1),i<=a&&a--})),this},has:function(t){return t?w.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=s=[],r=i="",this},disabled:function(){return!r},lock:function(){return o=s=[],i||e||(r=i=""),this},locked:function(){return!!o},fireWith:function(t,i){return o||(i=[t,(i=i||[]).slice?i.slice():i],s.push(i),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},w.extend({Deferred:function(e){var i=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return w.Deferred((function(e){w.each(i,(function(i,n){var o=f(t[n[4]])&&t[n[4]];r[n[1]]((function(){var t=o&&o.apply(this,arguments);t&&f(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[n[0]+"With"](this,o?[t]:arguments)}))})),t=null})).promise()},then:function(e,n,o){var r=0;function s(e,i,n,o){return function(){var a=this,l=arguments,c=function(){var t,c;if(!(e<r)){if((t=n.apply(a,l))===i.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,f(c)?o?c.call(t,s(r,i,F,o),s(r,i,N,o)):(r++,c.call(t,s(r,i,F,o),s(r,i,N,o),s(r,i,F,i.notifyWith))):(n!==F&&(a=void 0,l=[t]),(o||i.resolveWith)(a,l))}},d=o?c:function(){try{c()}catch(t){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(t,d.stackTrace),e+1>=r&&(n!==N&&(a=void 0,l=[t]),i.rejectWith(a,l))}};e?d():(w.Deferred.getStackHook&&(d.stackTrace=w.Deferred.getStackHook()),t.setTimeout(d))}}return w.Deferred((function(t){i[0][3].add(s(0,t,f(o)?o:F,t.notifyWith)),i[1][3].add(s(0,t,f(e)?e:F)),i[2][3].add(s(0,t,f(n)?n:N))})).promise()},promise:function(t){return null!=t?w.extend(t,o):o}},r={};return w.each(i,(function(t,e){var s=e[2],a=e[5];o[e[1]]=s.add,a&&s.add((function(){n=a}),i[3-t][2].disable,i[3-t][3].disable,i[0][2].lock,i[0][3].lock),s.add(e[3].fire),r[e[0]]=function(){return r[e[0]+"With"](this===r?void 0:this,arguments),this},r[e[0]+"With"]=s.fireWith})),o.promise(r),e&&e.call(r,r),r},when:function(t){var e=arguments.length,i=e,n=Array(i),r=o.call(arguments),s=w.Deferred(),a=function(t){return function(i){n[t]=this,r[t]=arguments.length>1?o.call(arguments):i,--e||s.resolveWith(n,r)}};if(e<=1&&(H(t,s.done(a(i)).resolve,s.reject,!e),"pending"===s.state()||f(r[i]&&r[i].then)))return s.then();for(;i--;)H(r[i],a(i),s.reject);return s.promise()}});var z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,i){t.console&&t.console.warn&&e&&z.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},w.readyException=function(e){t.setTimeout((function(){throw e}))};var B=w.Deferred();function $(){m.removeEventListener("DOMContentLoaded",$),t.removeEventListener("load",$),w.ready()}w.fn.ready=function(t){return B.then(t).catch((function(t){w.readyException(t)})),this},w.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==t&&--w.readyWait>0||B.resolveWith(m,[w]))}}),w.ready.then=B.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?t.setTimeout(w.ready):(m.addEventListener("DOMContentLoaded",$),t.addEventListener("load",$));var j=function(t,e,i,n,o,r,s){var a=0,l=t.length,c=null==i;if("object"===b(i))for(a in o=!0,i)j(t,e,a,i[a],!0,r,s);else if(void 0!==n&&(o=!0,f(n)||(s=!0),c&&(s?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(w(t),i)})),e))for(;a<l;a++)e(t[a],i,s?n:n.call(t[a],a,e(t[a],i)));return o?t:c?e.call(t):l?e(t[0],i):r},W=/^-ms-/,Y=/-([a-z])/g;function X(t,e){return e.toUpperCase()}function V(t){return t.replace(W,"ms-").replace(Y,X)}var q=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function U(){this.expando=w.expando+U.uid++}U.uid=1,U.prototype={cache:function(t){var e=t[this.expando];return e||(e={},q(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,o=this.cache(t);if("string"==typeof e)o[V(e)]=i;else for(n in e)o[V(n)]=e[n];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][V(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(V):(e=V(e))in n?[e]:e.match(O)||[]).length;for(;i--;)delete n[e[i]]}(void 0===e||w.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!w.isEmptyObject(e)}};var G=new U,Z=new U,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function J(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(Q,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:K.test(t)?JSON.parse(t):t)}(i)}catch(t){}Z.set(t,e,i)}else i=void 0;return i}w.extend({hasData:function(t){return Z.hasData(t)||G.hasData(t)},data:function(t,e,i){return Z.access(t,e,i)},removeData:function(t,e){Z.remove(t,e)},_data:function(t,e,i){return G.access(t,e,i)},_removeData:function(t,e){G.remove(t,e)}}),w.fn.extend({data:function(t,e){var i,n,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=Z.get(r),1===r.nodeType&&!G.get(r,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&0===(n=s[i].name).indexOf("data-")&&(n=V(n.slice(5)),J(r,n,o[n]));G.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each((function(){Z.set(this,t)})):j(this,(function(e){var i;if(r&&void 0===e)return void 0!==(i=Z.get(r,t))||void 0!==(i=J(r,t))?i:void 0;this.each((function(){Z.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),w.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=G.get(t,e),i&&(!n||Array.isArray(i)?n=G.access(t,e,w.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=w.queue(t,e),n=i.length,o=i.shift(),r=w._queueHooks(t,e);"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===e&&i.unshift("inprogress"),delete r.stop,o.call(t,(function(){w.dequeue(t,e)}),r)),!n&&r&&r.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return G.get(t,i)||G.access(t,i,{empty:w.Callbacks("once memory").add((function(){G.remove(t,[e+"queue",i])}))})}}),w.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?w.queue(this[0],t):void 0===e?this:this.each((function(){var i=w.queue(this,t,e);w._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&w.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){w.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,o=w.Deferred(),r=this,s=this.length,a=function(){--n||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(i=G.get(r[s],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),o.promise(e)}});var tt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,et=new RegExp("^(?:([+-])=|)("+tt+")([a-z%]*)$","i"),it=["Top","Right","Bottom","Left"],nt=m.documentElement,ot=function(t){return w.contains(t.ownerDocument,t)},rt={composed:!0};nt.getRootNode&&(ot=function(t){return w.contains(t.ownerDocument,t)||t.getRootNode(rt)===t.ownerDocument});var st=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ot(t)&&"none"===w.css(t,"display")};function at(t,e,i,n){var o,r,s=20,a=n?function(){return n.cur()}:function(){return w.css(t,e,"")},l=a(),c=i&&i[3]||(w.cssNumber[e]?"":"px"),d=t.nodeType&&(w.cssNumber[e]||"px"!==c&&+l)&&et.exec(w.css(t,e));if(d&&d[3]!==c){for(l/=2,c=c||d[3],d=+l||1;s--;)w.style(t,e,d+c),(1-r)*(1-(r=a()/l||.5))<=0&&(s=0),d/=r;d*=2,w.style(t,e,d+c),i=i||[]}return i&&(d=+d||+l||0,o=i[1]?d+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=d,n.end=o)),o}var lt={};function ct(t){var e,i=t.ownerDocument,n=t.nodeName,o=lt[n];return o||(e=i.body.appendChild(i.createElement(n)),o=w.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),lt[n]=o,o)}function dt(t,e){for(var i,n,o=[],r=0,s=t.length;r<s;r++)(n=t[r]).style&&(i=n.style.display,e?("none"===i&&(o[r]=G.get(n,"display")||null,o[r]||(n.style.display="")),""===n.style.display&&st(n)&&(o[r]=ct(n))):"none"!==i&&(o[r]="none",G.set(n,"display",i)));for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}w.fn.extend({show:function(){return dt(this,!0)},hide:function(){return dt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){st(this)?w(this).show():w(this).hide()}))}});var ht,ut,pt=/^(?:checkbox|radio)$/i,ft=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i;ht=m.createDocumentFragment().appendChild(m.createElement("div")),(ut=m.createElement("input")).setAttribute("type","radio"),ut.setAttribute("checked","checked"),ut.setAttribute("name","t"),ht.appendChild(ut),p.checkClone=ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="<option></option>",p.option=!!ht.lastChild;var mt={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 vt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&D(t,e)?w.merge([t],i):i}function yt(t,e){for(var i=0,n=t.length;i<n;i++)G.set(t[i],"globalEval",!e||G.get(e[i],"globalEval"))}mt.tbody=mt.tfoot=mt.colgroup=mt.caption=mt.thead,mt.th=mt.td,p.option||(mt.optgroup=mt.option=[1,"<select multiple='multiple'>","</select>"]);var bt=/<|&#?\w+;/;function xt(t,e,i,n,o){for(var r,s,a,l,c,d,h=e.createDocumentFragment(),u=[],p=0,f=t.length;p<f;p++)if((r=t[p])||0===r)if("object"===b(r))w.merge(u,r.nodeType?[r]:r);else if(bt.test(r)){for(s=s||h.appendChild(e.createElement("div")),a=(ft.exec(r)||["",""])[1].toLowerCase(),l=mt[a]||mt._default,s.innerHTML=l[1]+w.htmlPrefilter(r)+l[2],d=l[0];d--;)s=s.lastChild;w.merge(u,s.childNodes),(s=h.firstChild).textContent=""}else u.push(e.createTextNode(r));for(h.textContent="",p=0;r=u[p++];)if(n&&w.inArray(r,n)>-1)o&&o.push(r);else if(c=ot(r),s=vt(h.appendChild(r),"script"),c&&yt(s),i)for(d=0;r=s[d++];)gt.test(r.type||"")&&i.push(r);return h}var wt=/^key/,St=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ct=/^([^.]*)(?:\.(.+)|)/;function kt(){return!0}function _t(){return!1}function Tt(t,e){return t===function(){try{return m.activeElement}catch(t){}}()==("focus"===e)}function Dt(t,e,i,n,o,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof i&&(n=n||i,i=void 0),e)Dt(t,a,i,n,e[a],r);return t}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),!1===o)o=_t;else if(!o)return t;return 1===r&&(s=o,o=function(t){return w().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=w.guid++)),t.each((function(){w.event.add(this,e,o,n,i)}))}function Et(t,e,i){i?(G.set(t,e,!1),w.event.add(t,e,{namespace:!1,handler:function(t){var n,r,s=G.get(this,e);if(1&t.isTrigger&&this[e]){if(s.length)(w.event.special[e]||{}).delegateType&&t.stopPropagation();else if(s=o.call(arguments),G.set(this,e,s),n=i(this,e),this[e](),s!==(r=G.get(this,e))||n?G.set(this,e,!1):r={},s!==r)return t.stopImmediatePropagation(),t.preventDefault(),r.value}else s.length&&(G.set(this,e,{value:w.event.trigger(w.extend(s[0],w.Event.prototype),s.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===G.get(t,e)&&w.event.add(t,e,kt)}w.event={global:{},add:function(t,e,i,n,o){var r,s,a,l,c,d,h,u,p,f,g,m=G.get(t);if(q(t))for(i.handler&&(i=(r=i).handler,o=r.selector),o&&w.find.matchesSelector(nt,o),i.guid||(i.guid=w.guid++),(l=m.events)||(l=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(O)||[""]).length;c--;)p=g=(a=Ct.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=w.event.special[p]||{},p=(o?h.delegateType:h.bindType)||p,h=w.event.special[p]||{},d=w.extend({type:p,origType:g,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&w.expr.match.needsContext.test(o),namespace:f.join(".")},r),(u=l[p])||((u=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,n,f,s)||t.addEventListener&&t.addEventListener(p,s)),h.add&&(h.add.call(t,d),d.handler.guid||(d.handler.guid=i.guid)),o?u.splice(u.delegateCount++,0,d):u.push(d),w.event.global[p]=!0)},remove:function(t,e,i,n,o){var r,s,a,l,c,d,h,u,p,f,g,m=G.hasData(t)&&G.get(t);if(m&&(l=m.events)){for(c=(e=(e||"").match(O)||[""]).length;c--;)if(p=g=(a=Ct.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=w.event.special[p]||{},u=l[p=(n?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=u.length;r--;)d=u[r],!o&&g!==d.origType||i&&i.guid!==d.guid||a&&!a.test(d.namespace)||n&&n!==d.selector&&("**"!==n||!d.selector)||(u.splice(r,1),d.selector&&u.delegateCount--,h.remove&&h.remove.call(t,d));s&&!u.length&&(h.teardown&&!1!==h.teardown.call(t,f,m.handle)||w.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)w.event.remove(t,p+e[c],i,n,!0);w.isEmptyObject(l)&&G.remove(t,"handle events")}},dispatch:function(t){var e,i,n,o,r,s,a=new Array(arguments.length),l=w.event.fix(t),c=(G.get(this,"events")||Object.create(null))[l.type]||[],d=w.event.special[l.type]||{};for(a[0]=l,e=1;e<arguments.length;e++)a[e]=arguments[e];if(l.delegateTarget=this,!d.preDispatch||!1!==d.preDispatch.call(this,l)){for(s=w.event.handlers.call(this,l,c),e=0;(o=s[e++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==r.namespace&&!l.rnamespace.test(r.namespace)||(l.handleObj=r,l.data=r.data,void 0!==(n=((w.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))&&!1===(l.result=n)&&(l.preventDefault(),l.stopPropagation()));return d.postDispatch&&d.postDispatch.call(this,l),l.result}},handlers:function(t,e){var i,n,o,r,s,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(r=[],s={},i=0;i<l;i++)void 0===s[o=(n=e[i]).selector+" "]&&(s[o]=n.needsContext?w(o,this).index(c)>-1:w.find(o,this,null,[c]).length),s[o]&&r.push(n);r.length&&a.push({elem:c,handlers:r})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(w.Event.prototype,t,{enumerable:!0,configurable:!0,get:f(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[w.expando]?t:new w.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return pt.test(e.type)&&e.click&&D(e,"input")&&Et(e,"click",kt),!1},trigger:function(t){var e=this||t;return pt.test(e.type)&&e.click&&D(e,"input")&&Et(e,"click"),!0},_default:function(t){var e=t.target;return pt.test(e.type)&&e.click&&D(e,"input")&&G.get(e,"click")||D(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},w.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},w.Event=function(t,e){if(!(this instanceof w.Event))return new w.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?kt:_t,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&&w.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:_t,isPropagationStopped:_t,isImmediatePropagationStopped:_t,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=kt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=kt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=kt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&wt.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&St.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(t,e){w.event.special[t]={setup:function(){return Et(this,t,Tt),!1},trigger:function(){return Et(this,t),!0},delegateType:e}})),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){w.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=t.relatedTarget,o=t.handleObj;return n&&(n===this||w.contains(this,n))||(t.type=o.origType,i=o.handler.apply(this,arguments),t.type=e),i}}})),w.fn.extend({on:function(t,e,i,n){return Dt(this,t,e,i,n)},one:function(t,e,i,n){return Dt(this,t,e,i,n,1)},off:function(t,e,i){var n,o;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,w(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=_t),this.each((function(){w.event.remove(this,t,i,e)}))}});var At=/<script|<style|<link/i,It=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Mt(t,e){return D(t,"table")&&D(11!==e.nodeType?e:e.firstChild,"tr")&&w(t).children("tbody")[0]||t}function Lt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Rt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ot(t,e){var i,n,o,r,s,a;if(1===e.nodeType){if(G.hasData(t)&&(a=G.get(t).events))for(o in G.remove(e,"handle events"),a)for(i=0,n=a[o].length;i<n;i++)w.event.add(e,o,a[o][i]);Z.hasData(t)&&(r=Z.access(t),s=w.extend({},r),Z.set(e,s))}}function Ft(t,e){var i=e.nodeName.toLowerCase();"input"===i&&pt.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function Nt(t,e,i,n){e=r(e);var o,s,a,l,c,d,h=0,u=t.length,g=u-1,m=e[0],v=f(m);if(v||u>1&&"string"==typeof m&&!p.checkClone&&It.test(m))return t.each((function(o){var r=t.eq(o);v&&(e[0]=m.call(this,o,r.html())),Nt(r,e,i,n)}));if(u&&(s=(o=xt(e,t[0].ownerDocument,!1,t,n)).firstChild,1===o.childNodes.length&&(o=s),s||n)){for(l=(a=w.map(vt(o,"script"),Lt)).length;h<u;h++)c=o,h!==g&&(c=w.clone(c,!0,!0),l&&w.merge(a,vt(c,"script"))),i.call(t[h],c,h);if(l)for(d=a[a.length-1].ownerDocument,w.map(a,Rt),h=0;h<l;h++)c=a[h],gt.test(c.type||"")&&!G.access(c,"globalEval")&&w.contains(d,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?w._evalUrl&&!c.noModule&&w._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},d):y(c.textContent.replace(Pt,""),c,d))}return t}function Ht(t,e,i){for(var n,o=e?w.filter(e,t):t,r=0;null!=(n=o[r]);r++)i||1!==n.nodeType||w.cleanData(vt(n)),n.parentNode&&(i&&ot(n)&&yt(vt(n,"script")),n.parentNode.removeChild(n));return t}w.extend({htmlPrefilter:function(t){return t},clone:function(t,e,i){var n,o,r,s,a=t.cloneNode(!0),l=ot(t);if(!(p.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||w.isXMLDoc(t)))for(s=vt(a),n=0,o=(r=vt(t)).length;n<o;n++)Ft(r[n],s[n]);if(e)if(i)for(r=r||vt(t),s=s||vt(a),n=0,o=r.length;n<o;n++)Ot(r[n],s[n]);else Ot(t,a);return(s=vt(a,"script")).length>0&&yt(s,!l&&vt(t,"script")),a},cleanData:function(t){for(var e,i,n,o=w.event.special,r=0;void 0!==(i=t[r]);r++)if(q(i)){if(e=i[G.expando]){if(e.events)for(n in e.events)o[n]?w.event.remove(i,n):w.removeEvent(i,n,e.handle);i[G.expando]=void 0}i[Z.expando]&&(i[Z.expando]=void 0)}}}),w.fn.extend({detach:function(t){return Ht(this,t,!0)},remove:function(t){return Ht(this,t)},text:function(t){return j(this,(function(t){return void 0===t?w.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 Nt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Mt(this,t).appendChild(t)}))},prepend:function(){return Nt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Mt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Nt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Nt(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&&(w.cleanData(vt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return w.clone(this,t,e)}))},html:function(t){return j(this,(function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!At.test(t)&&!mt[(ft.exec(t)||["",""])[1].toLowerCase()]){t=w.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(w.cleanData(vt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Nt(this,arguments,(function(e){var i=this.parentNode;w.inArray(this,t)<0&&(w.cleanData(vt(this)),i&&i.replaceChild(e,this))}),t)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){w.fn[t]=function(t){for(var i,n=[],o=w(t),r=o.length-1,a=0;a<=r;a++)i=a===r?this:this.clone(!0),w(o[a])[e](i),s.apply(n,i.get());return this.pushStack(n)}}));var zt=new RegExp("^("+tt+")(?!px)[a-z%]+$","i"),Bt=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},$t=function(t,e,i){var n,o,r={};for(o in e)r[o]=t.style[o],t.style[o]=e[o];for(o in n=i.call(t),e)t.style[o]=r[o];return n},jt=new RegExp(it.join("|"),"i");function Wt(t,e,i){var n,o,r,s,a=t.style;return(i=i||Bt(t))&&(""!==(s=i.getPropertyValue(e)||i[e])||ot(t)||(s=w.style(t,e)),!p.pixelBoxStyles()&&zt.test(s)&&jt.test(e)&&(n=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function Yt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(d){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",d.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",nt.appendChild(c).appendChild(d);var e=t.getComputedStyle(d);n="1%"!==e.top,l=12===i(e.marginLeft),d.style.right="60%",s=36===i(e.right),o=36===i(e.width),d.style.position="absolute",r=12===i(d.offsetWidth/3),nt.removeChild(c),d=null}}function i(t){return Math.round(parseFloat(t))}var n,o,r,s,a,l,c=m.createElement("div"),d=m.createElement("div");d.style&&(d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===d.style.backgroundClip,w.extend(p,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),r},reliableTrDimensions:function(){var e,i,n,o;return null==a&&(e=m.createElement("table"),i=m.createElement("tr"),n=m.createElement("div"),e.style.cssText="position:absolute;left:-11111px",i.style.height="1px",n.style.height="9px",nt.appendChild(e).appendChild(i).appendChild(n),o=t.getComputedStyle(i),a=parseInt(o.height)>3,nt.removeChild(e)),a}}))}();var Xt=["Webkit","Moz","ms"],Vt=m.createElement("div").style,qt={};function Ut(t){return w.cssProps[t]||qt[t]||(t in Vt?t:qt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),i=Xt.length;i--;)if((t=Xt[i]+e)in Vt)return t}(t)||t)}var Gt=/^(none|table(?!-c[ea]).+)/,Zt=/^--/,Kt={position:"absolute",visibility:"hidden",display:"block"},Qt={letterSpacing:"0",fontWeight:"400"};function Jt(t,e,i){var n=et.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function te(t,e,i,n,o,r){var s="width"===e?1:0,a=0,l=0;if(i===(n?"border":"content"))return 0;for(;s<4;s+=2)"margin"===i&&(l+=w.css(t,i+it[s],!0,o)),n?("content"===i&&(l-=w.css(t,"padding"+it[s],!0,o)),"margin"!==i&&(l-=w.css(t,"border"+it[s]+"Width",!0,o))):(l+=w.css(t,"padding"+it[s],!0,o),"padding"!==i?l+=w.css(t,"border"+it[s]+"Width",!0,o):a+=w.css(t,"border"+it[s]+"Width",!0,o));return!n&&r>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-a-.5))||0),l}function ee(t,e,i){var n=Bt(t),o=(!p.boxSizingReliable()||i)&&"border-box"===w.css(t,"boxSizing",!1,n),r=o,s=Wt(t,e,n),a="offset"+e[0].toUpperCase()+e.slice(1);if(zt.test(s)){if(!i)return s;s="auto"}return(!p.boxSizingReliable()&&o||!p.reliableTrDimensions()&&D(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===w.css(t,"display",!1,n))&&t.getClientRects().length&&(o="border-box"===w.css(t,"boxSizing",!1,n),(r=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+te(t,e,i||(o?"border":"content"),r,n,s)+"px"}function ie(t,e,i,n,o){return new ie.prototype.init(t,e,i,n,o)}w.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Wt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=V(e),l=Zt.test(e),c=t.style;if(l||(e=Ut(a)),s=w.cssHooks[e]||w.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(o=s.get(t,!1,n))?o:c[e];"string"==(r=typeof i)&&(o=et.exec(i))&&o[1]&&(i=at(t,e,o),r="number"),null!=i&&i==i&&("number"!==r||l||(i+=o&&o[3]||(w.cssNumber[a]?"":"px")),p.clearCloneStyle||""!==i||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,n))||(l?c.setProperty(e,i):c[e]=i))}},css:function(t,e,i,n){var o,r,s,a=V(e);return Zt.test(e)||(e=Ut(a)),(s=w.cssHooks[e]||w.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,i)),void 0===o&&(o=Wt(t,e,n)),"normal"===o&&e in Qt&&(o=Qt[e]),""===i||i?(r=parseFloat(o),!0===i||isFinite(r)?r||0:o):o}}),w.each(["height","width"],(function(t,e){w.cssHooks[e]={get:function(t,i,n){if(i)return!Gt.test(w.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ee(t,e,n):$t(t,Kt,(function(){return ee(t,e,n)}))},set:function(t,i,n){var o,r=Bt(t),s=!p.scrollboxSize()&&"absolute"===r.position,a=(s||n)&&"border-box"===w.css(t,"boxSizing",!1,r),l=n?te(t,e,n,a,r):0;return a&&s&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-te(t,e,"border",!1,r)-.5)),l&&(o=et.exec(i))&&"px"!==(o[3]||"px")&&(t.style[e]=i,i=w.css(t,e)),Jt(0,i,l)}}})),w.cssHooks.marginLeft=Yt(p.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-$t(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(t,e){w.cssHooks[t+e]={expand:function(i){for(var n=0,o={},r="string"==typeof i?i.split(" "):[i];n<4;n++)o[t+it[n]+e]=r[n]||r[n-2]||r[0];return o}},"margin"!==t&&(w.cssHooks[t+e].set=Jt)})),w.fn.extend({css:function(t,e){return j(this,(function(t,e,i){var n,o,r={},s=0;if(Array.isArray(e)){for(n=Bt(t),o=e.length;s<o;s++)r[e[s]]=w.css(t,e[s],!1,n);return r}return void 0!==i?w.style(t,e,i):w.css(t,e)}),t,e,arguments.length>1)}}),w.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,i,n,o,r){this.elem=t,this.prop=i,this.easing=o||w.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=r||(w.cssNumber[i]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,i=ie.propHooks[this.prop];return this.options.duration?this.pos=e=w.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),i&&i.set?i.set(this):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.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=w.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){w.fx.step[t.prop]?w.fx.step[t.prop](t):1!==t.elem.nodeType||!w.cssHooks[t.prop]&&null==t.elem.style[Ut(t.prop)]?t.elem[t.prop]=t.now:w.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},w.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},w.fx=ie.prototype.init,w.fx.step={};var ne,oe,re=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function ae(){oe&&(!1===m.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(ae):t.setTimeout(ae,w.fx.interval),w.fx.tick())}function le(){return t.setTimeout((function(){ne=void 0})),ne=Date.now()}function ce(t,e){var i,n=0,o={height:t};for(e=e?1:0;n<4;n+=2-e)o["margin"+(i=it[n])]=o["padding"+i]=t;return e&&(o.opacity=o.width=t),o}function de(t,e,i){for(var n,o=(he.tweeners[e]||[]).concat(he.tweeners["*"]),r=0,s=o.length;r<s;r++)if(n=o[r].call(i,e,t))return n}function he(t,e,i){var n,o,r=0,s=he.prefilters.length,a=w.Deferred().always((function(){delete l.elem})),l=function(){if(o)return!1;for(var e=ne||le(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(n);return a.notifyWith(t,[c,n,i]),n<1&&s?i:(s||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:w.extend({},e),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},i),originalProperties:e,originalOptions:i,startTime:ne||le(),duration:i.duration,tweens:[],createTween:function(e,i){var n=w.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(o)return this;for(o=!0;i<n;i++)c.tweens[i].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),d=c.props;for(function(t,e){var i,n,o,r,s;for(i in t)if(o=e[n=V(i)],r=t[i],Array.isArray(r)&&(o=r[1],r=t[i]=r[0]),i!==n&&(t[n]=r,delete t[i]),(s=w.cssHooks[n])&&"expand"in s)for(i in r=s.expand(r),delete t[n],r)i in t||(t[i]=r[i],e[i]=o);else e[n]=o}(d,c.opts.specialEasing);r<s;r++)if(n=he.prefilters[r].call(c,t,d,c.opts))return f(n.stop)&&(w._queueHooks(c.elem,c.opts.queue).stop=n.stop.bind(n)),n;return w.map(d,de,c),f(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),w.fx.timer(w.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}w.Animation=w.extend(he,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return at(i.elem,t,et.exec(e),i),i}]},tweener:function(t,e){f(t)?(e=t,t=["*"]):t=t.match(O);for(var i,n=0,o=t.length;n<o;n++)i=t[n],he.tweeners[i]=he.tweeners[i]||[],he.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,o,r,s,a,l,c,d,h="width"in e||"height"in e,u=this,p={},f=t.style,g=t.nodeType&&st(t),m=G.get(t,"fxshow");for(n in i.queue||(null==(s=w._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,u.always((function(){u.always((function(){s.unqueued--,w.queue(t,"fx").length||s.empty.fire()}))}))),e)if(o=e[n],re.test(o)){if(delete e[n],r=r||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[n])continue;g=!0}p[n]=m&&m[n]||w.style(t,n)}if((l=!w.isEmptyObject(e))||!w.isEmptyObject(p))for(n in h&&1===t.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=m&&m.display)&&(c=G.get(t,"display")),"none"===(d=w.css(t,"display"))&&(c?d=c:(dt([t],!0),c=t.style.display||c,d=w.css(t,"display"),dt([t]))),("inline"===d||"inline-block"===d&&null!=c)&&"none"===w.css(t,"float")&&(l||(u.done((function(){f.display=c})),null==c&&(d=f.display,c="none"===d?"":d)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",u.always((function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]}))),l=!1,p)l||(m?"hidden"in m&&(g=m.hidden):m=G.access(t,"fxshow",{display:c}),r&&(m.hidden=!g),g&&dt([t],!0),u.done((function(){for(n in g||dt([t]),G.remove(t,"fxshow"),p)w.style(t,n,p[n])}))),l=de(g?m[n]:0,n,u),n in m||(m[n]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?he.prefilters.unshift(t):he.prefilters.push(t)}}),w.speed=function(t,e,i){var n=t&&"object"==typeof t?w.extend({},t):{complete:i||!i&&e||f(t)&&t,duration:t,easing:i&&e||e&&!f(e)&&e};return w.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in w.fx.speeds?n.duration=w.fx.speeds[n.duration]:n.duration=w.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){f(n.old)&&n.old.call(this),n.queue&&w.dequeue(this,n.queue)},n},w.fn.extend({fadeTo:function(t,e,i,n){return this.filter(st).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var o=w.isEmptyObject(t),r=w.speed(e,i,n),s=function(){var e=he(this,w.extend({},t),r);(o||G.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,o=null!=t&&t+"queueHooks",r=w.timers,s=G.get(this);if(o)s[o]&&s[o].stop&&n(s[o]);else for(o in s)s[o]&&s[o].stop&&se.test(o)&&n(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(i),e=!1,r.splice(o,1));!e&&i||w.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,i=G.get(this),n=i[t+"queue"],o=i[t+"queueHooks"],r=w.timers,s=n?n.length:0;for(i.finish=!0,w.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish}))}}),w.each(["toggle","show","hide"],(function(t,e){var i=w.fn[e];w.fn[e]=function(t,n,o){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(ce(e,!0),t,n,o)}})),w.each({slideDown:ce("show"),slideUp:ce("hide"),slideToggle:ce("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){w.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}})),w.timers=[],w.fx.tick=function(){var t,e=0,i=w.timers;for(ne=Date.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||w.fx.stop(),ne=void 0},w.fx.timer=function(t){w.timers.push(t),w.fx.start()},w.fx.interval=13,w.fx.start=function(){oe||(oe=!0,ae())},w.fx.stop=function(){oe=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(e,i){return e=w.fx&&w.fx.speeds[e]||e,i=i||"fx",this.queue(i,(function(i,n){var o=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(o)}}))},function(){var t=m.createElement("input"),e=m.createElement("select").appendChild(m.createElement("option"));t.type="checkbox",p.checkOn=""!==t.value,p.optSelected=e.selected,(t=m.createElement("input")).value="t",t.type="radio",p.radioValue="t"===t.value}();var ue,pe=w.expr.attrHandle;w.fn.extend({attr:function(t,e){return j(this,w.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){w.removeAttr(this,t)}))}}),w.extend({attr:function(t,e,i){var n,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?w.prop(t,e,i):(1===r&&w.isXMLDoc(t)||(o=w.attrHooks[e.toLowerCase()]||(w.expr.match.bool.test(e)?ue:void 0)),void 0!==i?null===i?void w.removeAttr(t,e):o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:(t.setAttribute(e,i+""),i):o&&"get"in o&&null!==(n=o.get(t,e))?n:null==(n=w.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!p.radioValue&&"radio"===e&&D(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,o=e&&e.match(O);if(o&&1===t.nodeType)for(;i=o[n++];)t.removeAttribute(i)}}),ue={set:function(t,e,i){return!1===e?w.removeAttr(t,i):t.setAttribute(i,i),i}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(t,e){var i=pe[e]||w.find.attr;pe[e]=function(t,e,n){var o,r,s=e.toLowerCase();return n||(r=pe[s],pe[s]=o,o=null!=i(t,e,n)?s:null,pe[s]=r),o}}));var fe=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function me(t){return(t.match(O)||[]).join(" ")}function ve(t){return t.getAttribute&&t.getAttribute("class")||""}function ye(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(O)||[]}w.fn.extend({prop:function(t,e){return j(this,w.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[w.propFix[t]||t]}))}}),w.extend({prop:function(t,e,i){var n,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&w.isXMLDoc(t)||(e=w.propFix[e]||e,o=w.propHooks[e]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:t[e]=i:o&&"get"in o&&null!==(n=o.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=w.find.attr(t,"tabindex");return e?parseInt(e,10):fe.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(w.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)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(t){var e,i,n,o,r,s,a,l=0;if(f(t))return this.each((function(e){w(this).addClass(t.call(this,e,ve(this)))}));if((e=ye(t)).length)for(;i=this[l++];)if(o=ve(i),n=1===i.nodeType&&" "+me(o)+" "){for(s=0;r=e[s++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");o!==(a=me(n))&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,n,o,r,s,a,l=0;if(f(t))return this.each((function(e){w(this).removeClass(t.call(this,e,ve(this)))}));if(!arguments.length)return this.attr("class","");if((e=ye(t)).length)for(;i=this[l++];)if(o=ve(i),n=1===i.nodeType&&" "+me(o)+" "){for(s=0;r=e[s++];)for(;n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");o!==(a=me(n))&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t,n="string"===i||Array.isArray(t);return"boolean"==typeof e&&n?e?this.addClass(t):this.removeClass(t):f(t)?this.each((function(i){w(this).toggleClass(t.call(this,i,ve(this),e),e)})):this.each((function(){var e,o,r,s;if(n)for(o=0,r=w(this),s=ye(t);e=s[o++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==i||((e=ve(this))&&G.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":G.get(this,"__className__")||""))}))},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+me(ve(i))+" ").indexOf(e)>-1)return!0;return!1}});var be=/\r/g;w.fn.extend({val:function(t){var e,i,n,o=this[0];return arguments.length?(n=f(t),this.each((function(i){var o;1===this.nodeType&&(null==(o=n?t.call(this,i,w(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=w.map(o,(function(t){return null==t?"":t+""}))),(e=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))}))):o?(e=w.valHooks[o.type]||w.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(o,"value"))?i:"string"==typeof(i=o.value)?i.replace(be,""):null==i?"":i:void 0}}),w.extend({valHooks:{option:{get:function(t){var e=w.find.attr(t,"value");return null!=e?e:me(w.text(t))}},select:{get:function(t){var e,i,n,o=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?r+1:o.length;for(n=r<0?l:s?r:0;n<l;n++)if(((i=o[n]).selected||n===r)&&!i.disabled&&(!i.parentNode.disabled||!D(i.parentNode,"optgroup"))){if(e=w(i).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var i,n,o=t.options,r=w.makeArray(e),s=o.length;s--;)((n=o[s]).selected=w.inArray(w.valHooks.option.get(n),r)>-1)&&(i=!0);return i||(t.selectedIndex=-1),r}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=w.inArray(w(t).val(),e)>-1}},p.checkOn||(w.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),p.focusin="onfocusin"in t;var xe=/^(?:focusinfocus|focusoutblur)$/,we=function(t){t.stopPropagation()};w.extend(w.event,{trigger:function(e,i,n,o){var r,s,a,l,c,h,u,p,v=[n||m],y=d.call(e,"type")?e.type:e,b=d.call(e,"namespace")?e.namespace.split("."):[];if(s=p=a=n=n||m,3!==n.nodeType&&8!==n.nodeType&&!xe.test(y+w.event.triggered)&&(y.indexOf(".")>-1&&(b=y.split("."),y=b.shift(),b.sort()),c=y.indexOf(":")<0&&"on"+y,(e=e[w.expando]?e:new w.Event(y,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:w.makeArray(i,[e]),u=w.event.special[y]||{},o||!u.trigger||!1!==u.trigger.apply(n,i))){if(!o&&!u.noBubble&&!g(n)){for(l=u.delegateType||y,xe.test(l+y)||(s=s.parentNode);s;s=s.parentNode)v.push(s),a=s;a===(n.ownerDocument||m)&&v.push(a.defaultView||a.parentWindow||t)}for(r=0;(s=v[r++])&&!e.isPropagationStopped();)p=s,e.type=r>1?l:u.bindType||y,(h=(G.get(s,"events")||Object.create(null))[e.type]&&G.get(s,"handle"))&&h.apply(s,i),(h=c&&s[c])&&h.apply&&q(s)&&(e.result=h.apply(s,i),!1===e.result&&e.preventDefault());return e.type=y,o||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(v.pop(),i)||!q(n)||c&&f(n[y])&&!g(n)&&((a=n[c])&&(n[c]=null),w.event.triggered=y,e.isPropagationStopped()&&p.addEventListener(y,we),n[y](),e.isPropagationStopped()&&p.removeEventListener(y,we),w.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(t,e,i){var n=w.extend(new w.Event,i,{type:t,isSimulated:!0});w.event.trigger(n,null,e)}}),w.fn.extend({trigger:function(t,e){return this.each((function(){w.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var i=this[0];if(i)return w.event.trigger(t,e,i,!0)}}),p.focusin||w.each({focus:"focusin",blur:"focusout"},(function(t,e){var i=function(t){w.event.simulate(e,t.target,w.event.fix(t))};w.event.special[e]={setup:function(){var n=this.ownerDocument||this.document||this,o=G.access(n,e);o||n.addEventListener(t,i,!0),G.access(n,e,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,o=G.access(n,e)-1;o?G.access(n,e,o):(n.removeEventListener(t,i,!0),G.remove(n,e))}}}));var Se=t.location,Ce={guid:Date.now()},ke=/\?/;w.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+e),i};var _e=/\[\]$/,Te=/\r?\n/g,De=/^(?:submit|button|image|reset|file)$/i,Ee=/^(?:input|select|textarea|keygen)/i;function Ae(t,e,i,n){var o;if(Array.isArray(e))w.each(e,(function(e,o){i||_e.test(t)?n(t,o):Ae(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,i,n)}));else if(i||"object"!==b(e))n(t,e);else for(o in e)Ae(t+"["+o+"]",e[o],i,n)}w.param=function(t,e){var i,n=[],o=function(t,e){var i=f(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!w.isPlainObject(t))w.each(t,(function(){o(this.name,this.value)}));else for(i in t)Ae(i,t[i],e,o);return n.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=w.prop(this,"elements");return t?w.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!w(this).is(":disabled")&&Ee.test(this.nodeName)&&!De.test(t)&&(this.checked||!pt.test(t))})).map((function(t,e){var i=w(this).val();return null==i?null:Array.isArray(i)?w.map(i,(function(t){return{name:e.name,value:t.replace(Te,"\r\n")}})):{name:e.name,value:i.replace(Te,"\r\n")}})).get()}});var Ie=/%20/g,Pe=/#.*$/,Me=/([?&])_=[^&]*/,Le=/^(.*?):[ \t]*([^\r\n]*)$/gm,Re=/^(?:GET|HEAD)$/,Oe=/^\/\//,Fe={},Ne={},He="*/".concat("*"),ze=m.createElement("a");function Be(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,o=0,r=e.toLowerCase().match(O)||[];if(f(i))for(;n=r[o++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function $e(t,e,i,n){var o={},r=t===Ne;function s(a){var l;return o[a]=!0,w.each(t[a]||[],(function(t,a){var c=a(e,i,n);return"string"!=typeof c||r||o[c]?r?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)})),l}return s(e.dataTypes[0])||!o["*"]&&s("*")}function je(t,e){var i,n,o=w.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((o[i]?t:n||(n={}))[i]=e[i]);return n&&w.extend(!0,t,n),t}ze.href=Se.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Se.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Se.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":He,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":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?je(je(t,w.ajaxSettings),e):je(w.ajaxSettings,t)},ajaxPrefilter:Be(Fe),ajaxTransport:Be(Ne),ajax:function(e,i){"object"==typeof e&&(i=e,e=void 0),i=i||{};var n,o,r,s,a,l,c,d,h,u,p=w.ajaxSetup({},i),f=p.context||p,g=p.context&&(f.nodeType||f.jquery)?w(f):w.event,v=w.Deferred(),y=w.Callbacks("once memory"),b=p.statusCode||{},x={},S={},C="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(c){if(!s)for(s={};e=Le.exec(r);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?r:null},setRequestHeader:function(t,e){return null==c&&(t=S[t.toLowerCase()]=S[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==c&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)k.always(t[k.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||C;return n&&n.abort(e),_(0,e),this}};if(v.promise(k),p.url=((e||p.url||Se.href)+"").replace(Oe,Se.protocol+"//"),p.type=i.method||i.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(O)||[""],null==p.crossDomain){l=m.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=ze.protocol+"//"+ze.host!=l.protocol+"//"+l.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=w.param(p.data,p.traditional)),$e(Fe,p,i,k),c)return k;for(h in(d=w.event&&p.global)&&0==w.active++&&w.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Re.test(p.type),o=p.url.replace(Pe,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ie,"+")):(u=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(ke.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Me,"$1"),u=(ke.test(o)?"&":"?")+"_="+Ce.guid+++u),p.url=o+u),p.ifModified&&(w.lastModified[o]&&k.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&k.setRequestHeader("If-None-Match",w.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||i.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+He+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(f,k,p)||c))return k.abort();if(C="abort",y.add(p.complete),k.done(p.success),k.fail(p.error),n=$e(Ne,p,i,k)){if(k.readyState=1,d&&g.trigger("ajaxSend",[k,p]),c)return k;p.async&&p.timeout>0&&(a=t.setTimeout((function(){k.abort("timeout")}),p.timeout));try{c=!1,n.send(x,_)}catch(t){if(c)throw t;_(-1,t)}}else _(-1,"No Transport");function _(e,i,s,l){var h,u,m,x,S,C=i;c||(c=!0,a&&t.clearTimeout(a),n=void 0,r=l||"",k.readyState=e>0?4:0,h=e>=200&&e<300||304===e,s&&(x=function(t,e,i){for(var n,o,r,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(o in a)if(a[o]&&a[o].test(n)){l.unshift(o);break}if(l[0]in i)r=l[0];else{for(o in i){if(!l[0]||t.converters[o+" "+l[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),i[r]}(p,k,s)),!h&&w.inArray("script",p.dataTypes)>-1&&(p.converters["text script"]=function(){}),x=function(t,e,i,n){var o,r,s,a,l,c={},d=t.dataTypes.slice();if(d[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(r=d.shift();r;)if(t.responseFields[r]&&(i[t.responseFields[r]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=d.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(o in c)if((a=o.split(" "))[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(r=a[0],d.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}(p,x,k,h),h?(p.ifModified&&((S=k.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=S),(S=k.getResponseHeader("etag"))&&(w.etag[o]=S)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=x.state,u=x.data,h=!(m=x.error))):(m=C,!e&&C||(C="error",e<0&&(e=0))),k.status=e,k.statusText=(i||C)+"",h?v.resolveWith(f,[u,C,k]):v.rejectWith(f,[k,C,m]),k.statusCode(b),b=void 0,d&&g.trigger(h?"ajaxSuccess":"ajaxError",[k,p,h?u:m]),y.fireWith(f,[k,C]),d&&(g.trigger("ajaxComplete",[k,p]),--w.active||w.event.trigger("ajaxStop")))}return k},getJSON:function(t,e,i){return w.get(t,e,i,"json")},getScript:function(t,e){return w.get(t,void 0,e,"script")}}),w.each(["get","post"],(function(t,e){w[e]=function(t,i,n,o){return f(i)&&(o=o||n,n=i,i=void 0),w.ajax(w.extend({url:t,type:e,dataType:o,data:i,success:n},w.isPlainObject(t)&&t))}})),w.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),w._evalUrl=function(t,e,i){return w.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){w.globalEval(t,e,i)}})},w.fn.extend({wrapAll:function(t){var e;return this[0]&&(f(t)&&(t=t.call(this[0])),e=w(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 f(t)?this.each((function(e){w(this).wrapInner(t.call(this,e))})):this.each((function(){var e=w(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)}))},wrap:function(t){var e=f(t);return this.each((function(i){w(this).wrapAll(e?t.call(this,i):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(t){return!w.expr.pseudos.visible(t)},w.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Ye=w.ajaxSettings.xhr();p.cors=!!Ye&&"withCredentials"in Ye,p.ajax=Ye=!!Ye,w.ajaxTransport((function(e){var i,n;if(p.cors||Ye&&!e.crossDomain)return{send:function(o,r){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);i=function(t){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(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=i(),n=a.onerror=a.ontimeout=i("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout((function(){i&&n()}))},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(i)throw t}},abort:function(){i&&i()}}})),w.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),w.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 w.globalEval(t),t}}}),w.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),w.ajaxTransport("script",(function(t){var e,i;if(t.crossDomain||t.scriptAttrs)return{send:function(n,o){e=w("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&o("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){i&&i()}}}));var Xe,Ve=[],qe=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ve.pop()||w.expando+"_"+Ce.guid++;return this[t]=!0,t}}),w.ajaxPrefilter("json jsonp",(function(e,i,n){var o,r,s,a=!1!==e.jsonp&&(qe.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&qe.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=f(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(qe,"$1"+o):!1!==e.jsonp&&(e.url+=(ke.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||w.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},n.always((function(){void 0===r?w(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=i.jsonpCallback,Ve.push(o)),s&&f(r)&&r(s[0]),s=r=void 0})),"script"})),p.createHTMLDocument=((Xe=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Xe.childNodes.length),w.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(p.createHTMLDocument?((n=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(n)):e=m),r=!i&&[],(o=E.exec(t))?[e.createElement(o[1])]:(o=xt([t],e,r),r&&r.length&&w(r).remove(),w.merge([],o.childNodes)));var n,o,r},w.fn.load=function(t,e,i){var n,o,r,s=this,a=t.indexOf(" ");return a>-1&&(n=me(t.slice(a)),t=t.slice(0,a)),f(e)?(i=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&w.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done((function(t){r=arguments,s.html(n?w("<div>").append(w.parseHTML(t)).find(n):t)})).always(i&&function(t,e){s.each((function(){i.apply(this,r||[t.responseText,e,t])}))}),this},w.expr.pseudos.animated=function(t){return w.grep(w.timers,(function(e){return t===e.elem})).length},w.offset={setOffset:function(t,e,i){var n,o,r,s,a,l,c=w.css(t,"position"),d=w(t),h={};"static"===c&&(t.style.position="relative"),a=d.offset(),r=w.css(t,"top"),l=w.css(t,"left"),("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1?(s=(n=d.position()).top,o=n.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),f(e)&&(e=e.call(t,i,w.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):("number"==typeof h.top&&(h.top+="px"),"number"==typeof h.left&&(h.left+="px"),d.css(h))}},w.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){w.offset.setOffset(this,t,e)}));var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],o={top:0,left:0};if("fixed"===w.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===w.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((o=w(t).offset()).top+=w.css(t,"borderTopWidth",!0),o.left+=w.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-w.css(n,"marginTop",!0),left:e.left-o.left-w.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===w.css(t,"position");)t=t.offsetParent;return t||nt}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var i="pageYOffset"===e;w.fn[t]=function(n){return j(this,(function(t,n,o){var r;if(g(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===o)return r?r[e]:t[n];r?r.scrollTo(i?r.pageXOffset:o,i?o:r.pageYOffset):t[n]=o}),t,n,arguments.length)}})),w.each(["top","left"],(function(t,e){w.cssHooks[e]=Yt(p.pixelPosition,(function(t,i){if(i)return i=Wt(t,e),zt.test(i)?w(t).position()[e]+"px":i}))})),w.each({Height:"height",Width:"width"},(function(t,e){w.each({padding:"inner"+t,content:e,"":"outer"+t},(function(i,n){w.fn[n]=function(o,r){var s=arguments.length&&(i||"boolean"!=typeof o),a=i||(!0===o||!0===r?"margin":"border");return j(this,(function(e,i,o){var r;return g(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===o?w.css(e,i,a):w.style(e,i,o,a)}),e,s?o:void 0,s)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){w.fn[e]=function(t){return this.on(e,t)}})),w.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),w.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){w.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}));var Ue=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.proxy=function(t,e){var i,n,r;if("string"==typeof e&&(i=t[e],e=t,t=i),f(t))return n=o.call(arguments,2),r=function(){return t.apply(e||this,n.concat(o.call(arguments)))},r.guid=t.guid=t.guid||w.guid++,r},w.holdReady=function(t){t?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=D,w.isFunction=f,w.isWindow=g,w.camelCase=V,w.type=b,w.now=Date.now,w.isNumeric=function(t){var e=w.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},w.trim=function(t){return null==t?"":(t+"").replace(Ue,"")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return w}));var Ge=t.jQuery,Ze=t.$;return w.noConflict=function(e){return t.$===w&&(t.$=Ze),e&&t.jQuery===w&&(t.jQuery=Ge),w},void 0===e&&(t.jQuery=t.$=w),w})),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}((function(t){var e,i,n,o;function r(e,i){var n,o,r,a=e.nodeName.toLowerCase();return"area"===a?(o=(n=e.parentNode).name,!(!e.href||!o||"map"!==n.nodeName.toLowerCase())&&!!(r=t("img[usemap='#"+o+"']")[0])&&s(r)):(/^(input|select|textarea|button|object)$/.test(a)?!e.disabled:"a"===a&&e.href||i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter((function(){return"hidden"===t.css(this,"visibility")})).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var i=this.css("position"),n="absolute"===i,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter((function(){var e=t(this);return(!n||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==i&&r.length?r:t(this[0].ownerDocument||document)},uniqueId:(e=0,function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++e)}))}),removeUniqueId:function(){return this.each((function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")}))}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(i){return!!t.data(i,e)}})):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return r(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var i=t.attr(e,"tabindex"),n=isNaN(i);return(n||i>=0)&&r(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],(function(e,i){var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};function s(e,i,o,r){return t.each(n,(function(){i-=parseFloat(t.css(e,"padding"+this))||0,o&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(i-=parseFloat(t.css(e,"margin"+this))||0)})),i}t.fn["inner"+i]=function(e){return void 0===e?r["inner"+i].call(this):this.each((function(){t(this).css(o,s(this,e)+"px")}))},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?r["outer"+i].call(this,e):this.each((function(){t(this).css(o,s(this,e,!0,n)+"px")}))}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=(i=t.fn.removeData,function(e){return arguments.length?i.call(this,t.camelCase(e)):i.call(this)})),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:(o=t.fn.focus,function(e,i){return"number"==typeof e?this.each((function(){var n=this;setTimeout((function(){t(n).focus(),i&&i.call(n)}),e)})):o.apply(this,arguments)}),disableSelection:(n="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.bind(n+".ui-disableSelection",(function(t){t.preventDefault()}))}),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var i,n,o=t(this[0]);o.length&&o[0]!==document;){if(("absolute"===(i=o.css("position"))||"relative"===i||"fixed"===i)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0}}),t.ui.plugin={add:function(e,i,n){var o,r=t.ui[e].prototype;for(o in n)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([i,n[o]])},call:function(t,e,i,n){var o,r=t.plugins[e];if(r&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<r.length;o++)t.options[r[o][0]]&&r[o][1].apply(t.element,i)}};var a=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var n,o,r;for(r=0;null!=(o=i[r]);r++)try{(n=t._data(o,"events"))&&n.remove&&t(o).triggerHandler("remove")}catch(t){}e(i)}}(t.cleanData),t.widget=function(e,i,n){var o,r,s,a,l={},c=e.split(".")[0];return e=e.split(".")[1],o=c+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},r=t[c][e],s=t[c][e]=function(t,e){if(!this._createWidget)return new s(t,e);arguments.length&&this._createWidget(t,e)},t.extend(s,r,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),(a=new i).options=t.widget.extend({},a.options),t.each(n,(function(e,n){var o,r;t.isFunction(n)?l[e]=(o=function(){return i.prototype[e].apply(this,arguments)},r=function(t){return i.prototype[e].apply(this,t)},function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=r,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}):l[e]=n})),s.prototype=t.widget.extend(a,{widgetEventPrefix:r&&a.widgetEventPrefix||e},l,{constructor:s,namespace:c,widgetName:e,widgetFullName:o}),r?(t.each(r._childConstructors,(function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,s,i._proto)})),delete r._childConstructors):i._childConstructors.push(s),t.widget.bridge(e,s),s},t.widget.extend=function(e){for(var i,n,o=l.call(arguments,1),r=0,s=o.length;r<s;r++)for(i in o[r])n=o[r][i],o[r].hasOwnProperty(i)&&void 0!==n&&(t.isPlainObject(n)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):e[i]=n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var r="string"==typeof o,s=l.call(arguments,1),a=this;return r?this.each((function(){var i,r=t.data(this,n);return"instance"===o?(a=r,!1):r?t.isFunction(r[o])&&"_"!==o.charAt(0)?(i=r[o].apply(r,s))!==r&&void 0!==i?(a=i&&i.jquery?a.pushStack(i.get()):i,!1):void 0:t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")})):(s.length&&(o=t.widget.extend.apply(null,[o].concat(s))),this.each((function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))}))),a}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=a++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,o,r,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},n=e.split("."),e=n.shift(),n.length){for(o=s[e]=t.widget.extend({},this.options[e]),r=0;r<n.length-1;r++)o[n[r]]=o[n[r]]||{},o=o[n[r]];if(e=n.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=i}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,n){var o,r=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=o=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,o=this.widget()),t.each(n,(function(n,s){function a(){if(e||!0!==r.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof s?r[s]:s).apply(r,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+r.eventNamespace,d=l[2];d?o.delegate(d,c,a):i.bind(c,a)}))},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var i=this;return setTimeout((function(){return("string"==typeof t?i[t]:t).apply(i,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,n){var o,r,s=this.options[e];if(n=n||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],r=i.originalEvent)for(o in r)o in i||(i[o]=r[o]);return this.element.trigger(i,n),!(t.isFunction(s)&&!1===s.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,i){t.Widget.prototype["_"+e]=function(n,o,r){"string"==typeof o&&(o={effect:o});var s,a=o?!0===o||"number"==typeof o?i:o.effect||i:e;"number"==typeof(o=o||{})&&(o={duration:o}),s=!t.isEmptyObject(o),o.complete=r,o.delay&&n.delay(o.delay),s&&t.effects&&t.effects.effect[a]?n[e](o):a!==e&&n[a]?n[a](o.duration,o.easing,r):n.queue((function(i){t(this)[e](),r&&r.call(n[0]),i()}))}})),t.widget;var c=!1;t(document).mouseup((function(){c=!1})),t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).bind("click."+this.widgetName,(function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!c){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,o=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!o&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,0)))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),c=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.widget("ui.draggable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return this._blurActiveElement(e),!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0||(this.handle=this._getHandle(e),!this.handle||(this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),0)))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map((function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=this.document[0];if(this.handleElement.is(e.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&t(i.activeElement).blur()}catch(t){}},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===t(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp({}),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",e)&&i._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper),o=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,o=this.options,r=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(n=(i=t(o.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=o.containment:this.containment=[0,0,t(r).width()-this.helperProportions.width-this.margins.left,(t(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,n,o,r,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,c=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(c=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(c=i[3]+this.offset.click.top)),s.grid&&(o=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-s.grid[1]:o+s.grid[1]:o,r=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-s.grid[0]:r+s.grid[0]:r),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,n){var o=t.extend({},i,{item:n.element});n.sortables=[],t(n.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,o))}))},stop:function(e,i,n){var o=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,(function(){var t=this;t.isOver?(t.isOver=0,n.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))}))},drag:function(e,i,n){t.each(n.sortables,(function(){var o=!1,r=this;r.positionAbs=n.positionAbs,r.helperProportions=n.helperProportions,r.offset.click=n.offset.click,r._intersectsWith(r.containerCache)&&(o=!0,t.each(n.sortables,(function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&t.contains(r.element[0],this.element[0])&&(o=!1),o}))),o?(r.isOver||(r.isOver=1,n._parent=i.helper.parent(),r.currentItem=i.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return i.helper[0]},e.target=r.currentItem[0],r._mouseCapture(e,!0),r._mouseStart(e,!0,!0),r.offset.click.top=n.offset.click.top,r.offset.click.left=n.offset.click.left,r.offset.parent.left-=n.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=n.offset.parent.top-r.offset.parent.top,n._trigger("toSortable",e),n.dropped=r.element,t.each(n.sortables,(function(){this.refreshPositions()})),n.currentItem=n.element,r.fromOutside=n),r.currentItem&&(r._mouseDrag(e),i.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",e,r._uiHash(r)),r._mouseStop(e,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),i.helper.appendTo(n._parent),n._refreshOffsets(e),i.position=n._generatePosition(e,!0),n._trigger("fromSortable",e),n.dropped=!1,t.each(n.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,n){var o=t("body"),r=n.options;o.css("cursor")&&(r._cursor=o.css("cursor")),o.css("cursor",r.cursor)},stop:function(e,i,n){var o=n.options;o._cursor&&t("body").css("cursor",o._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var o=t(i.helper),r=n.options;o.css("opacity")&&(r._opacity=o.css("opacity")),o.css("opacity",r.opacity)},stop:function(e,i,n){var o=n.options;o._opacity&&t(i.helper).css("opacity",o._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,n){var o=n.options,r=!1,s=n.scrollParentNotHidden[0],a=n.document[0];s!==a&&"HTML"!==s.tagName?(o.axis&&"x"===o.axis||(n.overflowOffset.top+s.offsetHeight-e.pageY<o.scrollSensitivity?s.scrollTop=r=s.scrollTop+o.scrollSpeed:e.pageY-n.overflowOffset.top<o.scrollSensitivity&&(s.scrollTop=r=s.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(n.overflowOffset.left+s.offsetWidth-e.pageX<o.scrollSensitivity?s.scrollLeft=r=s.scrollLeft+o.scrollSpeed:e.pageX-n.overflowOffset.left<o.scrollSensitivity&&(s.scrollLeft=r=s.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-t(a).scrollTop()<o.scrollSensitivity?r=t(a).scrollTop(t(a).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<o.scrollSensitivity&&(r=t(a).scrollTop(t(a).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-t(a).scrollLeft()<o.scrollSensitivity?r=t(a).scrollLeft(t(a).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<o.scrollSensitivity&&(r=t(a).scrollLeft(t(a).scrollLeft()+o.scrollSpeed)))),!1!==r&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var o=n.options;n.snapElements=[],t(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each((function(){var e=t(this),i=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})}))},drag:function(e,i,n){var o,r,s,a,l,c,d,h,u,p,f=n.options,g=f.snapTolerance,m=i.offset.left,v=m+n.helperProportions.width,y=i.offset.top,b=y+n.helperProportions.height;for(u=n.snapElements.length-1;u>=0;u--)c=(l=n.snapElements[u].left-n.margins.left)+n.snapElements[u].width,h=(d=n.snapElements[u].top-n.margins.top)+n.snapElements[u].height,v<l-g||m>c+g||b<d-g||y>h+g||!t.contains(n.snapElements[u].item.ownerDocument,n.snapElements[u].item)?(n.snapElements[u].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[u].item})),n.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(o=Math.abs(d-b)<=g,r=Math.abs(h-y)<=g,s=Math.abs(l-v)<=g,a=Math.abs(c-m)<=g,o&&(i.position.top=n._convertPositionTo("relative",{top:d-n.helperProportions.height,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:h,left:0}).top),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:c}).left)),p=o||r||s||a,"outer"!==f.snapMode&&(o=Math.abs(d-y)<=g,r=Math.abs(h-b)<=g,s=Math.abs(l-m)<=g,a=Math.abs(c-v)<=g,o&&(i.position.top=n._convertPositionTo("relative",{top:d,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:h-n.helperProportions.height,left:0}).top),s&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:c-n.helperProportions.width}).left)),!n.snapElements[u].snapping&&(o||r||s||a||p)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[u].item})),n.snapElements[u].snapping=o||r||s||a||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var o,r=n.options,s=t.makeArray(t(r.stack)).sort((function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)}));s.length&&(o=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each((function(e){t(this).css("zIndex",o+e)})),this.css("zIndex",o+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var o=t(i.helper),r=n.options;o.css("zIndex")&&(r._zIndex=o.css("zIndex")),o.css("zIndex",r.zIndex)},stop:function(e,i,n){var o=n.options;o._zIndex&&t(i.helper).css("zIndex",o._zIndex)}}),t.ui.draggable,t.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(n)?n:function(t){return t.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var n=t.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,o=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var i=t(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&t.ui.intersect(n,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return o=!0,!1})),!o&&!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(n)),this.element))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,n,o){if(!i.offset)return!1;var r=(e.positionAbs||e.position.absolute).left+e.margins.left,s=(e.positionAbs||e.position.absolute).top+e.margins.top,a=r+e.helperProportions.width,l=s+e.helperProportions.height,c=i.offset.left,d=i.offset.top,h=c+i.proportions().width,u=d+i.proportions().height;switch(n){case"fit":return c<=r&&a<=h&&d<=s&&l<=u;case"intersect":return c<r+e.helperProportions.width/2&&a-e.helperProportions.width/2<h&&d<s+e.helperProportions.height/2&&l-e.helperProportions.height/2<u;case"pointer":return t(o.pageY,d,i.proportions().height)&&t(o.pageX,c,i.proportions().width);case"touch":return(s>=d&&s<=u||l>=d&&l<=u||s<d&&l>u)&&(r>=c&&r<=h||a>=c&&a<=h||r<c&&a>h);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var n,o,r=t.ui.ddmanager.droppables[e.options.scope]||[],s=i?i.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<r.length;n++)if(!(r[n].options.disabled||e&&!r[n].accept.call(r[n].element[0],e.currentItem||e.element))){for(o=0;o<a.length;o++)if(a[o]===r[n].element[0]){r[n].proportions().height=0;continue t}r[n].visible="none"!==r[n].element.css("display"),r[n].visible&&("mousedown"===s&&r[n]._activate.call(r[n],i),r[n].offset=r[n].element.offset(),r[n].proportions({width:r[n].element[0].offsetWidth,height:r[n].element[0].offsetHeight}))}},drop:function(e,i){var n=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))})),n},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",(function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}))},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,o,r,s=t.ui.intersect(e,this,this.options.tolerance,i),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(o=this.options.scope,(r=this.element.parents(":data(ui-droppable)").filter((function(){return t(this).droppable("instance").options.scope===o}))).length&&((n=t(r[0]).droppable("instance")).greedyChild="isover"===a)),n&&"isover"===a&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,i),n&&"isout"===a&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}}))},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.ui.droppable,t.widget("ui.sortable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),t.each(this.items,(function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")}))},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var n=null,o=!1,r=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(e),t(e.target).parents().each((function(){if(t.data(this,r.widgetName+"-item")===r)return n=t(this),!1})),t.data(e.target,r.widgetName+"-item")===r&&(n=t(e.target)),!n||this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each((function(){this===e.target&&(o=!0)})),!o)||(this.currentItem=n,this._removeCurrentsFromItems(),0)))},_mouseStart:function(e,i,n){var o,r,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",s.cursor),this.storedStylesheet=t("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(r)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,o,r,s=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-this.document.scrollTop()<s.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-s.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<s.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+s.scrollSpeed)),e.pageX-this.document.scrollLeft()<s.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-s.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<s.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+s.scrollSpeed))),!1!==a&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(o=(n=this.items[i]).item[0],(r=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===o||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,o=this.placeholder.offset(),r=this.options.axis,s={};r&&"x"!==r||(s.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(s.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(s,parseInt(this.options.revert,10)||500,(function(){n._clear(e)}))}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each((function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))})),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each((function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")})),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,o=n+this.helperProportions.height,r=t.left,s=r+t.width,a=t.top,l=a+t.height,c=this.offset.click.top,d=this.offset.click.left,h="x"===this.options.axis||n+c>a&&n+c<l,u="y"===this.options.axis||e+d>r&&e+d<s,p=h&&u;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:r<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<s&&a<n+this.helperProportions.height/2&&o-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=e&&i,o=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return!!n&&(this.floating?r&&"right"===r||"down"===o?2:1:o&&("down"===o?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,n,o,r,s=[],a=[],l=this._connectWith();if(l&&e)for(i=l.length-1;i>=0;i--)for(n=(o=t(l[i],this.document[0])).length-1;n>=0;n--)(r=t.data(o[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&a.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);function c(){s.push(this)}for(a.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=a.length-1;i>=0;i--)a[i][0].each(c);return t(s)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,(function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0}))},_refreshItems:function(e){this.items=[],this.containers=[this];var i,n,o,r,s,a,l,c,d=this.items,h=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(i=u.length-1;i>=0;i--)for(n=(o=t(u[i],this.document[0])).length-1;n>=0;n--)(r=t.data(o[n],this.widgetFullName))&&r!==this&&!r.options.disabled&&(h.push([t.isFunction(r.options.items)?r.options.items.call(r.element[0],e,{item:this.currentItem}):t(r.options.items,r.element),r]),this.containers.push(r));for(i=h.length-1;i>=0;i--)for(s=h[i][1],n=0,c=(a=h[i][0]).length;n<c;n++)(l=t(a[n])).data(this.widgetName+"-item",s),d.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,n,o,r;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(n=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=o.outerWidth(),n.height=o.outerHeight()),r=o.offset(),n.left=r.left,n.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)r=this.containers[i].element.offset(),this.containers[i].containerCache.left=r.left,this.containers[i].containerCache.top=r.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,n=(e=e||this).options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),o=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(o)):"tr"===n?e._createTrPlaceholder(e.currentItem,o):"img"===n&&o.attr("src",e.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(t,o){i&&!n.forcePlaceholderSize||(o.height()||o.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var n=this;e.children().each((function(){t("<td>&#160;</td>",n.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(e){var i,n,o,r,s,a,l,c,d,h,u=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(u&&t.contains(this.containers[i].element[0],u.element[0]))continue;u=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(u)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(o=1e4,r=null,s=(d=u.floating||this._isFloating(this.currentItem))?"left":"top",a=d?"width":"height",h=d?"clientX":"clientY",n=this.items.length-1;n>=0;n--)t.contains(this.containers[p].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[s],c=!1,e[h]-l>this.items[n][a]/2&&(c=!0),Math.abs(e[h]-l)<o&&(o=Math.abs(e[h]-l),r=this.items[n],this.direction=c?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(e,r,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!i.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!i.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],i=t(o.containment).offset(),n="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:o.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:o.scrollLeft())*n}},_generatePosition:function(e){var i,n,o=this.options,r=e.pageX,s=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((s-this.originalPageY)/o.grid[1])*o.grid[1],s=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,n=this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-o.grid[0]:n+o.grid[0]:n)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,i,n){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!n)}))},_clear:function(t,e){this.reverting=!1;var i,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();function o(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}for(this.fromOutside&&!e&&n.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(n.push((function(t){this._trigger("remove",t,this._uiHash())})),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||n.push(o("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(o("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<n.length;i++)n[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}});var d,h="ui-effects-",u=t;t.effects={effect:{}},function(t,e){var i,n=/^([\-+])=\s*(\d+\.?\d*)/,o=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],r=t.Color=function(e,i,n,o){return new t.Color.fn.parse(e,i,n,o)},s={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},a={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},l=r.support={},c=t("<p>")[0],d=t.each;function h(t,e,i){var n=a[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max<t?n.max:t)}function u(e){var n=r(),a=n._rgba=[];return e=e.toLowerCase(),d(o,(function(t,i){var o,r=i.re.exec(e),l=r&&i.parse(r),c=i.space||"rgba";if(l)return o=n[c](l),n[s[c].cache]=o[s[c].cache],a=n._rgba=o._rgba,!1})),a.length?("0,0,0,0"===a.join()&&t.extend(a,i.transparent),n):i[e]}function p(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}c.style.cssText="background-color:rgba(1,1,1,.5)",l.rgba=c.style.backgroundColor.indexOf("rgba")>-1,d(s,(function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}})),r.fn=t.extend(r.prototype,{parse:function(n,o,a,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var c=this,p=t.type(n),f=this._rgba=[];return o!==e&&(n=[n,o,a,l],p="array"),"string"===p?this.parse(u(n)||i._default):"array"===p?(d(s.rgba.props,(function(t,e){f[e.idx]=h(n[e.idx],e)})),this):"object"===p?(d(s,n instanceof r?function(t,e){n[e.cache]&&(c[e.cache]=n[e.cache].slice())}:function(e,i){var o=i.cache;d(i.props,(function(t,e){if(!c[o]&&i.to){if("alpha"===t||null==n[t])return;c[o]=i.to(c._rgba)}c[o][e.idx]=h(n[t],e,!0)})),c[o]&&t.inArray(null,c[o].slice(0,3))<0&&(c[o][3]=1,i.from&&(c._rgba=i.from(c[o])))}),this):void 0},is:function(t){var e=r(t),i=!0,n=this;return d(s,(function(t,o){var r,s=e[o.cache];return s&&(r=n[o.cache]||o.to&&o.to(n._rgba)||[],d(o.props,(function(t,e){if(null!=s[e.idx])return i=s[e.idx]===r[e.idx]}))),i})),i},_space:function(){var t=[],e=this;return d(s,(function(i,n){e[n.cache]&&t.push(i)})),t.pop()},transition:function(t,e){var i=r(t),n=i._space(),o=s[n],l=0===this.alpha()?r("transparent"):this,c=l[o.cache]||o.to(l._rgba),u=c.slice();return i=i[o.cache],d(o.props,(function(t,n){var o=n.idx,r=c[o],s=i[o],l=a[n.type]||{};null!==s&&(null===r?u[o]=s:(l.mod&&(s-r>l.mod/2?r+=l.mod:r-s>l.mod/2&&(r-=l.mod)),u[o]=h((s-r)*e+r,n)))})),this[n](u)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),o=r(e)._rgba;return r(t.map(i,(function(t,e){return(1-n)*o[e]+n*t})))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,(function(t,e){return null==t?e>2?1:0:t}));return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),(function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t}));return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,(function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t})).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),r.fn.parse.prototype=r.fn,s.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,o=t[1]/255,r=t[2]/255,s=t[3],a=Math.max(n,o,r),l=Math.min(n,o,r),c=a-l,d=a+l,h=.5*d;return e=l===a?0:n===a?60*(o-r)/c+360:o===a?60*(r-n)/c+120:60*(n-o)/c+240,i=0===c?0:h<=.5?c/d:c/(2-d),[Math.round(e)%360,i,h,null==s?1:s]},s.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],o=t[3],r=n<=.5?n*(1+i):n+i-n*i,s=2*n-r;return[Math.round(255*p(s,r,e+1/3)),Math.round(255*p(s,r,e)),Math.round(255*p(s,r,e-1/3)),o]},d(s,(function(i,o){var s=o.props,a=o.cache,l=o.to,c=o.from;r.fn[i]=function(i){if(l&&!this[a]&&(this[a]=l(this._rgba)),i===e)return this[a].slice();var n,o=t.type(i),u="array"===o||"object"===o?i:arguments,p=this[a].slice();return d(s,(function(t,e){var i=u["object"===o?t:e.idx];null==i&&(i=p[e.idx]),p[e.idx]=h(i,e)})),c?((n=r(c(p)))[a]=p,n):r(p)},d(s,(function(e,o){r.fn[e]||(r.fn[e]=function(r){var s,a=t.type(r),l="alpha"===e?this._hsla?"hsla":"rgba":i,c=this[l](),d=c[o.idx];return"undefined"===a?d:("function"===a&&(r=r.call(this,d),a=t.type(r)),null==r&&o.empty?this:("string"===a&&(s=n.exec(r))&&(r=d+parseFloat(s[2])*("+"===s[1]?1:-1)),c[o.idx]=r,this[l](c)))})}))})),r.hook=function(e){var i=e.split(" ");d(i,(function(e,i){t.cssHooks[i]={set:function(e,n){var o,s,a="";if("transparent"!==n&&("string"!==t.type(n)||(o=u(n)))){if(n=r(o||n),!l.rgba&&1!==n._rgba[3]){for(s="backgroundColor"===i?e.parentNode:e;(""===a||"transparent"===a)&&s&&s.style;)try{a=t.css(s,"backgroundColor"),s=s.parentNode}catch(t){}n=n.blend(a&&"transparent"!==a?a:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=r(e.elem,i),e.end=r(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}}))},r.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return d(["Top","Right","Bottom","Left"],(function(i,n){e["border"+n+"Color"]=t})),e}},i=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(u),function(){var e=["add","remove","toggle"],i={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function n(e){var i,n,o=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,r={};if(o&&o.length&&o[0]&&o[o[0]])for(n=o.length;n--;)"string"==typeof o[i=o[n]]&&(r[t.camelCase(i)]=o[i]);else for(i in o)"string"==typeof o[i]&&(r[i]=o[i]);return r}t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(u.style(t.elem,i,t.end),t.setAttr=!0)}})),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(o,r,s,a){var l=t.speed(r,s,a);return this.queue((function(){var r,s=t(this),a=s.attr("class")||"",c=l.children?s.find("*").addBack():s;c=c.map((function(){return{el:t(this),start:n(this)}})),(r=function(){t.each(e,(function(t,e){o[e]&&s[e+"Class"](o[e])}))})(),c=c.map((function(){return this.end=n(this.el[0]),this.diff=function(e,n){var o,r,s={};for(o in n)r=n[o],e[o]!==r&&(i[o]||!t.fx.step[o]&&isNaN(parseFloat(r))||(s[o]=r));return s}(this.start,this.end),this})),s.attr("class",a),c=c.map((function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()})),t.when.apply(t,c.get()).done((function(){r(),t.each(arguments,(function(){var e=this.el;t.each(this.diff,(function(t){e.css(t,"")}))})),l.complete.call(s[0])}))}))},t.fn.extend({addClass:function(e){return function(i,n,o,r){return n?t.effects.animateClass.call(this,{add:i},n,o,r):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,n,o,r){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,o,r):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,o,r,s){return"boolean"==typeof n||void 0===n?o?t.effects.animateClass.call(this,n?{add:i}:{remove:i},o,r,s):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,o,r)}}(t.fn.toggleClass),switchClass:function(e,i,n,o,r){return t.effects.animateClass.call(this,{add:i,remove:e},n,o,r)}})}(),function(){function e(e,i,n,o){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(o=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(o=n,n=i,i={}),t.isFunction(n)&&(o=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=o||i.complete,e}function i(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||"string"==typeof e&&!t.effects.effect[e]||!!t.isFunction(e)||"object"==typeof e&&!e.effect}t.extend(t.effects,{version:"1.11.4",save:function(t,e){for(var i=0;i<e.length;i++)null!==e[i]&&t.data(h+e[i],t[0].style[e[i]])},restore:function(t,e){var i,n;for(n=0;n<e.length;n++)null!==e[n]&&(void 0===(i=t.data(h+e[n]))&&(i=""),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},n=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),o={width:e.width(),height:e.height()},r=document.activeElement;try{r.id}catch(t){r=document.body}return e.wrap(n),(e[0]===r||t.contains(e[0],r))&&t(r).focus(),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],(function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(o),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,n,o){return o=o||{},t.each(i,(function(t,i){var r=e.cssUnit(i);r[0]>0&&(o[i]=r[0]*n+r[1])})),o}}),t.fn.extend({effect:function(){var i=e.apply(this,arguments),n=i.mode,o=i.queue,r=t.effects.effect[i.effect];if(t.fx.off||!r)return n?this[n](i.duration,i.complete):this.each((function(){i.complete&&i.complete.call(this)}));function s(e){var n=t(this),o=i.complete,s=i.mode;function a(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}(n.is(":hidden")?"hide"===s:"show"===s)?(n[s](),a()):r.call(n[0],i,a)}return!1===o?this.each(s):this.queue(o||"fx",s)},show:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="show",this.effect.call(this,o)}}(t.fn.show),hide:function(t){return function(n){if(i(n))return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="hide",this.effect.call(this,o)}}(t.fn.hide),toggle:function(t){return function(n){if(i(n)||"boolean"==typeof n)return t.apply(this,arguments);var o=e.apply(this,arguments);return o.mode="toggle",this.effect.call(this,o)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],(function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])})),n}})}(),d={},t.each(["Quad","Cubic","Quart","Quint","Expo"],(function(t,e){d[e]=function(e){return Math.pow(e,t+2)}})),t.extend(d,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(d,(function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}})),t.effects})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t="transitionend",e=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},i=t=>{const i=e(t);return i&&document.querySelector(i)?i:null},n=t=>{const i=e(t);return i?document.querySelector(i):null},o=e=>{e.dispatchEvent(new Event(t))},r=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),s=t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,a=(t,e,i)=>{Object.keys(i).forEach((n=>{const o=i[n],s=e[n],a=s&&r(s)?"element":null==(l=s)?`${l}`:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(o).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${a}" but expected type "${o}".`)}))},l=t=>!(!r(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),c=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),d=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?d(t.parentNode):null},h=()=>{},u=t=>{t.offsetHeight},p=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},f=[],g=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=p();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{f.forEach((t=>t()))})),f.push(e)):e()},v=t=>{"function"==typeof t&&t()},y=(e,i,n=!0)=>{if(!n)return void v(e);const r=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),o=Number.parseFloat(i);return n||o?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(i)+5;let s=!1;const a=({target:n})=>{n===i&&(s=!0,i.removeEventListener(t,a),v(e))};i.addEventListener(t,a),setTimeout((()=>{s||o(i)}),r)},b=(t,e,i,n)=>{let o=t.indexOf(e);if(-1===o)return t[!i&&n?t.length-1:0];const r=t.length;return o+=i?1:-1,n&&(o=(o+r)%r),t[Math.max(0,Math.min(o,r-1))]},x=/[^.]*(?=\..*)\.|.*/,w=/\..*/,S=/::\d+$/,C={};let k=1;const _={mouseenter:"mouseover",mouseleave:"mouseout"},T=/^(mouseenter|mouseleave)/i,D=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function E(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function A(t){const e=E(t);return t.uidEvent=e,C[e]=C[e]||{},C[e]}function I(t,e,i=null){const n=Object.keys(t);for(let o=0,r=n.length;o<r;o++){const r=t[n[o]];if(r.originalHandler===e&&r.delegationSelector===i)return r}return null}function P(t,e,i){const n="string"==typeof e,o=n?i:e;let r=R(t);return D.has(r)||(r=t),[n,o,r]}function M(t,e,i,n,o){if("string"!=typeof e||!t)return;if(i||(i=n,n=null),T.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};n?n=t(n):i=t(i)}const[r,s,a]=P(e,i,n),l=A(t),c=l[a]||(l[a]={}),d=I(c,s,r?i:null);if(d)return void(d.oneOff=d.oneOff&&o);const h=E(s,e.replace(x,"")),u=r?function(t,e,i){return function n(o){const r=t.querySelectorAll(e);for(let{target:s}=o;s&&s!==this;s=s.parentNode)for(let a=r.length;a--;)if(r[a]===s)return o.delegateTarget=s,n.oneOff&&O.off(t,o.type,e,i),i.apply(s,[o]);return null}}(t,i,n):function(t,e){return function i(n){return n.delegateTarget=t,i.oneOff&&O.off(t,n.type,e),e.apply(t,[n])}}(t,i);u.delegationSelector=r?i:null,u.originalHandler=s,u.oneOff=o,u.uidEvent=h,c[h]=u,t.addEventListener(a,u,r)}function L(t,e,i,n,o){const r=I(e[i],n,o);r&&(t.removeEventListener(i,r,Boolean(o)),delete e[i][r.uidEvent])}function R(t){return t=t.replace(w,""),_[t]||t}const O={on(t,e,i,n){M(t,e,i,n,!1)},one(t,e,i,n){M(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[o,r,s]=P(e,i,n),a=s!==e,l=A(t),c=e.startsWith(".");if(void 0!==r){if(!l||!l[s])return;return void L(t,l,s,r,o?i:null)}c&&Object.keys(l).forEach((i=>{!function(t,e,i,n){const o=e[i]||{};Object.keys(o).forEach((r=>{if(r.includes(n)){const n=o[r];L(t,e,i,n.originalHandler,n.delegationSelector)}}))}(t,l,i,e.slice(1))}));const d=l[s]||{};Object.keys(d).forEach((i=>{const n=i.replace(S,"");if(!a||e.includes(n)){const e=d[i];L(t,l,s,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=p(),o=R(e),r=e!==o,s=D.has(o);let a,l=!0,c=!0,d=!1,h=null;return r&&n&&(a=n.Event(e,i),n(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),d=a.isDefaultPrevented()),s?(h=document.createEvent("HTMLEvents"),h.initEvent(o,l,!0)):h=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((t=>{Object.defineProperty(h,t,{get:()=>i[t]})})),d&&h.preventDefault(),c&&t.dispatchEvent(h),h.defaultPrevented&&void 0!==a&&a.preventDefault(),h}},F=new Map,N={set(t,e,i){F.has(t)||F.set(t,new Map);const n=F.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>F.has(t)&&F.get(t).get(e)||null,remove(t,e){if(!F.has(t))return;const i=F.get(t);i.delete(e),0===i.size&&F.delete(t)}};class H{constructor(t){(t=s(t))&&(this._element=t,N.set(this._element,this.constructor.DATA_KEY,this))}dispose(){N.remove(this._element,this.constructor.DATA_KEY),O.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((t=>{this[t]=null}))}_queueCallback(t,e,i=!0){y(t,e,i)}static getInstance(t){return N.get(s(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const z=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,o=t.NAME;O.on(document,i,`[data-bs-dismiss="${o}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),c(this))return;const r=n(this)||this.closest(`.${o}`);t.getOrCreateInstance(r)[e]()}))};class B extends H{static get NAME(){return"alert"}close(){if(O.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),O.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=B.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}z(B,"close"),m(B);const $='[data-bs-toggle="button"]';class j extends H{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=j.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function W(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function Y(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}O.on(document,"click.bs.button.data-api",$,(t=>{t.preventDefault();const e=t.target.closest($);j.getOrCreateInstance(e).toggle()})),m(j);const X={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${Y(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Y(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter((t=>t.startsWith("bs"))).forEach((i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=W(t.dataset[i])})),e},getDataAttribute:(t,e)=>W(t.getAttribute(`data-bs-${Y(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},V={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(e)&&i.push(n),n=n.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(", ");return this.find(e,t).filter((t=>!c(t)&&l(t)))}},q="carousel",U={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},G={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Z="next",K="prev",Q="left",J="right",tt={ArrowLeft:J,ArrowRight:Q},et="slid.bs.carousel",it="active",nt=".active.carousel-item";class ot extends H{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=V.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return U}static get NAME(){return q}next(){this._slide(Z)}nextWhenVisible(){!document.hidden&&l(this._element)&&this.next()}prev(){this._slide(K)}pause(t){t||(this._isPaused=!0),V.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(o(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=V.findOne(nt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void O.one(this._element,et,(()=>this.to(t)));if(e===t)return this.pause(),void this.cycle();const i=t>e?Z:K;this._slide(i,this._items[t])}_getConfig(t){return t={...U,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},a(q,t,G),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?J:Q)}_addEventListeners(){this._config.keyboard&&O.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&(O.on(this._element,"mouseenter.bs.carousel",(t=>this.pause(t))),O.on(this._element,"mouseleave.bs.carousel",(t=>this.cycle(t)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},i=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},n=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((t=>this.cycle(t)),500+this._config.interval))};V.find(".carousel-item img",this._element).forEach((t=>{O.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()))})),this._pointerEvent?(O.on(this._element,"pointerdown.bs.carousel",(t=>e(t))),O.on(this._element,"pointerup.bs.carousel",(t=>n(t))),this._element.classList.add("pointer-event")):(O.on(this._element,"touchstart.bs.carousel",(t=>e(t))),O.on(this._element,"touchmove.bs.carousel",(t=>i(t))),O.on(this._element,"touchend.bs.carousel",(t=>n(t))))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=tt[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?V.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const i=t===Z;return b(this._items,e,i,this._config.wrap)}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),n=this._getItemIndex(V.findOne(nt,this._element));return O.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:n,to:i})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=V.findOne(".active",this._indicatorsElement);e.classList.remove(it),e.removeAttribute("aria-current");const i=V.find("[data-bs-target]",this._indicatorsElement);for(let e=0;e<i.length;e++)if(Number.parseInt(i[e].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){i[e].classList.add(it),i[e].setAttribute("aria-current","true");break}}}_updateInterval(){const t=this._activeElement||V.findOne(nt,this._element);if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){const i=this._directionToOrder(t),n=V.findOne(nt,this._element),o=this._getItemIndex(n),r=e||this._getItemByOrder(i,n),s=this._getItemIndex(r),a=Boolean(this._interval),l=i===Z,c=l?"carousel-item-start":"carousel-item-end",d=l?"carousel-item-next":"carousel-item-prev",h=this._orderToDirection(i);if(r&&r.classList.contains(it))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(r,h).defaultPrevented)return;if(!n||!r)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(r),this._activeElement=r;const p=()=>{O.trigger(this._element,et,{relatedTarget:r,direction:h,from:o,to:s})};if(this._element.classList.contains("slide")){r.classList.add(d),u(r),n.classList.add(c),r.classList.add(c);const t=()=>{r.classList.remove(c,d),r.classList.add(it),n.classList.remove(it,d,c),this._isSliding=!1,setTimeout(p,0)};this._queueCallback(t,n,!0)}else n.classList.remove(it),r.classList.add(it),this._isSliding=!1,p();a&&this.cycle()}_directionToOrder(t){return[J,Q].includes(t)?g()?t===Q?K:Z:t===Q?Z:K:t}_orderToDirection(t){return[Z,K].includes(t)?g()?t===K?Q:J:t===K?J:Q:t}static carouselInterface(t,e){const i=ot.getOrCreateInstance(t,e);let{_config:n}=i;"object"==typeof e&&(n={...n,...e});const o="string"==typeof e?e:n.slide;if("number"==typeof e)i.to(e);else if("string"==typeof o){if(void 0===i[o])throw new TypeError(`No method named "${o}"`);i[o]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(t){return this.each((function(){ot.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=n(this);if(!e||!e.classList.contains("carousel"))return;const i={...X.getDataAttributes(e),...X.getDataAttributes(this)},o=this.getAttribute("data-bs-slide-to");o&&(i.interval=!1),ot.carouselInterface(e,i),o&&ot.getInstance(e).to(o),t.preventDefault()}}O.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",ot.dataApiClickHandler),O.on(window,"load.bs.carousel.data-api",(()=>{const t=V.find('[data-bs-ride="carousel"]');for(let e=0,i=t.length;e<i;e++)ot.carouselInterface(t[e],ot.getInstance(t[e]))})),m(ot);const rt="collapse",st={toggle:!0,parent:null},at={toggle:"boolean",parent:"(null|element)"},lt="show",ct="collapse",dt="collapsing",ht="collapsed",ut=":scope .collapse .collapse",pt='[data-bs-toggle="collapse"]';class ft extends H{constructor(t,e){super(t),this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=[];const n=V.find(pt);for(let t=0,e=n.length;t<e;t++){const e=n[t],o=i(e),r=V.find(o).filter((t=>t===this._element));null!==o&&r.length&&(this._selector=o,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return st}static get NAME(){return rt}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=V.find(ut,this._config.parent);e=V.find(".collapse.show, .collapse.collapsing",this._config.parent).filter((e=>!t.includes(e)))}const i=V.findOne(this._selector);if(e.length){const n=e.find((t=>i!==t));if(t=n?ft.getInstance(n):null,t&&t._isTransitioning)return}if(O.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e.forEach((e=>{i!==e&&ft.getOrCreateInstance(e,{toggle:!1}).hide(),t||N.set(e,"bs.collapse",null)}));const n=this._getDimension();this._element.classList.remove(ct),this._element.classList.add(dt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(dt),this._element.classList.add(ct,lt),this._element.style[n]="",O.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[n]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(O.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,u(this._element),this._element.classList.add(dt),this._element.classList.remove(ct,lt);const e=this._triggerArray.length;for(let t=0;t<e;t++){const e=this._triggerArray[t],i=n(e);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(dt),this._element.classList.add(ct),O.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(lt)}_getConfig(t){return(t={...st,...X.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=s(t.parent),a(rt,t,at),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=V.find(ut,this._config.parent);V.find(pt,this._config.parent).filter((e=>!t.includes(e))).forEach((t=>{const e=n(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}))}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach((t=>{e?t.classList.remove(ht):t.classList.add(ht),t.setAttribute("aria-expanded",e)}))}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const i=ft.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}O.on(document,"click.bs.collapse.data-api",pt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=i(this);V.find(e).forEach((t=>{ft.getOrCreateInstance(t,{toggle:!1}).toggle()}))})),m(ft);var gt="top",mt="bottom",vt="right",yt="left",bt="auto",xt=[gt,mt,vt,yt],wt="start",St="end",Ct="clippingParents",kt="viewport",_t="popper",Tt="reference",Dt=xt.reduce((function(t,e){return t.concat([e+"-"+wt,e+"-"+St])}),[]),Et=[].concat(xt,[bt]).reduce((function(t,e){return t.concat([e,e+"-"+wt,e+"-"+St])}),[]),At="beforeRead",It="read",Pt="afterRead",Mt="beforeMain",Lt="main",Rt="afterMain",Ot="beforeWrite",Ft="write",Nt="afterWrite",Ht=[At,It,Pt,Mt,Lt,Rt,Ot,Ft,Nt];function zt(t){return t?(t.nodeName||"").toLowerCase():null}function Bt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function $t(t){return t instanceof Bt(t).Element||t instanceof Element}function jt(t){return t instanceof Bt(t).HTMLElement||t instanceof HTMLElement}function Wt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Bt(t).ShadowRoot||t instanceof ShadowRoot)}const Yt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},o=e.elements[t];jt(o)&&zt(o)&&(Object.assign(o.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],o=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});jt(n)&&zt(n)&&(Object.assign(n.style,r),Object.keys(o).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Xt(t){return t.split("-")[0]}function Vt(t,e){var i=t.getBoundingClientRect();return{width:i.width/1,height:i.height/1,top:i.top/1,right:i.right/1,bottom:i.bottom/1,left:i.left/1,x:i.left/1,y:i.top/1}}function qt(t){var e=Vt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Ut(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Wt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Gt(t){return Bt(t).getComputedStyle(t)}function Zt(t){return["table","td","th"].indexOf(zt(t))>=0}function Kt(t){return(($t(t)?t.ownerDocument:t.document)||window.document).documentElement}function Qt(t){return"html"===zt(t)?t:t.assignedSlot||t.parentNode||(Wt(t)?t.host:null)||Kt(t)}function Jt(t){return jt(t)&&"fixed"!==Gt(t).position?t.offsetParent:null}function te(t){for(var e=Bt(t),i=Jt(t);i&&Zt(i)&&"static"===Gt(i).position;)i=Jt(i);return i&&("html"===zt(i)||"body"===zt(i)&&"static"===Gt(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&jt(t)&&"fixed"===Gt(t).position)return null;for(var i=Qt(t);jt(i)&&["html","body"].indexOf(zt(i))<0;){var n=Gt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function ee(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var ie=Math.max,ne=Math.min,oe=Math.round;function re(t,e,i){return ie(t,ne(e,i))}function se(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function ae(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const le={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,o=t.options,r=i.elements.arrow,s=i.modifiersData.popperOffsets,a=Xt(i.placement),l=ee(a),c=[yt,vt].indexOf(a)>=0?"height":"width";if(r&&s){var d=function(t,e){return se("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ae(t,xt))}(o.padding,i),h=qt(r),u="y"===l?gt:yt,p="y"===l?mt:vt,f=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],g=s[l]-i.rects.reference[l],m=te(r),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=f/2-g/2,b=d[u],x=v-h[c]-d[p],w=v/2-h[c]/2+y,S=re(b,w,x),C=l;i.modifiersData[n]=((e={})[C]=S,e.centerOffset=S-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Ut(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ce(t){return t.split("-")[1]}var de={top:"auto",right:"auto",bottom:"auto",left:"auto"};function he(t){var e,i=t.popper,n=t.popperRect,o=t.placement,r=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,h=!0===d?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:oe(oe(e*n)/n)||0,y:oe(oe(i*n)/n)||0}}(s):"function"==typeof d?d(s):s,u=h.x,p=void 0===u?0:u,f=h.y,g=void 0===f?0:f,m=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=yt,b=gt,x=window;if(c){var w=te(i),S="clientHeight",C="clientWidth";w===Bt(i)&&"static"!==Gt(w=Kt(i)).position&&"absolute"===a&&(S="scrollHeight",C="scrollWidth"),o!==gt&&(o!==yt&&o!==vt||r!==St)||(b=mt,g-=w[S]-n.height,g*=l?1:-1),o!==yt&&(o!==gt&&o!==mt||r!==St)||(y=vt,p-=w[C]-n.width,p*=l?1:-1)}var k,_=Object.assign({position:a},c&&de);return l?Object.assign({},_,((k={})[b]=v?"0":"",k[y]=m?"0":"",k.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",k)):Object.assign({},_,((e={})[b]=v?g+"px":"",e[y]=m?p+"px":"",e.transform="",e))}const ue={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,o=void 0===n||n,r=i.adaptive,s=void 0===r||r,a=i.roundOffsets,l=void 0===a||a,c={placement:Xt(e.placement),variation:ce(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,he(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,he(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var pe={passive:!0};const fe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,o=n.scroll,r=void 0===o||o,s=n.resize,a=void 0===s||s,l=Bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",i.update,pe)})),a&&l.addEventListener("resize",i.update,pe),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",i.update,pe)})),a&&l.removeEventListener("resize",i.update,pe)}},data:{}};var ge={left:"right",right:"left",bottom:"top",top:"bottom"};function me(t){return t.replace(/left|right|bottom|top/g,(function(t){return ge[t]}))}var ve={start:"end",end:"start"};function ye(t){return t.replace(/start|end/g,(function(t){return ve[t]}))}function be(t){var e=Bt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xe(t){return Vt(Kt(t)).left+be(t).scrollLeft}function we(t){var e=Gt(t),i=e.overflow,n=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+o+n)}function Se(t){return["html","body","#document"].indexOf(zt(t))>=0?t.ownerDocument.body:jt(t)&&we(t)?t:Se(Qt(t))}function Ce(t,e){var i;void 0===e&&(e=[]);var n=Se(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),r=Bt(n),s=o?[r].concat(r.visualViewport||[],we(n)?n:[]):n,a=e.concat(s);return o?a:a.concat(Ce(Qt(s)))}function ke(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function _e(t,e){return e===kt?ke(function(t){var e=Bt(t),i=Kt(t),n=e.visualViewport,o=i.clientWidth,r=i.clientHeight,s=0,a=0;return n&&(o=n.width,r=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=n.offsetLeft,a=n.offsetTop)),{width:o,height:r,x:s+xe(t),y:a}}(t)):jt(e)?function(t){var e=Vt(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):ke(function(t){var e,i=Kt(t),n=be(t),o=null==(e=t.ownerDocument)?void 0:e.body,r=ie(i.scrollWidth,i.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=ie(i.scrollHeight,i.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-n.scrollLeft+xe(t),l=-n.scrollTop;return"rtl"===Gt(o||i).direction&&(a+=ie(i.clientWidth,o?o.clientWidth:0)-r),{width:r,height:s,x:a,y:l}}(Kt(t)))}function Te(t){var e,i=t.reference,n=t.element,o=t.placement,r=o?Xt(o):null,s=o?ce(o):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(r){case gt:e={x:a,y:i.y-n.height};break;case mt:e={x:a,y:i.y+i.height};break;case vt:e={x:i.x+i.width,y:l};break;case yt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=r?ee(r):null;if(null!=c){var d="y"===c?"height":"width";switch(s){case wt:e[c]=e[c]-(i[d]/2-n[d]/2);break;case St:e[c]=e[c]+(i[d]/2-n[d]/2)}}return e}function De(t,e){void 0===e&&(e={});var i=e,n=i.placement,o=void 0===n?t.placement:n,r=i.boundary,s=void 0===r?Ct:r,a=i.rootBoundary,l=void 0===a?kt:a,c=i.elementContext,d=void 0===c?_t:c,h=i.altBoundary,u=void 0!==h&&h,p=i.padding,f=void 0===p?0:p,g=se("number"!=typeof f?f:ae(f,xt)),m=d===_t?Tt:_t,v=t.rects.popper,y=t.elements[u?m:d],b=function(t,e,i){var n="clippingParents"===e?function(t){var e=Ce(Qt(t)),i=["absolute","fixed"].indexOf(Gt(t).position)>=0&&jt(t)?te(t):t;return $t(i)?e.filter((function(t){return $t(t)&&Ut(t,i)&&"body"!==zt(t)})):[]}(t):[].concat(e),o=[].concat(n,[i]),r=o[0],s=o.reduce((function(e,i){var n=_e(t,i);return e.top=ie(n.top,e.top),e.right=ne(n.right,e.right),e.bottom=ne(n.bottom,e.bottom),e.left=ie(n.left,e.left),e}),_e(t,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}($t(y)?y:y.contextElement||Kt(t.elements.popper),s,l),x=Vt(t.elements.reference),w=Te({reference:x,element:v,strategy:"absolute",placement:o}),S=ke(Object.assign({},v,w)),C=d===_t?S:x,k={top:b.top-C.top+g.top,bottom:C.bottom-b.bottom+g.bottom,left:b.left-C.left+g.left,right:C.right-b.right+g.right},_=t.modifiersData.offset;if(d===_t&&_){var T=_[o];Object.keys(k).forEach((function(t){var e=[vt,mt].indexOf(t)>=0?1:-1,i=[gt,mt].indexOf(t)>=0?"y":"x";k[t]+=T[i]*e}))}return k}const Ee={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var o=i.mainAxis,r=void 0===o||o,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,d=i.boundary,h=i.rootBoundary,u=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,v=Xt(m),y=l||(v!==m&&f?function(t){if(Xt(t)===bt)return[];var e=me(t);return[ye(t),e,ye(e)]}(m):[me(m)]),b=[m].concat(y).reduce((function(t,i){return t.concat(Xt(i)===bt?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,o=i.boundary,r=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Et:l,d=ce(n),h=d?a?Dt:Dt.filter((function(t){return ce(t)===d})):xt,u=h.filter((function(t){return c.indexOf(t)>=0}));0===u.length&&(u=h);var p=u.reduce((function(e,i){return e[i]=De(t,{placement:i,boundary:o,rootBoundary:r,padding:s})[Xt(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:d,rootBoundary:h,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,w=e.rects.popper,S=new Map,C=!0,k=b[0],_=0;_<b.length;_++){var T=b[_],D=Xt(T),E=ce(T)===wt,A=[gt,mt].indexOf(D)>=0,I=A?"width":"height",P=De(e,{placement:T,boundary:d,rootBoundary:h,altBoundary:u,padding:c}),M=A?E?vt:yt:E?mt:gt;x[I]>w[I]&&(M=me(M));var L=me(M),R=[];if(r&&R.push(P[D]<=0),a&&R.push(P[M]<=0,P[L]<=0),R.every((function(t){return t}))){k=T,C=!1;break}S.set(T,R)}if(C)for(var O=function(t){var e=b.find((function(e){var i=S.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return k=e,"break"},F=f?3:1;F>0&&"break"!==O(F);F--);e.placement!==k&&(e.modifiersData[n]._skip=!0,e.placement=k,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ae(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Ie(t){return[gt,vt,mt,yt].some((function(e){return t[e]>=0}))}const Pe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,o=e.rects.popper,r=e.modifiersData.preventOverflow,s=De(e,{elementContext:"reference"}),a=De(e,{altBoundary:!0}),l=Ae(s,n),c=Ae(a,o,r),d=Ie(l),h=Ie(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}},Me={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,o=i.offset,r=void 0===o?[0,0]:o,s=Et.reduce((function(t,i){return t[i]=function(t,e,i){var n=Xt(t),o=[yt,gt].indexOf(n)>=0?-1:1,r="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=r[0],a=r[1];return s=s||0,a=(a||0)*o,[yt,vt].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,r),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},Le={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=Te({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},Re={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,o=i.mainAxis,r=void 0===o||o,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,h=i.padding,u=i.tether,p=void 0===u||u,f=i.tetherOffset,g=void 0===f?0:f,m=De(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),v=Xt(e.placement),y=ce(e.placement),b=!y,x=ee(v),w="x"===x?"y":"x",S=e.modifiersData.popperOffsets,C=e.rects.reference,k=e.rects.popper,_="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,T={x:0,y:0};if(S){if(r||a){var D="y"===x?gt:yt,E="y"===x?mt:vt,A="y"===x?"height":"width",I=S[x],P=S[x]+m[D],M=S[x]-m[E],L=p?-k[A]/2:0,R=y===wt?C[A]:k[A],O=y===wt?-k[A]:-C[A],F=e.elements.arrow,N=p&&F?qt(F):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=H[D],B=H[E],$=re(0,C[A],N[A]),j=b?C[A]/2-L-$-z-_:R-$-z-_,W=b?-C[A]/2+L+$+B+_:O+$+B+_,Y=e.elements.arrow&&te(e.elements.arrow),X=Y?"y"===x?Y.clientTop||0:Y.clientLeft||0:0,V=e.modifiersData.offset?e.modifiersData.offset[e.placement][x]:0,q=S[x]+j-V-X,U=S[x]+W-V;if(r){var G=re(p?ne(P,q):P,I,p?ie(M,U):M);S[x]=G,T[x]=G-I}if(a){var Z="x"===x?gt:yt,K="x"===x?mt:vt,Q=S[w],J=Q+m[Z],tt=Q-m[K],et=re(p?ne(J,q):J,Q,p?ie(tt,U):tt);S[w]=et,T[w]=et-Q}}e.modifiersData[n]=T}},requiresIfExists:["offset"]};function Oe(t,e,i){void 0===i&&(i=!1);var n=jt(e);jt(e)&&function(t){var e=t.getBoundingClientRect();e.width,t.offsetWidth,e.height,t.offsetHeight}(e);var o,r,s=Kt(e),a=Vt(t),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!i)&&(("body"!==zt(e)||we(s))&&(l=(o=e)!==Bt(o)&&jt(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:be(o)),jt(e)?((c=Vt(e)).x+=e.clientLeft,c.y+=e.clientTop):s&&(c.x=xe(s))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Fe(t){var e=new Map,i=new Set,n=[];function o(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&o(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||o(t)})),n}var Ne={placement:"bottom",modifiers:[],strategy:"absolute"};function He(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function ze(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,o=e.defaultOptions,r=void 0===o?Ne:o;return function(t,e,i){void 0===i&&(i=r);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ne,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,d={state:a,setOptions:function(i){var o="function"==typeof i?i(a.options):i;h(),a.options=Object.assign({},r,a.options,o),a.scrollParents={reference:$t(t)?Ce(t):t.contextElement?Ce(t.contextElement):[],popper:Ce(e)};var s,c,u=function(t){var e=Fe(t);return Ht.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((s=[].concat(n,a.options.modifiers),c=s.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=u.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,o=t.effect;if("function"==typeof o){var r=o({state:a,name:e,instance:d,options:n});l.push(r||function(){})}})),d.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(He(e,i)){a.rects={reference:Oe(e,te(i),"fixed"===a.options.strategy),popper:qt(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var o=a.orderedModifiers[n],r=o.fn,s=o.options,l=void 0===s?{}:s,h=o.name;"function"==typeof r&&(a=r({state:a,options:l,name:h,instance:d})||a)}else a.reset=!1,n=-1}}},update:(o=function(){return new Promise((function(t){d.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(o())}))}))),s}),destroy:function(){h(),c=!0}};if(!He(t,e))return d;function h(){l.forEach((function(t){return t()})),l=[]}return d.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),d}}var Be=ze(),$e=ze({defaultModifiers:[fe,Le,ue,Yt]}),je=ze({defaultModifiers:[fe,Le,ue,Yt,Me,Ee,Re,le,Pe]});const We=Object.freeze({__proto__:null,popperGenerator:ze,detectOverflow:De,createPopperBase:Be,createPopper:je,createPopperLite:$e,top:gt,bottom:mt,right:vt,left:yt,auto:bt,basePlacements:xt,start:wt,end:St,clippingParents:Ct,viewport:kt,popper:_t,reference:Tt,variationPlacements:Dt,placements:Et,beforeRead:At,read:It,afterRead:Pt,beforeMain:Mt,main:Lt,afterMain:Rt,beforeWrite:Ot,write:Ft,afterWrite:Nt,modifierPhases:Ht,applyStyles:Yt,arrow:le,computeStyles:ue,eventListeners:fe,flip:Ee,hide:Pe,offset:Me,popperOffsets:Le,preventOverflow:Re}),Ye="dropdown",Xe="Escape",Ve="Space",qe="ArrowUp",Ue="ArrowDown",Ge=new RegExp("ArrowUp|ArrowDown|Escape"),Ze="click.bs.dropdown.data-api",Ke="keydown.bs.dropdown.data-api",Qe="show",Je='[data-bs-toggle="dropdown"]',ti=".dropdown-menu",ei=g()?"top-end":"top-start",ii=g()?"top-start":"top-end",ni=g()?"bottom-end":"bottom-start",oi=g()?"bottom-start":"bottom-end",ri=g()?"left-start":"right-start",si=g()?"right-start":"left-start",ai={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},li={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class ci extends H{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return ai}static get DefaultType(){return li}static get NAME(){return Ye}toggle(){return this._isShown()?this.hide():this.show()}show(){if(c(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if(O.trigger(this._element,"show.bs.dropdown",t).defaultPrevented)return;const e=ci.getParentFromElement(this._element);this._inNavbar?X.setDataAttribute(this._menu,"popper","none"):this._createPopper(e),"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&[].concat(...document.body.children).forEach((t=>O.on(t,"mouseover",h))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Qe),this._element.classList.add(Qe),O.trigger(this._element,"shown.bs.dropdown",t)}hide(){if(c(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){O.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>O.off(t,"mouseover",h))),this._popper&&this._popper.destroy(),this._menu.classList.remove(Qe),this._element.classList.remove(Qe),this._element.setAttribute("aria-expanded","false"),X.removeDataAttribute(this._menu,"popper"),O.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...X.getDataAttributes(this._element),...t},a(Ye,t,this.constructor.DefaultType),"object"==typeof t.reference&&!r(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ye.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(void 0===We)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:r(this._config.reference)?e=s(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const i=this._getPopperConfig(),n=i.modifiers.find((t=>"applyStyles"===t.name&&!1===t.enabled));this._popper=je(e,this._menu,i),n&&X.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(Qe)}_getMenuElement(){return V.next(this._element,ti)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return ri;if(t.classList.contains("dropstart"))return si;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?ii:ei:e?oi:ni}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=V.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(l);i.length&&b(i,e,t===Ue,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=ci.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(2===t.button||"keyup"===t.type&&"Tab"!==t.key))return;const e=V.find(Je);for(let i=0,n=e.length;i<n;i++){const n=ci.getInstance(e[i]);if(!n||!1===n._config.autoClose)continue;if(!n._isShown())continue;const o={relatedTarget:n._element};if(t){const e=t.composedPath(),i=e.includes(n._menu);if(e.includes(n._element)||"inside"===n._config.autoClose&&!i||"outside"===n._config.autoClose&&i)continue;if(n._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;"click"===t.type&&(o.clickEvent=t)}n._completeHide(o)}}static getParentFromElement(t){return n(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?t.key===Ve||t.key!==Xe&&(t.key!==Ue&&t.key!==qe||t.target.closest(ti)):!Ge.test(t.key))return;const e=this.classList.contains(Qe);if(!e&&t.key===Xe)return;if(t.preventDefault(),t.stopPropagation(),c(this))return;const i=this.matches(Je)?this:V.prev(this,Je)[0],n=ci.getOrCreateInstance(i);if(t.key!==Xe)return t.key===qe||t.key===Ue?(e||n.show(),void n._selectMenuItem(t)):void(e&&t.key!==Ve||ci.clearMenus());n.hide()}}O.on(document,Ke,Je,ci.dataApiKeydownHandler),O.on(document,Ke,ti,ci.dataApiKeydownHandler),O.on(document,Ze,ci.clearMenus),O.on(document,"keyup.bs.dropdown.data-api",ci.clearMenus),O.on(document,Ze,Je,(function(t){t.preventDefault(),ci.getOrCreateInstance(this).toggle()})),m(ci);const di=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",hi=".sticky-top";class ui{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",(e=>e+t)),this._setElementAttributes(di,"paddingRight",(e=>e+t)),this._setElementAttributes(hi,"marginRight",(e=>e-t))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const o=window.getComputedStyle(t)[e];t.style[e]=`${i(Number.parseFloat(o))}px`}))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(di,"paddingRight"),this._resetElementAttributes(hi,"marginRight")}_saveInitialAttribute(t,e){const i=t.style[e];i&&X.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=X.getDataAttribute(t,e);void 0===i?t.style.removeProperty(e):(X.removeDataAttribute(t,e),t.style[e]=i)}))}_applyManipulationCallback(t,e){r(t)?e(t):V.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const pi={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},fi={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},gi="show",mi="mousedown.bs.backdrop";class vi{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&u(this._getElement()),this._getElement().classList.add(gi),this._emulateAnimation((()=>{v(t)}))):v(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove(gi),this._emulateAnimation((()=>{this.dispose(),v(t)}))):v(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_getConfig(t){return(t={...pi,..."object"==typeof t?t:{}}).rootElement=s(t.rootElement),a("backdrop",t,fi),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),O.on(this._getElement(),mi,(()=>{v(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&(O.off(this._element,mi),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){y(t,this._getElement(),this._config.isAnimated)}}const yi={trapElement:null,autofocus:!0},bi={trapElement:"element",autofocus:"boolean"},xi=".bs.focustrap",wi="backward";class Si{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),O.off(document,xi),O.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),O.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,O.off(document,xi))}_handleFocusin(t){const{target:e}=t,{trapElement:i}=this._config;if(e===document||e===i||i.contains(e))return;const n=V.focusableChildren(i);0===n.length?i.focus():this._lastTabNavDirection===wi?n[n.length-1].focus():n[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?wi:"forward")}_getConfig(t){return t={...yi,..."object"==typeof t?t:{}},a("focustrap",t,bi),t}}const Ci="modal",ki="Escape",_i={backdrop:!0,keyboard:!0,focus:!0},Ti={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Di="hidden.bs.modal",Ei="show.bs.modal",Ai="resize.bs.modal",Ii="click.dismiss.bs.modal",Pi="keydown.dismiss.bs.modal",Mi="mousedown.dismiss.bs.modal",Li="modal-open",Ri="show",Oi="modal-static";class Fi extends H{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=V.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new ui}static get Default(){return _i}static get NAME(){return Ci}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||O.trigger(this._element,Ei,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Li),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),O.on(this._dialog,Mi,(()=>{O.one(this._element,"mouseup.dismiss.bs.modal",(t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;if(O.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(Ri),O.off(this._element,Ii),O.off(this._dialog,Mi),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((t=>O.off(t,".bs.modal"))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new vi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Si({trapElement:this._element})}_getConfig(t){return t={..._i,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},a(Ci,t,Ti),t}_showElement(t){const e=this._isAnimated(),i=V.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),e&&u(this._element),this._element.classList.add(Ri),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,O.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,e)}_setEscapeEvent(){this._isShown?O.on(this._element,Pi,(t=>{this._config.keyboard&&t.key===ki?(t.preventDefault(),this.hide()):this._config.keyboard||t.key!==ki||this._triggerBackdropTransition()})):O.off(this._element,Pi)}_setResizeEvent(){this._isShown?O.on(window,Ai,(()=>this._adjustDialog())):O.off(window,Ai)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Li),this._resetAdjustments(),this._scrollBar.reset(),O.trigger(this._element,Di)}))}_showBackdrop(t){O.on(this._element,Ii,(t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(O.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:t,scrollHeight:e,style:i}=this._element,n=e>document.documentElement.clientHeight;!n&&"hidden"===i.overflowY||t.contains(Oi)||(n||(i.overflowY="hidden"),t.add(Oi),this._queueCallback((()=>{t.remove(Oi),n||this._queueCallback((()=>{i.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;(!i&&t&&!g()||i&&!t&&g())&&(this._element.style.paddingLeft=`${e}px`),(i&&!t&&!g()||!i&&t&&g())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Fi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}O.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=n(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),O.one(e,Ei,(t=>{t.defaultPrevented||O.one(e,Di,(()=>{l(this)&&this.focus()}))}));const i=V.findOne(".modal.show");i&&Fi.getInstance(i).hide(),Fi.getOrCreateInstance(e).toggle(this)})),z(Fi),m(Fi);const Ni="offcanvas",Hi={backdrop:!0,keyboard:!0,scroll:!1},zi={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},Bi="show",$i=".offcanvas.show",ji="hidden.bs.offcanvas";class Wi extends H{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return Ni}static get Default(){return Hi}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||O.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new ui).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Bi),this._queueCallback((()=>{this._config.scroll||this._focustrap.activate(),O.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(O.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(Bi),this._backdrop.hide(),this._queueCallback((()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new ui).reset(),O.trigger(this._element,ji)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...Hi,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},a(Ni,t,zi),t}_initializeBackDrop(){return new vi({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Si({trapElement:this._element})}_addEventListeners(){O.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()}))}static jQueryInterface(t){return this.each((function(){const e=Wi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}O.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=n(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this))return;O.one(e,ji,(()=>{l(this)&&this.focus()}));const i=V.findOne($i);i&&i!==e&&Wi.getInstance(i).hide(),Wi.getOrCreateInstance(e).toggle(this)})),O.on(window,"load.bs.offcanvas.data-api",(()=>V.find($i).forEach((t=>Wi.getOrCreateInstance(t).show())))),z(Wi),m(Wi);const Yi=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Xi=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Vi=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,qi=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!Yi.has(i)||Boolean(Xi.test(t.nodeValue)||Vi.test(t.nodeValue));const n=e.filter((t=>t instanceof RegExp));for(let t=0,e=n.length;t<e;t++)if(n[t].test(i))return!0;return!1};function Ui(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),o=[].concat(...n.body.querySelectorAll("*"));for(let t=0,i=o.length;t<i;t++){const i=o[t],n=i.nodeName.toLowerCase();if(!Object.keys(e).includes(n)){i.remove();continue}const r=[].concat(...i.attributes),s=[].concat(e["*"]||[],e[n]||[]);r.forEach((t=>{qi(t,s)||i.removeAttribute(t.nodeName)}))}return n.body.innerHTML}const Gi="tooltip",Zi=new Set(["sanitize","allowList","sanitizeFn"]),Ki={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Qi={AUTO:"auto",TOP:"top",RIGHT:g()?"left":"right",BOTTOM:"bottom",LEFT:g()?"right":"left"},Ji={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},tn={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},en="fade",nn="show",on="show",rn="out",sn=".tooltip-inner",an=".modal",ln="hide.bs.modal",cn="hover",dn="focus";class hn extends H{constructor(t,e){if(void 0===We)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Ji}static get NAME(){return Gi}static get Event(){return tn}static get DefaultType(){return Ki}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(nn))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),O.off(this._element.closest(an),ln,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=O.trigger(this._element,this.constructor.Event.SHOW),e=d(this._element),i=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!i)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(sn).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),o=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME);n.setAttribute("id",o),this._element.setAttribute("aria-describedby",o),this._config.animation&&n.classList.add(en);const r="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,s=this._getAttachment(r);this._addAttachmentClass(s);const{container:a}=this._config;N.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(a.append(n),O.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=je(this._element,n,this._getPopperConfig(s)),n.classList.add(nn);const l=this._resolvePossibleFunction(this._config.customClass);l&&n.classList.add(...l.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>{O.on(t,"mouseover",h)}));const c=this.tip.classList.contains(en);this._queueCallback((()=>{const t=this._hoverState;this._hoverState=null,O.trigger(this._element,this.constructor.Event.SHOWN),t===rn&&this._leave(null,this)}),this.tip,c)}hide(){if(!this._popper)return;const t=this.getTipElement();if(O.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(nn),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>O.off(t,"mouseover",h))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains(en);this._queueCallback((()=>{this._isWithActiveTrigger()||(this._hoverState!==on&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),O.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())}),this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(en,nn),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),sn)}_sanitizeAndSetContent(t,e,i){const n=V.findOne(i,t);e||!n?this.setElementContent(n,e):n.remove()}setElementContent(t,e){if(null!==t)return r(e)?(e=s(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=Ui(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return Qi[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((t=>{if("click"===t)O.on(this._element,this.constructor.Event.CLICK,this._config.selector,(t=>this.toggle(t)));else if("manual"!==t){const e=t===cn?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=t===cn?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;O.on(this._element,e,this._config.selector,(t=>this._enter(t))),O.on(this._element,i,this._config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},O.on(this._element.closest(an),ln,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?dn:cn]=!0),e.getTipElement().classList.contains(nn)||e._hoverState===on?e._hoverState=on:(clearTimeout(e._timeout),e._hoverState=on,e._config.delay&&e._config.delay.show?e._timeout=setTimeout((()=>{e._hoverState===on&&e.show()}),e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?dn:cn]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=rn,e._config.delay&&e._config.delay.hide?e._timeout=setTimeout((()=>{e._hoverState===rn&&e.hide()}),e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=X.getDataAttributes(this._element);return Object.keys(e).forEach((t=>{Zi.has(t)&&delete e[t]})),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:s(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),a(Gi,t,this.constructor.DefaultType),t.sanitize&&(t.template=Ui(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=t.getAttribute("class").match(e);null!==i&&i.length>0&&i.map((t=>t.trim())).forEach((e=>t.classList.remove(e)))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=hn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(hn);const un={...hn.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},pn={...hn.DefaultType,content:"(string|element|function)"},fn={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class gn extends hn{static get Default(){return un}static get NAME(){return"popover"}static get Event(){return fn}static get DefaultType(){return pn}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(t,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(t){return this.each((function(){const e=gn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(gn);const mn="scrollspy",vn={offset:10,method:"auto",target:""},yn={offset:"number",method:"string",target:"(string|element)"},bn="active",xn=".nav-link, .list-group-item, .dropdown-item",wn="position";class Sn extends H{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,O.on(this._scrollElement,"scroll.bs.scrollspy",(()=>this._process())),this.refresh(),this._process()}static get Default(){return vn}static get NAME(){return mn}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":wn,e="auto"===this._config.method?t:this._config.method,n=e===wn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),V.find(xn,this._config.target).map((t=>{const o=i(t),r=o?V.findOne(o):null;if(r){const t=r.getBoundingClientRect();if(t.width||t.height)return[X[e](r).top+n,o]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){O.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){return(t={...vn,...X.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=s(t.target)||document.documentElement,a(mn,t,yn),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}_activate(t){this._activeTarget=t,this._clear();const e=xn.split(",").map((e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`)),i=V.findOne(e.join(","),this._config.target);i.classList.add(bn),i.classList.contains("dropdown-item")?V.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(bn):V.parents(i,".nav, .list-group").forEach((t=>{V.prev(t,".nav-link, .list-group-item").forEach((t=>t.classList.add(bn))),V.prev(t,".nav-item").forEach((t=>{V.children(t,".nav-link").forEach((t=>t.classList.add(bn)))}))})),O.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})}_clear(){V.find(xn,this._config.target).filter((t=>t.classList.contains(bn))).forEach((t=>t.classList.remove(bn)))}static jQueryInterface(t){return this.each((function(){const e=Sn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}O.on(window,"load.bs.scrollspy.data-api",(()=>{V.find('[data-bs-spy="scroll"]').forEach((t=>new Sn(t)))})),m(Sn);const Cn="active",kn="fade",_n="show",Tn=".active",Dn=":scope > li > .active";class En extends H{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Cn))return;let t;const e=n(this._element),i=this._element.closest(".nav, .list-group");if(i){const e="UL"===i.nodeName||"OL"===i.nodeName?Dn:Tn;t=V.find(e,i),t=t[t.length-1]}const o=t?O.trigger(t,"hide.bs.tab",{relatedTarget:this._element}):null;if(O.trigger(this._element,"show.bs.tab",{relatedTarget:t}).defaultPrevented||null!==o&&o.defaultPrevented)return;this._activate(this._element,i);const r=()=>{O.trigger(t,"hidden.bs.tab",{relatedTarget:this._element}),O.trigger(this._element,"shown.bs.tab",{relatedTarget:t})};e?this._activate(e,e.parentNode,r):r()}_activate(t,e,i){const n=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?V.children(e,Tn):V.find(Dn,e))[0],o=i&&n&&n.classList.contains(kn),r=()=>this._transitionComplete(t,n,i);n&&o?(n.classList.remove(_n),this._queueCallback(r,t,!0)):r()}_transitionComplete(t,e,i){if(e){e.classList.remove(Cn);const t=V.findOne(":scope > .dropdown-menu .active",e.parentNode);t&&t.classList.remove(Cn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(Cn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),u(t),t.classList.contains(kn)&&t.classList.add(_n);let n=t.parentNode;if(n&&"LI"===n.nodeName&&(n=n.parentNode),n&&n.classList.contains("dropdown-menu")){const e=t.closest(".dropdown");e&&V.find(".dropdown-toggle",e).forEach((t=>t.classList.add(Cn))),t.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(t){return this.each((function(){const e=En.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}O.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),c(this)||En.getOrCreateInstance(this).show()})),m(En);const An="toast",In="hide",Pn="show",Mn="showing",Ln={animation:"boolean",autohide:"boolean",delay:"number"},Rn={animation:!0,autohide:!0,delay:5e3};class On extends H{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return Ln}static get Default(){return Rn}static get NAME(){return An}show(){O.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(In),u(this._element),this._element.classList.add(Pn),this._element.classList.add(Mn),this._queueCallback((()=>{this._element.classList.remove(Mn),O.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this._element.classList.contains(Pn)&&(O.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(Mn),this._queueCallback((()=>{this._element.classList.add(In),this._element.classList.remove(Mn),this._element.classList.remove(Pn),O.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains(Pn)&&this._element.classList.remove(Pn),super.dispose()}_getConfig(t){return t={...Rn,...X.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},a(An,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){O.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),O.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),O.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),O.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=On.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return z(On),m(On),{Alert:B,Button:j,Carousel:ot,Collapse:ft,Dropdown:ci,Modal:Fi,Offcanvas:Wi,Popover:gn,ScrollSpy:Sn,Tab:En,Toast:On,Tooltip:hn}})),$.fn.removeClassPrefix=function(t){return this.each((function(e,i){var n=i.className.split(" ").map((function(e){return 0===e.indexOf(t)?"":e}));i.className=n.join(" ")})),this};var getUrlParameter=function(t){var e,i,n=decodeURIComponent(window.location.search.substring(1)).split("&");for(i=0;i<n.length;i++)if((e=n[i].split("="))[0]===t)return void 0===e[1]||e[1]};function detectIE(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)}function rgb2hex(t){function e(t){return("0"+parseInt(t).toString(16)).slice(-2)}return"#"+e((t=t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))[1])+e(t[2])+e(t[3])}jQuery.fn.extend({toggleText:function(t,e){var i=this;return i.text()!=t&&i.text()!=e?i.text(t):i.text()==t?i.text(e):i.text()==e&&i.text(t),this}}),function(t,e){var i,n=t.jQuery||t.Cowboy||(t.Cowboy={});n.throttle=i=function(t,i,o,r){var s,a=0;function l(){var n=this,l=+new Date-a,c=arguments;function d(){a=+new Date,o.apply(n,c)}r&&!s&&d(),s&&clearTimeout(s),r===e&&l>t?d():!0!==i&&(s=setTimeout(r?function(){s=e}:d,r===e?t-l:t))}return"boolean"!=typeof i&&(r=o,o=i,i=e),n.guid&&(l.guid=o.guid=o.guid||n.guid++),l},n.debounce=function(t,n,o){return o===e?i(t,n,!1):i(t,o,!1!==n)}}(this),function(e){e.fn.extend({slimScroll:function(i){var n=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},i);return this.each((function(){var o,r,s,a,l,c,d,h,u="<div></div>",p=!1,f=e(this);if(f.parent().hasClass(n.wrapperClass)){var g=f.scrollTop();if(x=f.siblings("."+n.barClass),b=f.siblings("."+n.railClass),k(),e.isPlainObject(i)){if("height"in i&&"auto"==i.height){f.parent().css("height","auto"),f.css("height","auto");var m=f.parent().parent().height();f.parent().css("height",m),f.css("height",m)}else if("height"in i){var v=i.height;f.parent().css("height",v),f.css("height",v)}if("scrollTo"in i)g=parseInt(n.scrollTo);else if("scrollBy"in i)g+=parseInt(n.scrollBy);else if("destroy"in i)return x.remove(),b.remove(),void f.unwrap();C(g,!1,!0)}}else if(!e.isPlainObject(i)||!("destroy"in i)){n.height="auto"==n.height?f.parent().height():n.height;var y=e(u).addClass(n.wrapperClass).css({position:"relative",overflow:"hidden",width:n.width,height:n.height});f.css({overflow:"hidden",width:n.width,height:n.height});var b=e(u).addClass(n.railClass).css({width:n.size,height:"100%",position:"absolute",top:0,display:n.alwaysVisible&&n.railVisible?"block":"none","border-radius":n.railBorderRadius,background:n.railColor,opacity:n.railOpacity,zIndex:90}),x=e(u).addClass(n.barClass).css({background:n.color,width:n.size,position:"absolute",top:0,opacity:n.opacity,display:n.alwaysVisible?"block":"none","border-radius":n.borderRadius,BorderRadius:n.borderRadius,MozBorderRadius:n.borderRadius,WebkitBorderRadius:n.borderRadius,zIndex:99}),w="right"==n.position?{right:n.distance}:{left:n.distance};b.css(w),x.css(w),f.wrap(y),f.parent().append(x),f.parent().append(b),n.railDraggable&&x.bind("mousedown",(function(i){var n=e(document);return s=!0,t=parseFloat(x.css("top")),pageY=i.pageY,n.bind("mousemove.slimscroll",(function(e){currTop=t+e.pageY-pageY,x.css("top",currTop),C(0,x.position().top,!1)})),n.bind("mouseup.slimscroll",(function(t){s=!1,T(),n.unbind(".slimscroll")})),!1})).bind("selectstart.slimscroll",(function(t){return t.stopPropagation(),t.preventDefault(),!1})),b.hover((function(){_()}),(function(){T()})),x.hover((function(){r=!0}),(function(){r=!1})),f.hover((function(){o=!0,_(),T()}),(function(){o=!1,T()})),f.bind("touchstart",(function(t,e){t.originalEvent.touches.length&&(l=t.originalEvent.touches[0].pageY)})),f.bind("touchmove",(function(t){p||t.originalEvent.preventDefault(),t.originalEvent.touches.length&&(C((l-t.originalEvent.touches[0].pageY)/n.touchScrollStep,!0),l=t.originalEvent.touches[0].pageY)})),k(),"bottom"===n.start?(x.css({top:f.outerHeight()-x.outerHeight()}),C(0,!0)):"top"!==n.start&&(C(e(n.start).position().top,null,!0),n.alwaysVisible||x.hide()),window.addEventListener?(this.addEventListener("DOMMouseScroll",S,!1),this.addEventListener("mousewheel",S,!1)):document.attachEvent("onmousewheel",S)}function S(t){if(o){var i=0;(t=t||window.event).wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3);var r=t.target||t.srcTarget||t.srcElement;e(r).closest("."+n.wrapperClass).is(f.parent())&&C(i,!0),t.preventDefault&&!p&&t.preventDefault(),p||(t.returnValue=!1)}}function C(t,e,i){p=!1;var o=t,r=f.outerHeight()-x.outerHeight();if(e&&(o=parseInt(x.css("top"))+t*parseInt(n.wheelStep)/100*x.outerHeight(),o=Math.min(Math.max(o,0),r),o=t>0?Math.ceil(o):Math.floor(o),x.css({top:o+"px"})),o=(d=parseInt(x.css("top"))/(f.outerHeight()-x.outerHeight()))*(f[0].scrollHeight-f.outerHeight()),i){var s=(o=t)/f[0].scrollHeight*f.outerHeight();s=Math.min(Math.max(s,0),r),x.css({top:s+"px"})}f.scrollTop(o),f.trigger("slimscrolling",~~o),_(),T()}function k(){c=Math.max(f.outerHeight()/f[0].scrollHeight*f.outerHeight(),30),x.css({height:c+"px"});var t=c==f.outerHeight()?"none":"block";x.css({display:t})}function _(){if(k(),clearTimeout(a),d==~~d){if(p=n.allowPageScroll,h!=d){var t=~~d?"bottom":"top";f.trigger("slimscroll",t)}}else p=!1;h=d,c>=f.outerHeight()?p=!0:(x.stop(!0,!0).fadeIn("fast"),n.railVisible&&b.stop(!0,!0).fadeIn("fast"))}function T(){n.alwaysVisible||(a=setTimeout((function(){n.disableFadeOut&&o||r||s||(x.fadeOut("slow"),b.fadeOut("slow"))}),1e3))}})),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery),function(t,e){"use strict";"function"==typeof define&&define.amd?define([],(function(){return t.Waves=e.call(t),t.Waves})):"object"==typeof exports?module.exports=e.call(t):t.Waves=e.call(t)}("object"==typeof global?global:this,(function(){"use strict";var t=t||{},e=document.querySelectorAll.bind(document),i=Object.prototype.toString,n="ontouchstart"in window;function o(t){var e=typeof t;return"function"===e||"object"===e&&!!t}function r(t){var n,r=i.call(t);return"[object String]"===r?e(t):o(t)&&/^\[object (Array|HTMLCollection|NodeList|Object)\]$/.test(r)&&t.hasOwnProperty("length")?t:o(n=t)&&n.nodeType>0?[t]:[]}function s(t){var e,i,n={top:0,left:0},o=t&&t.ownerDocument;return e=o.documentElement,void 0!==t.getBoundingClientRect&&(n=t.getBoundingClientRect()),i=function(t){return null!==(e=t)&&e===e.window?t:9===t.nodeType&&t.defaultView;var e}(o),{top:n.top+i.pageYOffset-e.clientTop,left:n.left+i.pageXOffset-e.clientLeft}}function a(t){var e="";for(var i in t)t.hasOwnProperty(i)&&(e+=i+":"+t[i]+";");return e}var l={duration:750,delay:200,show:function(t,e,i){if(2===t.button)return!1;e=e||this;var n=document.createElement("div");n.className="waves-ripple waves-rippling",e.appendChild(n);var o=s(e),r=0,c=0;"touches"in t&&t.touches.length?(r=t.touches[0].pageY-o.top,c=t.touches[0].pageX-o.left):(r=t.pageY-o.top,c=t.pageX-o.left),c=c>=0?c:0,r=r>=0?r:0;var d="scale("+e.clientWidth/100*3+")",h="translate(0,0)";i&&(h="translate("+i.x+"px, "+i.y+"px)"),n.setAttribute("data-hold",Date.now()),n.setAttribute("data-x",c),n.setAttribute("data-y",r),n.setAttribute("data-scale",d),n.setAttribute("data-translate",h);var u={top:r+"px",left:c+"px"};n.classList.add("waves-notransition"),n.setAttribute("style",a(u)),n.classList.remove("waves-notransition"),u["-webkit-transform"]=d+" "+h,u["-moz-transform"]=d+" "+h,u["-ms-transform"]=d+" "+h,u["-o-transform"]=d+" "+h,u.transform=d+" "+h,u.opacity="1";var p="mousemove"===t.type?2500:l.duration;u["-webkit-transition-duration"]=p+"ms",u["-moz-transition-duration"]=p+"ms",u["-o-transition-duration"]=p+"ms",u["transition-duration"]=p+"ms",n.setAttribute("style",a(u))},hide:function(t,e){for(var i=(e=e||this).getElementsByClassName("waves-rippling"),o=0,r=i.length;o<r;o++)d(t,e,i[o]);n&&(e.removeEventListener("touchend",l.hide),e.removeEventListener("touchcancel",l.hide)),e.removeEventListener("mouseup",l.hide),e.removeEventListener("mouseleave",l.hide)}},c={input:function(t){var e=t.parentNode;if("i"!==e.tagName.toLowerCase()||!e.classList.contains("waves-effect")){var i=document.createElement("i");i.className=t.className+" waves-input-wrapper",t.className="waves-button-input",e.replaceChild(i,t),i.appendChild(t);var n=window.getComputedStyle(t,null),o=n.color,r=n.backgroundColor;i.setAttribute("style","color:"+o+";background:"+r),t.setAttribute("style","background-color:rgba(0,0,0,0);")}},img:function(t){var e=t.parentNode;if("i"!==e.tagName.toLowerCase()||!e.classList.contains("waves-effect")){var i=document.createElement("i");e.replaceChild(i,t),i.appendChild(t)}}};function d(t,e,i){if(i){i.classList.remove("waves-rippling");var n=i.getAttribute("data-x"),o=i.getAttribute("data-y"),r=i.getAttribute("data-scale"),s=i.getAttribute("data-translate"),c=350-(Date.now()-Number(i.getAttribute("data-hold")));c<0&&(c=0),"mousemove"===t.type&&(c=150);var d="mousemove"===t.type?2500:l.duration;setTimeout((function(){var t={top:o+"px",left:n+"px",opacity:"0","-webkit-transition-duration":d+"ms","-moz-transition-duration":d+"ms","-o-transition-duration":d+"ms","transition-duration":d+"ms","-webkit-transform":r+" "+s,"-moz-transform":r+" "+s,"-ms-transform":r+" "+s,"-o-transform":r+" "+s,transform:r+" "+s};i.setAttribute("style",a(t)),setTimeout((function(){try{e.removeChild(i)}catch(t){return!1}}),d)}),c)}}var h={touches:0,allowEvent:function(t){var e=!0;return/^(mousedown|mousemove)$/.test(t.type)&&h.touches&&(e=!1),e},registerEvent:function(t){var e=t.type;"touchstart"===e?h.touches+=1:/^(touchend|touchcancel)$/.test(e)&&setTimeout((function(){h.touches&&(h.touches-=1)}),500)}};function u(t){var e=function(t){if(!1===h.allowEvent(t))return null;for(var e=null,i=t.target||t.srcElement;i.parentElement;){if(!(i instanceof SVGElement)&&i.classList.contains("waves-effect")){e=i;break}i=i.parentElement}return e}(t);if(null!==e){if(e.disabled||e.getAttribute("disabled")||e.classList.contains("disabled"))return;if(h.registerEvent(t),"touchstart"===t.type&&l.delay){var i=!1,o=setTimeout((function(){o=null,l.show(t,e)}),l.delay),r=function(n){o&&(clearTimeout(o),o=null,l.show(t,e)),i||(i=!0,l.hide(n,e)),a()},s=function(t){o&&(clearTimeout(o),o=null),r(t),a()};e.addEventListener("touchmove",s,!1),e.addEventListener("touchend",r,!1),e.addEventListener("touchcancel",r,!1);var a=function(){e.removeEventListener("touchmove",s),e.removeEventListener("touchend",r),e.removeEventListener("touchcancel",r)}}else l.show(t,e),n&&(e.addEventListener("touchend",l.hide,!1),e.addEventListener("touchcancel",l.hide,!1)),e.addEventListener("mouseup",l.hide,!1),e.addEventListener("mouseleave",l.hide,!1)}}return t.init=function(t){var e=document.body;"duration"in(t=t||{})&&(l.duration=t.duration),"delay"in t&&(l.delay=t.delay),n&&(e.addEventListener("touchstart",u,!1),e.addEventListener("touchcancel",h.registerEvent,!1),e.addEventListener("touchend",h.registerEvent,!1)),e.addEventListener("mousedown",u,!1)},t.attach=function(t,e){var n,o;t=r(t),"[object Array]"===i.call(e)&&(e=e.join(" ")),e=e?" "+e:"";for(var s=0,a=t.length;s<a;s++)o=(n=t[s]).tagName.toLowerCase(),-1!==["input","img"].indexOf(o)&&(c[o](n),n=n.parentElement),-1===n.className.indexOf("waves-effect")&&(n.className+=" waves-effect"+e)},t.ripple=function(t,e){var i=(t=r(t)).length;if((e=e||{}).wait=e.wait||0,e.position=e.position||null,i)for(var n,o,a,c={},d=0,h={type:"mousedown",button:1},u=function(t,e){return function(){l.hide(t,e)}};d<i;d++)n=t[d],o=e.position||{x:n.clientWidth/2,y:n.clientHeight/2},a=s(n),c.x=a.left+o.x,c.y=a.top+o.y,h.pageX=c.x,h.pageY=c.y,l.show(h,n),e.wait>=0&&null!==e.wait&&setTimeout(u({type:"mouseup",button:1},n),e.wait)},t.calm=function(t){for(var e={type:"mouseup",button:1},i=0,n=(t=r(t)).length;i<n;i++)l.hide(e,t[i])},t.displayEffect=function(e){console.error("Waves.displayEffect() has been deprecated and will be removed in future version. Please use Waves.init() to initialize Waves effect"),t.init(e)},t})),function(t,e,i,n){var o,r="smartPanel";function s(e,i){this.obj=t(e),this.o=t.extend({},t.fn.smartPanel.defaults,i),this.objId=this.obj.attr("id"),this.panel=this.obj.find(this.o.panels),this.storage={enabled:this.o.localStorage},this.initialized=!1,this.init()}o="ontouchstart"in e||e.DocumentTouch&&i instanceof DocumentTouch?"click tap":"click",s.prototype={_runPanelLoader:function(t){!0===this.o.localStorage&&t.closest(this.o.panels).find(".panel-saving").stop(!0,!0).fadeIn(100).delay(600).fadeOut(100)},_loadKeys:function(){var t=this,e=t.o.pageKey||location.pathname;t.storage.keySettings="smartPanel_settings_"+e+"_"+t.objId,t.storage.keyPosition="smartPanel_position_"+e+"_"+t.objId},_savePanelSettings:function(){var e=this,i=e.storage;e._loadKeys();var n=e.obj.find(e.o.panels).map((function(){var e={};return e.id=t(this).attr("id"),e.style=t(this).attr("data-panel-attstyle"),e.locked=t(this).hasClass("panel-locked")?1:0,e.collapsed=t(this).hasClass("panel-collapsed")?1:0,e})).get(),o=JSON.stringify({panel:n});i.enabled&&i.getKeySettings!=o&&(localStorage.setItem(i.keySettings,o),i.getKeySettings=o),"function"==typeof e.o.onSave&&(e.o.onSave.call(this,null,o,i.keySettings),myapp_config.debugState&&console.log("keySettings: "+i.keySettings))},_savePanelPosition:function(){var e=this,i=e.storage;e._loadKeys();var n=e.obj.find(e.o.grid+".sortable-grid").map((function(){return{section:t(this).children(e.o.panels).map((function(){return{id:t(this).attr("id")}})).get()}})).get(),o=JSON.stringify({grid:n});i.enabled&&i.getKeyPosition!=o&&(localStorage.setItem(i.keyPosition,o),i.getKeyPosition=o),"function"==typeof e.o.onSave&&e.o.onSave.call(this,o,i.keyPosition)},init:function(){var e=this;if(!e.initialized){if(e._initStorage(e.storage),t("#"+e.objId).length||("undefined"!=typeof bootbox?bootbox.alert("Your panel ID is missing!"):alert("Your panel ID is missing!")),t(e.o.grid).each((function(){t(this).find(e.o.panels).length&&t(this).addClass("sortable-grid")})),e.storage.enabled&&e.storage.getKeyPosition){var i=JSON.parse(e.storage.getKeyPosition);for(var r in i.grid){var s=e.obj.find(e.o.grid+".sortable-grid").eq(r);for(var a in i.grid[r].section)s.append(t("#"+i.grid[r].section[a].id))}}if(e.storage.enabled&&e.storage.getKeySettings){var l=JSON.parse(e.storage.getKeySettings);for(var r in myapp_config.debugState&&console.log("Panel settings loaded: "+e.storage.getKeySettings),l.panel){var c=t("#"+l.panel[r].id);l.panel[r].style&&c.attr("data-panel-attstyle",""+l.panel[r].style).children(".panel-hdr").removeClassPrefix("bg-").addClass(l.panel[r].style),1==l.panel[r].collapsed&&c.addClass("panel-collapsed").children(".panel-container").addClass("collapse").removeClass("show"),1==l.panel[r].locked&&c.addClass("panel-locked")}}if(e.o.panelColors&&e.o.colorButton){var d=[];for(var r in e.o.panelColors)d.push('<a href="#" class="btn d-inline-block '+e.o.panelColors[r]+' width-2 height-2 p-0 rounded-0 js-panel-color hover-effect-dot" data-panel-setstyle="'+e.o.panelColors[r]+'" style="margin:1px;"></a>')}if(e.panel.each((function(){var i,o,r,s,a,l,c,h,u=t(this),p=t(this).children(".panel-hdr"),f=t(this).children(".panel-container");if(!p.parent().attr("role")){!0===e.o.sortable&&u.data("panel-sortable")===n&&u.addClass("panel-sortable"),i=!0===e.o.closeButton&&u.data("panel-close")===n?'<a href="#" class="btn btn-panel hover-effect-dot js-panel-close" data-bs-toggle="tooltip" data-offset="0,10" data-original-title="Close"></a>':"",o=!0===e.o.fullscreenButton&&u.data("panel-fullscreen")===n?'<a href="#" class="btn btn-panel hover-effect-dot js-panel-fullscreen" data-bs-toggle="tooltip" data-offset="0,10" data-original-title="Fullscreen"></a>':"",r=!0===e.o.collapseButton&&u.data("panel-collapsed")===n?'<a href="#" class="btn btn-panel hover-effect-dot js-panel-collapse" data-bs-toggle="tooltip" data-offset="0,10" data-original-title="Collapse"></a>':"",s=!0===e.o.lockedButton&&u.data("panel-locked")===n?'<a href="#" class="dropdown-item js-panel-locked"><span data-i18n="drpdwn.lockpanel">'+e.o.lockedButtonLabel+"</span></a>":"",!0===e.o.refreshButton&&u.data("panel-refresh")===n?(a='<a href="#" class="dropdown-item js-panel-refresh"><span data-i18n="drpdwn.refreshpanel">'+e.o.refreshButtonLabel+"</span></a>",f.prepend('<div class="loader"><i class="fal fa-spinner-third fa-spin-4x fs-xxl"></i></div>')):a="",l=!0===e.o.colorButton&&u.data("panel-color")===n?' <div class="dropdown-multilevel dropdown-multilevel-left">\t\t\t\t\t\t\t\t\t\t\t<div class="dropdown-item">\t\t\t\t\t\t\t\t\t\t\t\t<span data-i18n="drpdwn.panelcolor">'+e.o.colorButtonLabel+'</span>\t\t\t\t\t\t\t\t\t\t\t</div>\t\t\t\t\t\t\t\t\t\t\t<div class="dropdown-menu d-flex flex-wrap" style="min-width: 9.5rem; width: 9.5rem; padding: 0.5rem">'+d.join(" ")+"</div>\t\t\t\t\t\t\t\t\t\t</div>":"",c=!0===e.o.resetButton&&u.data("panel-reset")===n?'<div class="dropdown-divider m-0"></div><a href="#" class="dropdown-item js-panel-reset"><span data-i18n="drpdwn.resetpanel">'+e.o.resetButtonLabel+"</span></a>":"",h=!0===e.o.customButton&&u.data("panel-custombutton")===n?'<a href="#" class="dropdown-item js-panel-custombutton pl-4"><span data-i18n="drpdwn.custombutton">'+e.o.customButtonLabel+"</span></a>":"",p.append('<div class="panel-saving mr-2" style="display:none"><i class="fal fa-spinner-third fa-spin-4x fs-xl"></i></div>');var g=e.o.buttonOrder.replace(/%close%/g,i).replace(/%fullscreen%/g,o).replace(/%collapse%/g,r);""===i&&""===o&&""===r||p.append('<div class="panel-toolbar">'+g+"</div>");var m=e.o.buttonOrderDropdown.replace(/%locked%/g,s).replace(/%color%/g,l).replace(/%refresh%/g,a).replace(/%reset%/g,c).replace(/%custom%/g,h);""===s&&""===l&&""===a&&""===c&&""===h||p.append('<div class="panel-toolbar"><a href="#" class="btn btn-toolbar-master" data-bs-toggle="dropdown"><i class="fal fa-ellipsis-v"></i></a><div class="dropdown-menu dropdown-menu-animated dropdown-menu-right p-0">'+m+"</div></div>"),u.attr("role","widget").children("div").attr("role","content").prev(".panel-hdr").attr("role","heading").children(".panel-toolbar").attr("role","menu")}})),!0===e.o.sortable&&jQuery.ui){var h=e.obj.find(e.o.grid+".sortable-grid").not("[data-panel-excludegrid]");h.sortable({items:h.find(e.o.panels+".panel-sortable"),connectWith:h,placeholder:e.o.placeholderClass,cursor:"move",opacity:e.o.opacity,delay:0,revert:350,cancel:".btn-panel, .panel-fullscreen .panel-fullscreen, .mod-panel-disable .panel-sortable, .panel-locked.panel-sortable",zIndex:1e4,handle:e.o.dragHandle,forcePlaceholderSize:!0,forceHelperSize:!0,update:function(t,i){e._runPanelLoader(i.item.children()),e._savePanelPosition(),"function"==typeof e.o.onChange&&e.o.onChange.call(this,i.item)}})}e._clickEvents(),e.storage.enabled&&(t(e.o.deleteSettingsKey).on(o,this,(function(t){confirm(e.o.settingsKeyLabel)&&localStorage.removeItem(keySettings),t.preventDefault()})),t(e.o.deletePositionKey).on(o,this,(function(t){confirm(e.o.positionKeyLabel)&&localStorage.removeItem(keyPosition),t.preventDefault()}))),initialized=!0}},_initStorage:function(t){t.enabled=t.enabled&&!!function(){var t,e=+new Date;try{return localStorage.setItem(e,e),t=localStorage.getItem(e)==e,localStorage.removeItem(e),t}catch(t){}}(),this._loadKeys(),t.enabled&&(t.getKeySettings=localStorage.getItem(t.keySettings),t.getKeyPosition=localStorage.getItem(t.keyPosition))},_clickEvents:function(){var e=this,i=e.panel.children(".panel-hdr");i.on(o,".js-panel-collapse",(function(i){var n=t(this),o=n.closest(e.o.panels);void 0!==t.fn.tooltip&&t('[data-bs-toggle="tooltip"]').length?t(this).tooltip("hide"):console.log("bs.tooltip is not loaded"),o.children(".panel-container").collapse("toggle").on("shown.bs.collapse",(function(){o.removeClass("panel-collapsed"),e._savePanelSettings()})).on("hidden.bs.collapse",(function(){o.addClass("panel-collapsed"),e._savePanelSettings()})),e._runPanelLoader(n),"function"==typeof e.o.onCollapse&&e.o.onCollapse.call(this,o),i.preventDefault()})),i.on(o,".js-panel-fullscreen",(function(i){var n=t(this),o=n.closest(e.o.panels);void 0!==t.fn.tooltip&&t('[data-bs-toggle="tooltip"]').length?t(this).tooltip("hide"):console.log("bs.tooltip is not loaded"),o.toggleClass("panel-fullscreen"),myapp_config.root_.toggleClass("panel-fullscreen"),e._runPanelLoader(n),"function"==typeof e.o.onFullscreen&&e.o.onFullscreen.call(this,o),i.preventDefault()})),i.on(o,".js-panel-close",(function(i){var n=t(this),o=n.closest(e.o.panels),r=o.children(".panel-hdr").children("h2").text().trim();void 0!==t.fn.tooltip&&t('[data-bs-toggle="tooltip"]').length?t(this).tooltip("hide"):console.log("bs.tooltip is not loaded");var s=function(){o.fadeOut(500,(function(){t(this).remove(),"function"==typeof e.o.onClosepanel&&e.o.onClosepanel.call(this,o)})),e._runPanelLoader(n)};initApp.playSound("media/sound","messagebox"),"undefined"!=typeof bootbox?bootbox.confirm({title:"<i class='fal fa-times-circle text-danger mr-2'></i> Do you wish to delete panel <span class='fw-500'>&nbsp;'"+r+"'&nbsp;</span>?",message:"<span><strong>Warning:</strong> This action cannot be undone!</span>",centerVertical:!0,swapButtonOrder:!0,buttons:{confirm:{label:"Yes",className:"btn-danger shadow-0"},cancel:{label:"No",className:"btn-default"}},className:"modal-alert",closeButton:!1,callback:function(t){1==t&&s()}}):confirm("Do you wish to delete panel "+r+"?")&&s(),i.preventDefault()})),i.on(o,".js-panel-color",(function(i){var n=t(this),o=n.closest(e.o.panels),r=n.closest(".panel-hdr"),s=n.data("panel-setstyle");r.removeClassPrefix("bg-").addClass(s).closest(".panel").attr("data-panel-attstyle",""+s),"function"==typeof e.o.onColor&&e.o.onColor.call(this,o),e._runPanelLoader(n),e._savePanelSettings(),i.preventDefault()})),i.on(o,".js-panel-locked",(function(i){var n=t(this),o=n.closest(e.o.panels);o.toggleClass("panel-locked"),e._runPanelLoader(n),"function"==typeof e.o.onLocked&&e.o.onLocked.call(this,o),e._savePanelSettings(),i.preventDefault()})),i.on(o,".js-panel-refresh",(function(i){var n=t(this).closest(e.o.panels),o=n.attr("data-refresh-timer")||1500;n.addClass("panel-refresh").children(".panel-container").addClass("enable-loader").stop(!0,!0).delay(o).queue((function(){n.removeClass("panel-refresh").children(".panel-container").removeClass("enable-loader").dequeue(),console.log(n.attr("id")+" refresh complete")})),"function"==typeof e.o.onRefresh&&e.o.onRefresh.call(this,n),i.preventDefault()})),i.on(o,".js-panel-reset",(function(i){var n=t(this),o=n.closest(e.o.panels);n.closest(".panel-hdr").removeClassPrefix("bg-").closest(".panel").removeClass("panel-collapsed panel-fullscreen panel-locked").attr("data-panel-attstyle","").children(".panel-container").collapse("show"),e._runPanelLoader(n),e._savePanelSettings(),"function"==typeof e.o.onReset&&e.o.onReset.call(this,o),i.preventDefault()})),i=null},destroy:function(){var i=this,n=".smartPanel",o=i.obj.find(i.o.grid+".sortable-grid").not("[data-panel-excludegrid]");i.panel.removeClass("panel-sortable"),o.sortable("destroy"),i.panel.children(".panel-hdr").off(n),t(i.o.deletePositionKey).off(n),t(e).off(n),i.obj.removeData(r),i.initialized=!1}},t.fn.smartPanel=function(e){return this.each((function(){var i=t(this),n=i.data(r);if(!n){var o="object"==typeof e&&e;i.data(r,n=new s(this,o))}"string"==typeof e&&n[e]()}))},t.fn.smartPanel.defaults={grid:'[class*="col-"]',panels:".panel",placeholderClass:"panel-placeholder",dragHandle:"> .panel-hdr > h2",localStorage:!0,onChange:function(){},onSave:function(){},opacity:1,deleteSettingsKey:"",settingsKeyLabel:"Reset settings?",deletePositionKey:"",positionKeyLabel:"Reset position?",sortable:!0,buttonOrder:"%collapse% %fullscreen% %close%",buttonOrderDropdown:"%refresh% %locked% %color% %custom% %reset%",customButton:!1,customButtonLabel:"Custom Label",onCustom:function(){},closeButton:!0,onClosepanel:function(){myapp_config.debugState&&console.log(t(this).closest(".panel").attr("id")+" onClosepanel")},fullscreenButton:!0,onFullscreen:function(){myapp_config.debugState&&console.log(t(this).closest(".panel").attr("id")+" onFullscreen")},collapseButton:!0,onCollapse:function(){myapp_config.debugState&&console.log(t(this).closest(".panel").attr("id")+" onCollapse")},lockedButton:!0,lockedButtonLabel:"Lock Position",onLocked:function(){myapp_config.debugState&&console.log(t(this).closest(".panel").attr("id")+" onLocked")},refreshButton:!0,refreshButtonLabel:"Refresh Content",onRefresh:function(){myapp_config.debugState&&console.log(t(this).closest(".panel").attr("id")+" onRefresh")},colorButton:!0,colorButtonLabel:"Panel Style",onColor:function(){myapp_config.debugState&&console.log(t(this).closest(".panel").attr("id")+" onColor")},panelColors:["bg-primary-700 bg-success-gradient","bg-primary-500 bg-info-gradient","bg-primary-600 bg-primary-gradient","bg-info-600 bg-primray-gradient","bg-info-600 bg-info-gradient","bg-info-700 bg-success-gradient","bg-success-900 bg-info-gradient","bg-success-700 bg-primary-gradient","bg-success-600 bg-success-gradient","bg-danger-900 bg-info-gradient","bg-fusion-400 bg-fusion-gradient","bg-faded"],resetButton:!0,resetButtonLabel:"Reset Panel",onReset:function(){myapp_config.debugState&&console.log(t(this).closest(".panel").attr("id")+" onReset callback")}}}(jQuery,window,document),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,(function(){"use strict";function t(){return Jt.apply(null,arguments)}function e(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function i(t){return"[object Object]"===Object.prototype.toString.call(t)}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function o(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function s(t,e){for(var i in e)r(e,i)&&(t[i]=e[i]);return r(e,"toString")&&(t.toString=e.toString),r(e,"valueOf")&&(t.valueOf=e.valueOf),t}function a(t,e,i,n){return bt(t,e,i,n,!0).utc()}function l(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}),t._pf}function c(t){if(null==t._isValid){var e=l(t),i=te.call(e.parsedDateParts,(function(t){return null!=t}));t._isValid=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function d(t){var e=a(NaN);return null!=t?s(l(e),t):l(e).userInvalidated=!0,e}function h(t){return void 0===t}function u(t,e){var i,n,o;if(h(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),h(e._i)||(t._i=e._i),h(e._f)||(t._f=e._f),h(e._l)||(t._l=e._l),h(e._strict)||(t._strict=e._strict),h(e._tzm)||(t._tzm=e._tzm),h(e._isUTC)||(t._isUTC=e._isUTC),h(e._offset)||(t._offset=e._offset),h(e._pf)||(t._pf=l(e)),h(e._locale)||(t._locale=e._locale),ie.length>0)for(i in ie)h(o=e[n=ie[i]])||(t[n]=o);return t}function p(e){u(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),!1===ne&&(ne=!0,t.updateOffset(this),ne=!1)}function f(t){return t instanceof p||null!=t&&null!=t._isAMomentObject}function g(t){return 0>t?Math.ceil(t)||0:Math.floor(t)}function m(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=g(e)),i}function v(t,e,i){var n,o=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),s=0;for(n=0;o>n;n++)(i&&t[n]!==e[n]||!i&&m(t[n])!==m(e[n]))&&s++;return s+r}function y(e){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function b(e,i){var n=!0;return s((function(){return null!=t.deprecationHandler&&t.deprecationHandler(null,e),n&&(y(e+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),n=!1),i.apply(this,arguments)}),i)}function x(e,i){null!=t.deprecationHandler&&t.deprecationHandler(e,i),oe[e]||(y(i),oe[e]=!0)}function w(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function S(t,e){var n,o=s({},t);for(n in e)r(e,n)&&(i(t[n])&&i(e[n])?(o[n]={},s(o[n],t[n]),s(o[n],e[n])):null!=e[n]?o[n]=e[n]:delete o[n]);for(n in t)r(t,n)&&!r(e,n)&&i(t[n])&&(o[n]=s({},o[n]));return o}function C(t){null!=t&&this.set(t)}function k(t,e){var i=t.toLowerCase();se[i]=se[i+"s"]=se[e]=t}function _(t){return"string"==typeof t?se[t]||se[t.toLowerCase()]:void 0}function T(t){var e,i,n={};for(i in t)r(t,i)&&(e=_(i))&&(n[e]=t[i]);return n}function D(t,e){ae[t]=e}function E(e,i){return function(n){return null!=n?(I(this,e,n),t.updateOffset(this,i),this):A(this,e)}}function A(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function I(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function P(t,e,i){var n=""+Math.abs(t),o=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}function M(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(he[t]=o),e&&(he[e[0]]=function(){return P(o.apply(this,arguments),e[1],e[2])}),i&&(he[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function L(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function R(t,e){return t.isValid()?(e=O(e,t.localeData()),de[e]=de[e]||function(t){var e,i,n=t.match(le);for(e=0,i=n.length;i>e;e++)he[n[e]]?n[e]=he[n[e]]:n[e]=L(n[e]);return function(e){var o,r="";for(o=0;i>o;o++)r+=n[o]instanceof Function?n[o].call(e,t):n[o];return r}}(e),de[e](t)):t.localeData().invalidDate()}function O(t,e){function i(t){return e.longDateFormat(t)||t}var n=5;for(ce.lastIndex=0;n>=0&&ce.test(t);)t=t.replace(ce,i),ce.lastIndex=0,n-=1;return t}function F(t,e,i){Ee[t]=w(e)?e:function(t,n){return t&&i?i:e}}function N(t,e){return r(Ee,t)?Ee[t](e._strict,e._locale):new RegExp(function(t){return H(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,n,o){return e||i||n||o})))}(t))}function H(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function z(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(n=function(t,i){i[e]=m(t)}),i=0;i<t.length;i++)Ae[t[i]]=n}function B(t,e){z(t,(function(t,i,n,o){n._w=n._w||{},e(t,n._w,n,o)}))}function $(t,e,i){null!=e&&r(Ae,t)&&Ae[t](e,i._a,i,t)}function j(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function W(t,e,i){var n,o,r,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;12>n;++n)r=a([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(r,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(o=re.call(this._shortMonthsParse,s))?o:null:-1!==(o=re.call(this._longMonthsParse,s))?o:null:"MMM"===e?-1!==(o=re.call(this._shortMonthsParse,s))||-1!==(o=re.call(this._longMonthsParse,s))?o:null:-1!==(o=re.call(this._longMonthsParse,s))||-1!==(o=re.call(this._shortMonthsParse,s))?o:null}function Y(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=m(e);else if("number"!=typeof(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),j(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function X(e){return null!=e?(Y(this,e),t.updateOffset(this,!0),this):A(this,"Month")}function V(){function t(t,e){return e.length-t.length}var e,i,n=[],o=[],r=[];for(e=0;12>e;e++)i=a([2e3,e]),n.push(this.monthsShort(i,"")),o.push(this.months(i,"")),r.push(this.months(i,"")),r.push(this.monthsShort(i,""));for(n.sort(t),o.sort(t),r.sort(t),e=0;12>e;e++)n[e]=H(n[e]),o[e]=H(o[e]);for(e=0;24>e;e++)r[e]=H(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function q(t){return U(t)?366:365}function U(t){return t%4==0&&t%100!=0||t%400==0}function G(t,e,i,n,o,r,s){var a=new Date(t,e,i,n,o,r,s);return 100>t&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function Z(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function K(t,e,i){var n=7+e-i;return-(7+Z(t,0,n).getUTCDay()-e)%7+n-1}function Q(t,e,i,n,o){var r,s,a=1+7*(e-1)+(7+i-n)%7+K(t,n,o);return 0>=a?s=q(r=t-1)+a:a>q(t)?(r=t+1,s=a-q(t)):(r=t,s=a),{year:r,dayOfYear:s}}function J(t,e,i){var n,o,r=K(t.year(),e,i),s=Math.floor((t.dayOfYear()-r-1)/7)+1;return 1>s?n=s+tt(o=t.year()-1,e,i):s>tt(t.year(),e,i)?(n=s-tt(t.year(),e,i),o=t.year()+1):(o=t.year(),n=s),{week:n,year:o}}function tt(t,e,i){var n=K(t,e,i),o=K(t+1,e,i);return(q(t)-n+o)/7}function et(t,e,i){var n,o,r,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;7>n;++n)r=a([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(o=re.call(this._weekdaysParse,s))?o:null:"ddd"===e?-1!==(o=re.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=re.call(this._minWeekdaysParse,s))?o:null:"dddd"===e?-1!==(o=re.call(this._weekdaysParse,s))||-1!==(o=re.call(this._shortWeekdaysParse,s))||-1!==(o=re.call(this._minWeekdaysParse,s))?o:null:"ddd"===e?-1!==(o=re.call(this._shortWeekdaysParse,s))||-1!==(o=re.call(this._weekdaysParse,s))||-1!==(o=re.call(this._minWeekdaysParse,s))?o:null:-1!==(o=re.call(this._minWeekdaysParse,s))||-1!==(o=re.call(this._weekdaysParse,s))||-1!==(o=re.call(this._shortWeekdaysParse,s))?o:null}function it(){function t(t,e){return e.length-t.length}var e,i,n,o,r,s=[],l=[],c=[],d=[];for(e=0;7>e;e++)i=a([2e3,1]).day(e),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),r=this.weekdays(i,""),s.push(n),l.push(o),c.push(r),d.push(n),d.push(o),d.push(r);for(s.sort(t),l.sort(t),c.sort(t),d.sort(t),e=0;7>e;e++)l[e]=H(l[e]),c[e]=H(c[e]),d[e]=H(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function nt(){return this.hours()%12||12}function ot(t,e){M(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function rt(t,e){return e._meridiemParse}function st(t){return t?t.toLowerCase().replace("_","-"):t}function at(t){var e=null;if(!ti[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=Ke._abbr,require("./locale/"+t),lt(e)}catch(t){}return ti[t]}function lt(t,e){var i;return t&&(i=h(e)?dt(t):ct(t,e))&&(Ke=i),Ke._abbr}function ct(t,e){if(null!==e){var i=Je;return e.abbr=t,null!=ti[t]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=ti[t]._config):null!=e.parentLocale&&(null!=ti[e.parentLocale]?i=ti[e.parentLocale]._config:x("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),ti[t]=new C(S(i,e)),lt(t),ti[t]}return delete ti[t],null}function dt(t){var i;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ke;if(!e(t)){if(i=at(t))return i;t=[t]}return function(t){for(var e,i,n,o,r=0;r<t.length;){for(e=(o=st(t[r]).split("-")).length,i=(i=st(t[r+1]))?i.split("-"):null;e>0;){if(n=at(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&v(o,i,!0)>=e-1)break;e--}r++}return null}(t)}function ht(t){var e,i=t._a;return i&&-2===l(t).overflow&&(e=i[Pe]<0||i[Pe]>11?Pe:i[Me]<1||i[Me]>j(i[Ie],i[Pe])?Me:i[Le]<0||i[Le]>24||24===i[Le]&&(0!==i[Re]||0!==i[Oe]||0!==i[Fe])?Le:i[Re]<0||i[Re]>59?Re:i[Oe]<0||i[Oe]>59?Oe:i[Fe]<0||i[Fe]>999?Fe:-1,l(t)._overflowDayOfYear&&(Ie>e||e>Me)&&(e=Me),l(t)._overflowWeeks&&-1===e&&(e=Ne),l(t)._overflowWeekday&&-1===e&&(e=He),l(t).overflow=e),t}function ut(t){var e,i,n,o,r,s,a=t._i,c=ei.exec(a)||ii.exec(a);if(c){for(l(t).iso=!0,e=0,i=oi.length;i>e;e++)if(oi[e][1].exec(c[1])){o=oi[e][0],n=!1!==oi[e][2];break}if(null==o)return void(t._isValid=!1);if(c[3]){for(e=0,i=ri.length;i>e;e++)if(ri[e][1].exec(c[3])){r=(c[2]||" ")+ri[e][0];break}if(null==r)return void(t._isValid=!1)}if(!n&&null!=r)return void(t._isValid=!1);if(c[4]){if(!ni.exec(c[4]))return void(t._isValid=!1);s="Z"}t._f=o+(r||"")+(s||""),mt(t)}else t._isValid=!1}function pt(t,e,i){return null!=t?t:null!=e?e:i}function ft(e){var i=new Date(t.now());return e._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function gt(t){var e,i,n,o,r=[];if(!t._d){for(n=ft(t),t._w&&null==t._a[Me]&&null==t._a[Pe]&&function(t){var e,i,n,o,r,s,a,c;null!=(e=t._w).GG||null!=e.W||null!=e.E?(r=1,s=4,i=pt(e.GG,t._a[Ie],J(xt(),1,4).year),n=pt(e.W,1),(1>(o=pt(e.E,1))||o>7)&&(c=!0)):(r=t._locale._week.dow,s=t._locale._week.doy,i=pt(e.gg,t._a[Ie],J(xt(),r,s).year),n=pt(e.w,1),null!=e.d?(0>(o=e.d)||o>6)&&(c=!0):null!=e.e?(o=e.e+r,(e.e<0||e.e>6)&&(c=!0)):o=r),1>n||n>tt(i,r,s)?l(t)._overflowWeeks=!0:null!=c?l(t)._overflowWeekday=!0:(a=Q(i,n,o,r,s),t._a[Ie]=a.year,t._dayOfYear=a.dayOfYear)}(t),t._dayOfYear&&(o=pt(t._a[Ie],n[Ie]),t._dayOfYear>q(o)&&(l(t)._overflowDayOfYear=!0),i=Z(o,0,t._dayOfYear),t._a[Pe]=i.getUTCMonth(),t._a[Me]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=r[e]=n[e];for(;7>e;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Le]&&0===t._a[Re]&&0===t._a[Oe]&&0===t._a[Fe]&&(t._nextDay=!0,t._a[Le]=0),t._d=(t._useUTC?Z:G).apply(null,r),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Le]=24)}}function mt(e){if(e._f!==t.ISO_8601){e._a=[],l(e).empty=!0;var i,n,o,r,s,a=""+e._i,c=a.length,d=0;for(o=O(e._f,e._locale).match(le)||[],i=0;i<o.length;i++)r=o[i],(n=(a.match(N(r,e))||[])[0])&&((s=a.substr(0,a.indexOf(n))).length>0&&l(e).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),d+=n.length),he[r]?(n?l(e).empty=!1:l(e).unusedTokens.push(r),$(r,n,e)):e._strict&&!n&&l(e).unusedTokens.push(r);l(e).charsLeftOver=c-d,a.length>0&&l(e).unusedInput.push(a),e._a[Le]<=12&&!0===l(e).bigHour&&e._a[Le]>0&&(l(e).bigHour=void 0),l(e).parsedDateParts=e._a.slice(0),l(e).meridiem=e._meridiem,e._a[Le]=function(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&12>e&&(e+=12),n||12!==e||(e=0),e):e}(e._locale,e._a[Le],e._meridiem),gt(e),ht(e)}else ut(e)}function vt(t){var i=t._i,o=t._f;return t._locale=t._locale||dt(t._l),null===i||void 0===o&&""===i?d({nullInput:!0}):("string"==typeof i&&(t._i=i=t._locale.preparse(i)),f(i)?new p(ht(i)):(e(o)?function(t){var e,i,n,o,r;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;o<t._f.length;o++)r=0,e=u({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[o],mt(e),c(e)&&(r+=l(e).charsLeftOver,r+=10*l(e).unusedTokens.length,l(e).score=r,(null==n||n>r)&&(n=r,i=e));s(t,i||e)}(t):n(i)?t._d=i:o?mt(t):yt(t),c(t)||(t._d=null),t))}function yt(i){var r=i._i;void 0===r?i._d=new Date(t.now()):n(r)?i._d=new Date(r.valueOf()):"string"==typeof r?function(e){var i=si.exec(e._i);null!==i?e._d=new Date(+i[1]):(ut(e),!1===e._isValid&&(delete e._isValid,t.createFromInputFallback(e)))}(i):e(r)?(i._a=o(r.slice(0),(function(t){return parseInt(t,10)})),gt(i)):"object"==typeof r?function(t){if(!t._d){var e=T(t._i);t._a=o([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),gt(t)}}(i):"number"==typeof r?i._d=new Date(r):t.createFromInputFallback(i)}function bt(t,n,o,r,s){var a={};return"boolean"==typeof o&&(r=o,o=void 0),(i(t)&&function(t){var e;for(e in t)return!1;return!0}(t)||e(t)&&0===t.length)&&(t=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=s,a._l=o,a._i=t,a._f=n,a._strict=r,function(t){var e=new p(ht(vt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}(a)}function xt(t,e,i,n){return bt(t,e,i,n,!1)}function wt(t,i){var n,o;if(1===i.length&&e(i[0])&&(i=i[0]),!i.length)return xt();for(n=i[0],o=1;o<i.length;++o)i[o].isValid()&&!i[o][t](n)||(n=i[o]);return n}function St(t){var e=T(t),i=e.year||0,n=e.quarter||0,o=e.month||0,r=e.week||0,s=e.day||0,a=e.hour||0,l=e.minute||0,c=e.second||0,d=e.millisecond||0;this._milliseconds=+d+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*r,this._months=+o+3*n+12*i,this._data={},this._locale=dt(),this._bubble()}function Ct(t){return t instanceof St}function kt(t,e){M(t,0,0,(function(){var t=this.utcOffset(),i="+";return 0>t&&(t=-t,i="-"),i+P(~~(t/60),2)+e+P(~~t%60,2)}))}function _t(t,e){var i=(e||"").match(t)||[],n=((i[i.length-1]||[])+"").match(ci)||["-",0,0],o=60*n[1]+m(n[2]);return"+"===n[0]?o:-o}function Tt(e,i){var o,r;return i._isUTC?(o=i.clone(),r=(f(e)||n(e)?e.valueOf():xt(e).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+r),t.updateOffset(o,!1),o):xt(e).local()}function Dt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Et(){return!!this.isValid()&&this._isUTC&&0===this._offset}function At(t,e){var i,n,o,s=t,a=null;return Ct(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(a=di.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:m(a[Me])*i,h:m(a[Le])*i,m:m(a[Re])*i,s:m(a[Oe])*i,ms:m(a[Fe])*i}):(a=hi.exec(t))?(i="-"===a[1]?-1:1,s={y:It(a[2],i),M:It(a[3],i),w:It(a[4],i),d:It(a[5],i),h:It(a[6],i),m:It(a[7],i),s:It(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(o=function(t,e){var i;return t.isValid()&&e.isValid()?(e=Tt(e,t),t.isBefore(e)?i=Pt(t,e):((i=Pt(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}(xt(s.from),xt(s.to)),(s={}).ms=o.milliseconds,s.M=o.months),n=new St(s),Ct(t)&&r(t,"_locale")&&(n._locale=t._locale),n}function It(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Pt(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Mt(t){return 0>t?-1*Math.round(-1*t):Math.round(t)}function Lt(t,e){return function(i,n){var o;return null===n||isNaN(+n)||(x(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),Rt(this,At(i="string"==typeof i?+i:i,n),t),this}}function Rt(e,i,n,o){var r=i._milliseconds,s=Mt(i._days),a=Mt(i._months);e.isValid()&&(o=null==o||o,r&&e._d.setTime(e._d.valueOf()+r*n),s&&I(e,"Date",A(e,"Date")+s*n),a&&Y(e,A(e,"Month")+a*n),o&&t.updateOffset(e,s||a))}function Ot(t){var e;return void 0===t?this._locale._abbr:(null!=(e=dt(t))&&(this._locale=e),this)}function Ft(){return this._locale}function Nt(t,e){M(0,[t,t.length],0,e)}function Ht(t,e,i,n,o){var r;return null==t?J(this,n,o).year:(e>(r=tt(t,n,o))&&(e=r),zt.call(this,t,e,i,n,o))}function zt(t,e,i,n,o){var r=Q(t,e,i,n,o),s=Z(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Bt(t,e){e[Fe]=m(1e3*("0."+t))}function $t(t){return t}function jt(t,e,i,n){var o=dt(),r=a().set(n,e);return o[i](r,t)}function Wt(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return jt(t,e,i,"month");var n,o=[];for(n=0;12>n;n++)o[n]=jt(t,n,i,"month");return o}function Yt(t,e,i,n){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var o=dt(),r=t?o._week.dow:0;if(null!=i)return jt(e,(i+r)%7,n,"day");var s,a=[];for(s=0;7>s;s++)a[s]=jt(e,(s+r)%7,n,"day");return a}function Xt(t,e,i,n){var o=At(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function Vt(t){return 0>t?Math.floor(t):Math.ceil(t)}function qt(t){return 4800*t/146097}function Ut(t){return 146097*t/4800}function Gt(t){return function(){return this.as(t)}}function Zt(t){return function(){return this._data[t]}}function Kt(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function Qt(){var t,e,i=$i(this._milliseconds)/1e3,n=$i(this._days),o=$i(this._months);t=g(i/60),e=g(t/60),i%=60,t%=60;var r=g(o/12),s=o%=12,a=n,l=e,c=t,d=i,h=this.asSeconds();return h?(0>h?"-":"")+"P"+(r?r+"Y":"")+(s?s+"M":"")+(a?a+"D":"")+(l||c||d?"T":"")+(l?l+"H":"")+(c?c+"M":"")+(d?d+"S":""):"P0D"}var Jt,te;te=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;i>n;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var ee,ie=t.momentProperties=[],ne=!1,oe={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null,ee=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)r(t,e)&&i.push(e);return i};var re,se={},ae={},le=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ce=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,de={},he={},ue=/\d/,pe=/\d\d/,fe=/\d{3}/,ge=/\d{4}/,me=/[+-]?\d{6}/,ve=/\d\d?/,ye=/\d\d\d\d?/,be=/\d\d\d\d\d\d?/,xe=/\d{1,3}/,we=/\d{1,4}/,Se=/[+-]?\d{1,6}/,Ce=/\d+/,ke=/[+-]?\d+/,_e=/Z|[+-]\d\d:?\d\d/gi,Te=/Z|[+-]\d\d(?::?\d\d)?/gi,De=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ee={},Ae={},Ie=0,Pe=1,Me=2,Le=3,Re=4,Oe=5,Fe=6,Ne=7,He=8;re=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},M("M",["MM",2],"Mo",(function(){return this.month()+1})),M("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),M("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),k("month","M"),D("month",8),F("M",ve),F("MM",ve,pe),F("MMM",(function(t,e){return e.monthsShortRegex(t)})),F("MMMM",(function(t,e){return e.monthsRegex(t)})),z(["M","MM"],(function(t,e){e[Pe]=m(t)-1})),z(["MMM","MMMM"],(function(t,e,i,n){var o=i._locale.monthsParse(t,n,i._strict);null!=o?e[Pe]=o:l(i).invalidMonth=t}));var ze=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Be="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),$e="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),je=De,We=De;M("Y",0,0,(function(){var t=this.year();return 9999>=t?""+t:"+"+t})),M(0,["YY",2],0,(function(){return this.year()%100})),M(0,["YYYY",4],0,"year"),M(0,["YYYYY",5],0,"year"),M(0,["YYYYYY",6,!0],0,"year"),k("year","y"),D("year",1),F("Y",ke),F("YY",ve,pe),F("YYYY",we,ge),F("YYYYY",Se,me),F("YYYYYY",Se,me),z(["YYYYY","YYYYYY"],Ie),z("YYYY",(function(e,i){i[Ie]=2===e.length?t.parseTwoDigitYear(e):m(e)})),z("YY",(function(e,i){i[Ie]=t.parseTwoDigitYear(e)})),z("Y",(function(t,e){e[Ie]=parseInt(t,10)})),t.parseTwoDigitYear=function(t){return m(t)+(m(t)>68?1900:2e3)};var Ye=E("FullYear",!0);M("w",["ww",2],"wo","week"),M("W",["WW",2],"Wo","isoWeek"),k("week","w"),k("isoWeek","W"),D("week",5),D("isoWeek",5),F("w",ve),F("ww",ve,pe),F("W",ve),F("WW",ve,pe),B(["w","ww","W","WW"],(function(t,e,i,n){e[n.substr(0,1)]=m(t)})),M("d",0,"do","day"),M("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),M("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),M("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),M("e",0,0,"weekday"),M("E",0,0,"isoWeekday"),k("day","d"),k("weekday","e"),k("isoWeekday","E"),D("day",11),D("weekday",11),D("isoWeekday",11),F("d",ve),F("e",ve),F("E",ve),F("dd",(function(t,e){return e.weekdaysMinRegex(t)})),F("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),F("dddd",(function(t,e){return e.weekdaysRegex(t)})),B(["dd","ddd","dddd"],(function(t,e,i,n){var o=i._locale.weekdaysParse(t,n,i._strict);null!=o?e.d=o:l(i).invalidWeekday=t})),B(["d","e","E"],(function(t,e,i,n){e[n]=m(t)}));var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ue=De,Ge=De,Ze=De;M("H",["HH",2],0,"hour"),M("h",["hh",2],0,nt),M("k",["kk",2],0,(function(){return this.hours()||24})),M("hmm",0,0,(function(){return""+nt.apply(this)+P(this.minutes(),2)})),M("hmmss",0,0,(function(){return""+nt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),M("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),M("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),ot("a",!0),ot("A",!1),k("hour","h"),D("hour",13),F("a",rt),F("A",rt),F("H",ve),F("h",ve),F("HH",ve,pe),F("hh",ve,pe),F("hmm",ye),F("hmmss",be),F("Hmm",ye),F("Hmmss",be),z(["H","HH"],Le),z(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),z(["h","hh"],(function(t,e,i){e[Le]=m(t),l(i).bigHour=!0})),z("hmm",(function(t,e,i){var n=t.length-2;e[Le]=m(t.substr(0,n)),e[Re]=m(t.substr(n)),l(i).bigHour=!0})),z("hmmss",(function(t,e,i){var n=t.length-4,o=t.length-2;e[Le]=m(t.substr(0,n)),e[Re]=m(t.substr(n,2)),e[Oe]=m(t.substr(o)),l(i).bigHour=!0})),z("Hmm",(function(t,e,i){var n=t.length-2;e[Le]=m(t.substr(0,n)),e[Re]=m(t.substr(n))})),z("Hmmss",(function(t,e,i){var n=t.length-4,o=t.length-2;e[Le]=m(t.substr(0,n)),e[Re]=m(t.substr(n,2)),e[Oe]=m(t.substr(o))}));var Ke,Qe=E("Hours",!0),Je={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",ordinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Be,monthsShort:$e,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:qe,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},ti={},ei=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ii=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ni=/Z|[+-]\d\d(?::?\d\d)?/,oi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ri=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],si=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=b("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),t.ISO_8601=function(){};var ai=b("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xt.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:d()})),li=b("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:d()}));kt("Z",":"),kt("ZZ",""),F("Z",Te),F("ZZ",Te),z(["Z","ZZ"],(function(t,e,i){i._useUTC=!0,i._tzm=_t(Te,t)}));var ci=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var di=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,hi=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;At.fn=St.prototype;var ui=Lt(1,"add"),pi=Lt(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var fi=b("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));M(0,["gg",2],0,(function(){return this.weekYear()%100})),M(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Nt("gggg","weekYear"),Nt("ggggg","weekYear"),Nt("GGGG","isoWeekYear"),Nt("GGGGG","isoWeekYear"),k("weekYear","gg"),k("isoWeekYear","GG"),D("weekYear",1),D("isoWeekYear",1),F("G",ke),F("g",ke),F("GG",ve,pe),F("gg",ve,pe),F("GGGG",we,ge),F("gggg",we,ge),F("GGGGG",Se,me),F("ggggg",Se,me),B(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,n){e[n.substr(0,2)]=m(t)})),B(["gg","GG"],(function(e,i,n,o){i[o]=t.parseTwoDigitYear(e)})),M("Q",0,"Qo","quarter"),k("quarter","Q"),D("quarter",7),F("Q",ue),z("Q",(function(t,e){e[Pe]=3*(m(t)-1)})),M("D",["DD",2],"Do","date"),k("date","D"),D("date",9),F("D",ve),F("DD",ve,pe),F("Do",(function(t,e){return t?e._ordinalParse:e._ordinalParseLenient})),z(["D","DD"],Me),z("Do",(function(t,e){e[Me]=m(t.match(ve)[0])}));var gi=E("Date",!0);M("DDD",["DDDD",3],"DDDo","dayOfYear"),k("dayOfYear","DDD"),D("dayOfYear",4),F("DDD",xe),F("DDDD",fe),z(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=m(t)})),M("m",["mm",2],0,"minute"),k("minute","m"),D("minute",14),F("m",ve),F("mm",ve,pe),z(["m","mm"],Re);var mi=E("Minutes",!1);M("s",["ss",2],0,"second"),k("second","s"),D("second",15),F("s",ve),F("ss",ve,pe),z(["s","ss"],Oe);var vi,yi=E("Seconds",!1);for(M("S",0,0,(function(){return~~(this.millisecond()/100)})),M(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),M(0,["SSS",3],0,"millisecond"),M(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),M(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),M(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),M(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),M(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),M(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),k("millisecond","ms"),D("millisecond",16),F("S",xe,ue),F("SS",xe,pe),F("SSS",xe,fe),vi="SSSS";vi.length<=9;vi+="S")F(vi,Ce);for(vi="S";vi.length<=9;vi+="S")z(vi,Bt);var bi=E("Milliseconds",!1);M("z",0,0,"zoneAbbr"),M("zz",0,0,"zoneName");var xi=p.prototype;xi.add=ui,xi.calendar=function(e,i){var n=e||xt(),o=Tt(n,this).startOf("day"),r=t.calendarFormat(this,o)||"sameElse",s=i&&(w(i[r])?i[r].call(this,n):i[r]);return this.format(s||this.localeData().calendar(r,this,xt(n)))},xi.clone=function(){return new p(this)},xi.diff=function(t,e,i){var n,o,r,s;return this.isValid()&&(n=Tt(t,this)).isValid()?(o=6e4*(n.utcOffset()-this.utcOffset()),"year"===(e=_(e))||"month"===e||"quarter"===e?(s=function(t,e){var i,n=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(n,"months");return 0>e-o?i=(e-o)/(o-t.clone().add(n-1,"months")):i=(e-o)/(t.clone().add(n+1,"months")-o),-(n+i)||0}(this,n),"quarter"===e?s/=3:"year"===e&&(s/=12)):(r=this-n,s="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-o)/864e5:"week"===e?(r-o)/6048e5:r),i?s:g(s)):NaN},xi.endOf=function(t){return void 0===(t=_(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},xi.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var i=R(this,e);return this.localeData().postformat(i)},xi.from=function(t,e){return this.isValid()&&(f(t)&&t.isValid()||xt(t).isValid())?At({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},xi.fromNow=function(t){return this.from(xt(),t)},xi.to=function(t,e){return this.isValid()&&(f(t)&&t.isValid()||xt(t).isValid())?At({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},xi.toNow=function(t){return this.to(xt(),t)},xi.get=function(t){return w(this[t=_(t)])?this[t]():this},xi.invalidAt=function(){return l(this).overflow},xi.isAfter=function(t,e){var i=f(t)?t:xt(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=_(h(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},xi.isBefore=function(t,e){var i=f(t)?t:xt(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=_(h(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},xi.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},xi.isSame=function(t,e){var i,n=f(t)?t:xt(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=_(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},xi.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},xi.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},xi.isValid=function(){return c(this)},xi.lang=fi,xi.locale=Ot,xi.localeData=Ft,xi.max=li,xi.min=ai,xi.parsingFlags=function(){return s({},l(this))},xi.set=function(t,e){if("object"==typeof t)for(var i=function(t){var e=[];for(var i in t)e.push({unit:i,priority:ae[i]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=T(t)),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit]);else if(w(this[t=_(t)]))return this[t](e);return this},xi.startOf=function(t){switch(t=_(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},xi.subtract=pi,xi.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},xi.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},xi.toDate=function(){return new Date(this.valueOf())},xi.toISOString=function(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?w(Date.prototype.toISOString)?this.toDate().toISOString():R(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):R(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},xi.toJSON=function(){return this.isValid()?this.toISOString():null},xi.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},xi.unix=function(){return Math.floor(this.valueOf()/1e3)},xi.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},xi.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},xi.year=Ye,xi.isLeapYear=function(){return U(this.year())},xi.weekYear=function(t){return Ht.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},xi.isoWeekYear=function(t){return Ht.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},xi.quarter=xi.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},xi.month=X,xi.daysInMonth=function(){return j(this.year(),this.month())},xi.week=xi.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},xi.isoWeek=xi.isoWeeks=function(t){var e=J(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},xi.weeksInYear=function(){var t=this.localeData()._week;return tt(this.year(),t.dow,t.doy)},xi.isoWeeksInYear=function(){return tt(this.year(),1,4)},xi.date=gi,xi.day=xi.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},xi.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},xi.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},xi.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},xi.hour=xi.hours=Qe,xi.minute=xi.minutes=mi,xi.second=xi.seconds=yi,xi.millisecond=xi.milliseconds=bi,xi.utcOffset=function(e,i){var n,o=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=_t(Te,e):Math.abs(e)<16&&(e*=60),!this._isUTC&&i&&(n=Dt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),o!==e&&(!i||this._changeInProgress?Rt(this,At(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?o:Dt(this):null!=e?this:NaN},xi.utc=function(t){return this.utcOffset(0,t)},xi.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Dt(this),"m")),this},xi.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(_t(_e,this._i)),this},xi.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?xt(t).utcOffset():0,(this.utcOffset()-t)%60==0)},xi.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},xi.isLocal=function(){return!!this.isValid()&&!this._isUTC},xi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},xi.isUtc=Et,xi.isUTC=Et,xi.zoneAbbr=function(){return this._isUTC?"UTC":""},xi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},xi.dates=b("dates accessor is deprecated. Use date instead.",gi),xi.months=b("months accessor is deprecated. Use month instead",X),xi.years=b("years accessor is deprecated. Use year instead",Ye),xi.zone=b("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),xi.isDSTShifted=b("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!h(this._isDSTShifted))return this._isDSTShifted;var t={};if(u(t,this),(t=vt(t))._a){var e=t._isUTC?a(t._a):xt(t._a);this._isDSTShifted=this.isValid()&&v(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var wi=xi,Si=C.prototype;Si.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return w(n)?n.call(e,i):n},Si.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},Si.invalidDate=function(){return this._invalidDate},Si.ordinal=function(t){return this._ordinal.replace("%d",t)},Si.preparse=$t,Si.postformat=$t,Si.relativeTime=function(t,e,i,n){var o=this._relativeTime[i];return w(o)?o(t,e,i,n):o.replace(/%d/i,t)},Si.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return w(i)?i(e):i.replace(/%s/i,e)},Si.set=function(t){var e,i;for(i in t)w(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},Si.months=function(t,i){return e(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||ze).test(i)?"format":"standalone"][t.month()]},Si.monthsShort=function(t,i){return e(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[ze.test(i)?"format":"standalone"][t.month()]},Si.monthsParse=function(t,e,i){var n,o,r;if(this._monthsParseExact)return W.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(o=a([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(r="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},Si.monthsRegex=function(t){return this._monthsParseExact?(r(this,"_monthsRegex")||V.call(this),t?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},Si.monthsShortRegex=function(t){return this._monthsParseExact?(r(this,"_monthsRegex")||V.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=je),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},Si.week=function(t){return J(t,this._week.dow,this._week.doy).week},Si.firstDayOfYear=function(){return this._week.doy},Si.firstDayOfWeek=function(){return this._week.dow},Si.weekdays=function(t,i){return e(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(i)?"format":"standalone"][t.day()]},Si.weekdaysMin=function(t){return this._weekdaysMin[t.day()]},Si.weekdaysShort=function(t){return this._weekdaysShort[t.day()]},Si.weekdaysParse=function(t,e,i){var n,o,r;if(this._weekdaysParseExact)return et.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(o=a([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},Si.weekdaysRegex=function(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||it.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=Ue),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},Si.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||it.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ge),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Si.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||it.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ze),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Si.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},Si.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},lt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===m(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),t.lang=b("moment.lang is deprecated. Use moment.locale instead.",lt),t.langData=b("moment.langData is deprecated. Use moment.localeData instead.",dt);var Ci=Math.abs,ki=Gt("ms"),_i=Gt("s"),Ti=Gt("m"),Di=Gt("h"),Ei=Gt("d"),Ai=Gt("w"),Ii=Gt("M"),Pi=Gt("y"),Mi=Zt("milliseconds"),Li=Zt("seconds"),Ri=Zt("minutes"),Oi=Zt("hours"),Fi=Zt("days"),Ni=Zt("months"),Hi=Zt("years"),zi=Math.round,Bi={s:45,m:45,h:22,d:26,M:11},$i=Math.abs,ji=St.prototype;return ji.abs=function(){var t=this._data;return this._milliseconds=Ci(this._milliseconds),this._days=Ci(this._days),this._months=Ci(this._months),t.milliseconds=Ci(t.milliseconds),t.seconds=Ci(t.seconds),t.minutes=Ci(t.minutes),t.hours=Ci(t.hours),t.months=Ci(t.months),t.years=Ci(t.years),this},ji.add=function(t,e){return Xt(this,t,e,1)},ji.subtract=function(t,e){return Xt(this,t,e,-1)},ji.as=function(t){var e,i,n=this._milliseconds;if("month"===(t=_(t))||"year"===t)return e=this._days+n/864e5,i=this._months+qt(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Ut(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},ji.asMilliseconds=ki,ji.asSeconds=_i,ji.asMinutes=Ti,ji.asHours=Di,ji.asDays=Ei,ji.asWeeks=Ai,ji.asMonths=Ii,ji.asYears=Pi,ji.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*m(this._months/12)},ji._bubble=function(){var t,e,i,n,o,r=this._milliseconds,s=this._days,a=this._months,l=this._data;return r>=0&&s>=0&&a>=0||0>=r&&0>=s&&0>=a||(r+=864e5*Vt(Ut(a)+s),s=0,a=0),l.milliseconds=r%1e3,t=g(r/1e3),l.seconds=t%60,e=g(t/60),l.minutes=e%60,i=g(e/60),l.hours=i%24,s+=g(i/24),a+=o=g(qt(s)),s-=Vt(Ut(o)),n=g(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},ji.get=function(t){return this[(t=_(t))+"s"]()},ji.milliseconds=Mi,ji.seconds=Li,ji.minutes=Ri,ji.hours=Oi,ji.days=Fi,ji.weeks=function(){return g(this.days()/7)},ji.months=Ni,ji.years=Hi,ji.humanize=function(t){var e=this.localeData(),i=function(t,e,i){var n=At(t).abs(),o=zi(n.as("s")),r=zi(n.as("m")),s=zi(n.as("h")),a=zi(n.as("d")),l=zi(n.as("M")),c=zi(n.as("y")),d=o<Bi.s&&["s",o]||1>=r&&["m"]||r<Bi.m&&["mm",r]||1>=s&&["h"]||s<Bi.h&&["hh",s]||1>=a&&["d"]||a<Bi.d&&["dd",a]||1>=l&&["M"]||l<Bi.M&&["MM",l]||1>=c&&["y"]||["yy",c];return d[2]=e,d[3]=+t>0,d[4]=i,Kt.apply(null,d)}(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)},ji.toISOString=Qt,ji.toString=Qt,ji.toJSON=Qt,ji.locale=Ot,ji.localeData=Ft,ji.toIsoString=b("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qt),ji.lang=fi,M("X",0,0,"unix"),M("x",0,0,"valueOf"),F("x",ke),F("X",/[+-]?\d+(\.\d{1,3})?/),z("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))})),z("x",(function(t,e,i){i._d=new Date(m(t))})),t.version="2.14.1",function(t){Jt=t}(xt),t.fn=wi,t.min=function(){return wt("isBefore",[].slice.call(arguments,0))},t.max=function(){return wt("isAfter",[].slice.call(arguments,0))},t.now=function(){return Date.now?Date.now():+new Date},t.utc=a,t.unix=function(t){return xt(1e3*t)},t.months=function(t,e){return Wt(t,e,"months")},t.isDate=n,t.locale=lt,t.invalid=d,t.duration=At,t.isMoment=f,t.weekdays=function(t,e,i){return Yt(t,e,i,"weekdays")},t.parseZone=function(){return xt.apply(null,arguments).parseZone()},t.localeData=dt,t.isDuration=Ct,t.monthsShort=function(t,e){return Wt(t,e,"monthsShort")},t.weekdaysMin=function(t,e,i){return Yt(t,e,i,"weekdaysMin")},t.defineLocale=ct,t.updateLocale=function(t,e){if(null!=e){var i,n=Je;null!=ti[t]&&(n=ti[t]._config),(i=new C(e=S(n,e))).parentLocale=ti[t],ti[t]=i,lt(t)}else null!=ti[t]&&(null!=ti[t].parentLocale?ti[t]=ti[t].parentLocale:null!=ti[t]&&delete ti[t]);return ti[t]},t.locales=function(){return ee(ti)},t.weekdaysShort=function(t,e,i){return Yt(t,e,i,"weekdaysShort")},t.normalizeUnits=_,t.relativeTimeRounding=function(t){return void 0===t?zi:"function"==typeof t&&(zi=t,!0)},t.relativeTimeThreshold=function(t,e){return void 0!==Bi[t]&&(void 0===e?Bi[t]:(Bi[t]=e,!0))},t.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse"},t.prototype=wi,t})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ApexCharts=e()}(this,(function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})))),n.forEach((function(e){o(t,e,i[e])}))}return t}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var h=function(){function i(){e(this,i)}return n(i,[{key:"shadeRGBColor",value:function(t,e){var i=e.split(","),n=t<0?0:255,o=t<0?-1*t:t,r=parseInt(i[0].slice(4)),s=parseInt(i[1]),a=parseInt(i[2]);return"rgb("+(Math.round((n-r)*o)+r)+","+(Math.round((n-s)*o)+s)+","+(Math.round((n-a)*o)+a)+")"}},{key:"shadeHexColor",value:function(t,e){var i=parseInt(e.slice(1),16),n=t<0?0:255,o=t<0?-1*t:t,r=i>>16,s=i>>8&255,a=255&i;return"#"+(16777216+65536*(Math.round((n-r)*o)+r)+256*(Math.round((n-s)*o)+s)+(Math.round((n-a)*o)+a)).toString(16).slice(1)}},{key:"shadeColor",value:function(t,e){return e.length>7?this.shadeRGBColor(t,e):this.shadeHexColor(t,e)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===t(e)&&!Array.isArray(e)&&null!=e}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e<t.length;e++)i[e]=t[e];return i}},{key:"extend",value:function(t,e){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e});var n=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach((function(r){i.isObject(e[r])&&r in t?n[r]=i.extend(t[r],e[r]):Object.assign(n,o({},r,e[r]))})),n}},{key:"extendArray",value:function(t,e){var n=[];return t.map((function(t){n.push(i.extend(e,t))})),n}},{key:"monthMod",value:function(t){return t%12}},{key:"addProps",value:function(t,e,i){"string"==typeof e&&(e=e.split(".")),t[e[0]]=t[e[0]]||{};var n=t[e[0]];return e.length>1?(e.shift(),this.addProps(n,e,i)):t[e[0]]=i,t}},{key:"clone",value:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var i=[],n=0;n<e.length;n++)i[n]=this.clone(e[n]);return i}if("object"===t(e)){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]=this.clone(e[r]));return o}return e}},{key:"log10",value:function(t){return Math.log(t)/Math.LN10}},{key:"roundToBase10",value:function(t){return Math.pow(10,Math.floor(Math.log10(t)))}},{key:"roundToBase",value:function(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}},{key:"parseNumber",value:function(t){return null===t?t:parseFloat(t)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1==e.length)return e[0];var i="",n=t<0?"-":"",o=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=n+"0.";r++;)i+="0";return i+o.replace(/^\-/,"")}for(r-=o.length;r--;)i+="0";return o+i}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t),i=[],n=t.clientHeight,o=t.clientWidth;return n-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),o-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i.push(o),i.push(n),i}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y}}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var n=0;n<i.length;n++)i[n]=parseInt(1===i[n].length?i[n]+i[n]:i[n],16);return void 0!==e&&i.push(e),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))[3]}},{key:"rgb2hex",value:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}},{key:"polarToCartesian",value:function(t,e,i,n){var o=(n-90)*Math.PI/180;return{x:t+i*Math.cos(o),y:e+i*Math.sin(o)}}},{key:"escapeString",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x";return t.toString().slice().replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var n=i-t.length+1;n--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d\.]*/g,""))}},{key:"randomString",value:function(t){for(var e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",n=0;n<t;n++)e+=i.charAt(Math.floor(52*Math.random()));return e}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)}}]),i}(),u=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(t,e,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addNormalFilter",value:function(t,e){var i=this.w;i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addLightenFilter",value:function(t,e,i){var n=this,o=this.w,r=i.intensity;if(!h.isFirefox()){t.unfilter(!0);var s=new window.SVG.Filter;s.size("120%","180%","-5%","-40%"),t.filter((function(t){var i=o.config.chart.dropShadow;(s=i.enabled?n.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:r}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse")}}},{key:"addDarkenFilter",value:function(t,e,i){var n=this,o=this.w,r=i.intensity;if(!h.isFirefox()){t.unfilter(!0);var s=new window.SVG.Filter;s.size("120%","180%","-5%","-40%"),t.filter((function(t){var i=o.config.chart.dropShadow;(s=i.enabled?n.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:r}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse")}}},{key:"applyFilter",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(t,e);break;case"lighten":this.addLightenFilter(t,e,{intensity:n});break;case"darken":this.addDarkenFilter(t,e,{intensity:n})}}},{key:"addShadow",value:function(t,e,i){var n=i.blur,o=i.top,r=i.left,s=i.color,a=i.opacity,l=t.flood(Array.isArray(s)?s[e]:s,a).composite(t.sourceAlpha,"in").offset(r,o).gaussianBlur(n).merge(t.source);return t.blend(t.source,l)}},{key:"dropShadow",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.top,o=e.left,r=e.blur,s=e.color,a=e.opacity,l=e.noUserSpaceOnUse;return t.unfilter(!0),s=Array.isArray(s)?s[i]:s,(new window.SVG.Filter).size("120%","180%","-5%","-40%"),t.filter((function(t){var e;e=h.isSafari()||h.isFirefox()||h.isIE()?t.flood(s,a).composite(t.sourceAlpha,"in").offset(o,n).gaussianBlur(r):t.flood(s,a).composite(t.sourceAlpha,"in").offset(o,n).gaussianBlur(r).merge(t.source),t.blend(t.source,e)})),l||t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),t}},{key:"setSelectionFilter",value:function(t,e,i){var n=this.w;if(void 0!==n.globals.selectedDataPoints[e]&&n.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var o=n.config.states.active.filter;"none"!==o&&this.applyFilter(t,e,o.type,o.value)}}}]),t}(),p=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.setEasingFunctions()}return n(t,[{key:"setEasingFunctions",value:function(){var t;switch(this.w.config.chart.animations.easing){case"linear":t="-";break;case"easein":t="<";break;case"easeout":t=">";break;case"easeinout":default:t="<>";break;case"swing":t=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1};break;case"bounce":t=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};break;case"elastic":t=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=t}},{key:"animateLine",value:function(t,e,i,n){t.attr(e).animate(n).attr(i)}},{key:"animateCircleRadius",value:function(t,e,i,n,o){e||(e=0),t.attr({r:e}).animate(n,o).attr({r:i})}},{key:"animateCircle",value:function(t,e,i,n,o){t.attr({r:e.r,cx:e.cx,cy:e.cy}).animate(n,o).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(t,e,i,n,o){t.attr(e).animate(n).attr(i).afterAll((function(){o()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.j,n=t.pathFrom,o=t.pathTo,r=t.speed,s=t.delay,a=t.strokeWidth,l=this.w,c=0;l.config.chart.animations.animateGradually.enabled&&(c=l.config.chart.animations.animateGradually.delay),l.config.chart.animations.dynamicAnimation.enabled&&l.globals.dataChanged&&(c=0),this.morphSVG(e,i,n,o,r,a,s*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){t.el.classList.remove("hidden")}))}},{key:"morphSVG",value:function(t,e,i,n,o,r,s){var a=this,l=this.w;i||(i=t.attr("pathFrom")),n||(n=t.attr("pathTo")),(!i||i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(l.globals.gridHeight),o=1),(n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n="M 0 ".concat(l.globals.gridHeight),o=1),l.globals.shouldAnimate||(o=1),t.plot(i).animate(1,l.globals.easing,s).plot(i).animate(o,l.globals.easing,s).plot(n).afterAll((function(){h.isNumber(e)?e===l.globals.series[l.globals.maxValsInArrayIndex].length-2&&l.globals.shouldAnimate&&(l.globals.animationEnded=!0):l.globals.shouldAnimate&&(l.globals.animationEnded=!0,"function"==typeof l.config.chart.events.animationEnd&&l.config.chart.events.animationEnd(a.ctx,l)),a.showDelayedElements()}))}}]),t}(),f=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"drawLine",value:function(t,e,i,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:n,stroke:o,"stroke-dasharray":r,"stroke-width":s})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:t,y:e,width:i>0?i:0,height:n>0?n:0,rx:o,ry:o,fill:r,opacity:s,"stroke-width":null!==a?a:0,stroke:null!==l?l:"none","stroke-dasharray":c}),d}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:i,stroke:e})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,n=t.stroke,o=void 0===n?"#a8a8a8":n,r=t.strokeWidth,s=void 0===r?1:r,a=t.fill,l=t.fillOpacity,c=void 0===l?1:l,d=t.strokeOpacity,h=void 0===d?1:d,u=t.classes,p=t.strokeLinecap,f=void 0===p?null:p,g=t.strokeDashArray,m=void 0===g?0:g,v=this.w;return null===f&&(f=v.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(v.globals.gridHeight)),v.globals.dom.Paper.path(i).attr({fill:a,"fill-opacity":c,stroke:o,"stroke-opacity":h,"stroke-linecap":f,"stroke-width":s,"stroke-dasharray":m,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=null;return null===i?n=["L",t,e].join(" "):"H"===i?n=["H",t].join(" "):"V"===i&&(n=["V",e].join(" ")),n}},{key:"curve",value:function(t,e,i,n,o,r){return["C",t,e,i,n,o,r].join(" ")}},{key:"quadraticCurve",value:function(t,e,i,n){return["Q",t,e,i,n].join(" ")}},{key:"arc",value:function(t,e,i,n,o,r,s){var a="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(a="a"),[a,t,e,i,n,o,r,s].join(" ")}},{key:"renderPaths",value:function(t){var e,i=t.i,n=t.j,o=t.realIndex,s=t.pathFrom,a=t.pathTo,l=t.stroke,c=t.strokeWidth,d=t.strokeLinecap,h=t.fill,f=t.animationDelay,g=t.initialSpeed,m=t.dataChangeSpeed,v=t.className,y=t.id,b=t.shouldClipToGrid,x=void 0===b||b,w=t.bindEventsOnPaths,S=void 0===w||w,C=t.drawShadow,k=void 0===C||C,_=this.w,T=new u(this.ctx),D=new p(this.ctx),E=this.w.config.chart.animations.enabled,A=E&&this.w.config.chart.animations.dynamicAnimation.enabled,I=!!(E&&!_.globals.resized||A&&_.globals.dataChanged&&_.globals.shouldAnimate);I?e=s:(e=a,this.w.globals.animationEnded=!0);var P,M=_.config.stroke.dashArray;P=Array.isArray(M)?M[o]:_.config.stroke.dashArray;var L=this.drawPath({d:e,stroke:l,strokeWidth:c,fill:h,fillOpacity:1,classes:v,strokeLinecap:d,strokeDashArray:P});if(L.attr("id","".concat(y,"-").concat(i)),L.attr("index",o),x&&L.attr({"clip-path":"url(#gridRectMask".concat(_.globals.cuid,")")}),"none"!==_.config.states.normal.filter.type)T.getDefaultFilter(L,o);else if(_.config.chart.dropShadow.enabled&&k&&(!_.config.chart.dropShadow.enabledSeries||_.config.chart.dropShadow.enabledSeries&&-1!==_.config.chart.dropShadow.enabledSeries.indexOf(o))){var R=_.config.chart.dropShadow;T.dropShadow(L,R,o)}S&&(L.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,L)),L.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,L)),L.node.addEventListener("mousedown",this.pathMouseDown.bind(this,L))),L.attr({pathTo:a,pathFrom:s});var O={el:L,j:n,pathFrom:s,pathTo:a,strokeWidth:c};return!E||_.globals.resized||_.globals.dataChanged?!_.globals.resized&&_.globals.dataChanged||D.showDelayedElements():D.animatePathsGradually(r({},O,{speed:g,delay:f})),_.globals.dataChanged&&A&&I&&D.animatePathsGradually(r({},O,{speed:m})),L}},{key:"drawPattern",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:n,width:o+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:n,width:o+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:n,width:o}):"squares"===t?r.rect(e,i).fill("none").stroke({color:n,width:o}):"circles"===t&&r.circle(e).fill("none").stroke({color:n,width:o})}))}},{key:"drawGradient",value:function(t,e,i,n,o){var r,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,d=this.w;e=h.hexToRgba(e,n),i=h.hexToRgba(i,o);var u=0,p=1,f=1,g=null;null!==a&&(u=void 0!==a[0]?a[0]/100:0,p=void 0!==a[1]?a[1]/100:1,f=void 0!==a[2]?a[2]/100:1,g=void 0!==a[3]?a[3]/100:null);var m=!("donut"!==d.config.chart.type&&"pie"!==d.config.chart.type&&"bubble"!==d.config.chart.type);if(r=null===l||0===l.length?d.globals.dom.Paper.gradient(m?"radial":"linear",(function(t){t.at(u,e,n),t.at(p,i,o),t.at(f,i,o),null!==g&&t.at(g,e,n)})):d.globals.dom.Paper.gradient(m?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.at(e.offset/100,e.color,e.opacity)}))})),m){var v=d.globals.gridWidth/2,y=d.globals.gridHeight/2;"bubble"!==d.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:v,cy:y,r:s}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(0,1).to(2,2);return r}},{key:"drawText",value:function(t){var e,i=this.w,n=t.x,o=t.y,r=t.text,s=t.textAnchor,a=t.fontSize,l=t.fontFamily,c=t.foreColor,d=t.opacity;return void 0===r&&(r=""),s||(s="start"),c||(c=i.config.chart.foreColor),l=l||i.config.chart.fontFamily,(e=Array.isArray(r)?i.globals.dom.Paper.text((function(t){for(var e=0;e<r.length;e++)t.tspan(r[e])})):i.globals.dom.Paper.plain(r)).attr({x:n,y:o,"text-anchor":s,"dominant-baseline":"auto","font-size":a,"font-family":l,fill:c,class:(t.cssClass,t.cssClass)}),e.node.style.fontFamily=l,e.node.style.opacity=d,e}},{key:"addTspan",value:function(t,e,i){var n=t.tspan(e);i||(i=this.w.config.chart.fontFamily),n.node.style.fontFamily=i}},{key:"drawMarker",value:function(t,e,i){t=t||0;var n=i.pSize||0,o=null;if("square"===i.shape){var r=void 0===i.pRadius?n/2:i.pRadius;null===e&&(n=0,r=0);var s=1.2*n+r,a=this.drawRect(s,s,s,s,r);a.attr({x:t-s/2,y:e-s/2,cx:t,cy:e,class:i.class?i.class:"",fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,stroke:i.pointStrokeColor,"stroke-width":i.pWidth?i.pWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}),o=a}else"circle"===i.shape&&(h.isNumber(e)||(n=0,e=0),o=this.drawCircle(n,{cx:t,cy:e,class:i.class?i.class:"",stroke:i.pointStrokeColor,fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,"stroke-width":i.pWidth?i.pWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}));return o}},{key:"pathMouseEnter",value:function(t,e){var i=this.w,n=new u(this.ctx),o=parseInt(t.node.getAttribute("index")),r=parseInt(t.node.getAttribute("j"));if("function"==typeof i.config.chart.events.dataPointMouseEnter&&i.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}),this.ctx.fireEvent("dataPointMouseEnter",[e,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}]),("none"===i.config.states.active.filter.type||"true"!==t.node.getAttribute("selected"))&&"none"!==i.config.states.hover.filter.type&&"none"!==i.config.states.active.filter.type&&!i.globals.isTouchDevice){var s=i.config.states.hover.filter;n.applyFilter(t,o,s.type,s.value)}}},{key:"pathMouseLeave",value:function(t,e){var i=this.w,n=new u(this.ctx),o=parseInt(t.node.getAttribute("index")),r=parseInt(t.node.getAttribute("j"));"function"==typeof i.config.chart.events.dataPointMouseLeave&&i.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}),this.ctx.fireEvent("dataPointMouseLeave",[e,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}]),"none"!==i.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==i.config.states.hover.filter.type&&n.getDefaultFilter(t,o)}},{key:"pathMouseDown",value:function(t,e){var i=this.w,n=new u(this.ctx),o=parseInt(t.node.getAttribute("index")),r=parseInt(t.node.getAttribute("j")),s="false";if("true"===t.node.getAttribute("selected")){if(t.node.setAttribute("selected","false"),i.globals.selectedDataPoints[o].indexOf(r)>-1){var a=i.globals.selectedDataPoints[o].indexOf(r);i.globals.selectedDataPoints[o].splice(a,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members;l.forEach((function(t){t.node.setAttribute("selected","false"),n.getDefaultFilter(t,o)})),c.forEach((function(t){t.node.setAttribute("selected","false"),n.getDefaultFilter(t,o)}))}t.node.setAttribute("selected","true"),s="true",void 0===i.globals.selectedDataPoints[o]&&(i.globals.selectedDataPoints[o]=[]),i.globals.selectedDataPoints[o].push(r)}if("true"===s){var d=i.config.states.active.filter;"none"!==d&&n.applyFilter(t,o,d.type,d.value)}else"none"!==i.config.states.active.filter.type&&n.getDefaultFilter(t,o);"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:i}),this.ctx.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e=t.getBBox();return{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,s=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});n&&s.attr("transform",n),r.globals.dom.Paper.add(s);var a=s.bbox();return o||(a=s.node.getBoundingClientRect()),s.remove(),{width:a.width,height:a.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if(t.textContent=e,e.length>0&&t.getSubStringLength(0,e.length)>=i){for(var n=e.length-3;n>0;n-=3)if(t.getSubStringLength(0,n)<=i)return void(t.textContent=e.substring(0,n)+"...");t.textContent="..."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),g={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},m=function(){function t(){e(this,t),this.yAxis={show:!0,showAlways:!1,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#78909C",offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#78909C",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.xAxisAnnotation={x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.yAxisAnnotation={y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",opacity:.3,offsetX:0,offsetY:0,yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,cssClass:"",padding:{left:5,right:5,top:0,bottom:2}}}},this.pointAnnotation={x:0,y:null,yAxisIndex:0,seriesIndex:0,marker:{size:0,fillColor:"#fff",strokeWidth:2,strokeColor:"#0e1726",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,text:void 0,textAnchor:"middle",offsetX:0,offsetY:-15,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,cssClass:"",padding:{left:5,right:5,top:0,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0}}}return n(t,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[g],defaultLocale:"en",dropShadow:{enabled:!1,enabledSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,zoomed:void 0,scrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!1,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,endingShape:"flat",colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1},dataLabels:{maxItems:100,hideOverflowingLabels:!0,position:"top"}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!0,distributed:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{size:void 0,inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,color:void 0,offsetY:0},value:{show:!0,fontSize:"14px",fontFamily:void 0,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}}},rangeBar:{},pie:{size:void 0,customScale:1,offsetX:0,offsetY:0,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,color:void 0,offsetY:-10},value:{show:!0,fontSize:"20px",fontFamily:void 0,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,label:"Total",color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return t},textAnchor:"middle",offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,colors:void 0},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"sqaures",width:6,height:6,strokeWidth:2}},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1,animate:!1}},yaxis:{lines:{show:!0,animate:!1}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",fontSize:"12px",fontFamily:void 0,width:void 0,height:void 0,formatter:void 0,offsetX:-20,offsetY:0,labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:0,vertical:5},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,fillOpacity:1,shape:"circle",radius:2,offsetX:0,offsetY:0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.65}}},title:{text:void 0,align:"left",margin:10,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:10,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],offsetX:0,offsetY:0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!0,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss"}},axisBorder:{show:!0,color:"#78909C",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#78909C",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),v=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.graphics=new f(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return n(t,[{key:"drawAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts){for(var e=this.drawYAxisAnnotations(),i=this.drawXAxisAnnotations(),n=this.drawPointAnnotations(),o=t.config.chart.animations.enabled,r=[e,i,n],s=[i.node,e.node,n.node],a=0;a<3;a++)t.globals.dom.elGraphical.add(r[a]),!o||t.globals.resized||t.globals.dataChanged||s[a].classList.add("hidden"),t.globals.delayedElements.push({el:s[a],index:0});this.annotationsBackground()}}},{key:"addXaxisAnnotation",value:function(t,e,i){var n=this.w,o=this.invertAxis?n.globals.minY:n.globals.minX,r=this.invertAxis?n.globals.yRange[0]:n.globals.xRange,s=(t.x-o)/(r/n.globals.gridWidth),a=t.label.text;if("category"===n.config.xaxis.type||n.config.xaxis.convertedCatToNumeric){var l=n.globals.labels.indexOf(t.x),c=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(l+1)+")");c&&(s=parseFloat(c.getAttribute("x")))}var d=t.strokeDashArray;if(!(s<0||s>n.globals.gridWidth)){if(null===t.x2){var h=this.graphics.drawLine(s+t.offsetX,0+t.offsetY,s+t.offsetX,n.globals.gridHeight+t.offsetY,t.borderColor,d);e.appendChild(h.node)}else{var u=(t.x2-o)/(r/n.globals.gridWidth);if(u<s){var p=s;s=u,u=p}if(a){var f=this.graphics.drawRect(s+t.offsetX,0+t.offsetY,u-s,n.globals.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,d);e.appendChild(f.node)}}var g="top"===t.label.position?-3:n.globals.gridHeight,m=this.graphics.drawText({x:s+t.label.offsetX,y:g+t.label.offsetY,text:a,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,foreColor:t.label.style.color,cssClass:"apexcharts-xaxis-annotation-label "+t.label.style.cssClass});m.attr({rel:i}),e.appendChild(m.node),this.setOrientations(t,i)}}},{key:"drawXAxisAnnotations",value:function(){var t=this,e=this.w,i=this.graphics.group({class:"apexcharts-xaxis-annotations"});return e.config.annotations.xaxis.map((function(e,n){t.addXaxisAnnotation(e,i.node,n)})),i}},{key:"addYaxisAnnotation",value:function(t,e,i){var n,o,r=this.w,s=t.strokeDashArray;if(this.invertAxis){var a=r.globals.labels.indexOf(t.y),l=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(a+1)+")");l&&(n=parseFloat(l.getAttribute("y")))}else n=r.globals.gridHeight-(t.y-r.globals.minYArr[t.yAxisIndex])/(r.globals.yRange[t.yAxisIndex]/r.globals.gridHeight),r.config.yaxis[t.yAxisIndex]&&r.config.yaxis[t.yAxisIndex].reversed&&(n=(t.y-r.globals.minYArr[t.yAxisIndex])/(r.globals.yRange[t.yAxisIndex]/r.globals.gridHeight));var c=t.label.text;if(null===t.y2){var d=this.graphics.drawLine(0+t.offsetX,n+t.offsetY,r.globals.gridWidth+t.offsetX,n+t.offsetY,t.borderColor,s);e.appendChild(d.node)}else{if(this.invertAxis){var h=r.globals.labels.indexOf(t.y2),u=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(h+1)+")");u&&(o=parseFloat(u.getAttribute("y")))}else o=r.globals.gridHeight-(t.y2-r.globals.minYArr[t.yAxisIndex])/(r.globals.yRange[t.yAxisIndex]/r.globals.gridHeight),r.config.yaxis[t.yAxisIndex]&&r.config.yaxis[t.yAxisIndex].reversed&&(o=(t.y2-r.globals.minYArr[t.yAxisIndex])/(r.globals.yRange[t.yAxisIndex]/r.globals.gridHeight));if(o>n){var p=n;n=o,o=p}if(c){var f=this.graphics.drawRect(0+t.offsetX,o+t.offsetY,r.globals.gridWidth+t.offsetX,n-o,0,t.fillColor,t.opacity,1,t.borderColor,s);e.appendChild(f.node)}}var g="right"===t.label.position?r.globals.gridWidth:0,m=this.graphics.drawText({x:g+t.label.offsetX,y:(o||n)+t.label.offsetY-3,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label "+t.label.style.cssClass});m.attr({rel:i}),e.appendChild(m.node)}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.map((function(e,n){t.addYaxisAnnotation(e,i.node,n)})),i}},{key:"clearAnnotations",value:function(t){var e=t.w.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");(e=h.listToArray(e)).forEach((function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"addPointAnnotation",value:function(t,e,i){var n=this.w,o=0,r=0,s=0;if(this.invertAxis&&console.warn("Point annotation is not supported in horizontal bar charts."),"string"==typeof t.x){var a=n.globals.labels.indexOf(t.x),l=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");o=parseFloat(l.getAttribute("x"));var c=t.y;null===t.y&&(c=n.globals.series[t.seriesIndex][a]),r=n.globals.gridHeight-(c-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight)-parseInt(t.label.style.fontSize)-t.marker.size,s=n.globals.gridHeight-(c-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight),n.config.yaxis[t.yAxisIndex]&&n.config.yaxis[t.yAxisIndex].reversed&&(r=(c-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight)+parseInt(t.label.style.fontSize)+t.marker.size,s=(c-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight))}else o=(t.x-n.globals.minX)/(n.globals.xRange/n.globals.gridWidth),r=n.globals.gridHeight-(parseFloat(t.y)-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight)-parseInt(t.label.style.fontSize)-t.marker.size,s=n.globals.gridHeight-(t.y-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight),n.config.yaxis[t.yAxisIndex]&&n.config.yaxis[t.yAxisIndex].reversed&&(r=(parseFloat(t.y)-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight)-parseInt(t.label.style.fontSize)-t.marker.size,s=(t.y-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight));if(!(o<0||o>n.globals.gridWidth)){var d={pSize:t.marker.size,pWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,radius:t.marker.radius,class:"apexcharts-point-annotation-marker "+t.marker.cssClass},h=this.graphics.drawMarker(o+t.marker.offsetX,s+t.marker.offsetY,d);e.appendChild(h.node);var u=t.label.text?t.label.text:"",p=this.graphics.drawText({x:o+t.label.offsetX,y:r+t.label.offsetY,text:u,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label "+t.label.style.cssClass});if(p.attr({rel:i}),e.appendChild(p.node),t.customSVG.SVG){var f=this.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});f.attr({transform:"translate(".concat(o+t.customSVG.offsetX,", ").concat(r+t.customSVG.offsetY,")")}),f.node.innerHTML=t.customSVG.SVG,e.appendChild(f.node)}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,n){t.addPointAnnotation(e,i.node,n)})),i}},{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var n=null!==e?e:0,o=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(n,"']"));if(null!==o){var r=o.getBoundingClientRect();o.setAttribute("x",parseFloat(o.getAttribute("x"))-r.height+4),"top"===t.label.position?o.setAttribute("y",parseFloat(o.getAttribute("y"))+r.width):o.setAttribute("y",parseFloat(o.getAttribute("y"))-r.width);var s=this.graphics.rotateAroundCenter(o),a=s.x,l=s.y;o.setAttribute("transform","rotate(-90 ".concat(a," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!e.label.text)return null;var n=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),o=t.getBoundingClientRect(),r=e.label.style.padding.left,s=e.label.style.padding.right,a=e.label.style.padding.top,l=e.label.style.padding.bottom;"vertical"===e.label.orientation&&(a=e.label.style.padding.left,l=e.label.style.padding.right,r=e.label.style.padding.top,s=e.label.style.padding.bottom);var c=o.left-n.left-r,d=o.top-n.top-a;return this.graphics.drawRect(c,d,o.width+r+s,o.height+a+l,0,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0)}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,n,o){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(n,"']"));if(r){var s=r.parentNode,a=t.addBackgroundToAnno(r,i);a&&s.insertBefore(a.node,r)}};e.config.annotations.xaxis.map((function(t,e){i(t,e,"xaxis")})),e.config.annotations.yaxis.map((function(t,e){i(t,e,"yaxis")})),e.config.annotations.points.map((function(t,e){i(t,e,"point")}))}},{key:"addText",value:function(t,e,i){var n=t.x,o=t.y,r=t.text,s=t.textAnchor,a=t.appendTo,l=void 0===a?".apexcharts-inner":a,c=t.foreColor,d=t.fontSize,h=t.fontFamily,u=t.cssClass,p=t.backgroundColor,f=t.borderWidth,g=t.strokeDashArray,m=t.radius,v=t.borderColor,y=t.paddingLeft,b=void 0===y?4:y,x=t.paddingRight,w=void 0===x?4:x,S=t.paddingBottom,C=void 0===S?2:S,k=t.paddingTop,_=void 0===k?2:k,T=i,D=T.w,E=D.globals.dom.baseEl.querySelector(l),A=this.graphics.drawText({x:n,y:o,text:r,textAnchor:s||"start",fontSize:d||"12px",fontFamily:h||D.config.chart.fontFamily,foreColor:c||D.config.chart.foreColor,cssClass:u});E.appendChild(A.node);var I=A.bbox();if(r){var P=this.graphics.drawRect(I.x-b,I.y-_,I.width+b+w,I.height+C+_,m,p,1,f,v,g);A.before(P)}return e&&D.globals.memory.methodsToExec.push({context:T,method:T.addText,params:{x:n,y:o,text:r,textAnchor:s,appendTo:l,foreColor:c,fontSize:d,cssClass:u,backgroundColor:p,borderWidth:f,strokeDashArray:g,radius:m,borderColor:v,paddingLeft:b,paddingRight:w,paddingBottom:C,paddingTop:_}}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,n=t.context,o=t.type,r=t.contextMethod,s=n,a=s.w,l=a.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations")),c=l.childNodes.length+1,d=new m,u=Object.assign({},"xaxis"===o?d.xAxisAnnotation:"yaxis"===o?d.yAxisAnnotation:d.pointAnnotation),p=h.extend(u,e);switch(o){case"xaxis":this.addXaxisAnnotation(p,l,c);break;case"yaxis":this.addYaxisAnnotation(p,l,c);break;case"point":this.addPointAnnotation(p,l,c)}var f=a.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(c,"']")),g=this.addBackgroundToAnno(f,p);return g&&l.insertBefore(g.node,f),i&&a.globals.memory.methodsToExec.push({context:s,method:r,params:e}),n}}]),t}(),y=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return n(t,[{key:"isValidDate",value:function(t){return!isNaN(this.parseDate(t))}},{key:"getUTCTimeStamp",value:function(t){return Date.parse(t)?new Date(new Date(t).toISOString().substr(0,25)).getTime():t}},{key:"parseDate",value:function(t){var e=Date.parse(t);if(!isNaN(e))return this.getUTCTimeStamp(t);var i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getUTCTimeStamp(i)}},{key:"treatAsUtc",value:function(t){var e=new Date(t);return e.setMinutes(e.getMinutes()-e.getTimezoneOffset()),e}},{key:"formatDate",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.w.globals.locale,r=["\0"].concat(d(o.months)),s=[""].concat(d(o.shortMonths)),a=[""].concat(d(o.days)),l=[""].concat(d(o.shortDays));function c(t,e){var i=t+"";for(e=e||2;i.length<e;)i="0"+i;return i}n&&(t=this.treatAsUtc(t));var h=i?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+h)).replace(/(^|[^\\])yy/g,"$1"+h.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+h);var u=(i?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+r[0])).replace(/(^|[^\\])MMM/g,"$1"+s[0])).replace(/(^|[^\\])MM/g,"$1"+c(u))).replace(/(^|[^\\])M/g,"$1"+u);var p=i?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+a[0])).replace(/(^|[^\\])ddd/g,"$1"+l[0])).replace(/(^|[^\\])dd/g,"$1"+c(p))).replace(/(^|[^\\])d/g,"$1"+p);var f=i?t.getUTCHours():t.getHours(),g=f>12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+c(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+c(g))).replace(/(^|[^\\])h/g,"$1"+g);var m=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+c(m))).replace(/(^|[^\\])m/g,"$1"+m);var v=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+c(v))).replace(/(^|[^\\])s/g,"$1"+v);var y=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+c(y,3)),y=Math.round(y/10),e=e.replace(/(^|[^\\])ff/g,"$1"+c(y)),y=Math.round(y/10);var b=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+y)).replace(/(^|[^\\])TT+/g,"$1"+b)).replace(/(^|[^\\])T/g,"$1"+b.charAt(0));var x=b.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+x)).replace(/(^|[^\\])t/g,"$1"+x.charAt(0));var w=-t.getTimezoneOffset(),S=i||!w?"Z":w>0?"+":"-";if(!i){var C=(w=Math.abs(w))%60;S+=c(Math.floor(w/60))+":"+c(C)}e=e.replace(/(^|[^\\])K/g,"$1"+S);var k=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(a[0],"g"),a[k])).replace(new RegExp(l[0],"g"),l[k])).replace(new RegExp(r[0],"g"),r[u])).replace(new RegExp(s[0],"g"),s[u])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var n=new Date(t).getFullYear(),o=new Date(e).getFullYear(),r=new Date(t).getMonth(),s=new Date(e).getMonth(),a=new Date(t).getDate(),l=new Date(e).getDate(),c=new Date(t).getHours(),d=new Date(e).getHours();return{minMinute:new Date(t).getMinutes(),maxMinute:new Date(e).getMinutes(),minHour:c,maxHour:d,minDate:a,maxDate:l,minMonth:r,maxMonth:s,minYear:n,maxYear:o}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var n=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&n++,n}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=h.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),b=function(){function t(i){e(this,t),this.opts=i}return n(t,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.opts.yaxis[0].labels.show=!1,this.opts.yaxis[0].floating=!0,h.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]}},stroke:{width:0},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1},xaxis:{tooltip:{enabled:!1},crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){return{stroke:{width:1,colors:["#0e1726"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var e=t.seriesIndex,i=t.dataPointIndex,n=t.w;return'<div class="apexcharts-tooltip-candlestick"><div>Open: <span class="value">'+n.globals.seriesCandleO[e][i]+'</span></div><div>High: <span class="value">'+n.globals.seriesCandleH[e][i]+'</span></div><div>Low: <span class="value">'+n.globals.seriesCandleL[e][i]+'</span></div><div>Close: <span class="value">'+n.globals.seriesCandleC[e][i]+"</span></div></div>"}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,n=e.dataPointIndex,o=e.w,r=o.globals.seriesRangeStart[i][n];return o.globals.seriesRangeEnd[i][n]-r},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(t){var e=t.ctx,i=t.seriesIndex,n=t.dataPointIndex,o=t.w,r=o.globals.seriesRangeStart[i][n],s=o.globals.seriesRangeEnd[i][n],a="",l="",c=o.globals.colors[i];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var d=new y(e);a=d.formatDate(new Date(r),o.config.tooltip.x.format,!0,!0),l=d.formatDate(new Date(s),o.config.tooltip.x.format,!0,!0)}else a=r,l=s;else a=o.config.tooltip.x.formatter(r),l=o.config.tooltip.x.formatter(s);var h=o.globals.labels[n];return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+c+'">'+(o.config.series[i].name?o.config.series[i].name:"")+'</span></div><div> <span class="category">'+h+': </span> <span class="value start-value">'+a+'</span> <span class="separator">-</span> <span class="value end-value">'+l+"</span></div></div>"}},xaxis:{tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(t){return h.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(){var t=this;this.opts.dataLabels=this.opts.dataLabels||{},this.opts.dataLabels.formatter=this.opts.dataLabels.formatter||void 0;var e=this.opts.dataLabels.formatter;this.opts.yaxis.forEach((function(e,i){t.opts.yaxis[i].min=0,t.opts.yaxis[i].max=100})),"bar"===this.opts.chart.type&&(this.opts.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t})}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:2,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"dark",shadeIntensity:.35,inverseColors:!1,stops:[0,100,100]}},padding:{right:0,left:0},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"vertical",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},padding:{right:0,left:0},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.style.fontSize="13px",this.opts.yaxis[0].labels.offsetY=6,{dataLabels:{enabled:!0,style:{colors:["#a8a8a8"],fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},padding:{right:0,left:0},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}}],[{key:"convertCatToNumeric",value:function(t){t.xaxis.type="numeric",t.xaxis.convertedCatToNumeric=!0,t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return t},t.chart=t.chart||{},t.chart.zoom=t.chart.zoom||window.Apex.chart&&window.Apex.chart.zoom||{};var e=t.xaxis.labels.formatter,i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(t.xaxis.labels.formatter=function(t){return e(i[t-1])}),t.xaxis.categories=[],t.labels=[],t.chart.zoom.enabled=t.chart.zoom.enabled||!1,t}}]),t}(),x=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"getStackedSeriesTotals",value:function(){for(var t=this.w,e=[],i=0;i<t.globals.series[t.globals.maxValsInArrayIndex].length;i++){for(var n=0,o=0;o<t.globals.series.length;o++)n+=t.globals.series[o][i];e.push(n)}return t.globals.stackedSeriesTotals=e,e}},{key:"getSeriesTotalByIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"isSeriesNull",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.globals.series[t].filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var n=0;n<t.length;n++)i+=t[n];else i+=t;return i}))}},{key:"getSeriesTotalsXRange",value:function(t,e){var i=this.w;return i.globals.series.map((function(n,o){for(var r=0,s=0;s<n.length;s++)i.globals.seriesX[o][s]>t&&i.globals.seriesX[o][s]<e&&(r+=n[s]);return r}))}},{key:"getPercentSeries",value:function(){var t=this.w;t.globals.seriesPercent=t.globals.series.map((function(e,i){var n=[];if(Array.isArray(e))for(var o=0;o<e.length;o++){var r=t.globals.stackedSeriesTotals[o],s=100*e[o]/r;n.push(s)}else{var a=100*e/t.globals.seriesTotals.reduce((function(t,e){return t+e}),0);n.push(a)}return n}))}},{key:"getCalculatedRatios",value:function(){var t,e,i,n,o,r=this.w.globals,s=[],a=[],l=.1,c=0;if(r.yRange=[],r.isMultipleYAxis)for(var d=0;d<r.minYArr.length;d++)r.yRange.push(Math.abs(r.minYArr[d]-r.maxYArr[d])),a.push(0);else r.yRange.push(Math.abs(r.minY-r.maxY));r.xRange=Math.abs(r.maxX-r.minX),r.zRange=Math.abs(r.maxZ-r.minZ);for(var h=0;h<r.yRange.length;h++)s.push(r.yRange[h]/r.gridHeight);if(e=r.xRange/r.gridWidth,i=Math.abs(r.initialmaxX-r.initialminX)/r.gridWidth,t=r.yRange/r.gridWidth,n=r.xRange/r.gridHeight,o=r.zRange/r.gridHeight*16,r.minY!==Number.MIN_VALUE&&0!==Math.abs(r.minY)&&(r.hasNegs=!0),r.isMultipleYAxis){a=[];for(var u=0;u<s.length;u++)a.push(-r.minYArr[u]/s[u])}else a.push(-r.minY/s[0]),r.minY!==Number.MIN_VALUE&&0!==Math.abs(r.minY)&&(l=-r.minY/t,c=r.minX/e);return{yRatio:s,invertedYRatio:t,zRatio:o,xRatio:e,initialXRatio:i,invertedXRatio:n,baseLineInvertedY:l,baseLineY:a,baseLineX:c}}},{key:"getLogSeries",value:function(t){var e=this.w;return e.globals.seriesLog=t.map((function(t,i){return e.config.yaxis[i]&&e.config.yaxis[i].logarithmic?t.map((function(t){return null===t?null:(Math.log(t)-Math.log(e.globals.minYArr[i]))/(Math.log(e.globals.maxYArr[i])-Math.log(e.globals.minYArr[i]))})):t})),e.globals.seriesLog}},{key:"getLogYRatios",value:function(t){var e=this,i=this.w,n=this.w.globals;return n.yLogRatio=t.slice(),n.logYRange=n.yRange.map((function(t,o){if(i.config.yaxis[o]&&e.w.config.yaxis[o].logarithmic){var r,s=-Number.MAX_VALUE,a=Number.MIN_VALUE;return n.seriesLog.forEach((function(t,e){t.forEach((function(t){i.config.yaxis[e]&&i.config.yaxis[e].logarithmic&&(s=Math.max(t,s),a=Math.min(t,a))}))})),r=Math.pow(n.yRange[o],Math.abs(a-s)/n.yRange[o]),n.yLogRatio[o]=r/n.gridHeight,r}})),n.yLogRatio}}],[{key:"checkComboSeries",value:function(t){var e=!1,i=!1;return t.length&&void 0!==t[0].type&&(e=!0,t.forEach((function(t){"bar"!==t.type&&"column"!==t.type||(i=!0)}))),{comboCharts:e,comboChartsHasBars:i}}},{key:"extendArrayProps",value:function(t,e){return e.yaxis&&(e=t.extendYAxis(e)),e.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),e.annotations.xaxis&&(e=t.extendXAxisAnnotations(e)),e.annotations.points&&(e=t.extendPointAnnotations(e))),e}}]),t}(),w=function(){function i(t){e(this,i),this.opts=t}return n(i,[{key:"init",value:function(){var e=this.opts,i=new m,n=new b(e);this.chartType=e.chart.type,"histogram"===this.chartType&&(e.chart.type="bar",e=h.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},e)),e.series=this.checkEmptySeries(e.series),e=this.extendYAxis(e),e=this.extendAnnotations(e);var o=i.init(),r={};if(e&&"object"===t(e)){var s={};switch(this.chartType){case"line":default:s=n.line();break;case"area":s=n.area();break;case"bar":case"histogram":s=n.bar();break;case"candlestick":s=n.candlestick();break;case"rangeBar":s=n.rangeBar();break;case"bubble":s=n.bubble();break;case"scatter":s=n.scatter();break;case"heatmap":s=n.heatmap();break;case"pie":s=n.pie();break;case"donut":s=n.donut();break;case"radar":s=n.radar();break;case"radialBar":s=n.radialBar()}e.chart.brush&&e.chart.brush.enabled&&(s=n.brush(s)),e.chart.stacked&&"100%"===e.chart.stackType&&n.stacked100(),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(e),e.xaxis=e.xaxis||window.Apex.xaxis||{};var a=x.checkComboSeries(e.series);"line"!==e.chart.type&&"area"!==e.chart.type&&"scatter"!==e.chart.type||a.comboChartsHasBars||"datetime"===e.xaxis.type||"numeric"===e.xaxis.type||"between"===e.xaxis.tickPlacement||(e=b.convertCatToNumeric(e)),(e.chart.sparkline&&e.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(s=n.sparkline(s)),r=h.extend(o,s)}var l=h.extend(r,window.Apex);return o=h.extend(l,e),this.handleUserInputErrors(o)}},{key:"extendYAxis",value:function(t){var e=new m;return void 0===t.yaxis&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=h.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[h.extend(e.yAxis,t.yaxis)]:t.yaxis=h.extendArray(t.yaxis,e.yAxis),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new m;return t.annotations.yaxis=h.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new m;return t.annotations.xaxis=h.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new m;return t.annotations.points=h.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"checkEmptySeries",value:function(t){return 0===t.length?[{data:[]}]:t}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(e.chart.scroller&&console.warn("Scroller has been deprecated since v2.0.0. Please remove the configuration for chart.scroller"),("bar"===e.chart.type||"rangeBar"===e.chart.type)&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&("barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(console.warn('crosshairs.width = "barWidth" is only supported in single series, not in a multi-series barChart.'),e.xaxis.crosshairs.width="tickWidth"),e.plotOptions.bar.horizontal&&(e.states.hover.type="none",e.tooltip.shared=!1),e.tooltip.followCursor||(console.warn("followCursor option in shared columns cannot be turned off. Please set %ctooltip.followCursor: true","color: blue;"),e.tooltip.followCursor=!0)),"candlestick"===e.chart.type&&e.yaxis[0].reversed&&(console.warn("Reversed y-axis in candlestick chart is not supported."),e.yaxis[0].reversed=!1),e.chart.group&&0===e.yaxis[0].labels.minWidth&&console.warn("It looks like you have multiple charts in synchronization. You must provide yaxis.labels.minWidth which must be EQUAL for all grouped charts to prevent incorrect behaviour."),Array.isArray(e.stroke.width)&&"line"!==e.chart.type&&"area"!==e.chart.type&&(console.warn("stroke.width option accepts array only for line and area charts. Reverted back to Number"),e.stroke.width=e.stroke.width[0]),e}}]),i}(),S=function(){function t(){e(this,t)}return n(t,[{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,initialConfig:null,lastXAxis:[],lastYAxis:[],series:[],seriesRangeStart:[],seriesRangeEnd:[],seriesPercent:[],seriesTotals:[],stackedSeriesTotals:[],seriesX:[],seriesZ:[],labels:[],timelineLabels:[],invertedTimelineLabels:[],seriesNames:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,selectedDataPoints:[],ignoreYAxisIndexes:[],padHorizontal:0,maxValsInArrayIndex:0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,minY:Number.MIN_VALUE,maxY:-Number.MAX_VALUE,minYArr:[],maxYArr:[],maxX:-Number.MAX_VALUE,initialmaxX:-Number.MAX_VALUE,minX:Number.MIN_VALUE,initialminX:Number.MIN_VALUE,minZ:Number.MIN_VALUE,maxZ:-Number.MAX_VALUE,minXDiff:Number.MAX_VALUE,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yRange:[],zRange:0,xRange:0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,delayedElements:[],axisCharts:!0,isXNumeric:!1,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,comboChartsHasBars:!1,dataChanged:!1,previousPaths:[],seriesXvalues:[],seriesYvalues:[],seriesCandleO:[],seriesCandleH:[],seriesCandleL:[],seriesCandleC:[],allSeriesHasEqualX:!0,dataPoints:0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,yAxisScale:[],xAxisScale:null,xAxisTicksPositions:[],timescaleTicks:[],rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yLabelsCoords:[],yTitleCoords:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,tooltipOpts:null}}},{key:"init",value:function(t){var e=this.globalVars(t);return e.initialConfig=h.extend({},t),e.initialSeries=JSON.parse(JSON.stringify(e.initialConfig.series)),e.lastXAxis=JSON.parse(JSON.stringify(e.initialConfig.xaxis)),e.lastYAxis=JSON.parse(JSON.stringify(e.initialConfig.yaxis)),e}}]),t}(),C=function(){function t(i){e(this,t),this.opts=i}return n(t,[{key:"init",value:function(){var t=new w(this.opts).init();return{config:t,globals:(new S).init(t)}}}]),t}(),k=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.opts=null,this.seriesIndex=0}return n(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,n=parseInt(e.globals.gridWidth),o=parseInt(e.globals.gridHeight),r=n>o?n:o,s=t.image,a=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(a=i.fill.image.width+1,l=i.fill.image.height):(a=r+1,l=r):(a=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");f.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:a+"px",height:l+"px"});var d=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS("http://www.w3.org/1999/xlink","href",s),f.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:a+"px",height:l+"px"}),d.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w;return"bar"===e.config.chart.type&&e.config.plotOptions.bar.distributed||"heatmap"===e.config.chart.type?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t){var e=this.w;this.opts=t;var i,n,o,r=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var s=this.getFillColors(),a=s[this.seriesIndex];"function"==typeof a&&(a=a({seriesIndex:this.seriesIndex,value:t.value,w:e}));var l=this.getFillType(this.seriesIndex),c=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity,d=a;return t.color&&(a=t.color),-1===a.indexOf("rgb")?d=h.hexToRgba(a,c):a.indexOf("rgba")>-1&&(c="0."+h.getOpacityFromRGBA(s[this.seriesIndex])),"pattern"===l&&(n=this.handlePatternFill(n,a,c,d)),"gradient"===l&&(o=this.handleGradientFill(o,a,c,this.seriesIndex)),r.fill.image.src.length>0&&"image"===l?t.seriesNumber<r.fill.image.src.length?(this.clippedImgArea({opacity:c,image:r.fill.image.src[t.seriesNumber],patternUnits:t.patternUnits,patternID:"pattern".concat(e.globals.cuid).concat(t.seriesNumber+1)}),i="url(#pattern".concat(e.globals.cuid).concat(t.seriesNumber+1,")")):i=d:i="gradient"===l?o:"pattern"===l?n:d,t.solid&&(i=d),i}},{key:"getFillType",value:function(t){var e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}},{key:"getFillColors",value:function(){var t=this.w,e=t.config,i=this.opts,n=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?t.globals.stroke.colors instanceof Array?n=t.globals.stroke.colors:n.push(t.globals.stroke.colors):t.globals.fill.colors instanceof Array?n=t.globals.fill.colors:n.push(t.globals.fill.colors):"line"===e.chart.type?t.globals.stroke.colors instanceof Array?n=t.globals.stroke.colors:n.push(t.globals.stroke.colors):t.globals.fill.colors instanceof Array?n=t.globals.fill.colors:n.push(t.globals.fill.colors),void 0!==i.fillColors&&(n=[],i.fillColors instanceof Array?n=i.fillColors.slice():n.push(i.fillColors)),n}},{key:"handlePatternFill",value:function(t,e,i,n){var o=this.w.config,r=this.opts,s=new f(this.ctx),a=void 0===o.fill.pattern.strokeWidth?Array.isArray(o.stroke.width)?o.stroke.width[this.seriesIndex]:o.stroke.width:Array.isArray(o.fill.pattern.strokeWidth)?o.fill.pattern.strokeWidth[this.seriesIndex]:o.fill.pattern.strokeWidth,l=e;return o.fill.pattern.style instanceof Array?void 0!==o.fill.pattern.style[r.seriesNumber]?s.drawPattern(o.fill.pattern.style[r.seriesNumber],o.fill.pattern.width,o.fill.pattern.height,l,a,i):n:s.drawPattern(o.fill.pattern.style,o.fill.pattern.width,o.fill.pattern.height,l,a,i)}},{key:"handleGradientFill",value:function(t,e,i,n){var o,r,s=this.w.config,a=this.opts,l=new f(this.ctx),c=new h,d=s.fill.gradient.type,u=void 0===s.fill.gradient.opacityFrom?i:Array.isArray(s.fill.gradient.opacityFrom)?s.fill.gradient.opacityFrom[n]:s.fill.gradient.opacityFrom,p=void 0===s.fill.gradient.opacityTo?i:Array.isArray(s.fill.gradient.opacityTo)?s.fill.gradient.opacityTo[n]:s.fill.gradient.opacityTo;if(o=e,r=void 0===s.fill.gradient.gradientToColors||0===s.fill.gradient.gradientToColors.length?"dark"===s.fill.gradient.shade?c.shadeColor(-1*parseFloat(s.fill.gradient.shadeIntensity),e):c.shadeColor(parseFloat(s.fill.gradient.shadeIntensity),e):s.fill.gradient.gradientToColors[a.seriesNumber],s.fill.gradient.inverseColors){var g=o;o=r,r=g}return l.drawGradient(d,o,r,u,p,a.size,s.fill.gradient.stops,s.fill.gradient.colorStops,n)}}]),t}(),_=function(){function t(i,n){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.globals.series.length+1)for(var e=0;e<=t.globals.series.length;e++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map((function(e){return t.config.markers.size}))}},{key:"plotChartMarkers",value:function(t,e,i){var n,o=this,r=this.w,s=e,a=t,l=null,c=new f(this.ctx);if(r.globals.markers.size[e]>0&&(l=c.group({class:"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),a.x instanceof Array)for(var d=function(t){var d=i;1===i&&0===t&&(d=0),1===i&&1===t&&(d=1);var p="apexcharts-marker";if("line"!==r.config.chart.type&&"area"!==r.config.chart.type||r.globals.comboCharts||r.config.tooltip.intersect||(p+=" no-pointer-events"),Array.isArray(r.config.markers.size)?r.globals.markers.size[e]>0:r.config.markers.size>0){h.isNumber(a.y[t])?p+=" w".concat((Math.random()+1).toString(36).substring(4)):p="apexcharts-nullpoint";var f=o.getMarkerConfig(p,e);r.config.markers.discrete.map((function(t){t.seriesIndex===e&&t.dataPointIndex===d&&(f.pointStrokeColor=t.strokeColor,f.pointFillColor=t.fillColor,f.pSize=t.size)})),r.config.series[s].data[i]&&(r.config.series[s].data[i].fillColor&&(f.pointFillColor=r.config.series[s].data[i].fillColor),r.config.series[s].data[i].strokeColor&&(f.pointStrokeColor=r.config.series[s].data[i].strokeColor)),(n=c.drawMarker(a.x[t],a.y[t],f)).attr("rel",d),n.attr("j",d),n.attr("index",e),n.node.setAttribute("default-marker-size",f.pSize),new u(o.ctx).setSelectionFilter(n,e,d),o.addEvents(n),l&&l.add(n)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([a.x[t],a.y[t]])},p=0;p<a.x.length;p++)d(p);return l}},{key:"getMarkerConfig",value:function(t,e){var i=this.w,n=this.getMarkerStyle(e);return{pSize:i.globals.markers.size[e],pRadius:i.config.markers.radius,pWidth:i.config.markers.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:i.config.markers.shape instanceof Array?i.config.markers.shape[e]:i.config.markers.shape,class:t,pointStrokeOpacity:i.config.markers.strokeOpacity,pointFillOpacity:i.config.markers.fillOpacity,seriesIndex:e}}},{key:"addEvents",value:function(t){var e=new f(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("touchstart",e.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,n=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:n instanceof Array?n[t]:n,pointFillColor:i instanceof Array?i[t]:i}}}]),t}(),T=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.radiusSizes=[]}return n(t,[{key:"draw",value:function(t,e,i){var n=this.w,o=new f(this.ctx),r=i.realIndex,s=i.pointsPos,a=i.zRatio,l=i.elParent,c=o.group({class:"apexcharts-series-markers apexcharts-series-".concat(n.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),s.x instanceof Array)for(var d=0;d<s.x.length;d++){var h=e+1,u=!0;0===e&&0===d&&(h=0),0===e&&1===d&&(h=1);var p=0,g=n.globals.markers.size[r];a!==1/0&&(g=n.globals.seriesZ[r][h]/a,void 0===this.radiusSizes[r]&&this.radiusSizes.push([]),this.radiusSizes[r].push(g)),n.config.chart.animations.enabled||(p=g);var m=s.x[d],v=s.y[d];if(p=p||0,(0===m&&0===v||null===v||void 0===n.globals.series[r][h])&&(u=!1),u){var y=this.drawPoint(m,v,p,g,r,h,e);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(t,e,i,n,o,r,s){var a=this.w,l=o,c=new p(this.ctx),d=new u(this.ctx),h=new k(this.ctx),g=new _(this.ctx),m=new f(this.ctx),v=g.getMarkerConfig("apexcharts-marker",l),y=h.fillPath({seriesNumber:o,patternUnits:"objectBoundingBox",value:a.globals.series[o][s]}),b=m.drawCircle(i);if(a.config.series[l].data[r]&&a.config.series[l].data[r].fillColor&&(y=a.config.series[l].data[r].fillColor),b.attr({cx:t,cy:e,fill:y,stroke:v.pointStrokeColor,strokeWidth:v.pWidth}),a.config.chart.dropShadow.enabled){var x=a.config.chart.dropShadow;d.dropShadow(b,x,o)}if(this.initialAnim&&!a.globals.dataChanged){var w=1;a.globals.resized||(w=a.config.chart.animations.speed),c.animateCircleRadius(b,0,n,w,a.globals.easing)}if(a.globals.dataChanged)if(this.dynamicAnim){var S,C,T,D,E=a.config.chart.animations.dynamicAnimation.speed;null!=(D=a.globals.previousPaths[o]&&a.globals.previousPaths[o][s])&&(S=D.x,C=D.y,T=void 0!==D.r?D.r:n);for(var A=0;A<a.globals.collapsedSeries.length;A++)a.globals.collapsedSeries[A].index===o&&(E=1,n=0);0===t&&0===e&&(n=0),c.animateCircle(b,{cx:S,cy:C,r:T},{cx:t,cy:e,r:n},E,a.globals.easing)}else b.attr({r:n});return b.attr({rel:r,j:r,index:o,"default-marker-size":n}),d.setSelectionFilter(b,o,r),g.addEvents(b),b.node.classList.add("apexcharts-marker"),b}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize)/4}}}]),t}(),D=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"dataLabelsCorrection",value:function(t,e,i,n,o,r,s){var a=this.w,l=!1,c=new f(this.ctx).getTextRects(i,s),d=c.width,h=c.height;void 0===a.globals.dataLabelsRects[n]&&(a.globals.dataLabelsRects[n]=[]),a.globals.dataLabelsRects[n].push({x:t,y:e,width:d,height:h});var u=a.globals.dataLabelsRects[n].length-2,p=void 0!==a.globals.lastDrawnDataLabelsIndexes[n]?a.globals.lastDrawnDataLabelsIndexes[n][a.globals.lastDrawnDataLabelsIndexes[n].length-1]:0;if(void 0!==a.globals.dataLabelsRects[n][u]){var g=a.globals.dataLabelsRects[n][p];(t>g.x+g.width+2||e>g.y+g.height+2||t+d<g.x)&&(l=!0)}return(0===o||r)&&(l=!0),{x:t,y:e,drawnextLabel:l}}},{key:"drawDataLabel",value:function(t,e,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"top",o=this.w,r=new f(this.ctx),s=o.config.dataLabels,a=0,l=0,c=i,d=null;if(!s.enabled||t.x instanceof Array!=1)return d;(d=r.group({class:"apexcharts-data-labels"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")"));for(var h=0;h<t.x.length;h++)if(a=t.x[h]+s.offsetX,l=t.y[h]+s.offsetY-o.globals.markers.size[e]-5,"bottom"===n&&(l=l+2*o.globals.markers.size[e]+1.4*parseInt(s.style.fontSize)),!isNaN(a)){1===i&&0===h&&(c=0),1===i&&1===h&&(c=1);var u=o.globals.series[e][c],p="";"bubble"===o.config.chart.type?(p=o.globals.seriesZ[e][c],l=t.y[h]+o.config.dataLabels.offsetY,l=new T(this.ctx).centerTextInBubble(l,e,c).y):null!=u&&(p=o.config.dataLabels.formatter(u,{ctx:this.ctx,seriesIndex:e,dataPointIndex:c,w:o})),this.plotDataLabelsText({x:a,y:l,text:p,i:e,j:c,parent:d,offsetCorrection:!0,dataLabelsConfig:o.config.dataLabels})}return d}},{key:"plotDataLabelsText",value:function(t){var e=this.w,i=new f(this.ctx),n=t.x,o=t.y,r=t.i,s=t.j,a=t.text,l=t.textAnchor,c=t.parent,d=t.dataLabelsConfig,h=t.alwaysDrawDataLabel,p=t.offsetCorrection;if(!(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(r)>-1)){var g={x:n,y:o,drawnextLabel:!0};if(p&&(g=this.dataLabelsCorrection(n,o,a,r,s,h,parseInt(d.style.fontSize))),e.globals.zoomed||(n=g.x,o=g.y),g.drawnextLabel){var m=i.drawText({width:100,height:parseInt(d.style.fontSize),x:n,y:o,foreColor:e.globals.dataLabels.style.colors[r],textAnchor:l||d.textAnchor,text:a,fontSize:d.style.fontSize,fontFamily:d.style.fontFamily});if(m.attr({class:"apexcharts-datalabel",cx:n,cy:o}),d.dropShadow.enabled){var v=d.dropShadow;new u(this.ctx).dropShadow(m,v)}c.add(m),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(s)}}}}]),t}(),E=function(){function t(i,n){e(this,t),this.ctx=i,this.w=i.w;var o=this.w;this.barOptions=o.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=o.config.stroke.width,this.isNullValue=!1,this.xyRatios=n,null!==this.xyRatios&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0}return n(t,[{key:"draw",value:function(t,e){var i=this.w,n=new f(this.ctx),o=new x(this.ctx,i);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.initVariables(t);var r=n.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>i.config.plotOptions.bar.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var s=0,a=0;s<t.length;s++,a++){var l,c,d,u,p=void 0,g=void 0,m=void 0,v=void 0,y=[],b=[],w=i.globals.comboCharts?e[s]:s,S=n.group({class:"apexcharts-series",rel:s+1,seriesName:h.escapeString(i.globals.seriesNames[w]),"data:realIndex":w});this.ctx.series.addCollapsedClassToSeries(S,w),t[s].length>0&&(this.visibleI=this.visibleI+1);var C=0,k=0,_=0;this.yRatio.length>1&&(this.yaxisIndex=w),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var T=this.initialPositions();v=T.y,k=T.barHeight,c=T.yDivision,u=T.zeroW,m=T.x,_=T.barWidth,l=T.xDivision,d=T.zeroH,this.horizontal||b.push(m+_/2);for(var D=n.group({class:"apexcharts-datalabels"}),E=0,A=i.globals.dataPoints;E<i.globals.dataPoints;E++,A--){void 0===this.series[s][E]||null===t[s][E]?this.isNullValue=!0:this.isNullValue=!1,i.config.stroke.show&&(C=this.isNullValue?0:Array.isArray(this.strokeWidth)?this.strokeWidth[w]:this.strokeWidth);var I=null;this.isHorizontal?(I=this.drawBarPaths({indexes:{i:s,j:E,realIndex:w,bc:a},barHeight:k,strokeWidth:C,pathTo:p,pathFrom:g,zeroW:u,x:m,y:v,yDivision:c,elSeries:S}),_=this.series[s][E]/this.invertedYRatio):(I=this.drawColumnPaths({indexes:{i:s,j:E,realIndex:w,bc:a},x:m,y:v,xDivision:l,pathTo:p,pathFrom:g,barWidth:_,zeroH:d,strokeWidth:C,elSeries:S}),k=this.series[s][E]/this.yRatio[this.yaxisIndex]),p=I.pathTo,g=I.pathFrom,v=I.y,m=I.x,E>0&&b.push(m+_/2),y.push(v);var P=this.getPathFillColor(t,s,E,w);S=this.renderSeries({realIndex:w,pathFill:P,j:E,i:s,pathFrom:g,pathTo:p,strokeWidth:C,elSeries:S,x:m,y:v,series:t,barHeight:k,barWidth:_,elDataLabelsWrap:D,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[w]=b,i.globals.seriesYvalues[w]=y,r.add(S)}return r}},{key:"getPathFillColor",value:function(t,e,i,n){var o=this.w,r=new k(this.ctx),s=null,a=this.barOptions.distributed?i:e;return this.barOptions.colors.ranges.length>0&&this.barOptions.colors.ranges.map((function(n){t[e][i]>=n.from&&t[e][i]<=n.to&&(s=n.color)})),o.config.series[e].data[i]&&o.config.series[e].data[i].fillColor&&(s=o.config.series[e].data[i].fillColor),r.fillPath({seriesNumber:this.barOptions.distributed?a:n,color:s,value:t[e][i]})}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,n=t.lineFill,o=t.j,r=t.i,s=t.pathFrom,a=t.pathTo,l=t.strokeWidth,c=t.elSeries,d=t.x,h=t.y,p=t.series,g=t.barHeight,m=t.barWidth,v=t.elDataLabelsWrap,y=t.visibleSeries,b=t.type,x=this.w,w=new f(this.ctx);n||(n=this.barOptions.distributed?x.globals.stroke.colors[o]:x.globals.stroke.colors[e]),x.config.series[r].data[o]&&x.config.series[r].data[o].strokeColor&&(n=x.config.series[r].data[o].strokeColor),this.isNullValue&&(i="none");var S=o/x.config.chart.animations.animateGradually.delay*(x.config.chart.animations.speed/x.globals.dataPoints)/2.4,C=w.renderPaths({i:r,j:o,realIndex:e,pathFrom:s,pathTo:a,stroke:n,strokeWidth:l,strokeLineCap:x.config.stroke.lineCap,fill:i,animationDelay:S,initialSpeed:x.config.chart.animations.speed,dataChangeSpeed:x.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(b,"-area"),id:"apexcharts-".concat(b,"-area")});C.attr("clip-path","url(#gridRectMask".concat(x.globals.cuid,")")),new u(this.ctx).setSelectionFilter(C,e,o),c.add(C);var k=this.calculateDataLabelsPos({x:d,y:h,i:r,j:o,series:p,realIndex:e,barHeight:g,barWidth:m,renderedPath:C,visibleSeries:y});return null!==k&&v.add(k),c.add(v),c}},{key:"initVariables",value:function(t){var e=this.w;this.series=t,this.totalItems=0,this.seriesLen=0,this.visibleI=-1,this.visibleItems=1;for(var i=0;i<t.length;i++)if(t[i].length>0&&(this.seriesLen=this.seriesLen+1,this.totalItems+=t[i].length),e.globals.isXNumeric)for(var n=0;n<t[i].length;n++)e.globals.seriesX[i][n]>e.globals.minX&&e.globals.seriesX[i][n]<e.globals.maxX&&this.visibleItems++;else this.visibleItems=e.globals.dataPoints;0===this.seriesLen&&(this.seriesLen=1)}},{key:"initialPositions",value:function(){var t,e,i,n,o,r,s,a,l=this.w;return this.isHorizontal?(o=(i=l.globals.gridHeight/l.globals.dataPoints)/this.seriesLen,l.globals.isXNumeric&&(o=(i=l.globals.gridHeight/this.totalItems)/this.seriesLen),o=o*parseInt(this.barOptions.barHeight)/100,a=this.baseLineInvertedY+l.globals.padHorizontal+(this.isReversed?l.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),e=(i-o*this.seriesLen)/2):(r=(n=l.globals.gridWidth/this.visibleItems)/this.seriesLen*parseInt(this.barOptions.columnWidth)/100,l.globals.isXNumeric&&(r=(n=l.globals.minXDiff/this.xRatio)/this.seriesLen*parseInt(this.barOptions.columnWidth)/100),s=l.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?l.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),t=l.globals.padHorizontal+(n-r*this.seriesLen)/2),{x:t,y:e,yDivision:i,xDivision:n,barHeight:o,barWidth:r,zeroH:s,zeroW:a}}},{key:"drawBarPaths",value:function(t){var e=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.pathTo,r=t.pathFrom,s=t.zeroW,a=t.x,l=t.y,c=t.yDivision,d=t.elSeries,h=this.w,u=new f(this.ctx),p=e.i,g=e.j,m=e.realIndex,v=e.bc;h.globals.isXNumeric&&(l=(h.globals.seriesX[p][g]-h.globals.minX)/this.invertedXRatio-i);var y=l+i*this.visibleI;o=u.move(s,y),r=u.move(s,y),h.globals.previousPaths.length>0&&(r=this.getPathFrom(m,g));var b={barHeight:i,strokeWidth:n,barYPosition:y,x:a=void 0===this.series[p][g]||null===this.series[p][g]?s:s+this.series[p][g]/this.invertedYRatio-2*(this.isReversed?this.series[p][g]/this.invertedYRatio:0),zeroW:s},x=this.barEndingShape(h,b,this.series,p,g);if(o=o+u.line(x.newX,y)+x.path+u.line(s,y+i-n)+u.line(s,y),r=r+u.line(s,y)+x.ending_p_from+u.line(s,y+i-n)+u.line(s,y+i-n)+u.line(s,y),h.globals.isXNumeric||(l+=c),this.barOptions.colors.backgroundBarColors.length>0&&0===p){v>=this.barOptions.colors.backgroundBarColors.length&&(v=0);var w=this.barOptions.colors.backgroundBarColors[v],S=u.drawRect(0,y-i*this.visibleI,h.globals.gridWidth,i*this.seriesLen,0,w,this.barOptions.colors.backgroundBarOpacity);d.add(S),S.node.classList.add("apexcharts-backgroundBar")}return{pathTo:o,pathFrom:r,x:a,y:l,barYPosition:y}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,n=t.y,o=t.xDivision,r=t.pathTo,s=t.pathFrom,a=t.barWidth,l=t.zeroH,c=t.strokeWidth,d=t.elSeries,h=this.w,u=new f(this.ctx),p=e.i,g=e.j,m=e.realIndex,v=e.bc;h.globals.isXNumeric&&(i=(h.globals.seriesX[p][g]-h.globals.minX)/this.xRatio-a/2);var y=i+a*this.visibleI;r=u.move(y,l),s=u.move(y,l),h.globals.previousPaths.length>0&&(s=this.getPathFrom(m,g));var b={barWidth:a,strokeWidth:c,barXPosition:y,y:n=void 0===this.series[p][g]||null===this.series[p][g]?l:l-this.series[p][g]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[p][g]/this.yRatio[this.yaxisIndex]:0),zeroH:l},x=this.barEndingShape(h,b,this.series,p,g);if(r=r+u.line(y,x.newY)+x.path+u.line(y+a-c,l)+u.line(y-c/2,l),s=s+u.line(y,l)+x.ending_p_from+u.line(y+a-c,l)+u.line(y+a-c,l)+u.line(y-c/2,l),h.globals.isXNumeric||(i+=o),this.barOptions.colors.backgroundBarColors.length>0&&0===p){v>=this.barOptions.colors.backgroundBarColors.length&&(v=0);var w=this.barOptions.colors.backgroundBarColors[v],S=u.drawRect(y-a*this.visibleI,0,a*this.seriesLen,h.globals.gridHeight,0,w,this.barOptions.colors.backgroundBarOpacity);d.add(S),S.node.classList.add("apexcharts-backgroundBar")}return{pathTo:r,pathFrom:s,x:i,y:n,barXPosition:y}}},{key:"getPathFrom",value:function(t,e){for(var i,n=this.w,o=0;o<n.globals.previousPaths.length;o++){var r=n.globals.previousPaths[o];r.paths.length>0&&parseInt(r.realIndex)===parseInt(t)&&void 0!==n.globals.previousPaths[o].paths[e]&&(i=n.globals.previousPaths[o].paths[e].d)}return i}},{key:"calculateDataLabelsPos",value:function(t){var e=t.x,i=t.y,n=t.i,o=t.j,r=t.realIndex,s=t.series,a=t.barHeight,l=t.barWidth,c=t.visibleSeries,d=t.renderedPath,h=this.w,u=new f(this.ctx),p=Array.isArray(this.strokeWidth)?this.strokeWidth[r]:this.strokeWidth,g=e+parseFloat(l*c),m=i+parseFloat(a*c);h.globals.isXNumeric&&!h.globals.isBarHorizontal&&(g=e+parseFloat(l*(c+1))-p,m=i+parseFloat(a*(c+1))-p);var v,y=e,b=i,x=h.config.dataLabels,w=this.barOptions.dataLabels,S=x.offsetX,C=x.offsetY,k={width:0,height:0};return h.config.dataLabels.enabled&&(k=u.getTextRects(h.globals.yLabelFormatters[0](h.globals.maxY),parseInt(x.style.fontSize))),v=this.isHorizontal?this.calculateBarsDataLabelsPosition({x:e,y:i,i:n,j:o,renderedPath:d,bcy:m,barHeight:a,barWidth:l,textRects:k,strokeWidth:p,dataLabelsX:y,dataLabelsY:b,barDataLabelsConfig:w,offX:S,offY:C}):this.calculateColumnsDataLabelsPosition({x:e,y:i,i:n,j:o,renderedPath:d,realIndex:r,bcx:g,bcy:m,barHeight:a,barWidth:l,textRects:k,strokeWidth:p,dataLabelsY:b,barDataLabelsConfig:w,offX:S,offY:C}),d.attr({cy:v.bcy,cx:v.bcx,j:o,val:s[n][o],barHeight:a,barWidth:l}),this.drawCalculatedDataLabels({x:v.dataLabelsX,y:v.dataLabelsY,val:s[n][o],i:r,j:o,barWidth:l,barHeight:a,textRects:k,dataLabelsConfig:x})}},{key:"calculateColumnsDataLabelsPosition",value:function(t){var e,i=this.w,n=t.i,o=t.j,r=t.y,s=t.bcx,a=t.barWidth,l=t.barHeight,c=t.textRects,d=t.dataLabelsY,h=t.barDataLabelsConfig,u=t.strokeWidth,p=t.offX,f=t.offY,g=i.globals.gridWidth/i.globals.dataPoints;s-=u/2,e=i.globals.isXNumeric?s-a/2+p:s-g+a/2+p;var m=this.series[n][o]<=0;switch(this.isReversed&&(r-=l),h.position){case"center":d=m?r+l/2+c.height/2+f:r+l/2+c.height/2-f;break;case"bottom":d=m?r+l+c.height+u+f:r+l-c.height/2+u-f;break;case"top":d=m?r-c.height/2-f:r+c.height+f}return i.config.chart.stacked||(d<0?d=0+u:d+c.height/3>i.globals.gridHeight&&(d=i.globals.gridHeight-u)),{bcx:s,bcy:r,dataLabelsX:e,dataLabelsY:d}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,n=t.i,o=t.j,r=t.bcy,s=t.barHeight,a=t.barWidth,l=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,h=t.barDataLabelsConfig,u=t.offX,p=t.offY,f=r-e.globals.gridHeight/e.globals.dataPoints+s/2+l.height/2+p-3,g=this.series[n][o]<=0;switch(this.isReversed&&(i+=a),h.position){case"center":c=g?i-a/2-u:i-a/2+u;break;case"bottom":c=g?i-a-d-Math.round(l.width/2)-u:i-a+d+Math.round(l.width/2)+u;break;case"top":c=g?i-d+Math.round(l.width/2)-u:i-d-Math.round(l.width/2)+u}return e.config.chart.stacked||(c<0?c=c+l.width+d:c+l.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-l.width-d)),{bcx:i,bcy:r,dataLabelsX:c,dataLabelsY:f}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,n=t.val,o=t.i,r=t.j,s=t.textRects,a=t.barHeight,l=t.barWidth,c=t.dataLabelsConfig,d=this.w,h=new D(this.ctx),u=new f(this.ctx),p=c.formatter,g=null,m=d.globals.collapsedSeriesIndices.indexOf(o)>-1;if(c.enabled&&!m){g=u.group({class:"apexcharts-data-labels"});var v="";null!=n&&(v=p(n,{seriesIndex:o,dataPointIndex:r,w:d})),0===n&&d.config.chart.stacked&&(v=""),d.config.chart.stacked&&this.barOptions.dataLabels.hideOverflowingLabels&&(this.isHorizontal?(l=this.series[o][r]/this.yRatio[this.yaxisIndex],s.width/1.6>l&&(v="")):(a=this.series[o][r]/this.yRatio[this.yaxisIndex],s.height/1.6>a&&(v=""))),h.plotDataLabelsText({x:e,y:i,text:v,i:o,j:r,parent:g,dataLabelsConfig:c,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}},{key:"barEndingShape",value:function(t,e,i,n,o){var r=new f(this.ctx);if(this.isHorizontal){var s=null,a=e.x;if(void 0!==i[n][o]||null!==i[n][o]){var l=i[n][o]<0,c=e.barHeight/2-e.strokeWidth;switch(l&&(c=-e.barHeight/2-e.strokeWidth),t.config.chart.stacked||"rounded"===this.barOptions.endingShape&&(a=e.x-c/2),this.barOptions.endingShape){case"flat":s=r.line(a,e.barYPosition+e.barHeight-e.strokeWidth);break;case"rounded":s=r.quadraticCurve(a+c,e.barYPosition+(e.barHeight-e.strokeWidth)/2,a,e.barYPosition+e.barHeight-e.strokeWidth)}}return{path:s,ending_p_from:"",newX:a}}var d=null,h=e.y;if(void 0!==i[n][o]||null!==i[n][o]){var u=i[n][o]<0,p=e.barWidth/2-e.strokeWidth;switch(u&&(p=-e.barWidth/2-e.strokeWidth),t.config.chart.stacked||"rounded"===this.barOptions.endingShape&&(h+=p/2),this.barOptions.endingShape){case"flat":d=r.line(e.barXPosition+e.barWidth-e.strokeWidth,h);break;case"rounded":d=r.quadraticCurve(e.barXPosition+(e.barWidth-e.strokeWidth)/2,h-p,e.barXPosition+e.barWidth-e.strokeWidth,h)}}return{path:d,ending_p_from:"",newY:h}}}]),t}(),A=function(){function t(){return e(this,t),c(this,a(t).apply(this,arguments))}return s(t,E),n(t,[{key:"draw",value:function(t,e){var i=this.w;this.graphics=new f(this.ctx),this.fill=new k(this.ctx),this.bar=new E(this.ctx,this.xyRatios);var n=new x(this.ctx,i);t=n.getLogSeries(t),this.yRatio=n.getLogYRatios(this.yRatio),this.initVariables(t),"100%"===i.config.chart.stackType&&(t=i.globals.seriesPercent.slice()),this.series=t,this.totalItems=0,this.prevY=[],this.prevX=[],this.prevYF=[],this.prevXF=[],this.prevYVal=[],this.prevXVal=[],this.xArrj=[],this.xArrjF=[],this.xArrjVal=[],this.yArrj=[],this.yArrjF=[],this.yArrjVal=[];for(var o=0;o<t.length;o++)t[o].length>0&&(this.totalItems+=t[o].length);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),s=0,a=0,l=0,c=0;l<t.length;l++,c++){var d=void 0,u=void 0,p=void 0,g=void 0,m=void 0,v=void 0,y=[],b=[],w=i.globals.comboCharts?e[l]:l;this.yRatio.length>1&&(this.yaxisIndex=w),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var S=this.graphics.group({class:"apexcharts-series",seriesName:h.escapeString(i.globals.seriesNames[w]),rel:l+1,"data:realIndex":w}),C=this.graphics.group({class:"apexcharts-datalabels"}),_=0,T=0,D=0,A=this.initialPositions(s,a,p,g,m,v);a=A.y,T=A.barHeight,g=A.yDivision,v=A.zeroW,s=A.x,D=A.barWidth,p=A.xDivision,m=A.zeroH,this.yArrj=[],this.yArrjF=[],this.yArrjVal=[],this.xArrj=[],this.xArrjF=[],this.xArrjVal=[];for(var I=0;I<i.globals.dataPoints;I++){i.config.stroke.show&&(_=this.isNullValue?0:Array.isArray(this.strokeWidth)?this.strokeWidth[w]:this.strokeWidth);var P=null;this.isHorizontal?(P=this.drawBarPaths({indexes:{i:l,j:I,realIndex:w,bc:c},barHeight:T,strokeWidth:_,pathTo:d,pathFrom:u,zeroW:v,x:s,y:a,yDivision:g,elSeries:S}),D=this.series[l][I]/this.invertedYRatio):(P=this.drawColumnPaths({indexes:{i:l,j:I,realIndex:w,bc:c},x:s,y:a,xDivision:p,pathTo:d,pathFrom:u,barWidth:D,zeroH:m,strokeWidth:_,elSeries:S}),T=this.series[l][I]/this.yRatio[this.yaxisIndex]),d=P.pathTo,u=P.pathFrom,a=P.y,s=P.x,y.push(s),b.push(a);var M=this.bar.getPathFillColor(t,l,I,w);S=this.renderSeries({realIndex:w,pathFill:M,j:I,i:l,pathFrom:u,pathTo:d,strokeWidth:_,elSeries:S,x:s,y:a,series:t,barHeight:T,barWidth:D,elDataLabelsWrap:C,type:"bar",visibleSeries:0})}i.globals.seriesXvalues[w]=y,i.globals.seriesYvalues[w]=b,this.prevY.push(this.yArrj),this.prevYF.push(this.yArrjF),this.prevYVal.push(this.yArrjVal),this.prevX.push(this.xArrj),this.prevXF.push(this.xArrjF),this.prevXVal.push(this.xArrjVal),r.add(S)}return r}},{key:"initialPositions",value:function(t,e,i,n,o,r){var s,a,l=this.w;return this.isHorizontal?(s=(s=n=l.globals.gridHeight/l.globals.dataPoints)*parseInt(l.config.plotOptions.bar.barHeight)/100,r=this.baseLineInvertedY+l.globals.padHorizontal+(this.isReversed?l.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),e=(n-s)/2):(a=i=l.globals.gridWidth/l.globals.dataPoints,a=l.globals.isXNumeric?(i=l.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth)/100:a*parseInt(l.config.plotOptions.bar.columnWidth)/100,o=this.baseLineY[this.yaxisIndex]+(this.isReversed?l.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),t=l.globals.padHorizontal+(i-a)/2),{x:t,y:e,yDivision:n,xDivision:i,barHeight:s,barWidth:a,zeroH:o,zeroW:r}}},{key:"drawBarPaths",value:function(t){for(var e,i=t.indexes,n=t.barHeight,o=t.strokeWidth,r=t.pathTo,s=t.pathFrom,a=t.zeroW,l=t.x,c=t.y,d=t.yDivision,h=t.elSeries,u=this.w,p=c,f=i.i,g=i.j,m=i.realIndex,v=i.bc,y=0,b=0;b<this.prevXF.length;b++)y+=this.prevXF[b][g];if(f>0){var x=a;this.prevXVal[f-1][g]<0?x=this.series[f][g]>=0?this.prevX[f-1][g]+y-2*(this.isReversed?y:0):this.prevX[f-1][g]:this.prevXVal[f-1][g]>=0&&(x=this.series[f][g]>=0?this.prevX[f-1][g]:this.prevX[f-1][g]-y+2*(this.isReversed?y:0)),e=x}else e=a;l=null===this.series[f][g]?e:e+this.series[f][g]/this.invertedYRatio-2*(this.isReversed?this.series[f][g]/this.invertedYRatio:0);var w={barHeight:n,strokeWidth:o,invertedYRatio:this.invertedYRatio,barYPosition:p,x:l},S=this.bar.barEndingShape(u,w,this.series,f,g);if(this.series.length>1&&f!==this.endingShapeOnSeriesNumber&&(S.path=this.graphics.line(S.newX,p+n-o)),this.xArrj.push(S.newX),this.xArrjF.push(Math.abs(e-S.newX)),this.xArrjVal.push(this.series[f][g]),r=this.graphics.move(e,p),s=this.graphics.move(e,p),u.globals.previousPaths.length>0&&(s=this.bar.getPathFrom(m,g,!1)),r=r+this.graphics.line(S.newX,p)+S.path+this.graphics.line(e,p+n-o)+this.graphics.line(e,p),s=s+this.graphics.line(e,p)+this.graphics.line(e,p+n-o)+this.graphics.line(e,p+n-o)+this.graphics.line(e,p+n-o)+this.graphics.line(e,p),u.config.plotOptions.bar.colors.backgroundBarColors.length>0&&0===f){v>=u.config.plotOptions.bar.colors.backgroundBarColors.length&&(v=0);var C=u.config.plotOptions.bar.colors.backgroundBarColors[v],k=this.graphics.drawRect(0,p,u.globals.gridWidth,n,0,C,u.config.plotOptions.bar.colors.backgroundBarOpacity);h.add(k),k.node.classList.add("apexcharts-backgroundBar")}return{pathTo:r,pathFrom:s,x:l,y:c+=d}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,n=t.y,o=t.xDivision,r=t.pathTo,s=t.pathFrom,a=t.barWidth,l=t.zeroH,c=t.strokeWidth,d=t.elSeries,h=this.w,u=e.i,p=e.j,f=e.realIndex,g=e.bc;if(h.globals.isXNumeric){var m=h.globals.seriesX[u][p];m||(m=0),i=(m-h.globals.minX)/this.xRatio-a/2}for(var v,y=i,b=0,x=0;x<this.prevYF.length;x++)b+=this.prevYF[x][p];if(u>0&&!h.globals.isXNumeric||u>0&&h.globals.isXNumeric&&h.globals.seriesX[u-1][p]===h.globals.seriesX[u][p]){var w=this.prevY[u-1][p];v=this.prevYVal[u-1][p]<0?this.series[u][p]>=0?w-b+2*(this.isReversed?b:0):w:this.series[u][p]>=0?w:w+b-2*(this.isReversed?b:0)}else v=h.globals.gridHeight-l;n=v-this.series[u][p]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[u][p]/this.yRatio[this.yaxisIndex]:0);var S={barWidth:a,strokeWidth:c,yRatio:this.yRatio[this.yaxisIndex],barXPosition:y,y:n},C=this.bar.barEndingShape(h,S,this.series,u,p);if(this.yArrj.push(C.newY),this.yArrjF.push(Math.abs(v-C.newY)),this.yArrjVal.push(this.series[u][p]),r=this.graphics.move(y,v),s=this.graphics.move(y,v),h.globals.previousPaths.length>0&&(s=this.bar.getPathFrom(f,p,!1)),r=r+this.graphics.line(y,C.newY)+C.path+this.graphics.line(y+a-c,v)+this.graphics.line(y-c/2,v),s=s+this.graphics.line(y,v)+this.graphics.line(y+a-c,v)+this.graphics.line(y+a-c,v)+this.graphics.line(y+a-c,v)+this.graphics.line(y-c/2,v),h.config.plotOptions.bar.colors.backgroundBarColors.length>0&&0===u){g>=h.config.plotOptions.bar.colors.backgroundBarColors.length&&(g=0);var k=h.config.plotOptions.bar.colors.backgroundBarColors[g],_=this.graphics.drawRect(y,0,a,h.globals.gridHeight,0,k,h.config.plotOptions.bar.colors.backgroundBarOpacity);d.add(_),_.node.classList.add("apexcharts-backgroundBar")}return i+=o,{pathTo:r,pathFrom:s,x:h.globals.isXNumeric?i-o:i,y:n}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,n=0;n<e.length;n++){for(var o=0,r=0;r<e[i.globals.maxValsInArrayIndex].length;r++)o+=e[n][r];0===o&&this.zeroSerieses.push(n)}for(var s=e.length-1;s>=0;s--)this.zeroSerieses.indexOf(s)>-1&&s===this.endingShapeOnSeriesNumber&&(this.endingShapeOnSeriesNumber-=1)}}]),t}(),I=function(){function t(){return e(this,t),c(this,a(t).apply(this,arguments))}return s(t,E),n(t,[{key:"draw",value:function(t,e){var i=this.w,n=new f(this.ctx),o=new k(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick;var r=new x(this.ctx,i);t=r.getLogSeries(t),this.series=t,this.yRatio=r.getLogYRatios(this.yRatio),this.initVariables(t);for(var s=n.group({class:"apexcharts-candlestick-series apexcharts-plot-series"}),a=0,l=0;a<t.length;a++,l++){var c,d,u=void 0,p=void 0,g=void 0,m=void 0,v=[],y=[],b=i.globals.comboCharts?e[a]:a,w=n.group({class:"apexcharts-series",seriesName:h.escapeString(i.globals.seriesNames[b]),rel:a+1,"data:realIndex":b});t[a].length>0&&(this.visibleI=this.visibleI+1);var S,C,_=0;this.yRatio.length>1&&(this.yaxisIndex=b);var T=this.initialPositions();m=T.y,S=T.barHeight,g=T.x,C=T.barWidth,c=T.xDivision,d=T.zeroH,y.push(g+C/2);for(var D=n.group({class:"apexcharts-datalabels"}),E=0,A=i.globals.dataPoints;E<i.globals.dataPoints;E++,A--){void 0===this.series[a][E]||null===t[a][E]?this.isNullValue=!0:this.isNullValue=!1,i.config.stroke.show&&(_=this.isNullValue?0:Array.isArray(this.strokeWidth)?this.strokeWidth[b]:this.strokeWidth);var I,P=this.drawCandleStickPaths({indexes:{i:a,j:E,realIndex:b,bc:l},x:g,y:m,xDivision:c,pathTo:u,pathFrom:p,barWidth:C,zeroH:d,strokeWidth:_,elSeries:w});u=P.pathTo,p=P.pathFrom,m=P.y,g=P.x,I=P.color,E>0&&y.push(g+C/2),v.push(m);var M=o.fillPath({seriesNumber:b,color:I,value:t[a][E]}),L=this.candlestickOptions.wick.useFillColor?I:void 0;w=this.renderSeries({realIndex:b,pathFill:M,lineFill:L,j:E,i:a,pathFrom:p,pathTo:u,strokeWidth:_,elSeries:w,x:g,y:m,series:t,barHeight:S,barWidth:C,elDataLabelsWrap:D,visibleSeries:this.visibleI,type:"candlestick"})}i.globals.seriesXvalues[b]=y,i.globals.seriesYvalues[b]=v,s.add(w)}return s}},{key:"drawCandleStickPaths",value:function(t){var e=t.indexes,i=t.x,n=(t.y,t.xDivision),o=t.pathTo,r=t.pathFrom,s=t.barWidth,a=t.zeroH,l=t.strokeWidth,c=this.w,d=new f(this.ctx),h=e.i,u=e.j,p=!0,g=c.config.plotOptions.candlestick.colors.upward,m=c.config.plotOptions.candlestick.colors.downward,v=this.yRatio[this.yaxisIndex],y=e.realIndex,b=this.getOHLCValue(y,u),x=a,w=a;b.o>b.c&&(p=!1);var S=Math.min(b.o,b.c),C=Math.max(b.o,b.c);c.globals.isXNumeric&&(i=(c.globals.seriesX[h][u]-c.globals.minX)/this.xRatio-s/2);var k=i+s*this.visibleI;return void 0===this.series[h][u]||null===this.series[h][u]?S=a:(S=a-S/v,C=a-C/v,x=a-b.h/v,w=a-b.l/v),d.move(k,a),r=d.move(k,S),c.globals.previousPaths.length>0&&(r=this.getPathFrom(y,u,!0)),o=d.move(k,C)+d.line(k+s/2,C)+d.line(k+s/2,x)+d.line(k+s/2,C)+d.line(k+s,C)+d.line(k+s,S)+d.line(k+s/2,S)+d.line(k+s/2,w)+d.line(k+s/2,S)+d.line(k,S)+d.line(k,C-l/2),r+=d.move(k,S),c.globals.isXNumeric||(i+=n),{pathTo:o,pathFrom:r,x:i,y:C,barXPosition:k,color:p?g:m}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:i.globals.seriesCandleO[t][e],h:i.globals.seriesCandleH[t][e],l:i.globals.seriesCandleL[t][e],c:i.globals.seriesCandleC[t][e]}}}]),t}(),P=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new f(this.ctx),i=new u(this.ctx),n=t.config.xaxis.crosshairs.fill.gradient,o=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,s=n.colorFrom,a=n.colorTo,l=n.opacityFrom,c=n.opacityTo,d=n.stops,p=o.enabled,g=o.left,m=o.top,v=o.blur,y=o.color,b=o.opacity,x=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(x=e.drawGradient("vertical",s,a,l,c,null,d,null));var w=e.drawRect();1===t.config.xaxis.crosshairs.width&&(w=e.drawLine()),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:t.globals.gridHeight,width:h.isNumber(t.config.xaxis.crosshairs.width)?t.config.xaxis.crosshairs.width:0,height:t.globals.gridHeight,fill:x,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),p&&(w=i.dropShadow(w,{left:g,top:m,blur:v,color:y,opacity:b})),t.globals.dom.elGraphical.add(w)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new f(this.ctx),i=t.config.yaxis[0].crosshairs;if(t.config.yaxis[0].crosshairs.show){var n=e.drawLine(0,0,t.globals.gridWidth,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);n.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(n)}var o=e.drawLine(0,0,t.globals.gridWidth,0,i.stroke.color,0,0);o.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(o)}}]),t}(),M=function(){function t(i,n){e(this,t),this.ctx=i,this.w=i.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.negRange=!1,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.width}return n(t,[{key:"draw",value:function(t){var e=this.w,i=new f(this.ctx),n=i.group({class:"apexcharts-heatmap"});n.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var o=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,s=0,a=!1;this.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(a=!0,l.reverse());for(var c=a?0:l.length-1;a?c<l.length:c>=0;a?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:h.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(e.config.chart.dropShadow.enabled){var p=e.config.chart.dropShadow;new u(this.ctx).dropShadow(d,p,c)}for(var g=0,m=0;m<l[c].length;m++){var v=1,y=this.determineHeatColor(c,m);if(e.globals.hasNegs||this.negRange){var b=e.config.plotOptions.heatmap.shadeIntensity;v=e.config.plotOptions.heatmap.reverseNegativeShade?y.percent<0?y.percent/100*(1.25*b):(1-y.percent/100)*(1.25*b):y.percent<0?1-(1+y.percent/100)*b:(1-y.percent/100)*b}else v=1-y.percent/100;var x=y.color;if(e.config.plotOptions.heatmap.enableShades){var w=new h;x=h.hexToRgba(w.shadeColor(v,y.color),e.config.fill.opacity)}var S=this.rectRadius,C=i.drawRect(g,s,o,r,S);if(C.attr({cx:g,cy:s}),C.node.classList.add("apexcharts-heatmap-rect"),d.add(C),C.attr({fill:x,i:c,index:c,j:m,val:l[c][m],"stroke-width":this.strokeWidth,stroke:e.globals.stroke.colors[0],color:x}),C.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,C)),C.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,C)),C.node.addEventListener("mousedown",i.pathMouseDown.bind(this,C)),e.config.chart.animations.enabled&&!e.globals.dataChanged){var k=1;e.globals.resized||(k=e.config.chart.animations.speed),this.animateHeatMap(C,g,s,o,r,k)}if(e.globals.dataChanged){var _=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){_=this.dynamicAnim.speed;var T=e.globals.previousPaths[c]&&e.globals.previousPaths[c][m]&&e.globals.previousPaths[c][m].color;T||(T="rgba(255, 255, 255, 0)"),this.animateHeatColor(C,h.isColorHex(T)?T:h.rgb2hex(T),h.isColorHex(x)?x:h.rgb2hex(x),_)}}var D=this.calculateHeatmapDataLabels({x:g,y:s,i:c,j:m,series:l,rectHeight:r,rectWidth:o});null!==D&&d.add(D),g+=o}s+=r,n.add(d)}var E=e.globals.yAxisScale[0].result.slice();e.config.yaxis[0].reversed?E.unshift(""):E.push(""),e.globals.yAxisScale[0].result=E;var A=e.globals.gridHeight/e.globals.series.length;return e.config.yaxis[0].labels.offsetY=-A/2,n}},{key:"checkColorRange",value:function(){var t=this,e=this.w.config.plotOptions.heatmap;e.colorScale.ranges.length>0&&e.colorScale.ranges.map((function(e,i){e.from<0&&(t.negRange=!0)}))}},{key:"determineHeatColor",value:function(t,e){var i=this.w,n=i.globals.series[t][e],o=i.config.plotOptions.heatmap,r=o.colorScale.inverse?e:t,s=i.globals.colors[r],a=Math.min.apply(Math,d(i.globals.series[t])),l=Math.max.apply(Math,d(i.globals.series[t]));o.distributed||(a=i.globals.minY,l=i.globals.maxY),void 0!==o.colorScale.min&&(a=o.colorScale.min<i.globals.minY?o.colorScale.min:i.globals.minY,l=o.colorScale.max>i.globals.maxY?o.colorScale.max:i.globals.maxY);var c=Math.abs(l)+Math.abs(a),h=100*n/(0===c?c-1e-6:c);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map((function(t,e){if(n>=t.from&&n<=t.to){s=t.color,a=t.from,l=t.to;var i=Math.abs(l)+Math.abs(a);h=100*n/(0===i?i-1e-6:i)}})),{color:s,percent:h}}},{key:"calculateHeatmapDataLabels",value:function(t){var e=t.x,i=t.y,n=t.i,o=t.j,r=(t.series,t.rectHeight),s=t.rectWidth,a=this.w,l=a.config.dataLabels,c=new f(this.ctx),d=new D(this.ctx),h=l.formatter,u=null;if(l.enabled){u=c.group({class:"apexcharts-data-labels"});var p=l.offsetX,g=l.offsetY,m=e+s/2+p,v=i+r/2+parseInt(l.style.fontSize)/3+g,y=h(a.globals.series[n][o],{seriesIndex:n,dataPointIndex:o,w:a});d.plotDataLabelsText({x:m,y:v,text:y,i:n,j:o,parent:u,dataLabelsConfig:l})}return u}},{key:"animateHeatMap",value:function(t,e,i,n,o,r){var s=this;new p(this.ctx).animateRect(t,{x:e+n/2,y:i+o/2,width:0,height:0},{x:e,y:i,width:n,height:o},r,(function(){s.w.globals.animationEnded=!0}))}},{key:"animateHeatColor",value:function(t,e,i,n){t.attr({fill:e}).animate(n).attr({fill:i})}}]),t}(),L=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels;var n=this.w;this.lineColorArr=void 0!==n.globals.stroke.colors?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight<n.globals.svgWidth?n.globals.svgHeight-35:n.globals.gridWidth,this.centerY=this.defaultSize/2,this.centerX=n.globals.gridWidth/2,this.fullAngle=360,this.size=0,this.donutSize=0,this.sliceLabels=[],this.prevSectorAngleArr=[]}return n(t,[{key:"draw",value:function(t){for(var e=this.w,i=new f(this.ctx),n=i.group({class:"apexcharts-pie"}),o=0,r=0;r<t.length;r++)o+=h.negToZero(t[r]);var s=[],a=i.group();0===o&&(o=1e-5);for(var l=0;l<t.length;l++){var c=this.fullAngle*h.negToZero(t[l])/o;s.push(c)}if(e.globals.dataChanged){for(var d,u=0,p=0;p<e.globals.previousPaths.length;p++)u+=h.negToZero(e.globals.previousPaths[p]);for(var g=0;g<e.globals.previousPaths.length;g++)d=this.fullAngle*h.negToZero(e.globals.previousPaths[g])/u,this.prevSectorAngleArr.push(d)}this.size=this.defaultSize/2.05-e.config.stroke.width-e.config.chart.dropShadow.blur,void 0!==e.config.plotOptions.pie.size&&(this.size=e.config.plotOptions.pie.size),this.donutSize=this.size*parseInt(e.config.plotOptions.pie.donut.size)/100;var m=e.config.plotOptions.pie.customScale,v=e.globals.gridWidth/2,y=e.globals.gridHeight/2,b=v-e.globals.gridWidth/2*m,x=y-e.globals.gridHeight/2*m;if(this.donutDataLabels.show){var w=this.renderInnerDataLabels(this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show,translateX:b,translateY:x});n.add(w)}if("donut"===e.config.chart.type){var S=i.drawCircle(this.donutSize);S.attr({cx:this.centerX,cy:this.centerY,fill:e.config.plotOptions.pie.donut.background}),a.add(S)}var C=this.drawArcs(s,t);return this.sliceLabels.forEach((function(t){C.add(t)})),a.attr({transform:"translate(".concat(b,", ").concat(x-5,") scale(").concat(m,")")}),n.attr({"data:innerTranslateX":b,"data:innerTranslateY":x-25}),a.add(C),n.add(a),n}},{key:"drawArcs",value:function(t,e){var i=this.w,n=new u(this.ctx),o=new f(this.ctx),r=new k(this.ctx),s=o.group(),a=0,l=0,c=0,d=0;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var p=0;p<t.length;p++){var g=o.group({class:"apexcharts-series apexcharts-pie-series",seriesName:h.escapeString(i.globals.seriesNames[p]),id:"apexcharts-series-"+p,rel:p+1});s.add(g),l=d,c=(a=c)+t[p],d=l+this.prevSectorAngleArr[p];var m=c-a,v=r.fillPath({seriesNumber:p,size:this.size,value:e[p]}),y=this.getChangedPath(l,d),b=o.drawPath({d:y,stroke:this.lineColorArr instanceof Array?this.lineColorArr[p]:this.lineColorArr,strokeWidth:this.strokeWidth,fill:v,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area"});if(b.attr({id:"apexcharts-".concat(i.config.chart.type,"-slice-").concat(p),index:0,j:p}),i.config.chart.dropShadow.enabled){var x=i.config.chart.dropShadow;n.dropShadow(b,x,p)}this.addListeners(b,this.donutDataLabels),f.setAttrs(b.node,{"data:angle":m,"data:startAngle":a,"data:strokeWidth":this.strokeWidth,"data:value":e[p]});var w={x:0,y:0};"pie"===i.config.chart.type?w=h.polarToCartesian(this.centerX,this.centerY,this.size/1.25+i.config.plotOptions.pie.dataLabels.offset,a+(c-a)/2):"donut"===i.config.chart.type&&(w=h.polarToCartesian(this.centerX,this.centerY,(this.size+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,a+(c-a)/2)),g.add(b);var S=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(S=(c-a)/this.fullAngle*i.config.chart.animations.speed,this.animDur=S+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(b,{endAngle:c,startAngle:a,prevStartAngle:l,prevEndAngle:d,animateStartingPos:!0,i:p,animBeginArr:this.animBeginArr,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(b,{endAngle:c,startAngle:a,i:p,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:S}),i.config.plotOptions.pie.expandOnClick&&b.click(this.pieClicked.bind(this,p)),i.config.dataLabels.enabled){var C=w.x,_=w.y,T=100*(c-a)/360+"%";if(0!==m&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[p]){var D=i.config.dataLabels.formatter;void 0!==D&&(T=D(i.globals.seriesPercent[p][0],{seriesIndex:p,w:i}));var E=i.globals.dataLabels.style.colors[p],A=o.drawText({x:C,y:_,text:T,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,foreColor:E});if(i.config.dataLabels.dropShadow.enabled){var I=i.config.dataLabels.dropShadow;new u(this.ctx).dropShadow(A,I)}A.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&!1===i.globals.resized&&(A.node.classList.add("apexcharts-pie-label-delay"),A.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(A)}}}return s}},{key:"addListeners",value:function(t,e){var i=new f(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this,t)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e))}},{key:"animatePaths",value:function(t,e){var i=this.w,n=e.endAngle-e.startAngle,o=n,r=e.startAngle,s=e.startAngle;void 0!==e.prevStartAngle&&void 0!==e.prevEndAngle&&(r=e.prevEndAngle,o=e.prevEndAngle-e.prevStartAngle),e.i===i.config.series.length-1&&(n+s>this.fullAngle?e.endAngle=e.endAngle-(n+s):n+s<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(n+s)))),n===this.fullAngle&&(n=this.fullAngle-.01),this.animateArc(t,r,s,n,o,e)}},{key:"animateArc",value:function(t,e,i,n,o,r){var s,a=this,l=this.w,c=a.size;c||(c=r.size),(isNaN(e)||isNaN(o))&&(e=i,o=n,r.dur=0);var d=n,h=i,u=e-i;l.globals.dataChanged&&r.shouldSetPrevPaths&&(s=a.getPiePath({me:a,startAngle:h,angle:o,size:c}),t.attr({d:s})),0!==r.dur?t.animate(r.dur,l.globals.easing,r.animBeginArr[r.i]).afterAll((function(){"pie"!==l.config.chart.type&&"donut"!==l.config.chart.type||this.animate(300).attr({"stroke-width":l.config.stroke.width}),l.globals.animationEnded=!0})).during((function(l){d=u+(n-u)*l,r.animateStartingPos&&(d=o+(n-o)*l,h=e-o+(i-(e-o))*l),s=a.getPiePath({me:a,startAngle:h,angle:d,size:c}),t.node.setAttribute("data:pathOrig",s),t.attr({d:s})})):(s=a.getPiePath({me:a,startAngle:h,angle:n,size:c}),r.isTrack||(l.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",s),t.attr({d:s}))}},{key:"pieClicked",value:function(t){var e,i=this.w,n=this.size+4,o=i.globals.dom.Paper.select("#apexcharts-".concat(i.config.chart.type.toLowerCase(),"-slice-").concat(t)).members[0],r=o.attr("d");if("true"!==o.attr("data:pieClicked")){var s=i.globals.dom.baseEl.querySelectorAll(".apexcharts-pie-area");Array.prototype.forEach.call(s,(function(t){t.setAttribute("data:pieClicked","false");var e=t.getAttribute("data:pathOrig");t.setAttribute("d",e)})),o.attr("data:pieClicked","true");var a=parseInt(o.attr("data:startAngle")),l=parseInt(o.attr("data:angle"));e=this.getPiePath({me:this,startAngle:a,angle:l,size:n}),360!==l&&o.plot(e).animate(1).plot(r).animate(100).plot(e)}else{o.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(o.node,this.donutDataLabels);var c=o.attr("data:pathOrig");o.attr({d:c})}}},{key:"getChangedPath",value:function(t,e){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),i}},{key:"getPiePath",value:function(t){var e=t.me,i=t.startAngle,n=t.angle,o=t.size,r=this.w,s=i,a=Math.PI*(s-90)/180,l=n+i;Math.ceil(l)>=360&&(l=359.99);var c=Math.PI*(l-90)/180,d=e.centerX+o*Math.cos(a),u=e.centerY+o*Math.sin(a),p=e.centerX+o*Math.cos(c),f=e.centerY+o*Math.sin(c),g=h.polarToCartesian(e.centerX,e.centerY,e.donutSize,l),m=h.polarToCartesian(e.centerX,e.centerY,e.donutSize,s),v=n>180?1:0;return"donut"===r.config.chart.type?["M",d,u,"A",o,o,0,v,1,p,f,"L",g.x,g.y,"A",e.donutSize,e.donutSize,0,v,0,m.x,m.y,"L",d,u,"z"].join(" "):"pie"===r.config.chart.type?["M",d,u,"A",o,o,0,v,1,p,f,"L",e.centerX,e.centerY,"L",d,u].join(" "):["M",d,u,"A",o,o,0,v,1,p,f].join(" ")}},{key:"renderInnerDataLabels",value:function(t,e){var i=this.w,n=new f(this.ctx),o=n.group({class:"apexcharts-datalabels-group",transform:"translate(".concat(e.translateX?e.translateX:0,", ").concat(e.translateY?e.translateY:0,")")}),r=t.total.show;o.node.style.opacity=e.opacity;var s,a,l=e.centerX,c=e.centerY;s=void 0===t.name.color?i.globals.colors[0]:t.name.color,a=void 0===t.value.color?i.config.chart.foreColor:t.value.color;var d=t.value.formatter,h="",u="";if(r?(s=t.total.color,u=t.total.label,h=t.total.formatter(i)):1===i.globals.series.length&&(h=d(i.globals.series[0],i),u=i.globals.seriesNames[0]),t.name.show){var p=n.drawText({x:l,y:c+parseInt(t.name.offsetY),text:u,textAnchor:"middle",foreColor:s,fontSize:t.name.fontSize,fontFamily:t.name.fontFamily});p.node.classList.add("apexcharts-datalabel-label"),o.add(p)}if(t.value.show){var g=t.name.show?parseInt(t.value.offsetY)+16:t.value.offsetY,m=n.drawText({x:l,y:c+g,text:h,textAnchor:"middle",foreColor:a,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});m.node.classList.add("apexcharts-datalabel-value"),o.add(m)}return o}},{key:"printInnerLabels",value:function(t,e,i,n){var o,r=this.w;n?o=void 0===t.name.color?r.globals.colors[parseInt(n.parentNode.getAttribute("rel"))-1]:t.name.color:r.globals.series.length>1&&t.total.show&&(o=t.total.color);var s=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),a=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),n||"function"!=typeof t.total.formatter||(i=t.total.formatter(r)),null!==s&&(s.textContent=e),null!==a&&(a.textContent=i),null!==s&&(s.style.fill=o)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,n=t.getAttribute("data:value"),o=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"))-1];i.globals.series.length>1&&this.printInnerLabels(e,o,n,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"revertDataLabelsInner",value:function(e,i,n){var o=this,r=this.w,s=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");if(i.total.show&&r.globals.series.length>1)new t(this.ctx).printInnerLabels(i,i.total.label,i.total.formatter(r));else{var a=document.querySelectorAll(".apexcharts-pie-area"),l=!1;if(a.forEach((function(t){"true"===t.getAttribute("data:pieClicked")&&(l=!0,o.printDataLabelsInner(t,i))})),!l)if(r.globals.selectedDataPoints.length&&r.globals.series.length>1)if(r.globals.selectedDataPoints[0].length>0){var c=r.globals.selectedDataPoints[0],d=r.globals.dom.baseEl.querySelector("#apexcharts-".concat(r.config.chart.type.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(d,i)}else s&&r.globals.selectedDataPoints.length&&0===r.globals.selectedDataPoints[0].length&&(s.style.opacity=0);else s&&r.globals.series.length>1&&(s.style.opacity=0)}}}]),t}(),R=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new f(this.ctx),this.lineColorArr=void 0!==n.globals.stroke.colors?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight<n.globals.svgWidth?n.globals.svgHeight-35:n.globals.gridWidth,this.maxValue=this.w.globals.maxY,this.polygons=n.config.plotOptions.radar.polygons,this.maxLabelWidth=20;var o=n.globals.labels.slice().sort((function(t,e){return e.length-t.length}))[0],r=this.graphics.getTextRects(o,n.config.dataLabels.style.fontSize);this.size=this.defaultSize/2.1-n.config.stroke.width-n.config.chart.dropShadow.blur-r.width/1.75,void 0!==n.config.plotOptions.radar.size&&(this.size=n.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return n(t,[{key:"draw",value:function(t){var e=this,i=this.w,n=new k(this.ctx),o=[];this.dataPointsLen=t[i.globals.maxValsInArrayIndex].length,this.disAngle=2*Math.PI/this.dataPointsLen;var s=i.globals.gridWidth/2,a=i.globals.gridHeight/2,l=this.graphics.group({class:"apexcharts-radar-series","data:innerTranslateX":s,"data:innerTranslateY":a-25,transform:"translate(".concat(s||0,", ").concat(a||0,")")}),c=[],d=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((function(t,s){var a=e.graphics.group().attr({class:"apexcharts-series",seriesName:h.escapeString(i.globals.seriesNames[s]),rel:s+1,"data:realIndex":s});e.dataRadiusOfPercent[s]=[],e.dataRadius[s]=[],e.angleArr[s]=[],t.forEach((function(t,i){e.dataRadiusOfPercent[s][i]=t/e.maxValue,e.dataRadius[s][i]=e.dataRadiusOfPercent[s][i]*e.size,e.angleArr[s][i]=i*e.disAngle})),c=e.getDataPointsPos(e.dataRadius[s],e.angleArr[s]);var l=e.createPaths(c,{x:0,y:0});d=e.graphics.group({class:"apexcharts-series-markers-wrap hidden"}),i.globals.delayedElements.push({el:d.node,index:s});var p={i:s,realIndex:s,animationDelay:s,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",id:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[s],strokeLineCap:i.config.stroke.lineCap},f=null;i.globals.previousPaths.length>0&&(f=e.getPathFrom(s));for(var g=0;g<l.linePathsTo.length;g++){var m=e.graphics.renderPaths(r({},p,{pathFrom:null===f?l.linePathsFrom[g]:f,pathTo:l.linePathsTo[g],strokeWidth:Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width,fill:"none",drawShadow:!1}));a.add(m);var v=n.fillPath({seriesNumber:s}),y=e.graphics.renderPaths(r({},p,{pathFrom:null===f?l.areaPathsFrom[g]:f,pathTo:l.areaPathsTo[g],strokeWidth:0,fill:v,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var b=new u(e.ctx),x=i.config.chart.dropShadow;b.dropShadow(y,Object.assign({},x,{noUserSpaceOnUse:!0}),s)}a.add(y)}t.forEach((function(t,i){var n=new _(e.ctx).getMarkerConfig("apexcharts-marker",s),o=e.graphics.drawMarker(c[i].x,c[i].y,n);o.attr("rel",i),o.attr("j",i),o.attr("index",s),o.node.setAttribute("default-marker-size",n.pSize);var r=e.graphics.group({class:"apexcharts-series-markers"});r&&r.add(o),d.add(r),a.add(d)})),o.push(a)})),this.drawPolygons({parent:l}),i.config.dataLabels.enabled){var p=this.drawLabels();l.add(p)}return l.add(this.yaxisLabels),o.forEach((function(t){l.add(t)})),l}},{key:"drawPolygons",value:function(t){for(var e=this,i=this.w,n=t.parent,o=i.globals.yAxisScale[0].result.reverse(),r=o.length,s=[],a=this.size/(r-1),l=0;l<r;l++)s[l]=a*l;s.reverse();var c=[],d=[];s.forEach((function(t,i){var n=e.getPolygonPos(t),o="";n.forEach((function(t,n){if(0===i){var r=e.graphics.drawLine(t.x,t.y,0,0,Array.isArray(e.polygons.connectorColors)?e.polygons.connectorColors[n]:e.polygons.connectorColors);d.push(r)}0===n&&e.yaxisLabelsTextsPos.push({x:t.x,y:t.y}),o+=t.x+","+t.y+" "})),c.push(o)})),c.forEach((function(t,o){var r=e.polygons.strokeColors,s=e.graphics.drawPolygon(t,Array.isArray(r)?r[o]:r,i.globals.radarPolygons.fill.colors[o]);n.add(s)})),d.forEach((function(t){n.add(t)})),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((function(t,i){var n=e.drawYAxisText(t.x,t.y,i,o[i]);e.yaxisLabels.add(n)}))}},{key:"drawYAxisText",value:function(t,e,i,n){var o=this.w,r=o.config.yaxis[0],s=o.globals.yLabelFormatters[0];return this.graphics.drawText({x:t+r.labels.offsetX,y:e+r.labels.offsetY,text:s(n,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:r.labels.style.color})}},{key:"drawLabels",value:function(){var t=this,e=this.w,i="middle",n=e.config.dataLabels,o=this.graphics.group({class:"apexcharts-datalabels"}),r=this.getPolygonPos(this.size),s=0,a=0;return e.globals.labels.forEach((function(l,c){var d=n.formatter,h=new D(t.ctx);if(r[c]){s=r[c].x,a=r[c].y,Math.abs(r[c].x)>=10?r[c].x>0?(i="start",s+=10):r[c].x<0&&(i="end",s-=10):i="middle",Math.abs(r[c].y)>=t.size-10&&(r[c].y<0?a-=10:r[c].y>0&&(a+=10));var u=d(l,{seriesIndex:-1,dataPointIndex:c,w:e});h.plotDataLabelsText({x:s,y:a,text:u,textAnchor:i,i:c,j:c,parent:o,dataLabelsConfig:n,offsetCorrection:!1})}})),o}},{key:"createPaths",value:function(t,e){var i=this,n=[],o=[],r=[],s=[];if(t.length){o=[this.graphics.move(e.x,e.y)],s=[this.graphics.move(e.x,e.y)];var a=this.graphics.move(t[0].x,t[0].y),l=this.graphics.move(t[0].x,t[0].y);t.forEach((function(e,n){a+=i.graphics.line(e.x,e.y),l+=i.graphics.line(e.x,e.y),n===t.length-1&&(a+="Z",l+="Z")})),n.push(a),r.push(l)}return{linePathsFrom:o,linePathsTo:n,areaPathsFrom:s,areaPathsTo:r}}},{key:"getPathFrom",value:function(t){for(var e=this.w,i=null,n=0;n<e.globals.previousPaths.length;n++){var o=e.globals.previousPaths[n];o.paths.length>0&&parseInt(o.realIndex)===parseInt(t)&&void 0!==e.globals.previousPaths[n].paths[0]&&(i=e.globals.previousPaths[n].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var n=[],o=0;o<i;o++){var r={};r.x=t[o]*Math.sin(e[o]),r.y=-t[o]*Math.cos(e[o]),n.push(r)}return n}},{key:"getPolygonPos",value:function(t){for(var e=[],i=2*Math.PI/this.dataPointsLen,n=0;n<this.dataPointsLen;n++){var o={};o.x=t*Math.sin(n*i),o.y=-t*Math.cos(n*i),e.push(o)}return e}}]),t}(),O=function(){function t(i){var n;e(this,t),(n=c(this,a(t).call(this,i))).ctx=i,n.w=i.w,n.animBeginArr=[0],n.animDur=0;var o=n.w;return n.startAngle=o.config.plotOptions.radialBar.startAngle,n.endAngle=o.config.plotOptions.radialBar.endAngle,n.trackStartAngle=o.config.plotOptions.radialBar.track.startAngle,n.trackEndAngle=o.config.plotOptions.radialBar.track.endAngle,n.radialDataLabels=o.config.plotOptions.radialBar.dataLabels,n.trackStartAngle||(n.trackStartAngle=n.startAngle),n.trackEndAngle||(n.trackEndAngle=n.endAngle),360===n.endAngle&&(n.endAngle=359.99),n.fullAngle=360-o.config.plotOptions.radialBar.endAngle-o.config.plotOptions.radialBar.startAngle,n.margin=parseInt(o.config.plotOptions.radialBar.track.margin),n}return s(t,L),n(t,[{key:"draw",value:function(t){var e=this.w,i=new f(this.ctx),n=i.group({class:"apexcharts-radialbar"}),o=i.group(),r=this.defaultSize/2,s=e.globals.gridWidth/2,a=this.defaultSize/2.05-e.config.stroke.width-e.config.chart.dropShadow.blur;void 0!==e.config.plotOptions.radialBar.size&&(a=e.config.plotOptions.radialBar.size);var l=e.globals.fill.colors;if(e.config.plotOptions.radialBar.track.show){var c=this.drawTracks({size:a,centerX:s,centerY:r,colorArr:l,series:t});o.add(c)}var d=this.drawArcs({size:a,centerX:s,centerY:r,colorArr:l,series:t});return o.add(d.g),"front"===e.config.plotOptions.radialBar.hollow.position&&(d.g.add(d.elHollow),d.dataLabels&&d.g.add(d.dataLabels)),n.add(o),n}},{key:"drawTracks",value:function(t){var e=this.w,i=new f(this.ctx),n=i.group(),o=new u(this.ctx),r=new k(this.ctx),s=this.getStrokeWidth(t);t.size=t.size-s/2;for(var a=0;a<t.series.length;a++){var l=i.group({class:"apexcharts-radialbar-track apexcharts-track"});n.add(l),l.attr({id:"apexcharts-track-"+a,rel:a+1}),t.size=t.size-s-this.margin;var c=e.config.plotOptions.radialBar.track,d=r.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(c.background)?c.background[a]:c.background,solid:!0}),h=this.trackStartAngle,p=this.trackEndAngle;Math.abs(p)+Math.abs(h)>=360&&(p=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:d,strokeWidth:s*parseInt(c.strokeWidth)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var m=c.dropShadow;o.dropShadow(g,m)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+a),new L(this.ctx).animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:p,startAngle:h,size:t.size,i:a,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:e.globals.easing})}return n}},{key:"drawArcs",value:function(t){var e=this.w,i=new f(this.ctx),n=new k(this.ctx),o=new u(this.ctx),r=i.group(),s=this.getStrokeWidth(t);t.size=t.size-s/2;var a=e.config.plotOptions.radialBar.hollow.background,l=t.size-s*t.series.length-this.margin*t.series.length-s*parseInt(e.config.plotOptions.radialBar.track.strokeWidth)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(a=this.drawHollowImage(t,r,l,a));var d=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:a});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var p=e.config.plotOptions.radialBar.hollow.dropShadow;o.dropShadow(d,p)}var g=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(g=0);var m=new L(this.ctx),v=null;this.radialDataLabels.show&&(v=m.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:g})),"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(d),v&&r.add(v));var y=!1;e.config.plotOptions.radialBar.inverseOrder&&(y=!0);for(var b=y?t.series.length-1:0;y?b>=0:b<t.series.length;y?b--:b++){var x=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:h.escapeString(e.globals.seriesNames[b])});r.add(x),x.attr({id:"apexcharts-series-"+b,rel:b+1}),this.ctx.series.addCollapsedClassToSeries(x,b),t.size=t.size-s-this.margin;var w=n.fillPath({seriesNumber:b,size:t.size,value:t.series[b]}),S=this.startAngle,C=void 0,_=Math.abs(e.config.plotOptions.radialBar.endAngle-e.config.plotOptions.radialBar.startAngle),T=h.negToZero(t.series[b]>100?100:t.series[b])/100,D=Math.round(_*T)+this.startAngle,E=void 0;e.globals.dataChanged&&(C=this.startAngle,E=Math.round(_*h.negToZero(e.globals.previousPaths[b])/100)+C),Math.abs(D)+Math.abs(S)>=360&&(D-=.01),Math.abs(E)+Math.abs(C)>=360&&(E-=.01);var A=D-S,I=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[b]:e.config.stroke.dashArray,P=i.drawPath({d:"",stroke:w,strokeWidth:s,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area",strokeDashArray:I});if(f.setAttrs(P.node,{"data:angle":A,"data:value":t.series[b]}),e.config.chart.dropShadow.enabled){var M=e.config.chart.dropShadow;o.dropShadow(P,M,b)}this.addListeners(P,this.radialDataLabels);var R=new L(this.ctx);x.add(P),P.attr({id:"apexcharts-radialbar-slice-"+b,index:0,j:b});var O=0;!R.initialAnim||e.globals.resized||e.globals.dataChanged||(O=(D-S)/360*e.config.chart.animations.speed,this.animDur=O/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),e.globals.dataChanged&&(O=(D-S)/360*e.config.chart.animations.dynamicAnimation.speed,this.animDur=O/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),R.animatePaths(P,{centerX:t.centerX,centerY:t.centerY,endAngle:D,startAngle:S,prevEndAngle:E,prevStartAngle:C,size:t.size,i:b,totalItems:2,animBeginArr:this.animBeginArr,dur:O,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:r,elHollow:d,dataLabels:v}}},{key:"drawHollow",value:function(t){var e=new f(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,n){var o=this.w,r=new k(this.ctx),s=(Math.random()+1).toString(36).substring(4),a=o.config.plotOptions.radialBar.hollow.image;if(o.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:a,patternID:"pattern".concat(o.globals.cuid).concat(s)}),n="url(#pattern".concat(o.globals.cuid).concat(s,")");else{var l=o.config.plotOptions.radialBar.hollow.imageWidth,c=o.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var d=o.globals.dom.Paper.image(a).loaded((function(e){this.move(t.centerX-e.width/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+o.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(d)}else{var h=o.globals.dom.Paper.image(a).loaded((function(e){this.move(t.centerX-l/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+o.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return n}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size))/100/(t.series.length+1)-this.margin}}]),t}(),F=function(){function t(){return e(this,t),c(this,a(t).apply(this,arguments))}return s(t,E),n(t,[{key:"draw",value:function(t,e){var i=this.w,n=new f(this.ctx),o=new k(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.initVariables(t);for(var r=n.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),s=0,a=0;s<t.length;s++,a++){var l,c,d,u,p=void 0,g=void 0,m=void 0,v=void 0,y=[],b=[],x=i.globals.comboCharts?e[s]:s,w=n.group({class:"apexcharts-series",seriesName:h.escapeString(i.globals.seriesNames[x]),rel:s+1,"data:realIndex":x});t[s].length>0&&(this.visibleI=this.visibleI+1);var S=0,C=0,_=0;this.yRatio.length>1&&(this.yaxisIndex=x);var T=this.initialPositions();v=T.y,c=T.yDivision,C=T.barHeight,u=T.zeroW,m=T.x,_=T.barWidth,l=T.xDivision,d=T.zeroH,b.push(m+_/2);for(var D=n.group({class:"apexcharts-datalabels"}),E=0,A=i.globals.dataPoints;E<i.globals.dataPoints;E++,A--){void 0===this.series[s][E]||null===t[s][E]?this.isNullValue=!0:this.isNullValue=!1,i.config.stroke.show&&(S=this.isNullValue?0:Array.isArray(this.strokeWidth)?this.strokeWidth[x]:this.strokeWidth);var I=null;this.isHorizontal?_=(I=this.drawRangeBarPaths({indexes:{i:s,j:E,realIndex:x,bc:a},barHeight:C,strokeWidth:S,pathTo:p,pathFrom:g,zeroW:u,x:m,y:v,yDivision:c,elSeries:w})).barWidth:C=(I=this.drawRangeColumnPaths({indexes:{i:s,j:E,realIndex:x,bc:a},x:m,y:v,xDivision:l,pathTo:p,pathFrom:g,barWidth:_,zeroH:d,strokeWidth:S,elSeries:w})).barHeight,p=I.pathTo,g=I.pathFrom,v=I.y,m=I.x,E>0&&b.push(m+_/2),y.push(v);var P=o.fillPath({seriesNumber:x}),M=i.globals.stroke.colors[x];w=this.renderSeries({realIndex:x,pathFill:P,lineFill:M,j:E,i:s,pathFrom:g,pathTo:p,strokeWidth:S,elSeries:w,x:m,y:v,series:t,barHeight:C,barWidth:_,elDataLabelsWrap:D,visibleSeries:this.visibleI,type:"rangebar"})}i.globals.seriesXvalues[x]=b,i.globals.seriesYvalues[x]=y,r.add(w)}return r}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,n=(t.y,t.strokeWidth),o=t.xDivision,r=t.pathTo,s=t.pathFrom,a=t.barWidth,l=t.zeroH,c=this.w,d=new f(this.ctx),h=e.i,u=e.j,p=this.yRatio[this.yaxisIndex],g=e.realIndex,m=this.getRangeValue(g,u),v=Math.min(m.start,m.end),y=Math.max(m.start,m.end);c.globals.isXNumeric&&(i=(c.globals.seriesX[h][u]-c.globals.minX)/this.xRatio-a/2);var b=i+a*this.visibleI;void 0===this.series[h][u]||null===this.series[h][u]?v=l:(v=l-v/p,y=l-y/p);var x=Math.abs(y-v);return d.move(b,l),s=d.move(b,v),c.globals.previousPaths.length>0&&(s=this.getPathFrom(g,u,!0)),r=d.move(b,y)+d.line(b+a,y)+d.line(b+a,v)+d.line(b,v)+d.line(b,y-n/2),s=s+d.move(b,v)+d.line(b+a,v)+d.line(b+a,v)+d.line(b,v),c.globals.isXNumeric||(i+=o),{pathTo:r,pathFrom:s,barHeight:x,x:i,y:y,barXPosition:b}}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=(t.x,t.y),n=t.yDivision,o=t.pathTo,r=t.pathFrom,s=t.barHeight,a=t.zeroW,l=this.w,c=new f(this.ctx),d=e.i,h=e.j,u=e.realIndex,p=a,g=a;l.globals.isXNumeric&&(i=(l.globals.seriesX[d][h]-l.globals.minX)/this.invertedXRatio-s);var m=i+s*this.visibleI;void 0!==this.series[d][h]&&null!==this.series[d][h]&&(p=a+this.seriesRangeStart[d][h]/this.invertedYRatio,g=a+this.seriesRangeEnd[d][h]/this.invertedYRatio),c.move(a,m),r=c.move(a,m),l.globals.previousPaths.length>0&&(r=this.getPathFrom(u,h));var v=Math.abs(g-p);return o=c.move(p,m)+c.line(g,m)+c.line(g,m+s)+c.line(p,m+s)+c.line(p,m),r=r+c.line(p,m)+c.line(p,m+s)+c.line(p,m+s)+c.line(p,m),l.globals.isXNumeric||(i+=n),{pathTo:o,pathFrom:r,barWidth:v,x:g,y:i,barYPosition:m}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),t}(),N=function(){function t(i,n,o){e(this,t),this.ctx=i,this.w=i.w,this.xyRatios=n,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||o,this.scatter=new T(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.yaxisIndex=0}return n(t,[{key:"draw",value:function(t,e,i){var n=this.w,o=new f(this.ctx),s=new k(this.ctx),a=n.globals.comboCharts?e:n.config.chart.type,l=o.group({class:"apexcharts-".concat(a,"-series apexcharts-plot-series")}),c=new x(this.ctx,n);t=c.getLogSeries(t);var d=this.xyRatios.yRatio;d=c.getLogYRatios(d);for(var u=this.xyRatios.zRatio,p=this.xyRatios.xRatio,g=this.xyRatios.baseLineY,m=[],v=[],y=0,b=0;b<t.length;b++){if("line"===a&&("gradient"===n.config.fill.type||"gradient"===n.config.fill.type[b])&&c.seriesHaveSameValues(b)){var w=t[b].slice();w[w.length-1]=w[w.length-1]+1e-6,t[b]=w}var S=n.globals.gridWidth/n.globals.dataPoints,C=n.globals.comboCharts?i[b]:b;d.length>1&&(this.yaxisIndex=C),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;var T=[],E=[],A=n.globals.gridHeight-g[this.yaxisIndex]-(this.isReversed?n.globals.gridHeight:0)+(this.isReversed?2*g[this.yaxisIndex]:0),I=A;A>n.globals.gridHeight&&(I=n.globals.gridHeight),y=S/2;var P=n.globals.padHorizontal+y,M=1;n.globals.isXNumeric&&n.globals.seriesX.length>0&&(P=(n.globals.seriesX[C][0]-n.globals.minX)/p),E.push(P);var L=void 0,R=void 0,O=void 0,F=void 0,N=[],H=[],z=o.group({class:"apexcharts-series",seriesName:h.escapeString(n.globals.seriesNames[C])}),B=o.group({class:"apexcharts-series-markers-wrap"}),$=o.group({class:"apexcharts-datalabels"});this.ctx.series.addCollapsedClassToSeries(z,C);var j=t[b].length===n.globals.dataPoints;z.attr({"data:longestSeries":j,rel:b+1,"data:realIndex":C}),this.appendPathFrom=!0;var W=P,Y=void 0,X=W,V=A,q=0;if(V=this.determineFirstPrevY({i:b,series:t,yRatio:d[this.yaxisIndex],zeroY:A,prevY:V,prevSeriesY:v,lineYPosition:q}).prevY,T.push(V),Y=V,null===t[b][0]){for(var U=0;U<t[b].length;U++)if(null!==t[b][U]){X=S*U,V=A-t[b][U]/d[this.yaxisIndex],L=o.move(X,V),R=o.move(X,I);break}}else L=o.move(X,V),R=o.move(X,I)+o.line(X,V);if(O=o.move(-1,A)+o.line(-1,A),F=o.move(-1,A)+o.line(-1,A),n.globals.previousPaths.length>0){var G=this.checkPreviousPaths({pathFromLine:O,pathFromArea:F,realIndex:C});O=G.pathFromLine,F=G.pathFromArea}for(var Z=n.globals.dataPoints>1?n.globals.dataPoints-1:n.globals.dataPoints,K=0;K<Z;K++){if(n.globals.isXNumeric){var Q=n.globals.seriesX[C][K+1];void 0===n.globals.seriesX[C][K+1]&&(Q=n.globals.seriesX[C][Z-1]),P=(Q-n.globals.minX)/p}else P+=S;var J=h.isNumber(n.globals.minYArr[C])?n.globals.minYArr[C]:n.globals.minY;n.config.chart.stacked?(q=b>0&&n.globals.collapsedSeries.length<n.config.series.length-1?v[b-1][K+1]:A,M=void 0===t[b][K+1]||null===t[b][K+1]?q-J/d[this.yaxisIndex]+2*(this.isReversed?J/d[this.yaxisIndex]:0):q-t[b][K+1]/d[this.yaxisIndex]+2*(this.isReversed?t[b][K+1]/d[this.yaxisIndex]:0)):M=void 0===t[b][K+1]||null===t[b][K+1]?A-J/d[this.yaxisIndex]+2*(this.isReversed?J/d[this.yaxisIndex]:0):A-t[b][K+1]/d[this.yaxisIndex]+2*(this.isReversed?t[b][K+1]/d[this.yaxisIndex]:0),E.push(P),T.push(M);var tt=this.createPaths({series:t,i:b,j:K,x:P,y:M,xDivision:S,pX:W,pY:Y,areaBottomY:I,linePath:L,areaPath:R,linePaths:N,areaPaths:H,seriesIndex:i});H=tt.areaPaths,N=tt.linePaths,W=tt.pX,Y=tt.pY,R=tt.areaPath,L=tt.linePath,this.appendPathFrom&&(O+=o.line(P,A),F+=o.line(P,A));var et=this.calculatePoints({series:t,x:P,y:M,realIndex:C,i:b,j:K,prevY:V,categoryAxisCorrection:y,xRatio:p});if(this.pointsChart)this.scatter.draw(z,K,{realIndex:C,pointsPos:et,zRatio:u,elParent:B});else{var it=new _(this.ctx);n.globals.dataPoints>1&&B.node.classList.add("hidden");var nt=it.plotChartMarkers(et,C,K+1);null!==nt&&B.add(nt)}var ot=!t[b][K+1]||t[b][K+1]>t[b][K]?"top":"bottom",rt=new D(this.ctx).drawDataLabel(et,C,K+1,null,ot);null!==rt&&$.add(rt)}v.push(T),n.globals.seriesXvalues[C]=E,n.globals.seriesYvalues[C]=T,this.pointsChart||n.globals.delayedElements.push({el:B.node,index:C});var st={i:b,realIndex:C,animationDelay:b,initialSpeed:n.config.chart.animations.speed,dataChangeSpeed:n.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(a),id:"apexcharts-".concat(a)};if("area"===a)for(var at=s.fillPath({seriesNumber:C}),lt=0;lt<H.length;lt++){var ct=o.renderPaths(r({},st,{pathFrom:F,pathTo:H[lt],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:at}));z.add(ct)}if(n.config.stroke.show&&!this.pointsChart){var dt;dt="line"===a?s.fillPath({seriesNumber:C,i:b}):n.globals.stroke.colors[C];for(var ht=0;ht<N.length;ht++){var ut=o.renderPaths(r({},st,{pathFrom:O,pathTo:N[ht],stroke:dt,strokeWidth:Array.isArray(n.config.stroke.width)?n.config.stroke.width[C]:n.config.stroke.width,strokeLineCap:n.config.stroke.lineCap,fill:"none"}));z.add(ut)}}z.add(B),z.add($),m.push(z)}for(var pt=m.length;pt>0;pt--)l.add(m[pt-1]);return l}},{key:"createPaths",value:function(t){var e=t.series,i=t.i,n=t.j,o=t.x,r=t.y,s=t.pX,a=t.pY,l=t.xDivision,c=t.areaBottomY,d=t.linePath,h=t.areaPath,u=t.linePaths,p=t.areaPaths,g=t.seriesIndex,m=this.w,v=new f(this.ctx),y=m.config.stroke.curve;if(Array.isArray(m.config.stroke.curve)&&(y=Array.isArray(g)?m.config.stroke.curve[g[i]]:m.config.stroke.curve[i]),"smooth"===y){var b=.35*(o-s);m.globals.hasNullValues?(null!==e[i][n]&&(null!==e[i][n+1]?(d=v.move(s,a)+v.curve(s+b,a,o-b,r,o+1,r),h=v.move(s+1,a)+v.curve(s+b,a,o-b,r,o+1,r)+v.line(o,c)+v.line(s,c)+"z"):(d=v.move(s,a),h=v.move(s,a)+"z")),u.push(d),p.push(h)):(d+=v.curve(s+b,a,o-b,r,o,r),h+=v.curve(s+b,a,o-b,r,o,r)),s=o,a=r,n===e[i].length-2&&(h=h+v.curve(s,a,o,r,o,c)+v.move(o,r)+"z",m.globals.hasNullValues||(u.push(d),p.push(h)))}else null===e[i][n+1]&&(d+=v.move(o,r),h=h+v.line(o-l,c)+v.move(o,r)),null===e[i][n]&&(d+=v.move(o,r),h+=v.move(o,c)),"stepline"===y?(d=d+v.line(o,null,"H")+v.line(null,r,"V"),h=h+v.line(o,null,"H")+v.line(null,r,"V")):"straight"===y&&(d+=v.line(o,r),h+=v.line(o,r)),n===e[i].length-2&&(h=h+v.line(o,c)+v.move(o,r)+"z",u.push(d),p.push(h));return{linePaths:u,areaPaths:p,pX:s,pY:a,linePath:d,areaPath:h}}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,n=t.x,o=t.y,r=t.i,s=t.j,a=t.prevY,l=t.categoryAxisCorrection,c=t.xRatio,d=this.w,u=[],p=[];if(0===s){var f=l+d.config.markers.offsetX;d.globals.isXNumeric&&(f=(d.globals.seriesX[i][0]-d.globals.minX)/c+d.config.markers.offsetX),u.push(f),p.push(h.isNumber(e[r][0])?a+d.config.markers.offsetY:null),u.push(n+d.config.markers.offsetX),p.push(h.isNumber(e[r][s+1])?o+d.config.markers.offsetY:null)}else u.push(n+d.config.markers.offsetX),p.push(h.isNumber(e[r][s+1])?o+d.config.markers.offsetY:null);return{x:u,y:p}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,n=t.realIndex,o=this.w,r=0;r<o.globals.previousPaths.length;r++){var s=o.globals.previousPaths[r];("line"===s.type||"area"===s.type)&&s.paths.length>0&&parseInt(s.realIndex)===parseInt(n)&&("line"===s.type?(this.appendPathFrom=!1,e=o.globals.previousPaths[r].paths[0].d):"area"===s.type&&(this.appendPathFrom=!1,i=o.globals.previousPaths[r].paths[0].d,o.config.stroke.show&&(e=o.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e=t.i,i=t.series,n=t.yRatio,o=t.zeroY,r=t.prevY,s=t.prevSeriesY,a=t.lineYPosition,l=this.w;if(void 0!==i[e][0])r=l.config.chart.stacked?(a=e>0?s[e-1][0]:o)-i[e][0]/n+2*(this.isReversed?i[e][0]/n:0):o-i[e][0]/n+2*(this.isReversed?i[e][0]/n:0);else if(l.config.chart.stacked&&e>0&&void 0===i[e][0])for(var c=e-1;c>=0;c--)if(null!==i[c][0]&&void 0!==i[c][0]){r=a=s[c][0];break}return{prevY:r,lineYPosition:a}}}]),t}(),H=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.tooltipKeyFormat="dd MMM"}return n(t,[{key:"xLabelFormat",value:function(t,e){var i=this.w;return"datetime"===i.config.xaxis.type&&void 0===i.config.tooltip.x.formatter?new y(this.ctx).formatDate(new Date(e),i.config.tooltip.x.format,!0,!0):t(e)}},{key:"setLabelFormatters",value:function(){var t=this.w;return t.globals.xLabelFormatter=function(t){return t},t.globals.xaxisTooltipFormatter=function(t){return t},t.globals.ttKeyFormatter=function(t){return t},t.globals.ttZFormatter=function(t){return t},t.globals.legendFormatter=function(t){return t},"function"==typeof t.config.tooltip.x.formatter&&(t.globals.ttKeyFormatter=t.config.tooltip.x.formatter),"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),void 0!==t.config.xaxis.labels.formatter?t.globals.xLabelFormatter=t.config.xaxis.labels.formatter:t.globals.xLabelFormatter=function(e){return h.isNumber(e)?"numeric"===t.config.xaxis.type&&t.globals.dataPoints<50?e.toFixed(1):e.toFixed(0):e},t.config.yaxis.forEach((function(e,i){void 0!==e.labels.formatter?t.globals.yLabelFormatters[i]=e.labels.formatter:t.globals.yLabelFormatters[i]=function(i){return h.isNumber(i)?0!==t.globals.yValueDecimal?i.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:t.globals.yValueDecimal):t.globals.maxY-t.globals.minY<5?i.toFixed(1):i.toFixed(0):i}})),t.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),z=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"getLabel",value:function(t,e,i,n){var o,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=this.w,a=void 0===t[n]?"":t[n],l=s.globals.xLabelFormatter,c=s.config.xaxis.labels.formatter;return o=new H(this.ctx).xLabelFormat(l,a),void 0!==c&&(o=c(a,t[n],n)),e.length>0?(i=e[n].position,o=e[n].value):"datetime"===s.config.xaxis.type&&void 0===c&&(o=""),void 0===o&&(o=""),(0===(o=o.toString()).indexOf("NaN")||0===o.toLowerCase().indexOf("invalid")||o.toLowerCase().indexOf("infinity")>=0||r.indexOf(o)>=0&&!s.config.xaxis.labels.showDuplicates)&&(o=""),{x:i,text:o}}},{key:"drawYAxisTicks",value:function(t,e,i,n,o,r,s){var a=this.w,l=new f(this.ctx),c=a.globals.translateY;if(n.show){!0===a.config.yaxis[o].opposite&&(t+=n.width);for(var d=e;d>=0;d--){var h=c+e/10+a.config.yaxis[o].labels.offsetY-1;a.globals.isBarHorizontal&&(h=r*d);var u=l.drawLine(t+i.offsetX-n.width+n.offsetX,h+n.offsetY,t+i.offsetX+n.offsetX,h+n.offsetY,i.color);s.add(u),c+=r}}}}]),t}(),B=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var n=this.w;this.xaxisLabels=n.globals.labels.slice(),n.globals.timelineLabels.length>0&&(this.xaxisLabels=n.globals.timelineLabels.slice()),this.drawnLabels=[],"top"===n.config.xaxis.position?this.offY=0:this.offY=n.globals.gridHeight+1,this.offY=this.offY+n.config.xaxis.axisBorder.offsetY,this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.xaxisBorderWidth=n.config.xaxis.axisBorder.width,this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=n.globals.gridWidth*parseInt(this.xaxisBorderWidth)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth),this.xaxisBorderHeight=n.config.xaxis.axisBorder.height,this.yaxis=n.config.yaxis[0],this.axesUtils=new z(i)}return n(t,[{key:"drawXaxis",value:function(){var t,e=this.w,i=new f(this.ctx),n=i.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),o=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});n.add(o);for(var r=e.globals.padHorizontal,s=[],a=0;a<this.xaxisLabels.length;a++)s.push(this.xaxisLabels[a]);r=e.globals.isXNumeric?r+(t=e.globals.gridWidth/(s.length-1))/2+e.config.xaxis.labels.offsetX:r+(t=e.globals.gridWidth/s.length)+e.config.xaxis.labels.offsetX;var l=s.length;if(e.config.xaxis.labels.show)for(var c=0;c<=l-1;c++){var d=r-t/2+e.config.xaxis.labels.offsetX,h=this.axesUtils.getLabel(s,e.globals.timelineLabels,d,c,this.drawnLabels);this.drawnLabels.push(h.text);var u=28;e.globals.rotateXLabels&&(u=22);var p=i.drawText({x:h.x,y:this.offY+e.config.xaxis.labels.offsetY+u,text:"",textAnchor:"middle",fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[c]:this.xaxisForeColors,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});c===l-1&&e.globals.skipLastTimelinelabel&&(h.text=""),o.add(p),i.addTspan(p,h.text,this.xaxisFontFamily);var g=document.createElementNS(e.globals.SVGNS,"title");g.textContent=h.text,p.node.appendChild(g),r+=t}if(void 0!==e.config.xaxis.title.text){var m=i.group({class:"apexcharts-xaxis-title"}),v=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY-parseInt(this.xaxisFontSize)+e.globals.xAxisLabelsHeight+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});m.add(v),n.add(m)}if(e.config.xaxis.axisBorder.show){var y=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(y-=15);var b=i.drawLine(e.globals.padHorizontal+y+e.config.xaxis.axisBorder.offsetX,this.offY,this.xaxisBorderWidth,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);n.add(b)}return n}},{key:"drawXaxisInversed",value:function(t){var e,i,n=this.w,o=new f(this.ctx),r=n.config.yaxis[0].opposite?n.globals.translateYAxisX[t]:0,s=o.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),a=o.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+r+", 0)"});s.add(a);for(var l=[],c=0;c<this.xaxisLabels.length;c++)l.push(this.xaxisLabels[c]);i=-(e=n.globals.gridHeight/l.length)/2.2;var d=n.globals.yLabelFormatters[0],h=n.config.yaxis[0].labels;if(h.show)for(var u=0;u<=l.length-1;u++){var p=void 0===l[u]?"":l[u];p=d(p);var g=o.drawText({x:h.offsetX-15,y:i+e+h.offsetY,text:p,textAnchor:this.yaxis.opposite?"start":"end",foreColor:h.style.color?h.style.color:h.style.colors[u],fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,cssClass:"apexcharts-yaxis-label "+h.style.cssClass});if(a.add(g),0!==n.config.yaxis[t].labels.rotate){var m=o.rotateAroundCenter(g.node);g.node.setAttribute("transform","rotate(".concat(n.config.yaxis[t].labels.rotate," ").concat(m.x," ").concat(m.y,")"))}i+=e}if(void 0!==n.config.yaxis[0].title.text){var v=o.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+r+", 0)"}),y=o.drawText({x:0,y:n.globals.gridHeight/2,text:n.config.yaxis[0].title.text,textAnchor:"middle",foreColor:n.config.yaxis[0].title.style.color,fontSize:n.config.yaxis[0].title.style.fontSize,fontFamily:n.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[0].title.style.cssClass});v.add(y),s.add(v)}if(n.config.xaxis.axisBorder.show){var b=o.drawLine(n.globals.padHorizontal+n.config.xaxis.axisBorder.offsetX,this.offY,this.xaxisBorderWidth,this.offY,this.yaxis.axisBorder.color,0,this.xaxisBorderHeight);s.add(b),this.axesUtils.drawYAxisTicks(0,l.length,n.config.yaxis[0].axisBorder,n.config.yaxis[0].axisTicks,0,e,s)}return s}},{key:"drawXaxisTicks",value:function(t,e){var i=this.w,n=t;if(!(t<0||t>i.globals.gridWidth)){var o=this.offY+i.config.xaxis.axisTicks.offsetY,r=o+i.config.xaxis.axisTicks.height;if(i.config.xaxis.axisTicks.show){var s=new f(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,n+i.config.xaxis.axisTicks.offsetX,r+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);e.add(s),s.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,n=t.globals.padHorizontal;if(t.globals.timelineLabels.length>0)for(var o=0;o<i;o++)n=this.xaxisLabels[o].position,e.push(n);else for(var r=i,s=0;s<r;s++){var a=r;t.globals.isXNumeric&&"bar"!==t.config.chart.type&&(a-=1),n+=t.globals.gridWidth/a,e.push(n)}return e}},{key:"xAxisLabelCorrections",value:function(){var t=this.w,e=new f(this.ctx),i=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text"),o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text");if(t.globals.rotateXLabels||t.config.xaxis.labels.rotateAlways)for(var s=0;s<n.length;s++){var a=e.rotateAroundCenter(n[s]);a.y=a.y-1,a.x=a.x+1,n[s].setAttribute("transform","rotate(".concat(t.config.xaxis.labels.rotate," ").concat(a.x," ").concat(a.y,")")),n[s].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var l=n[s].childNodes;t.config.xaxis.labels.trim&&e.placeTextWithEllipsis(l[0],l[0].textContent,t.config.xaxis.labels.maxHeight-40)}else for(var c=t.globals.gridWidth/t.globals.labels.length,d=0;d<n.length;d++){var h=n[d].childNodes;t.config.xaxis.labels.trim&&"datetime"!==t.config.xaxis.type&&e.placeTextWithEllipsis(h[0],h[0].textContent,c)}if(o.length>0){var u=o[o.length-1].getBBox(),p=o[0].getBBox();u.x<-20&&o[o.length-1].parentNode.removeChild(o[o.length-1]),p.x+p.width>t.globals.gridWidth&&o[0].parentNode.removeChild(o[0]);for(var g=0;g<r.length;g++)e.placeTextWithEllipsis(r[g],r[g].textContent,t.config.yaxis[0].labels.maxWidth-2*parseInt(t.config.yaxis[0].title.style.fontSize)-20)}}}]),t}(),$=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var n=this.w;this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.axisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.xAxisoffX=0,"bottom"===n.config.xaxis.position&&(this.xAxisoffX=n.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new z(i)}return n(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new f(this.ctx),n=e.config.yaxis[t].labels.style.fontSize,o=e.config.yaxis[t].labels.style.fontFamily,r=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate("+e.globals.translateYAxisX[t]+", 0)"});if(!e.config.yaxis[t].show)return r;var s=i.group({class:"apexcharts-yaxis-texts-g"});r.add(s);var a=e.globals.yAxisScale[t].result.length-1,l=e.globals.gridHeight/a+.1,c=e.globals.translateY,d=e.globals.yLabelFormatters[t],h=e.globals.yAxisScale[t].result.slice();if(e.config.yaxis[t]&&e.config.yaxis[t].reversed&&h.reverse(),e.config.yaxis[t].labels.show)for(var u=a;u>=0;u--){var p=h[u];p=d(p,u);var g=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(g*=-1);var m=i.drawText({x:g,y:c+a/10+e.config.yaxis[t].labels.offsetY+1,text:p,textAnchor:e.config.yaxis[t].opposite?"start":"end",fontSize:n,fontFamily:o,foreColor:e.config.yaxis[t].labels.style.color,cssClass:"apexcharts-yaxis-label "+e.config.yaxis[t].labels.style.cssClass});s.add(m);var v=i.rotateAroundCenter(m.node);0!==e.config.yaxis[t].labels.rotate&&m.node.setAttribute("transform","rotate(".concat(e.config.yaxis[t].labels.rotate," ").concat(v.x," ").concat(v.y,")")),c+=l}if(void 0!==e.config.yaxis[t].title.text){var y=i.group({class:"apexcharts-yaxis-title"}),b=0;e.config.yaxis[t].opposite&&(b=e.globals.translateYAxisX[t]);var x=i.drawText({x:b,y:e.globals.gridHeight/2+e.globals.translateY,text:e.config.yaxis[t].title.text,textAnchor:"end",foreColor:e.config.yaxis[t].title.style.color,fontSize:e.config.yaxis[t].title.style.fontSize,fontFamily:e.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[t].title.style.cssClass});y.add(x),r.add(y)}var w=e.config.yaxis[t].axisBorder;if(w.show){var S=31+w.offsetX;e.config.yaxis[t].opposite&&(S=-31-w.offsetX);var C=i.drawLine(S,e.globals.translateY+w.offsetY-2,S,e.globals.gridHeight+e.globals.translateY+w.offsetY+2,w.color);r.add(C),this.axesUtils.drawYAxisTicks(S,a,w,e.config.yaxis[t].axisTicks,t,l,r)}return r}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new f(this.ctx),n=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),o=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});n.add(o);var r=e.globals.yAxisScale[t].result.length-1,s=e.globals.gridWidth/r+.1,a=s+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=e.globals.yAxisScale[t].result.slice(),d=e.globals.invertedTimelineLabels;d.length>0&&(this.xaxisLabels=d.slice(),r=(c=d.slice()).length),e.config.yaxis[t]&&e.config.yaxis[t].reversed&&c.reverse();var h=d.length;if(e.config.xaxis.labels.show)for(var u=h?0:r;h?u<h-1:u>=0;h?u++:u--){var p=c[u];p=l(p,u);var g=e.globals.gridWidth+e.globals.padHorizontal-(a-s+e.config.xaxis.labels.offsetX);if(d.length){var m=this.axesUtils.getLabel(c,d,g,u,this.drawnLabels);g=m.x,p=m.text,this.drawnLabels.push(m.text)}var v=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30,text:"",textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});o.add(v),v.tspan(p);var y=document.createElementNS(e.globals.SVGNS,"title");y.textContent=p,v.node.appendChild(y),a+=s}if(void 0!==e.config.xaxis.title.text){var b=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),x=i.drawText({x:e.globals.gridWidth/2,y:this.xAxisoffX+parseInt(this.xaxisFontSize)+parseInt(e.config.xaxis.title.style.fontSize)+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});b.add(x),n.add(b)}var w=e.config.yaxis[t].axisBorder;if(w.show){var S=i.drawLine(e.globals.padHorizontal+w.offsetX,1+w.offsetY,e.globals.padHorizontal+w.offsetX,e.globals.gridHeight+w.offsetY,w.color);n.add(S)}return n}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,n=new f(this.ctx),o={width:0,height:0},r={width:0,height:0},s=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g"));null!==s&&(o=s.getBoundingClientRect());var a=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text"));if(null!==a&&(r=a.getBoundingClientRect()),null!==a){var l=this.xPaddingForYAxisTitle(t,o,r,e);a.setAttribute("x",l.xPos-(e?10:0))}if(null!==a){var c=n.rotateAroundCenter(a);e?a.setAttribute("transform","rotate(".concat(i.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")")):a.setAttribute("transform","rotate(-".concat(i.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,n){var o=this.w,r=0,s=0,a=10;return void 0===o.config.yaxis[t].title.text||t<0?{xPos:s,padd:0}:(n?(s=e.width+o.config.yaxis[t].title.offsetX+i.width/2+a/2,0===(r+=1)&&(s-=a/2)):(s=-1*e.width+o.config.yaxis[t].title.offsetX+a/2+i.width/2,o.globals.isBarHorizontal&&(a=25,s=-1*e.width-o.config.yaxis[t].title.offsetX-a)),{xPos:s,padd:a})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,n=0,o=0,r=21,s=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(a,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!a.show||a.floating||0===t[l].width,d=t[l].width+e[l].width;a.opposite?i.globals.isBarHorizontal?(o=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=o-a.labels.offsetX):(o=i.globals.gridWidth+i.globals.translateX+s,c||(s=s+d+20),i.globals.translateYAxisX[l]=o-a.labels.offsetX+20):(n=i.globals.translateX-r,c||(r=r+d+20),i.globals.translateYAxisX[l]=n+a.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis");(e=h.listToArray(e)).forEach((function(e,i){var n=t.config.yaxis[i];if(void 0!==n.labels.align){var o=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));r=h.listToArray(r);var s=o.getBoundingClientRect();"left"===n.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","start")})),n.opposite||o.setAttribute("transform","translate(-".concat(s.width,", 0)"))):"center"===n.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","middle")})),o.setAttribute("transform","translate(".concat(s.width/2*(n.opposite?1:-1),", 0)"))):"right"===n.labels.align&&(r.forEach((function(t,e){t.setAttribute("text-anchor","end")})),n.opposite&&o.setAttribute("transform","translate(".concat(s.width,", 0)")))}}))}}]),t}(),j=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"niceScale",value:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10,r=this.w,s=void 0===this.w.config.yaxis[n].max&&void 0===this.w.config.yaxis[n].min||this.w.config.yaxis[n].forceNiceScale;if(t===Number.MIN_VALUE&&0===e||!h.isNumber(t)&&!h.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)return t=0,e=o,this.linearScale(t,e,o);t>e?(console.warn("yaxis.min cannot be greater than yaxis.max"),e=t+.1):t===e&&(t=0===t?0:t-.5,e=0===e?2:e+.5);var a=[],l=Math.abs(e-t);l<1&&s&&("candlestick"===r.config.chart.type||"candlestick"===r.config.series[n].type||r.globals.isRangeData)&&(e*=1.01),l<1e-5&&s&&e<10?e*=1.05:i>.1&&i<3&&s&&(e+=i/3);var c=o+1;c<2?c=2:c>2&&(c-=2);for(var d=l/c,u=Math.floor(h.log10(d)),p=Math.pow(10,u),f=parseInt(d/p)*p,g=f*Math.floor(t/f),m=f*Math.ceil(e/f),v=g;a.push(v),!((v+=f)>m););if(s)return{result:a,niceMin:a[0],niceMax:a[a.length-1]};var y=t;(a=[]).push(y);for(var b=Math.abs(e-t)/o,x=0;x<=o-1;x++)y+=b,a.push(y);return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=Math.abs(e-t)/i;i===Number.MAX_VALUE&&(i=10,n=1);for(var o=[],r=t;i>=0;)o.push(r),r+=n,i-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}},{key:"logarithmicScale",value:function(t,e,i,n){(e<0||e===Number.MIN_VALUE)&&(e=.01);for(var o=Math.log(e)/Math.log(10),r=Math.log(i)/Math.log(10),s=Math.abs(i-e)/n,a=[],l=e;n>=0;)a.push(l),l+=s,n-=1;var c=a.map((function(t,n){t<=0&&(t=.01);var s=(r-o)/(i-e),a=Math.pow(10,o+s*(t-o));return Math.round(a/h.roundToBase(a,10))*h.roundToBase(a,10)}));return 0===c[0]&&(c[0]=1),{result:c,niceMin:c[0],niceMax:c[c.length-1]}}},{key:"setYScaleForIndex",value:function(t,e,i){var n=this.w.globals,o=this.w.config,r=n.isBarHorizontal?o.xaxis:o.yaxis[t];if(void 0===n.yAxisScale[t]&&(n.yAxisScale[t]=[]),r.logarithmic)n.allSeriesCollapsed=!1,n.yAxisScale[t]=this.logarithmicScale(t,e,i,r.tickAmount?r.tickAmount:Math.floor(Math.log10(i)));else if(i!==-Number.MAX_VALUE&&h.isNumber(i))if(n.allSeriesCollapsed=!1,void 0===r.min&&void 0===r.max||r.forceNiceScale){var s=Math.abs(i-e);n.yAxisScale[t]=this.niceScale(e,i,s,t,r.tickAmount?r.tickAmount:s<5&&s>1?s+1:5)}else n.yAxisScale[t]=this.linearScale(e,i,r.tickAmount);else n.yAxisScale[t]=this.linearScale(0,5,5)}},{key:"setMultipleYScales",value:function(){var t=this,e=this.w.globals,i=this.w.config,n=e.minYArr.concat([]),o=e.maxYArr.concat([]),r=[];i.yaxis.forEach((function(s,a){var l=a;i.series.forEach((function(t,i){t.name===s.seriesName&&-1===e.collapsedSeriesIndices.indexOf(i)&&(l=i,a!==i?r.push({index:i,similarIndex:a,alreadyExists:!0}):r.push({index:i}))}));var c=n[l],d=o[l];t.setYScaleForIndex(a,c,d)})),this.sameScaleInMultipleAxes(n,o,r)}},{key:"sameScaleInMultipleAxes",value:function(t,e,i){var n=this,o=this.w.config,r=this.w.globals,s=[];i.forEach((function(t){t.alreadyExists&&(void 0===s[t.index]&&(s[t.index]=[]),s[t.index].push(t.index),s[t.index].push(t.similarIndex))})),s.forEach((function(t,e){s.forEach((function(i,n){var o,r;e!==n&&(o=t,r=i,o.filter((function(t){return-1!==r.indexOf(t)}))).length>0&&(s[e]=s[e].concat(s[n]))}))}));var a=s.map((function(t){return t.filter((function(e,i){return t.indexOf(e)===i}))})).map((function(t){return t.sort()}));s=s.filter((function(t){return!!t}));var l=a.slice(),c=l.map((function(t){return JSON.stringify(t)}));l=l.filter((function(t,e){return c.indexOf(JSON.stringify(t))===e}));var d=[],h=[];t.forEach((function(t,i){l.forEach((function(n,o){n.indexOf(i)>-1&&(void 0===d[o]&&(d[o]=[],h[o]=[]),d[o].push({key:i,value:t}),h[o].push({key:i,value:e[i]}))}))}));var u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),p=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);d.forEach((function(t,e){t.forEach((function(t,i){u[e]=Math.min(t.value,u[e])}))})),h.forEach((function(t,e){t.forEach((function(t,i){p[e]=Math.max(t.value,p[e])}))})),t.forEach((function(t,e){h.forEach((function(t,i){var s=u[i],a=p[i];t.forEach((function(i,l){t[l].key===e&&(void 0!==o.yaxis[e].min&&(s="function"==typeof o.yaxis[e].min?o.yaxis[e].min(r.minY):o.yaxis[e].min),void 0!==o.yaxis[e].max&&(a="function"==typeof o.yaxis[e].max?o.yaxis[e].max(r.maxY):o.yaxis[e].max),n.setYScaleForIndex(e,s,a))}))}))}))}},{key:"autoScaleY",value:function(t,e){t||(t=this);var i=[];return t.w.config.series.forEach((function(t){var n,o,r=t.data.find((function(t){return t[0]>=e.xaxis.min}))[1];o=n=r,t.data.forEach((function(t){t[0]<=e.xaxis.max&&t[0]>=e.xaxis.min&&(t[1]>o&&null!==t[1]&&(o=t[1]),t[1]<n&&null!==t[1]&&(n=t[1]))})),n*=.95,o*=1.05,i.push({min:n,max:o})})),i}}]),t}(),W=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.scales=new j(i)}return n(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=this.w.globals,r=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===n&&(n=t+1);var a=o.series,l=a,c=a;"candlestick"===this.w.config.chart.type?(l=o.seriesCandleL,c=o.seriesCandleH):o.isRangeData&&(l=o.seriesRangeStart,c=o.seriesRangeEnd);for(var d=t;d<n;d++){o.dataPoints=Math.max(o.dataPoints,a[d].length);for(var u=0;u<o.series[d].length;u++){var p=a[d][u];null!==p&&h.isNumber(p)?(r=Math.max(r,c[d][u]),e=Math.min(e,l[d][u]),i=Math.max(i,l[d][u]),"candlestick"===this.w.config.chart.type&&(r=Math.max(r,o.seriesCandleO[d][u]),r=Math.max(r,o.seriesCandleH[d][u]),r=Math.max(r,o.seriesCandleL[d][u]),i=r=Math.max(r,o.seriesCandleC[d][u])),h.isFloat(p)&&(p=h.noExponents(p),o.yValueDecimal=Math.max(o.yValueDecimal,p.toString().split(".")[1].length)),s>l[d][u]&&l[d][u]<0&&(s=l[d][u])):o.hasNullValues=!0}}return{minY:s,maxY:r,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(t.isMultipleYAxis)for(var n=0;n<t.series.length;n++){var o=this.getMinYMaxY(n,i,null,n+1);t.minYArr.push(o.minY),t.maxYArr.push(o.maxY),i=o.lowestY}var r=this.getMinYMaxY(0,i,null,t.series.length);if(t.minY=r.minY,t.maxY=r.maxY,i=r.lowestY,e.chart.stacked){for(var s=[],a=[],l=0;l<t.series[t.maxValsInArrayIndex].length;l++)for(var c=0,d=0,u=0;u<t.series.length;u++)null!==t.series[u][l]&&h.isNumber(t.series[u][l])&&(t.series[u][l]>0?c=c+parseFloat(t.series[u][l])+1e-4:d+=parseFloat(t.series[u][l])),u===t.series.length-1&&(s.push(c),a.push(d));for(var p=0;p<s.length;p++)t.maxY=Math.max(t.maxY,s[p]),t.minY=Math.min(t.minY,a[p])}if(("line"===e.chart.type||"area"===e.chart.type||"candlestick"===e.chart.type)&&t.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==t.maxY){var f=t.maxY-i;i>=0&&i<=10&&(f=0),t.minY=i-5*f/100,t.maxY=t.maxY+5*f/100}return e.yaxis.map((function(e,i){void 0!==e.max&&("number"==typeof e.max?t.maxYArr[i]=e.max:"function"==typeof e.max&&(t.maxYArr[i]=e.max(t.maxY)),t.maxY=t.maxYArr[i]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[i]=e.min:"function"==typeof e.min&&(t.minYArr[i]=e.min(t.minY)),t.minY=t.minYArr[i])})),t.isBarHorizontal&&(void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minY=e.xaxis.min),void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxY=e.xaxis.max)),t.isMultipleYAxis?(this.scales.setMultipleYScales(),t.minY=i,t.yAxisScale.forEach((function(e,i){t.minYArr[i]=e.niceMin,t.maxYArr[i]=e.niceMax}))):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.yAxisScale[0].niceMin,t.maxYArr[0]=t.yAxisScale[0].niceMax),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr}}},{key:"setXRange",value:function(){var t,e=this.w.globals,i=this.w.config,n="numeric"===i.xaxis.type||"datetime"===i.xaxis.type||"category"===i.xaxis.type&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric)for(var o=0;o<e.series.length;o++)if(e.labels[o])for(var r=0;r<e.labels[o].length;r++)null!==e.labels[o][r]&&h.isNumber(e.labels[o][r])&&(e.maxX=Math.max(e.maxX,e.labels[o][r]),e.initialmaxX=Math.max(e.maxX,e.labels[o][r]),e.minX=Math.min(e.minX,e.labels[o][r]),e.initialminX=Math.min(e.minX,e.labels[o][r]));if(e.noLabelsProvided&&0===i.xaxis.categories.length&&(e.maxX=e.labels[e.labels.length-1],e.initialmaxX=e.labels[e.labels.length-1],e.minX=1,e.initialminX=1),(e.comboChartsHasBars||"candlestick"===i.chart.type||"bar"===i.chart.type&&e.isXNumeric)&&("category"!==i.xaxis.type||e.isXNumeric)){var s=e.minX-e.svgWidth/e.dataPoints*(Math.abs(e.maxX-e.minX)/e.svgWidth)/2;e.minX=s,e.initialminX=s;var a=e.maxX+e.svgWidth/e.dataPoints*(Math.abs(e.maxX-e.minX)/e.svgWidth)/2;e.maxX=a,e.initialmaxX=a}if(!e.isXNumeric&&!e.noLabelsProvided||i.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric||(void 0===i.xaxis.tickAmount?(t=Math.round(e.svgWidth/150),"numeric"===i.xaxis.type&&e.dataPoints<20&&(t=e.dataPoints-1),t>e.dataPoints&&0!==e.dataPoints&&(t=e.dataPoints-1)):t="dataPoints"===i.xaxis.tickAmount?e.series[e.maxValsInArrayIndex].length-1:i.xaxis.tickAmount,void 0!==i.xaxis.max&&"number"==typeof i.xaxis.max&&(e.maxX=i.xaxis.max),void 0!==i.xaxis.min&&"number"==typeof i.xaxis.min&&(e.minX=i.xaxis.min),void 0!==i.xaxis.range&&(e.minX=e.maxX-i.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE?e.xAxisScale=this.scales.linearScale(e.minX,e.maxX,t):(e.xAxisScale=this.scales.linearScale(1,t,t),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,t-1),e.seriesX=e.labels.slice())),n&&(e.labels=e.xAxisScale.result.slice())),e.minX===e.maxX)if("datetime"===i.xaxis.type){var l=new Date(e.minX);l.setDate(l.getDate()-2),e.minX=new Date(l).getTime();var c=new Date(e.maxX);c.setDate(c.getDate()+2),e.maxX=new Date(c).getTime()}else("numeric"===i.xaxis.type||"category"===i.xaxis.type&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.maxX=e.maxX+2);return e.isXNumeric&&(e.seriesX.forEach((function(t,i){t.forEach((function(t,n){if(n>0){var o=t-e.seriesX[i][n-1];e.minXDiff=Math.min(o,e.minXDiff)}}))})),this.calcMinXDiffForTinySeries()),{minX:e.minX,maxX:e.maxX}}},{key:"calcMinXDiffForTinySeries",value:function(){var t=this.w,e=t.globals.labels.length;return 1===t.globals.labels.length?t.globals.minXDiff=(t.globals.maxX-t.globals.minX)/e/3:t.globals.minXDiff===Number.MAX_VALUE&&(t.globals.timelineLabels.length>0&&(e=t.globals.timelineLabels.length),e<3&&(e=3),t.globals.minXDiff=(t.globals.maxX-t.globals.minX)/e),t.globals.minXDiff}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e<t.series.length;e++)if(void 0!==t.seriesZ[e])for(var i=0;i<t.seriesZ[e].length;i++)null!==t.seriesZ[e][i]&&h.isNumber(t.seriesZ[e][i])&&(t.maxZ=Math.max(t.maxZ,t.seriesZ[e][i]),t.minZ=Math.min(t.minZ,t.seriesZ[e][i]))}}]),t}(),Y=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series")}},{key:"getSeriesByName",value:function(t){return this.w.globals.dom.baseEl.querySelector("[seriesName='".concat(h.escapeString(t),"']"))}},{key:"addCollapsedClassToSeries",value:function(t,e){var i=this.w;function n(i){for(var n=0;n<i.length;n++)i[n].index===e&&t.node.classList.add("apexcharts-series-collapsed")}n(i.globals.collapsedSeries),n(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeriesOnHover",value:function(t,e){var i=this.w,n=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series");if("mousemove"===t.type){var o=parseInt(e.getAttribute("rel"))-1,r=null;r=i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(o,"']")):i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(o+1,"']")):i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(o+1,"'] path"));for(var s=0;s<n.length;s++)n[s].classList.add("legend-mouseover-inactive");null!==r&&(i.globals.axisCharts||r.parentNode.classList.remove("legend-mouseover-inactive"),r.classList.remove("legend-mouseover-inactive"))}else if("mouseout"===t.type)for(var a=0;a<n.length;a++)n[a].classList.remove("legend-mouseover-inactive")}},{key:"highlightRangeInSeries",value:function(t,e){var i=this.w,n=i.globals.dom.baseEl.querySelectorAll(".apexcharts-heatmap-rect"),o=function(){for(var t=0;t<n.length;t++)n[t].classList.remove("legend-mouseover-inactive")};if("mousemove"===t.type){var r=parseInt(e.getAttribute("rel"))-1;o(),function(){for(var t=0;t<n.length;t++)n[t].classList.add("legend-mouseover-inactive")}(),function(t){for(var e=0;e<n.length;e++){var i=parseInt(n[e].getAttribute("val"));i>=t.from&&i<=t.to&&n[e].classList.remove("legend-mouseover-inactive")}}(i.config.plotOptions.heatmap.colorScale.ranges[r])}else"mouseout"===t.type&&o()}},{key:"getActiveSeriesIndex",value:function(){var t=this.w,e=0;if(t.globals.series.length>1)for(var i=t.globals.series.map((function(e,i){return e.length>0&&"bar"!==t.config.series[i].type&&"column"!==t.config.series[i].type?i:-1})),n=0;n<i.length;n++)if(-1!==i[n]){e=i[n];break}return e}},{key:"getActiveConfigSeriesIndex",value:function(){var t=this.w,e=0;if(t.config.series.length>1)for(var i=t.config.series.map((function(t,e){return t.data&&t.data.length>0?e:-1})),n=0;n<i.length;n++)if(-1!==i[n]){e=i[n];break}return e}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,n){for(var o=e[i].childNodes,r={type:n,paths:[],realIndex:e[i].getAttribute("data:realIndex")},s=0;s<o.length;s++)if(o[s].hasAttribute("pathTo")){var a=o[s].getAttribute("pathTo");r.paths.push({d:a})}t.globals.previousPaths.push(r)}t.globals.previousPaths=[];var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-series");if(i.length>0)for(var n=i.length-1;n>=0;n--)e(i,n,"line");var o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-area-series .apexcharts-series");if(o.length>0)for(var r=o.length-1;r>=0;r--)e(o,r,"area");var s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series .apexcharts-series");if(s.length>0)for(var a=0;a<s.length;a++)e(s,a,"bar");var l=t.globals.dom.baseEl.querySelectorAll(".apexcharts-candlestick-series .apexcharts-series");if(l.length>0)for(var c=0;c<l.length;c++)e(l,c,"candlestick");var d=t.globals.dom.baseEl.querySelectorAll(".apexcharts-radar-series .apexcharts-series");if(d.length>0)for(var h=0;h<d.length;h++)e(d,h,"radar");var u=t.globals.dom.baseEl.querySelectorAll(".apexcharts-bubble-series .apexcharts-series");if(u.length>0)for(var p=0;p<u.length;p++){for(var f=t.globals.dom.baseEl.querySelectorAll(".apexcharts-bubble-series .apexcharts-series[data\\:realIndex='".concat(p,"'] circle")),g=[],m=0;m<f.length;m++)g.push({x:f[m].getAttribute("cx"),y:f[m].getAttribute("cy"),r:f[m].getAttribute("r")});t.globals.previousPaths.push(g)}var v=t.globals.dom.baseEl.querySelectorAll(".apexcharts-scatter-series .apexcharts-series");if(v.length>0)for(var y=0;y<v.length;y++){for(var b=t.globals.dom.baseEl.querySelectorAll(".apexcharts-scatter-series .apexcharts-series[data\\:realIndex='".concat(y,"'] circle")),x=[],w=0;w<b.length;w++)x.push({x:b[w].getAttribute("cx"),y:b[w].getAttribute("cy"),r:b[w].getAttribute("r")});t.globals.previousPaths.push(x)}var S=t.globals.dom.baseEl.querySelectorAll(".apexcharts-heatmap .apexcharts-series");if(S.length>0)for(var C=0;C<S.length;C++){for(var k=t.globals.dom.baseEl.querySelectorAll(".apexcharts-heatmap .apexcharts-series[data\\:realIndex='".concat(C,"'] rect")),_=[],T=0;T<k.length;T++)_.push({color:k[T].getAttribute("color")});t.globals.previousPaths.push(_)}t.globals.axisCharts||(t.globals.previousPaths=t.globals.series)}},{key:"handleNoData",value:function(){var t=this.w,e=t.config.noData,i=new f(this.ctx),n=t.globals.svgWidth/2,o=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(n=10,r="start"):"right"===e.align&&(n=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?o=50:"bottom"===e.verticalAlign&&(o=t.globals.svgHeight-50),n+=e.offsetX,o=o+parseInt(e.style.fontSize)+2,void 0!==e.text&&""!==e.text){var s=i.drawText({x:n,y:o,text:e.text,textAnchor:r,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,class:"apexcharts-text-nodata"});s.node.setAttribute("class","apexcharts-title-text"),t.globals.dom.Paper.add(s)}}},{key:"setNullSeriesToZeroValues",value:function(t){for(var e=this.w,i=0;i<t.length;i++)if(0===t[i].length)for(var n=0;n<t[e.globals.maxValsInArrayIndex].length;n++)t[i].push(0);return t}},{key:"hasAllSeriesEqualX",value:function(){for(var t=!0,e=this.w,i=this.filteredSeriesX(),n=0;n<i.length-1;n++)if(i[n][0]!==i[n+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}},{key:"filteredSeriesX",value:function(){return this.w.globals.seriesX.map((function(t,e){return t.length>0?t:[]}))}}]),t}(),X=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.lgRect={},this.yAxisWidth=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.xPadRight=0,this.xPadLeft=0}return n(t,[{key:"plotCoords",value:function(){var t=this.w,e=t.globals,i=this.getLegendsRect();e.axisCharts?this.setGridCoordsForAxisCharts(i):this.setGridCoordsForNonAxisCharts(i),this.titleSubtitleOffset(),e.gridHeight=e.gridHeight-t.config.grid.padding.top-t.config.grid.padding.bottom,e.gridWidth=e.gridWidth-t.config.grid.padding.left-t.config.grid.padding.right-this.xPadRight-this.xPadLeft,e.translateX=e.translateX+t.config.grid.padding.left+this.xPadLeft,e.translateY=e.translateY+t.config.grid.padding.top}},{key:"conditionalChecksForAxisCoords",value:function(t,e){var i=this.w;this.xAxisHeight=(t.height+e.height)*i.globals.LINE_HEIGHT_RATIO+15,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0),i.globals.isBarHorizontal?this.yAxisWidth=i.globals.yLabelsCoords[0].width+i.globals.yTitleCoords[0].width+15:this.yAxisWidth=this.getTotalYAxisWidth();var n=0,o=0;i.config.yaxis.forEach((function(t){n+=t.labels.minWidth,o+=t.labels.maxWidth})),this.yAxisWidth<n&&(this.yAxisWidth=n),this.yAxisWidth>o&&(this.yAxisWidth=o)}},{key:"setGridCoordsForAxisCharts",value:function(t){var e=this.w,i=e.globals,n=this.getyAxisLabelsCoords(),o=this.getxAxisLabelsCoords(),r=this.getyAxisTitleCoords(),s=this.getxAxisTitleCoords();e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:n[i].width,index:i}),e.globals.yTitleCoords.push({width:r[i].width,index:i})})),this.conditionalChecksForAxisCoords(o,s),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var a=this.yAxisWidth,l=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight,i.xAxisHeight=this.xAxisHeight;var c=10;switch(e.config.grid.show&&"radar"!==e.config.chart.type||(a=0,l=35),this.isSparkline&&(t={height:0,width:0},l=0,a=0,c=0),this.additionalPaddingXLabels(o),e.config.legend.position){case"bottom":i.translateY=c,i.translateX=a,i.gridHeight=i.svgHeight-t.height-l-(this.isSparkline?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-a;break;case"top":i.translateY=t.height+c,i.translateX=a,i.gridHeight=i.svgHeight-t.height-l-(this.isSparkline?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-a;break;case"left":i.translateY=c,i.translateX=t.width+a,i.gridHeight=i.svgHeight-l-12,i.gridWidth=i.svgWidth-t.width-a;break;case"right":i.translateY=c,i.translateX=a,i.gridHeight=i.svgHeight-l-12,i.gridWidth=i.svgWidth-t.width-a-5;break;default:throw new Error("Legend position not supported")}this.setGridXPosForDualYAxis(r,n),new $(this.ctx).setYAxisXPosition(n,r)}},{key:"setGridCoordsForNonAxisCharts",value:function(t){var e=this.w,i=e.globals,n=0;e.config.legend.show&&!e.config.legend.floating&&(n=20);var o=10,r=0;if("pie"===e.config.chart.type||"donut"===e.config.chart.type?(o+=e.config.plotOptions.pie.offsetY,r+=e.config.plotOptions.pie.offsetX):"radialBar"===e.config.chart.type&&(o+=e.config.plotOptions.radialBar.offsetY,r+=e.config.plotOptions.radialBar.offsetX),!e.config.legend.show)return i.gridHeight=i.svgHeight-35,i.gridWidth=i.gridHeight,i.translateY=o-10,void(i.translateX=r+(i.svgWidth-i.gridWidth)/2);switch(e.config.legend.position){case"bottom":i.gridHeight=i.svgHeight-t.height-35,i.gridWidth=i.gridHeight,i.translateY=o-20,i.translateX=r+(i.svgWidth-i.gridWidth)/2;break;case"top":i.gridHeight=i.svgHeight-t.height-35,i.gridWidth=i.gridHeight,i.translateY=t.height+o,i.translateX=r+(i.svgWidth-i.gridWidth)/2;break;case"left":i.gridWidth=i.svgWidth-t.width-n,i.gridHeight=i.gridWidth,i.translateY=o,i.translateX=r+t.width+n;break;case"right":i.gridWidth=i.svgWidth-t.width-n-5,i.gridHeight=i.gridWidth,i.translateY=o,i.translateX=r+10;break;default:throw new Error("Legend position not supported")}}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w;i.config.yaxis.map((function(n,o){-1===i.globals.ignoreYAxisIndexes.indexOf(o)&&!i.config.yaxis[o].floating&&i.config.yaxis[o].show&&n.opposite&&(i.globals.translateX=i.globals.translateX-(e[o].width+t[o].width)-parseInt(i.config.yaxis[o].labels.style.fontSize)/1.2-12)}))}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w;if("category"===i.config.xaxis.type&&i.globals.isBarHorizontal||"numeric"===i.config.xaxis.type||"datetime"===i.config.xaxis.type){var n=i.globals.isXNumeric;i.config.yaxis.forEach((function(o,r){var s;(!o.show||o.floating||-1!==i.globals.collapsedSeriesIndices.indexOf(r)||n||o.opposite&&i.globals.isBarHorizontal)&&((n&&i.globals.isMultipleYAxis&&-1!==i.globals.collapsedSeriesIndices.indexOf(r)||i.globals.isBarHorizontal&&o.opposite)&&(s=t,i.config.grid.padding.left<s.width&&(e.xPadLeft=s.width/2+1)),(!i.globals.isBarHorizontal&&o.opposite&&-1!==i.globals.collapsedSeriesIndices.indexOf(r)||n&&!i.globals.isMultipleYAxis)&&function(t){e.timescaleLabels?e.timescaleLabels[e.timescaleLabels.length-1].position+t.width>i.globals.gridWidth?i.globals.skipLastTimelinelabel=!0:i.globals.skipLastTimelinelabel=!1:"datetime"!==i.config.xaxis.type&&i.config.grid.padding.right<t.width&&(e.xPadRight=t.width/2+1)}(t))}))}}},{key:"titleSubtitleOffset",value:function(){var t=this.w,e=t.globals,i=this.isSparkline||!t.globals.axisCharts?0:10;void 0!==t.config.title.text?i+=t.config.title.margin:i+=this.isSparkline||!t.globals.axisCharts?0:5,void 0!==t.config.subtitle.text?i+=t.config.subtitle.margin:i+=this.isSparkline||!t.globals.axisCharts?0:5,t.config.legend.show&&"bottom"===t.config.legend.position&&!t.config.legend.floating&&t.config.series.length>1&&(i+=10);var n=this.getTitleSubtitleCoords("title"),o=this.getTitleSubtitleCoords("subtitle");e.gridHeight=e.gridHeight-n.height-o.height-i,e.translateY=e.translateY+n.height+o.height+i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=10,n=function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1};return t.globals.yLabelsCoords.map((function(o,r){var s=t.config.yaxis[r].floating;o.width>0&&!s?(e=e+o.width+i,n(r)&&(e=e-o.width-i)):e+=s||!t.config.yaxis[r].show?0:5})),t.globals.yTitleCoords.map((function(o,r){var s=t.config.yaxis[r].floating;i=parseInt(t.config.yaxis[r].title.style.fontSize),o.width>0&&!s?(e=e+o.width+i,n(r)&&(e=e-o.width-i)):e+=s||!t.config.yaxis[r].show?0:5})),e}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.timescaleLabels=e.globals.timelineLabels.slice(),e.globals.isBarHorizontal&&"datetime"===e.config.xaxis.type&&(this.timescaleLabels=e.globals.invertedTimelineLabels.slice());var i=this.timescaleLabels.map((function(t){return t.value})),n=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new f(this.ctx).getTextRects(n,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.globals.timelineLabels.length>0){var n=this.getxAxisTimeScaleLabelsCoords();t={width:n.width,height:n.height}}else{var o="left"!==e.config.legend.position||"right"!==e.config.legend.position||e.config.legend.floating?0:this.lgRect.width,r=e.globals.xLabelFormatter,s=i.reduce((function(t,e){return t.length>e.length?t:e}),0);e.globals.isBarHorizontal&&(s=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0)),s=new H(this.ctx).xLabelFormat(r,s);var a=new f(this.ctx),l=a.getTextRects(s,e.config.xaxis.labels.style.fontSize);(t={width:l.width,height:l.height}).width*i.length>e.globals.svgWidth-o-this.yAxisWidth&&0!==e.config.xaxis.labels.rotate?e.globals.isBarHorizontal||(e.globals.rotateXLabels=!0,l=a.getTextRects(s,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1),t.height=l.height/1.66):e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getyAxisLabelsCoords",value:function(){var t=this,e=this.w,i=[],n=10;return e.config.yaxis.map((function(o,r){if(o.show&&o.labels.show&&e.globals.yAxisScale[r].result.length){var s=e.globals.yLabelFormatters[r],a=s(e.globals.yAxisScale[r].niceMax,-1);void 0!==a&&0!==a.length||(a=e.globals.yAxisScale[r].niceMax),e.globals.isBarHorizontal&&(n=0,a=s(a=e.globals.labels.slice().reduce((function(t,e){return t.length>e.length?t:e}),0),-1));var l=new f(t.ctx).getTextRects(a,o.labels.style.fontSize);i.push({width:l.width+n,height:l.height})}else i.push({width:0,height:0})})),i}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var n=new f(this.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=n.width,i=n.height}return{width:e,height:i}}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,n){if(e.show&&void 0!==e.title.text){var o=new f(t.ctx).getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,"rotate(-90 0 0)",!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})})),i}},{key:"getTitleSubtitleCoords",value:function(t){var e=this.w,i=0,n=0,o="title"===t?e.config.title.floating:e.config.subtitle.floating,r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(t,"-text"));if(null!==r&&!o){var s=r.getBoundingClientRect();i=s.width,n=e.globals.axisCharts?s.height+5:s.height}return{width:i,height:n}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-legend"),i=Object.assign({},h.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.lgRect={x:i.x,y:i.y,height:i.height,width:0===i.height?0:i.width}:this.lgRect={x:0,y:0,height:0,width:0},this.lgRect}}]),t}(),V=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.timeScaleArray=[]}return n(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,n=this.w;if(n.globals.allSeriesCollapsed)return n.globals.labels=[],n.globals.timelineLabels=[],[];var o=new y(this.ctx),s=(e-t)/864e5;this.determineInterval(s),n.globals.disableZoomIn=!1,n.globals.disableZoomOut=!1,s<.005?n.globals.disableZoomIn=!0:s>5e4&&(n.globals.disableZoomOut=!0);var a=o.getTimeUnitsfromTimestamp(t,e),l=n.globals.gridWidth/s,c=l/24,d=c/60,h=Math.floor(24*s),u=Math.floor(24*s*60),p=Math.floor(s),f=Math.floor(s/30),g=Math.floor(s/365),m={minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},v={firstVal:m,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:d,numberOfMinutes:u,numberOfHours:h,numberOfDays:p,numberOfMonths:f,numberOfYears:g};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes":this.generateMinuteScale(v)}var b=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?r({},e,{value:t.value+1}):"day"===t.unit||"hour"===t.unit?r({},e,{value:t.value}):"minute"===t.unit?r({},e,{value:t.value,minute:t.value}):t}));return b.filter((function(t){var e=1,o=Math.ceil(n.globals.gridWidth/120),r=t.value;void 0!==n.config.xaxis.tickAmount&&(o=n.config.xaxis.tickAmount),b.length>o&&(e=Math.floor(b.length/o));var s=!1,a=!1;switch(i.tickInterval){case"half_year":e=7,"year"===t.unit&&(s=!0);break;case"months":e=1,"year"===t.unit&&(s=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(s=!0),30===r&&(a=!0);break;case"months_days":e=10,"month"===t.unit&&(s=!0),30===r&&(a=!0);break;case"week_days":e=8,"month"===t.unit&&(s=!0);break;case"days":e=1,"month"===t.unit&&(s=!0);break;case"hours":"day"===t.unit&&(s=!0);break;case"minutes":r%5!=0&&(a=!0)}if("minutes"===i.tickInterval||"hours"===i.tickInterval){if(!a)return!0}else if((r%e==0||s)&&!a)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,n=this.formatDates(t),o=this.removeOverlappingTS(n);e?i.globals.invertedTimelineLabels=o.slice():i.globals.timelineLabels=o.slice(),new X(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){switch(!0){case t>1825:this.tickInterval="years";break;case t>800&&t<=1825:this.tickInterval="half_year";break;case t>180&&t<=800:this.tickInterval="months";break;case t>90&&t<=180:this.tickInterval="months_fortnight";break;case t>60&&t<=90:this.tickInterval="months_days";break;case t>30&&t<=60:this.tickInterval="week_days";break;case t>2&&t<=30:this.tickInterval="days";break;case t>.1&&t<=2:this.tickInterval="hours";break;case t<.1:this.tickInterval="minutes";break;default:this.tickInterval="days"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,n=t.currentYear,o=t.daysWidthOnXAxis,r=t.numberOfYears,s=e.minYear,a=0,l=new y(this.ctx);if(e.minDate>1&&e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);a=(l.determineDaysOfYear(e.minYear)-c+1)*o,s=e.minYear+1,this.timeScaleArray.push({position:a,value:s,unit:"year",year:s,month:h.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:a,value:s,unit:"year",year:n,month:h.monthMod(i+1)});for(var d=s,u=a,p=0;p<r;p++)d++,u=l.determineDaysOfYear(d-1)*o+u,this.timeScaleArray.push({position:u,value:d,unit:"year",year:d,month:1})}},{key:"generateMonthScale",value:function(t){var e=t.firstVal,i=t.currentMonthDate,n=t.currentMonth,o=t.currentYear,r=t.daysWidthOnXAxis,s=t.numberOfMonths,a=n,l=0,c=new y(this.ctx),d="month",u=0;if(e.minDate>1){l=(c.determineDaysOfMonths(n+1,e.minYear)-i+1)*r,a=h.monthMod(n+1);var p=o+u,f=h.monthMod(a),g=a;0===a&&(d="year",g=p,f=1,p+=u+=1),this.timeScaleArray.push({position:l,value:g,unit:d,year:p,month:f})}else this.timeScaleArray.push({position:l,value:a,unit:d,year:o,month:h.monthMod(n)});for(var m=a+1,v=l,b=0,x=1;b<s;b++,x++){0===(m=h.monthMod(m))?(d="year",u+=1):d="month";var w=o+Math.floor(m/12)+u;v=c.determineDaysOfMonths(m,w)*r+v;var S=0===m?w:m;this.timeScaleArray.push({position:v,value:S,unit:d,year:w,month:0===m?1:m}),m++}}},{key:"generateDayScale",value:function(t){var e=t.firstVal,i=t.currentMonth,n=t.currentYear,o=t.hoursWidthOnXAxis,r=t.numberOfDays,s=new y(this.ctx),a="day",l=(24-e.minHour)*o,c=e.minDate+1,d=c,u=function(t,e,i){return t>s.determineDaysOfMonths(e+1,i)?(p=1,a="month",d=e+=1,e):e},p=c,f=u(p,i,n);this.timeScaleArray.push({position:l,value:d,unit:a,year:n,month:h.monthMod(f),day:p});for(var g=l,m=0;m<r;m++){a="day",f=u(p+=1,f,n+Math.floor(f/12)+0);var v=n+Math.floor(f/12)+0;g=24*o+g;var b=1===p?h.monthMod(f):p;this.timeScaleArray.push({position:g,value:b,unit:a,year:v,month:h.monthMod(f),day:b})}}},{key:"generateHourScale",value:function(t){var e=t.firstVal,i=t.currentDate,n=t.currentMonth,o=t.currentYear,r=t.minutesWidthOnXAxis,s=t.numberOfHours,a=new y(this.ctx),l="hour",c=function(t,e){return t>a.determineDaysOfMonths(e+1,o)&&(m=1,e+=1),{month:e,date:m}},d=function(t,e){return t>a.determineDaysOfMonths(e+1,o)?e+=1:e},u=60-e.minMinute,p=u*r,f=e.minHour+1,g=f+1;60===u&&(p=0,g=(f=e.minHour)+1);var m=i,v=d(m,n);this.timeScaleArray.push({position:p,value:f,unit:l,day:m,hour:g,year:o,month:h.monthMod(v)});for(var b=p,x=0;x<s;x++){l="hour",g>=24&&(g=0,l="day",v=c(m+=1,v).month,v=d(m,v));var w=o+Math.floor(v/12)+0;b=0===g&&0===x?u*r:60*r+b;var S=0===g?m:g;this.timeScaleArray.push({position:b,value:S,unit:l,hour:g,day:m,year:w,month:h.monthMod(v)}),g++}}},{key:"generateMinuteScale",value:function(t){var e=t.firstVal,i=t.currentMinute,n=t.currentHour,o=t.currentDate,r=t.currentMonth,s=t.currentYear,a=t.minutesWidthOnXAxis,l=t.numberOfMinutes,c=a-(i-e.minMinute),d=e.minMinute+1,u=d+1,p=o,f=r,g=s,m=n;this.timeScaleArray.push({position:c,value:d,unit:"minute",day:p,hour:m,minute:u,year:g,month:h.monthMod(f)});for(var v=c,y=0;y<l;y++){u>=60&&(u=0,24===(m+=1)&&(m=0));var b=s+Math.floor(f/12)+0;v=a+v;var x=u;this.timeScaleArray.push({position:v,value:x,unit:"minute",hour:m,minute:u,day:p,year:b,month:h.monthMod(f)}),u++}}},{key:"createRawDateString",value:function(t,e){var i=t.year;return i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),i+("minute"===t.unit?":"+("0"+e).slice(-2)+":00.000Z":":00:00.000Z")}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var n=t.value.toString(),o=new y(e.ctx),r=e.createRawDateString(t,n),s=new Date(Date.parse(r));if(void 0===i.config.xaxis.labels.format){var a="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(a=l.year),"month"===t.unit&&(a=l.month),"day"===t.unit&&(a=l.day),"hour"===t.unit&&(a=l.hour),"minute"===t.unit&&(a=l.minute),n=o.formatDate(s,a,!0,!1)}else n=o.formatDate(s,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:n,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e=this,i=new f(this.ctx),n=0,o=t.map((function(o,r){if(r>0&&e.w.config.xaxis.labels.hideOverlappingLabels){var s=i.getTextRects(t[n].value).width,a=t[n].position;return o.position>a+s+10?(n=r,o):null}return o}));return o.filter((function(t){return null!==t}))}}]),t}(),q=function(){function t(i,n){e(this,t),this.ctx=n,this.w=n.w,this.el=i,this.coreUtils=new x(this.ctx),this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[]}return n(t,[{key:"setupElements",value:function(){var t=this.w.globals,e=this.w.config,i=e.chart.type;t.axisCharts=["line","area","bar","rangeBar","candlestick","radar","scatter","bubble","heatmap"].indexOf(i)>-1,t.xyCharts=["line","area","bar","rangeBar","candlestick","scatter","bubble"].indexOf(i)>-1,t.isBarHorizontal=("bar"===e.chart.type||"rangeBar"===e.chart.type)&&e.plotOptions.bar.horizontal,t.chartClass=".apexcharts"+t.cuid,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),f.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas "+t.chartClass.substring(1)}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(e.chart.offsetX,", ").concat(e.chart.offsetY,")")}),t.dom.Paper.node.style.background=e.chart.background,this.setSVGDimensions(),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elWrap.appendChild(t.dom.elLegendWrap),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,n=i.config,o=i.globals,r={series:[],i:[]},s={series:[],i:[]},a={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]};o.series.map((function(e,n){void 0!==t[n].type?("column"===t[n].type||"bar"===t[n].type?(i.config.plotOptions.bar.horizontal=!1,l.series.push(e),l.i.push(n)):"area"===t[n].type?(s.series.push(e),s.i.push(n)):"line"===t[n].type?(r.series.push(e),r.i.push(n)):"scatter"===t[n].type?(a.series.push(e),a.i.push(n)):"bubble"===t[n].type||("candlestick"===t[n].type?(c.series.push(e),c.i.push(n)):console.warn("You have specified an unrecognized chart type. Available types for this propery are line/area/column/bar/scatter/bubble")),o.comboCharts=!0):(r.series.push(e),r.i.push(n))}));var d=new N(this.ctx,e),h=new I(this.ctx,e),u=new L(this.ctx),p=new O(this.ctx),f=new F(this.ctx,e),g=new R(this.ctx),m=[];if(o.comboCharts){if(s.series.length>0&&m.push(d.draw(s.series,"area",s.i)),l.series.length>0)if(i.config.chart.stacked){var v=new A(this.ctx,e);m.push(v.draw(l.series,l.i))}else{var y=new E(this.ctx,e);m.push(y.draw(l.series,l.i))}if(r.series.length>0&&m.push(d.draw(r.series,"line",r.i)),c.series.length>0&&m.push(h.draw(c.series,c.i)),a.series.length>0){var b=new N(this.ctx,e,!0);m.push(b.draw(a.series,"scatter",a.i))}}else switch(n.chart.type){case"line":m=d.draw(o.series,"line");break;case"area":m=d.draw(o.series,"area");break;case"bar":m=n.chart.stacked?new A(this.ctx,e).draw(o.series):new E(this.ctx,e).draw(o.series);break;case"candlestick":m=new I(this.ctx,e).draw(o.series);break;case"rangeBar":m=f.draw(o.series);break;case"heatmap":m=new M(this.ctx,e).draw(o.series);break;case"pie":case"donut":m=u.draw(o.series);break;case"radialBar":m=p.draw(o.series);break;case"radar":m=g.draw(o.series);break;default:m=d.draw(o.series)}return m}},{key:"setSVGDimensions",value:function(){var t=this.w.globals,e=this.w.config;t.svgWidth=e.chart.width,t.svgHeight=e.chart.height;var i=h.getDimensions(this.el),n=e.chart.width.toString().split(/[0-9]+/g).pop();if("%"===n?h.isNumber(i[0])&&(0===i[0].width&&(i=h.getDimensions(this.el.parentNode)),t.svgWidth=i[0]*parseInt(e.chart.width)/100):"px"!==n&&""!==n||(t.svgWidth=parseInt(e.chart.width)),"auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===e.chart.height.toString().split(/[0-9]+/g).pop()){var o=h.getDimensions(this.el.parentNode);t.svgHeight=o[1]*parseInt(e.chart.height)/100}else t.svgHeight=parseInt(e.chart.height);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth;f.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight});var r=e.chart.sparkline.enabled?0:t.axisCharts?e.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+r+"px",t.dom.elWrap.style.width=t.svgWidth+"px",t.dom.elWrap.style.height=t.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i={transform:"translate("+t.translateX+", "+e+")"};f.setAttrs(t.dom.elGraphical.node,i)}},{key:"coreCalculations",value:function(){new W(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this.w.globals;t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesPercent=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.stackedSeriesTotals=[],t.labels=[],t.timelineLabels=[],t.noLabelsProvided=!1,t.timescaleTicks=[],t.resizeTimer=null,t.selectionResizeTimer=null,t.seriesXvalues=this.w.config.series.map((function(t){return[]})),t.seriesYvalues=this.w.config.series.map((function(t){return[]})),t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.isDataXYZ=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialmaxX=-Number.MAX_VALUE,t.initialminX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.config.chart.stacked=!1,this.w.globals.isMultipleYAxis=!0,!0}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var t=this,e=this.w;e.globals.ignoreYAxisIndexes=e.globals.collapsedSeries.map((function(e,i){if(t.w.globals.isMultipleYAxis)return e.index}))}},{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Y(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Y(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,n=this.w.globals,o=0;o<t[e].data.length;o++)if(void 0!==t[e].data[o][1]&&(Array.isArray(t[e].data[o][1])&&4===t[e].data[o][1].length?this.twoDSeries.push(h.parseNumber(t[e].data[o][1][3])):this.twoDSeries.push(h.parseNumber(t[e].data[o][1])),n.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var r=new Date(t[e].data[o][0]);r=new Date(r).getTime(),this.twoDSeriesX.push(r)}else this.twoDSeriesX.push(t[e].data[o][0]);for(var s=0;s<t[e].data.length;s++)void 0!==t[e].data[s][2]&&(this.threeDSeries.push(t[e].data[s][2]),n.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(t,e){var i=this.w.config,n=this.w.globals,o=new y(this.ctx),r=e;n.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);for(var s=0;s<t[e].data.length;s++)void 0!==t[e].data[s].y&&(Array.isArray(t[e].data[s].y)?this.twoDSeries.push(h.parseNumber(t[e].data[s].y[t[e].data[s].y.length-1])):this.twoDSeries.push(h.parseNumber(t[e].data[s].y)));for(var a=0;a<t[r].data.length;a++){var l="string"==typeof t[r].data[a].x,c=!!o.isValidDate(t[r].data[a].x.toString());l||c?l?"datetime"!==i.xaxis.type||n.isRangeData?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[r].data[a].x)):this.twoDSeriesX.push(o.parseDate(t[r].data[a].x)):"datetime"===i.xaxis.type?this.twoDSeriesX.push(o.parseDate(t[r].data[a].x.toString())):(n.dataFormatXNumeric=!0,n.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(t[r].data[a].x))):(n.isXNumeric=!0,n.dataFormatXNumeric=!0,this.twoDSeriesX.push(t[r].data[a].x))}if(t[e].data[0]&&void 0!==t[e].data[0].z){for(var d=0;d<t[e].data.length;d++)this.threeDSeries.push(t[e].data[d].z);n.isDataXYZ=!0}}},{key:"handleRangeData",value:function(t,e){var i=this.w.globals,n={};return this.isFormat2DArray()?n=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(n=this.handleRangeDataFormat("xy",t,e)),i.seriesRangeStart.push(n.start),i.seriesRangeEnd.push(n.end),n}},{key:"handleCandleStickData",value:function(t,e){var i=this.w.globals,n={};return this.isFormat2DArray()?n=this.handleCandleStickDataFormat("array",t,e):this.isFormatXY()&&(n=this.handleCandleStickDataFormat("xy",t,e)),i.seriesCandleO.push(n.o),i.seriesCandleH.push(n.h),i.seriesCandleL.push(n.l),i.seriesCandleC.push(n.c),n}},{key:"handleRangeDataFormat",value:function(t,e,i){var n=[],o=[],r="Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts",s=new Y(this.ctx).getActiveConfigSeriesIndex();if("array"===t){if(2!==e[s].data[0][1].length)throw new Error(r);for(var a=0;a<e[i].data.length;a++)n.push(e[i].data[a][1][0]),o.push(e[i].data[a][1][1])}else if("xy"===t){if(2!==e[s].data[0].y.length)throw new Error(r);for(var l=0;l<e[i].data.length;l++)n.push(e[i].data[l].y[0]),o.push(e[i].data[l].y[1])}return{start:n,end:o}}},{key:"handleCandleStickDataFormat",value:function(t,e,i){var n=[],o=[],r=[],s=[],a="Please provide [Open, High, Low and Close] values in valid format. Read more https://apexcharts.com/docs/series/#candlestick";if("array"===t){if(4!==e[i].data[0][1].length)throw new Error(a);for(var l=0;l<e[i].data.length;l++)n.push(e[i].data[l][1][0]),o.push(e[i].data[l][1][1]),r.push(e[i].data[l][1][2]),s.push(e[i].data[l][1][3])}else if("xy"===t){if(4!==e[i].data[0].y.length)throw new Error(a);for(var c=0;c<e[i].data.length;c++)n.push(e[i].data[c].y[0]),o.push(e[i].data[c].y[1]),r.push(e[i].data[c].y[2]),s.push(e[i].data[c].y[3])}return{o:n,h:o,l:r,c:s}}},{key:"parseDataAxisCharts",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,i=this.w.config,n=this.w.globals,o=new y(e),r=0;r<t.length;r++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[r].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==i.chart.type&&"rangeArea"!==i.chart.type&&"rangeBar"!==t[r].type&&"rangeArea"!==t[r].type||(n.isRangeData=!0,this.handleRangeData(t,r)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,r):this.isFormatXY()&&this.handleFormatXY(t,r),"candlestick"!==i.chart.type&&"candlestick"!==t[r].type||this.handleCandleStickData(t,r),n.series.push(this.twoDSeries),n.labels.push(this.twoDSeriesX),n.seriesX.push(this.twoDSeriesX),this.fallbackToCategory||(n.isXNumeric=!0);else{if("datetime"===i.xaxis.type){n.isXNumeric=!0;for(var s=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice(),a=0;a<s.length;a++)if("string"==typeof s[a]){if(!o.isValidDate(s[a]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(o.parseDate(s[a]))}n.seriesX.push(this.twoDSeriesX)}else if("numeric"===i.xaxis.type){n.isXNumeric=!0;var l=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();l.length>0&&(this.twoDSeriesX=l,n.seriesX.push(this.twoDSeriesX))}n.labels.push(this.twoDSeriesX);var c=t[r].data.map((function(t){return h.parseNumber(t)}));n.series.push(c)}n.seriesZ.push(this.threeDSeries),void 0!==t[r].name?n.seriesNames.push(t[r].name):n.seriesNames.push("series-"+parseInt(r+1))}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var n=0;n<e.series.length;n++)void 0===e.seriesNames[n]&&e.seriesNames.push("series-"+(n+1));return this.w}},{key:"handleExternalLabelsData",value:function(t){var e=this.w.config,i=this.w.globals;if(e.xaxis.categories.length>0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory)i.labels=i.labels[0];else{var n=[];if(i.axisCharts){for(var o=0;o<i.series[i.maxValsInArrayIndex].length;o++)n.push(o+1);for(var r=0;r<t.length;r++)i.seriesX.push(n);i.isXNumeric=!0}if(0===n.length){n=[0,10];for(var s=0;s<t.length;s++)i.seriesX.push(n)}i.labels=n,i.noLabelsProvided=!0}}},{key:"parseData",value:function(t){var e=this.w,i=e.config,n=e.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),n.axisCharts?this.parseDataAxisCharts(t):this.parseDataNonAxisCharts(t),this.coreUtils.getLargestSeries(),"bar"===i.chart.type&&i.chart.stacked){var o=new Y(this.ctx);n.series=o.setNullSeriesToZeroValues(n.series)}this.coreUtils.getSeriesTotals(),n.axisCharts&&this.coreUtils.getStackedSeriesTotals(),this.coreUtils.getPercentSeries(),n.dataFormatXNumeric||n.isXNumeric&&("numeric"!==i.xaxis.type||0!==i.labels.length||0!==i.xaxis.categories.length)||this.handleExternalLabelsData(t)}},{key:"xySettings",value:function(){var t=null,e=this.w;if(e.globals.axisCharts&&("back"===e.config.xaxis.crosshairs.position&&new P(this.ctx).drawXCrosshairs(),"back"===e.config.yaxis[0].crosshairs.position&&new P(this.ctx).drawYCrosshairs(),t=this.coreUtils.getCalculatedRatios(),"datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter)){var i,n=new V(this.ctx);isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?(i=n.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX),n.recalcDimensionsBasedOnFormat(i,!1)):e.globals.isBarHorizontal&&(i=n.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY),n.recalcDimensionsBasedOnFormat(i,!0))}return t}},{key:"drawAxis",value:function(t,e){var i,n,o=this.w.globals,r=this.w.config,s=new B(this.ctx),a=new $(this.ctx);o.axisCharts&&"radar"!==t&&(o.isBarHorizontal?(n=a.drawYaxisInversed(0),i=s.drawXaxisInversed(0),o.dom.elGraphical.add(i),o.dom.elGraphical.add(n)):(i=s.drawXaxis(),o.dom.elGraphical.add(i),r.yaxis.map((function(t,e){-1===o.ignoreYAxisIndexes.indexOf(e)&&(n=a.drawYaxis(e),o.dom.Paper.add(n))})))),r.yaxis.map((function(t,e){-1===o.ignoreYAxisIndexes.indexOf(e)&&a.yAxisTitleRotate(e,t.opposite)}))}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection&&(e.config.chart.brush.targets||[e.config.chart.brush.target]).forEach((function(i){var n=ApexCharts.getChartByID(i);n.w.globals.brushSource=t.ctx;var o=function(){t.ctx._updateOptions({chart:{selection:{xaxis:{min:n.w.globals.minX,max:n.w.globals.maxX}}}},!1,!1)};"function"!=typeof n.w.config.chart.events.zoomed&&(n.w.config.chart.events.zoomed=function(){o()}),"function"!=typeof n.w.config.chart.events.scrolled&&(n.w.config.chart.events.scrolled=function(){o()}),e.config.chart.events.selection=function(t,i){var o=h.clone(e.config.yaxis);e.config.chart.brush.autoScaleYaxis&&(o=new j(n).autoScaleY(n,i)),n._updateOptions({xaxis:{min:i.xaxis.min,max:i.xaxis.max},yaxis:o},!1,!1,!1)}}))}}]),t}(),U=setTimeout;function G(){}function Z(t){if(!(this instanceof Z))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],it(t,this)}function K(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,Z._immediateFn((function(){var i=1===t._state?e.onFulfilled:e.onRejected;if(null!==i){var n;try{n=i(t._value)}catch(t){return void J(e.promise,t)}Q(e.promise,n)}else(1===t._state?Q:J)(e.promise,t._value)}))):t._deferreds.push(e)}function Q(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var i=e.then;if(e instanceof Z)return t._state=3,t._value=e,void tt(t);if("function"==typeof i)return void it((n=i,o=e,function(){n.apply(o,arguments)}),t)}t._state=1,t._value=e,tt(t)}catch(e){J(t,e)}var n,o}function J(t,e){t._state=2,t._value=e,tt(t)}function tt(t){2===t._state&&0===t._deferreds.length&&Z._immediateFn((function(){t._handled||Z._unhandledRejectionFn(t._value)}));for(var e=0,i=t._deferreds.length;e<i;e++)K(t,t._deferreds[e]);t._deferreds=null}function et(t,e,i){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=i}function it(t,e){var i=!1;try{t((function(t){i||(i=!0,Q(e,t))}),(function(t){i||(i=!0,J(e,t))}))}catch(t){if(i)return;i=!0,J(e,t)}}Z.prototype.catch=function(t){return this.then(null,t)},Z.prototype.then=function(t,e){var i=new this.constructor(G);return K(this,new et(t,e,i)),i},Z.prototype.finally=function(t){var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){return e.reject(i)}))}))},Z.all=function(t){return new Z((function(e,i){if(!t||void 0===t.length)throw new TypeError("Promise.all accepts an array");var n=Array.prototype.slice.call(t);if(0===n.length)return e([]);var o=n.length;function r(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(e){r(t,e)}),i)}n[t]=s,0==--o&&e(n)}catch(t){i(t)}}for(var s=0;s<n.length;s++)r(s,n[s])}))},Z.resolve=function(t){return t&&"object"==typeof t&&t.constructor===Z?t:new Z((function(e){e(t)}))},Z.reject=function(t){return new Z((function(e,i){i(t)}))},Z.race=function(t){return new Z((function(e,i){for(var n=0,o=t.length;n<o;n++)t[n].then(e,i)}))},Z._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){U(t,0)},Z._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var nt,ot,rt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"getSvgString",value:function(){return this.w.globals.dom.Paper.svg()}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs");e&&e.setAttribute("x",-500),i&&(i.setAttribute("y1",-100),i.setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}},{key:"dataURI",value:function(){var t=this;return new Z((function(e){var i=t.w;t.cleanup();var n=document.createElement("canvas");n.width=i.globals.svgWidth,n.height=i.globals.svgHeight;var o="transparent"===i.config.chart.background?"#fff":i.config.chart.background,r=n.getContext("2d");r.fillStyle=o,r.fillRect(0,0,n.width,n.height);var s=window.URL||window.webkitURL||window,a=new Image;a.crossOrigin="anonymous";var l=t.getSvgString(),c="data:image/svg+xml,"+encodeURIComponent(l);a.onload=function(){r.drawImage(a,0,0),s.revokeObjectURL(c);var t=n.toDataURL("image/png");e(t)},a.src=c}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),".svg")}},{key:"exportToPng",value:function(){var t=this;this.dataURI().then((function(e){t.triggerDownload(e,".png")}))}},{key:"triggerDownload",value:function(t,e){var i=document.createElement("a");i.href=t,i.download=this.w.globals.chartID+e,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}]),t}(),st=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var n=this.w;this.anim=new p(this.ctx),this.xaxisLabels=n.globals.labels.slice(),this.animX=n.config.grid.xaxis.lines.animate&&n.config.chart.animations.enabled,this.animY=n.config.grid.yaxis.lines.animate&&n.config.chart.animations.enabled,n.globals.timelineLabels.length>0&&(this.xaxisLabels=n.globals.timelineLabels.slice())}return n(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new f(this.ctx);null===t&&(t=i.group({class:"apexcharts-grid"}));var n=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),o=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(o),t.add(n),t}},{key:"drawGrid",value:function(){var t=this.w,e=new B(this.ctx),i=new $(this.ctx),n=this.w.globals,o=null;if(n.axisCharts){if(t.config.grid.show)o=this.renderGrid(),n.dom.elGraphical.add(o.el),this.drawGridArea(o.el);else{var r=this.drawGridArea();n.dom.elGraphical.add(r)}null!==o&&e.xAxisLabelCorrections(o.xAxisTickWidth),i.setYAxisTextAlignments()}}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new f(this.ctx),n=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var o=0;t.config.stroke.width.forEach((function(t){o=Math.max(o,t)})),n=o}e.dom.elGridRectMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(e.cuid)),e.dom.elGridRect=i.drawRect(-n/2,-n/2,e.gridWidth+n,e.gridHeight+n,0,"#fff"),new x(this).getLargestMarkerSize();var r=t.globals.markers.largestSize+1;e.dom.elGridRectMarker=i.drawRect(-r,-r,e.gridWidth+2*r,e.gridHeight+2*r,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var s=e.dom.baseEl.querySelector("defs");s.appendChild(e.dom.elGridRectMask),s.appendChild(e.dom.elGridRectMarkerMask)}},{key:"renderGrid",value:function(){var t=this.w,e=new f(this.ctx),i=t.config.grid.strokeDashArray,n=e.group({class:"apexcharts-grid"}),o=e.group({class:"apexcharts-gridlines-horizontal"}),r=e.group({class:"apexcharts-gridlines-vertical"});n.add(o),n.add(r);for(var s,a=8,l=0;l<t.globals.series.length&&(void 0!==t.globals.yAxisScale[l]&&(a=t.globals.yAxisScale[l].result.length-1),!(a>2));l++);if(t.globals.isBarHorizontal){if(s=a,t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show)for(var c,d=t.globals.padHorizontal,h=t.globals.gridHeight,u=0;u<s+1&&(c=d=d+t.globals.gridWidth/s+.3,u!==s-1);u++){if(t.config.grid.xaxis.lines.show){var p=e.drawLine(d,0,c,h,t.config.grid.borderColor,i);p.node.classList.add("apexcharts-gridline"),r.add(p),this.animX&&this.animateLine(p,{x1:0,x2:0},{x1:d,x2:c})}new B(this.ctx).drawXaxisTicks(d,n)}if(t.config.grid.yaxis.lines.show)for(var g=0,m=0,v=t.globals.gridWidth,y=0;y<t.globals.dataPoints+1;y++){var b=e.drawLine(0,g,v,m,t.config.grid.borderColor,i);o.add(b),b.node.classList.add("apexcharts-gridline"),this.animY&&this.animateLine(b,{y1:g+20,y2:m+20},{y1:g,y2:m}),m=g+=t.globals.gridHeight/t.globals.dataPoints}}else{if(s=this.xaxisLabels.length,t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show){var x,w=t.globals.padHorizontal,S=t.globals.gridHeight;if(t.globals.timelineLabels.length>0)for(var C=0;C<s;C++){if(w=this.xaxisLabels[C].position,x=this.xaxisLabels[C].position,t.config.grid.xaxis.lines.show&&w>0&&w<t.globals.gridWidth){var k=e.drawLine(w,0,x,S,t.config.grid.borderColor,i);k.node.classList.add("apexcharts-gridline"),r.add(k),this.animX&&this.animateLine(k,{x1:0,x2:0},{x1:w,x2:x})}var _=new B(this.ctx);C===s-1&&t.globals.skipLastTimelinelabel||_.drawXaxisTicks(w,n)}else for(var T=s,D=0;D<T;D++){var E=T;if(t.globals.isXNumeric&&"bar"!==t.config.chart.type&&(E-=1),x=w+=t.globals.gridWidth/E,D===E-1)break;if(t.config.grid.xaxis.lines.show){var A=e.drawLine(w,0,x,S,t.config.grid.borderColor,i);A.node.classList.add("apexcharts-gridline"),r.add(A),this.animX&&this.animateLine(A,{x1:0,x2:0},{x1:w,x2:x})}new B(this.ctx).drawXaxisTicks(w,n)}}if(t.config.grid.yaxis.lines.show)for(var I=0,P=0,M=t.globals.gridWidth,L=0;L<a+1;L++){var R=e.drawLine(0,I,M,P,t.config.grid.borderColor,i);o.add(R),R.node.classList.add("apexcharts-gridline"),this.animY&&this.animateLine(R,{y1:I+20,y2:P+20},{y1:I,y2:P}),P=I+=t.globals.gridHeight/a}}return this.drawGridBands(n,s,a),{el:n,xAxisTickWidth:t.globals.gridWidth/s}}},{key:"drawGridBands",value:function(t,e,i){var n=this.w,o=new f(this.ctx);if(void 0!==n.config.grid.row.colors&&n.config.grid.row.colors.length>0)for(var r=0,s=n.globals.gridHeight/i,a=n.globals.gridWidth,l=0,c=0;l<i;l++,c++){c>=n.config.grid.row.colors.length&&(c=0);var d=n.config.grid.row.colors[c],h=o.drawRect(0,r,a,s,0,d,n.config.grid.row.opacity);t.add(h),h.node.classList.add("apexcharts-gridRow"),r+=n.globals.gridHeight/i}if(void 0!==n.config.grid.column.colors&&n.config.grid.column.colors.length>0)for(var u=n.globals.padHorizontal,p=n.globals.padHorizontal+n.globals.gridWidth/e,g=n.globals.gridHeight,m=0,v=0;m<e;m++,v++){v>=n.config.grid.column.colors.length&&(v=0);var y=n.config.grid.column.colors[v],b=o.drawRect(u,0,p,g,0,y,n.config.grid.column.opacity);b.node.classList.add("apexcharts-gridColumn"),t.add(b),u+=n.globals.gridWidth/e}}},{key:"animateLine",value:function(t,e,i){var n=this.w,o=n.config.chart.animations;if(o&&!n.globals.resized&&!n.globals.dataChanged){var r=o.speed;this.anim.animateLine(t,e,i,r)}}}]),t}(),at=function(){function t(i,n){e(this,t),this.ctx=i,this.w=i.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this)}return n(t,[{key:"init",value:function(){var t=this.w,e=t.globals,i=t.config;if((i.legend.showForSingleSeries&&1===e.series.length||e.series.length>1||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),h.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.getLegendStyles()):this.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"appendToForeignObject",value:function(){var t=this.w.globals,e=document.createElementNS(t.SVGNS,"foreignObject");e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("width",t.svgWidth),e.setAttribute("height",t.svgHeight),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.appendChild(t.dom.elLegendWrap),e.appendChild(this.getLegendStyles()),t.dom.Paper.node.insertBefore(e,t.dom.elGraphical.node)}},{key:"drawLegends",value:function(){var t=this.w,e=t.config.legend.fontFamily,i=t.globals.seriesNames,n=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var o=t.config.plotOptions.heatmap.colorScale.ranges;i=o.map((function(t){return t.name?t.name:t.from+" - "+t.to})),n=o.map((function(t){return t.color}))}for(var r=t.globals.legendFormatter,s=0;s<=i.length-1;s++){var a=r(i[s],{seriesIndex:s,w:t}),l=!1,c=!1;if(t.globals.collapsedSeries.length>0)for(var d=0;d<t.globals.collapsedSeries.length;d++)t.globals.collapsedSeries[d].index===s&&(l=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(var h=0;h<t.globals.ancillaryCollapsedSeriesIndices.length;h++)t.globals.ancillaryCollapsedSeriesIndices[h]===s&&(c=!0);var u=document.createElement("span");u.classList.add("apexcharts-legend-marker");var p=t.config.legend.markers.offsetX,g=t.config.legend.markers.offsetY,m=t.config.legend.markers.height,v=t.config.legend.markers.width,y=t.config.legend.markers.strokeWidth,b=t.config.legend.markers.strokeColor,w=t.config.legend.markers.radius,S=u.style;S.background=n[s],S.color=n[s],S.height=Array.isArray(m)?parseFloat(m[s])+"px":parseFloat(m)+"px",S.width=Array.isArray(v)?parseFloat(v[s])+"px":parseFloat(v)+"px",S.left=Array.isArray(p)?p[s]:p,S.top=Array.isArray(g)?g[s]:g,S.borderWidth=Array.isArray(y)?y[s]:y,S.borderColor=Array.isArray(b)?b[s]:b,S.borderRadius=Array.isArray(w)?parseFloat(w[s])+"px":parseFloat(w)+"px",t.config.legend.markers.customHTML&&(Array.isArray(t.config.legend.markers.customHTML)?u.innerHTML=t.config.legend.markers.customHTML[s]():u.innerHTML=t.config.legend.markers.customHTML()),f.setAttrs(u,{rel:s+1,"data:collapsed":l||c}),(l||c)&&u.classList.add("inactive-legend");var C=document.createElement("div"),k=document.createElement("span");k.classList.add("apexcharts-legend-text"),k.innerHTML=a;var _=t.config.legend.labels.useSeriesColors?t.globals.colors[s]:t.config.legend.labels.colors;_||(_=t.config.chart.foreColor),k.style.color=_,k.style.fontSize=parseFloat(t.config.legend.fontSize)+"px",k.style.fontFamily=e||t.config.chart.fontFamily,f.setAttrs(k,{rel:s+1,"data:collapsed":l||c}),C.appendChild(u),C.appendChild(k);var T=new x(this.ctx);t.config.legend.showForZeroSeries||0===T.getSeriesTotalByIndex(s)&&T.seriesHaveSameValues(s)&&!T.isSeriesNull(s)&&-1===t.globals.collapsedSeriesIndices.indexOf(s)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(s)&&C.classList.add("apexcharts-hidden-zero-series"),t.config.legend.showForNullSeries||T.isSeriesNull(s)&&-1===t.globals.collapsedSeriesIndices.indexOf(s)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(s)&&C.classList.add("apexcharts-hidden-null-series"),t.globals.dom.elLegendWrap.appendChild(C),t.globals.dom.elLegendWrap.classList.add(t.config.legend.horizontalAlign),t.globals.dom.elLegendWrap.classList.add("position-"+t.config.legend.position),C.classList.add("apexcharts-legend-series"),C.style.margin="".concat(t.config.legend.itemMargin.horizontal,"px ").concat(t.config.legend.itemMargin.vertical,"px"),t.globals.dom.elLegendWrap.style.width=t.config.legend.width?t.config.legend.width+"px":"",t.globals.dom.elLegendWrap.style.height=t.config.legend.height?t.config.legend.height+"px":"",f.setAttrs(C,{rel:s+1,"data:collapsed":l||c}),(l||c)&&C.classList.add("inactive-legend"),t.config.legend.onItemClick.toggleDataSeries||C.classList.add("no-click")}"heatmap"!==t.config.chart.type&&t.config.legend.onItemClick.toggleDataSeries&&t.globals.dom.elWrap.addEventListener("click",this.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&(t.globals.dom.elWrap.addEventListener("mousemove",this.onLegendHovered,!0),t.globals.dom.elWrap.addEventListener("mouseout",this.onLegendHovered,!0))}},{key:"getLegendBBox",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"setLegendWrapXY",value:function(t,e){var i=this.w,n=i.globals.dom.baseEl.querySelector(".apexcharts-legend"),o=n.getBoundingClientRect(),r=0,s=0;if("bottom"===i.config.legend.position)s+=i.globals.svgHeight-o.height/2;else if("top"===i.config.legend.position){var a=new X(this.ctx),l=a.getTitleSubtitleCoords("title").height,c=a.getTitleSubtitleCoords("subtitle").height;s=s+(l>0?l-10:0)+(c>0?c-10:0)}n.style.position="absolute",r=r+t+i.config.legend.offsetX,s=s+e+i.config.legend.offsetY,n.style.left=r+"px",n.style.top=s+"px","bottom"===i.config.legend.position?(n.style.top="auto",n.style.bottom=10+i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(n.style.left="auto",n.style.right=25+i.config.legend.offsetX+"px"),n.style.width&&(n.style.width=parseInt(i.config.legend.width)+"px"),n.style.height&&(n.style.height=parseInt(i.config.legend.height)+"px")}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var e=this.getLegendBBox(),i=new X(this.ctx),n=i.getTitleSubtitleCoords("title"),o=i.getTitleSubtitleCoords("subtitle"),r=0;"bottom"===t.config.legend.position?r=-e.clwh/1.8:"top"===t.config.legend.position&&(r=n.height+o.height+t.config.title.margin+t.config.subtitle.margin-15),this.setLegendWrapXY(20,r)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.getLegendBBox(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"!==e.config.chart.type)!t.target.classList.contains("inactive-legend")&&i&&new Y(this.ctx).toggleSeriesOnHover(t,t.target);else if(i){var n=parseInt(t.target.getAttribute("rel"))-1;this.ctx.fireEvent("legendHover",[this.ctx,n,this.w]),new Y(this.ctx).highlightRangeInSeries(t,t.target)}}},{key:"onLegendClick",value:function(t){if(t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker")){var e=parseInt(t.target.getAttribute("rel"))-1,i="true"===t.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,e,this.w),this.ctx.fireEvent("legendClick",[this.ctx,e,this.w]);var o=this.w.config.legend.markers.onClick;"function"==typeof o&&t.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,e,this.w),this.ctx.fireEvent("legendMarkerClick",[this.ctx,e,this.w])),this.toggleDataSeries(e,i)}}},{key:"getLegendStyles",value:function(){var t=document.createElement("style");t.setAttribute("type","text/css");var e=document.createTextNode("\n    \n      .apexcharts-legend {\n        display: flex;\n        overflow: auto;\n        padding: 0 10px;\n      }\n\n      .apexcharts-legend.position-bottom, .apexcharts-legend.position-top {\n        flex-wrap: wrap\n      }\n      .apexcharts-legend.position-right, .apexcharts-legend.position-left {\n        flex-direction: column;\n        bottom: 0;\n      }\n\n      .apexcharts-legend.position-bottom.left, .apexcharts-legend.position-top.left, .apexcharts-legend.position-right, .apexcharts-legend.position-left {\n        justify-content: flex-start;\n      }\n\n      .apexcharts-legend.position-bottom.center, .apexcharts-legend.position-top.center {\n        justify-content: center;  \n      }\n\n      .apexcharts-legend.position-bottom.right, .apexcharts-legend.position-top.right {\n        justify-content: flex-end;\n      }\n\n      .apexcharts-legend-series {\n        cursor: pointer;\n        line-height: normal;\n      }\n\n      .apexcharts-legend.position-bottom .apexcharts-legend-series, .apexcharts-legend.position-top .apexcharts-legend-series{\n        display: flex;\n        align-items: center;\n      }\n\n      .apexcharts-legend-text {\n        position: relative;\n        font-size: 14px;\n      }\n\n      .apexcharts-legend-text *, .apexcharts-legend-marker * {\n        pointer-events: none;\n      }\n\n      .apexcharts-legend-marker {\n        position: relative;\n        display: inline-block;\n        cursor: pointer;\n        margin-right: 3px;\n      }\n      \n      .apexcharts-legend.right .apexcharts-legend-series, .apexcharts-legend.left .apexcharts-legend-series{\n        display: inline-block;\n      }\n\n      .apexcharts-legend-series.no-click {\n        cursor: auto;\n      }\n\n      .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n        display: none !important;\n      }\n\n      .inactive-legend {\n        opacity: 0.45;\n      }");return t.appendChild(e),t}},{key:"resetToggleDataSeries",value:function(){var t=this.w,e=null,i=[];if(t.globals.axisCharts?(e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex]"),(e=h.listToArray(e)).forEach((function(t){i.push(parseInt(t.getAttribute("data:realIndex")))}))):(e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[rel]"),(e=h.listToArray(e)).forEach((function(t){i.push(parseInt(t.getAttribute("rel"))-1)}))),i.sort(),t.globals.collapsedSeries.length>0){for(var n=t.globals.risingSeries.slice(),o=t.config.series.slice(),r=0;r<t.globals.collapsedSeries.length;r++){var s=i.indexOf(t.globals.collapsedSeries[r].index);-1!==s&&(t.globals.axisCharts?o[s].data=t.globals.collapsedSeries.slice()[r].data.slice():o[s]=t.globals.collapsedSeries.slice()[r].data,n.push(s))}t.globals.collapsedSeries=[],t.globals.ancillaryCollapsedSeries=[],t.globals.collapsedSeriesIndices=[],t.globals.ancillaryCollapsedSeriesIndices=[],t.globals.risingSeries=n,t.config.series=o,this.ctx._updateSeries(t.config.series,t.config.chart.animations.dynamicAnimation.enabled)}}},{key:"toggleDataSeries",value:function(t,e){var i=this.w;if(i.globals.axisCharts||"radialBar"===i.config.chart.type){i.globals.resized=!0;var n=null,o=null;if(i.globals.risingSeries=[],i.globals.axisCharts?(n=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),o=parseInt(n.getAttribute("data:realIndex"))):(n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),o=parseInt(n.getAttribute("rel"))-1),e)this.riseCollapsedSeries(i.globals.collapsedSeries,i.globals.collapsedSeriesIndices,o),this.riseCollapsedSeries(i.globals.ancillaryCollapsedSeries,i.globals.ancillaryCollapsedSeriesIndices,o);else{if(i.globals.axisCharts){var r=!1;if(i.config.yaxis[o]&&i.config.yaxis[o].show&&i.config.yaxis[o].showAlways&&(r=!0,i.globals.ancillaryCollapsedSeriesIndices.indexOf(o)<0&&(i.globals.ancillaryCollapsedSeries.push({index:o,data:i.config.series[o].data.slice(),type:n.parentNode.className.baseVal.split("-")[1]}),i.globals.ancillaryCollapsedSeriesIndices.push(o))),!r){i.globals.collapsedSeries.push({index:o,data:i.config.series[o].data.slice(),type:n.parentNode.className.baseVal.split("-")[1]}),i.globals.collapsedSeriesIndices.push(o);var s=i.globals.risingSeries.indexOf(o);i.globals.risingSeries.splice(s,1)}i.config.series[o].data=[]}else i.globals.collapsedSeries.push({index:o,data:i.config.series[o]}),i.globals.collapsedSeriesIndices.push(o),i.config.series[o]=0;for(var a=n.childNodes,l=0;l<a.length;l++)a[l].classList.contains("apexcharts-series-markers-wrap")&&(a[l].classList.contains("apexcharts-hide")?a[l].classList.remove("apexcharts-hide"):a[l].classList.add("apexcharts-hide"));i.globals.allSeriesCollapsed=i.globals.collapsedSeries.length===i.globals.series.length,this.ctx._updateSeries(i.config.series,i.config.chart.animations.dynamicAnimation.enabled)}}else{var c=i.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(t+1,"'] path")),d=i.config.chart.type;if("pie"===d||"donut"===d){var h=i.config.plotOptions.pie.donut.labels,u=new f(this.ctx),p=new L(this.ctx);u.pathMouseDown(c.members[0],null),p.printDataLabelsInner(c.members[0].node,h)}c.fire("click")}}},{key:"riseCollapsedSeries",value:function(t,e,i){var n=this.w;if(t.length>0)for(var o=0;o<t.length;o++)t[o].index===i&&(n.globals.axisCharts?(n.config.series[i].data=t[o].data.slice(),t.splice(o,1),e.splice(o,1),n.globals.risingSeries.push(i)):(n.config.series[i]=t[o].data,t.splice(o,1),e.splice(o,1),n.globals.risingSeries.push(i)),this.ctx._updateSeries(n.config.series,n.config.chart.animations.dynamicAnimation.enabled))}}]),t}(),lt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,n=i.config;if(0!==n.responsive.length){var o=n.responsive.slice();o.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new w({}),s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=o[0].breakpoint,s=window.innerWidth>0?window.innerWidth:screen.width;if(s>n){var a=x.extendArrayProps(r,i.globals.initialConfig);t=h.extend(a,t),t=h.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var l=0;l<o.length;l++)s<o[l].breakpoint&&(t=x.extendArrayProps(r,o[l].options),t=h.extend(i.config,t),e.overrideResponsiveOptions(t))};if(t){var a=x.extendArrayProps(r,t);a=h.extend(i.config,a),s(a=h.extend(a,t))}else s({})}}},{key:"overrideResponsiveOptions",value:function(t){var e=new w(t).init();this.w.config=e}}]),t}(),ct=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.colors=[]}return n(t,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var t=this.w,e=new h;if(t.globals.dom.elWrap.classList.add(t.config.theme.mode),void 0===t.config.colors?t.globals.colors=this.predefined():t.globals.colors=t.config.colors,t.config.theme.monochrome.enabled){var i=[],n=t.globals.series.length;t.config.plotOptions.bar.distributed&&"bar"===t.config.chart.type&&(n=t.globals.series[0].length*t.globals.series.length);for(var o=t.config.theme.monochrome.color,r=1/(n/t.config.theme.monochrome.shadeIntensity),s=t.config.theme.monochrome.shadeTo,a=0,l=0;l<n;l++){var c=void 0;"dark"===s?(c=e.shadeColor(-1*a,o),a+=r):(c=e.shadeColor(a,o),a+=r),i.push(c)}t.globals.colors=i.slice()}var d=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),void 0===t.config.stroke.colors?t.globals.stroke.colors=d:t.globals.stroke.colors=t.config.stroke.colors,this.pushExtraColors(t.globals.stroke.colors),void 0===t.config.fill.colors?t.globals.fill.colors=d:t.globals.fill.colors=t.config.fill.colors,this.pushExtraColors(t.globals.fill.colors),void 0===t.config.dataLabels.style.colors?t.globals.dataLabels.style.colors=d:t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors,this.pushExtraColors(t.globals.dataLabels.style.colors,50),void 0===t.config.plotOptions.radar.polygons.fill.colors?t.globals.radarPolygons.fill.colors=["dark"===t.config.theme.mode?"#202D48":"#fff"]:t.globals.radarPolygons.fill.colors=t.config.plotOptions.radar.polygons.fill.colors,this.pushExtraColors(t.globals.radarPolygons.fill.colors,20),void 0===t.config.markers.colors?t.globals.markers.colors=d:t.globals.markers.colors=t.config.markers.colors,this.pushExtraColors(t.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,o=e||n.globals.series.length;if(null===i&&(i="bar"===n.config.chart.type&&n.config.plotOptions.bar.distributed||"heatmap"===n.config.chart.type&&n.config.plotOptions.heatmap.colorScale.inverse),i&&(o=n.globals.series[0].length*n.globals.series.length),t.length<o)for(var r=o-t.length,s=0;s<r;s++)t.push(t[s])}},{key:"updateThemeOptions",value:function(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};var e=t.theme.mode||"light",i=t.theme.palette?t.theme.palette:"dark"===e?"palette4":"palette1",n=t.chart.foreColor?t.chart.foreColor:"dark"===e?"#f6f7f8":"#373d3f";return t.tooltip.theme=e,t.chart.foreColor=n,t.theme.palette=i,t}},{key:"predefined",value:function(){switch(this.w.config.theme.palette){case"palette1":default:this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"];break;case"palette2":this.colors=["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"];break;case"palette3":this.colors=["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"];break;case"palette4":this.colors=["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"];break;case"palette5":this.colors=["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"];break;case"palette6":this.colors=["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"];break;case"palette7":this.colors=["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"];break;case"palette8":this.colors=["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"];break;case"palette9":this.colors=["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"];break;case"palette10":this.colors=["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"]}return this.colors}}]),t}(),dt=function(){function t(i){e(this,t),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx}return n(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,n=t.clientX,o=t.clientY,r=t.hasBars,s=this.w,a=s.globals.gridWidth,l=a/(s.globals.dataPoints-1),c=i.getBoundingClientRect();(r&&s.globals.comboCharts||r)&&(l=a/s.globals.dataPoints);var d=n-c.left,h=o-c.top;d<0||h<0||d>s.globals.gridWidth||h>s.globals.gridHeight?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):s.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):s.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var u=Math.round(d/l);r&&(u=Math.ceil(d/l),u-=1);for(var p,f=null,g=null,m=[],v=0;v<s.globals.seriesXvalues.length;v++)m.push([s.globals.seriesXvalues[v][0]-1e-6].concat(s.globals.seriesXvalues[v]));return m=m.map((function(t){return t.filter((function(t){return t}))})),p=s.globals.seriesYvalues.map((function(t){return t.filter((function(t){return t}))})),s.globals.isXNumeric&&(f=(g=this.closestInMultiArray(d,h,m,p)).index,u=g.j,null!==f&&(m=s.globals.seriesXvalues[f],u=(g=this.closestInArray(d,m)).index)),(!u||u<1)&&(u=0),{capturedSeries:f,j:u,hoverX:d,hoverY:h}}},{key:"closestInMultiArray",value:function(t,e,i,n){var o=this.w,r=0,s=null,a=-1;o.globals.series.length>1?r=this.getFirstActiveXArray(i):s=0;var l=n[r][0],c=i[r][0],d=Math.abs(t-c),h=Math.abs(e-l),u=h+d;return n.map((function(o,r){o.map((function(o,l){var c=Math.abs(e-n[r][l]),p=Math.abs(t-i[r][l]),f=p+c;f<u&&(u=f,d=p,h=c,s=r,a=l)}))})),{index:s,j:a}}},{key:"getFirstActiveXArray",value:function(t){for(var e=0,i=new x(this.ctx),n=t.map((function(t,e){return t.length>0?e:-1})),o=0;o<n.length;o++){var r=i.getSeriesTotalByIndex(o);if(-1!==n[o]&&0!==r&&!i.seriesHaveSameValues(o)){e=n[o];break}}return e}},{key:"closestInArray",value:function(t,e){for(var i=e[0],n=null,o=Math.abs(t-i),r=0;r<e.length;r++){var s=Math.abs(t-e[r]);s<o&&(o=s,i=e[r],n=r)}return{index:n}}},{key:"isXoverlap",value:function(t){var e=[],i=this.w.globals.seriesX.filter((function(t){return void 0!==t[0]}));if(i.length>0)for(var n=0;n<i.length-1;n++)void 0!==i[n][t]&&void 0!==i[n+1][t]&&i[n][t]!==i[n+1][t]&&e.push("unEqual");return 0===e.length}},{key:"isinitialSeriesSameLen",value:function(){for(var t=!0,e=this.w.globals.initialSeries,i=0;i<e.length-1;i++)if(e[i].data.length!==e[i+1].data.length){t=!1;break}return t}},{key:"getBarsHeight",value:function(t){return d(t).reduce((function(t,e){return t+e.getBBox().height}),0)}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var n=i.allTooltipSeriesGroups,o=0;o<n.length;o++)"enable"===t?(n[o].classList.add("active"),n[o].style.display=e.config.tooltip.items.display):(n[o].classList.remove("active"),n[o].style.display="none")}}]),t}(),ht=function(){function t(i){e(this,t),this.w=i.w,this.ctx=i.ctx,this.ttCtx=i,this.tooltipUtil=new dt(i)}return n(t,[{key:"drawSeriesTexts",value:function(t){var e=t.shared,i=void 0===e||e,n=t.ttItems,o=t.i,r=void 0===o?0:o,s=t.j,a=void 0===s?null:s;void 0!==this.w.config.tooltip.custom?this.handleCustomTooltip({i:r,j:a}):this.toggleActiveInactiveSeries(i);var l=this.getValuesToPrint({i:r,j:a});this.printLabels({i:r,j:a,values:l,ttItems:n,shared:i});var c=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=c.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=c.getBoundingClientRect().height}},{key:"printLabels",value:function(t){var e,i=t.i,n=t.j,o=t.values,r=t.ttItems,s=t.shared,a=this.w,l=o.xVal,c=o.zVal,d=o.xAxisTTVal,h="",u=a.globals.colors[i];null!==n&&a.config.plotOptions.bar.distributed&&(u=a.globals.colors[n]);for(var p=0,f=a.globals.series.length-1;p<a.globals.series.length;p++,f--){var g=this.getFormatters(i);if(h=this.getSeriesName({fn:g.yLbTitleFormatter,index:i,seriesIndex:i,j:n}),s){var m=a.config.tooltip.inverseOrder?f:p;g=this.getFormatters(m),h=this.getSeriesName({fn:g.yLbTitleFormatter,index:m,seriesIndex:i,j:n}),u=a.globals.colors[m],e=g.yLbFormatter(a.globals.series[m][n],{series:a.globals.series,seriesIndex:m,dataPointIndex:n,w:a}),(this.ttCtx.hasBars()&&a.config.chart.stacked&&0===a.globals.series[m][n]||void 0===a.globals.series[m][n])&&(e=void 0)}else e=g.yLbFormatter(a.globals.series[i][n],{series:a.globals.series,seriesIndex:i,dataPointIndex:n,w:a});null===n&&(e=g.yLbFormatter(a.globals.series[i],a)),this.DOMHandling({t:p,ttItems:r,values:{val:e,xVal:l,xAxisTTVal:d,zVal:c},seriesName:h,shared:s,pColor:u})}}},{key:"getFormatters",value:function(t){var e,i=this.w,n=i.globals.yLabelFormatters[t];return void 0!==i.globals.ttVal?Array.isArray(i.globals.ttVal)?(n=i.globals.ttVal[t]&&i.globals.ttVal[t].formatter,e=i.globals.ttVal[t]&&i.globals.ttVal[t].title&&i.globals.ttVal[t].title.formatter):(n=i.globals.ttVal.formatter,"function"==typeof i.globals.ttVal.title.formatter&&(e=i.globals.ttVal.title.formatter)):e=i.config.tooltip.y.title.formatter,"function"!=typeof n&&(n=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(t){return t}),"function"!=typeof e&&(e=function(t){return t}),{yLbFormatter:n,yLbTitleFormatter:e}}},{key:"getSeriesName",value:function(t){var e=t.fn,i=t.index,n=t.seriesIndex,o=t.j,r=this.w;return e(String(r.globals.seriesNames[i]),{series:r.globals.series,seriesIndex:n,dataPointIndex:o,w:r})}},{key:"DOMHandling",value:function(t){var e=t.t,i=t.ttItems,n=t.values,o=t.seriesName,r=t.shared,s=t.pColor,a=this.w,l=this.ttCtx,c=n.val,d=n.xVal,h=n.xAxisTTVal,u=n.zVal,p=null;p=i[e].children,a.config.tooltip.fillSeriesColor&&(i[e].style.backgroundColor=s,p[0].style.display="none"),l.showTooltipTitle&&(null===l.tooltipTitle&&(l.tooltipTitle=a.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle.innerHTML=d),l.blxaxisTooltip&&(l.xaxisTooltipText.innerHTML=""!==h?h:d);var f=i[e].querySelector(".apexcharts-tooltip-text-label");f&&(f.innerHTML=o?o+": ":"");var g=i[e].querySelector(".apexcharts-tooltip-text-value");g&&(g.innerHTML=c),p[0]&&p[0].classList.contains("apexcharts-tooltip-marker")&&(p[0].style.backgroundColor=s),a.config.tooltip.marker.show||(p[0].style.display="none"),null!==u&&(i[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=a.config.tooltip.z.title,i[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=u),r&&p[0]&&(null==c||a.globals.collapsedSeriesIndices.indexOf(e)>-1?p[0].parentNode.style.display="none":p[0].parentNode.style.display=a.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(t){var e=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=e.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("active"),i.style.display=e.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,n=this.w,o=this.ctx.series.filteredSeriesX(),r="",s=null,a=null,l={series:n.globals.series,seriesIndex:e,dataPointIndex:i,w:n},c=n.globals.ttZFormatter;null===i?a=n.globals.series[e]:n.globals.isXNumeric?(r=o[e][i],0===o[e].length&&(r=o[this.tooltipUtil.getFirstActiveXArray(o)][i])):r=void 0!==n.globals.labels[i]?n.globals.labels[i]:"";var d=r;return r=n.globals.isXNumeric&&"datetime"===n.config.xaxis.type?new H(this.ctx).xLabelFormat(n.globals.ttKeyFormatter,d):n.globals.xLabelFormatter(d,l),void 0!==n.config.tooltip.x.formatter&&(r=n.globals.ttKeyFormatter(d,l)),n.globals.seriesZ.length>0&&n.globals.seriesZ[0].length>0&&(s=c(n.globals.seriesZ[e][i],n)),{val:a,xVal:r,xAxisTTVal:"function"==typeof n.config.xaxis.tooltip.formatter?n.globals.xaxisTooltipFormatter(d,l):r,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,n=this.w;this.ttCtx.getElTooltip().innerHTML=n.config.tooltip.custom({ctx:this.ctx,series:n.globals.series,seriesIndex:e,dataPointIndex:i,w:n})}}]),t}(),ut=function(){function t(i){e(this,t),this.ttCtx=i,this.ctx=i.ctx,this.w=i.w}return n(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,n=this.w,o=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,s=n.globals.labels.slice().length;if(null!==e&&(r=n.globals.gridWidth/s*e),"tickWidth"===n.config.xaxis.crosshairs.width||"barWidth"===n.config.xaxis.crosshairs.width?r+i.xcrosshairsWidth>n.globals.gridWidth&&(r=n.globals.gridWidth-i.xcrosshairsWidth):null!==e&&(r+=n.globals.gridWidth/s/2),r<0&&(r=0),r>n.globals.gridWidth&&(r=n.globals.gridWidth),null!==o&&(o.setAttribute("x",r),o.setAttribute("x1",r),o.setAttribute("x2",r),o.setAttribute("y2",n.globals.gridHeight),o.classList.add("active")),i.blxaxisTooltip){var a=r;"tickWidth"!==n.config.xaxis.crosshairs.width&&"barWidth"!==n.config.xaxis.crosshairs.width||(a=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(a)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&(f.setAttrs(e.ycrosshairs,{y1:t,y2:t}),f.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t}))}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip){i.xaxisTooltip.classList.add("active");var n,o=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,n=new f(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=n.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=o+"px")}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var n=parseInt(i.ycrosshairsHidden.getAttribute("y1")),o=e.globals.translateY+n,r=i.yaxisTTEls[t].getBoundingClientRect().height,s=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(s-=26),o-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("active"),i.yaxisTTEls[t].style.top=o+"px",i.yaxisTTEls[t].style.left=s+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,o=this.ttCtx,r=o.getElTooltip(),s=o.tooltipRect,a=null!==i?parseInt(i):1,l=parseInt(t)+a+5,c=parseInt(e)+a/2;if(l>n.globals.gridWidth/2&&(l=l-s.ttWidth-a-15),l>n.globals.gridWidth-s.ttWidth-10&&(l=n.globals.gridWidth-s.ttWidth),l<-20&&(l=-20),n.config.tooltip.followCursor){var d=o.getElGrid().getBoundingClientRect();c=o.e.clientY+n.globals.translateY-d.top-s.ttHeight/2}var h=this.positionChecks(s,l,c);l=h.x,c=h.y,isNaN(l)||(l+=n.globals.translateX,r.style.left=l+"px",r.style.top=c+"px")}},{key:"positionChecks",value:function(t,e,i){var n=this.w;return t.ttHeight+i>n.globals.gridHeight&&(i=n.globals.gridHeight-t.ttHeight+n.globals.translateY),i<0&&(i=0),{x:e,y:i}}},{key:"moveMarkers",value:function(t,e){var i=this.w,n=this.ttCtx;if(i.globals.markers.size[t]>0)for(var o=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r<o.length;r++)parseInt(o[r].getAttribute("rel"))===e&&(n.marker.resetPointsSize(),n.marker.enlargeCurrentPoint(e,o[r]));else n.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}},{key:"moveDynamicPointOnHover",value:function(t,e){var i,n,o=this.w,r=this.ttCtx,s=o.globals.pointsArray,a=o.config.markers.hover.size;void 0===a&&(a=o.globals.markers.size[e]+o.config.markers.hover.sizeOffset),i=s[e][t][0],n=s[e][t][1]?s[e][t][1]:0;var l=o.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers circle"));l&&(l.setAttribute("r",a),l.setAttribute("cx",i),l.setAttribute("cy",n)),this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,n,a)}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,n=i.w,o=0,r=0,s=n.globals.pointsArray;e=new Y(this.ctx).getActiveSeriesIndex();var a=n.config.markers.hover.size;void 0===a&&(a=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),s[e]&&(o=s[e][t][0],r=s[e][t][1]);var l=null,c=i.getAllMarkers();if(null!==(l=null!==c?c:n.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers circle")))for(var d=0;d<l.length;d++){var h=s[d];if(h&&h.length){var u=s[d][t][1];l[d].setAttribute("cx",o);var p=parseInt(l[d].parentNode.parentNode.parentNode.getAttribute("data:realIndex"));null!==u?(l[p]&&l[p].setAttribute("r",a),l[p]&&l[p].setAttribute("cy",u)):l[p]&&l[p].setAttribute("r",0)}}if(this.moveXCrosshairs(o),!i.fixedTooltip){var f=r||n.globals.gridHeight;this.moveTooltip(o,f,a)}}},{key:"moveStickyTooltipOverBars",value:function(t){var e,i=this.w,n=this.ttCtx,o=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='1'] path[j='".concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='1'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='1'] path[j='").concat(t,"']")),r=o?parseFloat(o.getAttribute("cx")):0,s=o?parseFloat(o.getAttribute("barWidth")):0;i.globals.isXNumeric?r-=s/2:(r=n.xAxisTicksPositions[t-1]+n.dataPointsDividedWidth/2,isNaN(r)&&(r=n.xAxisTicksPositions[t]-n.dataPointsDividedWidth/2));var a=n.getElGrid().getBoundingClientRect();if(e=n.e.clientY-a.top-n.tooltipRect.ttHeight/2,this.moveXCrosshairs(r),!n.fixedTooltip){var l=e||i.globals.gridHeight;this.moveTooltip(r,l)}}}]),t}(),pt=function(){function t(i){e(this,t),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx,this.tooltipPosition=new ut(i)}return n(t,[{key:"drawDynamicPoints",value:function(){for(var t=this.w,e=new f(this.ctx),i=new _(this.ctx),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series"),o=0;o<n.length;o++){var r=parseInt(n[o].getAttribute("data:realIndex")),s=t.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"'] .apexcharts-series-markers-wrap"));if(null!==s){var a=void 0,l="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==t.config.chart.type&&"area"!==t.config.chart.type||t.globals.comboCharts||t.config.tooltip.intersect||(l+=" no-pointer-events");var c=i.getMarkerConfig(l,r);(a=e.drawMarker(0,0,c)).node.setAttribute("default-marker-size",0);var d=document.createElementNS(t.globals.SVGNS,"g");d.classList.add("apexcharts-series-markers"),d.appendChild(a.node),s.appendChild(d)}}}},{key:"enlargeCurrentPoint",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=this.w;"bubble"!==o.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),s=e.getAttribute("cy");if(null!==i&&null!==n&&(r=i,s=n),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===o.config.chart.type){var a=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-a.left}this.tooltipPosition.moveTooltip(r,s,o.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this.ttCtx,n=t,o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),r=e.config.markers.hover.size,s=0;s<o.length;s++){var a=o[s].getAttribute("rel"),l=o[s].getAttribute("index");if(void 0===r&&(r=e.globals.markers.size[l]+e.config.markers.hover.sizeOffset),n===parseInt(a)){this.newPointSize(n,o[s]);var c=o[s].getAttribute("cx"),d=o[s].getAttribute("cy");this.tooltipPosition.moveXCrosshairs(c),i.fixedTooltip||this.tooltipPosition.moveTooltip(c,d,r)}else this.oldPointSize(o[s])}}},{key:"newPointSize",value:function(t,e){var i=this.w,n=i.config.markers.hover.size,o=null;o=0===t?e.parentNode.firstChild:e.parentNode.lastChild;var r=parseInt(o.getAttribute("index"));void 0===n&&(n=i.globals.markers.size[r]+i.config.markers.hover.sizeOffset),o.setAttribute("r",n)}},{key:"oldPointSize",value:function(t){var e=parseInt(t.getAttribute("default-marker-size"));t.setAttribute("r",e)}},{key:"resetPointsSize",value:function(){for(var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),e=0;e<t.length;e++){var i=parseInt(t[e].getAttribute("default-marker-size"));h.isNumber(i)?t[e].setAttribute("r",i):t[e].setAttribute("r",0)}}}]),t}(),ft=function(){function t(i){e(this,t),this.w=i.w,this.ttCtx=i}return n(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTooltip",value:function(t){var e=t.e,i=t.opt,n=t.x,o=t.y,r=this.ttCtx,s=this.w;if(e.target.classList.contains("apexcharts-heatmap-rect")){var a=this.getAttr(e,"i"),l=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),h=this.getAttr(e,"width"),u=this.getAttr(e,"height");if(r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:a,j:l,shared:!1}),n=c+r.tooltipRect.ttWidth/2+h,o=d+r.tooltipRect.ttHeight/2-u/2,r.tooltipPosition.moveXCrosshairs(c+h/2),n>s.globals.gridWidth/2&&(n=c-r.tooltipRect.ttWidth/2+h),r.w.config.tooltip.followCursor){var p=r.getElGrid().getBoundingClientRect();o=r.e.clientY-p.top+s.globals.translateY/2-10}}return{x:n,y:o}}},{key:"handleMarkerTooltip",value:function(t){var e,i,n=t.e,o=t.opt,r=t.x,s=t.y,a=this.w,l=this.ttCtx;if(n.target.classList.contains("apexcharts-marker")){var c=parseInt(o.paths.getAttribute("cx")),d=parseInt(o.paths.getAttribute("cy")),u=parseFloat(o.paths.getAttribute("val"));if(i=parseInt(o.paths.getAttribute("rel")),e=parseInt(o.paths.parentNode.parentNode.parentNode.getAttribute("rel"))-1,l.intersect){var p=h.findAncestor(o.paths,"apexcharts-series");p&&(e=parseInt(p.getAttribute("data:realIndex")))}if(l.tooltipLabels.drawSeriesTexts({ttItems:o.ttItems,i:e,j:i,shared:!l.showOnIntersect&&a.config.tooltip.shared}),"mouseup"===n.type&&l.markerClick(n,e,i),r=c,s=d+a.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var f=l.getElGrid().getBoundingClientRect();s=l.e.clientY+a.globals.translateY-f.top}u<0&&(s=d),l.marker.enlargeCurrentPoint(i,o.paths,r,s)}return{x:r,y:s}}},{key:"handleBarTooltip",value:function(t){var e,i,n=t.e,o=t.opt,r=this.w,s=this.ttCtx,a=s.getElTooltip(),l=0,c=0,d=0,h=this.getBarTooltipXY({e:n,opt:o});e=h.i;var u=h.barHeight,p=h.j;if(r.globals.isBarHorizontal&&s.hasBars()||!r.config.tooltip.shared?(c=h.x,d=h.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=c):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(d)&&(d=r.globals.svgHeight-s.tooltipRect.ttHeight),c+s.tooltipRect.ttWidth>r.globals.gridWidth?c-=s.tooltipRect.ttWidth:c<0&&(c+=s.tooltipRect.ttWidth),s.w.config.tooltip.followCursor){var f=s.getElGrid().getBoundingClientRect();d=s.e.clientY-f.top}if(null===s.tooltip&&(s.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboChartsHasBars?s.tooltipPosition.moveXCrosshairs(l+i/2):s.tooltipPosition.moveXCrosshairs(l)),!s.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&s.hasBars())){m&&(c=r.globals.gridWidth-c),a.style.left=c+r.globals.translateX+"px";var g=parseInt(o.paths.parentNode.getAttribute("data:realIndex")),m=r.globals.isMultipleYAxis?r.config.yaxis[g]&&r.config.yaxis[g].reversed:r.config.yaxis[0].reversed;!m||r.globals.isBarHorizontal&&s.hasBars()||(d=d+u-2*(r.globals.series[e][p]<0?u:0)),s.tooltipRect.ttHeight+d>r.globals.gridHeight?(d=r.globals.gridHeight-s.tooltipRect.ttHeight+r.globals.translateY,a.style.top=d+"px"):a.style.top=d+r.globals.translateY-s.tooltipRect.ttHeight/2+"px"}}},{key:"getBarTooltipXY",value:function(t){var e=t.e,i=t.opt,n=this.w,o=null,r=this.ttCtx,s=0,a=0,l=0,c=0,d=0,h=e.target.classList;if(h.contains("apexcharts-bar-area")||h.contains("apexcharts-candlestick-area")||h.contains("apexcharts-rangebar-area")){var u=e.target,p=u.getBoundingClientRect(),f=i.elGrid.getBoundingClientRect(),g=p.height;d=p.height;var m=p.width,v=parseInt(u.getAttribute("cx")),y=parseInt(u.getAttribute("cy"));c=parseFloat(u.getAttribute("barWidth"));var b="touchmove"===e.type?e.touches[0].clientX:e.clientX;o=parseInt(u.getAttribute("j")),s=parseInt(u.parentNode.getAttribute("rel"))-1,n.globals.comboCharts&&(s=parseInt(u.parentNode.getAttribute("data:realIndex"))),r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:o,shared:!r.showOnIntersect&&n.config.tooltip.shared}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(a=b-f.left+15,l=y-r.dataPointsDividedHeight+g/2-r.tooltipRect.ttHeight/2):(a=n.globals.isXNumeric?v-m/2:v-r.dataPointsDividedWidth+m/2,l=e.clientY-f.top-r.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((a=v)<r.xyRatios.baseLineInvertedY&&(a=v-r.tooltipRect.ttWidth),l=y-r.dataPointsDividedHeight+g/2-r.tooltipRect.ttHeight/2):(a=n.globals.isXNumeric?v-m/2:v-r.dataPointsDividedWidth+m/2,l=y)}return{x:a,y:l,barHeight:d,barWidth:c,i:s,j:o}}}]),t}(),gt=function(){function t(i){e(this,t),this.w=i.w,this.ttCtx=i}return n(t,[{key:"drawXaxisTooltip",value:function(){var t=this.w,e=this.ttCtx,i="bottom"===t.config.xaxis.position;e.xaxisOffY=i?t.globals.gridHeight+1:1;var n=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",o=t.globals.dom.elWrap;e.blxaxisTooltip&&null===t.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=document.createElement("div"),e.xaxisTooltip.setAttribute("class",n+" "+t.config.tooltip.theme),o.appendChild(e.xaxisTooltip),e.xaxisTooltipText=document.createElement("div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var t=this.w,e=this.ttCtx,i=0;i<t.config.yaxis.length;i++){var n=t.config.yaxis[i].opposite||t.config.yaxis[i].crosshairs.opposite;e.yaxisOffX=n?t.globals.gridWidth+1:1;var o="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,n?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),r=t.globals.dom.elWrap;e.blyaxisTooltip&&null===t.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))&&(e.yaxisTooltip=document.createElement("div"),e.yaxisTooltip.setAttribute("class",o+" "+t.config.tooltip.theme),r.appendChild(e.yaxisTooltip),0===i&&(e.yaxisTooltipText=[]),e.yaxisTooltipText.push(document.createElement("div")),e.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[i]))}}},{key:"setXCrosshairWidth",value:function(){var t=this.w,e=this.ttCtx,i=e.getElXCrosshairs();if(e.xcrosshairsWidth=parseInt(t.config.xaxis.crosshairs.width),t.globals.comboCharts){var n=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==n&&"barWidth"===t.config.xaxis.crosshairs.width){var o=parseFloat(n.getAttribute("barWidth"));e.xcrosshairsWidth=o}else if("tickWidth"===t.config.xaxis.crosshairs.width){var r=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/r}}else if("tickWidth"===t.config.xaxis.crosshairs.width){var s=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/s}else if("barWidth"===t.config.xaxis.crosshairs.width){var a=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==a){var l=parseFloat(a.getAttribute("barWidth"));e.xcrosshairsWidth=l}else e.xcrosshairsWidth=1}t.globals.isBarHorizontal&&(e.xcrosshairsWidth=0),null!==i&&e.xcrosshairsWidth>0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var n=this.ttCtx,o=this.w,r=o.globals.yLabelFormatters[t];if(n.blyaxisTooltip){var s=n.getElGrid().getBoundingClientRect(),a=(e-s.top)*i.yRatio[t],l=o.globals.maxYArr[t]-o.globals.minYArr[t],c=o.globals.minYArr[t]+(l-a);n.tooltipPosition.moveYCrosshairs(e-s.top),n.yaxisTooltipText[t].innerHTML=r(c),n.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),mt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new dt(this),this.tooltipLabels=new ht(this),this.tooltipPosition=new ut(this),this.marker=new pt(this),this.intersect=new ft(this),this.axesTooltip=new gt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared}return n(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip")}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.blxaxisTooltip=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.blyaxisTooltip=e.config.yaxis[0].tooltip.enabled&&e.globals.axisCharts,this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),i.classList.add(this.tConfig.theme),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var n=new B(this.ctx);this.xAxisTicksPositions=n.getXAxisTicksPositions()}if((e.globals.comboCharts&&!this.tConfig.shared||this.tConfig.intersect&&!this.tConfig.shared||("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&!this.tConfig.shared)&&(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var o=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(o=this.showOnIntersect?1:e.globals.series.length),this.ttItems=this.createTTElements(o),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this.w,i=[],n=this.getElTooltip(),o=0;o<t;o++){var r=document.createElement("div");r.classList.add("apexcharts-tooltip-series-group"),this.tConfig.shared&&this.tConfig.enabledOnSeries&&Array.isArray(this.tConfig.enabledOnSeries)&&this.tConfig.enabledOnSeries.indexOf(o)<0&&r.classList.add("apexcharts-tooltip-series-group-hidden");var s=document.createElement("span");s.classList.add("apexcharts-tooltip-marker"),s.style.backgroundColor=e.globals.colors[o],r.appendChild(s);var a=document.createElement("div");a.classList.add("apexcharts-tooltip-text"),a.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,a.style.fontSize=this.tConfig.style.fontSize;var l=document.createElement("div");l.classList.add("apexcharts-tooltip-y-group");var c=document.createElement("span");c.classList.add("apexcharts-tooltip-text-label"),l.appendChild(c);var d=document.createElement("span");d.classList.add("apexcharts-tooltip-text-value"),l.appendChild(d);var h=document.createElement("div");h.classList.add("apexcharts-tooltip-z-group");var u=document.createElement("span");u.classList.add("apexcharts-tooltip-text-z-label"),h.appendChild(u);var p=document.createElement("span");p.classList.add("apexcharts-tooltip-text-z-value"),h.appendChild(p),a.appendChild(l),a.appendChild(h),r.appendChild(a),n.appendChild(r),i.push(r)}return i}},{key:"addSVGEvents",value:function(){var t=this.w,e=t.config.chart.type,i=this.getElTooltip(),n=!("bar"!==e&&"candlestick"!==e&&"rangeBar"!==e),o=t.globals.dom.Paper.node,r=this.getElGrid();r&&(this.seriesBound=r.getBoundingClientRect());var s,a=[],l=[],c={hoverArea:o,elGrid:r,tooltipEl:i,tooltipY:a,tooltipX:l,ttItems:this.ttItems};if(t.globals.axisCharts&&("area"===e||"line"===e||"scatter"===e||"bubble"===e?s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):n?s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"===e?s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap"):"radar"===e&&(s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-marker")),s&&s.length))for(var d=0;d<s.length;d++)a.push(s[d].getAttribute("cy")),l.push(s[d].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||n&&this.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],c);else if(n&&!t.globals.comboCharts)this.addBarsEventListeners(c);else if("bubble"===e||"scatter"===e||"radar"===e||this.showOnIntersect&&("area"===e||"line"===e))this.addPointsEventsListeners(c);else if(!t.globals.axisCharts||"heatmap"===e){var h=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(h,c)}if(this.showOnIntersect){var u=t.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker");u.length>0&&this.addPathsEventListeners(u,c);var p=t.globals.dom.baseEl.querySelectorAll(".apexcharts-area-series .apexcharts-marker");p.length>0&&this.addPathsEventListeners(p,c),this.hasBars()&&!this.tConfig.shared&&this.addBarsEventListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),n=i.width+10,o=i.height+10,r=this.tConfig.fixed.offsetX,s=this.tConfig.fixed.offsetY;return this.tConfig.fixed.position.toLowerCase().indexOf("right")>-1&&(r=r+t.globals.svgWidth-n+10),this.tConfig.fixed.position.toLowerCase().indexOf("bottom")>-1&&(s=s+t.globals.svgHeight-o-10),e.style.left=r+"px",e.style.top=s+"px",{x:r,y:s,ttWidth:n,ttHeight:o}}},{key:"addPointsEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker");this.addPathsEventListeners(e,t)}},{key:"addBarsEventListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,n=this,o=function(o){var r={paths:t[o],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};i.w.globals.tooltipOpts=r,["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[o].addEventListener(e,n.seriesHover.bind(n,r),{capture:!1,passive:!0})}))},r=0;r<t.length;r++)o(r)}},{key:"seriesHover",value:function(t,e){var i=this,n=[],o=this.w;o.config.chart.group&&(n=this.ctx.getGroupedCharts()),o.globals.axisCharts&&(o.globals.minX===-1/0&&o.globals.maxX===1/0||0===o.globals.dataPoints)||(n.length?n.forEach((function(n){var o=i.getElTooltip(n),r={paths:t.paths,tooltipEl:o,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===i.w.globals.minX&&n.w.globals.maxX===i.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,n=t.opt,o=t.e,r=e.w,s=this.getElTooltip();i.tooltipRect={x:0,y:0,ttWidth:s.getBoundingClientRect().width,ttHeight:s.getBoundingClientRect().height},i.e=o,!i.hasBars()||r.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new Y(e).toggleSeriesOnHover(o,o.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:o,opt:n,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:o,opt:n,tooltipRect:i.tooltipRect})}},{key:"axisChartsTooltips",value:function(t){var e,i,n,o=t.e,r=t.opt,s=this.w,a=null,l=r.elGrid.getBoundingClientRect(),c="touchmove"===o.type?o.touches[0].clientX:o.clientX,d="touchmove"===o.type?o.touches[0].clientY:o.clientY;if(this.clientY=d,this.clientX=c,d<l.top||d>l.top+l.height)this.handleMouseOut(r);else{if(Array.isArray(this.tConfig.enabledOnSeries)){var h=parseInt(r.paths.getAttribute("index"));if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(r)}var u=this.getElTooltip(),p=this.getElXCrosshairs(),f=s.globals.xyCharts||"bar"===s.config.chart.type&&!s.globals.isBarHorizontal&&this.hasBars()&&this.tConfig.shared||s.globals.comboCharts&&this.hasBars;if(s.globals.isBarHorizontal&&this.hasBars()&&(f=!1),"mousemove"===o.type||"touchmove"===o.type||"mouseup"===o.type){if(null!==p&&p.classList.add("active"),null!==this.ycrosshairs&&this.blyaxisTooltip&&this.ycrosshairs.classList.add("active"),f&&!this.showOnIntersect){e=(a=this.tooltipUtil.getNearestValues({context:this,hoverArea:r.hoverArea,elGrid:r.elGrid,clientX:c,clientY:d,hasBars:this.hasBars})).j;var g=a.capturedSeries;if(a.hoverX<0||a.hoverX>s.globals.gridWidth)return void this.handleMouseOut(r);if(null!==g){if(null===s.globals.series[g][e])return void r.tooltipEl.classList.remove("active");void 0!==s.globals.series[g][e]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(e)&&this.tooltipUtil.isinitialSeriesSameLen()?this.create(o,this,g,e,r.ttItems):this.create(o,this,g,e,r.ttItems,!1):this.tooltipUtil.isXoverlap(e)&&this.create(o,this,0,e,r.ttItems)}else this.tooltipUtil.isXoverlap(e)&&this.create(o,this,0,e,r.ttItems)}else if("heatmap"===s.config.chart.type){var m=this.intersect.handleHeatTooltip({e:o,opt:r,x:i,y:n});i=m.x,n=m.y,u.style.left=i+"px",u.style.top=n+"px"}else this.hasBars&&this.intersect.handleBarTooltip({e:o,opt:r}),this.hasMarkers&&this.intersect.handleMarkerTooltip({e:o,opt:r,x:i,y:n});if(this.blyaxisTooltip)for(var v=0;v<s.config.yaxis.length;v++)this.axesTooltip.drawYaxisTooltipText(v,d,this.xyRatios);r.tooltipEl.classList.add("active")}else"mouseout"!==o.type&&"touchend"!==o.type||this.handleMouseOut(r)}}},{key:"nonAxisChartsTooltips",value:function(t){var e=t.e,i=t.opt,n=t.tooltipRect,o=this.w,r=i.paths.getAttribute("rel"),s=this.getElTooltip(),a=o.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===e.type||"touchmove"===e.type){s.classList.add("active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(r)-1,shared:!1});var l=o.globals.clientX-a.left-n.ttWidth/2,c=o.globals.clientY-a.top-n.ttHeight-10;s.style.left=l+"px",s.style.top=c+"px"}else"mouseout"!==e.type&&"touchend"!==e.type||s.classList.remove("active")}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new f(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),n=0;n<i.length;n++)e.pathMouseLeave(i[n])}},{key:"handleMouseOut",value:function(t){var e=this.w,i=this.getElXCrosshairs();if(t.tooltipEl.classList.remove("active"),this.deactivateHoverFilter(),"bubble"!==e.config.chart.type&&this.marker.resetPointsSize(),null!==i&&i.classList.remove("active"),null!==this.ycrosshairs&&this.ycrosshairs.classList.remove("active"),this.blxaxisTooltip&&this.xaxisTooltip.classList.remove("active"),this.blyaxisTooltip){null===this.yaxisTTEls&&(this.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var n=0;n<this.yaxisTTEls.length;n++)this.yaxisTTEls[n].classList.remove("active")}}},{key:"getElMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(" .apexcharts-series-markers")}},{key:"getAllMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker")}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"markerClick",value:function(t,e,i){var n=this.w;"function"==typeof n.config.chart.events.markerClick&&n.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:n}),this.ctx.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:n}])}},{key:"create",value:function(t,e,i,n,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=this.w,a=e;"mouseup"===t.type&&this.markerClick(t,i,n),null===r&&(r=this.tConfig.shared);var l=this.hasMarkers(),c=this.getElBars();if(r){if(a.tooltipLabels.drawSeriesTexts({ttItems:o,i:i,j:n,shared:!this.showOnIntersect&&this.tConfig.shared}),l&&(s.globals.markers.largestSize>0?a.marker.enlargePoints(n):a.tooltipPosition.moveDynamicPointsOnHover(n)),this.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(c),this.barSeriesHeight>0)){var d=new f(this.ctx),h=s.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(n,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(n);for(var u=0;u<h.length;u++)d.pathMouseEnter(h[u])}}else a.tooltipLabels.drawSeriesTexts({shared:!1,ttItems:o,i:i,j:n}),this.hasBars()&&a.tooltipPosition.moveStickyTooltipOverBars(n),l&&a.tooltipPosition.moveMarkers(i,n)}}]),t}(),vt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w,this.ev=this.w.config.chart.events,this.localeValues=this.w.globals.locale.toolbar}return n(t,[{key:"createToolbar",value:function(){var t=this.w,e=document.createElement("div");if(e.setAttribute("class","apexcharts-toolbar"),t.globals.dom.elWrap.appendChild(e),this.elZoom=document.createElement("div"),this.elZoomIn=document.createElement("div"),this.elZoomOut=document.createElement("div"),this.elPan=document.createElement("div"),this.elSelection=document.createElement("div"),this.elZoomReset=document.createElement("div"),this.elMenuIcon=document.createElement("div"),this.elMenu=document.createElement("div"),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var i=0;i<this.t.customIcons.length;i++)this.elCustomIcons.push(document.createElement("div"));this.elMenuItems=[];var n=[];this.t.zoomin&&t.config.chart.zoom.enabled&&n.push({el:this.elZoomIn,icon:"string"==typeof this.t.zoomin?this.t.zoomin:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n',title:this.localeValues.zoomIn,class:"apexcharts-zoom-in-icon"}),this.t.zoomout&&t.config.chart.zoom.enabled&&n.push({el:this.elZoomOut,icon:"string"==typeof this.t.zoomout?this.t.zoomout:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n',title:this.localeValues.zoomOut,class:"apexcharts-zoom-out-icon"}),this.t.zoom&&t.config.chart.zoom.enabled&&n.push({el:this.elZoom,icon:"string"==typeof this.t.zoom?this.t.zoom:'<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n    <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n    <path d="M0 0h24v24H0V0z" fill="none"/>\n    <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>\n</svg>',title:this.localeValues.selectionZoom,class:t.globals.isTouchDevice?"hidden":"apexcharts-zoom-icon"}),this.t.selection&&t.config.chart.selection.enabled&&n.push({el:this.elSelection,icon:"string"==typeof this.t.selection?this.t.selection:'<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>\n</svg>',title:this.localeValues.selection,class:t.globals.isTouchDevice?"hidden":"apexcharts-selection-icon"}),this.t.pan&&t.config.chart.zoom.enabled&&n.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n    <defs>\n        <path d="M0 0h24v24H0z" id="a"/>\n    </defs>\n    <clipPath id="b">\n        <use overflow="visible" xlink:href="#a"/>\n    </clipPath>\n    <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>\n</svg>',title:this.localeValues.pan,class:t.globals.isTouchDevice?"hidden":"apexcharts-pan-icon"}),this.t.reset&&t.config.chart.zoom.enabled&&n.push({el:this.elZoomReset,icon:"string"==typeof this.t.reset?this.t.reset:'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n    <path d="M0 0h24v24H0z" fill="none"/>\n</svg>',title:this.localeValues.reset,class:"apexcharts-reset-zoom-icon"}),this.t.download&&n.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var o=0;o<this.elCustomIcons.length;o++)n.push({el:this.elCustomIcons[o],icon:this.t.customIcons[o].icon,title:this.t.customIcons[o].title,index:this.t.customIcons[o].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[o].class});n.forEach((function(t,e){t.index&&h.moveIndexInArray(n,e,t.index)}));for(var r=0;r<n.length;r++)f.setAttrs(n[r].el,{class:n[r].class,title:n[r].title}),n[r].el.innerHTML=n[r].icon,e.appendChild(n[r].el);e.appendChild(this.elMenu),f.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var s=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG}],a=0;a<s.length;a++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[a].innerHTML=s[a].title,f.setAttrs(this.elMenuItems[a],{class:"apexcharts-menu-item ".concat(s[a].name),title:s[a].title}),this.elMenu.appendChild(this.elMenuItems[a]);t.globals.zoomEnabled?this.elZoom.classList.add("selected"):t.globals.panEnabled?this.elPan.classList.add("selected"):t.globals.selectionEnabled&&this.elSelection.classList.add("selected"),this.addToolbarEventListeners()}},{key:"addToolbarEventListeners",value:function(){var t=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleSelection.bind(this)),this.elZoom.addEventListener("click",this.toggleZooming.bind(this)),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach((function(e){e.classList.contains("exportSVG")?e.addEventListener("click",t.downloadSVG.bind(t)):e.classList.contains("exportPNG")&&e.addEventListener("click",t.downloadPNG.bind(t))}));for(var e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener("click",this.t.customIcons[e].click)}},{key:"toggleSelection",value:function(){this.toggleOtherControls(),this.w.globals.selectionEnabled=!this.w.globals.selectionEnabled,this.elSelection.classList.contains("selected")?this.elSelection.classList.remove("selected"):this.elSelection.classList.add("selected")}},{key:"toggleZooming",value:function(){this.toggleOtherControls(),this.w.globals.zoomEnabled=!this.w.globals.zoomEnabled,this.elZoom.classList.contains("selected")?this.elZoom.classList.remove("selected"):this.elZoom.classList.add("selected")}},{key:"getToolbarIconsReference",value:function(){var t=this.w;this.elZoom||(this.elZoom=t.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZooming",value:function(){this.toggleOtherControls(),this.w.globals.zoomEnabled=!0,this.elZoom&&this.elZoom.classList.add("selected"),this.elPan&&this.elPan.classList.remove("selected")}},{key:"enablePanning",value:function(){this.toggleOtherControls(),this.w.globals.panEnabled=!0,this.elPan&&this.elPan.classList.add("selected"),this.elZoom&&this.elZoom.classList.remove("selected")}},{key:"togglePanning",value:function(){this.toggleOtherControls(),this.w.globals.panEnabled=!this.w.globals.panEnabled,this.elPan.classList.contains("selected")?this.elPan.classList.remove("selected"):this.elPan.classList.add("selected")}},{key:"toggleOtherControls",value:function(){var t=this.w;t.globals.panEnabled=!1,t.globals.zoomEnabled=!1,t.globals.selectionEnabled=!1,this.getToolbarIconsReference(),this.elPan&&this.elPan.classList.remove("selected"),this.elSelection&&this.elSelection.classList.remove("selected"),this.elZoom&&this.elZoom.classList.remove("selected")}},{key:"handleZoomIn",value:function(){var t=this.w,e=(t.globals.minX+t.globals.maxX)/2,i=(t.globals.minX+e)/2,n=(t.globals.maxX+e)/2;t.globals.disableZoomIn||this.zoomUpdateOptions(i,n)}},{key:"handleZoomOut",value:function(){var t=this.w;if(!("datetime"===t.config.xaxis.type&&new Date(t.globals.minX).getUTCFullYear()<1e3)){var e=(t.globals.minX+t.globals.maxX)/2,i=t.globals.minX-(e-t.globals.minX),n=t.globals.maxX-(e-t.globals.maxX);t.globals.disableZoomOut||this.zoomUpdateOptions(i,n)}}},{key:"zoomUpdateOptions",value:function(t,e){var i={min:t,max:e},n=this.getBeforeZoomRange(i);n&&(i=n.xaxis),this.w.globals.zoomed=!0,this.ctx._updateOptions({xaxis:i},!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(i)}},{key:"zoomCallback",value:function(t,e){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e})}},{key:"getBeforeZoomRange",value:function(t,e){var i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),i}},{key:"toggleMenu",value:function(){this.elMenu.classList.contains("open")?this.elMenu.classList.remove("open"):this.elMenu.classList.add("open")}},{key:"downloadPNG",value:function(){new rt(this.ctx).exportToPng(this.ctx),this.toggleMenu()}},{key:"downloadSVG",value:function(){new rt(this.ctx).exportToSVG(),this.toggleMenu()}},{key:"handleZoomReset",value:function(t){var e=this;this.ctx.getSyncedCharts().forEach((function(t){var i=t.w;i.globals.minX!==i.globals.initialminX&&i.globals.maxX!==i.globals.initialmaxX&&(t.revertDefaultAxisMinMax(),"function"==typeof i.config.chart.events.zoomed&&e.zoomCallback({min:i.config.xaxis.min,max:i.config.xaxis.max}),i.globals.zoomed=!1,t._updateSeries(i.globals.initialSeries,i.config.chart.animations.dynamicAnimation.enabled))}))}},{key:"destroy",value:function(){this.elZoomReset&&(this.elZoomReset.removeEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.removeEventListener("click",this.toggleSelection.bind(this)),this.elZoom.removeEventListener("click",this.toggleZooming.bind(this)),this.elZoomIn.removeEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.removeEventListener("click",this.handleZoomOut.bind(this)),this.elPan.removeEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.removeEventListener("click",this.toggleMenu.bind(this))),this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),t}(),yt=function(){function t(i){var n;return e(this,t),(n=c(this,a(t).call(this,i))).ctx=i,n.w=i.w,n.dragged=!1,n.graphics=new f(n.ctx),n.eventList=["mousedown","mousemove","touchstart","touchmove","mouseup","touchend"],n.clientX=0,n.clientY=0,n.startX=0,n.endX=0,n.dragX=0,n.startY=0,n.endY=0,n.dragY=0,n}return s(t,vt),n(t,[{key:"init",value:function(t){var e=this,i=t.xyRatios,n=this.w,o=this;this.xyRatios=i,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=n.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),n.globals.dom.elGraphical.add(this.zoomRect),n.globals.dom.elGraphical.add(this.selectionRect),"x"===n.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:n.globals.gridWidth,maxY:n.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):"y"===n.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:n.globals.gridWidth}).on("dragmove",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=n.globals.dom.baseEl.querySelector(n.globals.chartClass),this.hoverArea.classList.add("zoomable"),this.eventList.forEach((function(t){e.hoverArea.addEventListener(t,o.svgMouseEvents.bind(o,i),{capture:!1,passive:!0})}))}},{key:"destroy",value:function(){var t=this,e=this;this.eventList.forEach((function(i){t.hoverArea&&t.hoverArea.removeEventListener(i,e.svgMouseEvents.bind(e,e.xyRatios),{capture:!1,passive:!0})})),this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(t,e){var i=this.w,n=this,o=this.ctx.toolbar,r=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type;if(e.shiftKey?(this.shiftWasPressed=!0,o.enablePanning()):this.shiftWasPressed&&(o.enableZooming(),this.shiftWasPressed=!1),!e.target.classList.contains("apexcharts-selection-rect")&&!e.target.parentNode.classList.contains("apexcharts-toolbar")){if(n.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,n.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which){var s=n.gridRect.getBoundingClientRect();n.startX=n.clientX-s.left,n.startY=n.clientY-s.top,n.dragged=!1,n.w.globals.mousedown=!0}if(("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(n.dragged=!0,i.globals.panEnabled?(i.globals.selection=null,n.w.globals.mousedown&&n.panDragging({context:n,zoomtype:r,xyRatios:t})):(n.w.globals.mousedown&&i.globals.zoomEnabled||n.w.globals.mousedown&&i.globals.selectionEnabled)&&(n.selection=n.selectionDrawing({context:n,zoomtype:r}))),"mouseup"===e.type||"touchend"===e.type){var a=n.gridRect.getBoundingClientRect();n.w.globals.mousedown&&(n.endX=n.clientX-a.left,n.endY=n.clientY-a.top,n.dragX=Math.abs(n.endX-n.startX),n.dragY=Math.abs(n.endY-n.startY),(i.globals.zoomEnabled||i.globals.selectionEnabled)&&n.selectionDrawn({context:n,zoomtype:r})),i.globals.zoomEnabled&&n.hideSelectionRect(this.selectionRect),n.dragged=!1,n.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}},{key:"makeSelectionRectDraggable",value:function(){var t=this.w;if(this.selectionRect){var e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&this.slDraggableRect.selectize().resize({constraint:{minX:0,minY:0,maxX:t.globals.gridWidth,maxY:t.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(t.globals.selection);else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,n={x:i,y:0,width:t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i,height:t.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,n=t.width,o=t.height,r=t.translateX,s=t.translateY,a=this.w,l=this.zoomRect,c=this.selectionRect;if(this.dragged||null!==a.globals.selection){var d={transform:"translate("+r+", "+s+")"};a.globals.zoomEnabled&&this.dragged&&(l.attr({x:e,y:i,width:n,height:o,fill:a.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":a.config.chart.zoom.zoomedArea.fill.opacity,stroke:a.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":a.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":a.config.chart.zoom.zoomedArea.stroke.opacity}),f.setAttrs(l.node,d)),a.globals.selectionEnabled&&(c.attr({x:e,y:i,width:n>0?n:0,height:o>0?o:0,fill:a.config.chart.selection.fill.color,"fill-opacity":a.config.chart.selection.fill.opacity,stroke:a.config.chart.selection.stroke.color,"stroke-width":a.config.chart.selection.stroke.width,"stroke-dasharray":a.config.chart.selection.stroke.dashArray,"stroke-opacity":a.config.chart.selection.stroke.opacity}),f.setAttrs(c.node,d))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e,i=t.context,n=t.zoomtype,o=this.w,r=i,s=this.gridRect.getBoundingClientRect(),a=r.startX-1,l=r.startY,c=r.clientX-s.left-a,d=r.clientY-s.top-l,h=0,u=0;return(Math.abs(c+a)>o.globals.gridWidth||r.clientX-s.left<0)&&(r.hideSelectionRect(this.zoomRect),r.dragged=!1,r.w.globals.mousedown=!1),a>r.clientX-s.left&&(h=-(c=Math.abs(c))),l>r.clientY-s.top&&(u=-(d=Math.abs(d))),e="x"===n?{x:a,y:0,width:c,height:o.globals.gridHeight,translateX:h,translateY:0}:"y"===n?{x:0,y:l,width:o.globals.gridWidth,height:d,translateX:0,translateY:u}:{x:a,y:l,width:c,height:d,translateX:h,translateY:u},r.drawSelectionRect(e),r.selectionDragging("resizing"),e}},{key:"selectionDragging",value:function(t,e){var i=this,n=this.w,o=this.xyRatios,r=this.selectionRect,s=0;"resizing"===t&&(s=30),"function"==typeof n.config.chart.events.selection&&n.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t=i.gridRect.getBoundingClientRect(),e=r.node.getBoundingClientRect(),s=n.globals.xAxisScale.niceMin+(e.left-t.left)*o.xRatio,a=n.globals.xAxisScale.niceMin+(e.right-t.left)*o.xRatio,l=n.globals.yAxisScale[0].niceMin+(t.bottom-e.bottom)*o.yRatio[0],c=n.globals.yAxisScale[0].niceMax-(e.top-t.top)*o.yRatio[0];n.config.chart.events.selection(i.ctx,{xaxis:{min:s,max:a},yaxis:{min:l,max:c}})}),s))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,n=this.w,o=e,r=this.xyRatios,s=this.ctx.toolbar;if(o.startX>o.endX){var a=o.startX;o.startX=o.endX,o.endX=a}if(o.startY>o.endY){var l=o.startY;o.startY=o.endY,o.endY=l}var c=n.globals.xAxisScale.niceMin+o.startX*r.xRatio,d=n.globals.xAxisScale.niceMin+o.endX*r.xRatio,u=[],p=[];if(n.config.yaxis.forEach((function(t,e){u.push(Math.floor(n.globals.yAxisScale[e].niceMax-r.yRatio[e]*o.startY)),p.push(Math.floor(n.globals.yAxisScale[e].niceMax-r.yRatio[e]*o.endY))})),o.dragged&&(o.dragX>10||o.dragY>10)&&c!==d)if(n.globals.zoomEnabled){var f=h.clone(n.config.yaxis);n.globals.zoomed||(n.globals.lastXAxis=h.clone(n.config.xaxis),n.globals.lastYAxis=h.clone(n.config.yaxis));var g={min:c,max:d};if("xy"!==i&&"y"!==i||f.forEach((function(t,e){f[e].min=p[e],f[e].max=u[e]})),n.config.chart.zoom.autoScaleYaxis){var m=new j(o.ctx);f=m.autoScaleY(o.ctx,{xaxis:g})}if(s){var v=s.getBeforeZoomRange(g,f);v&&(g=v.xaxis?v.xaxis:g,f=v.yaxis?v.yaxe:f)}o.ctx._updateOptions({xaxis:g,yaxis:f},!1,o.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof n.config.chart.events.zoomed&&s.zoomCallback(g,f),n.globals.zoomed=!0}else if(n.globals.selectionEnabled){var y,b=null;y={min:c,max:d},"xy"!==i&&"y"!==i||(b=h.clone(n.config.yaxis)).forEach((function(t,e){b[e].min=p[e],b[e].max=u[e]})),n.globals.selection=o.selection,"function"==typeof n.config.chart.events.selection&&n.config.chart.events.selection(o.ctx,{xaxis:y,yaxis:b})}}},{key:"panDragging",value:function(t){var e,i=t.context,n=(t.zoomtype,this.w),o=i;if(void 0!==n.globals.lastClientPosition.x){var r=n.globals.lastClientPosition.x-o.clientX,s=n.globals.lastClientPosition.y-o.clientY;Math.abs(r)>Math.abs(s)&&r>0?e="left":Math.abs(r)>Math.abs(s)&&r<0?e="right":Math.abs(s)>Math.abs(r)&&s>0?e="up":Math.abs(s)>Math.abs(r)&&s<0&&(e="down")}n.globals.lastClientPosition={x:o.clientX,y:o.clientY};var a=n.globals.minX,l=n.globals.maxX;this.panScrolled(e,a,l)}},{key:"panScrolled",value:function(t,e,i){var n=this.w,o=this.xyRatios,r=h.clone(n.config.yaxis);"left"===t?(e=n.globals.minX+n.globals.gridWidth/15*o.xRatio,i=n.globals.maxX+n.globals.gridWidth/15*o.xRatio):"right"===t&&(e=n.globals.minX-n.globals.gridWidth/15*o.xRatio,i=n.globals.maxX-n.globals.gridWidth/15*o.xRatio),(e<n.globals.initialminX||i>n.globals.initialmaxX)&&(e=n.globals.minX,i=n.globals.maxX);var s={min:e,max:i};n.config.chart.zoom.autoScaleYaxis&&(r=new j(me.ctx).autoScaleY(me.ctx,{xaxis:s})),this.ctx._updateOptions({xaxis:{min:e,max:i},yaxis:r},!1,!1),"function"==typeof n.config.chart.events.scrolled&&n.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),t}(),bt=function(){function t(i){e(this,t),this.ctx=i,this.w=i.w}return n(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(t){var e=this.w,i="title"===t?e.config.title:e.config.subtitle,n=e.globals.svgWidth/2,o=i.offsetY,r="middle";if("left"===i.align?(n=10,r="start"):"right"===i.align&&(n=e.globals.svgWidth-10,r="end"),n+=i.offsetX,o=o+parseInt(i.style.fontSize)+2,void 0!==i.text){var s=new f(this.ctx).drawText({x:n,y:o,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,foreColor:i.style.color,opacity:1});s.node.setAttribute("class","apexcharts-".concat(t,"-text")),e.globals.dom.Paper.add(s)}}}]),t}();return nt="undefined"!=typeof window?window:void 0,ot=function(e,i){var n=(void 0!==this?this:e).SVG=function(t){if(n.supported)return t=new n.Doc(t),n.parser.draw||n.prepare(),t};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.com/svgjs",n.supported=!0,!n.supported)return!1;n.did=1e3,n.eid=function(t){return"Svgjs"+h(t)+n.did++},n.create=function(t){var e=i.createElementNS(this.ns,t);return e.setAttribute("id",this.eid(t)),e},n.extend=function(){var t,e,i,o;for(e=(t=[].slice.call(arguments)).pop(),o=t.length-1;o>=0;o--)if(t[o])for(i in e)t[o].prototype[i]=e[i];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,n.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&n.extend(e,t.extend),t.construct&&n.extend(t.parent||n.Container,t.construct),e},n.adopt=function(t){return t?t.instance?t.instance:((i="svg"==t.nodeName?t.parentNode instanceof e.SVGElement?new n.Nested:new n.Doc:"linearGradient"==t.nodeName?new n.Gradient("linear"):"radialGradient"==t.nodeName?new n.Gradient("radial"):n[h(t.nodeName)]?new(n[h(t.nodeName)]):new n.Element(t)).type=t.nodeName,i.node=t,t.instance=i,i instanceof n.Doc&&i.namespace().defs(),i.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),i):null;var i},n.prepare=function(){var t=i.getElementsByTagName("body")[0],e=(t?new n.Doc(t):n.adopt(i.documentElement).nested()).size(2,0);n.parser={body:t||i.documentElement,draw:e.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:e.polyline().node,path:e.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},i.addEventListener("DOMContentLoaded",(function(){n.parser.draw||n.prepare()}),!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},n.utils={map:function(t,e){var i,n=t.length,o=[];for(i=0;i<n;i++)o.push(e(t[i]));return o},filter:function(t,e){var i,n=t.length,o=[];for(i=0;i<n;i++)e(t[i])&&o.push(t[i]);return o},radians:function(t){return t%360*Math.PI/180},degrees:function(t){return 180*t/Math.PI%360},filterSVGElements:function(t){return this.filter(t,(function(t){return t instanceof e.SVGElement}))}},n.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},n.Color=function(e){var i,o;this.r=0,this.g=0,this.b=0,e&&("string"==typeof e?n.regex.isRgb.test(e)?(i=n.regex.rgb.exec(e.replace(n.regex.whitespace,"")),this.r=parseInt(i[1]),this.g=parseInt(i[2]),this.b=parseInt(i[3])):n.regex.isHex.test(e)&&(i=n.regex.hex.exec(4==(o=e).length?["#",o.substring(1,2),o.substring(1,2),o.substring(2,3),o.substring(2,3),o.substring(3,4),o.substring(3,4)].join(""):o),this.r=parseInt(i[1],16),this.g=parseInt(i[2],16),this.b=parseInt(i[3],16)):"object"===t(e)&&(this.r=e.r,this.g=e.g,this.b=e.b))},n.extend(n.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+u(this.r)+u(this.g)+u(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(t){return this.destination=new n.Color(t),this},at:function(t){return this.destination?(t=t<0?0:t>1?1:t,new n.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),n.Color.test=function(t){return t+="",n.regex.isHex.test(t)||n.regex.isRgb.test(t)},n.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},n.Color.isColor=function(t){return n.Color.isRgb(t)||n.Color.test(t)},n.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},n.extend(n.Array,{morph:function(t){if(this.destination=this.parse(t),this.value.length!=this.destination.length){for(var e=this.value[this.value.length-1],i=this.destination[this.destination.length-1];this.value.length>this.destination.length;)this.destination.push(i);for(;this.value.length<this.destination.length;)this.value.push(e)}return this},settle:function(){for(var t=0,e=this.value.length,i=[];t<e;t++)-1==i.indexOf(this.value[t])&&i.push(this.value[t]);return this.value=i},at:function(t){if(!this.destination)return this;for(var e=0,i=this.value.length,o=[];e<i;e++)o.push(this.value[e]+(this.destination[e]-this.value[e])*t);return new n.Array(o)},toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(t){return t=t.valueOf(),Array.isArray(t)?t:this.split(t)},split:function(t){return t.trim().split(n.regex.delimiter).map(parseFloat)},reverse:function(){return this.value.reverse(),this},clone:function(){var t=new this.constructor;return t.value=function t(e){for(var i=e.slice(0),n=i.length;n--;)Array.isArray(i[n])&&(i[n]=t(i[n]));return i}(this.value),t}}),n.PointArray=function(t,e){n.Array.call(this,t,e||[[0,0]])},n.PointArray.prototype=new n.Array,n.PointArray.prototype.constructor=n.PointArray,n.extend(n.PointArray,{toString:function(){for(var t=0,e=this.value.length,i=[];t<e;t++)i.push(this.value[t].join(","));return i.join(" ")},toLine:function(){return{x1:this.value[0][0],y1:this.value[0][1],x2:this.value[1][0],y2:this.value[1][1]}},at:function(t){if(!this.destination)return this;for(var e=0,i=this.value.length,o=[];e<i;e++)o.push([this.value[e][0]+(this.destination[e][0]-this.value[e][0])*t,this.value[e][1]+(this.destination[e][1]-this.value[e][1])*t]);return new n.PointArray(o)},parse:function(t){var e=[];if(t=t.valueOf(),Array.isArray(t)){if(Array.isArray(t[0]))return t.map((function(t){return t.slice()}));if(null!=t[0].x)return t.map((function(t){return[t.x,t.y]}))}else t=t.trim().split(n.regex.delimiter).map(parseFloat);t.length%2!=0&&t.pop();for(var i=0,o=t.length;i<o;i+=2)e.push([t[i],t[i+1]]);return e},move:function(t,e){var i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(var n=this.value.length-1;n>=0;n--)this.value[n]=[this.value[n][0]+t,this.value[n][1]+e];return this},size:function(t,e){var i,n=this.bbox();for(i=this.value.length-1;i>=0;i--)n.width&&(this.value[i][0]=(this.value[i][0]-n.x)*t/n.width+n.x),n.height&&(this.value[i][1]=(this.value[i][1]-n.y)*e/n.height+n.y);return this},bbox:function(){return n.parser.draw||n.prepare(),n.parser.poly.setAttribute("points",this.toString()),n.parser.poly.getBBox()}});for(var o={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},r="mlhvqtcsaz".split(""),s=0,a=r.length;s<a;++s)o[r[s]]=function(t){return function(e,i,n){if("H"==t)e[0]=e[0]+i.x;else if("V"==t)e[0]=e[0]+i.y;else if("A"==t)e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(var r=0,s=e.length;r<s;++r)e[r]=e[r]+(r%2?i.y:i.x);return o[t](e,i,n)}}(r[s].toUpperCase());n.PathArray=function(t,e){n.Array.call(this,t,e||[["M",0,0]])},n.PathArray.prototype=new n.Array,n.PathArray.prototype.constructor=n.PathArray,n.extend(n.PathArray,{toString:function(){return function(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e][0],null!=t[e][1]&&(n+=t[e][1],null!=t[e][2]&&(n+=" ",n+=t[e][2],null!=t[e][3]&&(n+=" ",n+=t[e][3],n+=" ",n+=t[e][4],null!=t[e][5]&&(n+=" ",n+=t[e][5],n+=" ",n+=t[e][6],null!=t[e][7]&&(n+=" ",n+=t[e][7])))));return n+" "}(this.value)},move:function(t,e){var i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(var n,o=this.value.length-1;o>=0;o--)"M"==(n=this.value[o][0])||"L"==n||"T"==n?(this.value[o][1]+=t,this.value[o][2]+=e):"H"==n?this.value[o][1]+=t:"V"==n?this.value[o][1]+=e:"C"==n||"S"==n||"Q"==n?(this.value[o][1]+=t,this.value[o][2]+=e,this.value[o][3]+=t,this.value[o][4]+=e,"C"==n&&(this.value[o][5]+=t,this.value[o][6]+=e)):"A"==n&&(this.value[o][6]+=t,this.value[o][7]+=e);return this},size:function(t,e){var i,n,o=this.bbox();for(i=this.value.length-1;i>=0;i--)"M"==(n=this.value[i][0])||"L"==n||"T"==n?(this.value[i][1]=(this.value[i][1]-o.x)*t/o.width+o.x,this.value[i][2]=(this.value[i][2]-o.y)*e/o.height+o.y):"H"==n?this.value[i][1]=(this.value[i][1]-o.x)*t/o.width+o.x:"V"==n?this.value[i][1]=(this.value[i][1]-o.y)*e/o.height+o.y:"C"==n||"S"==n||"Q"==n?(this.value[i][1]=(this.value[i][1]-o.x)*t/o.width+o.x,this.value[i][2]=(this.value[i][2]-o.y)*e/o.height+o.y,this.value[i][3]=(this.value[i][3]-o.x)*t/o.width+o.x,this.value[i][4]=(this.value[i][4]-o.y)*e/o.height+o.y,"C"==n&&(this.value[i][5]=(this.value[i][5]-o.x)*t/o.width+o.x,this.value[i][6]=(this.value[i][6]-o.y)*e/o.height+o.y)):"A"==n&&(this.value[i][1]=this.value[i][1]*t/o.width,this.value[i][2]=this.value[i][2]*e/o.height,this.value[i][6]=(this.value[i][6]-o.x)*t/o.width+o.x,this.value[i][7]=(this.value[i][7]-o.y)*e/o.height+o.y);return this},equalCommands:function(t){var e,i,o;for(t=new n.PathArray(t),o=this.value.length===t.value.length,e=0,i=this.value.length;o&&e<i;e++)o=this.value[e][0]===t.value[e][0];return o},morph:function(t){return t=new n.PathArray(t),this.equalCommands(t)?this.destination=t:this.destination=null,this},at:function(t){if(!this.destination)return this;var e,i,o,r,s=this.value,a=this.destination.value,l=[],c=new n.PathArray;for(e=0,i=s.length;e<i;e++){for(l[e]=[s[e][0]],o=1,r=s[e].length;o<r;o++)l[e][o]=s[e][o]+(a[e][o]-s[e][o])*t;"A"===l[e][0]&&(l[e][4]=+(0!=l[e][4]),l[e][5]=+(0!=l[e][5]))}return c.value=l,c},parse:function(t){if(t instanceof n.PathArray)return t.valueOf();var e,i={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};t="string"==typeof t?t.replace(n.regex.numbersWithDots,c).replace(n.regex.pathLetters," $& ").replace(n.regex.hyphen,"$1 -").trim().split(n.regex.delimiter):t.reduce((function(t,e){return[].concat.call(t,e)}),[]);var r=[],s=new n.Point,a=new n.Point,l=0,d=t.length;do{n.regex.isPathLetter.test(t[l])?(e=t[l],++l):"M"==e?e="L":"m"==e&&(e="l"),r.push(o[e].call(null,t.slice(l,l+=i[e.toUpperCase()]).map(parseFloat),s,a))}while(d>l);return r},bbox:function(){return n.parser.draw||n.prepare(),n.parser.path.setAttribute("d",this.toString()),n.parser.path.getBBox()}}),n.Number=n.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(n.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof n.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new n.Number(t),new n.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new n.Number(t),new n.Number(this-t,this.unit||t.unit)},times:function(t){return t=new n.Number(t),new n.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new n.Number(t),new n.Number(this/t,this.unit||t.unit)},to:function(t){var e=new n.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new n.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new n.Number(this.destination).minus(this).times(t).plus(this):this}}}),n.Element=n.invent({create:function(t){this._stroke=n.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var i=p(this,t,e);return this.width(new n.Number(i.width)).height(new n.Number(i.height))},clone:function(t){this.writeDataToDom();var e=v(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},inside:function(t,e){var i=this.bbox();return t>i.x&&e>i.y&&t<i.x+i.width&&e<i.y+i.height},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(n.regex.delimiter)},hasClass:function(t){return-1!=this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!=t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},reference:function(t){return n.get(this.attr(t))},parent:function(t){var i=this;if(!i.node.parentNode)return null;if(i=n.adopt(i.node.parentNode),!t)return i;for(;i&&i.node instanceof e.SVGElement;){if("string"==typeof t?i.matches(t):i instanceof t)return i;if(!i.node.parentNode||"#document"==i.node.parentNode.nodeName)return null;i=n.adopt(i.node.parentNode)}},doc:function(){return this instanceof n.Doc?this:this.parent(n.Doc)},parents:function(t){var e=[],i=this;do{if(!(i=i.parent(t))||!i.node)break;e.push(i)}while(i.parent);return e},matches:function(t){return function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}(this.node,t)},native:function(){return this.node},svg:function(t){var e=i.createElement("svg");if(!(t&&this instanceof n.Parent))return e.appendChild(t=i.createElement("svg")),this.writeDataToDom(),t.appendChild(this.node.cloneNode(!0)),e.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");e.innerHTML="<svg>"+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var o=0,r=e.firstChild.childNodes.length;o<r;o++)this.node.appendChild(e.firstChild.firstChild);return this},writeDataToDom:function(){return(this.each||this.lines)&&(this.each?this:this.lines()).each((function(){this.writeDataToDom()})),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(t){return this.dom=t,this},is:function(t){return function(t,e){return t instanceof e}(this,t)}}}),n.easing={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)}},n.morph=function(t){return function(e,i){return new n.MorphObj(e,i).at(t)}},n.Situation=n.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new n.Number(t.duration).valueOf(),this.delay=new n.Number(t.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=t.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),n.FX=n.invent({create:function(t){this._target=t,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(e,i,o){"object"===t(e)&&(i=e.ease,o=e.delay,e=e.duration);var r=new n.Situation({duration:e||1e3,delay:o||0,ease:n.easing[i||"-"]||i});return this.queue(r),this},delay:function(t){var e=new n.Situation({duration:t,delay:0,ease:n.easing["-"]});return this.queue(e)},target:function(t){return t&&t instanceof n.Element?(this._target=t,this):this._target},timeToAbsPos:function(t){return(t-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(t){return this.situation.duration/this._speed*t+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=e.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){e.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(t){return("function"==typeof t||t instanceof n.Situation)&&this.situations.push(t),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof n.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e,i,o=this.situation;if(o.init)return this;for(t in o.animations)for(i=this.target()[t](),Array.isArray(i)||(i=[i]),Array.isArray(o.animations[t])||(o.animations[t]=[o.animations[t]]),e=i.length;e--;)o.animations[t][e]instanceof n.Number&&(i[e]=new n.Number(i[e])),o.animations[t][e]=i[e].morph(o.animations[t][e]);for(t in o.attrs)o.attrs[t]=new n.MorphObj(this.target().attr(t),o.attrs[t]);for(t in o.styles)o.styles[t]=new n.MorphObj(this.target().style(t),o.styles[t]);return o.initialTransformation=this.target().matrixify(),o.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(t,e){var i=this.active;return this.active=!1,e&&this.clearQueue(),t&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},reset:function(){if(this.situation){var t=this.situation;this.stop(),this.situation=t,this.atStart()}return this},finish:function(){for(this.stop(!0,!1);this.dequeue().situation&&this.stop(!0,!1););return this.clearQueue().clearCurrent(),this},atStart:function(){return this.at(0,!0)},atEnd:function(){return!0===this.situation.loops&&(this.situation.loops=this.situation.loop+1),"number"==typeof this.situation.loops?this.at(this.situation.loops,!0):this.at(1,!0)},at:function(t,e){var i=this.situation.duration/this._speed;return this.absPos=t,e||(this.situation.reversed&&(this.absPos=1-this.absPos),this.absPos+=this.situation.loop),this.situation.start=+new Date-this.absPos*i,this.situation.finish=this.situation.start+i,this.step(!0)},speed:function(t){return 0===t?this.pause():t?(this._speed=t,this.at(this.absPos,!0)):this._speed},loop:function(t,e){var i=this.last();return i.loops=null==t||t,i.loop=0,e&&(i.reversing=!0),this},pause:function(){return this.paused=!0,this.stopAnimFrame(),this},play:function(){return this.paused?(this.paused=!1,this.at(this.absPos,!0)):this},reverse:function(t){var e=this.last();return e.reversed=void 0===t?!e.reversed:t,this},progress:function(t){return t?this.situation.ease(this.pos):this.pos},after:function(t){var e=this.last();return this.target().on("finished.fx",(function i(n){n.detail.situation==e&&(t.call(this,e),this.off("finished.fx",i))})),this._callStart()},during:function(t){var e=this.last(),i=function(i){i.detail.situation==e&&t.call(this,i.detail.pos,n.morph(i.detail.pos),i.detail.eased,e)};return this.target().off("during.fx",i).on("during.fx",i),this.after((function(){this.off("during.fx",i)})),this._callStart()},afterAll:function(t){var e=function e(i){t.call(this),this.off("allfinished.fx",e)};return this.target().off("allfinished.fx",e).on("allfinished.fx",e),this._callStart()},duringAll:function(t){var e=function(e){t.call(this,e.detail.pos,n.morph(e.detail.pos),e.detail.eased,e.detail.situation)};return this.target().off("during.fx",e).on("during.fx",e),this.afterAll((function(){this.off("during.fx",e)})),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(t,e,i){return this.last()[i||"animations"][t]=e,this._callStart()},step:function(t){var e,i,n;t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||i<this.situation.loops?(this.pos=e-i,n=this.situation.loop,this.situation.loop=i):(this.absPos=this.situation.loops,this.pos=1,n=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-n)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos),this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var o=this.situation.ease(this.pos);for(var r in this.situation.once)r>this.lastPos&&r<=o&&(this.situation.once[r].call(this.target(),this.pos,o),delete this.situation.once[r]);return this.active&&this.target().fire("during",{pos:this.pos,eased:o,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=o,this):this},eachAt:function(){var t,e,i,o=this,r=this.target(),s=this.situation;for(t in s.animations)i=[].concat(s.animations[t]).map((function(t){return"string"!=typeof t&&t.at?t.at(s.ease(o.pos),o.pos):t})),r[t].apply(r,i);for(t in s.attrs)i=[t].concat(s.attrs[t]).map((function(t){return"string"!=typeof t&&t.at?t.at(s.ease(o.pos),o.pos):t})),r.attr.apply(r,i);for(t in s.styles)i=[t].concat(s.styles[t]).map((function(t){return"string"!=typeof t&&t.at?t.at(s.ease(o.pos),o.pos):t})),r.style.apply(r,i);if(s.transforms.length){for(i=s.initialTransformation,t=0,e=s.transforms.length;t<e;t++){var a=s.transforms[t];a instanceof n.Matrix?i=a.relative?i.multiply((new n.Matrix).morph(a).at(s.ease(this.pos))):i.morph(a).at(s.ease(this.pos)):(a.relative||a.undo(i.extract()),i=i.multiply(a.at(s.ease(this.pos))))}r.matrix(i)}return this},once:function(t,e,i){var n=this.last();return i||(t=n.ease(t)),n.once[t]=e,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:n.Element,construct:{animate:function(t,e,i){return(this.fx||(this.fx=new n.FX(this))).animate(t,e,i)},delay:function(t){return(this.fx||(this.fx=new n.FX(this))).delay(t)},stop:function(t,e){return this.fx&&this.fx.stop(t,e),this},finish:function(){return this.fx&&this.fx.finish(),this},pause:function(){return this.fx&&this.fx.pause(),this},play:function(){return this.fx&&this.fx.play(),this},speed:function(t){if(this.fx){if(null==t)return this.fx.speed();this.fx.speed(t)}return this}}}),n.MorphObj=n.invent({create:function(t,e){return n.Color.isColor(e)?new n.Color(t).morph(e):n.regex.delimiter.test(t)?n.regex.pathLetters.test(t)?new n.PathArray(t).morph(e):new n.Array(t).morph(e):n.regex.numberAndUnit.test(e)?new n.Number(t).morph(e):(this.value=t,void(this.destination=e))},extend:{at:function(t,e){return e<1?this.value:this.destination},valueOf:function(){return this.value}}}),n.extend(n.FX,{attr:function(e,i,n){if("object"===t(e))for(var o in e)this.attr(o,e[o]);else this.add(e,i,"attrs");return this},style:function(e,i){if("object"===t(e))for(var n in e)this.style(n,e[n]);else this.add(e,i,"styles");return this},x:function(t,e){if(this.target()instanceof n.G)return this.transform({x:t},e),this;var i=new n.Number(t);return i.relative=e,this.add("x",i)},y:function(t,e){if(this.target()instanceof n.G)return this.transform({y:t},e),this;var i=new n.Number(t);return i.relative=e,this.add("y",i)},cx:function(t){return this.add("cx",new n.Number(t))},cy:function(t){return this.add("cy",new n.Number(t))},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var i;return this.target()instanceof n.Text?this.attr("font-size",t):(t&&e||(i=this.target().bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.add("width",new n.Number(t)).add("height",new n.Number(e))),this},width:function(t){return this.add("width",new n.Number(t))},height:function(t){return this.add("height",new n.Number(t))},plot:function(t,e,i,n){return 4==arguments.length?this.plot([t,e,i,n]):this.add("plot",new(this.target().morphArray)(t))},leading:function(t){return this.target().leading?this.add("leading",new n.Number(t)):this},viewbox:function(t,e,i,o){return this.target()instanceof n.Container&&this.add("viewbox",new n.ViewBox(t,e,i,o)),this},update:function(t){if(this.target()instanceof n.Stop){if("number"==typeof t||t instanceof n.Number)return this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]});null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset)}return this}}),n.Box=n.invent({create:function(e,i,o,r){if(!("object"!==t(e)||e instanceof n.Element))return n.Box.call(this,null!=e.left?e.left:e.x,null!=e.top?e.top:e.y,e.width,e.height);4==arguments.length&&(this.x=e,this.y=i,this.width=o,this.height=r),y(this)},extend:{merge:function(t){var e=new this.constructor;return e.x=Math.min(this.x,t.x),e.y=Math.min(this.y,t.y),e.width=Math.max(this.x+this.width,t.x+t.width)-e.x,e.height=Math.max(this.y+this.height,t.y+t.height)-e.y,y(e)},transform:function(t){var e,i=1/0,o=-1/0,r=1/0,s=-1/0;return[new n.Point(this.x,this.y),new n.Point(this.x2,this.y),new n.Point(this.x,this.y2),new n.Point(this.x2,this.y2)].forEach((function(e){e=e.transform(t),i=Math.min(i,e.x),o=Math.max(o,e.x),r=Math.min(r,e.y),s=Math.max(s,e.y)})),(e=new this.constructor).x=i,e.width=o-i,e.y=r,e.height=s-r,y(e),e}}}),n.BBox=n.invent({create:function(t){if(n.Box.apply(this,[].slice.call(arguments)),t instanceof n.Element){var e;try{if(!i.documentElement.contains){for(var o=t.node;o.parentNode;)o=o.parentNode;if(o!=i)throw new Error("Element not in the dom")}e=t.node.getBBox()}catch(i){if(t instanceof n.Shape){n.parser.draw||n.prepare();var r=t.clone(n.parser.draw.instance).show();e=r.node.getBBox(),r.remove()}else e={x:t.node.clientLeft,y:t.node.clientTop,width:t.node.clientWidth,height:t.node.clientHeight}}n.Box.call(this,e)}},inherit:n.Box,parent:n.Element,construct:{bbox:function(){return new n.BBox(this)}}}),n.BBox.prototype.constructor=n.BBox,n.extend(n.Element,{tbox:function(){return console.warn("Use of TBox is deprecated and mapped to RBox. Use .rbox() instead."),this.rbox(this.doc())}}),n.RBox=n.invent({create:function(t){n.Box.apply(this,[].slice.call(arguments)),t instanceof n.Element&&n.Box.call(this,t.node.getBoundingClientRect())},inherit:n.Box,parent:n.Element,extend:{addOffset:function(){return this.x+=e.pageXOffset,this.y+=e.pageYOffset,this}},construct:{rbox:function(t){return t?new n.RBox(this).transform(t.screenCTM().inverse()):new n.RBox(this).addOffset()}}}),n.RBox.prototype.constructor=n.RBox,n.Matrix=n.invent({create:function(e){var i,o=g([1,0,0,1,0,0]);for(e=e instanceof n.Element?e.matrixify():"string"==typeof e?g(e.split(n.regex.delimiter).map(parseFloat)):6==arguments.length?g([].slice.call(arguments)):Array.isArray(e)?g(e):"object"===t(e)?e:o,i=x.length-1;i>=0;--i)this[x[i]]=null!=e[x[i]]?e[x[i]]:o[x[i]]},extend:{extract:function(){var t=f(this,0,1),e=f(this,1,0),i=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(i*Math.PI/180)+this.f*Math.sin(i*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(i*Math.PI/180)+this.e*Math.sin(-i*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),skewX:-i,skewY:180/Math.PI*Math.atan2(e.y,e.x),scaleX:Math.sqrt(this.a*this.a+this.b*this.b),scaleY:Math.sqrt(this.c*this.c+this.d*this.d),rotation:i,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new n.Matrix(this)}},clone:function(){return new n.Matrix(this)},morph:function(t){return this.destination=new n.Matrix(t),this},at:function(t){return this.destination?new n.Matrix({a:this.a+(this.destination.a-this.a)*t,b:this.b+(this.destination.b-this.b)*t,c:this.c+(this.destination.c-this.c)*t,d:this.d+(this.destination.d-this.d)*t,e:this.e+(this.destination.e-this.e)*t,f:this.f+(this.destination.f-this.f)*t}):this},multiply:function(t){return new n.Matrix(this.native().multiply(function(t){return t instanceof n.Matrix||(t=new n.Matrix(t)),t}(t).native()))},inverse:function(){return new n.Matrix(this.native().inverse())},translate:function(t,e){return new n.Matrix(this.native().translate(t||0,e||0))},scale:function(t,e,i,o){return 1==arguments.length?e=t:3==arguments.length&&(o=i,i=e,e=t),this.around(i,o,new n.Matrix(t,0,0,e,0,0))},rotate:function(t,e,i){return t=n.utils.radians(t),this.around(e,i,new n.Matrix(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0))},flip:function(t,e){return"x"==t?this.scale(-1,1,e,0):"y"==t?this.scale(1,-1,0,e):this.scale(-1,-1,t,null!=e?e:t)},skew:function(t,e,i,o){return 1==arguments.length?e=t:3==arguments.length&&(o=i,i=e,e=t),t=n.utils.radians(t),e=n.utils.radians(e),this.around(i,o,new n.Matrix(1,Math.tan(e),Math.tan(t),1,0,0))},skewX:function(t,e,i){return this.skew(t,0,e,i)},skewY:function(t,e,i){return this.skew(0,t,e,i)},around:function(t,e,i){return this.multiply(new n.Matrix(1,0,0,1,t||0,e||0)).multiply(i).multiply(new n.Matrix(1,0,0,1,-t||0,-e||0))},native:function(){for(var t=n.parser.native.createSVGMatrix(),e=x.length-1;e>=0;e--)t[x[e]]=this[x[e]];return t},toString:function(){return"matrix("+b(this.a)+","+b(this.b)+","+b(this.c)+","+b(this.d)+","+b(this.e)+","+b(this.f)+")"}},parent:n.Element,construct:{ctm:function(){return new n.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof n.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new n.Matrix(e)}return new n.Matrix(this.node.getScreenCTM())}}}),n.Point=n.invent({create:function(e,i){var n;n=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===t(e)?{x:e.x,y:e.y}:null!=e?{x:e,y:null!=i?i:e}:{x:0,y:0},this.x=n.x,this.y=n.y},extend:{clone:function(){return new n.Point(this)},morph:function(t,e){return this.destination=new n.Point(t,e),this},at:function(t){return this.destination?new n.Point({x:this.x+(this.destination.x-this.x)*t,y:this.y+(this.destination.y-this.y)*t}):this},native:function(){var t=n.parser.native.createSVGPoint();return t.x=this.x,t.y=this.y,t},transform:function(t){return new n.Point(this.native().matrixTransform(t.native()))}}}),n.extend(n.Element,{point:function(t,e){return new n.Point(t,e).transform(this.screenCTM().inverse())}}),n.extend(n.Element,{attr:function(e,i,o){if(null==e){for(e={},o=(i=this.node.attributes).length-1;o>=0;o--)e[i[o].nodeName]=n.regex.isNumber.test(i[o].nodeValue)?parseFloat(i[o].nodeValue):i[o].nodeValue;return e}if("object"===t(e))for(i in e)this.attr(i,e[i]);else if(null===i)this.node.removeAttribute(e);else{if(null==i)return null==(i=this.node.getAttribute(e))?n.defaults.attrs[e]:n.regex.isNumber.test(i)?parseFloat(i):i;"stroke-width"==e?this.attr("stroke",parseFloat(i)>0?this._stroke:null):"stroke"==e&&(this._stroke=i),"fill"!=e&&"stroke"!=e||(n.regex.isImage.test(i)&&(i=this.doc().defs().image(i,0,0)),i instanceof n.Image&&(i=this.doc().defs().pattern(0,0,(function(){this.add(i)})))),"number"==typeof i?i=new n.Number(i):n.Color.isColor(i)?i=new n.Color(i):Array.isArray(i)&&(i=new n.Array(i)),"leading"==e?this.leading&&this.leading(i):"string"==typeof o?this.node.setAttributeNS(o,e,i.toString()):this.node.setAttribute(e,i.toString()),!this.rebuild||"font-size"!=e&&"x"!=e||this.rebuild(e,i)}return this}}),n.extend(n.Element,{transform:function(e,i){var o,r;if("object"!==t(e))return o=new n.Matrix(this).extract(),"string"==typeof e?o[e]:o;if(o=new n.Matrix(this),i=!!i||!!e.relative,null!=e.a)o=i?o.multiply(new n.Matrix(e)):new n.Matrix(e);else if(null!=e.rotation)m(e,this),o=i?o.rotate(e.rotation,e.cx,e.cy):o.rotate(e.rotation-o.extract().rotation,e.cx,e.cy);else if(null!=e.scale||null!=e.scaleX||null!=e.scaleY){if(m(e,this),e.scaleX=null!=e.scale?e.scale:null!=e.scaleX?e.scaleX:1,e.scaleY=null!=e.scale?e.scale:null!=e.scaleY?e.scaleY:1,!i){var s=o.extract();e.scaleX=1*e.scaleX/s.scaleX,e.scaleY=1*e.scaleY/s.scaleY}o=o.scale(e.scaleX,e.scaleY,e.cx,e.cy)}else null!=e.skew||null!=e.skewX||null!=e.skewY?(m(e,this),e.skewX=null!=e.skew?e.skew:null!=e.skewX?e.skewX:0,e.skewY=null!=e.skew?e.skew:null!=e.skewY?e.skewY:0,i||(s=o.extract(),o=o.multiply((new n.Matrix).skew(s.skewX,s.skewY,e.cx,e.cy).inverse())),o=o.skew(e.skewX,e.skewY,e.cx,e.cy)):e.flip?("x"==e.flip||"y"==e.flip?e.offset=null==e.offset?this.bbox()["c"+e.flip]:e.offset:null==e.offset?(r=this.bbox(),e.flip=r.cx,e.offset=r.cy):e.flip=e.offset,o=(new n.Matrix).flip(e.flip,e.offset)):null==e.x&&null==e.y||(i?o=o.translate(e.x,e.y):(null!=e.x&&(o.e=e.x),null!=e.y&&(o.f=e.y)));return this.attr("transform",o)}}),n.extend(n.FX,{transform:function(e,i){var o,r,s=this.target();return"object"!==t(e)?(o=new n.Matrix(s).extract(),"string"==typeof e?o[e]:o):(i=!!i||!!e.relative,null!=e.a?o=new n.Matrix(e):null!=e.rotation?(m(e,s),o=new n.Rotate(e.rotation,e.cx,e.cy)):null!=e.scale||null!=e.scaleX||null!=e.scaleY?(m(e,s),e.scaleX=null!=e.scale?e.scale:null!=e.scaleX?e.scaleX:1,e.scaleY=null!=e.scale?e.scale:null!=e.scaleY?e.scaleY:1,o=new n.Scale(e.scaleX,e.scaleY,e.cx,e.cy)):null!=e.skewX||null!=e.skewY?(m(e,s),e.skewX=null!=e.skewX?e.skewX:0,e.skewY=null!=e.skewY?e.skewY:0,o=new n.Skew(e.skewX,e.skewY,e.cx,e.cy)):e.flip?("x"==e.flip||"y"==e.flip?e.offset=null==e.offset?s.bbox()["c"+e.flip]:e.offset:null==e.offset?(r=s.bbox(),e.flip=r.cx,e.offset=r.cy):e.flip=e.offset,o=(new n.Matrix).flip(e.flip,e.offset)):null==e.x&&null==e.y||(o=new n.Translate(e.x,e.y)),o?(o.relative=i,this.last().transforms.push(o),this._callStart()):this)}}),n.extend(n.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(n.regex.transforms).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(n.regex.delimiter).map((function(t){return parseFloat(t)}))]})).reduce((function(t,e){return"matrix"==e[0]?t.multiply(g(e[1])):t[e[0]].apply(t,e[1])}),new n.Matrix)},toParent:function(t){if(this==t)return this;var e=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t).untransform().transform(i.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())}}),n.Transformation=n.invent({create:function(e,i){if(arguments.length>1&&"boolean"!=typeof i)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(e))for(var n=0,o=this.arguments.length;n<o;++n)this[this.arguments[n]]=e[n];else if("object"===t(e))for(n=0,o=this.arguments.length;n<o;++n)this[this.arguments[n]]=e[this.arguments[n]];this.inversed=!1,!0===i&&(this.inversed=!0)},extend:{arguments:[],method:"",at:function(t){for(var e=[],i=0,o=this.arguments.length;i<o;++i)e.push(this[this.arguments[i]]);var r=this._undo||new n.Matrix;return r=(new n.Matrix).morph(n.Matrix.prototype[this.method].apply(r,e)).at(t),this.inversed?r.inverse():r},undo:function(t){for(var e=0,i=this.arguments.length;e<i;++e)t[this.arguments[e]]=void 0===this[this.arguments[e]]?0:t[this.arguments[e]];return t.cx=this.cx,t.cy=this.cy,this._undo=new(n[h(this.method)])(t,!0).at(1),this}}}),n.Translate=n.invent({parent:n.Matrix,inherit:n.Transformation,create:function(t,e){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),n.Rotate=n.invent({parent:n.Matrix,inherit:n.Transformation,create:function(t,e){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["rotation","cx","cy"],method:"rotate",at:function(t){var e=(new n.Matrix).rotate((new n.Number).morph(this.rotation-(this._undo?this._undo.rotation:0)).at(t),this.cx,this.cy);return this.inversed?e.inverse():e},undo:function(t){return this._undo=t,this}}}),n.Scale=n.invent({parent:n.Matrix,inherit:n.Transformation,create:function(t,e){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["scaleX","scaleY","cx","cy"],method:"scale"}}),n.Skew=n.invent({parent:n.Matrix,inherit:n.Transformation,create:function(t,e){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["skewX","skewY","cx","cy"],method:"skew"}}),n.extend(n.Element,{style:function(e,i){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"===t(e))for(i in e)this.style(i,e[i]);else{if(!n.regex.isCss.test(e))return this.node.style[d(e)];for(e=e.split(/\s*;\s*/).filter((function(t){return!!t})).map((function(t){return t.split(/\s*:\s*/)}));i=e.pop();)this.style(i[0],i[1])}else this.node.style[d(e)]=null===i||n.regex.isBlank.test(i)?"":i;return this}}),n.Parent=n.invent({create:function(t){this.constructor.call(this,t)},inherit:n.Element,extend:{children:function(){return n.utils.map(n.utils.filterSVGElements(this.node.childNodes),(function(t){return n.adopt(t)}))},add:function(t,e){return null==e?this.node.appendChild(t.node):t.node!=this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this},put:function(t,e){return this.add(t,e),t},has:function(t){return this.index(t)>=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return n.adopt(this.node.childNodes[t])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(t,e){var i,o,r=this.children();for(i=0,o=r.length;i<o;i++)r[i]instanceof n.Element&&t.apply(r[i],[i,r]),e&&r[i]instanceof n.Container&&r[i].each(t,e);return this},removeElement:function(t){return this.node.removeChild(t.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),n.extend(n.Parent,{ungroup:function(t,e){return 0===e||this instanceof n.Defs||this.node==n.parser.draw||(t=t||(this instanceof n.Doc?this:this.parent(n.Parent)),e=e||1/0,this.each((function(){return this instanceof n.Defs?this:this instanceof n.Parent?this.ungroup(t,e-1):this.toParent(t)})),this.node.firstChild||this.remove()),this},flatten:function(t,e){return this.ungroup(t,e)}}),n.Container=n.invent({create:function(t){this.constructor.call(this,t)},inherit:n.Parent}),n.ViewBox=n.invent({create:function(e){var i,o,r,s,a,l,c,d=1,h=1,u=/[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/gi;if(e instanceof n.Element){for(l=e,c=e,a=(e.attr("viewBox")||"").match(u),e.bbox,r=new n.Number(e.width()),s=new n.Number(e.height());"%"==r.unit;)d*=r.value,r=new n.Number(l instanceof n.Doc?l.parent().offsetWidth:l.parent().width()),l=l.parent();for(;"%"==s.unit;)h*=s.value,s=new n.Number(c instanceof n.Doc?c.parent().offsetHeight:c.parent().height()),c=c.parent();this.x=0,this.y=0,this.width=r*d,this.height=s*h,this.zoom=1,a&&(i=parseFloat(a[0]),o=parseFloat(a[1]),r=parseFloat(a[2]),s=parseFloat(a[3]),this.zoom=this.width/this.height>r/s?this.height/s:this.width/r,this.x=i,this.y=o,this.width=r,this.height=s)}else e="string"==typeof e?e.match(u).map((function(t){return parseFloat(t)})):Array.isArray(e)?e:"object"===t(e)?[e.x,e.y,e.width,e.height]:4==arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]},extend:{toString:function(){return this.x+" "+this.y+" "+this.width+" "+this.height},morph:function(t,e,i,o){return this.destination=new n.ViewBox(t,e,i,o),this},at:function(t){return this.destination?new n.ViewBox([this.x+(this.destination.x-this.x)*t,this.y+(this.destination.y-this.y)*t,this.width+(this.destination.width-this.width)*t,this.height+(this.destination.height-this.height)*t]):this}},parent:n.Container,construct:{viewbox:function(t,e,i,o){return 0==arguments.length?new n.ViewBox(this):this.attr("viewBox",new n.ViewBox(t,e,i,o))}}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach((function(t){n.Element.prototype[t]=function(e){return n.on(this.node,t,e),this}})),n.listeners=[],n.handlerMap=[],n.listenerId=0,n.on=function(t,e,i,o,r){var s=i.bind(o||t.instance||t),a=(n.handlerMap.indexOf(t)+1||n.handlerMap.push(t))-1,l=e.split(".")[0],c=e.split(".")[1]||"*";n.listeners[a]=n.listeners[a]||{},n.listeners[a][l]=n.listeners[a][l]||{},n.listeners[a][l][c]=n.listeners[a][l][c]||{},i._svgjsListenerId||(i._svgjsListenerId=++n.listenerId),n.listeners[a][l][c][i._svgjsListenerId]=s,t.addEventListener(l,s,r||!1)},n.off=function(t,e,i){var o=n.handlerMap.indexOf(t),r=e&&e.split(".")[0],s=e&&e.split(".")[1],a="";if(-1!=o)if(i){if("function"==typeof i&&(i=i._svgjsListenerId),!i)return;n.listeners[o][r]&&n.listeners[o][r][s||"*"]&&(t.removeEventListener(r,n.listeners[o][r][s||"*"][i],!1),delete n.listeners[o][r][s||"*"][i])}else if(s&&r){if(n.listeners[o][r]&&n.listeners[o][r][s]){for(i in n.listeners[o][r][s])n.off(t,[r,s].join("."),i);delete n.listeners[o][r][s]}}else if(s)for(e in n.listeners[o])for(a in n.listeners[o][e])s===a&&n.off(t,[e,s].join("."));else if(r){if(n.listeners[o][r]){for(a in n.listeners[o][r])n.off(t,[r,a].join("."));delete n.listeners[o][r]}}else{for(e in n.listeners[o])n.off(t,e);delete n.listeners[o],delete n.handlerMap[o]}},n.extend(n.Element,{on:function(t,e,i,o){return n.on(this.node,t,e,i,o),this},off:function(t,e){return n.off(this.node,t,e),this},fire:function(t,i){return t instanceof e.Event?this.node.dispatchEvent(t):this.node.dispatchEvent(t=new n.CustomEvent(t,{detail:i,cancelable:!0})),this._event=t,this},event:function(){return this._event}}),n.Defs=n.invent({create:"defs",inherit:n.Container}),n.G=n.invent({create:"g",inherit:n.Container,extend:{x:function(t){return null==t?this.transform("x"):this.transform({x:t-this.x()},!0)},y:function(t){return null==t?this.transform("y"):this.transform({y:t-this.y()},!0)},cx:function(t){return null==t?this.gbox().cx:this.x(t-this.gbox().width/2)},cy:function(t){return null==t?this.gbox().cy:this.y(t-this.gbox().height/2)},gbox:function(){var t=this.bbox(),e=this.transform();return t.x+=e.x,t.x2+=e.x,t.cx+=e.x,t.y+=e.y,t.y2+=e.y,t.cy+=e.y,t}},construct:{group:function(){return this.put(new n.G)}}}),n.Doc=n.invent({create:function(t){t&&("svg"==(t="string"==typeof t?i.getElementById(t):t).nodeName?this.constructor.call(this,t):(this.constructor.call(this,n.create("svg")),t.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:n.Container,extend:{namespace:function(){return this.attr({xmlns:n.ns,version:"1.1"}).attr("xmlns:xlink",n.xlink,n.xmlns).attr("xmlns:svgjs",n.svgjs,n.xmlns)},defs:function(){var t;return this._defs||((t=this.node.getElementsByTagName("defs")[0])?this._defs=n.adopt(t):this._defs=new n.Defs,this.node.appendChild(this._defs.node)),this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},spof:function(){var t=this.node.getScreenCTM();return t&&this.style("left",-t.e%1+"px").style("top",-t.f%1+"px"),this},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,n.parser.draw&&!n.parser.draw.parentNode&&this.node.appendChild(n.parser.draw),this},clone:function(t){this.writeDataToDom();var e=this.node,i=v(e.cloneNode(!0));return t?(t.node||t).appendChild(i.node):e.parentNode.insertBefore(i.node,e.nextSibling),i}}}),n.extend(n.Element,{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},previous:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),e instanceof n.Doc&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return t>0&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),t instanceof n.Doc&&t.node.appendChild(t.defs().node),this},back:function(){return this.position()>0&&this.parent().removeElement(this).add(this,0),this},before:function(t){t.remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){t.remove();var e=this.position();return this.parent().add(t,e+1),this}}),n.Mask=n.invent({create:function(){this.constructor.call(this,n.create("mask")),this.targets=[]},inherit:n.Container,extend:{remove:function(){for(var t=this.targets.length-1;t>=0;t--)this.targets[t]&&this.targets[t].unmask();return this.targets=[],n.Element.prototype.remove.call(this),this}},construct:{mask:function(){return this.defs().put(new n.Mask)}}}),n.extend(n.Element,{maskWith:function(t){return this.masker=t instanceof n.Mask?t:this.parent().mask().add(t),this.masker.targets.push(this),this.attr("mask",'url("#'+this.masker.attr("id")+'")')},unmask:function(){return delete this.masker,this.attr("mask",null)}}),n.ClipPath=n.invent({create:function(){this.constructor.call(this,n.create("clipPath")),this.targets=[]},inherit:n.Container,extend:{remove:function(){for(var t=this.targets.length-1;t>=0;t--)this.targets[t]&&this.targets[t].unclip();return this.targets=[],this.parent().removeElement(this),this}},construct:{clip:function(){return this.defs().put(new n.ClipPath)}}}),n.extend(n.Element,{clipWith:function(t){return this.clipper=t instanceof n.ClipPath?t:this.parent().clip().add(t),this.clipper.targets.push(this),this.attr("clip-path",'url("#'+this.clipper.attr("id")+'")')},unclip:function(){return delete this.clipper,this.attr("clip-path",null)}}),n.Gradient=n.invent({create:function(t){this.constructor.call(this,n.create(t+"Gradient")),this.type=t},inherit:n.Container,extend:{at:function(t,e,i){return this.put(new n.Stop).update(t,e,i)},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="gradientTransform"),n.Container.prototype.attr.call(this,t,e,i)}},construct:{gradient:function(t,e){return this.defs().gradient(t,e)}}}),n.extend(n.Gradient,n.FX,{from:function(t,e){return"radial"==(this._target||this).type?this.attr({fx:new n.Number(t),fy:new n.Number(e)}):this.attr({x1:new n.Number(t),y1:new n.Number(e)})},to:function(t,e){return"radial"==(this._target||this).type?this.attr({cx:new n.Number(t),cy:new n.Number(e)}):this.attr({x2:new n.Number(t),y2:new n.Number(e)})}}),n.extend(n.Defs,{gradient:function(t,e){return this.put(new n.Gradient(t)).update(e)}}),n.Stop=n.invent({create:"stop",inherit:n.Element,extend:{update:function(t){return("number"==typeof t||t instanceof n.Number)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new n.Number(t.offset)),this}}}),n.Pattern=n.invent({create:"pattern",inherit:n.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},toString:function(){return this.fill()},attr:function(t,e,i){return"transform"==t&&(t="patternTransform"),n.Container.prototype.attr.call(this,t,e,i)}},construct:{pattern:function(t,e,i){return this.defs().pattern(t,e,i)}}}),n.extend(n.Defs,{pattern:function(t,e,i){return this.put(new n.Pattern).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}),n.Shape=n.invent({create:function(t){this.constructor.call(this,t)},inherit:n.Element}),n.Bare=n.invent({create:function(t,e){if(this.constructor.call(this,n.create(t)),e)for(var i in e.prototype)"function"==typeof e.prototype[i]&&(this[i]=e.prototype[i])},inherit:n.Element,extend:{words:function(t){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this.node.appendChild(i.createTextNode(t)),this}}}),n.extend(n.Parent,{element:function(t,e){return this.put(new n.Bare(t,e))}}),n.Symbol=n.invent({create:"symbol",inherit:n.Container,construct:{symbol:function(){return this.put(new n.Symbol)}}}),n.Use=n.invent({create:"use",inherit:n.Shape,extend:{element:function(t,e){return this.attr("href",(e||"")+"#"+t,n.xlink)}},construct:{use:function(t,e){return this.put(new n.Use).element(t,e)}}}),n.Rect=n.invent({create:"rect",inherit:n.Shape,construct:{rect:function(t,e){return this.put(new n.Rect).size(t,e)}}}),n.Circle=n.invent({create:"circle",inherit:n.Shape,construct:{circle:function(t){return this.put(new n.Circle).rx(new n.Number(t).divide(2)).move(0,0)}}}),n.extend(n.Circle,n.FX,{rx:function(t){return this.attr("r",t)},ry:function(t){return this.rx(t)}}),n.Ellipse=n.invent({create:"ellipse",inherit:n.Shape,construct:{ellipse:function(t,e){return this.put(new n.Ellipse).size(t,e).move(0,0)}}}),n.extend(n.Ellipse,n.Rect,n.FX,{rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)}}),n.extend(n.Circle,n.Ellipse,{x:function(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())},y:function(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())},cx:function(t){return null==t?this.attr("cx"):this.attr("cx",t)},cy:function(t){return null==t?this.attr("cy"):this.attr("cy",t)},width:function(t){return null==t?2*this.rx():this.rx(new n.Number(t).divide(2))},height:function(t){return null==t?2*this.ry():this.ry(new n.Number(t).divide(2))},size:function(t,e){var i=p(this,t,e);return this.rx(new n.Number(i.width).divide(2)).ry(new n.Number(i.height).divide(2))}}),n.Line=n.invent({create:"line",inherit:n.Shape,extend:{array:function(){return new n.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(t,e,i,o){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:i,y2:o}:new n.PointArray(t).toLine(),this.attr(t))},move:function(t,e){return this.attr(this.array().move(t,e).toLine())},size:function(t,e){var i=p(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(t,e,i,o){return n.Line.prototype.plot.apply(this.put(new n.Line),null!=t?[t,e,i,o]:[0,0,0,0])}}}),n.Polyline=n.invent({create:"polyline",inherit:n.Shape,construct:{polyline:function(t){return this.put(new n.Polyline).plot(t||new n.PointArray)}}}),n.Polygon=n.invent({create:"polygon",inherit:n.Shape,construct:{polygon:function(t){return this.put(new n.Polygon).plot(t||new n.PointArray)}}}),n.extend(n.Polyline,n.Polygon,{array:function(){return this._array||(this._array=new n.PointArray(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new n.PointArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var i=p(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}}),n.extend(n.Line,n.Polyline,n.Polygon,{morphArray:n.PointArray,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),n.Path=n.invent({create:"path",inherit:n.Shape,extend:{morphArray:n.PathArray,array:function(){return this._array||(this._array=new n.PathArray(this.attr("d")))},plot:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new n.PathArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("d",this.array().move(t,e))},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},size:function(t,e){var i=p(this,t,e);return this.attr("d",this.array().size(i.width,i.height))},width:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)},height:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},construct:{path:function(t){return this.put(new n.Path).plot(t||new n.PathArray)}}}),n.Image=n.invent({create:"image",inherit:n.Shape,extend:{load:function(t){if(!t)return this;var i=this,o=new e.Image;return n.on(o,"load",(function(){n.off(o);var e=i.parent(n.Pattern);null!==e&&(0==i.width()&&0==i.height()&&i.size(o.width,o.height),e&&0==e.width()&&0==e.height()&&e.size(i.width(),i.height()),"function"==typeof i._loaded&&i._loaded.call(i,{width:o.width,height:o.height,ratio:o.width/o.height,url:t}))})),n.on(o,"error",(function(t){n.off(o),"function"==typeof i._error&&i._error.call(i,t)})),this.attr("href",o.src=this.src=t,n.xlink)},loaded:function(t){return this._loaded=t,this},error:function(t){return this._error=t,this}},construct:{image:function(t,e,i){return this.put(new n.Image).load(t).size(e||0,i||e||0)}}}),n.Text=n.invent({create:function(){this.constructor.call(this,n.create("text")),this.dom.leading=new n.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",n.defaults.attrs["font-family"])},inherit:n.Shape,extend:{x:function(t){return null==t?this.attr("x"):this.attr("x",t)},y:function(t){var e=this.attr("y"),i="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-i:e:this.attr("y","number"==typeof t.valueOf()?t+i:t)},cx:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)},cy:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)},text:function(t){if(void 0===t){t="";for(var e=this.node.childNodes,i=0,o=e.length;i<o;++i)0!=i&&3!=e[i].nodeType&&1==n.adopt(e[i]).dom.newLined&&(t+="\n"),t+=e[i].textContent;return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else{i=0;for(var r=(t=t.split("\n")).length;i<r;i++)this.tspan(t[i]).newLine()}return this.build(!1).rebuild()},size:function(t){return this.attr("font-size",t).rebuild()},leading:function(t){return null==t?this.dom.leading:(this.dom.leading=new n.Number(t),this.rebuild())},lines:function(){var t=(this.textPath&&this.textPath()||this).node,e=n.utils.map(n.utils.filterSVGElements(t.childNodes),(function(t){return n.adopt(t)}));return new n.Set(e)},rebuild:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,i=0,o=this.dom.leading*new n.Number(this.attr("font-size"));this.lines().each((function(){this.dom.newLined&&(e.textPath()||this.attr("x",e.attr("x")),"\n"==this.text()?i+=o:(this.attr("dy",o+i),i=0))})),this.fire("rebuild")}return this},build:function(t){return this._build=!!t,this},setData:function(t){return this.dom=t,this.dom.leading=new n.Number(t.leading||1.3),this}},construct:{text:function(t){return this.put(new n.Text).text(t)},plain:function(t){return this.put(new n.Text).plain(t)}}}),n.Tspan=n.invent({create:"tspan",inherit:n.Shape,extend:{text:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)},dx:function(t){return this.attr("dx",t)},dy:function(t){return this.attr("dy",t)},newLine:function(){var t=this.parent(n.Text);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}}),n.extend(n.Text,n.Tspan,{plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(i.createTextNode(t)),this},tspan:function(t){var e=(this.textPath&&this.textPath()||this).node,i=new n.Tspan;return!1===this._build&&this.clear(),e.appendChild(i.node),i.text(t)},clear:function(){for(var t=(this.textPath&&this.textPath()||this).node;t.hasChildNodes();)t.removeChild(t.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),n.TextPath=n.invent({create:"textPath",inherit:n.Parent,parent:n.Text,construct:{morphArray:n.PathArray,path:function(t){for(var e=new n.TextPath,i=this.doc().defs().path(t);this.node.hasChildNodes();)e.node.appendChild(this.node.firstChild);return this.node.appendChild(e.node),e.attr("href","#"+i,n.xlink),this},array:function(){var t=this.track();return t?t.array():null},plot:function(t){var e=this.track(),i=null;return e&&(i=e.plot(t)),null==t?i:this},track:function(){var t=this.textPath();if(t)return t.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return n.adopt(this.node.firstChild)}}}),n.Nested=n.invent({create:function(){this.constructor.call(this,n.create("svg")),this.style("overflow","visible")},inherit:n.Container,construct:{nested:function(){return this.put(new n.Nested)}}}),n.A=n.invent({create:"a",inherit:n.Container,extend:{to:function(t){return this.attr("href",t,n.xlink)},show:function(t){return this.attr("show",t,n.xlink)},target:function(t){return this.attr("target",t)}},construct:{link:function(t){return this.put(new n.A).to(t)}}}),n.extend(n.Element,{linkTo:function(t){var e=new n.A;return"function"==typeof t?t.call(e,e):e.to(t),this.parent().put(e).put(this)}}),n.Marker=n.invent({create:"marker",inherit:n.Container,extend:{width:function(t){return this.attr("markerWidth",t)},height:function(t){return this.attr("markerHeight",t)},ref:function(t,e){return this.attr("refX",t).attr("refY",e)},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},toString:function(){return"url(#"+this.id()+")"}},construct:{marker:function(t,e,i){return this.defs().marker(t,e,i)}}}),n.extend(n.Defs,{marker:function(t,e,i){return this.put(new n.Marker).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(i)}}),n.extend(n.Line,n.Polyline,n.Polygon,n.Path,{marker:function(t,e,i,o){var r=["marker"];return"all"!=t&&r.push(t),r=r.join("-"),t=arguments[1]instanceof n.Marker?arguments[1]:this.doc().marker(e,i,o),this.attr(r,t)}});var l={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"==e?t:t+"-"+e}};function c(t,e,i,o){return i+o.replace(n.regex.dots," .")}function d(t){return t.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}function h(t){return t.charAt(0).toUpperCase()+t.slice(1)}function u(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function p(t,e,i){if(null==e||null==i){var n=t.bbox();null==e?e=n.width/n.height*i:null==i&&(i=n.height/n.width*e)}return{width:e,height:i}}function f(t,e,i){return{x:e*t.a+i*t.c+0,y:e*t.b+i*t.d+0}}function g(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}function m(t,e){t.cx=null==t.cx?e.bbox().cx:t.cx,t.cy=null==t.cy?e.bbox().cy:t.cy}function v(t){for(var i=t.childNodes.length-1;i>=0;i--)t.childNodes[i]instanceof e.SVGElement&&v(t.childNodes[i]);return n.adopt(t).id(n.eid(t.nodeName))}function y(t){return null==t.x&&(t.x=0,t.y=0,t.width=0,t.height=0),t.w=t.width,t.h=t.height,t.x2=t.x+t.width,t.y2=t.y+t.height,t.cx=t.x+t.width/2,t.cy=t.y+t.height/2,t}function b(t){return Math.abs(t)>1e-37?t:0}["fill","stroke"].forEach((function(t){var e,i={};i[t]=function(i){if(void 0===i)return this;if("string"==typeof i||n.Color.isRgb(i)||i&&"function"==typeof i.fill)this.attr(t,i);else for(e=l[t].length-1;e>=0;e--)null!=i[l[t][e]]&&this.attr(l.prefix(t,l[t][e]),i[l[t][e]]);return this},n.extend(n.Element,n.FX,i)})),n.extend(n.Element,n.FX,{rotate:function(t,e,i){return this.transform({rotation:t,cx:e,cy:i})},skew:function(t,e,i,n){return 1==arguments.length||3==arguments.length?this.transform({skew:t,cx:e,cy:i}):this.transform({skewX:t,skewY:e,cx:i,cy:n})},scale:function(t,e,i,n){return 1==arguments.length||3==arguments.length?this.transform({scale:t,cx:e,cy:i}):this.transform({scaleX:t,scaleY:e,cx:i,cy:n})},translate:function(t,e){return this.transform({x:t,y:e})},flip:function(t,e){return e="number"==typeof t?t:e,this.transform({flip:t||"both",offset:e})},matrix:function(t){return this.attr("transform",new n.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new n.Number(t).plus(this instanceof n.FX?0:this.x()),!0)},dy:function(t){return this.y(new n.Number(t).plus(this instanceof n.FX?0:this.y()),!0)},dmove:function(t,e){return this.dx(t).dy(e)}}),n.extend(n.Rect,n.Ellipse,n.Circle,n.Gradient,n.FX,{radius:function(t,e){var i=(this._target||this).type;return"radial"==i||"circle"==i?this.attr("r",new n.Number(t)):this.rx(t).ry(null==e?t:e)}}),n.extend(n.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),n.extend(n.Parent,n.Text,n.Tspan,n.FX,{font:function(e,i){if("object"===t(e))for(i in e)this.font(i,e[i]);return"leading"==e?this.leading(i):"anchor"==e?this.attr("text-anchor",i):"size"==e||"family"==e||"weight"==e||"stretch"==e||"variant"==e||"style"==e?this.attr("font-"+e,i):this.attr(e,i)}}),n.Set=n.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){var t,e,i=[].slice.call(arguments);for(t=0,e=i.length;t<e;t++)this.members.push(i[t]);return this},remove:function(t){var e=this.index(t);return e>-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,i=this.members.length;e<i;e++)t.apply(this.members[e],[e,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(t){return this.index(t)>=0},index:function(t){return this.members.indexOf(t)},get:function(t){return this.members[t]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members},bbox:function(){if(0==this.members.length)return new n.RBox;var t=this.members[0].rbox(this.members[0].doc());return this.each((function(){t=t.merge(this.rbox(this.doc()))})),t}},construct:{set:function(t){return new n.Set(t)}}}),n.FX.Set=n.invent({create:function(t){this.set=t}}),n.Set.inherit=function(){var t=[];for(var e in n.Shape.prototype)"function"==typeof n.Shape.prototype[e]&&"function"!=typeof n.Set.prototype[e]&&t.push(e);for(var e in t.forEach((function(t){n.Set.prototype[t]=function(){for(var e=0,i=this.members.length;e<i;e++)this.members[e]&&"function"==typeof this.members[e][t]&&this.members[e][t].apply(this.members[e],arguments);return"animate"==t?this.fx||(this.fx=new n.FX.Set(this)):this}})),t=[],n.FX.prototype)"function"==typeof n.FX.prototype[e]&&"function"!=typeof n.FX.Set.prototype[e]&&t.push(e);t.forEach((function(t){n.FX.Set.prototype[t]=function(){for(var e=0,i=this.set.members.length;e<i;e++)this.set.members[e].fx[t].apply(this.set.members[e].fx,arguments);return this}}))},n.extend(n.Element,{data:function(e,i,n){if("object"===t(e))for(i in e)this.data(i,e[i]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(t){return this.attr("data-"+e)}else this.attr("data-"+e,null===i?null:!0===n||"string"==typeof i||"number"==typeof i?i:JSON.stringify(i));return this}}),n.extend(n.Element,{remember:function(e,i){if("object"===t(arguments[0]))for(var i in e)this.remember(i,e[i]);else{if(1==arguments.length)return this.memory()[e];this.memory()[e]=i}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),n.get=function(t){var e=i.getElementById(function(t){var e=(t||"").toString().match(n.regex.reference);if(e)return e[1]}(t)||t);return n.adopt(e)},n.select=function(t,e){return new n.Set(n.utils.map((e||i).querySelectorAll(t),(function(t){return n.adopt(t)})))},n.extend(n.Parent,{select:function(t){return n.select(t,this.node)}});var x="abcdef".split("");if("function"!=typeof e.CustomEvent){var w=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=i.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n};w.prototype=e.Event.prototype,n.CustomEvent=w}else n.CustomEvent=e.CustomEvent;return function(t){for(var i=0,n=["moz","webkit"],o=0;o<n.length&&!e.requestAnimationFrame;++o)t.requestAnimationFrame=t[n[o]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[n[o]+"CancelAnimationFrame"]||t[n[o]+"CancelRequestAnimationFrame"];t.requestAnimationFrame=t.requestAnimationFrame||function(e){var n=(new Date).getTime(),o=Math.max(0,16-(n-i)),r=t.setTimeout((function(){e(n+o)}),o);return i=n+o,r},t.cancelAnimationFrame=t.cancelAnimationFrame||t.clearTimeout}(e),n},"function"==typeof define&&define.amd?define((function(){return ot(nt,nt.document)})):"object"===("undefined"==typeof exports?"undefined":t(exports))&&"undefined"!=typeof module?module.exports=nt.document?ot(nt,nt.document):function(t){return ot(t,t.document)}:nt.SVG=ot(nt,nt.document),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(t,e){return this.add(t,e),!t.attr("in")&&this.autoSetIn&&t.attr("in",this.source),t.attr("result")||t.attr("result",t),t},blend:function(t,e,i){return this.put(new SVG.BlendEffect(t,e,i))},colorMatrix:function(t,e){return this.put(new SVG.ColorMatrixEffect(t,e))},convolveMatrix:function(t){return this.put(new SVG.ConvolveMatrixEffect(t))},componentTransfer:function(t){return this.put(new SVG.ComponentTransferEffect(t))},composite:function(t,e,i){return this.put(new SVG.CompositeEffect(t,e,i))},flood:function(t,e){return this.put(new SVG.FloodEffect(t,e))},offset:function(t,e){return this.put(new SVG.OffsetEffect(t,e))},image:function(t){return this.put(new SVG.ImageEffect(t))},merge:function(){var t=[void 0];for(var e in arguments)t.push(arguments[e]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,t)))},gaussianBlur:function(t,e){return this.put(new SVG.GaussianBlurEffect(t,e))},morphology:function(t,e){return this.put(new SVG.MorphologyEffect(t,e))},diffuseLighting:function(t,e,i){return this.put(new SVG.DiffuseLightingEffect(t,e,i))},displacementMap:function(t,e,i,n,o){return this.put(new SVG.DisplacementMapEffect(t,e,i,n,o))},specularLighting:function(t,e,i,n){return this.put(new SVG.SpecularLightingEffect(t,e,i,n))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(t,e,i,n,o){return this.put(new SVG.TurbulenceEffect(t,e,i,n,o))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(t){var e=this.put(new SVG.Filter);return"function"==typeof t&&t.call(e,e),e}}),SVG.extend(SVG.Container,{filter:function(t){return this.defs().filter(t)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(t){return this.filterer=t instanceof SVG.Element?t:this.doc().filter(t),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(t){return this.filterer&&!0===t&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}});var t={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},diffuseLighting:function(t,e,i){return this.parent()&&this.parent().diffuseLighting(t,e,i).in(this)},displacementMap:function(t,e,i,n){return this.parent()&&this.parent().displacementMap(this,t,e,i,n)},specularLighting:function(t,e,i,n){return this.parent()&&this.parent().specularLighting(t,e,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,n,o){return this.parent()&&this.parent().turbulence(t,e,i,n,o).in(this)}};SVG.extend(SVG.Effect,t),SVG.extend(SVG.ParentEffect,t),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){this.attr("in",t)}}});var e={blend:function(t,e,i){this.attr({in:t,in2:e,mode:i||"normal"})},colorMatrix:function(t,e){"matrix"==t&&(e=o(e)),this.attr({type:t,values:void 0===e?null:e})},convolveMatrix:function(t){t=o(t),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},composite:function(t,e,i){this.attr({in:t,in2:e,operator:i})},flood:function(t,e){this.attr("flood-color",t),null!=e&&this.attr("flood-opacity",e)},offset:function(t,e){this.attr({dx:t,dy:e})},image:function(t){this.attr("href",t,SVG.xlink)},displacementMap:function(t,e,i,n,o){this.attr({in:t,in2:e,scale:i,xChannelSelector:n,yChannelSelector:o})},gaussianBlur:function(t,e){null!=t||null!=e?this.attr("stdDeviation",function(t){if(!Array.isArray(t))return t;for(var e=0,i=t.length,n=[];e<i;e++)n.push(t[e]);return n.join(" ")}(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(t,e){this.attr({operator:t,radius:e})},tile:function(){},turbulence:function(t,e,i,n,o){this.attr({numOctaves:e,seed:i,stitchTiles:n,baseFrequency:t,type:o})}},i={merge:function(){var t;if(arguments[0]instanceof SVG.Set){var e=this;arguments[0].each((function(t){this instanceof SVG.MergeNode?e.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&e.put(new SVG.MergeNode(this))}))}else{t=Array.isArray(arguments[0])?arguments[0]:arguments;for(var i=0;i<t.length;i++)t[i]instanceof SVG.MergeNode?this.put(t[i]):this.put(new SVG.MergeNode(t[i]))}},componentTransfer:function(t){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(t){this[t]=new(SVG["Func"+t.toUpperCase()])("identity"),this.rgb.add(this[t]),this.node.appendChild(this[t].node)}.bind(this)),t)for(var e in t.rgb&&(["r","g","b"].forEach(function(e){this[e].attr(t.rgb)}.bind(this)),delete t.rgb),t)this[e].attr(t[e])},diffuseLighting:function(t,e,i){this.attr({surfaceScale:t,diffuseConstant:e,kernelUnitLength:i})},specularLighting:function(t,e,i,n){this.attr({surfaceScale:t,diffuseConstant:e,specularExponent:i,kernelUnitLength:n})}},n={distantLight:function(t,e){this.attr({azimuth:t,elevation:e})},pointLight:function(t,e,i){this.attr({x:t,y:e,z:i})},spotLight:function(t,e,i,n,o,r){this.attr({x:t,y:e,z:i,pointsAtX:n,pointsAtY:o,pointsAtZ:r})},mergeNode:function(t){this.attr("in",t)}};function o(t){return Array.isArray(t)&&(t=new SVG.Array(t)),t.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function r(){var t=function(){};for(var e in"function"==typeof arguments[arguments.length-1]&&(t=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var i in arguments[e])t(arguments[e][i],i,arguments[e])}["r","g","b","a"].forEach((function(t){n["Func"+t.toUpperCase()]=function(t){switch(this.attr("type",t),t){case"table":this.attr("tableValues",arguments[1]);break;case"linear":this.attr("slope",arguments[1]),this.attr("intercept",arguments[2]);break;case"gamma":this.attr("amplitude",arguments[1]),this.attr("exponent",arguments[2]),this.attr("offset",arguments[2])}}})),r(e,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})})),r(i,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})})),r(n,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})})),SVG.extend(SVG.MergeEffect,{in:function(t){return t instanceof SVG.MergeNode?this.add(t,0):this.add(new SVG.MergeNode(t),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",t)}}),SVG.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]}}.call(void 0),function(){function t(t,o,r,s,a,l,c){for(var d=t.slice(o,r||c),h=s.slice(a,l||c),u=0,p={pos:[0,0],start:[0,0]},f={pos:[0,0],start:[0,0]};d[u]=e.call(p,d[u]),h[u]=e.call(f,h[u]),d[u][0]!=h[u][0]||"M"==d[u][0]||"A"==d[u][0]&&(d[u][4]!=h[u][4]||d[u][5]!=h[u][5])?(Array.prototype.splice.apply(d,[u,1].concat(n.call(p,d[u]))),Array.prototype.splice.apply(h,[u,1].concat(n.call(f,h[u])))):(d[u]=i.call(p,d[u]),h[u]=i.call(f,h[u])),++u!=d.length||u!=h.length;)u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]),u==h.length&&h.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]]);return{start:d,dest:h}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function n(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":t=(e=function(t,e){var i,n,o,r,s,a,l,c,d,h,u,p,f,g,m,v,y,b,x,w,S,C,k,_,T,D,E=Math.abs(e[1]),A=Math.abs(e[2]),I=e[3]%360,P=e[4],M=e[5],L=e[6],R=e[7],O=new SVG.Point(t),F=new SVG.Point(L,R),N=[];if(0===E||0===A||O.x===F.x&&O.y===F.y)return[["C",O.x,O.y,F.x,F.y,F.x,F.y]];for((n=(i=new SVG.Point((O.x-F.x)/2,(O.y-F.y)/2).transform((new SVG.Matrix).rotate(I))).x*i.x/(E*E)+i.y*i.y/(A*A))>1&&(E*=n=Math.sqrt(n),A*=n),o=(new SVG.Matrix).rotate(I).scale(1/E,1/A).rotate(-I),O=O.transform(o),a=(r=[(F=F.transform(o)).x-O.x,F.y-O.y])[0]*r[0]+r[1]*r[1],s=Math.sqrt(a),r[0]/=s,r[1]/=s,l=a<4?Math.sqrt(1-a/4):0,P===M&&(l*=-1),c=new SVG.Point((F.x+O.x)/2+l*-r[1],(F.y+O.y)/2+l*r[0]),d=new SVG.Point(O.x-c.x,O.y-c.y),h=new SVG.Point(F.x-c.x,F.y-c.y),u=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(u*=-1),p=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(p*=-1),M&&u>p&&(p+=2*Math.PI),!M&&u<p&&(p-=2*Math.PI),v=[],y=u,f=(p-u)/(g=Math.ceil(2*Math.abs(u-p)/Math.PI)),m=4*Math.tan(f/4)/3,S=0;S<=g;S++)x=Math.cos(y),b=Math.sin(y),w=new SVG.Point(c.x+x,c.y+b),v[S]=[new SVG.Point(w.x+m*b,w.y-m*x),w,new SVG.Point(w.x-m*b,w.y+m*x)],y+=f;for(v[0][0]=v[0][1].clone(),v[v.length-1][2]=v[v.length-1][1].clone(),o=(new SVG.Matrix).rotate(I).scale(E,A).rotate(-I),S=0,C=v.length;S<C;S++)v[S][0]=v[S][0].transform(o),v[S][1]=v[S][1].transform(o),v[S][2]=v[S][2].transform(o);for(S=1,C=v.length;S<C;S++)k=(w=v[S-1][2]).x,_=w.y,T=(w=v[S][0]).x,D=w.y,L=(w=v[S][1]).x,R=w.y,N.push(["C",k,_,T,D,L,R]);return N}(this.pos,t))[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],e}function o(t,e){if(!1===e)return!1;for(var i=e,n=t.length;i<n;++i)if("M"==t[i][0])return i;return!1}SVG.extend(SVG.PathArray,{morph:function(e){for(var i=this.value,n=this.parse(e),r=0,s=0,a=!1,l=!1;!1!==r||!1!==s;){var c;a=o(i,!1!==r&&r+1),l=o(n,!1!==s&&s+1),!1===r&&(r=0==(c=new SVG.PathArray(d.start).bbox()).height||0==c.width?i.push(i[0])-1:i.push(["M",c.x+c.width/2,c.y+c.height/2])-1),!1===s&&(s=0==(c=new SVG.PathArray(d.dest).bbox()).height||0==c.width?n.push(n[0])-1:n.push(["M",c.x+c.width/2,c.y+c.height/2])-1);var d=t(i,r,a,n,s,l);i=i.slice(0,r).concat(d.start,!1===a?[]:i.slice(a)),n=n.slice(0,s).concat(d.dest,!1===l?[]:n.slice(l)),r=!1!==a&&r+d.start.length,s=!1!==l&&s+d.dest.length}return this.value=i,this.destination=new SVG.PathArray,this.destination.value=n,this}})}(),function(){function t(t){t.remember("_draggable",this),this.el=t}t.prototype.init=function(t,e){var i=this;this.constraint=t,this.value=e,this.el.on("mousedown.drag",(function(t){i.start(t)})),this.el.on("touchstart.drag",(function(t){i.start(t)}))},t.prototype.transformPoint=function(t,e){var i=(t=t||window.event).changedTouches&&t.changedTouches[0]||t;return this.p.x=i.pageX-(e||0),this.p.y=i.pageY,this.p.matrixTransform(this.m)},t.prototype.getBBox=function(){var t=this.el.bbox();return this.el instanceof SVG.Nested&&(t=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(t.x=this.el.x(),t.y=this.el.y()),t},t.prototype.start=function(t){if("click"!=t.type&&"mousedown"!=t.type&&"mousemove"!=t.type||1==(t.which||t.buttons)){var e=this;this.el.fire("beforedrag",{event:t,handler:this}),this.parent=this.parent||this.el.parent(SVG.Nested)||this.el.parent(SVG.Doc),this.p=this.parent.node.createSVGPoint(),this.m=this.el.node.getScreenCTM().inverse();var i,n=this.getBBox();if(this.el instanceof SVG.Text)switch(i=this.el.node.getComputedTextLength(),this.el.attr("text-anchor")){case"middle":i/=2;break;case"start":i=0}this.startPoints={point:this.transformPoint(t,i),box:n,transform:this.el.transform()},SVG.on(window,"mousemove.drag",(function(t){e.drag(t)})),SVG.on(window,"touchmove.drag",(function(t){e.drag(t)})),SVG.on(window,"mouseup.drag",(function(t){e.end(t)})),SVG.on(window,"touchend.drag",(function(t){e.end(t)})),this.el.fire("dragstart",{event:t,p:this.startPoints.point,m:this.m,handler:this}),t.preventDefault(),t.stopPropagation()}},t.prototype.drag=function(t){var e=this.getBBox(),i=this.transformPoint(t),n=this.startPoints.box.x+i.x-this.startPoints.point.x,o=this.startPoints.box.y+i.y-this.startPoints.point.y,r=this.constraint,s=i.x-this.startPoints.point.x,a=i.y-this.startPoints.point.y,l=new CustomEvent("dragmove",{detail:{event:t,p:i,m:this.m,handler:this},cancelable:!0});if(this.el.fire(l),l.defaultPrevented)return i;if("function"==typeof r){var c=r.call(this.el,n,o,this.m);"boolean"==typeof c&&(c={x:c,y:c}),!0===c.x?this.el.x(n):!1!==c.x&&this.el.x(c.x),!0===c.y?this.el.y(o):!1!==c.y&&this.el.y(c.y)}else"object"==typeof r&&(null!=r.minX&&n<r.minX?n=r.minX:null!=r.maxX&&n>r.maxX-e.width&&(n=r.maxX-e.width),null!=r.minY&&o<r.minY?o=r.minY:null!=r.maxY&&o>r.maxY-e.height&&(o=r.maxY-e.height),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:s,y:a},!0):this.el.move(n,o));return i},t.prototype.end=function(t){var e=this.drag(t);this.el.fire("dragend",{event:t,p:e,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,i){"function"!=typeof e&&"object"!=typeof e||(i=e,e=!0);var n=this.remember("_draggable")||new t(this);return(e=void 0===e||e)?n.init(i||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function t(t){this.el=t,t.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1}}t.prototype.init=function(t,e){var i=this.el.bbox();for(var n in this.options={},this.el.selectize.defaults)this.options[n]=this.el.selectize.defaults[n],void 0!==e[n]&&(this.options[n]=e[n]);this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(t):this.selectRect(t),this.observe(),this.cleanup()},t.prototype.selectPoints=function(t){return this.pointSelection.isSelected=t,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawCircles()),this},t.prototype.getPointArray=function(){var t=this.el.bbox();return this.el.array().valueOf().map((function(e){return[e[0]-t.x,e[1]-t.y]}))},t.prototype.drawCircles=function(){for(var t=this,e=this.getPointArray(),i=0,n=e.length;i<n;++i){var o=function(e){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var n=i.pageX||i.touches[0].pageX,o=i.pageY||i.touches[0].pageY;t.el.fire("point",{x:n,y:o,i:e,event:i})}}(i);this.pointSelection.set.add(this.nested.circle(this.options.radius).center(e[i][0],e[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",o).on("mousedown",o))}},t.prototype.updatePointSelection=function(){var t=this.getPointArray();this.pointSelection.set.each((function(e){this.cx()===t[e][0]&&this.cy()===t[e][1]||this.center(t[e][0],t[e][1])}))},t.prototype.updateRectSelection=function(){var t=this.el.bbox();this.rectSelection.set.get(0).attr({width:t.width,height:t.height}),this.options.points&&(this.rectSelection.set.get(2).center(t.width,0),this.rectSelection.set.get(3).center(t.width,t.height),this.rectSelection.set.get(4).center(0,t.height),this.rectSelection.set.get(5).center(t.width/2,0),this.rectSelection.set.get(6).center(t.width,t.height/2),this.rectSelection.set.get(7).center(t.width/2,t.height),this.rectSelection.set.get(8).center(0,t.height/2)),this.options.rotationPoint&&(this.options.points?this.rectSelection.set.get(9).center(t.width/2,20):this.rectSelection.set.get(1).center(t.width/2,20))},t.prototype.selectRect=function(t){var e=this,i=this.el.bbox();function n(t){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var n=i.pageX||i.touches[0].pageX,o=i.pageY||i.touches[0].pageY;e.el.fire(t,{x:n,y:o,event:i})}}if(this.rectSelection.isSelected=t,this.rectSelection.set=this.rectSelection.set||this.parent.set(),this.rectSelection.set.get(0)||this.rectSelection.set.add(this.nested.rect(i.width,i.height).addClass(this.options.classRect)),this.options.points&&!this.rectSelection.set.get(1)){var o="touchstart",r="mousedown";this.rectSelection.set.add(this.nested.circle(this.options.radius).center(0,0).attr("class",this.options.classPoints+"_lt").on(r,n("lt")).on(o,n("lt"))),this.rectSelection.set.add(this.nested.circle(this.options.radius).center(i.width,0).attr("class",this.options.classPoints+"_rt").on(r,n("rt")).on(o,n("rt"))),this.rectSelection.set.add(this.nested.circle(this.options.radius).center(i.width,i.height).attr("class",this.options.classPoints+"_rb").on(r,n("rb")).on(o,n("rb"))),this.rectSelection.set.add(this.nested.circle(this.options.radius).center(0,i.height).attr("class",this.options.classPoints+"_lb").on(r,n("lb")).on(o,n("lb"))),this.rectSelection.set.add(this.nested.circle(this.options.radius).center(i.width/2,0).attr("class",this.options.classPoints+"_t").on(r,n("t")).on(o,n("t"))),this.rectSelection.set.add(this.nested.circle(this.options.radius).center(i.width,i.height/2).attr("class",this.options.classPoints+"_r").on(r,n("r")).on(o,n("r"))),this.rectSelection.set.add(this.nested.circle(this.options.radius).center(i.width/2,i.height).attr("class",this.options.classPoints+"_b").on(r,n("b")).on(o,n("b"))),this.rectSelection.set.add(this.nested.circle(this.options.radius).center(0,i.height/2).attr("class",this.options.classPoints+"_l").on(r,n("l")).on(o,n("l"))),this.rectSelection.set.each((function(){this.addClass(e.options.classPoints)}))}if(this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var s=function(t){(t=t||window.event).preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation();var i=t.pageX||t.touches[0].pageX,n=t.pageY||t.touches[0].pageY;e.el.fire("rot",{x:i,y:n,event:t})};this.rectSelection.set.add(this.nested.circle(this.options.radius).center(i.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",s).on("mousedown",s))}},t.prototype.handler=function(){var t=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(t.x,t.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},t.prototype.observe=function(){var t=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver((function(){t.handler()})),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch(t){}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",(function(){t.handler()}))},t.prototype.cleanup=function(){!this.rectSelection.isSelected&&this.rectSelection.set&&(this.rectSelection.set.each((function(){this.remove()})),this.rectSelection.set.clear(),delete this.rectSelection.set),!this.pointSelection.isSelected&&this.pointSelection.set&&(this.pointSelection.set.each((function(){this.remove()})),this.pointSelection.set.clear(),delete this.pointSelection.set),this.pointSelection.isSelected||this.rectSelection.isSelected||(this.nested.remove(),delete this.nested)},SVG.extend(SVG.Element,{selectize:function(e,i){return"object"==typeof e&&(i=e,e=!0),(this.remember("_selectHandler")||new t(this)).init(void 0===e||e,i||{}),this}}),SVG.Element.prototype.selectize.defaults={points:!0,classRect:"svg_select_boundingRect",classPoints:"svg_select_points",radius:7,rotationPoint:!0,deepSelect:!1}}(),function(){(function(){function t(t){t.remember("_resizeHandler",this),this.el=t,this.parameters={},this.lastUpdateCall=null,this.p=t.doc().node.createSVGPoint()}t.prototype.transformPoint=function(t,e,i){return this.p.x=t-(this.offset.x-window.pageXOffset),this.p.y=e-(this.offset.y-window.pageYOffset),this.p.matrixTransform(i||this.m)},t.prototype._extractPosition=function(t){return{x:null!=t.clientX?t.clientX:t.touches[0].clientX,y:null!=t.clientY?t.clientY:t.touches[0].clientY}},t.prototype.init=function(t){var e=this;if(this.stop(),"stop"!==t){for(var i in this.options={},this.el.resize.defaults)this.options[i]=this.el.resize.defaults[i],void 0!==t[i]&&(this.options[i]=t[i]);this.el.on("lt.resize",(function(t){e.resize(t||window.event)})),this.el.on("rt.resize",(function(t){e.resize(t||window.event)})),this.el.on("rb.resize",(function(t){e.resize(t||window.event)})),this.el.on("lb.resize",(function(t){e.resize(t||window.event)})),this.el.on("t.resize",(function(t){e.resize(t||window.event)})),this.el.on("r.resize",(function(t){e.resize(t||window.event)})),this.el.on("b.resize",(function(t){e.resize(t||window.event)})),this.el.on("l.resize",(function(t){e.resize(t||window.event)})),this.el.on("rot.resize",(function(t){e.resize(t||window.event)})),this.el.on("point.resize",(function(t){e.resize(t||window.event)})),this.update()}},t.prototype.stop=function(){return this.el.off("lt.resize"),this.el.off("rt.resize"),this.el.off("rb.resize"),this.el.off("lb.resize"),this.el.off("t.resize"),this.el.off("r.resize"),this.el.off("b.resize"),this.el.off("l.resize"),this.el.off("rot.resize"),this.el.off("point.resize"),this},t.prototype.resize=function(t){var e=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var i=this._extractPosition(t.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(i.x,i.y),x:t.detail.x,y:t.detail.y,box:this.el.bbox(),rotation:this.el.transform().rotation},"text"===this.el.type&&(this.parameters.fontSize=this.el.attr()["font-size"]),void 0!==t.detail.i){var n=this.el.array().valueOf();this.parameters.i=t.detail.i,this.parameters.pointCoords=[n[t.detail.i][0],n[t.detail.i][1]]}switch(t.type){case"lt":this.calc=function(t,e){var i=this.snapToGrid(t,e);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y+i[1]).size(this.parameters.box.width-i[0],this.parameters.box.height-i[1])}};break;case"rt":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).size(this.parameters.box.width+i[0],this.parameters.box.height-i[1])}};break;case"rb":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+i[0],this.parameters.box.height+i[1])}};break;case"lb":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).size(this.parameters.box.width-i[0],this.parameters.box.height+i[1])}};break;case"t":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).height(this.parameters.box.height-i[1])}};break;case"r":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+i[0])}};break;case"b":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+i[1])}};break;case"l":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).width(this.parameters.box.width-i[0])}};break;case"rot":this.calc=function(t,e){var i=t+this.parameters.p.x,n=e+this.parameters.p.y,o=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),r=180*(Math.atan2(n-this.parameters.box.y-this.parameters.box.height/2,i-this.parameters.box.x-this.parameters.box.width/2)-o)/Math.PI;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(this.parameters.rotation+r-r%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(t,e){var i=this.snapToGrid(t,e,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),n=this.el.array().valueOf();n[this.parameters.i][0]=this.parameters.pointCoords[0]+i[0],n[this.parameters.i][1]=this.parameters.pointCoords[1]+i[1],this.el.plot(n)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:t}),SVG.on(window,"touchmove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"touchend.resize",(function(){e.done()})),SVG.on(window,"mousemove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"mouseup.resize",(function(){e.done()}))},t.prototype.update=function(t){if(t){var e=this._extractPosition(t),i=this.transformPoint(e.x,e.y),n=i.x-this.parameters.p.x,o=i.y-this.parameters.p.y;this.lastUpdateCall=[n,o],this.calc(n,o),this.el.fire("resizing",{dx:n,dy:o,event:t})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},t.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},t.prototype.snapToGrid=function(t,e,i,n){var o;return void 0!==n?o=[(i+t)%this.options.snapToGrid,(n+e)%this.options.snapToGrid]:(i=null==i?3:i,o=[(this.parameters.box.x+t+(1&i?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+e+(2&i?0:this.parameters.box.height))%this.options.snapToGrid]),t-=Math.abs(o[0])<this.options.snapToGrid/2?o[0]:o[0]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),e-=Math.abs(o[1])<this.options.snapToGrid/2?o[1]:o[1]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(t,e,i,n)},t.prototype.constraintToBox=function(t,e,i,n){var o,r,s=this.options.constraint||{};return void 0!==n?(o=i,r=n):(o=this.parameters.box.x+(1&i?0:this.parameters.box.width),r=this.parameters.box.y+(2&i?0:this.parameters.box.height)),void 0!==s.minX&&o+t<s.minX&&(t=s.minX-o),void 0!==s.maxX&&o+t>s.maxX&&(t=s.maxX-o),void 0!==s.minY&&r+e<s.minY&&(e=s.minY-r),void 0!==s.maxY&&r+e>s.maxY&&(e=s.maxY-r),[t,e]},t.prototype.checkAspectRatio=function(t){if(!this.options.saveAspectRatio)return t;var e=t.slice(),i=this.parameters.box.width/this.parameters.box.height,n=this.parameters.box.width+t[0],o=this.parameters.box.height-t[1],r=n/o;return r<i?e[1]=n/i-this.parameters.box.height:r>i&&(e[0]=this.parameters.box.width-o*i),e},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new t(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),function(t,e){void 0===e&&(e={});var i=e.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}('.apexcharts-canvas {\n  position: relative;\n  user-select: none;\n  /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\n.apexcharts-canvas ::-webkit-scrollbar {\n  -webkit-appearance: none;\n  width: 6px;\n}\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n  border-radius: 4px;\n  background-color: rgba(0,0,0,.5);\n  box-shadow: 0 0 1px rgba(255,255,255,.5);\n  -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);\n}\n.apexcharts-canvas.dark {\n  background: #343F57;\n}\n\n.apexcharts-inner {\n  position: relative;\n}\n\n.legend-mouseover-inactive {\n  transition: 0.15s ease all;\n  opacity: 0.20;\n}\n\n.apexcharts-series-collapsed {\n  opacity: 0;\n}\n\n.apexcharts-gridline, .apexcharts-text {\n  pointer-events: none;\n}\n\n.apexcharts-tooltip {\n  border-radius: 5px;\n  box-shadow: 2px 2px 6px -4px #999;\n  cursor: default;\n  font-size: 14px;\n  left: 62px;\n  opacity: 0;\n  pointer-events: none;\n  position: absolute;\n  top: 20px;\n  overflow: hidden;\n  white-space: nowrap;\n  z-index: 12;\n  transition: 0.15s ease all;\n}\n.apexcharts-tooltip.light {\n  border: 1px solid #e3e3e3;\n  background: rgba(255, 255, 255, 0.96);\n}\n.apexcharts-tooltip.dark {\n  color: #fff;\n  background: rgba(30,30,30, 0.8);\n}\n.apexcharts-tooltip * {\n  font-family: inherit;\n}\n\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line {\n  pointer-events: none;\n}\n\n.apexcharts-tooltip.active {\n  opacity: 1;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip-title {\n  padding: 6px;\n  font-size: 15px;\n  margin-bottom: 4px;\n}\n.apexcharts-tooltip.light .apexcharts-tooltip-title {\n  background: #ECEFF1;\n  border-bottom: 1px solid #ddd;\n}\n.apexcharts-tooltip.dark .apexcharts-tooltip-title {\n  background: rgba(0, 0, 0, 0.7);\n  border-bottom: 1px solid #0e1726;\n}\n\n.apexcharts-tooltip-text-value,\n.apexcharts-tooltip-text-z-value {\n  display: inline-block;\n  font-weight: 600;\n  margin-left: 5px;\n}\n\n.apexcharts-tooltip-text-z-label:empty,\n.apexcharts-tooltip-text-z-value:empty {\n  display: none;\n}\n\n.apexcharts-tooltip-text-value, \n.apexcharts-tooltip-text-z-value {\n  font-weight: 600;\n}\n\n.apexcharts-tooltip-marker {\n  width: 12px;\n  height: 12px;\n  position: relative;\n  top: 0px;\n  margin-right: 10px;\n  border-radius: 50%;\n}\n\n.apexcharts-tooltip-series-group {\n  padding: 0 10px;\n  display: none;\n  text-align: left;\n  justify-content: left;\n  align-items: center;\n}\n\n.apexcharts-tooltip-series-group.active .apexcharts-tooltip-marker {\n  opacity: 1;\n}\n.apexcharts-tooltip-series-group.active, .apexcharts-tooltip-series-group:last-child {\n  padding-bottom: 4px;\n}\n.apexcharts-tooltip-series-group-hidden {\n  opacity: 0;\n  height: 0;\n  line-height: 0;\n  padding: 0 !important;\n}\n.apexcharts-tooltip-y-group {\n  padding: 6px 0 5px;\n}\n.apexcharts-tooltip-candlestick {\n  padding: 4px 8px;\n}\n.apexcharts-tooltip-candlestick > div {\n  margin: 4px 0;\n}\n.apexcharts-tooltip-candlestick span.value {\n  font-weight: bold;\n}\n\n.apexcharts-tooltip-rangebar {\n  padding: 5px 8px;\n}\n\n.apexcharts-tooltip-rangebar .category {\n  font-weight: 600;\n  color: #777;\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n  font-weight: bold;\n  display: block;\n  margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n  opacity: 0;\n  padding: 9px 10px;\n  pointer-events: none;\n  color: #373d3f;\n  font-size: 13px;\n  text-align: center;\n  border-radius: 2px;\n  position: absolute;\n  z-index: 10;\n\tbackground: #ECEFF1;\n  border: 1px solid #90A4AE;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.dark {\n  background: rgba(0, 0, 0, 0.7);\n  border: 1px solid rgba(0, 0, 0, 0.5);\n  color: #fff;\n}\n\n.apexcharts-xaxistooltip:after, .apexcharts-xaxistooltip:before {\n\tleft: 50%;\n\tborder: solid transparent;\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n\n.apexcharts-xaxistooltip:after {\n\tborder-color: rgba(236, 239, 241, 0);\n\tborder-width: 6px;\n\tmargin-left: -6px;\n}\n.apexcharts-xaxistooltip:before {\n\tborder-color: rgba(144, 164, 174, 0);\n\tborder-width: 7px;\n\tmargin-left: -7px;\n}\n\n.apexcharts-xaxistooltip-bottom:after, .apexcharts-xaxistooltip-bottom:before {\n  bottom: 100%;\n}\n\n.apexcharts-xaxistooltip-top:after, .apexcharts-xaxistooltip-top:before {\n  top: 100%;\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n  border-bottom-color: #ECEFF1;\n}\n.apexcharts-xaxistooltip-bottom:before {\n  border-bottom-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-bottom.dark:after {\n  border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n.apexcharts-xaxistooltip-bottom.dark:before {\n  border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top:after {\n  border-top-color:#ECEFF1\n}\n.apexcharts-xaxistooltip-top:before {\n  border-top-color: #90A4AE;\n}\n.apexcharts-xaxistooltip-top.dark:after {\n  border-top-color:rgba(0, 0, 0, 0.5);\n}\n.apexcharts-xaxistooltip-top.dark:before {\n  border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n\n.apexcharts-xaxistooltip.active {\n  opacity: 1;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n  opacity: 0;\n  padding: 4px 10px;\n  pointer-events: none;\n  color: #373d3f;\n  font-size: 13px;\n  text-align: center;\n  border-radius: 2px;\n  position: absolute;\n  z-index: 10;\n\tbackground: #ECEFF1;\n  border: 1px solid #90A4AE;\n}\n\n.apexcharts-yaxistooltip.dark {\n  background: rgba(0, 0, 0, 0.7);\n  border: 1px solid rgba(0, 0, 0, 0.5);\n  color: #fff;\n}\n\n.apexcharts-yaxistooltip:after, .apexcharts-yaxistooltip:before {\n\ttop: 50%;\n\tborder: solid transparent;\n\tcontent: " ";\n\theight: 0;\n\twidth: 0;\n\tposition: absolute;\n\tpointer-events: none;\n}\n.apexcharts-yaxistooltip:after {\n\tborder-color: rgba(236, 239, 241, 0);\n\tborder-width: 6px;\n\tmargin-top: -6px;\n}\n.apexcharts-yaxistooltip:before {\n\tborder-color: rgba(144, 164, 174, 0);\n\tborder-width: 7px;\n\tmargin-top: -7px;\n}\n\n.apexcharts-yaxistooltip-left:after, .apexcharts-yaxistooltip-left:before {\n  left: 100%;\n}\n\n.apexcharts-yaxistooltip-right:after, .apexcharts-yaxistooltip-right:before {\n  right: 100%;\n}\n\n.apexcharts-yaxistooltip-left:after {\n  border-left-color: #ECEFF1;\n}\n.apexcharts-yaxistooltip-left:before {\n  border-left-color: #90A4AE;\n}\n.apexcharts-yaxistooltip-left.dark:after {\n  border-left-color: rgba(0, 0, 0, 0.5);\n}\n.apexcharts-yaxistooltip-left.dark:before {\n  border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right:after {\n  border-right-color: #ECEFF1;\n}\n.apexcharts-yaxistooltip-right:before {\n  border-right-color: #90A4AE;\n}\n.apexcharts-yaxistooltip-right.dark:after {\n  border-right-color: rgba(0, 0, 0, 0.5);\n}\n.apexcharts-yaxistooltip-right.dark:before {\n  border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip.active {\n  opacity: 1;\n}\n\n.apexcharts-xcrosshairs, .apexcharts-ycrosshairs {\n  pointer-events: none;\n  opacity: 0;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.active, .apexcharts-ycrosshairs.active {\n  opacity: 1;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n  opacity: 0;\n}\n\n.apexcharts-zoom-rect {\n  pointer-events: none;\n}\n.apexcharts-selection-rect {\n  cursor: move;\n}\n\n.svg_select_points, .svg_select_points_rot {\n  opacity: 0;\n  visibility: hidden;\n}\n.svg_select_points_l, .svg_select_points_r {\n  cursor: ew-resize;\n  opacity: 1;\n  visibility: visible;\n  fill: #888;\n}\n.apexcharts-canvas.zoomable .hovering-zoom {\n  cursor: crosshair\n}\n.apexcharts-canvas.zoomable .hovering-pan {\n  cursor: move\n}\n\n.apexcharts-xaxis,\n.apexcharts-yaxis {\n  pointer-events: none;\n}\n\n.apexcharts-zoom-icon, \n.apexcharts-zoom-in-icon,\n.apexcharts-zoom-out-icon,\n.apexcharts-reset-zoom-icon, \n.apexcharts-pan-icon, \n.apexcharts-selection-icon,\n.apexcharts-menu-icon, \n.apexcharts-toolbar-custom-icon {\n  cursor: pointer;\n  width: 20px;\n  height: 20px;\n  line-height: 24px;\n  color: #6E8192;\n  text-align: center;\n}\n\n\n.apexcharts-zoom-icon svg, \n.apexcharts-zoom-in-icon svg,\n.apexcharts-zoom-out-icon svg,\n.apexcharts-reset-zoom-icon svg,\n.apexcharts-menu-icon svg {\n  fill: #6E8192;\n}\n.apexcharts-selection-icon svg {\n  fill: #444;\n  transform: scale(0.76)\n}\n\n.dark .apexcharts-zoom-icon svg, \n.dark .apexcharts-zoom-in-icon svg,\n.dark .apexcharts-zoom-out-icon svg,\n.dark .apexcharts-reset-zoom-icon svg, \n.dark .apexcharts-pan-icon svg, \n.dark .apexcharts-selection-icon svg,\n.dark .apexcharts-menu-icon svg, \n.dark .apexcharts-toolbar-custom-icon svg{\n  fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.selected svg, \n.apexcharts-canvas .apexcharts-selection-icon.selected svg, \n.apexcharts-canvas .apexcharts-reset-zoom-icon.selected svg {\n  fill: #008FFB;\n}\n.light .apexcharts-selection-icon:not(.selected):hover svg,\n.light .apexcharts-zoom-icon:not(.selected):hover svg, \n.light .apexcharts-zoom-in-icon:hover svg, \n.light .apexcharts-zoom-out-icon:hover svg, \n.light .apexcharts-reset-zoom-icon:hover svg, \n.light .apexcharts-menu-icon:hover svg {\n  fill: #0e1726;\n}\n\n.apexcharts-selection-icon, .apexcharts-menu-icon {\n  position: relative;\n}\n.apexcharts-reset-zoom-icon {\n  margin-left: 5px;\n}\n.apexcharts-zoom-icon, .apexcharts-reset-zoom-icon, .apexcharts-menu-icon {\n  transform: scale(0.85);\n}\n\n.apexcharts-zoom-in-icon, .apexcharts-zoom-out-icon {\n  transform: scale(0.7)\n}\n\n.apexcharts-zoom-out-icon {\n  margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n  transform: scale(0.62);\n  position: relative;\n  left: 1px;\n  top: 0px;\n}\n.apexcharts-pan-icon svg {\n  fill: #fff;\n  stroke: #6E8192;\n  stroke-width: 2;\n}\n.apexcharts-pan-icon.selected svg {\n  stroke: #008FFB;\n}\n.apexcharts-pan-icon:not(.selected):hover svg {\n  stroke: #0e1726;\n}\n\n.apexcharts-toolbar {\n  position: absolute;\n  z-index: 11;\n  top: 0px;\n  right: 3px;\n  max-width: 176px;\n  text-align: right;\n  border-radius: 3px;\n  padding: 0px 6px 2px 6px;\n  display: flex;\n  justify-content: space-between;\n  align-items: center; \n}\n\n.apexcharts-toolbar svg {\n  pointer-events: none;\n}\n\n.apexcharts-menu {\n  background: #fff;\n  position: absolute;\n  top: 100%;\n  border: 1px solid #ddd;\n  border-radius: 3px;\n  padding: 3px;\n  right: 10px;\n  opacity: 0;\n  min-width: 110px;\n  transition: 0.15s ease all;\n  pointer-events: none;\n}\n\n.apexcharts-menu.open {\n  opacity: 1;\n  pointer-events: all;\n  transition: 0.15s ease all;\n}\n\n.apexcharts-menu-item {\n  padding: 6px 7px;\n  font-size: 12px;\n  cursor: pointer;\n}\n.light .apexcharts-menu-item:hover {\n  background: #eee;\n}\n.dark .apexcharts-menu {\n  background: rgba(0, 0, 0, 0.7);\n  color: #fff;\n}\n\n@media screen and (min-width: 768px) {\n  .apexcharts-toolbar {\n    /*opacity: 0;*/\n  }\n\n  .apexcharts-canvas:hover .apexcharts-toolbar {\n    opacity: 1;\n  } \n}\n\n.apexcharts-datalabel.hidden {\n  opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabel, .apexcharts-datalabel-label, .apexcharts-datalabel-value {\n  cursor: default;\n  pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n  opacity: 0;\n  animation-name: opaque;\n  animation-duration: 0.3s;\n  animation-fill-mode: forwards;\n  animation-timing-function: ease;\n}\n\n.apexcharts-canvas .hidden {\n  opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n  opacity: 0;\n}\n\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events, .apexcharts-radar-series path, .apexcharts-radar-series polygon {\n  pointer-events: none;\n}\n\n/* markers */\n\n.apexcharts-marker {\n  transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n  0% {\n    opacity: 0;\n  }\n  100% {\n    opacity: 1;\n  }\n}'),"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(t){if("Element"in t){var e=t.Element.prototype,i=Object,n=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array.prototype.indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1},r=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},s=function(t,e){if(""===e)throw new r("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new r("INVALID_CHARACTER_ERR","The token must not contain space characters.");return o.call(t,e)},a=function(t){for(var e=n.call(t.getAttribute("class")||""),i=e?e.split(/\s+/):[],o=0,r=i.length;o<r;o++)this.push(i[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=a.prototype=[],c=function(){return new a(this)};if(r.prototype=Error.prototype,l.item=function(t){return this[t]||null},l.contains=function(t){return~s(this,t+"")},l.add=function(){var t,e=arguments,i=0,n=e.length,o=!1;do{~s(this,t=e[i]+"")||(this.push(t),o=!0)}while(++i<n);o&&this._updateClassName()},l.remove=function(){var t,e,i=arguments,n=0,o=i.length,r=!1;do{for(e=s(this,t=i[n]+"");~e;)this.splice(e,1),r=!0,e=s(this,t)}while(++n<o);r&&this._updateClassName()},l.toggle=function(t,e){var i=this.contains(t),n=i?!0!==e&&"remove":!1!==e&&"add";return n&&this[n](t),!0===e||!1===e?e:!i},l.replace=function(t,e){var i=s(t+"");~i&&(this.splice(i,1,e),this._updateClassName())},l.toString=function(){return this.join(" ")},i.defineProperty){var d={get:c,enumerable:!0,configurable:!0};try{i.defineProperty(e,"classList",d)}catch(t){void 0!==t.number&&-2146823252!==t.number||(d.enumerable=!1,i.defineProperty(e,"classList",d))}}else i.prototype.__defineGetter__&&e.__defineGetter__("classList",c)}}(self),function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var i,n=arguments.length;for(i=0;i<n;i++)t=arguments[i],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:i.call(this,t)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var i=this.toString().split(" "),n=i.indexOf(t+"");~n&&(i=i.slice(n),this.remove.apply(this,i),this.add(e),this.add.apply(this,i.slice(1)))}),t=null}()),function(){var t=!1;function e(t){var e=t.__resizeTriggers__,i=e.firstElementChild,n=e.lastElementChild,o=i.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,o.style.width=i.offsetWidth+1+"px",o.style.height=i.offsetHeight+1+"px",i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight}function i(t){var i=this;e(this),this.__resizeRAF__&&s(this.__resizeRAF__),this.__resizeRAF__=r((function(){(function(t){return t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height})(i)&&(i.__resizeLast__.width=i.offsetWidth,i.__resizeLast__.height=i.offsetHeight,i.__resizeListeners__.forEach((function(e){e.call(t)})))}))}var n,o,r=(n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return window.setTimeout(t,20)},function(t){return n(t)}),s=(o=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(t){return o(t)}),a=!1,l="",c="animationstart",d="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),u=document.createElement("fakeelement");if(void 0!==u.style.animationName&&(a=!0),!1===a)for(var p=0;p<d.length;p++)if(void 0!==u.style[d[p]+"AnimationName"]){l="-"+d[p].toLowerCase()+"-",c=h[p];break}var f="@"+l+"keyframes resizeanim { from { opacity: 0; } to { opacity: 0; } } ",g=l+"animation: 1ms resizeanim; ";window.addResizeListener=function(n,o){n.__resizeTriggers__||("static"==getComputedStyle(n).position&&(n.style.position="relative"),function(){if(!t){var e=(f||"")+".resize-triggers { "+(g||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),i.appendChild(n),t=!0}}(),n.__resizeLast__={},n.__resizeListeners__=[],(n.__resizeTriggers__=document.createElement("div")).className="resize-triggers",n.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',n.appendChild(n.__resizeTriggers__),e(n),n.addEventListener("scroll",i,!0),c&&n.__resizeTriggers__.addEventListener(c,(function(t){"resizeanim"==t.animationName&&e(n)}))),n.__resizeListeners__.push(o)},window.removeResizeListener=function(t,e){t&&(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||(t.removeEventListener("scroll",i),t.__resizeTriggers__=!t.removeChild(t.__resizeTriggers__)))}}(),window.Apex={},function(){function i(t,n){e(this,i),this.opts=n,this.ctx=this,this.w=new C(n).init(),this.el=t,this.w.globals.cuid=(Math.random()+1).toString(36).substring(4),this.w.globals.chartID=this.w.config.chart.id?this.w.config.chart.id:this.w.globals.cuid,this.initModules(),this.create=h.bind(this.create,this),this.windowResizeHandler=this.windowResize.bind(this)}return n(i,[{key:"render",value:function(){var t=this;return new Z((function(e,i){if(null!==t.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),t.w.config.chart.id&&Apex._chartInstances.push({id:t.w.globals.chartID,group:t.w.config.chart.group,chart:t}),t.setLocale(t.w.config.chart.defaultLocale);var n=t.w.config.chart.events.beforeMount;"function"==typeof n&&n(t,t.w),t.fireEvent("beforeMount",[t,t.w]),window.addEventListener("resize",t.windowResizeHandler),window.addResizeListener(t.el.parentNode,t.parentResizeCallback.bind(t));var o=t.create(t.w.config.series,{});if(!o)return e(t);t.mount(o).then((function(){e(o),"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.fireEvent("mounted",[t,t.w])})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"initModules",value:function(){this.animations=new p(this),this.core=new q(this.el,this),this.grid=new st(this),this.coreUtils=new x(this),this.config=new w({}),this.crosshairs=new P(this),this.options=new m,this.responsive=new lt(this),this.series=new Y(this),this.theme=new ct(this),this.formatters=new H(this),this.titleSubtitle=new bt(this),this.legend=new at(this),this.toolbar=new vt(this),this.dimensions=new X(this),this.zoomPanSelection=new yt(this),this.w.globals.tooltip=new mt(this)}},{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var n=i.globals.events[t].indexOf(e);-1!==n&&i.globals.events[t].splice(n,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var n=i.globals.events[t],o=n.length,r=0;r<o;r++)n[r].apply(null,e)}}},{key:"create",value:function(t,e){var i=this.w;this.initModules();var n=this.w.globals;if(n.noData=!1,n.animationEnded=!1,this.responsive.checkResponsiveConfig(e),null===this.el)return n.animationEnded=!0,null;if(this.core.setupElements(),0===n.svgWidth)return n.animationEnded=!0,null;var o=x.checkComboSeries(t);n.comboCharts=o.comboCharts,n.comboChartsHasBars=o.comboChartsHasBars,(0===t.length||1===t.length&&t[0].data&&0===t[0].data.length)&&this.series.handleNoData(),this.setupEventHandlers(),this.core.parseData(t),this.theme.init(),new _(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),this.legend.init(),this.series.hasAllSeriesEqualX(),n.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters(),this.dimensions.plotCoords();var r=this.core.xySettings();this.grid.createGridMask();var s=this.core.plotChartType(t,r);this.core.shiftGraphPosition();var a={plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}};return{elGraph:s,xyRatios:r,elInner:i.globals.dom.elGraphical,dimensions:a}}},{key:"mount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this,i=e.w;return new Z((function(n,o){if(null===e.el)return o(new Error("Not enough data to display or target element not found"));if((null===t||i.globals.allSeriesCollapsed)&&e.series.handleNoData(),e.annotations=new v(e),e.core.drawAxis(i.config.chart.type,t.xyRatios),e.grid=new st(e),"back"===i.config.grid.position&&e.grid.drawGrid(),"back"===i.config.annotations.position&&e.annotations.drawAnnotations(),t.elGraph instanceof Array)for(var r=0;r<t.elGraph.length;r++)i.globals.dom.elGraphical.add(t.elGraph[r]);else i.globals.dom.elGraphical.add(t.elGraph);if("front"===i.config.grid.position&&e.grid.drawGrid(),"front"===i.config.xaxis.crosshairs.position&&e.crosshairs.drawXCrosshairs(),"front"===i.config.yaxis[0].crosshairs.position&&e.crosshairs.drawYCrosshairs(),"front"===i.config.annotations.position&&e.annotations.drawAnnotations(),!i.globals.noData){if(i.config.tooltip.enabled&&!i.globals.noData&&e.w.globals.tooltip.drawTooltip(t.xyRatios),i.globals.axisCharts&&i.globals.isXNumeric)(i.config.chart.zoom.enabled||i.config.chart.selection&&i.config.chart.selection.enabled||i.config.chart.pan&&i.config.chart.pan.enabled)&&e.zoomPanSelection.init({xyRatios:t.xyRatios});else{var s=i.config.chart.toolbar.tools;s.zoom=!1,s.zoomin=!1,s.zoomout=!1,s.selection=!1,s.pan=!1,s.reset=!1}i.config.chart.toolbar.show&&!i.globals.allSeriesCollapsed&&e.toolbar.createToolbar()}i.globals.memory.methodsToExec.length>0&&i.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),n(e)}))}},{key:"clearPreviousPaths",value:function(){var t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1,t.globals.collapsedSeries=[],t.globals.collapsedSeriesIndices=[]}},{key:"updateOptions",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.w;return t.series&&(t.series[0].data&&(t.series=t.series.map((function(t,e){return r({},o.config.series[e],{name:t.name?t.name:o.config.series[e]&&o.config.series[e].name,type:t.type?t.type:o.config.series[e]&&o.config.series[e].type,data:t.data?t.data:o.config.series[e]&&o.config.series[e].data})}))),this.revertDefaultAxisMinMax()),t.xaxis&&((t.xaxis.min||t.xaxis.max)&&this.forceXAxisUpdate(t),t.xaxis.categories&&t.xaxis.categories.length&&o.config.xaxis.convertedCatToNumeric&&(t=b.convertCatToNumeric(t))),o.globals.collapsedSeriesIndices.length>0&&this.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this._updateOptions(t,e,i,n)}},{key:"_updateOptions",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.getSyncedCharts().forEach((function(r){var s=r.w;return s.globals.shouldAnimate=n,i||(s.globals.resized=!0,s.globals.dataChanged=!0,n&&r.series.getPreviousPaths()),e&&"object"===t(e)&&(r.config=new w(e),e=x.extendArrayProps(r.config,e),s.config=h.extend(s.config,e),o&&(s.globals.lastXAxis=[],s.globals.lastYAxis=[],s.globals.initialConfig=h.extend({},s.config),s.globals.initialSeries=JSON.parse(JSON.stringify(s.config.series)))),r.update(e)}))}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.revertDefaultAxisMinMax(),this._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.w.config.series.slice();return n.push(t),this.revertDefaultAxisMinMax(),this._updateSeries(n,e,i)}},{key:"_updateSeries",value:function(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.w;return this.w.globals.shouldAnimate=e,o.globals.dataChanged=!0,o.globals.allSeriesCollapsed&&(o.globals.allSeriesCollapsed=!1),e&&this.series.getPreviousPaths(),o.globals.axisCharts?(0===(i=t.map((function(t,e){return r({},o.config.series[e],{name:t.name?t.name:o.config.series[e]&&o.config.series[e].name,type:t.type?t.type:o.config.series[e]&&o.config.series[e].type,data:t.data?t.data:o.config.series[e]&&o.config.series[e].data})}))).length&&(i=[{data:[]}]),o.config.series=i):o.config.series=t.slice(),n&&(o.globals.initialConfig.series=JSON.parse(JSON.stringify(o.config.series)),o.globals.initialSeries=JSON.parse(JSON.stringify(o.config.series))),this.update()}},{key:"getSyncedCharts",value:function(){var t=this.getGroupedCharts(),e=[this];return t.length&&(e=[],t.forEach((function(t){e.push(t)}))),e}},{key:"getGroupedCharts",value:function(){var t=this;return Apex._chartInstances.filter((function(t){if(t.group)return!0})).map((function(e){return t.w.config.chart.group===e.group?e.chart:t}))}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var n=i.w.config.series.slice(),o=0;o<n.length;o++)if(void 0!==t[o])for(var r=0;r<t[o].data.length;r++)n[o].data.push(t[o].data[r]);return i.w.config.series=n,e&&(i.w.globals.initialSeries=JSON.parse(JSON.stringify(i.w.config.series))),this.update()}},{key:"update",value:function(t){var e=this;return new Z((function(i,n){e.clear();var o=e.create(e.w.config.series,t);if(!o)return i(e);e.mount(o).then((function(){"function"==typeof e.w.config.chart.events.updated&&e.w.config.chart.events.updated(e,e.w),e.fireEvent("updated",[e,e.w]),e.w.globals.isDirty=!0,i(e)})).catch((function(t){n(t)}))}))}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;void 0!==t.xaxis.min&&(e.config.xaxis.min=t.xaxis.min,e.globals.lastXAxis.min=t.xaxis.min),void 0!==t.xaxis.max&&(e.config.xaxis.max=t.xaxis.max,e.globals.lastXAxis.max=t.xaxis.max)}},{key:"revertDefaultAxisMinMax",value:function(){var t=this.w;t.config.xaxis.min=t.globals.lastXAxis.min,t.config.xaxis.max=t.globals.lastXAxis.max,t.config.yaxis.map((function(e,i){t.globals.zoomed&&void 0!==t.globals.lastYAxis[i]&&(e.min=t.globals.lastYAxis[i].min,e.max=t.globals.lastYAxis[i].max)}))}},{key:"clear",value:function(){this.zoomPanSelection&&this.zoomPanSelection.destroy(),this.toolbar&&this.toolbar.destroy(),this.animations=null,this.annotations=null,this.core=null,this.grid=null,this.series=null,this.responsive=null,this.theme=null,this.formatters=null,this.titleSubtitle=null,this.legend=null,this.dimensions=null,this.options=null,this.crosshairs=null,this.zoomPanSelection=null,this.toolbar=null,this.w.globals.tooltip=null,this.clearDomElements()}},{key:"killSVG",value:function(t){return new Z((function(e,i){t.each((function(t,e){this.removeClass("*"),this.off(),this.stop()}),!0),t.ungroup(),t.clear(),e("done")}))}},{key:"clearDomElements",value:function(){var t=this.w.globals.dom;if(null!==this.el)for(;this.el.firstChild;)this.el.removeChild(this.el.firstChild);this.killSVG(t.Paper),t.Paper.remove(),t.elWrap=null,t.elGraphical=null,t.elLegendWrap=null,t.baseEl=null,t.elGridRect=null,t.elGridRectMask=null,t.elGridRectMarkerMask=null,t.elDefs=null}},{key:"destroy",value:function(){this.clear();var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===t&&Apex._chartInstances.splice(i,1)})),window.removeEventListener("resize",this.windowResizeHandler),window.removeResizeListener(this.el.parentNode,this.parentResizeCallback.bind(this))}},{key:"toggleSeries",value:function(t){var e=this.series.getSeriesByName(t),i=parseInt(e.getAttribute("data:realIndex")),n=e.classList.contains("apexcharts-series-collapsed");this.legend.toggleDataSeries(i,n)}},{key:"resetToggleSeries",value:function(){this.legend.resetToggleDataSeries()}},{key:"setupEventHandlers",value:function(){var t=this.w,e=this,i=t.globals.dom.baseEl.querySelector(t.globals.chartClass),n=["mousedown","mousemove","touchstart","touchmove","mouseup","touchend"];n.forEach((function(n){i.addEventListener(n,(function(i){"mousedown"===i.type&&1===i.which||("mouseup"===i.type&&1===i.which||"touchend"===i.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(i,e,t),e.fireEvent("click",[i,e,t]))}),{capture:!1,passive:!0})})),n.forEach((function(e){document.addEventListener(e,(function(e){t.globals.clientX="touchmove"===e.type?e.touches[0].clientX:e.clientX,t.globals.clientY="touchmove"===e.type?e.touches[0].clientY:e.clientY}))})),this.core.setupBrushHandler()}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addXaxisAnnotationExternal(t,e,n)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addYaxisAnnotationExternal(t,e,n)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addPointAnnotationExternal(t,e,n)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"addText",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addText(t,e,n)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new W(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new W(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"setLocale",value:function(t){this.setCurrentLocaleValues(t)}},{key:"setCurrentLocaleValues",value:function(t){var e=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var n=h.extend(g,i);this.w.globals.locale=n.options}},{key:"dataURI",value:function(){return new rt(this.ctx).dataURI()}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.windowResize()}},{key:"windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.update()}),150)}}],[{key:"initOnLoad",value:function(){for(var t=document.querySelectorAll("[data-apexcharts]"),e=0;e<t.length;e++)new i(t[e],JSON.parse(t[e].getAttribute("data-options"))).render()}},{key:"exec",value:function(t,e){var i=this.getChartByID(t);if(i){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];switch(e){case"updateOptions":return i.updateOptions.apply(i,o);case"updateSeries":return i.updateSeries.apply(i,o);case"appendData":return i.appendData.apply(i,o);case"appendSeries":return i.appendSeries.apply(i,o);case"toggleSeries":return i.toggleSeries.apply(i,o);case"dataURI":return i.dataURI.apply(i,o);case"addXaxisAnnotation":return i.addXaxisAnnotation.apply(i,o);case"addYaxisAnnotation":return i.addYaxisAnnotation.apply(i,o);case"addPointAnnotation":return i.addPointAnnotation.apply(i,o);case"addText":return i.addText.apply(i,o);case"clearAnnotations":return i.clearAnnotations.apply(i,o);case"paper":return i.paper.apply(i,o);case"destroy":return i.destroy()}}}},{key:"merge",value:function(t,e){return h.extend(t,e)}},{key:"getChartByID",value:function(t){return Apex._chartInstances.filter((function(e){return e.id===t}))[0].chart}}]),i}()})),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}((function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;var i;return function(){var t,i,n;e&&e.requirejs||(e?i=e:e={},function(e){var o,r,s,a,l={},c={},d={},h={},u=Object.prototype.hasOwnProperty,p=[].slice,f=/\.js$/;function g(t,e){return u.call(t,e)}function m(t,e){var i,n,o,r,s,a,l,c,h,u,p,g=e&&e.split("/"),m=d.map,v=m&&m["*"]||{};if(t){for(s=(t=t.split("/")).length-1,d.nodeIdCompat&&f.test(t[s])&&(t[s]=t[s].replace(f,"")),"."===t[0].charAt(0)&&g&&(t=g.slice(0,g.length-1).concat(t)),h=0;h<t.length;h++)if("."===(p=t[h]))t.splice(h,1),h-=1;else if(".."===p){if(0===h||1===h&&".."===t[2]||".."===t[h-1])continue;h>0&&(t.splice(h-1,2),h-=2)}t=t.join("/")}if((g||v)&&m){for(h=(i=t.split("/")).length;h>0;h-=1){if(n=i.slice(0,h).join("/"),g)for(u=g.length;u>0;u-=1)if((o=m[g.slice(0,u).join("/")])&&(o=o[n])){r=o,a=h;break}if(r)break;!l&&v&&v[n]&&(l=v[n],c=h)}!r&&l&&(r=l,a=c),r&&(i.splice(0,a,r),t=i.join("/"))}return t}function v(t,i){return function(){var n=p.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),r.apply(e,n.concat([t,i]))}}function y(t){return function(e){l[t]=e}}function b(t){if(g(c,t)){var i=c[t];delete c[t],h[t]=!0,o.apply(e,i)}if(!g(l,t)&&!g(h,t))throw new Error("No "+t);return l[t]}function x(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function w(t){return t?x(t):[]}function S(t){return function(){return d&&d.config&&d.config[t]||{}}}s=function(t,e){var i,n,o=x(t),r=o[0],s=e[1];return t=o[1],r&&(i=b(r=m(r,s))),r?t=i&&i.normalize?i.normalize(t,(n=s,function(t){return m(t,n)})):m(t,s):(r=(o=x(t=m(t,s)))[0],t=o[1],r&&(i=b(r))),{f:r?r+"!"+t:t,n:t,pr:r,p:i}},a={require:function(t){return v(t)},exports:function(t){var e=l[t];return void 0!==e?e:l[t]={}},module:function(t){return{id:t,uri:"",exports:l[t],config:S(t)}}},o=function(t,i,n,o){var r,d,u,p,f,m,x,S=[],C=typeof n;if(m=w(o=o||t),"undefined"===C||"function"===C){for(i=!i.length&&n.length?["require","exports","module"]:i,f=0;f<i.length;f+=1)if("require"===(d=(p=s(i[f],m)).f))S[f]=a.require(t);else if("exports"===d)S[f]=a.exports(t),x=!0;else if("module"===d)r=S[f]=a.module(t);else if(g(l,d)||g(c,d)||g(h,d))S[f]=b(d);else{if(!p.p)throw new Error(t+" missing "+d);p.p.load(p.n,v(o,!0),y(d),{}),S[f]=l[d]}u=n?n.apply(l[t],S):void 0,t&&(r&&r.exports!==e&&r.exports!==l[t]?l[t]=r.exports:u===e&&x||(l[t]=u))}else t&&(l[t]=n)},t=i=r=function(t,i,n,l,c){if("string"==typeof t)return a[t]?a[t](i):b(s(t,w(i)).f);if(!t.splice){if((d=t).deps&&r(d.deps,d.callback),!i)return;i.splice?(t=i,i=n,n=null):t=e}return i=i||function(){},"function"==typeof n&&(n=l,l=c),l?o(e,t,i,n):setTimeout((function(){o(e,t,i,n)}),4),r},r.config=function(t){return r(t)},t._defined=l,(n=function(t,e,i){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(i=e,e=[]),g(l,t)||g(c,t)||(c[t]=[t,e,i])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=i,e.define=n)}(),e.define("almond",(function(){})),e.define("jquery",[],(function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e})),e.define("select2/utils",["jquery"],(function(t){var e={};function i(t){var e=t.prototype,i=[];for(var n in e)"function"==typeof e[n]&&"constructor"!==n&&i.push(n);return i}e.Extend=function(t,e){var i={}.hasOwnProperty;function n(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},e.Decorate=function(t,e){var n=i(e),o=i(t);function r(){var i=Array.prototype.unshift,n=e.prototype.constructor.length,o=t.prototype.constructor;n>0&&(i.call(arguments,t.prototype.constructor),o=e.prototype.constructor),o.apply(this,arguments)}e.displayName=t.displayName,r.prototype=new function(){this.constructor=r};for(var s=0;s<o.length;s++){var a=o[s];r.prototype[a]=t.prototype[a]}for(var l=function(t){var i=function(){};t in r.prototype&&(i=r.prototype[t]);var n=e.prototype[t];return function(){return Array.prototype.unshift.call(arguments,i),n.apply(this,arguments)}},c=0;c<n.length;c++){var d=n[c];r.prototype[d]=l(d)}return r};var n=function(){this.listeners={}};n.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},n.prototype.trigger=function(t){var e=Array.prototype.slice,i=e.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),i[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},n.prototype.invoke=function(t,e){for(var i=0,n=t.length;i<n;i++)t[i].apply(this,e)},e.Observable=n,e.generateChars=function(t){for(var e="",i=0;i<t;i++)e+=Math.floor(36*Math.random()).toString(36);return e},e.bind=function(t,e){return function(){t.apply(e,arguments)}},e._convertData=function(t){for(var e in t){var i=e.split("-"),n=t;if(1!==i.length){for(var o=0;o<i.length;o++){var r=i[o];(r=r.substring(0,1).toLowerCase()+r.substring(1))in n||(n[r]={}),o==i.length-1&&(n[r]=t[e]),n=n[r]}delete t[e]}}return t},e.hasScroll=function(e,i){var n=t(i),o=i.style.overflowX,r=i.style.overflowY;return(o!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===o||"scroll"===r||n.innerHeight()<i.scrollHeight||n.innerWidth()<i.scrollWidth)},e.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,(function(t){return e[t]}))},e.appendMany=function(e,i){if("1.7"===t.fn.jquery.substr(0,3)){var n=t();t.map(i,(function(t){n=n.add(t)})),i=n}e.append(i)},e.__cache={};var o=0;return e.GetUniqueElementId=function(t){var e=t.getAttribute("data-select2-id");return null==e&&(t.id?(e=t.id,t.setAttribute("data-select2-id",e)):(t.setAttribute("data-select2-id",++o),e=o.toString())),e},e.StoreData=function(t,i,n){var o=e.GetUniqueElementId(t);e.__cache[o]||(e.__cache[o]={}),e.__cache[o][i]=n},e.GetData=function(i,n){var o=e.GetUniqueElementId(i);return n?e.__cache[o]&&null!=e.__cache[o][n]?e.__cache[o][n]:t(i).data(n):e.__cache[o]},e.RemoveData=function(t){var i=e.GetUniqueElementId(t);null!=e.__cache[i]&&delete e.__cache[i],t.removeAttribute("data-select2-id")},e})),e.define("select2/results",["jquery","./utils"],(function(t,e){function i(t,e,n){this.$element=t,this.data=n,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var i=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=t('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(e.message);n.append(i(o(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var i=0;i<t.results.length;i++){var n=t.results[i],o=this.option(n);e.push(o)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(t,e){e.find(".select2-results").append(t)},i.prototype.sort=function(t){return this.options.get("sorter")(t)},i.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var i=this;this.data.current((function(n){var o=t.map(n,(function(t){return t.id.toString()}));i.$results.find(".select2-results__option[aria-selected]").each((function(){var i=t(this),n=e.GetData(this,"data"),r=""+n.id;null!=n.element&&n.element.selected||null==n.element&&t.inArray(r,o)>-1?i.attr("aria-selected","true"):i.attr("aria-selected","false")}))}))},i.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},i=this.option(e);i.className+=" loading-results",this.$results.prepend(i)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(i){var n=document.createElement("li");n.className="select2-results__option";var o={role:"option","aria-selected":"false"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var s in(null!=i.element&&r.call(i.element,":disabled")||null==i.element&&i.disabled)&&(delete o["aria-selected"],o["aria-disabled"]="true"),null==i.id&&delete o["aria-selected"],null!=i._resultId&&(n.id=i._resultId),i.title&&(n.title=i.title),i.children&&(o.role="group",o["aria-label"]=i.text,delete o["aria-selected"]),o){var a=o[s];n.setAttribute(s,a)}if(i.children){var l=t(n),c=document.createElement("strong");c.className="select2-results__group",t(c),this.template(i,c);for(var d=[],h=0;h<i.children.length;h++){var u=i.children[h],p=this.option(u);d.push(p)}var f=t("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});f.append(d),l.append(c),l.append(f)}else this.template(i,n);return e.StoreData(n,"data",i),n},i.prototype.bind=function(i,n){var o=this,r=i.id+"-results";this.$results.attr("id",r),i.on("results:all",(function(t){o.clear(),o.append(t.data),i.isOpen()&&(o.setClasses(),o.highlightFirstItem())})),i.on("results:append",(function(t){o.append(t.data),i.isOpen()&&o.setClasses()})),i.on("query",(function(t){o.hideMessages(),o.showLoading(t)})),i.on("select",(function(){i.isOpen()&&(o.setClasses(),o.options.get("scrollAfterSelect")&&o.highlightFirstItem())})),i.on("unselect",(function(){i.isOpen()&&(o.setClasses(),o.options.get("scrollAfterSelect")&&o.highlightFirstItem())})),i.on("open",(function(){o.$results.attr("aria-expanded","true"),o.$results.attr("aria-hidden","false"),o.setClasses(),o.ensureHighlightVisible()})),i.on("close",(function(){o.$results.attr("aria-expanded","false"),o.$results.attr("aria-hidden","true"),o.$results.removeAttr("aria-activedescendant")})),i.on("results:toggle",(function(){var t=o.getHighlightedResults();0!==t.length&&t.trigger("mouseup")})),i.on("results:select",(function(){var t=o.getHighlightedResults();if(0!==t.length){var i=e.GetData(t[0],"data");"true"==t.attr("aria-selected")?o.trigger("close",{}):o.trigger("select",{data:i})}})),i.on("results:previous",(function(){var t=o.getHighlightedResults(),e=o.$results.find("[aria-selected]"),i=e.index(t);if(!(i<=0)){var n=i-1;0===t.length&&(n=0);var r=e.eq(n);r.trigger("mouseenter");var s=o.$results.offset().top,a=r.offset().top,l=o.$results.scrollTop()+(a-s);0===n?o.$results.scrollTop(0):a-s<0&&o.$results.scrollTop(l)}})),i.on("results:next",(function(){var t=o.getHighlightedResults(),e=o.$results.find("[aria-selected]"),i=e.index(t)+1;if(!(i>=e.length)){var n=e.eq(i);n.trigger("mouseenter");var r=o.$results.offset().top+o.$results.outerHeight(!1),s=n.offset().top+n.outerHeight(!1),a=o.$results.scrollTop()+s-r;0===i?o.$results.scrollTop(0):s>r&&o.$results.scrollTop(a)}})),i.on("results:focus",(function(t){t.element.addClass("select2-results__option--highlighted")})),i.on("results:message",(function(t){o.displayMessage(t)})),t.fn.mousewheel&&this.$results.on("mousewheel",(function(t){var e=o.$results.scrollTop(),i=o.$results.get(0).scrollHeight-e+t.deltaY,n=t.deltaY>0&&e-t.deltaY<=0,r=t.deltaY<0&&i<=o.$results.height();n?(o.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):r&&(o.$results.scrollTop(o.$results.get(0).scrollHeight-o.$results.height()),t.preventDefault(),t.stopPropagation())})),this.$results.on("mouseup",".select2-results__option[aria-selected]",(function(i){var n=t(this),r=e.GetData(this,"data");"true"!==n.attr("aria-selected")?o.trigger("select",{originalEvent:i,data:r}):o.options.get("multiple")?o.trigger("unselect",{originalEvent:i,data:r}):o.trigger("close",{})})),this.$results.on("mouseenter",".select2-results__option[aria-selected]",(function(i){var n=e.GetData(this,"data");o.getHighlightedResults().removeClass("select2-results__option--highlighted"),o.trigger("results:focus",{data:n,element:t(this)})}))},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),i=this.$results.offset().top,n=t.offset().top,o=this.$results.scrollTop()+(n-i),r=n-i;o-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(r>this.$results.outerHeight()||r<0)&&this.$results.scrollTop(o)}},i.prototype.template=function(e,i){var n=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=n(e,i);null==r?i.style.display="none":"string"==typeof r?i.innerHTML=o(r):t(i).append(r)},i})),e.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),e.define("select2/selection/base",["jquery","../utils","../keys"],(function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var i=t('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=e.GetData(this.$element[0],"old-tabindex")?this._tabindex=e.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),i.attr("title",this.$element.attr("title")),i.attr("tabindex",this._tabindex),i.attr("aria-disabled","false"),this.$selection=i,i},n.prototype.bind=function(t,e){var n=this,o=t.id+"-results";this.container=t,this.$selection.on("focus",(function(t){n.trigger("focus",t)})),this.$selection.on("blur",(function(t){n._handleBlur(t)})),this.$selection.on("keydown",(function(t){n.trigger("keypress",t),t.which===i.SPACE&&t.preventDefault()})),t.on("results:focus",(function(t){n.$selection.attr("aria-activedescendant",t.data._resultId)})),t.on("selection:update",(function(t){n.update(t.data)})),t.on("open",(function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",o),n._attachCloseHandler(t)})),t.on("close",(function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(t)})),t.on("enable",(function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")})),t.on("disable",(function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")}))},n.prototype._handleBlur=function(e){var i=this;window.setTimeout((function(){document.activeElement==i.$selection[0]||t.contains(i.$selection[0],document.activeElement)||i.trigger("blur",e)}),1)},n.prototype._attachCloseHandler=function(i){t(document.body).on("mousedown.select2."+i.id,(function(i){var n=t(i.target).closest(".select2");t(".select2.select2-container--open").each((function(){this!=n[0]&&e.GetData(this,"element").select2("close")}))}))},n.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n.prototype.isEnabled=function(){return!this.isDisabled()},n.prototype.isDisabled=function(){return this.options.get("disabled")},n})),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(t,e,i,n){function o(){o.__super__.constructor.apply(this,arguments)}return i.Extend(o,e),o.prototype.render=function(){var t=o.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},o.prototype.bind=function(t,e){var i=this;o.__super__.bind.apply(this,arguments);var n=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",(function(t){1===t.which&&i.trigger("toggle",{originalEvent:t})})),this.$selection.on("focus",(function(t){})),this.$selection.on("blur",(function(t){})),t.on("focus",(function(e){t.isOpen()||i.$selection.trigger("focus")}))},o.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},o.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},o.prototype.selectionContainer=function(){return t("<span></span>")},o.prototype.update=function(t){if(0!==t.length){var e=t[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(e,i);i.empty().append(n);var o=e.title||e.text;o?i.attr("title",o):i.removeAttr("title")}else this.clear()},o})),e.define("select2/selection/multiple",["jquery","./base","../utils"],(function(t,e,i){function n(t,e){n.__super__.constructor.apply(this,arguments)}return i.Extend(n,e),n.prototype.render=function(){var t=n.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},n.prototype.bind=function(e,o){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(t){r.trigger("toggle",{originalEvent:t})})),this.$selection.on("click",".select2-selection__choice__remove",(function(e){if(!r.isDisabled()){var n=t(this).parent(),o=i.GetData(n[0],"data");r.trigger("unselect",{originalEvent:e,data:o})}}))},n.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},n.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},n.prototype.selectionContainer=function(){return t('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},n.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],n=0;n<t.length;n++){var o=t[n],r=this.selectionContainer(),s=this.display(o,r);r.append(s);var a=o.title||o.text;a&&r.attr("title",a),i.StoreData(r[0],"data",o),e.push(r)}var l=this.$selection.find(".select2-selection__rendered");i.appendMany(l,e)}},n})),e.define("select2/selection/placeholder",["../utils"],(function(t){function e(t,e,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var i=this.selectionContainer();return i.html(this.display(e)),i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),i},e.prototype.update=function(t,e){var i=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||i)return t.call(this,e);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},e})),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function(t,e,i){function n(){}return n.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(t){n._handleClear(t)})),e.on("keypress",(function(t){n._handleKeyboardClear(t,e)}))},n.prototype._handleClear=function(t,e){if(!this.isDisabled()){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){e.stopPropagation();var o=i.GetData(n[0],"data"),r=this.$element.val();this.$element.val(this.placeholder.id);var s={data:o};if(this.trigger("clear",s),s.prevented)this.$element.val(r);else{for(var a=0;a<o.length;a++)if(s={data:o[a]},this.trigger("unselect",s),s.prevented)return void this.$element.val(r);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},n.prototype._handleKeyboardClear=function(t,i,n){n.isOpen()||i.which!=e.DELETE&&i.which!=e.BACKSPACE||this._handleClear(i)},n.prototype.update=function(e,n){if(e.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var o=this.options.get("translations").get("removeAllItems"),r=t('<span class="select2-selection__clear" title="'+o()+'">&times;</span>');i.StoreData(r[0],"data",n),this.$selection.find(".select2-selection__rendered").prepend(r)}},n})),e.define("select2/selection/search",["jquery","../utils","../keys"],(function(t,e,i){function n(t,e,i){t.call(this,e,i)}return n.prototype.render=function(e){var i=t('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=i,this.$search=i.find("input");var n=e.call(this);return this._transferTabIndex(),n},n.prototype.bind=function(t,n,o){var r=this,s=n.id+"-results";t.call(this,n,o),n.on("open",(function(){r.$search.attr("aria-controls",s),r.$search.trigger("focus")})),n.on("close",(function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")})),n.on("enable",(function(){r.$search.prop("disabled",!1),r._transferTabIndex()})),n.on("disable",(function(){r.$search.prop("disabled",!0)})),n.on("focus",(function(t){r.$search.trigger("focus")})),n.on("results:focus",(function(t){t.data._resultId?r.$search.attr("aria-activedescendant",t.data._resultId):r.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(t){r.trigger("focus",t)})),this.$selection.on("focusout",".select2-search--inline",(function(t){r._handleBlur(t)})),this.$selection.on("keydown",".select2-search--inline",(function(t){if(t.stopPropagation(),r.trigger("keypress",t),r._keyUpPrevented=t.isDefaultPrevented(),t.which===i.BACKSPACE&&""===r.$search.val()){var n=r.$searchContainer.prev(".select2-selection__choice");if(n.length>0){var o=e.GetData(n[0],"data");r.searchRemoveChoice(o),t.preventDefault()}}})),this.$selection.on("click",".select2-search--inline",(function(t){r.$search.val()&&t.stopPropagation()}));var a=document.documentMode,l=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(t){l?r.$selection.off("input.search input.searchcheck"):r.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(t){if(l&&"input"===t.type)r.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=i.SHIFT&&e!=i.CTRL&&e!=i.ALT&&e!=i.TAB&&r.handleSearch(t)}}))},n.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},n.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},n.prototype.update=function(t,e){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i&&this.$search.trigger("focus")},n.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},n.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";t=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",t)},n})),e.define("select2/selection/eventRelay",["jquery"],(function(t){function e(){}return e.prototype.bind=function(e,i,n){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];e.call(this,i,n),i.on("*",(function(e,i){if(-1!==t.inArray(e,r)){i=i||{};var n=t.Event("select2:"+e,{params:i});o.$element.trigger(n),-1!==t.inArray(e,s)&&(i.prevented=n.isDefaultPrevented())}}))},e})),e.define("select2/translation",["jquery","require"],(function(t,e){function i(t){this.dict=t||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(t){return this.dict[t]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(t){if(!(t in i._cache)){var n=e(t);i._cache[t]=n}return new i(i._cache[t])},i})),e.define("select2/diacritics",[],(function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}})),e.define("select2/data/base",["../utils"],(function(t){function e(t,i){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,i){var n=e.id+"-result-";return n+=t.generateChars(4),null!=i.id?n+="-"+i.id.toString():n+="-"+t.generateChars(4),n},e})),e.define("select2/data/select",["./base","../utils","jquery"],(function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,t),n.prototype.current=function(t){var e=[],n=this;this.$element.find(":selected").each((function(){var t=i(this),o=n.item(t);e.push(o)})),t(e)},n.prototype.select=function(t){var e=this;if(t.selected=!0,i(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current((function(n){var o=[];(t=[t]).push.apply(t,n);for(var r=0;r<t.length;r++){var s=t[r].id;-1===i.inArray(s,o)&&o.push(s)}e.$element.val(o),e.$element.trigger("input").trigger("change")}));else{var n=t.id;this.$element.val(n),this.$element.trigger("input").trigger("change")}},n.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,i(t.element).is("option"))return t.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current((function(n){for(var o=[],r=0;r<n.length;r++){var s=n[r].id;s!==t.id&&-1===i.inArray(s,o)&&o.push(s)}e.$element.val(o),e.$element.trigger("input").trigger("change")}))}},n.prototype.bind=function(t,e){var i=this;this.container=t,t.on("select",(function(t){i.select(t.data)})),t.on("unselect",(function(t){i.unselect(t.data)}))},n.prototype.destroy=function(){this.$element.find("*").each((function(){e.RemoveData(this)}))},n.prototype.query=function(t,e){var n=[],o=this;this.$element.children().each((function(){var e=i(this);if(e.is("option")||e.is("optgroup")){var r=o.item(e),s=o.matches(t,r);null!==s&&n.push(s)}})),e({results:n})},n.prototype.addOptions=function(t){e.appendMany(this.$element,t)},n.prototype.option=function(t){var n;t.children?(n=document.createElement("optgroup")).label=t.text:void 0!==(n=document.createElement("option")).textContent?n.textContent=t.text:n.innerText=t.text,void 0!==t.id&&(n.value=t.id),t.disabled&&(n.disabled=!0),t.selected&&(n.selected=!0),t.title&&(n.title=t.title);var o=i(n),r=this._normalizeItem(t);return r.element=n,e.StoreData(n,"data",r),o},n.prototype.item=function(t){var n={};if(null!=(n=e.GetData(t[0],"data")))return n;if(t.is("option"))n={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){n={text:t.prop("label"),children:[],title:t.prop("title")};for(var o=t.children("option"),r=[],s=0;s<o.length;s++){var a=i(o[s]),l=this.item(a);r.push(l)}n.children=r}return(n=this._normalizeItem(n)).element=t[0],e.StoreData(t[0],"data",n),n},n.prototype._normalizeItem=function(t){return t!==Object(t)&&(t={id:t,text:t}),null!=(t=i.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),i.extend({},{selected:!1,disabled:!1},t)},n.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},n})),e.define("select2/data/array",["./select","../utils","jquery"],(function(t,e,i){function n(t,e){this._dataToConvert=e.get("data")||[],n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype.bind=function(t,e){n.__super__.bind.call(this,t,e),this.addOptions(this.convertToOptions(this._dataToConvert))},n.prototype.select=function(t){var e=this.$element.find("option").filter((function(e,i){return i.value==t.id.toString()}));0===e.length&&(e=this.option(t),this.addOptions(e)),n.__super__.select.call(this,t)},n.prototype.convertToOptions=function(t){var n=this,o=this.$element.find("option"),r=o.map((function(){return n.item(i(this)).id})).get(),s=[];function a(t){return function(){return i(this).val()==t.id}}for(var l=0;l<t.length;l++){var c=this._normalizeItem(t[l]);if(i.inArray(c.id,r)>=0){var d=o.filter(a(c)),h=this.item(d),u=i.extend(!0,{},c,h),p=this.option(u);d.replaceWith(p)}else{var f=this.option(c);if(c.children){var g=this.convertToOptions(c.children);e.appendMany(f,g)}s.push(f)}}return s},n})),e.define("select2/data/ajax",["./array","../utils","jquery"],(function(t,e,i){function n(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype._applyDefaults=function(t){var e={data:function(t){return i.extend({},t,{q:t.term})},transport:function(t,e,n){var o=i.ajax(t);return o.then(e),o.fail(n),o}};return i.extend({},e,t,!0)},n.prototype.processResults=function(t){return t},n.prototype.query=function(t,e){var n=this;null!=this._request&&(i.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=i.extend({type:"GET"},this.ajaxOptions);function r(){var r=o.transport(o,(function(o){var r=n.processResults(o,t);n.options.get("debug")&&window.console&&console.error&&(r&&r.results&&i.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(r)}),(function(){(!("status"in r)||0!==r.status&&"0"!==r.status)&&n.trigger("results:message",{message:"errorLoading"})}));n._request=r}"function"==typeof o.url&&(o.url=o.url.call(this.$element,t)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(r,this.ajaxOptions.delay)):r()},n})),e.define("select2/data/tags",["jquery"],(function(t){function e(e,i,n){var o=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var s=n.get("insertTag");if(void 0!==s&&(this.insertTag=s),e.call(this,i,n),t.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),d=this.option(c);this.$element.append(d)}}return e.prototype.query=function(t,e,i){var n=this;this._removeOldTags(),null!=e.term&&null==e.page?t.call(this,e,(function t(o,r){for(var s=o.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!t({results:l.children},!0);if((l.text||"").toUpperCase()===(e.term||"").toUpperCase()||c)return!r&&(o.data=s,void i(o))}if(r)return!0;var d=n.createTag(e);if(null!=d){var h=n.option(d);h.attr("data-select2-tag",!0),n.addOptions([h]),n.insertTag(s,d)}o.results=s,i(o)})):t.call(this,e,i)},e.prototype.createTag=function(e,i){var n=t.trim(i.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(t,e,i){e.unshift(i)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each((function(){this.selected||t(this).remove()}))},e})),e.define("select2/data/tokenizer",["jquery"],(function(t){function e(t,e,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),t.call(this,e,i)}return e.prototype.bind=function(t,e,i){t.call(this,e,i),this.$search=e.dropdown.$search||e.selection.$search||i.find(".select2-search__field")},e.prototype.query=function(e,i,n){var o=this;i.term=i.term||"";var r=this.tokenizer(i,this.options,(function(e){var i=o._normalizeItem(e);if(!o.$element.find("option").filter((function(){return t(this).val()===i.id})).length){var n=o.option(i);n.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([n])}!function(t){o.trigger("select",{data:t})}(i)}));r.term!==i.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger("focus")),i.term=r.term),e.call(this,i,n)},e.prototype.tokenizer=function(e,i,n,o){for(var r=n.get("tokenSeparators")||[],s=i.term,a=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};a<s.length;){var c=s[a];if(-1!==t.inArray(c,r)){var d=s.substr(0,a),h=l(t.extend({},i,{term:d}));null!=h?(o(h),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},e})),e.define("select2/data/minimumInputLength",[],(function(){function t(t,e,i){this.minimumInputLength=i.get("minimumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t})),e.define("select2/data/maximumInputLength",[],(function(){function t(t,e,i){this.maximumInputLength=i.get("maximumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t})),e.define("select2/data/maximumSelectionLength",[],(function(){function t(t,e,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),t.call(this,e,i)}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",(function(){n._checkIfMaximumSelected()}))},t.prototype.query=function(t,e,i){var n=this;this._checkIfMaximumSelected((function(){t.call(n,e,i)}))},t.prototype._checkIfMaximumSelected=function(t,e){var i=this;this.current((function(t){var n=null!=t?t.length:0;i.maximumSelectionLength>0&&n>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e&&e()}))},t})),e.define("select2/dropdown",["jquery","./utils"],(function(t,e){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},i.prototype.bind=function(){},i.prototype.position=function(t,e){},i.prototype.destroy=function(){this.$dropdown.remove()},i})),e.define("select2/dropdown/search",["jquery","../utils"],(function(t,e){function i(){}return i.prototype.render=function(e){var i=e.call(this),n=t('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),i.prepend(n),i},i.prototype.bind=function(e,i,n){var o=this,r=i.id+"-results";e.call(this,i,n),this.$search.on("keydown",(function(t){o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented()})),this.$search.on("input",(function(e){t(this).off("keyup")})),this.$search.on("keyup input",(function(t){o.handleSearch(t)})),i.on("open",(function(){o.$search.attr("tabindex",0),o.$search.attr("aria-controls",r),o.$search.trigger("focus"),window.setTimeout((function(){o.$search.trigger("focus")}),0)})),i.on("close",(function(){o.$search.attr("tabindex",-1),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.val(""),o.$search.trigger("blur")})),i.on("focus",(function(){i.isOpen()||o.$search.trigger("focus")})),i.on("results:all",(function(t){null!=t.query.term&&""!==t.query.term||(o.showSearch(t)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide"))})),i.on("results:focus",(function(t){t.data._resultId?o.$search.attr("aria-activedescendant",t.data._resultId):o.$search.removeAttr("aria-activedescendant")}))},i.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.showSearch=function(t,e){return!0},i})),e.define("select2/dropdown/hidePlaceholder",[],(function(){function t(t,e,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i,n)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var i=e.slice(0),n=e.length-1;n>=0;n--){var o=e[n];this.placeholder.id===o.id&&i.splice(n,1)}return i},t})),e.define("select2/dropdown/infiniteScroll",["jquery"],(function(t){function e(t,e,i,n){this.lastParams={},t.call(this,e,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("query",(function(t){n.lastParams=t,n.loading=!0})),e.on("query:append",(function(t){n.lastParams=t,n.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=t.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&e&&this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.loadMore()},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),i=this.options.get("translations").get("loadingMore");return e.html(i(this.lastParams)),e},e})),e.define("select2/dropdown/attachBody",["jquery","../utils"],(function(t,e){function i(e,i,n){this.$dropdownParent=t(n.get("dropdownParent")||document.body),e.call(this,i,n)}return i.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("open",(function(){n._showDropdown(),n._attachPositioningHandler(e),n._bindContainerResultHandlers(e)})),e.on("close",(function(){n._hideDropdown(),n._detachPositioningHandler(e)})),this.$dropdownContainer.on("mousedown",(function(t){t.stopPropagation()}))},i.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},i.prototype.position=function(t,e,i){e.attr("class",i.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=i},i.prototype.render=function(e){var i=t("<span></span>"),n=e.call(this);return i.append(n),this.$dropdownContainer=i,i},i.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},i.prototype._bindContainerResultHandlers=function(t,e){if(!this._containerResultsHandlersBound){var i=this;e.on("results:all",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("results:append",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("results:message",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("select",(function(){i._positionDropdown(),i._resizeDropdown()})),e.on("unselect",(function(){i._positionDropdown(),i._resizeDropdown()})),this._containerResultsHandlersBound=!0}},i.prototype._attachPositioningHandler=function(i,n){var o=this,r="scroll.select2."+n.id,s="resize.select2."+n.id,a="orientationchange.select2."+n.id,l=this.$container.parents().filter(e.hasScroll);l.each((function(){e.StoreData(this,"select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})})),l.on(r,(function(i){var n=e.GetData(this,"select2-scroll-position");t(this).scrollTop(n.y)})),t(window).on(r+" "+s+" "+a,(function(t){o._positionDropdown(),o._resizeDropdown()}))},i.prototype._detachPositioningHandler=function(i,n){var o="scroll.select2."+n.id,r="resize.select2."+n.id,s="orientationchange.select2."+n.id;this.$container.parents().filter(e.hasScroll).off(o),t(window).off(o+" "+r+" "+s)},i.prototype._positionDropdown=function(){var e=t(window),i=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),o=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=r.top,s.bottom=r.top+s.height;var a=this.$dropdown.outerHeight(!1),l=e.scrollTop(),c=e.scrollTop()+e.height(),d=l<r.top-a,h=c>r.bottom+a,u={left:r.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f={top:0,left:0};(t.contains(document.body,p[0])||p[0].isConnected)&&(f=p.offset()),u.top-=f.top,u.left-=f.left,i||n||(o="below"),h||!d||i?!d&&h&&i&&(o="below"):o="above",("above"==o||i&&"below"!==o)&&(u.top=s.top-f.top-a),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(u)},i.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},i.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},i})),e.define("select2/dropdown/minimumResultsForSearch",[],(function(){function t(e){for(var i=0,n=0;n<e.length;n++){var o=e[n];o.children?i+=t(o.children):i++}return i}function e(t,e,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,i,n)}return e.prototype.showSearch=function(e,i){return!(t(i.data.results)<this.minimumResultsForSearch)&&e.call(this,i)},e})),e.define("select2/dropdown/selectOnClose",["../utils"],(function(t){function e(){}return e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("close",(function(t){n._handleSelectOnClose(t)}))},e.prototype._handleSelectOnClose=function(e,i){if(i&&null!=i.originalSelect2Event){var n=i.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var o=this.getHighlightedResults();if(!(o.length<1)){var r=t.GetData(o[0],"data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e})),e.define("select2/dropdown/closeOnSelect",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",(function(t){n._selectTriggered(t)})),e.on("unselect",(function(t){n._selectTriggered(t)}))},t.prototype._selectTriggered=function(t,e){var i=e.originalEvent;i&&(i.ctrlKey||i.metaKey)||this.trigger("close",{originalEvent:i,originalSelect2Event:e})},t})),e.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,i="Please delete "+e+" character";return 1!=e&&(i+="s"),i},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}})),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],(function(t,e,i,n,o,r,s,a,l,c,d,h,u,p,f,g,m,v,y,b,x,w,S,C,k,_,T,D,E){function A(){this.reset()}return A.prototype.apply=function(d){if(null==(d=t.extend(!0,{},this.defaults,d)).dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=p:d.dataAdapter=u,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,b)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null!=d.query){var h=e(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,h)}if(null!=d.initSelection){var E=e(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,E)}}if(null==d.resultsAdapter&&(d.resultsAdapter=i,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,C)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,S)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,T))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=x;else{var A=c.Decorate(x,w);d.dropdownAdapter=A}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,_)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,D)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var I=e(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,I)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,k)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=n,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var P=e(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,P)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}d.language=this._resolveLanguage(d.language),d.language.push("en");for(var M=[],L=0;L<d.language.length;L++){var R=d.language[L];-1===M.indexOf(R)&&M.push(R)}return d.language=M,d.translations=this._processTranslations(d.language,d.debug),d},A.prototype.reset=function(){function e(t){return t.replace(/[^\u0000-\u007E]/g,(function(t){return h[t]||t}))}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:{},matcher:function i(n,o){if(""===t.trim(n.term))return o;if(o.children&&o.children.length>0){for(var r=t.extend(!0,{},o),s=o.children.length-1;s>=0;s--)null==i(n,o.children[s])&&r.children.splice(s,1);return r.children.length>0?r:i(n,r)}var a=e(o.text).toUpperCase(),l=e(n.term).toUpperCase();return a.indexOf(l)>-1?o:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},A.prototype.applyFromElement=function(t,e){var i=t.language,n=this.defaults.language,o=e.prop("lang"),r=e.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(o),this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r));return t.language=s,t},A.prototype._resolveLanguage=function(e){if(!e)return[];if(t.isEmptyObject(e))return[];if(t.isPlainObject(e))return[e];var i;i=t.isArray(e)?e:[e];for(var n=[],o=0;o<i.length;o++)if(n.push(i[o]),"string"==typeof i[o]&&i[o].indexOf("-")>0){var r=i[o].split("-")[0];n.push(r)}return n},A.prototype._processTranslations=function(e,i){for(var n=new d,o=0;o<e.length;o++){var r=new d,s=e[o];if("string"==typeof s)try{r=d.loadPath(s)}catch(t){try{s=this.defaults.amdLanguageBase+s,r=d.loadPath(s)}catch(t){i&&window.console&&console.warn&&console.warn('Select2: The language file for "'+s+'" could not be automatically loaded. A fallback will be used instead.')}}else r=t.isPlainObject(s)?new d(s):s;n.extend(r)}return n},A.prototype.set=function(e,i){var n={};n[t.camelCase(e)]=i;var o=c._convertData(n);t.extend(!0,this.defaults,o)},new A})),e.define("select2/options",["require","jquery","./defaults","./utils"],(function(t,e,i,n){function o(e,o){if(this.options=e,null!=o&&this.fromElement(o),null!=o&&(this.options=i.applyFromElement(this.options,o)),this.options=i.apply(this.options),o&&o.is("input")){var r=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=n.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(t){var i=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),n.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),n.StoreData(t[0],"data",n.GetData(t[0],"select2Tags")),n.StoreData(t[0],"tags",!0)),n.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",n.GetData(t[0],"ajaxUrl")),n.StoreData(t[0],"ajax-Url",n.GetData(t[0],"ajaxUrl")));var o={};function r(t,e){return e.toUpperCase()}for(var s=0;s<t[0].attributes.length;s++){var a=t[0].attributes[s].name,l="data-";if(a.substr(0,5)==l){var c=a.substring(5),d=n.GetData(t[0],c);o[c.replace(/-([a-z])/g,r)]=d}}e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset&&(o=e.extend(!0,{},t[0].dataset,o));var h=e.extend(!0,{},n.GetData(t[0]),o);for(var u in h=n._convertData(h))e.inArray(u,i)>-1||(e.isPlainObject(this.options[u])?e.extend(this.options[u],h[u]):this.options[u]=h[u]);return this},o.prototype.get=function(t){return this.options[t]},o.prototype.set=function(t,e){this.options[t]=e},o})),e.define("select2/core",["jquery","./options","./utils","./keys"],(function(t,e,i,n){var o=function(t,n){null!=i.GetData(t[0],"select2")&&i.GetData(t[0],"select2").destroy(),this.$element=t,this.id=this._generateId(t),n=n||{},this.options=new e(n,t),o.__super__.constructor.call(this);var r=t.attr("tabindex")||0;i.StoreData(t[0],"old-tabindex",r),t.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(t,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var d=this.options.get("resultsAdapter");this.results=new d(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var h=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(t){h.trigger("selection:update",{data:t})})),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),i.StoreData(t[0],"select2",this),t.data("select2",this)};return i.Extend(o,i.Observable),o.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},o.prototype._resolveWidth=function(t,e){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var n=this._resolveWidth(t,"style");return null!=n?n:this._resolveWidth(t,"element")}if("element"==e){var o=t.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==e){var r=t.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(i);if(null!==c&&c.length>=1)return c[1]}return null}return"computedstyle"==e?window.getComputedStyle(t[0]).width:e},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",(function(){t.dataAdapter.current((function(e){t.trigger("selection:update",{data:e})}))})),this.$element.on("focus.select2",(function(e){t.trigger("focus",e)})),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e((function(e){t._syncA(),t._syncS(null,e)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",(function(e,i){t.trigger(e,i)}))},o.prototype._registerSelectionEvents=function(){var e=this,i=["toggle","focus"];this.selection.on("toggle",(function(){e.toggleDropdown()})),this.selection.on("focus",(function(t){e.focus(t)})),this.selection.on("*",(function(n,o){-1===t.inArray(n,i)&&e.trigger(n,o)}))},o.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",(function(e,i){t.trigger(e,i)}))},o.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",(function(e,i){t.trigger(e,i)}))},o.prototype._registerEvents=function(){var t=this;this.on("open",(function(){t.$container.addClass("select2-container--open")})),this.on("close",(function(){t.$container.removeClass("select2-container--open")})),this.on("enable",(function(){t.$container.removeClass("select2-container--disabled")})),this.on("disable",(function(){t.$container.addClass("select2-container--disabled")})),this.on("blur",(function(){t.$container.removeClass("select2-container--focus")})),this.on("query",(function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,(function(i){t.trigger("results:all",{data:i,query:e})}))})),this.on("query:append",(function(e){this.dataAdapter.query(e,(function(i){t.trigger("results:append",{data:i,query:e})}))})),this.on("keypress",(function(e){var i=e.which;t.isOpen()?i===n.ESC||i===n.TAB||i===n.UP&&e.altKey?(t.close(e),e.preventDefault()):i===n.ENTER?(t.trigger("results:select",{}),e.preventDefault()):i===n.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):i===n.UP?(t.trigger("results:previous",{}),e.preventDefault()):i===n.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(i===n.ENTER||i===n.SPACE||i===n.DOWN&&e.altKey)&&(t.open(),e.preventDefault())}))},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._isChangeMutation=function(e,i){var n=!1,o=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(i)if(i.addedNodes&&i.addedNodes.length>0)for(var r=0;r<i.addedNodes.length;r++)i.addedNodes[r].selected&&(n=!0);else i.removedNodes&&i.removedNodes.length>0?n=!0:t.isArray(i)&&t.each(i,(function(t,e){if(o._isChangeMutation(t,e))return n=!0,!1}));else n=!0;return n}},o.prototype._syncSubtree=function(t,e){var i=this._isChangeMutation(t,e),n=this;i&&this.dataAdapter.current((function(t){n.trigger("selection:update",{data:t})}))},o.prototype.trigger=function(t,e){var i=o.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===e&&(e={}),t in n){var r=n[t],s={prevented:!1,name:t,args:e};if(i.call(this,r,s),s.prevented)return void(e.prevented=!0)}i.call(this,t,e)},o.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},o.prototype.close=function(t){this.isOpen()&&this.trigger("close",{originalEvent:t})},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current((function(e){t=e})),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var i=e[0];t.isArray(i)&&(i=t.map(i,(function(t){return t.toString()}))),this.$element.val(i).trigger("input").trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",i.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),i.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),i.StoreData(e[0],"element",this.$element),e},o})),e.define("select2/compat/utils",["jquery"],(function(t){return{syncCssClasses:function(e,i,n){var o,r,s=[];(o=t.trim(e.attr("class")))&&t((o=""+o).split(/\s+/)).each((function(){0===this.indexOf("select2-")&&s.push(this)})),(o=t.trim(i.attr("class")))&&t((o=""+o).split(/\s+/)).each((function(){0!==this.indexOf("select2-")&&null!=(r=n(this))&&s.push(r)})),e.attr("class",s.join(" "))}}})),e.define("select2/compat/containerCss",["jquery","./utils"],(function(t,e){function i(t){return null}function n(){}return n.prototype.render=function(n){var o=n.call(this),r=this.options.get("containerCssClass")||"";t.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||i,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(t){var e=a(t);return null!=e?e+" "+t:t}}var l=this.options.get("containerCss")||{};return t.isFunction(l)&&(l=l(this.$element)),e.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},n})),e.define("select2/compat/dropdownCss",["jquery","./utils"],(function(t,e){function i(t){return null}function n(){}return n.prototype.render=function(n){var o=n.call(this),r=this.options.get("dropdownCssClass")||"";t.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||i,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(t){var e=a(t);return null!=e?e+" "+t:t}}var l=this.options.get("dropdownCss")||{};return t.isFunction(l)&&(l=l(this.$element)),e.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},n})),e.define("select2/compat/initSelection",["jquery"],(function(t){function e(t,e,i){i.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=i.get("initSelection"),this._isInitialized=!1,t.call(this,e,i)}return e.prototype.current=function(e,i){var n=this;this._isInitialized?e.call(this,i):this.initSelection.call(null,this.$element,(function(e){n._isInitialized=!0,t.isArray(e)||(e=[e]),i(e)}))},e})),e.define("select2/compat/inputData",["jquery","../utils"],(function(t,e){function i(t,e,i){this._currentData=[],this._valueSeparator=i.get("valueSeparator")||",","hidden"===e.prop("type")&&i.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),t.call(this,e,i)}return i.prototype.current=function(e,i){function n(e,i){var o=[];return e.selected||-1!==t.inArray(e.id,i)?(e.selected=!0,o.push(e)):e.selected=!1,e.children&&o.push.apply(o,n(e.children,i)),o}for(var o=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r];o.push.apply(o,n(s,this.$element.val().split(this._valueSeparator)))}i(o)},i.prototype.select=function(e,i){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+i.id,this.$element.val(n),this.$element.trigger("input").trigger("change")}else this.current((function(e){t.map(e,(function(t){t.selected=!1}))})),this.$element.val(i.id),this.$element.trigger("input").trigger("change")},i.prototype.unselect=function(t,e){var i=this;e.selected=!1,this.current((function(t){for(var n=[],o=0;o<t.length;o++){var r=t[o];e.id!=r.id&&n.push(r.id)}i.$element.val(n.join(i._valueSeparator)),i.$element.trigger("input").trigger("change")}))},i.prototype.query=function(t,e,i){for(var n=[],o=0;o<this._currentData.length;o++){var r=this._currentData[o],s=this.matches(e,r);null!==s&&n.push(s)}i({results:n})},i.prototype.addOptions=function(i,n){var o=t.map(n,(function(t){return e.GetData(t[0],"data")}));this._currentData.push.apply(this._currentData,o)},i})),e.define("select2/compat/matcher",["jquery"],(function(t){return function(e){return function(i,n){var o=t.extend(!0,{},n);if(null==i.term||""===t.trim(i.term))return o;if(n.children){for(var r=n.children.length-1;r>=0;r--){var s=n.children[r];e(i.term,s.text,s)||o.children.splice(r,1)}if(o.children.length>0)return o}return e(i.term,n.text,n)?o:null}}})),e.define("select2/compat/query",[],(function(){function t(t,e,i){i.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.callback=i,this.options.get("query").call(null,e)},t})),e.define("select2/dropdown/attachContainer",[],(function(){function t(t,e,i){t.call(this,e,i)}return t.prototype.position=function(t,e,i){i.find(".dropdown-wrapper").append(e),e.addClass("select2-dropdown--below"),i.addClass("select2-container--below")},t})),e.define("select2/dropdown/stopPropagation",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){t.call(this,e,i),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),(function(t){t.stopPropagation()}))},t})),e.define("select2/selection/stopPropagation",[],(function(){function t(){}return t.prototype.bind=function(t,e,i){t.call(this,e,i),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),(function(t){t.stopPropagation()}))},t})),i=function(t){var e,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(t.event.fixHooks)for(var s=n.length;s;)t.event.fixHooks[n[--s]]=t.event.mouseHooks;var a=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],l,!1);else this.onmousewheel=l;t.data(this,"mousewheel-line-height",a.getLineHeight(this)),t.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],l,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(n){var o=n||window.event,s=r.call(arguments,1),l=0,h=0,u=0,p=0,f=0,g=0;if((n=t.event.fix(o)).type="mousewheel","detail"in o&&(u=-1*o.detail),"wheelDelta"in o&&(u=o.wheelDelta),"wheelDeltaY"in o&&(u=o.wheelDeltaY),"wheelDeltaX"in o&&(h=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(h=-1*u,u=0),l=0===u?h:u,"deltaY"in o&&(l=u=-1*o.deltaY),"deltaX"in o&&(h=o.deltaX,0===u&&(l=-1*h)),0!==u||0!==h){if(1===o.deltaMode){var m=t.data(this,"mousewheel-line-height");l*=m,u*=m,h*=m}else if(2===o.deltaMode){var v=t.data(this,"mousewheel-page-height");l*=v,u*=v,h*=v}if(p=Math.max(Math.abs(u),Math.abs(h)),(!i||p<i)&&(i=p,d(o,p)&&(i/=40)),d(o,p)&&(l/=40,h/=40,u/=40),l=Math[l>=1?"floor":"ceil"](l/i),h=Math[h>=1?"floor":"ceil"](h/i),u=Math[u>=1?"floor":"ceil"](u/i),a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=n.clientX-y.left,g=n.clientY-y.top}return n.deltaX=h,n.deltaY=u,n.deltaFactor=i,n.offsetX=f,n.offsetY=g,n.deltaMode=0,s.unshift(n,l,h,u),e&&clearTimeout(e),e=setTimeout(c,200),(t.event.dispatch||t.event.handle).apply(this,s)}}function c(){i=null}function d(t,e){return a.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],i):"object"==typeof exports?module.exports=i:i(t),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function(t,e,i,n,o){if(null==t.fn.select2){var r=["open","close","destroy"];t.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each((function(){var n=t.extend(!0,{},e);new i(t(this),n)})),this;if("string"==typeof e){var n,s=Array.prototype.slice.call(arguments,1);return this.each((function(){var t=o.GetData(this,"select2");null==t&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),n=t[e].apply(t,s)})),t.inArray(e,r)>-1?this:n}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=n),i})),{define:e.define,require:e.require}}(),i=e.require("jquery.select2");return t.fn.select2.amd=e,i})),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i||(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i,e,e.document)}:window.DataTable=t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o,r,s,a,l=function(e,i){if(this instanceof l)return t(e).DataTable(i);i=e,this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new r(t?le(this[o.iApiIndex]):this)},this.fnAddData=function(e,i){var o=this.api(!0),r=Array.isArray(e)&&(Array.isArray(e[0])||t.isPlainObject(e[0]))?o.rows.add(e):o.row.add(e);return(i===n||i)&&o.draw(),r.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),i=e.settings()[0],o=i.oScroll;t===n||t?e.draw(!1):""===o.sX&&""===o.sY||Wt(i)},this.fnClearTable=function(t){var e=this.api(!0).clear();(t===n||t)&&e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,i){var o=this.api(!0),r=o.rows(t),s=r.settings()[0],a=s.aoData[r[0][0]];return r.remove(),e&&e.call(this,s,a),(i===n||i)&&o.draw(),a},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,i,o,r,s){var a=this.api(!0);null===e||e===n?a.search(t,i,o,s):a.column(e).search(t,i,o,s),a.draw()},this.fnGetData=function(t,e){var i=this.api(!0);if(t!==n){var o=t.nodeName?t.nodeName.toLowerCase():"";return e!==n||"td"==o||"th"==o?i.cell(t,e).data():i.row(t).data()||null}return i.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==n?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),i=t.nodeName.toUpperCase();if("TR"==i)return e.row(t).index();if("TD"==i||"TH"==i){var n=e.cell(t).index();return[n.row,n.columnVisible,n.column]}return null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,i){return this.api(!0).row(t).child(e,i).show().child()[0]},this.fnPageChange=function(t,e){var i=this.api(!0).page(t);(e===n||e)&&i.draw(!1)},this.fnSetColumnVis=function(t,e,i){var o=this.api(!0).column(t).visible(e);(i===n||i)&&o.columns.adjust().draw()},this.fnSettings=function(){return le(this[o.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,i){this.api(!0).order.listener(t,e,i)},this.fnUpdate=function(t,e,i,o,r){var s=this.api(!0);return i===n||null===i?s.row(e).data(t):s.cell(e,i).data(t),(r===n||r)&&s.columns.adjust(),(o===n||o)&&s.draw(),0},this.fnVersionCheck=o.fnVersionCheck;var s=this,a=i===n,c=this.length;for(var d in a&&(i={}),this.oApi=this.internal=o.internal,l.ext.internal)d&&(this[d]=Ve(d));return this.each((function(){var e,o=c>1?he({},i,!0):i,r=0,d=this.getAttribute("id"),h=!1,u=l.defaults,p=t(this);if("table"==this.nodeName.toLowerCase()){M(u),L(u.column),A(u,u,!0),A(u.column,u.column,!0),A(u,t.extend(o,p.data()),!0);var f=l.settings;for(r=0,e=f.length;r<e;r++){var g=f[r];if(g.nTable==this||g.nTHead&&g.nTHead.parentNode==this||g.nTFoot&&g.nTFoot.parentNode==this){var m=o.bRetrieve!==n?o.bRetrieve:u.bRetrieve,v=o.bDestroy!==n?o.bDestroy:u.bDestroy;if(a||m)return g.oInstance;if(v){g.oInstance.fnDestroy();break}return void ce(g,0,"Cannot reinitialise DataTable",3)}if(g.sTableId==this.id){f.splice(r,1);break}}null!==d&&""!==d||(d="DataTables_Table_"+l.ext._unique++,this.id=d);var y=t.extend(!0,{},l.models.oSettings,{sDestroyWidth:p[0].style.width,sInstance:d,sTableId:d});y.nTable=this,y.oApi=s.internal,y.oInit=o,f.push(y),y.oInstance=1===s.length?s:p.dataTable(),M(o),I(o.oLanguage),o.aLengthMenu&&!o.iDisplayLength&&(o.iDisplayLength=Array.isArray(o.aLengthMenu[0])?o.aLengthMenu[0][0]:o.aLengthMenu[0]),o=he(t.extend(!0,{},u),o),de(y.oFeatures,o,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),de(y,o,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),de(y.oScroll,o,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),de(y.oLanguage,o,"fnInfoCallback"),pe(y,"aoDrawCallback",o.fnDrawCallback,"user"),pe(y,"aoServerParams",o.fnServerParams,"user"),pe(y,"aoStateSaveParams",o.fnStateSaveParams,"user"),pe(y,"aoStateLoadParams",o.fnStateLoadParams,"user"),pe(y,"aoStateLoaded",o.fnStateLoaded,"user"),pe(y,"aoRowCallback",o.fnRowCallback,"user"),pe(y,"aoRowCreatedCallback",o.fnCreatedRow,"user"),pe(y,"aoHeaderCallback",o.fnHeaderCallback,"user"),pe(y,"aoFooterCallback",o.fnFooterCallback,"user"),pe(y,"aoInitComplete",o.fnInitComplete,"user"),pe(y,"aoPreDrawCallback",o.fnPreDrawCallback,"user"),y.rowIdFn=Q(o.rowId),R(y);var b=y.oClasses;if(t.extend(b,l.ext.classes,o.oClasses),p.addClass(b.sTable),y.iInitDisplayStart===n&&(y.iInitDisplayStart=o.iDisplayStart,y._iDisplayStart=o.iDisplayStart),null!==o.iDeferLoading){y.bDeferLoading=!0;var x=Array.isArray(o.iDeferLoading);y._iRecordsDisplay=x?o.iDeferLoading[0]:o.iDeferLoading,y._iRecordsTotal=x?o.iDeferLoading[1]:o.iDeferLoading}var w=y.oLanguage;t.extend(!0,w,o.oLanguage),w.sUrl?(t.ajax({dataType:"json",url:w.sUrl,success:function(e){A(u.oLanguage,e),I(e),t.extend(!0,w,e,y.oInit.oLanguage),fe(y,null,"i18n",[y]),Rt(y)},error:function(){Rt(y)}}),h=!0):fe(y,null,"i18n",[y]),null===o.asStripeClasses&&(y.asStripeClasses=[b.sStripeOdd,b.sStripeEven]);var S=y.asStripeClasses,C=p.children("tbody").find("tr").eq(0);-1!==t.inArray(!0,t.map(S,(function(t,e){return C.hasClass(t)})))&&(t("tbody tr",this).removeClass(S.join(" ")),y.asDestroyStripes=S.slice());var k,_=[],T=this.getElementsByTagName("thead");if(0!==T.length&&(ut(y.aoHeader,T[0]),_=pt(y)),null===o.aoColumns)for(k=[],r=0,e=_.length;r<e;r++)k.push(null);else k=o.aoColumns;for(r=0,e=k.length;r<e;r++)F(y,_?_[r]:null);if(Y(y,o.aoColumnDefs,k,(function(t,e){N(y,t,e)})),C.length){var D=function(t,e){return null!==t.getAttribute("data-"+e)?e:null};t(C[0]).children("th, td").each((function(t,e){var i=y.aoColumns[t];if(i.mData===t){var o=D(e,"sort")||D(e,"order"),r=D(e,"filter")||D(e,"search");null===o&&null===r||(i.mData={_:t+".display",sort:null!==o?t+".@data-"+o:n,type:null!==o?t+".@data-"+o:n,filter:null!==r?t+".@data-"+r:n},N(y,t))}}))}var E=y.oFeatures,P=function(){if(o.aaSorting===n){var i=y.aaSorting;for(r=0,e=i.length;r<e;r++)i[r][1]=y.aoColumns[r].asSorting[0]}ne(y),E.bSort&&pe(y,"aoDrawCallback",(function(){if(y.bSorted){var e=Qt(y),i={};t.each(e,(function(t,e){i[e.src]=e.dir})),fe(y,null,"order",[y,e,i]),te(y)}})),pe(y,"aoDrawCallback",(function(){(y.bSorted||"ssp"===ve(y)||E.bDeferRender)&&ne(y)}),"sc");var s=p.children("caption").each((function(){this._captionSide=t(this).css("caption-side")})),a=p.children("thead");0===a.length&&(a=t("<thead/>").appendTo(p)),y.nTHead=a[0];var l=p.children("tbody");0===l.length&&(l=t("<tbody/>").insertAfter(a)),y.nTBody=l[0];var c=p.children("tfoot");if(0===c.length&&s.length>0&&(""!==y.oScroll.sX||""!==y.oScroll.sY)&&(c=t("<tfoot/>").appendTo(p)),0===c.length||0===c.children().length?p.addClass(b.sNoFooter):c.length>0&&(y.nTFoot=c[0],ut(y.aoFooter,y.nTFoot)),o.aaData)for(r=0;r<o.aaData.length;r++)X(y,o.aaData[r]);else(y.bDeferLoading||"dom"==ve(y))&&V(y,t(y.nTBody).children("tr"));y.aiDisplay=y.aiDisplayMaster.slice(),y.bInitialised=!0,!1===h&&Rt(y)};pe(y,"aoDrawCallback",re,"state_save"),o.bStateSave?(E.bStateSave=!0,se(y,o,P)):P()}else ce(null,0,"Non-table node initialisation ("+this.nodeName+")",2)})),s=null,this},c={},d=/[\r\n\u2028]/g,h=/<.*?>/g,u=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,p=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),f=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,g=function(t){return!t||!0===t||"-"===t},m=function(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null},v=function(t,e){return c[e]||(c[e]=new RegExp(_t(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(c[e],"."):t},y=function(t,e,i){var n="string"==typeof t;return!!g(t)||(e&&n&&(t=v(t,e)),i&&n&&(t=t.replace(f,"")),!isNaN(parseFloat(t))&&isFinite(t))},b=function(t,e,i){if(g(t))return!0;var n=function(t){return g(t)||"string"==typeof t}(t);return n&&!!y(k(t),e,i)||null},x=function(t,e,i){var o=[],r=0,s=t.length;if(i!==n)for(;r<s;r++)t[r]&&t[r][e]&&o.push(t[r][e][i]);else for(;r<s;r++)t[r]&&o.push(t[r][e]);return o},w=function(t,e,i,o){var r=[],s=0,a=e.length;if(o!==n)for(;s<a;s++)t[e[s]][i]&&r.push(t[e[s]][i][o]);else for(;s<a;s++)r.push(t[e[s]][i]);return r},S=function(t,e){var i,o=[];e===n?(e=0,i=t):(i=e,e=t);for(var r=e;r<i;r++)o.push(r);return o},C=function(t){for(var e=[],i=0,n=t.length;i<n;i++)t[i]&&e.push(t[i]);return e},k=function(t){return t.replace(h,"")},_=function(t){if(function(t){if(t.length<2)return!0;for(var e=t.slice().sort(),i=e[0],n=1,o=e.length;n<o;n++){if(e[n]===i)return!1;i=e[n]}return!0}(t))return t.slice();var e,i,n,o=[],r=t.length,s=0;t:for(i=0;i<r;i++){for(e=t[i],n=0;n<s;n++)if(o[n]===e)continue t;o.push(e),s++}return o},T=function(t,e){if(Array.isArray(e))for(var i=0;i<e.length;i++)T(t,e[i]);else t.push(e);return t},D=function(t,e){return e===n&&(e=0),-1!==this.indexOf(t,e)};function E(e){var i,n,o={};t.each(e,(function(t,r){(i=t.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(i[1]+" ")&&(n=t.replace(i[0],i[2].toLowerCase()),o[n]=t,"o"===i[1]&&E(e[t]))})),e._hungarianMap=o}function A(e,i,o){var r;e._hungarianMap||E(e),t.each(i,(function(s,a){(r=e._hungarianMap[s])===n||!o&&i[r]!==n||("o"===r.charAt(0)?(i[r]||(i[r]={}),t.extend(!0,i[r],i[s]),A(e[r],i[r],o)):i[r]=i[s])}))}function I(t){var e=l.defaults.oLanguage,i=e.sDecimal;if(i&&Fe(i),t){var n=t.sZeroRecords;!t.sEmptyTable&&n&&"No data available in table"===e.sEmptyTable&&de(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&n&&"Loading..."===e.sLoadingRecords&&de(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sInfoThousands);var o=t.sDecimal;o&&i!==o&&Fe(o)}}Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.includes||(Array.prototype.includes=D),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),String.prototype.includes||(String.prototype.includes=D),l.util={throttle:function(t,e){var i,o,r=e!==n?e:200;return function(){var e=this,s=+new Date,a=arguments;i&&s<i+r?(clearTimeout(o),o=setTimeout((function(){i=n,t.apply(e,a)}),r)):(i=s,t.apply(e,a))}},escapeRegex:function(t){return t.replace(p,"\\$1")},set:function(e){if(t.isPlainObject(e))return l.util.set(e._);if(null===e)return function(){};if("function"==typeof e)return function(t,i,n){e(t,"set",i,n)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,i){t[e]=i};var i=function(t,e,o){for(var r,s,a,l,c,d=K(o),h=d[d.length-1],u=0,p=d.length-1;u<p;u++){if("__proto__"===d[u]||"constructor"===d[u])throw new Error("Cannot set prototype values");if(s=d[u].match(G),a=d[u].match(Z),s){if(d[u]=d[u].replace(G,""),t[d[u]]=[],(r=d.slice()).splice(0,u+1),c=r.join("."),Array.isArray(e))for(var f=0,g=e.length;f<g;f++)i(l={},e[f],c),t[d[u]].push(l);else t[d[u]]=e;return}a&&(d[u]=d[u].replace(Z,""),t=t[d[u]](e)),null!==t[d[u]]&&t[d[u]]!==n||(t[d[u]]={}),t=t[d[u]]}h.match(Z)?t=t[h.replace(Z,"")](e):t[h.replace(G,"")]=e};return function(t,n){return i(t,n,e)}},get:function(e){if(t.isPlainObject(e)){var i={};return t.each(e,(function(t,e){e&&(i[t]=l.util.get(e))})),function(t,e,o,r){var s=i[e]||i._;return s!==n?s(t,e,o,r):t}}if(null===e)return function(t){return t};if("function"==typeof e)return function(t,i,n,o){return e(t,i,n,o)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,i){return t[e]};var o=function(t,e,i){var r,s,a,l;if(""!==i)for(var c=K(i),d=0,h=c.length;d<h;d++){if(r=c[d].match(G),s=c[d].match(Z),r){if(c[d]=c[d].replace(G,""),""!==c[d]&&(t=t[c[d]]),a=[],c.splice(0,d+1),l=c.join("."),Array.isArray(t))for(var u=0,p=t.length;u<p;u++)a.push(o(t[u],e,l));var f=r[0].substring(1,r[0].length-1);t=""===f?a:a.join(f);break}if(s)c[d]=c[d].replace(Z,""),t=t[c[d]]();else{if(null===t||t[c[d]]===n)return n;t=t[c[d]]}}return t};return function(t,i){return o(t,i,e)}}};var P=function(t,e,i){t[e]!==n&&(t[i]=t[e])};function M(t){P(t,"ordering","bSort"),P(t,"orderMulti","bSortMulti"),P(t,"orderClasses","bSortClasses"),P(t,"orderCellsTop","bSortCellsTop"),P(t,"order","aaSorting"),P(t,"orderFixed","aaSortingFixed"),P(t,"paging","bPaginate"),P(t,"pagingType","sPaginationType"),P(t,"pageLength","iDisplayLength"),P(t,"searching","bFilter"),"boolean"==typeof t.sScrollX&&(t.sScrollX=t.sScrollX?"100%":""),"boolean"==typeof t.scrollX&&(t.scrollX=t.scrollX?"100%":"");var e=t.aoSearchCols;if(e)for(var i=0,n=e.length;i<n;i++)e[i]&&A(l.models.oSearch,e[i])}function L(t){P(t,"orderable","bSortable"),P(t,"orderData","aDataSort"),P(t,"orderSequence","asSorting"),P(t,"orderDataType","sortDataType");var e=t.aDataSort;"number"!=typeof e||Array.isArray(e)||(t.aDataSort=[e])}function R(i){if(!l.__browser){var n={};l.__browser=n;var o=t("<div/>").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("<div/>").css({width:"100%",height:10}))).appendTo("body"),r=o.children(),s=r.children();n.barWidth=r[0].offsetWidth-r[0].clientWidth,n.bScrollOversize=100===s[0].offsetWidth&&100!==r[0].clientWidth,n.bScrollbarLeft=1!==Math.round(s.offset().left),n.bBounding=!!o[0].getBoundingClientRect().width,o.remove()}t.extend(i.oBrowser,l.__browser),i.oScroll.iBarWidth=l.__browser.barWidth}function O(t,e,i,o,r,s){var a,l=o,c=!1;for(i!==n&&(a=i,c=!0);l!==r;)t.hasOwnProperty(l)&&(a=c?e(a,t[l],l,t):t[l],c=!0,l+=s);return a}function F(e,n){var o=l.defaults.column,r=e.aoColumns.length,s=t.extend({},l.models.oColumn,o,{nTh:n||i.createElement("th"),sTitle:o.sTitle?o.sTitle:n?n.innerHTML:"",aDataSort:o.aDataSort?o.aDataSort:[r],mData:o.mData?o.mData:r,idx:r});e.aoColumns.push(s);var a=e.aoPreSearchCols;a[r]=t.extend({},l.models.oSearch,a[r]),N(e,r,t(n).data())}function N(e,i,o){var r=e.aoColumns[i],s=e.oClasses,a=t(r.nTh);if(!r.sWidthOrig){r.sWidthOrig=a.attr("width")||null;var c=(a.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(r.sWidthOrig=c[1])}if(o!==n&&null!==o){L(o),A(l.defaults.column,o,!0),o.mDataProp===n||o.mData||(o.mData=o.mDataProp),o.sType&&(r._sManualType=o.sType),o.className&&!o.sClass&&(o.sClass=o.className),o.sClass&&a.addClass(o.sClass);var d=r.sClass;t.extend(r,o),de(r,o,"sWidth","sWidthOrig"),d!==r.sClass&&(r.sClass=d+" "+r.sClass),o.iDataSort!==n&&(r.aDataSort=[o.iDataSort]),de(r,o,"aDataSort")}var h=r.mData,u=Q(h),p=r.mRender?Q(r.mRender):null,f=function(t){return"string"==typeof t&&-1!==t.indexOf("@")};r._bAttrSrc=t.isPlainObject(h)&&(f(h.sort)||f(h.type)||f(h.filter)),r._setter=null,r.fnGetData=function(t,e,i){var o=u(t,e,n,i);return p&&e?p(o,e,t,i):o},r.fnSetData=function(t,e,i){return J(h)(t,e,i)},"number"!=typeof h&&(e._rowReadObject=!0),e.oFeatures.bSort||(r.bSortable=!1,a.addClass(s.sSortableNone));var g=-1!==t.inArray("asc",r.asSorting),m=-1!==t.inArray("desc",r.asSorting);r.bSortable&&(g||m)?g&&!m?(r.sSortingClass=s.sSortableAsc,r.sSortingClassJUI=s.sSortJUIAscAllowed):!g&&m?(r.sSortingClass=s.sSortableDesc,r.sSortingClassJUI=s.sSortJUIDescAllowed):(r.sSortingClass=s.sSortable,r.sSortingClassJUI=s.sSortJUI):(r.sSortingClass=s.sSortableNone,r.sSortingClassJUI="")}function H(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;Vt(t);for(var i=0,n=e.length;i<n;i++)e[i].nTh.style.width=e[i].sWidth}var o=t.oScroll;""===o.sY&&""===o.sX||Wt(t),fe(t,null,"column-sizing",[t])}function z(t,e){var i=j(t,"bVisible");return"number"==typeof i[e]?i[e]:null}function B(e,i){var n=j(e,"bVisible"),o=t.inArray(i,n);return-1!==o?o:null}function $(e){var i=0;return t.each(e.aoColumns,(function(e,n){n.bVisible&&"none"!==t(n.nTh).css("display")&&i++})),i}function j(e,i){var n=[];return t.map(e.aoColumns,(function(t,e){t[i]&&n.push(e)})),n}function W(t){var e,i,o,r,s,a,c,d,h,u=t.aoColumns,p=t.aoData,f=l.ext.type.detect;for(e=0,i=u.length;e<i;e++)if(h=[],!(c=u[e]).sType&&c._sManualType)c.sType=c._sManualType;else if(!c.sType){for(o=0,r=f.length;o<r;o++){for(s=0,a=p.length;s<a&&(h[s]===n&&(h[s]=q(t,s,e,"type")),(d=f[o](h[s],t))||o===f.length-1)&&("html"!==d||g(h[s]));s++);if(d){c.sType=d;break}}c.sType||(c.sType="string")}}function Y(e,i,o,r){var s,a,l,c,d,h,u,p=e.aoColumns;if(i)for(s=i.length-1;s>=0;s--){var f=(u=i[s]).target!==n?u.target:u.targets!==n?u.targets:u.aTargets;for(Array.isArray(f)||(f=[f]),l=0,c=f.length;l<c;l++)if("number"==typeof f[l]&&f[l]>=0){for(;p.length<=f[l];)F(e);r(f[l],u)}else if("number"==typeof f[l]&&f[l]<0)r(p.length+f[l],u);else if("string"==typeof f[l])for(d=0,h=p.length;d<h;d++)("_all"==f[l]||t(p[d].nTh).hasClass(f[l]))&&r(d,u)}if(o)for(s=0,a=o.length;s<a;s++)r(s,o[s])}function X(e,i,o,r){var s=e.aoData.length,a=t.extend(!0,{},l.models.oRow,{src:o?"dom":"data",idx:s});a._aData=i,e.aoData.push(a);for(var c=e.aoColumns,d=0,h=c.length;d<h;d++)c[d].sType=null;e.aiDisplayMaster.push(s);var u=e.rowIdFn(i);return u!==n&&(e.aIds[u]=a),!o&&e.oFeatures.bDeferRender||rt(e,s,o,r),s}function V(e,i){var n;return i instanceof t||(i=t(i)),i.map((function(t,i){return n=ot(e,i),X(e,n.data,i,n.cells)}))}function q(t,e,i,o){"search"===o?o="filter":"order"===o&&(o="sort");var r=t.iDraw,s=t.aoColumns[i],a=t.aoData[e]._aData,c=s.sDefaultContent,d=s.fnGetData(a,o,{settings:t,row:e,col:i});if(d===n)return t.iDrawError!=r&&null===c&&(ce(t,0,"Requested unknown parameter "+("function"==typeof s.mData?"{function}":"'"+s.mData+"'")+" for row "+e+", column "+i,4),t.iDrawError=r),c;if(d!==a&&null!==d||null===c||o===n){if("function"==typeof d)return d.call(a)}else d=c;if(null===d&&"display"===o)return"";if("filter"===o){var h=l.ext.type.search;h[s.sType]&&(d=h[s.sType](d))}return d}function U(t,e,i,n){var o=t.aoColumns[i],r=t.aoData[e]._aData;o.fnSetData(r,n,{settings:t,row:e,col:i})}var G=/\[.*?\]$/,Z=/\(\)$/;function K(e){return t.map(e.match(/(\\.|[^\.])+/g)||[""],(function(t){return t.replace(/\\\./g,".")}))}var Q=l.util.get,J=l.util.set;function tt(t){return x(t.aoData,"_aData")}function et(t){t.aoData.length=0,t.aiDisplayMaster.length=0,t.aiDisplay.length=0,t.aIds={}}function it(t,e,i){for(var o=-1,r=0,s=t.length;r<s;r++)t[r]==e?o=r:t[r]>e&&t[r]--;-1!=o&&i===n&&t.splice(o,1)}function nt(t,e,i,o){var r,s,a=t.aoData[e],l=function(i,n){for(;i.childNodes.length;)i.removeChild(i.firstChild);i.innerHTML=q(t,e,n,"display")};if("dom"!==i&&(i&&"auto"!==i||"dom"!==a.src)){var c=a.anCells;if(c)if(o!==n)l(c[o],o);else for(r=0,s=c.length;r<s;r++)l(c[r],r)}else a._aData=ot(t,a,o,o===n?n:a._aData).data;a._aSortData=null,a._aFilterData=null;var d=t.aoColumns;if(o!==n)d[o].sType=null;else{for(r=0,s=d.length;r<s;r++)d[r].sType=null;st(t,a)}}function ot(t,e,i,o){var r,s,a,l=[],c=e.firstChild,d=0,h=t.aoColumns,u=t._rowReadObject;o=o!==n?o:u?{}:[];var p=function(t,e){if("string"==typeof t){var i=t.indexOf("@");if(-1!==i){var n=t.substring(i+1);J(t)(o,e.getAttribute(n))}}},f=function(t){i!==n&&i!==d||(s=h[d],a=t.innerHTML.trim(),s&&s._bAttrSrc?(J(s.mData._)(o,a),p(s.mData.sort,t),p(s.mData.type,t),p(s.mData.filter,t)):u?(s._setter||(s._setter=J(s.mData)),s._setter(o,a)):o[d]=a),d++};if(c)for(;c;)"TD"!=(r=c.nodeName.toUpperCase())&&"TH"!=r||(f(c),l.push(c)),c=c.nextSibling;else for(var g=0,m=(l=e.anCells).length;g<m;g++)f(l[g]);var v=e.firstChild?e:e.nTr;if(v){var y=v.getAttribute("id");y&&J(t.rowId)(o,y)}return{data:o,cells:l}}function rt(e,n,o,r){var s,a,l,c,d,h,u=e.aoData[n],p=u._aData,f=[];if(null===u.nTr){for(s=o||i.createElement("tr"),u.nTr=s,u.anCells=f,s._DT_RowIndex=n,st(e,u),c=0,d=e.aoColumns.length;c<d;c++)l=e.aoColumns[c],(a=(h=!o)?i.createElement(l.sCellType):r[c])._DT_CellIndex={row:n,column:c},f.push(a),!h&&(!l.mRender&&l.mData===c||t.isPlainObject(l.mData)&&l.mData._===c+".display")||(a.innerHTML=q(e,n,c,"display")),l.sClass&&(a.className+=" "+l.sClass),l.bVisible&&!o?s.appendChild(a):!l.bVisible&&o&&a.parentNode.removeChild(a),l.fnCreatedCell&&l.fnCreatedCell.call(e.oInstance,a,q(e,n,c),p,n,c);fe(e,"aoRowCreatedCallback",null,[s,p,n,f])}}function st(e,i){var n=i.nTr,o=i._aData;if(n){var r=e.rowIdFn(o);if(r&&(n.id=r),o.DT_RowClass){var s=o.DT_RowClass.split(" ");i.__rowc=i.__rowc?_(i.__rowc.concat(s)):s,t(n).removeClass(i.__rowc.join(" ")).addClass(o.DT_RowClass)}o.DT_RowAttr&&t(n).attr(o.DT_RowAttr),o.DT_RowData&&t(n).data(o.DT_RowData)}}function at(e){var i,n,o,r,s,a=e.nTHead,l=e.nTFoot,c=0===t("th, td",a).length,d=e.oClasses,h=e.aoColumns;for(c&&(r=t("<tr/>").appendTo(a)),i=0,n=h.length;i<n;i++)s=h[i],o=t(s.nTh).addClass(s.sClass),c&&o.appendTo(r),e.oFeatures.bSort&&(o.addClass(s.sSortingClass),!1!==s.bSortable&&(o.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),ie(e,s.nTh,i))),s.sTitle!=o[0].innerHTML&&o.html(s.sTitle),me(e,"header")(e,o,s,d);if(c&&ut(e.aoHeader,a),t(a).children("tr").children("th, td").addClass(d.sHeaderTH),t(l).children("tr").children("th, td").addClass(d.sFooterTH),null!==l){var u=e.aoFooter[0];for(i=0,n=u.length;i<n;i++)(s=h[i]).nTf=u[i].cell,s.sClass&&t(s.nTf).addClass(s.sClass)}}function lt(e,i,o){var r,s,a,l,c,d,h,u,p,f=[],g=[],m=e.aoColumns.length;if(i){for(o===n&&(o=!1),r=0,s=i.length;r<s;r++){for(f[r]=i[r].slice(),f[r].nTr=i[r].nTr,a=m-1;a>=0;a--)e.aoColumns[a].bVisible||o||f[r].splice(a,1);g.push([])}for(r=0,s=f.length;r<s;r++){if(h=f[r].nTr)for(;d=h.firstChild;)h.removeChild(d);for(a=0,l=f[r].length;a<l;a++)if(u=1,p=1,g[r][a]===n){for(h.appendChild(f[r][a].cell),g[r][a]=1;f[r+u]!==n&&f[r][a].cell==f[r+u][a].cell;)g[r+u][a]=1,u++;for(;f[r][a+p]!==n&&f[r][a].cell==f[r][a+p].cell;){for(c=0;c<u;c++)g[r+c][a+p]=1;p++}t(f[r][a].cell).attr("rowspan",u).attr("colspan",p)}}}}function ct(e,i){!function(t){var e="ssp"==ve(t),i=t.iInitDisplayStart;i!==n&&-1!==i&&(t._iDisplayStart=e?i:i>=t.fnRecordsDisplay()?0:i,t.iInitDisplayStart=-1)}(e);var o=fe(e,"aoPreDrawCallback","preDraw",[e]);if(-1===t.inArray(!1,o)){var r=[],s=0,a=e.asStripeClasses,l=a.length,c=e.oLanguage,d="ssp"==ve(e),h=e.aiDisplay,u=e._iDisplayStart,p=e.fnDisplayEnd();if(e.bDrawing=!0,e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,$t(e,!1);else if(d){if(!e.bDestroying&&!i)return void gt(e)}else e.iDraw++;if(0!==h.length)for(var f=d?0:u,g=d?e.aoData.length:p,m=f;m<g;m++){var v=h[m],y=e.aoData[v];null===y.nTr&&rt(e,v);var b=y.nTr;if(0!==l){var x=a[s%l];y._sRowStripe!=x&&(t(b).removeClass(y._sRowStripe).addClass(x),y._sRowStripe=x)}fe(e,"aoRowCallback",null,[b,y._aData,s,m,v]),r.push(b),s++}else{var w=c.sZeroRecords;1==e.iDraw&&"ajax"==ve(e)?w=c.sLoadingRecords:c.sEmptyTable&&0===e.fnRecordsTotal()&&(w=c.sEmptyTable),r[0]=t("<tr/>",{class:l?a[0]:""}).append(t("<td />",{valign:"top",colSpan:$(e),class:e.oClasses.sRowEmpty}).html(w))[0]}fe(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],tt(e),u,p,h]),fe(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],tt(e),u,p,h]);var S=t(e.nTBody);S.children().detach(),S.append(t(r)),fe(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}else $t(e,!1)}function dt(t,e){var i=t.oFeatures,n=i.bSort,o=i.bFilter;n&&Jt(t),o?xt(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,ct(t),t._drawHold=!1}function ht(e){var i=e.oClasses,n=t(e.nTable),o=t("<div/>").insertBefore(n),r=e.oFeatures,s=t("<div/>",{id:e.sTableId+"_wrapper",class:i.sWrapper+(e.nTFoot?"":" "+i.sNoFooter)});e.nHolding=o[0],e.nTableWrapper=s[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var a,c,d,h,u,p,f=e.sDom.split(""),g=0;g<f.length;g++){if(a=null,"<"==(c=f[g])){if(d=t("<div/>")[0],"'"==(h=f[g+1])||'"'==h){for(u="",p=2;f[g+p]!=h;)u+=f[g+p],p++;if("H"==u?u=i.sJUIHeader:"F"==u&&(u=i.sJUIFooter),-1!=u.indexOf(".")){var m=u.split(".");d.id=m[0].substr(1,m[0].length-1),d.className=m[1]}else"#"==u.charAt(0)?d.id=u.substr(1,u.length-1):d.className=u;g+=p}s.append(d),s=t(d)}else if(">"==c)s=s.parent();else if("l"==c&&r.bPaginate&&r.bLengthChange)a=Nt(e);else if("f"==c&&r.bFilter)a=bt(e);else if("r"==c&&r.bProcessing)a=Bt(e);else if("t"==c)a=jt(e);else if("i"==c&&r.bInfo)a=Pt(e);else if("p"==c&&r.bPaginate)a=Ht(e);else if(0!==l.ext.feature.length)for(var v=l.ext.feature,y=0,b=v.length;y<b;y++)if(c==v[y].cFeature){a=v[y].fnInit(e);break}if(a){var x=e.aanFeatures;x[c]||(x[c]=[]),x[c].push(a),s.append(a)}}o.replaceWith(s),e.nHolding=null}function ut(e,i){var n,o,r,s,a,l,c,d,h,u,p=t(i).children("tr"),f=function(t,e,i){for(var n=t[e];n[i];)i++;return i};for(e.splice(0,e.length),r=0,l=p.length;r<l;r++)e.push([]);for(r=0,l=p.length;r<l;r++)for(o=(n=p[r]).firstChild;o;){if("TD"==o.nodeName.toUpperCase()||"TH"==o.nodeName.toUpperCase())for(d=(d=1*o.getAttribute("colspan"))&&0!==d&&1!==d?d:1,h=(h=1*o.getAttribute("rowspan"))&&0!==h&&1!==h?h:1,c=f(e,r,0),u=1===d,a=0;a<d;a++)for(s=0;s<h;s++)e[r+s][c+a]={cell:o,unique:u},e[r+s].nTr=n;o=o.nextSibling}}function pt(t,e,i){var n=[];i||(i=t.aoHeader,e&&ut(i=[],e));for(var o=0,r=i.length;o<r;o++)for(var s=0,a=i[o].length;s<a;s++)!i[o][s].unique||n[s]&&t.bSortCellsTop||(n[s]=i[o][s].cell);return n}function ft(e,i,n){if(fe(e,"aoServerParams","serverParams",[i]),i&&Array.isArray(i)){var o={},r=/(.*?)\[\]$/;t.each(i,(function(t,e){var i=e.name.match(r);if(i){var n=i[0];o[n]||(o[n]=[]),o[n].push(e.value)}else o[e.name]=e.value})),i=o}var s,a=e.ajax,l=e.oInstance,c=function(t){var i=e.jqXHR?e.jqXHR.status:null;(null===t||"number"==typeof i&&204==i)&&yt(e,t={},[]);var o=t.error||t.sError;o&&ce(e,0,o),e.json=t,fe(e,null,"xhr",[e,t,e.jqXHR]),n(t)};if(t.isPlainObject(a)&&a.data){var d="function"==typeof(s=a.data)?s(i,e):s;i="function"==typeof s&&d?d:t.extend(!0,i,d),delete a.data}var h={data:i,success:c,dataType:"json",cache:!1,type:e.sServerMethod,error:function(i,n,o){var r=fe(e,null,"xhr",[e,null,e.jqXHR]);-1===t.inArray(!0,r)&&("parsererror"==n?ce(e,0,"Invalid JSON response",1):4===i.readyState&&ce(e,0,"Ajax error",7)),$t(e,!1)}};e.oAjaxData=i,fe(e,null,"preXhr",[e,i]),e.fnServerData?e.fnServerData.call(l,e.sAjaxSource,t.map(i,(function(t,e){return{name:e,value:t}})),c,e):e.sAjaxSource||"string"==typeof a?e.jqXHR=t.ajax(t.extend(h,{url:a||e.sAjaxSource})):"function"==typeof a?e.jqXHR=a.call(l,i,c,e):(e.jqXHR=t.ajax(t.extend(h,a)),a.data=s)}function gt(t){t.iDraw++,$t(t,!0),ft(t,mt(t),(function(e){vt(t,e)}))}function mt(e){var i,n,o,r,s=e.aoColumns,a=s.length,c=e.oFeatures,d=e.oPreviousSearch,h=e.aoPreSearchCols,u=[],p=Qt(e),f=e._iDisplayStart,g=!1!==c.bPaginate?e._iDisplayLength:-1,m=function(t,e){u.push({name:t,value:e})};m("sEcho",e.iDraw),m("iColumns",a),m("sColumns",x(s,"sName").join(",")),m("iDisplayStart",f),m("iDisplayLength",g);var v={draw:e.iDraw,columns:[],order:[],start:f,length:g,search:{value:d.sSearch,regex:d.bRegex}};for(i=0;i<a;i++)o=s[i],r=h[i],n="function"==typeof o.mData?"function":o.mData,v.columns.push({data:n,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:r.sSearch,regex:r.bRegex}}),m("mDataProp_"+i,n),c.bFilter&&(m("sSearch_"+i,r.sSearch),m("bRegex_"+i,r.bRegex),m("bSearchable_"+i,o.bSearchable)),c.bSort&&m("bSortable_"+i,o.bSortable);c.bFilter&&(m("sSearch",d.sSearch),m("bRegex",d.bRegex)),c.bSort&&(t.each(p,(function(t,e){v.order.push({column:e.col,dir:e.dir}),m("iSortCol_"+t,e.col),m("sSortDir_"+t,e.dir)})),m("iSortingCols",p.length));var y=l.ext.legacy.ajax;return null===y?e.sAjaxSource?u:v:y?u:v}function vt(t,e){var i=function(t,i){return e[t]!==n?e[t]:e[i]},o=yt(t,e),r=i("sEcho","draw"),s=i("iTotalRecords","recordsTotal"),a=i("iTotalDisplayRecords","recordsFiltered");if(r!==n){if(1*r<t.iDraw)return;t.iDraw=1*r}o||(o=[]),et(t),t._iRecordsTotal=parseInt(s,10),t._iRecordsDisplay=parseInt(a,10);for(var l=0,c=o.length;l<c;l++)X(t,o[l]);t.aiDisplay=t.aiDisplayMaster.slice(),ct(t,!0),t._bInitComplete||Ot(t,e),$t(t,!1)}function yt(e,i,o){var r=t.isPlainObject(e.ajax)&&e.ajax.dataSrc!==n?e.ajax.dataSrc:e.sAjaxDataProp;if(!o)return"data"===r?i.aaData||i[r]:""!==r?Q(r)(i):i;J(r)(i,o)}function bt(e){var n=e.oClasses,o=e.sTableId,r=e.oLanguage,s=e.oPreviousSearch,a=e.aanFeatures,l='<input type="search" class="'+n.sFilterInput+'"/>',c=r.sSearch;c=c.match(/_INPUT_/)?c.replace("_INPUT_",l):c+l;var d=t("<div/>",{id:a.f?null:o+"_filter",class:n.sFilter}).append(t("<label/>").append(c)),h=function(t){a.f;var i=this.value?this.value:"";s.return&&"Enter"!==t.key||i!=s.sSearch&&(xt(e,{sSearch:i,bRegex:s.bRegex,bSmart:s.bSmart,bCaseInsensitive:s.bCaseInsensitive,return:s.return}),e._iDisplayStart=0,ct(e))},u=null!==e.searchDelay?e.searchDelay:"ssp"===ve(e)?400:0,p=t("input",d).val(s.sSearch).attr("placeholder",r.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",u?qt(h,u):h).on("mouseup",(function(t){setTimeout((function(){h.call(p[0],t)}),10)})).on("keypress.DT",(function(t){if(13==t.keyCode)return!1})).attr("aria-controls",o);return t(e.nTable).on("search.dt.DT",(function(t,n){if(e===n)try{p[0]!==i.activeElement&&p.val(s.sSearch)}catch(t){}})),d[0]}function xt(t,e,i){var o=t.oPreviousSearch,r=t.aoPreSearchCols,s=function(t){o.sSearch=t.sSearch,o.bRegex=t.bRegex,o.bSmart=t.bSmart,o.bCaseInsensitive=t.bCaseInsensitive,o.return=t.return},a=function(t){return t.bEscapeRegex!==n?!t.bEscapeRegex:t.bRegex};if(W(t),"ssp"!=ve(t)){Ct(t,e.sSearch,i,a(e),e.bSmart,e.bCaseInsensitive,e.return),s(e);for(var l=0;l<r.length;l++)St(t,r[l].sSearch,l,a(r[l]),r[l].bSmart,r[l].bCaseInsensitive);wt(t)}else s(e);t.bFiltered=!0,fe(t,null,"search",[t])}function wt(e){for(var i,n,o=l.ext.search,r=e.aiDisplay,s=0,a=o.length;s<a;s++){for(var c=[],d=0,h=r.length;d<h;d++)n=r[d],i=e.aoData[n],o[s](e,i._aFilterData,n,i._aData,d)&&c.push(n);r.length=0,t.merge(r,c)}}function St(t,e,i,n,o,r){if(""!==e){for(var s,a=[],l=t.aiDisplay,c=kt(e,n,o,r),d=0;d<l.length;d++)s=t.aoData[l[d]]._aFilterData[i],c.test(s)&&a.push(l[d]);t.aiDisplay=a}}function Ct(t,e,i,n,o,r){var s,a,c,d=kt(e,n,o,r),h=t.oPreviousSearch.sSearch,u=t.aiDisplayMaster,p=[];if(0!==l.ext.search.length&&(i=!0),a=Et(t),e.length<=0)t.aiDisplay=u.slice();else{for((a||i||n||h.length>e.length||0!==e.indexOf(h)||t.bSorted)&&(t.aiDisplay=u.slice()),s=t.aiDisplay,c=0;c<s.length;c++)d.test(t.aoData[s[c]]._sFilterRow)&&p.push(s[c]);t.aiDisplay=p}}function kt(e,i,n,o){if(e=i?e:_t(e),n){var r=t.map(e.match(/"[^"]+"|[^ ]+/g)||[""],(function(t){if('"'===t.charAt(0)){var e=t.match(/^"(.*)"$/);t=e?e[1]:t}return t.replace('"',"")}));e="^(?=.*?"+r.join(")(?=.*?")+").*$"}return new RegExp(e,o?"i":"")}var _t=l.util.escapeRegex,Tt=t("<div>")[0],Dt=Tt.textContent!==n;function Et(t){var e,i,n,o,r,s,a,l=t.aoColumns,c=!1;for(e=0,n=t.aoData.length;e<n;e++)if(!(a=t.aoData[e])._aFilterData){for(r=[],i=0,o=l.length;i<o;i++)l[i].bSearchable?(null===(s=q(t,e,i,"filter"))&&(s=""),"string"!=typeof s&&s.toString&&(s=s.toString())):s="",s.indexOf&&-1!==s.indexOf("&")&&(Tt.innerHTML=s,s=Dt?Tt.textContent:Tt.innerText),s.replace&&(s=s.replace(/[\r\n\u2028]/g,"")),r.push(s);a._aFilterData=r,a._sFilterRow=r.join("  "),c=!0}return c}function At(t){return{search:t.sSearch,smart:t.bSmart,regex:t.bRegex,caseInsensitive:t.bCaseInsensitive}}function It(t){return{sSearch:t.search,bSmart:t.smart,bRegex:t.regex,bCaseInsensitive:t.caseInsensitive}}function Pt(e){var i=e.sTableId,n=e.aanFeatures.i,o=t("<div/>",{class:e.oClasses.sInfo,id:n?null:i+"_info"});return n||(e.aoDrawCallback.push({fn:Mt,sName:"information"}),o.attr("role","status").attr("aria-live","polite"),t(e.nTable).attr("aria-describedby",i+"_info")),o[0]}function Mt(e){var i=e.aanFeatures.i;if(0!==i.length){var n=e.oLanguage,o=e._iDisplayStart+1,r=e.fnDisplayEnd(),s=e.fnRecordsTotal(),a=e.fnRecordsDisplay(),l=a?n.sInfo:n.sInfoEmpty;a!==s&&(l+=" "+n.sInfoFiltered),l=Lt(e,l+=n.sInfoPostFix);var c=n.fnInfoCallback;null!==c&&(l=c.call(e.oInstance,e,o,r,s,a,l)),t(i).html(l)}}function Lt(t,e){var i=t.fnFormatNumber,n=t._iDisplayStart+1,o=t._iDisplayLength,r=t.fnRecordsDisplay(),s=-1===o;return e.replace(/_START_/g,i.call(t,n)).replace(/_END_/g,i.call(t,t.fnDisplayEnd())).replace(/_MAX_/g,i.call(t,t.fnRecordsTotal())).replace(/_TOTAL_/g,i.call(t,r)).replace(/_PAGE_/g,i.call(t,s?1:Math.ceil(n/o))).replace(/_PAGES_/g,i.call(t,s?1:Math.ceil(r/o)))}function Rt(t){var e,i,n,o=t.iInitDisplayStart,r=t.aoColumns,s=t.oFeatures,a=t.bDeferLoading;if(t.bInitialised){for(ht(t),at(t),lt(t,t.aoHeader),lt(t,t.aoFooter),$t(t,!0),s.bAutoWidth&&Vt(t),e=0,i=r.length;e<i;e++)(n=r[e]).sWidth&&(n.nTh.style.width=Kt(n.sWidth));fe(t,null,"preInit",[t]),dt(t);var l=ve(t);("ssp"!=l||a)&&("ajax"==l?ft(t,[],(function(i){var n=yt(t,i);for(e=0;e<n.length;e++)X(t,n[e]);t.iInitDisplayStart=o,dt(t),$t(t,!1),Ot(t,i)})):($t(t,!1),Ot(t)))}else setTimeout((function(){Rt(t)}),200)}function Ot(t,e){t._bInitComplete=!0,(e||t.oInit.aaData)&&H(t),fe(t,null,"plugin-init",[t,e]),fe(t,"aoInitComplete","init",[t,e])}function Ft(t,e){var i=parseInt(e,10);t._iDisplayLength=i,ge(t),fe(t,null,"length",[t,i])}function Nt(e){for(var i=e.oClasses,n=e.sTableId,o=e.aLengthMenu,r=Array.isArray(o[0]),s=r?o[0]:o,a=r?o[1]:o,l=t("<select/>",{name:n+"_length","aria-controls":n,class:i.sLengthSelect}),c=0,d=s.length;c<d;c++)l[0][c]=new Option("number"==typeof a[c]?e.fnFormatNumber(a[c]):a[c],s[c]);var h=t("<div><label/></div>").addClass(i.sLength);return e.aanFeatures.l||(h[0].id=n+"_length"),h.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),t("select",h).val(e._iDisplayLength).on("change.DT",(function(i){Ft(e,t(this).val()),ct(e)})),t(e.nTable).on("length.dt.DT",(function(i,n,o){e===n&&t("select",h).val(o)})),h[0]}function Ht(e){var i=e.sPaginationType,n=l.ext.pager[i],o="function"==typeof n,r=function(t){ct(t)},s=t("<div/>").addClass(e.oClasses.sPaging+i)[0],a=e.aanFeatures;return o||n.fnInit(e,s,r),a.p||(s.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(o){var e,i,s=t._iDisplayStart,l=t._iDisplayLength,c=t.fnRecordsDisplay(),d=-1===l,h=d?0:Math.ceil(s/l),u=d?1:Math.ceil(c/l),p=n(h,u);for(e=0,i=a.p.length;e<i;e++)me(t,"pageButton")(t,a.p[e],e,p,h,u)}else n.fnUpdate(t,r)},sName:"pagination"})),s}function zt(t,e,i){var n=t._iDisplayStart,o=t._iDisplayLength,r=t.fnRecordsDisplay();0===r||-1===o?n=0:"number"==typeof e?(n=e*o)>r&&(n=0):"first"==e?n=0:"previous"==e?(n=o>=0?n-o:0)<0&&(n=0):"next"==e?n+o<r&&(n+=o):"last"==e?n=Math.floor((r-1)/o)*o:ce(t,0,"Unknown paging action: "+e,5);var s=t._iDisplayStart!==n;return t._iDisplayStart=n,s&&(fe(t,null,"page",[t]),i&&ct(t)),s}function Bt(e){return t("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).append("<div><div></div><div></div><div></div><div></div></div>").insertBefore(e.nTable)[0]}function $t(e,i){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",i?"block":"none"),fe(e,null,"processing",[e,i])}function jt(e){var i=t(e.nTable),n=e.oScroll;if(""===n.sX&&""===n.sY)return e.nTable;var o=n.sX,r=n.sY,s=e.oClasses,a=i.children("caption"),l=a.length?a[0]._captionSide:null,c=t(i[0].cloneNode(!1)),d=t(i[0].cloneNode(!1)),h=i.children("tfoot"),u="<div/>",p=function(t){return t?Kt(t):null};h.length||(h=null);var f=t(u,{class:s.sScrollWrapper}).append(t(u,{class:s.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:o?p(o):"100%"}).append(t(u,{class:s.sScrollHeadInner}).css({"box-sizing":"content-box",width:n.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===l?a:null).append(i.children("thead"))))).append(t(u,{class:s.sScrollBody}).css({position:"relative",overflow:"auto",width:p(o)}).append(i));h&&f.append(t(u,{class:s.sScrollFoot}).css({overflow:"hidden",border:0,width:o?p(o):"100%"}).append(t(u,{class:s.sScrollFootInner}).append(d.removeAttr("id").css("margin-left",0).append("bottom"===l?a:null).append(i.children("tfoot")))));var g=f.children(),m=g[0],v=g[1],y=h?g[2]:null;return o&&t(v).on("scroll.DT",(function(t){var e=this.scrollLeft;m.scrollLeft=e,h&&(y.scrollLeft=e)})),t(v).css("max-height",r),n.bCollapse||t(v).css("height",r),e.nScrollHead=m,e.nScrollBody=v,e.nScrollFoot=y,e.aoDrawCallback.push({fn:Wt,sName:"scrolling"}),f[0]}function Wt(i){var o,r,s,a,l,c,d,h,u,p=i.oScroll,f=p.sX,g=p.sXInner,m=p.sY,v=p.iBarWidth,y=t(i.nScrollHead),b=y[0].style,w=y.children("div"),S=w[0].style,C=w.children("table"),k=i.nScrollBody,_=t(k),T=k.style,D=t(i.nScrollFoot).children("div"),E=D.children("table"),A=t(i.nTHead),I=t(i.nTable),P=I[0],M=P.style,L=i.nTFoot?t(i.nTFoot):null,R=i.oBrowser,O=R.bScrollOversize,F=(x(i.aoColumns,"nTh"),[]),N=[],B=[],$=[],j=function(t){var e=t.style;e.paddingTop="0",e.paddingBottom="0",e.borderTopWidth="0",e.borderBottomWidth="0",e.height=0},W=k.scrollHeight>k.clientHeight;if(i.scrollBarVis!==W&&i.scrollBarVis!==n)return i.scrollBarVis=W,void H(i);i.scrollBarVis=W,I.children("thead, tfoot").remove(),L&&(c=L.clone().prependTo(I),r=L.find("tr"),a=c.find("tr"),c.find("[id]").removeAttr("id")),l=A.clone().prependTo(I),o=A.find("tr"),s=l.find("tr"),l.find("th, td").removeAttr("tabindex"),l.find("[id]").removeAttr("id"),f||(T.width="100%",y[0].style.width="100%"),t.each(pt(i,l),(function(t,e){d=z(i,t),e.style.width=i.aoColumns[d].sWidth})),L&&Yt((function(t){t.style.width=""}),a),u=I.outerWidth(),""===f?(M.width="100%",O&&(I.find("tbody").height()>k.offsetHeight||"scroll"==_.css("overflow-y"))&&(M.width=Kt(I.outerWidth()-v)),u=I.outerWidth()):""!==g&&(M.width=Kt(g),u=I.outerWidth()),Yt(j,s),Yt((function(i){var n=e.getComputedStyle?e.getComputedStyle(i).width:Kt(t(i).width());B.push(i.innerHTML),F.push(n)}),s),Yt((function(t,e){t.style.width=F[e]}),o),t(s).css("height",0),L&&(Yt(j,a),Yt((function(e){$.push(e.innerHTML),N.push(Kt(t(e).css("width")))}),a),Yt((function(t,e){t.style.width=N[e]}),r),t(a).height(0)),Yt((function(t,e){t.innerHTML='<div class="dataTables_sizing">'+B[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=F[e]}),s),L&&Yt((function(t,e){t.innerHTML='<div class="dataTables_sizing">'+$[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=N[e]}),a),Math.round(I.outerWidth())<Math.round(u)?(h=k.scrollHeight>k.offsetHeight||"scroll"==_.css("overflow-y")?u+v:u,O&&(k.scrollHeight>k.offsetHeight||"scroll"==_.css("overflow-y"))&&(M.width=Kt(h-v)),""!==f&&""===g||ce(i,1,"Possible column misalignment",6)):h="100%",T.width=Kt(h),b.width=Kt(h),L&&(i.nScrollFoot.style.width=Kt(h)),m||O&&(T.height=Kt(P.offsetHeight+v));var Y=I.outerWidth();C[0].style.width=Kt(Y),S.width=Kt(Y);var X=I.height()>k.clientHeight||"scroll"==_.css("overflow-y"),V="padding"+(R.bScrollbarLeft?"Left":"Right");S[V]=X?v+"px":"0px",L&&(E[0].style.width=Kt(Y),D[0].style.width=Kt(Y),D[0].style[V]=X?v+"px":"0px"),I.children("colgroup").insertBefore(I.children("thead")),_.trigger("scroll"),!i.bSorted&&!i.bFiltered||i._drawHold||(k.scrollTop=0)}function Yt(t,e,i){for(var n,o,r=0,s=0,a=e.length;s<a;){for(n=e[s].firstChild,o=i?i[s].firstChild:null;n;)1===n.nodeType&&(i?t(n,o,r):t(n,r),r++),n=n.nextSibling,o=i?o.nextSibling:null;s++}}var Xt=/<.*?>/g;function Vt(i){var n,o,r,s=i.nTable,a=i.aoColumns,l=i.oScroll,c=l.sY,d=l.sX,h=l.sXInner,u=a.length,p=j(i,"bVisible"),f=t("th",i.nTHead),g=s.getAttribute("width"),m=s.parentNode,v=!1,y=i.oBrowser,b=y.bScrollOversize,x=s.style.width;for(x&&-1!==x.indexOf("%")&&(g=x),n=0;n<p.length;n++)null!==(o=a[p[n]]).sWidth&&(o.sWidth=Ut(o.sWidthOrig,m),v=!0);if(b||!v&&!d&&!c&&u==$(i)&&u==f.length)for(n=0;n<u;n++){var w=z(i,n);null!==w&&(a[w].sWidth=Kt(f.eq(n).width()))}else{var S=t(s).clone().css("visibility","hidden").removeAttr("id");S.find("tbody tr").remove();var C=t("<tr/>").appendTo(S.find("tbody"));for(S.find("thead, tfoot").remove(),S.append(t(i.nTHead).clone()).append(t(i.nTFoot).clone()),S.find("tfoot th, tfoot td").css("width",""),f=pt(i,S.find("thead")[0]),n=0;n<p.length;n++)o=a[p[n]],f[n].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?Kt(o.sWidthOrig):"",o.sWidthOrig&&d&&t(f[n]).append(t("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(i.aoData.length)for(n=0;n<p.length;n++)o=a[r=p[n]],t(Gt(i,r)).clone(!1).append(o.sContentPadding).appendTo(C);t("[name]",S).removeAttr("name");var k=t("<div/>").css(d||c?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(S).appendTo(m);d&&h?S.width(h):d?(S.css("width","auto"),S.removeAttr("width"),S.width()<m.clientWidth&&g&&S.width(m.clientWidth)):c?S.width(m.clientWidth):g&&S.width(g);var _=0;for(n=0;n<p.length;n++){var T=t(f[n]),D=T.outerWidth()-T.width(),E=y.bBounding?Math.ceil(f[n].getBoundingClientRect().width):T.outerWidth();_+=E,a[p[n]].sWidth=Kt(E-D)}s.style.width=Kt(_),k.remove()}if(g&&(s.style.width=Kt(g)),(g||d)&&!i._reszEvt){var A=function(){t(e).on("resize.DT-"+i.sInstance,qt((function(){H(i)})))};b?setTimeout(A,1e3):A(),i._reszEvt=!0}}var qt=l.util.throttle;function Ut(e,n){if(!e)return 0;var o=t("<div/>").css("width",Kt(e)).appendTo(n||i.body),r=o[0].offsetWidth;return o.remove(),r}function Gt(e,i){var n=Zt(e,i);if(n<0)return null;var o=e.aoData[n];return o.nTr?o.anCells[i]:t("<td/>").html(q(e,n,i,"display"))[0]}function Zt(t,e){for(var i,n=-1,o=-1,r=0,s=t.aoData.length;r<s;r++)(i=(i=(i=q(t,r,e,"display")+"").replace(Xt,"")).replace(/&nbsp;/g," ")).length>n&&(n=i.length,o=r);return o}function Kt(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function Qt(e){var i,o,r,s,a,c,d,h=[],u=e.aoColumns,p=e.aaSortingFixed,f=t.isPlainObject(p),g=[],m=function(e){e.length&&!Array.isArray(e[0])?g.push(e):t.merge(g,e)};for(Array.isArray(p)&&m(p),f&&p.pre&&m(p.pre),m(e.aaSorting),f&&p.post&&m(p.post),i=0;i<g.length;i++)for(o=0,r=(s=u[d=g[i][0]].aDataSort).length;o<r;o++)c=u[a=s[o]].sType||"string",g[i]._idx===n&&(g[i]._idx=t.inArray(g[i][1],u[a].asSorting)),h.push({src:d,col:a,dir:g[i][1],index:g[i]._idx,type:c,formatter:l.ext.type.order[c+"-pre"]});return h}function Jt(t){var e,i,n,o,r,s=[],a=l.ext.type.order,c=t.aoData,d=(t.aoColumns,0),h=t.aiDisplayMaster;for(W(t),e=0,i=(r=Qt(t)).length;e<i;e++)(o=r[e]).formatter&&d++,oe(t,o.col);if("ssp"!=ve(t)&&0!==r.length){for(e=0,n=h.length;e<n;e++)s[h[e]]=e;d===r.length?h.sort((function(t,e){var i,n,o,a,l,d=r.length,h=c[t]._aSortData,u=c[e]._aSortData;for(o=0;o<d;o++)if(0!=(a=(i=h[(l=r[o]).col])<(n=u[l.col])?-1:i>n?1:0))return"asc"===l.dir?a:-a;return(i=s[t])<(n=s[e])?-1:i>n?1:0})):h.sort((function(t,e){var i,n,o,l,d,h=r.length,u=c[t]._aSortData,p=c[e]._aSortData;for(o=0;o<h;o++)if(i=u[(d=r[o]).col],n=p[d.col],0!==(l=(a[d.type+"-"+d.dir]||a["string-"+d.dir])(i,n)))return l;return(i=s[t])<(n=s[e])?-1:i>n?1:0}))}t.bSorted=!0}function te(t){for(var e,i,n=t.aoColumns,o=Qt(t),r=t.oLanguage.oAria,s=0,a=n.length;s<a;s++){var l=n[s],c=l.asSorting,d=l.ariaTitle||l.sTitle.replace(/<.*?>/g,""),h=l.nTh;h.removeAttribute("aria-sort"),l.bSortable?(o.length>0&&o[0].col==s?(h.setAttribute("aria-sort","asc"==o[0].dir?"ascending":"descending"),i=c[o[0].index+1]||c[0]):i=c[0],e=d+("asc"===i?r.sSortAscending:r.sSortDescending)):e=d,h.setAttribute("aria-label",e)}}function ee(e,i,o,r){var s,a=e.aoColumns[i],l=e.aaSorting,c=a.asSorting,d=function(e,i){var o=e._idx;return o===n&&(o=t.inArray(e[1],c)),o+1<c.length?o+1:i?null:0};if("number"==typeof l[0]&&(l=e.aaSorting=[l]),o&&e.oFeatures.bSortMulti){var h=t.inArray(i,x(l,"0"));-1!==h?(null===(s=d(l[h],!0))&&1===l.length&&(s=0),null===s?l.splice(h,1):(l[h][1]=c[s],l[h]._idx=s)):(l.push([i,c[0],0]),l[l.length-1]._idx=0)}else l.length&&l[0][0]==i?(s=d(l[0]),l.length=1,l[0][1]=c[s],l[0]._idx=s):(l.length=0,l.push([i,c[0]]),l[0]._idx=0);dt(e),"function"==typeof r&&r(e)}function ie(t,e,i,n){var o=t.aoColumns[i];ue(e,{},(function(e){!1!==o.bSortable&&(t.oFeatures.bProcessing?($t(t,!0),setTimeout((function(){ee(t,i,e.shiftKey,n),"ssp"!==ve(t)&&$t(t,!1)}),0)):ee(t,i,e.shiftKey,n))}))}function ne(e){var i,n,o,r=e.aLastSort,s=e.oClasses.sSortColumn,a=Qt(e),l=e.oFeatures;if(l.bSort&&l.bSortClasses){for(i=0,n=r.length;i<n;i++)o=r[i].src,t(x(e.aoData,"anCells",o)).removeClass(s+(i<2?i+1:3));for(i=0,n=a.length;i<n;i++)o=a[i].src,t(x(e.aoData,"anCells",o)).addClass(s+(i<2?i+1:3))}e.aLastSort=a}function oe(t,e){var i,n,o,r=t.aoColumns[e],s=l.ext.order[r.sSortDataType];s&&(i=s.call(t.oInstance,t,e,B(t,e)));for(var a=l.ext.type.order[r.sType+"-pre"],c=0,d=t.aoData.length;c<d;c++)(n=t.aoData[c])._aSortData||(n._aSortData=[]),n._aSortData[e]&&!s||(o=s?i[c]:q(t,c,e,"sort"),n._aSortData[e]=a?a(o):o)}function re(e){if(!e._bLoadingState){var i={time:+new Date,start:e._iDisplayStart,length:e._iDisplayLength,order:t.extend(!0,[],e.aaSorting),search:At(e.oPreviousSearch),columns:t.map(e.aoColumns,(function(t,i){return{visible:t.bVisible,search:At(e.aoPreSearchCols[i])}}))};e.oSavedState=i,fe(e,"aoStateSaveParams","stateSaveParams",[e,i]),e.oFeatures.bStateSave&&!e.bDestroying&&e.fnStateSaveCallback.call(e.oInstance,e,i)}}function se(t,e,i){if(t.oFeatures.bStateSave){var o=t.fnStateLoadCallback.call(t.oInstance,t,(function(e){ae(t,e,i)}));return o!==n&&ae(t,o,i),!0}i()}function ae(e,i,o){var r,s,a=e.aoColumns;e._bLoadingState=!0;var c=e._bInitComplete?new l.Api(e):null;if(!i||!i.time)return e._bLoadingState=!1,void o();var d=fe(e,"aoStateLoadParams","stateLoadParams",[e,i]);if(-1!==t.inArray(!1,d))return e._bLoadingState=!1,void o();var h=e.iStateDuration;if(h>0&&i.time<+new Date-1e3*h)return e._bLoadingState=!1,void o();if(i.columns&&a.length!==i.columns.length)return e._bLoadingState=!1,void o();if(e.oLoadedState=t.extend(!0,{},i),i.length!==n&&(c?c.page.len(i.length):e._iDisplayLength=i.length),i.start!==n&&(null===c?(e._iDisplayStart=i.start,e.iInitDisplayStart=i.start):zt(e,i.start/e._iDisplayLength)),i.order!==n&&(e.aaSorting=[],t.each(i.order,(function(t,i){e.aaSorting.push(i[0]>=a.length?[0,i[1]]:i)}))),i.search!==n&&t.extend(e.oPreviousSearch,It(i.search)),i.columns){for(r=0,s=i.columns.length;r<s;r++){var u=i.columns[r];u.visible!==n&&(c?c.column(r).visible(u.visible,!1):a[r].bVisible=u.visible),u.search!==n&&t.extend(e.aoPreSearchCols[r],It(u.search))}c&&c.columns.adjust()}e._bLoadingState=!1,fe(e,"aoStateLoaded","stateLoaded",[e,i]),o()}function le(e){var i=l.settings,n=t.inArray(e,x(i,"nTable"));return-1!==n?i[n]:null}function ce(t,i,n,o){if(n="DataTables warning: "+(t?"table id="+t.sTableId+" - ":"")+n,o&&(n+=". For more information about this error, please see http://datatables.net/tn/"+o),i)e.console&&console.log&&console.log(n);else{var r=l.ext,s=r.sErrMode||r.errMode;if(t&&fe(t,null,"error",[t,o,n]),"alert"==s)alert(n);else{if("throw"==s)throw new Error(n);"function"==typeof s&&s(t,o,n)}}}function de(e,i,o,r){Array.isArray(o)?t.each(o,(function(t,n){Array.isArray(n)?de(e,i,n[0],n[1]):de(e,i,n)})):(r===n&&(r=o),i[o]!==n&&(e[r]=i[o]))}function he(e,i,n){var o;for(var r in i)i.hasOwnProperty(r)&&(o=i[r],t.isPlainObject(o)?(t.isPlainObject(e[r])||(e[r]={}),t.extend(!0,e[r],o)):n&&"data"!==r&&"aaData"!==r&&Array.isArray(o)?e[r]=o.slice():e[r]=o);return e}function ue(e,i,n){t(e).on("click.DT",i,(function(i){t(e).trigger("blur"),n(i)})).on("keypress.DT",i,(function(t){13===t.which&&(t.preventDefault(),n(t))})).on("selectstart.DT",(function(){return!1}))}function pe(t,e,i,n){i&&t[e].push({fn:i,sName:n})}function fe(e,i,n,o){var r=[];if(i&&(r=t.map(e[i].slice().reverse(),(function(t,i){return t.fn.apply(e.oInstance,o)}))),null!==n){var s=t.Event(n+".dt");t(e.nTable).trigger(s,o),r.push(s.result)}return r}function ge(t){var e=t._iDisplayStart,i=t.fnDisplayEnd(),n=t._iDisplayLength;e>=i&&(e=i-n),e-=e%n,(-1===n||e<0)&&(e=0),t._iDisplayStart=e}function me(e,i){var n=e.renderer,o=l.ext.renderer[i];return t.isPlainObject(n)&&n[i]?o[n[i]]||o._:"string"==typeof n&&o[n]||o._}function ve(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}var ye=[],be=Array.prototype;r=function(e,i){if(!(this instanceof r))return new r(e,i);var n=[],o=function(e){var i=function(e){var i,n,o=l.settings,r=t.map(o,(function(t,e){return t.nTable}));return e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?-1!==(i=t.inArray(e,r))?[o[i]]:null:e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?n=t(e):e instanceof t&&(n=e),n?n.map((function(e){return-1!==(i=t.inArray(this,r))?o[i]:null})).toArray():void 0):[]}(e);i&&n.push.apply(n,i)};if(Array.isArray(e))for(var s=0,a=e.length;s<a;s++)o(e[s]);else o(e);this.context=_(n),i&&t.merge(this,i),this.selector={rows:null,cols:null,opts:null},r.extend(this,this,ye)},l.Api=r,t.extend(r.prototype,{any:function(){return 0!==this.count()},concat:be.concat,context:[],count:function(){return this.flatten().length},each:function(t){for(var e=0,i=this.length;e<i;e++)t.call(this,this[e],e,this);return this},eq:function(t){var e=this.context;return e.length>t?new r(e[t],this[t]):null},filter:function(t){var e=[];if(be.filter)e=be.filter.call(this,t,this);else for(var i=0,n=this.length;i<n;i++)t.call(this,this[i],i,this)&&e.push(this[i]);return new r(this.context,e)},flatten:function(){var t=[];return new r(this.context,t.concat.apply(t,this.toArray()))},join:be.join,indexOf:be.indexOf||function(t,e){for(var i=e||0,n=this.length;i<n;i++)if(this[i]===t)return i;return-1},iterator:function(t,e,i,o){var s,a,l,c,d,h,u,p,f=[],g=this.context,m=this.selector;for("string"==typeof t&&(o=i,i=e,e=t,t=!1),a=0,l=g.length;a<l;a++){var v=new r(g[a]);if("table"===e)(s=i.call(v,g[a],a))!==n&&f.push(s);else if("columns"===e||"rows"===e)(s=i.call(v,g[a],this[a],a))!==n&&f.push(s);else if("column"===e||"column-rows"===e||"row"===e||"cell"===e)for(u=this[a],"column-rows"===e&&(h=_e(g[a],m.opts)),c=0,d=u.length;c<d;c++)p=u[c],(s="cell"===e?i.call(v,g[a],p.row,p.column,a,c):i.call(v,g[a],p,a,c,h))!==n&&f.push(s)}if(f.length||o){var y=new r(g,t?f.concat.apply([],f):f),b=y.selector;return b.rows=m.rows,b.cols=m.cols,b.opts=m.opts,y}return this},lastIndexOf:be.lastIndexOf||function(t,e){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(t){var e=[];if(be.map)e=be.map.call(this,t,this);else for(var i=0,n=this.length;i<n;i++)e.push(t.call(this,this[i],i));return new r(this.context,e)},pluck:function(t){let e=l.util.get(t);return this.map((function(t){return e(t)}))},pop:be.pop,push:be.push,reduce:be.reduce||function(t,e){return O(this,t,e,0,this.length,1)},reduceRight:be.reduceRight||function(t,e){return O(this,t,e,this.length-1,-1,-1)},reverse:be.reverse,selector:null,shift:be.shift,slice:function(){return new r(this.context,this)},sort:be.sort,splice:be.splice,toArray:function(){return be.slice.call(this)},to$:function(){return t(this)},toJQuery:function(){return t(this)},unique:function(){return new r(this.context,_(this))},unshift:be.unshift}),r.extend=function(t,e,i){if(i.length&&e&&(e instanceof r||e.__dt_wrapper)){var n,o,s,a=function(t,e,i){return function(){var n=e.apply(t,arguments);return r.extend(n,n,i.methodExt),n}};for(n=0,o=i.length;n<o;n++)e[(s=i[n]).name]="function"===s.type?a(t,s.val,s):"object"===s.type?{}:s.val,e[s.name].__dt_wrapper=!0,r.extend(t,e[s.name],s.propExt)}},r.register=s=function(e,i){if(Array.isArray(e))for(var n=0,o=e.length;n<o;n++)r.register(e[n],i);else{var s,a,l,c,d=e.split("."),h=ye,u=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i].name===e)return t[i];return null};for(s=0,a=d.length;s<a;s++){var p=u(h,l=(c=-1!==d[s].indexOf("()"))?d[s].replace("()",""):d[s]);p||(p={name:l,val:{},methodExt:[],propExt:[],type:"object"},h.push(p)),s===a-1?(p.val=i,p.type="function"==typeof i?"function":t.isPlainObject(i)?"object":"other"):h=c?p.methodExt:p.propExt}}},r.registerPlural=a=function(t,e,i){r.register(t,i),r.register(e,(function(){var t=i.apply(this,arguments);return t===this?this:t instanceof r?t.length?Array.isArray(t[0])?new r(t.context,t[0]):t[0]:n:t}))};var xe=function(e,i){if(Array.isArray(e))return t.map(e,(function(t){return xe(t,i)}));if("number"==typeof e)return[i[e]];var n=t.map(i,(function(t,e){return t.nTable}));return t(n).filter(e).map((function(e){var o=t.inArray(this,n);return i[o]})).toArray()};s("tables()",(function(t){return t!==n&&null!==t?new r(xe(t,this.context)):this})),s("table()",(function(t){var e=this.tables(t),i=e.context;return i.length?new r(i[0]):e})),a("tables().nodes()","table().node()",(function(){return this.iterator("table",(function(t){return t.nTable}),1)})),a("tables().body()","table().body()",(function(){return this.iterator("table",(function(t){return t.nTBody}),1)})),a("tables().header()","table().header()",(function(){return this.iterator("table",(function(t){return t.nTHead}),1)})),a("tables().footer()","table().footer()",(function(){return this.iterator("table",(function(t){return t.nTFoot}),1)})),a("tables().containers()","table().container()",(function(){return this.iterator("table",(function(t){return t.nTableWrapper}),1)})),s("draw()",(function(t){return this.iterator("table",(function(e){"page"===t?ct(e):("string"==typeof t&&(t="full-hold"!==t),dt(e,!1===t))}))})),s("page()",(function(t){return t===n?this.page.info().page:this.iterator("table",(function(e){zt(e,t)}))})),s("page.info()",(function(t){if(0===this.context.length)return n;var e=this.context[0],i=e._iDisplayStart,o=e.oFeatures.bPaginate?e._iDisplayLength:-1,r=e.fnRecordsDisplay(),s=-1===o;return{page:s?0:Math.floor(i/o),pages:s?1:Math.ceil(r/o),start:i,end:e.fnDisplayEnd(),length:o,recordsTotal:e.fnRecordsTotal(),recordsDisplay:r,serverSide:"ssp"===ve(e)}})),s("page.len()",(function(t){return t===n?0!==this.context.length?this.context[0]._iDisplayLength:n:this.iterator("table",(function(e){Ft(e,t)}))}));var we=function(t,e,i){if(i){var n=new r(t);n.one("draw",(function(){i(n.ajax.json())}))}if("ssp"==ve(t))dt(t,e);else{$t(t,!0);var o=t.jqXHR;o&&4!==o.readyState&&o.abort(),ft(t,[],(function(i){et(t);for(var n=yt(t,i),o=0,r=n.length;o<r;o++)X(t,n[o]);dt(t,e),$t(t,!1)}))}};s("ajax.json()",(function(){var t=this.context;if(t.length>0)return t[0].json})),s("ajax.params()",(function(){var t=this.context;if(t.length>0)return t[0].oAjaxData})),s("ajax.reload()",(function(t,e){return this.iterator("table",(function(i){we(i,!1===e,t)}))})),s("ajax.url()",(function(e){var i=this.context;return e===n?0===i.length?n:(i=i[0]).ajax?t.isPlainObject(i.ajax)?i.ajax.url:i.ajax:i.sAjaxSource:this.iterator("table",(function(i){t.isPlainObject(i.ajax)?i.ajax.url=e:i.ajax=e}))})),s("ajax.url().load()",(function(t,e){return this.iterator("table",(function(i){we(i,!1===e,t)}))}));var Se=function(t,e,i,r,s){var a,l,c,d,h,u,p=[],f=typeof e;for(e&&"string"!==f&&"function"!==f&&e.length!==n||(e=[e]),c=0,d=e.length;c<d;c++)for(h=0,u=(l=e[c]&&e[c].split&&!e[c].match(/[\[\(:]/)?e[c].split(","):[e[c]]).length;h<u;h++)(a=i("string"==typeof l[h]?l[h].trim():l[h]))&&a.length&&(p=p.concat(a));var g=o.selector[t];if(g.length)for(c=0,d=g.length;c<d;c++)p=g[c](r,s,p);return _(p)},Ce=function(e){return e||(e={}),e.filter&&e.search===n&&(e.search=e.filter),t.extend({search:"none",order:"current",page:"all"},e)},ke=function(t){for(var e=0,i=t.length;e<i;e++)if(t[e].length>0)return t[0]=t[e],t[0].length=1,t.length=1,t.context=[t.context[e]],t;return t.length=0,t},_e=function(e,i){var n,o=[],r=e.aiDisplay,s=e.aiDisplayMaster,a=i.search,l=i.order,c=i.page;if("ssp"==ve(e))return"removed"===a?[]:S(0,s.length);if("current"==c)for(h=e._iDisplayStart,u=e.fnDisplayEnd();h<u;h++)o.push(r[h]);else if("current"==l||"applied"==l){if("none"==a)o=s.slice();else if("applied"==a)o=r.slice();else if("removed"==a){for(var d={},h=0,u=r.length;h<u;h++)d[r[h]]=null;o=t.map(s,(function(t){return d.hasOwnProperty(t)?null:t}))}}else if("index"==l||"original"==l)for(h=0,u=e.aoData.length;h<u;h++)("none"==a||-1===(n=t.inArray(h,r))&&"removed"==a||n>=0&&"applied"==a)&&o.push(h);return o};s("rows()",(function(e,i){e===n?e="":t.isPlainObject(e)&&(i=e,e=""),i=Ce(i);var o=this.iterator("table",(function(o){return function(e,i,o){var r;return Se("row",i,(function(i){var s=m(i),a=e.aoData;if(null!==s&&!o)return[s];if(r||(r=_e(e,o)),null!==s&&-1!==t.inArray(s,r))return[s];if(null===i||i===n||""===i)return r;if("function"==typeof i)return t.map(r,(function(t){var e=a[t];return i(t,e._aData,e.nTr)?t:null}));if(i.nodeName){var l=i._DT_RowIndex,c=i._DT_CellIndex;if(l!==n)return a[l]&&a[l].nTr===i?[l]:[];if(c)return a[c.row]&&a[c.row].nTr===i.parentNode?[c.row]:[];var d=t(i).closest("*[data-dt-row]");return d.length?[d.data("dt-row")]:[]}if("string"==typeof i&&"#"===i.charAt(0)){var h=e.aIds[i.replace(/^#/,"")];if(h!==n)return[h.idx]}var u=C(w(e.aoData,r,"nTr"));return t(u).filter(i).map((function(){return this._DT_RowIndex})).toArray()}),e,o)}(o,e,i)}),1);return o.selector.rows=e,o.selector.opts=i,o})),s("rows().nodes()",(function(){return this.iterator("row",(function(t,e){return t.aoData[e].nTr||n}),1)})),s("rows().data()",(function(){return this.iterator(!0,"rows",(function(t,e){return w(t.aoData,e,"_aData")}),1)})),a("rows().cache()","row().cache()",(function(t){return this.iterator("row",(function(e,i){var n=e.aoData[i];return"search"===t?n._aFilterData:n._aSortData}),1)})),a("rows().invalidate()","row().invalidate()",(function(t){return this.iterator("row",(function(e,i){nt(e,i,t)}))})),a("rows().indexes()","row().index()",(function(){return this.iterator("row",(function(t,e){return e}),1)})),a("rows().ids()","row().id()",(function(t){for(var e=[],i=this.context,n=0,o=i.length;n<o;n++)for(var s=0,a=this[n].length;s<a;s++){var l=i[n].rowIdFn(i[n].aoData[this[n][s]]._aData);e.push((!0===t?"#":"")+l)}return new r(i,e)})),a("rows().remove()","row().remove()",(function(){var t=this;return this.iterator("row",(function(e,i,o){var r,s,a,l,c,d,h=e.aoData,u=h[i];for(h.splice(i,1),r=0,s=h.length;r<s;r++)if(d=(c=h[r]).anCells,null!==c.nTr&&(c.nTr._DT_RowIndex=r),null!==d)for(a=0,l=d.length;a<l;a++)d[a]._DT_CellIndex.row=r;it(e.aiDisplayMaster,i),it(e.aiDisplay,i),it(t[o],i,!1),e._iRecordsDisplay>0&&e._iRecordsDisplay--,ge(e);var p=e.rowIdFn(u._aData);p!==n&&delete e.aIds[p]})),this.iterator("table",(function(t){for(var e=0,i=t.aoData.length;e<i;e++)t.aoData[e].idx=e})),this})),s("rows.add()",(function(e){var i=this.iterator("table",(function(t){var i,n,o,r=[];for(n=0,o=e.length;n<o;n++)(i=e[n]).nodeName&&"TR"===i.nodeName.toUpperCase()?r.push(V(t,i)[0]):r.push(X(t,i));return r}),1),n=this.rows(-1);return n.pop(),t.merge(n,i),n})),s("row()",(function(t,e){return ke(this.rows(t,e))})),s("row().data()",(function(t){var e=this.context;if(t===n)return e.length&&this.length?e[0].aoData[this[0]]._aData:n;var i=e[0].aoData[this[0]];return i._aData=t,Array.isArray(t)&&i.nTr&&i.nTr.id&&J(e[0].rowId)(t,i.nTr.id),nt(e[0],this[0],"data"),this})),s("row().node()",(function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]].nTr||null})),s("row.add()",(function(e){e instanceof t&&e.length&&(e=e[0]);var i=this.iterator("table",(function(t){return e.nodeName&&"TR"===e.nodeName.toUpperCase()?V(t,e)[0]:X(t,e)}));return this.row(i[0])})),t(i).on("plugin-init.dt",(function(e,i){var n=new r(i);n.on("stateSaveParams",(function(t,e,i){for(var n=e.rowIdFn,o=e.aoData,r=[],s=0;s<o.length;s++)o[s]._detailsShow&&r.push("#"+n(o[s]._aData));i.childRows=r}));var o=n.state.loaded();o&&o.childRows&&n.rows(t.map(o.childRows,(function(t){return t.replace(/:/g,"\\:")}))).every((function(){fe(i,null,"requestChild",[this])}))}));var Te=l.util.throttle((function(t){re(t[0])}),500),De=function(e,i){var o=e.context;if(o.length){var r=o[0].aoData[i!==n?i:e[0]];r&&r._details&&(r._details.remove(),r._detailsShow=n,r._details=n,t(r.nTr).removeClass("dt-hasChild"),Te(o))}},Ee=function(e,i){var n=e.context;if(n.length&&e.length){var o=n[0].aoData[e[0]];o._details&&(o._detailsShow=i,i?(o._details.insertAfter(o.nTr),t(o.nTr).addClass("dt-hasChild")):(o._details.detach(),t(o.nTr).removeClass("dt-hasChild")),fe(n[0],null,"childRow",[i,e.row(e[0])]),Ae(n[0]),Te(n))}},Ae=function(t){var e=new r(t),i=".dt.DT_details",n="draw"+i,o="column-sizing"+i,s="destroy"+i,a=t.aoData;e.off(n+" "+o+" "+s),x(a,"_details").length>0&&(e.on(n,(function(i,n){t===n&&e.rows({page:"current"}).eq(0).each((function(t){var e=a[t];e._detailsShow&&e._details.insertAfter(e.nTr)}))})),e.on(o,(function(e,i,n,o){if(t===i)for(var r,s=$(i),l=0,c=a.length;l<c;l++)(r=a[l])._details&&r._details.children("td[colspan]").attr("colspan",s)})),e.on(s,(function(i,n){if(t===n)for(var o=0,r=a.length;o<r;o++)a[o]._details&&De(e,o)})))},Ie="row().child()";s(Ie,(function(e,i){var o=this.context;return e===n?o.length&&this.length?o[0].aoData[this[0]]._details:n:(!0===e?this.child.show():!1===e?De(this):o.length&&this.length&&function(e,i,n,o){var r=[],s=function(i,n){if(Array.isArray(i)||i instanceof t)for(var o=0,a=i.length;o<a;o++)s(i[o],n);else if(i.nodeName&&"tr"===i.nodeName.toLowerCase())r.push(i);else{var l=t("<tr><td></td></tr>").addClass(n);t("td",l).addClass(n).html(i)[0].colSpan=$(e),r.push(l[0])}};s(n,o),i._details&&i._details.detach(),i._details=t(r),i._detailsShow&&i._details.insertAfter(i.nTr)}(o[0],o[0].aoData[this[0]],e,i),this)})),s(["row().child.show()",Ie+".show()"],(function(t){return Ee(this,!0),this})),s(["row().child.hide()",Ie+".hide()"],(function(){return Ee(this,!1),this})),s(["row().child.remove()",Ie+".remove()"],(function(){return De(this),this})),s("row().child.isShown()",(function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]]._detailsShow||!1}));var Pe=/^([^:]+):(name|visIdx|visible)$/,Me=function(t,e,i,n,o){for(var r=[],s=0,a=o.length;s<a;s++)r.push(q(t,o[s],e));return r};s("columns()",(function(e,i){e===n?e="":t.isPlainObject(e)&&(i=e,e=""),i=Ce(i);var o=this.iterator("table",(function(n){return function(e,i,n){var o=e.aoColumns,r=x(o,"sName"),s=x(o,"nTh");return Se("column",i,(function(i){var a=m(i);if(""===i)return S(o.length);if(null!==a)return[a>=0?a:o.length+a];if("function"==typeof i){var l=_e(e,n);return t.map(o,(function(t,n){return i(n,Me(e,n,0,0,l),s[n])?n:null}))}var c="string"==typeof i?i.match(Pe):"";if(c)switch(c[2]){case"visIdx":case"visible":var d=parseInt(c[1],10);if(d<0){var h=t.map(o,(function(t,e){return t.bVisible?e:null}));return[h[h.length+d]]}return[z(e,d)];case"name":return t.map(r,(function(t,e){return t===c[1]?e:null}));default:return[]}if(i.nodeName&&i._DT_CellIndex)return[i._DT_CellIndex.column];var u=t(s).filter(i).map((function(){return t.inArray(this,s)})).toArray();if(u.length||!i.nodeName)return u;var p=t(i).closest("*[data-dt-column]");return p.length?[p.data("dt-column")]:[]}),e,n)}(n,e,i)}),1);return o.selector.cols=e,o.selector.opts=i,o})),a("columns().header()","column().header()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTh}),1)})),a("columns().footer()","column().footer()",(function(t,e){return this.iterator("column",(function(t,e){return t.aoColumns[e].nTf}),1)})),a("columns().data()","column().data()",(function(){return this.iterator("column-rows",Me,1)})),a("columns().dataSrc()","column().dataSrc()",(function(){return this.iterator("column",(function(t,e){return t.aoColumns[e].mData}),1)})),a("columns().cache()","column().cache()",(function(t){return this.iterator("column-rows",(function(e,i,n,o,r){return w(e.aoData,r,"search"===t?"_aFilterData":"_aSortData",i)}),1)})),a("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(t,e,i,n,o){return w(t.aoData,o,"anCells",e)}),1)})),a("columns().visible()","column().visible()",(function(e,i){var o=this,r=this.iterator("column",(function(i,o){if(e===n)return i.aoColumns[o].bVisible;!function(e,i,o){var r,s,a,l,c=e.aoColumns,d=c[i],h=e.aoData;if(o===n)return d.bVisible;if(d.bVisible!==o){if(o){var u=t.inArray(!0,x(c,"bVisible"),i+1);for(s=0,a=h.length;s<a;s++)l=h[s].nTr,r=h[s].anCells,l&&l.insertBefore(r[i],r[u]||null)}else t(x(e.aoData,"anCells",i)).detach();d.bVisible=o}}(i,o,e)}));return e!==n&&this.iterator("table",(function(r){lt(r,r.aoHeader),lt(r,r.aoFooter),r.aiDisplay.length||t(r.nTBody).find("td[colspan]").attr("colspan",$(r)),re(r),o.iterator("column",(function(t,n){fe(t,null,"column-visibility",[t,n,e,i])})),(i===n||i)&&o.columns.adjust()})),r})),a("columns().indexes()","column().index()",(function(t){return this.iterator("column",(function(e,i){return"visible"===t?B(e,i):i}),1)})),s("columns.adjust()",(function(){return this.iterator("table",(function(t){H(t)}),1)})),s("column.index()",(function(t,e){if(0!==this.context.length){var i=this.context[0];if("fromVisible"===t||"toData"===t)return z(i,e);if("fromData"===t||"toVisible"===t)return B(i,e)}})),s("column()",(function(t,e){return ke(this.columns(t,e))})),s("cells()",(function(e,i,o){if(t.isPlainObject(e)&&(e.row===n?(o=e,e=null):(o=i,i=null)),t.isPlainObject(i)&&(o=i,i=null),null===i||i===n)return this.iterator("table",(function(i){return function(e,i,o){var r,s,a,l,c,d,h,u=e.aoData,p=_e(e,o),f=C(w(u,p,"anCells")),g=t(T([],f)),m=e.aoColumns.length;return Se("cell",i,(function(i){var o="function"==typeof i;if(null===i||i===n||o){for(s=[],a=0,l=p.length;a<l;a++)for(r=p[a],c=0;c<m;c++)d={row:r,column:c},o?(h=u[r],i(d,q(e,r,c),h.anCells?h.anCells[c]:null)&&s.push(d)):s.push(d);return s}if(t.isPlainObject(i))return i.column!==n&&i.row!==n&&-1!==t.inArray(i.row,p)?[i]:[];var f=g.filter(i).map((function(t,e){return{row:e._DT_CellIndex.row,column:e._DT_CellIndex.column}})).toArray();return f.length||!i.nodeName?f:(h=t(i).closest("*[data-dt-row]")).length?[{row:h.data("dt-row"),column:h.data("dt-column")}]:[]}),e,o)}(i,e,Ce(o))}));var r,s,a,l,c=o?{page:o.page,order:o.order,search:o.search}:{},d=this.columns(i,c),h=this.rows(e,c),u=this.iterator("table",(function(t,e){var i=[];for(r=0,s=h[e].length;r<s;r++)for(a=0,l=d[e].length;a<l;a++)i.push({row:h[e][r],column:d[e][a]});return i}),1),p=o&&o.selected?this.cells(u,o):u;return t.extend(p.selector,{cols:i,rows:e,opts:o}),p})),a("cells().nodes()","cell().node()",(function(){return this.iterator("cell",(function(t,e,i){var o=t.aoData[e];return o&&o.anCells?o.anCells[i]:n}),1)})),s("cells().data()",(function(){return this.iterator("cell",(function(t,e,i){return q(t,e,i)}),1)})),a("cells().cache()","cell().cache()",(function(t){return t="search"===t?"_aFilterData":"_aSortData",this.iterator("cell",(function(e,i,n){return e.aoData[i][t][n]}),1)})),a("cells().render()","cell().render()",(function(t){return this.iterator("cell",(function(e,i,n){return q(e,i,n,t)}),1)})),a("cells().indexes()","cell().index()",(function(){return this.iterator("cell",(function(t,e,i){return{row:e,column:i,columnVisible:B(t,i)}}),1)})),a("cells().invalidate()","cell().invalidate()",(function(t){return this.iterator("cell",(function(e,i,n){nt(e,i,t,n)}))})),s("cell()",(function(t,e,i){return ke(this.cells(t,e,i))})),s("cell().data()",(function(t){var e=this.context,i=this[0];return t===n?e.length&&i.length?q(e[0],i[0].row,i[0].column):n:(U(e[0],i[0].row,i[0].column,t),nt(e[0],i[0].row,"data",i[0].column),this)})),s("order()",(function(t,e){var i=this.context;return t===n?0!==i.length?i[0].aaSorting:n:("number"==typeof t?t=[[t,e]]:t.length&&!Array.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",(function(e){e.aaSorting=t.slice()})))})),s("order.listener()",(function(t,e,i){return this.iterator("table",(function(n){ie(n,t,e,i)}))})),s("order.fixed()",(function(e){if(!e){var i=this.context,o=i.length?i[0].aaSortingFixed:n;return Array.isArray(o)?{pre:o}:o}return this.iterator("table",(function(i){i.aaSortingFixed=t.extend(!0,{},e)}))})),s(["columns().order()","column().order()"],(function(e){var i=this;return this.iterator("table",(function(n,o){var r=[];t.each(i[o],(function(t,i){r.push([i,e])})),n.aaSorting=r}))})),s("search()",(function(e,i,o,r){var s=this.context;return e===n?0!==s.length?s[0].oPreviousSearch.sSearch:n:this.iterator("table",(function(n){n.oFeatures.bFilter&&xt(n,t.extend({},n.oPreviousSearch,{sSearch:e+"",bRegex:null!==i&&i,bSmart:null===o||o,bCaseInsensitive:null===r||r}),1)}))})),a("columns().search()","column().search()",(function(e,i,o,r){return this.iterator("column",(function(s,a){var l=s.aoPreSearchCols;if(e===n)return l[a].sSearch;s.oFeatures.bFilter&&(t.extend(l[a],{sSearch:e+"",bRegex:null!==i&&i,bSmart:null===o||o,bCaseInsensitive:null===r||r}),xt(s,s.oPreviousSearch,1))}))})),s("state()",(function(){return this.context.length?this.context[0].oSavedState:null})),s("state.clear()",(function(){return this.iterator("table",(function(t){t.fnStateSaveCallback.call(t.oInstance,t,{})}))})),s("state.loaded()",(function(){return this.context.length?this.context[0].oLoadedState:null})),s("state.save()",(function(){return this.iterator("table",(function(t){re(t)}))})),l.versionCheck=l.fnVersionCheck=function(t){for(var e,i,n=l.version.split("."),o=t.split("."),r=0,s=o.length;r<s;r++)if((e=parseInt(n[r],10)||0)!==(i=parseInt(o[r],10)||0))return e>i;return!0},l.isDataTable=l.fnIsDataTable=function(e){var i=t(e).get(0),n=!1;return e instanceof l.Api||(t.each(l.settings,(function(e,o){var r=o.nScrollHead?t("table",o.nScrollHead)[0]:null,s=o.nScrollFoot?t("table",o.nScrollFoot)[0]:null;o.nTable!==i&&r!==i&&s!==i||(n=!0)})),n)},l.tables=l.fnTables=function(e){var i=!1;t.isPlainObject(e)&&(i=e.api,e=e.visible);var n=t.map(l.settings,(function(i){if(!e||e&&t(i.nTable).is(":visible"))return i.nTable}));return i?new r(n):n},l.camelToHungarian=A,s("$()",(function(e,i){var n=this.rows(i).nodes(),o=t(n);return t([].concat(o.filter(e).toArray(),o.find(e).toArray()))})),t.each(["on","one","off"],(function(e,i){s(i+"()",(function(){var e=Array.prototype.slice.call(arguments);e[0]=t.map(e[0].split(/\s/),(function(t){return t.match(/\.dt\b/)?t:t+".dt"})).join(" ");var n=t(this.tables().nodes());return n[i].apply(n,e),this}))})),s("clear()",(function(){return this.iterator("table",(function(t){et(t)}))})),s("settings()",(function(){return new r(this.context,this.context)})),s("init()",(function(){var t=this.context;return t.length?t[0].oInit:null})),s("data()",(function(){return this.iterator("table",(function(t){return x(t.aoData,"_aData")})).flatten()})),s("destroy()",(function(i){return i=i||!1,this.iterator("table",(function(n){var o,s=n.oClasses,a=n.nTable,c=n.nTBody,d=n.nTHead,h=n.nTFoot,u=t(a),p=t(c),f=t(n.nTableWrapper),g=t.map(n.aoData,(function(t){return t.nTr}));n.bDestroying=!0,fe(n,"aoDestroyCallback","destroy",[n]),i||new r(n).columns().visible(!0),f.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+n.sInstance),a!=d.parentNode&&(u.children("thead").detach(),u.append(d)),h&&a!=h.parentNode&&(u.children("tfoot").detach(),u.append(h)),n.aaSorting=[],n.aaSortingFixed=[],ne(n),t(g).removeClass(n.asStripeClasses.join(" ")),t("th, td",d).removeClass(s.sSortable+" "+s.sSortableAsc+" "+s.sSortableDesc+" "+s.sSortableNone),p.children().detach(),p.append(g);var m=n.nTableWrapper.parentNode,v=i?"remove":"detach";u[v](),f[v](),!i&&m&&(m.insertBefore(a,n.nTableReinsertBefore),u.css("width",n.sDestroyWidth).removeClass(s.sTable),(o=n.asDestroyStripes.length)&&p.children().each((function(e){t(this).addClass(n.asDestroyStripes[e%o])})));var y=t.inArray(n,l.settings);-1!==y&&l.settings.splice(y,1)}))})),t.each(["column","row","cell"],(function(t,e){s(e+"s().every()",(function(t){var i=this.selector.opts,o=this;return this.iterator(e,(function(r,s,a,l,c){t.call(o[e](s,"cell"===e?a:i,"cell"===e?i:n),s,a,l,c)}))}))})),s("i18n()",(function(e,i,o){var r=this.context[0],s=Q(e)(r.oLanguage);return s===n&&(s=i),o!==n&&t.isPlainObject(s)&&(s=s[o]!==n?s[o]:s._),s.replace("%d",o)})),l.version="1.12.1",l.settings=[],l.models={},l.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,return:!1},l.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},l.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},l.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},l.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},E(l.defaults),l.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},E(l.defaults.column),l.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:n,oAjaxData:n,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==ve(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==ve(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,i=e+t,n=this.aiDisplay.length,o=this.oFeatures,r=o.bPaginate;return o.bServerSide?!1===r||-1===t?e+n:Math.min(e+t,this._iRecordsDisplay):!r||i>n||-1===t?n:i},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},l.ext=o={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:l.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:l.version},t.extend(o,{afnFiltering:o.search,aTypes:o.type.detect,ofnSearch:o.type.search,oSort:o.type.order,afnSortData:o.order,aoFeatures:o.feature,oApi:o.internal,oStdClasses:o.classes,oPagination:o.pager}),t.extend(l.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Le=l.ext.pager;function Re(t,e){var i=[],n=Le.numbers_length,o=Math.floor(n/2);return e<=n?i=S(0,e):t<=o?((i=S(0,n-2)).push("ellipsis"),i.push(e-1)):t>=e-1-o?((i=S(e-(n-2),e)).splice(0,0,"ellipsis"),i.splice(0,0,0)):((i=S(t-o+2,t+o-1)).push("ellipsis"),i.push(e-1),i.splice(0,0,"ellipsis"),i.splice(0,0,0)),i.DT_el="span",i}t.extend(Le,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[Re(t,e)]},simple_numbers:function(t,e){return["previous",Re(t,e),"next"]},full_numbers:function(t,e){return["first","previous",Re(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",Re(t,e),"last"]},_numbers:Re,numbers_length:7}),t.extend(!0,l.ext.renderer,{pageButton:{_:function(e,o,r,s,a,l){var c,d,h,u=e.oClasses,p=e.oLanguage.oPaginate,f=e.oLanguage.oAria.paginate||{},g=0,m=function(i,n){var o,s,h,v,y=u.sPageButtonDisabled,b=function(t){zt(e,t.data.action,!0)};for(o=0,s=n.length;o<s;o++)if(h=n[o],Array.isArray(h)){var x=t("<"+(h.DT_el||"div")+"/>").appendTo(i);m(x,h)}else{switch(c=null,d=h,v=e.iTabIndex,h){case"ellipsis":i.append('<span class="ellipsis">&#x2026;</span>');break;case"first":c=p.sFirst,0===a&&(v=-1,d+=" "+y);break;case"previous":c=p.sPrevious,0===a&&(v=-1,d+=" "+y);break;case"next":c=p.sNext,0!==l&&a!==l-1||(v=-1,d+=" "+y);break;case"last":c=p.sLast,0!==l&&a!==l-1||(v=-1,d+=" "+y);break;default:c=e.fnFormatNumber(h+1),d=a===h?u.sPageButtonActive:""}null!==c&&(ue(t("<a>",{class:u.sPageButton+" "+d,"aria-controls":e.sTableId,"aria-label":f[h],"data-dt-idx":g,tabindex:v,id:0===r&&"string"==typeof h?e.sTableId+"_"+h:null}).html(c).appendTo(i),{action:h},b),g++)}};try{h=t(o).find(i.activeElement).data("dt-idx")}catch(t){}m(t(o).empty(),s),h!==n&&t(o).find("[data-dt-idx="+h+"]").trigger("focus")}}}),t.extend(l.ext.type.detect,[function(t,e){var i=e.oLanguage.sDecimal;return y(t,i)?"num"+i:null},function(t,e){if(t&&!(t instanceof Date)&&!u.test(t))return null;var i=Date.parse(t);return null!==i&&!isNaN(i)||g(t)?"date":null},function(t,e){var i=e.oLanguage.sDecimal;return y(t,i,!0)?"num-fmt"+i:null},function(t,e){var i=e.oLanguage.sDecimal;return b(t,i)?"html-num"+i:null},function(t,e){var i=e.oLanguage.sDecimal;return b(t,i,!0)?"html-num-fmt"+i:null},function(t,e){return g(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(l.ext.type.search,{html:function(t){return g(t)?t:"string"==typeof t?t.replace(d," ").replace(h,""):""},string:function(t){return g(t)?t:"string"==typeof t?t.replace(d," "):t}});var Oe=function(t,e,i,n){return 0===t||t&&"-"!==t?(e&&(t=v(t,e)),t.replace&&(i&&(t=t.replace(i,"")),n&&(t=t.replace(n,""))),1*t):-1/0};function Fe(e){t.each({num:function(t){return Oe(t,e)},"num-fmt":function(t){return Oe(t,e,f)},"html-num":function(t){return Oe(t,e,h)},"html-num-fmt":function(t){return Oe(t,e,h,f)}},(function(t,i){o.type.order[t+e+"-pre"]=i,t.match(/^html\-/)&&(o.type.search[t+e]=o.type.search.html)}))}t.extend(o.type.order,{"date-pre":function(t){var e=Date.parse(t);return isNaN(e)?-1/0:e},"html-pre":function(t){return g(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return g(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return t<e?-1:t>e?1:0},"string-desc":function(t,e){return t<e?1:t>e?-1:0}}),Fe(""),t.extend(!0,l.ext.renderer,{header:{_:function(e,i,n,o){t(e.nTable).on("order.dt.DT",(function(t,r,s,a){if(e===r){var l=n.idx;i.removeClass(o.sSortAsc+" "+o.sSortDesc).addClass("asc"==a[l]?o.sSortAsc:"desc"==a[l]?o.sSortDesc:n.sSortingClass)}}))},jqueryui:function(e,i,n,o){t("<div/>").addClass(o.sSortJUIWrapper).append(i.contents()).append(t("<span/>").addClass(o.sSortIcon+" "+n.sSortingClassJUI)).appendTo(i),t(e.nTable).on("order.dt.DT",(function(t,r,s,a){if(e===r){var l=n.idx;i.removeClass(o.sSortAsc+" "+o.sSortDesc).addClass("asc"==a[l]?o.sSortAsc:"desc"==a[l]?o.sSortDesc:n.sSortingClass),i.find("span."+o.sSortIcon).removeClass(o.sSortJUIAsc+" "+o.sSortJUIDesc+" "+o.sSortJUI+" "+o.sSortJUIAscAllowed+" "+o.sSortJUIDescAllowed).addClass("asc"==a[l]?o.sSortJUIAsc:"desc"==a[l]?o.sSortJUIDesc:n.sSortingClassJUI)}}))}}});var Ne=function(t){return Array.isArray(t)&&(t=t.join(",")),"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):t};function He(t,i,n,o,r){return e.moment?t[i](r):e.luxon?t[n](r):o?t[o](r):t}var ze=!1;function Be(t,i,n){var o;if(e.moment){if(!(o=e.moment.utc(t,i,n,!0)).isValid())return null}else if(e.luxon){if(!(o=i?e.luxon.DateTime.fromFormat(t,i):e.luxon.DateTime.fromISO(t)).isValid)return null;o.setLocale(n)}else i?(ze||alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),ze=!0):o=new Date(t);return o}function $e(t){return function(e,i,o,r){0===arguments.length?(o="en",i=null,e=null):1===arguments.length?(o="en",i=e,e=null):2===arguments.length&&(o=i,i=e,e=null);var s="datetime-"+i;return l.ext.type.order[s]||(l.ext.type.detect.unshift((function(t){return t===s&&s})),l.ext.type.order[s+"-asc"]=function(t,e){var i=t.valueOf(),n=e.valueOf();return i===n?0:i<n?-1:1},l.ext.type.order[s+"-desc"]=function(t,e){var i=t.valueOf(),n=e.valueOf();return i===n?0:i>n?-1:1}),function(a,l){if(null===a||a===n)if("--now"===r){var c=new Date;a=new Date(Date.UTC(c.getFullYear(),c.getMonth(),c.getDate(),c.getHours(),c.getMinutes(),c.getSeconds()))}else a="";if("type"===l)return s;if(""===a)return"sort"!==l?"":Be("0000-01-01 00:00:00",null,o);if(null!==i&&e===i&&"sort"!==l&&"type"!==l&&!(a instanceof Date))return a;var d=Be(a,e,o);if(null===d)return a;if("sort"===l)return d;var h=null===i?He(d,"toDate","toJSDate","")[t]():He(d,"format","toFormat","toISOString",i);return"display"===l?Ne(h):h}}}var je=",",We=".";if(Intl)try{for(var Ye=(new Intl.NumberFormat).formatToParts(100000.1),Xe=0;Xe<Ye.length;Xe++)"group"===Ye[Xe].type?je=Ye[Xe].value:"decimal"===Ye[Xe].type&&(We=Ye[Xe].value)}catch(t){}function Ve(t){return function(){var e=[le(this[l.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return l.ext.internal[t].apply(this,e)}}return l.datetime=function(t,e){var i="datetime-detect-"+t;e||(e="en"),l.ext.type.order[i]||(l.ext.type.detect.unshift((function(n){var o=Be(n,t,e);return!(""!==n&&!o)&&i})),l.ext.type.order[i+"-pre"]=function(i){return Be(i,t,e)||0})},l.render={date:$e("toLocaleDateString"),datetime:$e("toLocaleString"),time:$e("toLocaleTimeString"),number:function(t,e,i,o,r){return null!==t&&t!==n||(t=je),null!==e&&e!==n||(e=We),{display:function(n){if("number"!=typeof n&&"string"!=typeof n)return n;if(""===n||null===n)return n;var s=n<0?"-":"",a=parseFloat(n);if(isNaN(a))return Ne(n);a=a.toFixed(i),n=Math.abs(a);var l=parseInt(n,10),c=i?e+(n-l).toFixed(i).substring(2):"";return 0===l&&0===parseFloat(c)&&(s=""),s+(o||"")+l.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+c+(r||"")}}},text:function(){return{display:Ne,filter:Ne}}},t.extend(l.ext.internal,{_fnExternApiFunc:Ve,_fnBuildAjax:ft,_fnAjaxUpdate:gt,_fnAjaxParameters:mt,_fnAjaxUpdateDraw:vt,_fnAjaxDataSrc:yt,_fnAddColumn:F,_fnColumnOptions:N,_fnAdjustColumnSizing:H,_fnVisibleToColumnIndex:z,_fnColumnIndexToVisible:B,_fnVisbleColumns:$,_fnGetColumns:j,_fnColumnTypes:W,_fnApplyColumnDefs:Y,_fnHungarianMap:E,_fnCamelToHungarian:A,_fnLanguageCompat:I,_fnBrowserDetect:R,_fnAddData:X,_fnAddTr:V,_fnNodeToDataIndex:function(t,e){return e._DT_RowIndex!==n?e._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,i,n){return t.inArray(n,e.aoData[i].anCells)},_fnGetCellData:q,_fnSetCellData:U,_fnSplitObjNotation:K,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:J,_fnGetDataMaster:tt,_fnClearTable:et,_fnDeleteIndex:it,_fnInvalidate:nt,_fnGetRowElements:ot,_fnCreateTr:rt,_fnBuildHead:at,_fnDrawHead:lt,_fnDraw:ct,_fnReDraw:dt,_fnAddOptionsHtml:ht,_fnDetectHeader:ut,_fnGetUniqueThs:pt,_fnFeatureHtmlFilter:bt,_fnFilterComplete:xt,_fnFilterCustom:wt,_fnFilterColumn:St,_fnFilter:Ct,_fnFilterCreateSearch:kt,_fnEscapeRegex:_t,_fnFilterData:Et,_fnFeatureHtmlInfo:Pt,_fnUpdateInfo:Mt,_fnInfoMacros:Lt,_fnInitialise:Rt,_fnInitComplete:Ot,_fnLengthChange:Ft,_fnFeatureHtmlLength:Nt,_fnFeatureHtmlPaginate:Ht,_fnPageChange:zt,_fnFeatureHtmlProcessing:Bt,_fnProcessingDisplay:$t,_fnFeatureHtmlTable:jt,_fnScrollDraw:Wt,_fnApplyToChildren:Yt,_fnCalculateColumnWidths:Vt,_fnThrottle:qt,_fnConvertToWidth:Ut,_fnGetWidestNode:Gt,_fnGetMaxLenString:Zt,_fnStringToCss:Kt,_fnSortFlatten:Qt,_fnSort:Jt,_fnSortAria:te,_fnSortListener:ee,_fnSortAttachListener:ie,_fnSortingClasses:ne,_fnSortData:oe,_fnSaveState:re,_fnLoadState:se,_fnImplementState:ae,_fnSettingsFromNode:le,_fnLog:ce,_fnMap:de,_fnBindAction:ue,_fnCallbackReg:pe,_fnCallbackFire:fe,_fnLengthOverflow:ge,_fnRenderer:me,_fnDataSource:ve,_fnRowAttributes:st,_fnExtend:he,_fnCalculateEnd:function(){}}),t.fn.dataTable=l,l.$=t,t.fn.dataTableSettings=l.settings,t.fn.dataTableExt=l.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(l,(function(e,i){t.fn.DataTable[e]=i})),l})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable;return t.extend(!0,o.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),t.extend(o.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),o.ext.renderer.pageButton.bootstrap=function(e,r,s,a,l,c){var d,h,u,p=new o.Api(e),f=e.oClasses,g=e.oLanguage.oPaginate,m=e.oLanguage.oAria.paginate||{},v=0,y=function(i,n){var o,r,a,u,b=function(e){e.preventDefault(),t(e.currentTarget).hasClass("disabled")||p.page()==e.data.action||p.page(e.data.action).draw("page")};for(o=0,r=n.length;o<r;o++)if(u=n[o],Array.isArray(u))y(i,u);else{switch(d="",h="",u){case"ellipsis":d="&#x2026;",h="disabled";break;case"first":d=g.sFirst,h=u+(l>0?"":" disabled");break;case"previous":d=g.sPrevious,h=u+(l>0?"":" disabled");break;case"next":d=g.sNext,h=u+(l<c-1?"":" disabled");break;case"last":d=g.sLast,h=u+(l<c-1?"":" disabled");break;default:d=u+1,h=l===u?"active":""}d&&(a=t("<li>",{class:f.sPageButton+" "+h,id:0===s&&"string"==typeof u?e.sTableId+"_"+u:null}).append(t("<a>",{href:"#","aria-controls":e.sTableId,"aria-label":m[u],"data-dt-idx":v,tabindex:e.iTabIndex,class:"page-link"}).html(d)).appendTo(i),e.oApi._fnBindAction(a,{action:u},b),v++)}};try{u=t(r).find(i.activeElement).data("dt-idx")}catch(t){}y(t(r).empty().html('<ul class="pagination"/>').children("ul"),a),u!==n&&t(r).find("[data-dt-idx="+u+"]").trigger("focus")},o})),$.extend(!0,$.fn.dataTableExt.oStdClasses,{sFilterInput:"form-control border-top-left-radius-0 border-bottom-left-radius-0 ml-0 width-lg shadow-inset-1",sLengthSelect:"form-control custom-select"}),$.extend(!0,$.fn.dataTable.defaults,{dom:"<'row mb-3'<'col-sm-12 col-md-6 d-flex align-items-center justify-content-start'f><'col-sm-12 col-md-6 d-flex align-items-center justify-content-end'l>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",lengthMenu:[[10,15,25,50,100,-1],[10,15,25,50,100,"All"]],language:{paginate:{previous:"<i class='fal fa-chevron-left'></i>",next:"<i class='fal fa-chevron-right'></i>"},processing:'<div class="d-flex align-items-center justify-content-center fs-lg"><div class="spinner-border spinner-border-sm text-primary mr-2" role="status"><span class="sr-only"> Loading...</span></div> Processing...</div>',search:'<div class="input-group-text d-inline-flex width-3 align-items-center justify-content-center border-bottom-right-radius-0 border-top-right-radius-0 border-right-0"><i class="fal fa-search"></i></div>',searchPlaceholder:"Search",zeroRecords:"No records to display"},initComplete:function(t,e){initApp.appForms(".dataTables_filter","has-length","has-disabled")}}),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=0,s=function(e,i){if(!o.versionCheck||!o.versionCheck("1.10.8"))throw"Warning: AutoFill requires DataTables 1.10.8 or greater";this.c=t.extend(!0,{},o.defaults.autoFill,s.defaults,i),this.s={dt:new o.Api(e),namespace:".autoFill"+r++,scroll:{},scrollInterval:null,handle:{height:0,width:0},enabled:!1},this.dom={handle:t('<div class="dt-autofill-handle"/>'),select:{top:t('<div class="dt-autofill-select top"/>'),right:t('<div class="dt-autofill-select right"/>'),bottom:t('<div class="dt-autofill-select bottom"/>'),left:t('<div class="dt-autofill-select left"/>')},background:t('<div class="dt-autofill-background"/>'),list:t('<div class="dt-autofill-list">'+this.s.dt.i18n("autoFill.info","")+"<ul/></div>"),dtScroll:null,offsetParent:null},this._constructor()};t.extend(s.prototype,{enabled:function(){return this.s.enabled},enable:function(i){var o=this;if(!1===i)return this.disable();this.s.enabled=!0,this._focusListener(),this.dom.handle.on("mousedown touchstart",(function(t){return o._mousedown(t),!1})),t(e).on("resize",(function(){t("div.dt-autofill-handle").length>0&&o.dom.attachedTo!==n&&o._attach(o.dom.attachedTo)}));let r=function(){o.s.handle={height:!1,width:!1},t(o.dom.handle).css({height:"",width:""}),o.dom.attachedTo!==n&&o._attach(o.dom.attachedTo)};return t(e).on("orientationchange",(function(){setTimeout((function(){r(),setTimeout(r,150)}),50)})),this},disable:function(){return this.s.enabled=!1,this._focusListenerRemove(),this},_constructor:function(){var e=this,i=this.s.dt,n=t("div.dataTables_scrollBody",this.s.dt.table().container());i.settings()[0].autoFill=this,n.length&&(this.dom.dtScroll=n,"static"===n.css("position")&&n.css("position","relative")),!1!==this.c.enable&&this.enable(),i.on("destroy.autoFill",(function(){e._focusListenerRemove()}))},_attach:function(e){var i=this.s.dt,n=i.cell(e).index(),o=this.dom.handle,r=this.s.handle;if(n&&-1!==i.columns(this.c.columns).indexes().indexOf(n.column)){this.dom.offsetParent||(this.dom.offsetParent=t(i.table().node()).offsetParent()),r.height&&r.width||(o.appendTo("body"),r.height=o.outerHeight(),r.width=o.outerWidth());var s=this._getPosition(e,this.dom.offsetParent);this.dom.attachedTo=e,o.css({top:s.top+e.offsetHeight-r.height,left:s.left+e.offsetWidth-r.width}).appendTo(this.dom.offsetParent)}else this._detach()},_actionSelector:function(e){var i=this,n=this.s.dt,o=s.actions,r=[];if(t.each(o,(function(t,i){i.available(n,e)&&r.push(t)})),1===r.length&&!1===this.c.alwaysAsk){var a=o[r[0]].execute(n,e);this._update(a,e)}else if(r.length>1){var l=this.dom.list.children("ul").empty();r.push("cancel"),t.each(r,(function(r,a){l.append(t("<li/>").append('<div class="dt-autofill-question">'+o[a].option(n,e)+"<div>").append(t('<div class="dt-autofill-button">').append(t('<button class="'+s.classes.btn+'">'+n.i18n("autoFill.button","&gt;")+"</button>").on("click",(function(){var r=o[a].execute(n,e,t(this).closest("li"));i._update(r,e),i.dom.background.remove(),i.dom.list.remove()})))))})),this.dom.background.appendTo("body"),this.dom.background.one("click",(()=>{this.dom.background.remove(),this.dom.list.remove()})),this.dom.list.appendTo("body"),this.dom.list.css("margin-top",this.dom.list.outerHeight()/2*-1)}},_detach:function(){this.dom.attachedTo=null,this.dom.handle.detach()},_drawSelection:function(e,i){var n=this.s.dt,o=this.s.start,r=t(this.dom.start),s={row:this.c.vertical?n.rows({page:"current"}).nodes().indexOf(e.parentNode):o.row,column:this.c.horizontal?t(e).index():o.column},a=n.column.index("toData",s.column),l=n.row(":eq("+s.row+")",{page:"current"}),c=t(n.cell(l.index(),a).node());if(n.cell(c).any()&&-1!==n.columns(this.c.columns).indexes().indexOf(a)&&-1!==s.row){var d,h,u,p,f,g;this.s.end=s,d=o.row<s.row?r:c,h=o.row<s.row?c:r,u=o.column<s.column?r:c,p=o.column<s.column?c:r,d=this._getPosition(d.get(0)).top,u=this._getPosition(u.get(0)).left,f=this._getPosition(h.get(0)).top+h.outerHeight()-d,g=this._getPosition(p.get(0)).left+p.outerWidth()-u;var m=this.dom.select;m.top.css({top:d,left:u,width:g}),m.left.css({top:d,left:u,height:f}),m.bottom.css({top:d+f,left:u,width:g}),m.right.css({top:d,left:u+g,height:f})}},_editor:function(t){var e=this.s.dt,i=this.c.editor;if(i){for(var o={},r=[],s=i.fields(),a=0,l=t.length;a<l;a++)for(var c=0,d=t[a].length;c<d;c++){var h=t[a][c],u=e.settings()[0].aoColumns[h.index.column],p=u.editField;if(p===n)for(var f=u.mData,g=0,m=s.length;g<m;g++){var v=i.field(s[g]);if(v.dataSrc()===f){p=v.name();break}}if(!p)throw"Could not automatically determine field data. Please see https://datatables.net/tn/11";o[p]||(o[p]={});var y=e.row(h.index.row).id();o[p][y]=h.set,r.push(h.index)}i.bubble(r,!1).multiSet(o).submit()}},_emitEvent:function(e,i){this.s.dt.iterator("table",(function(n,o){t(n.nTable).triggerHandler(e+".dt",i)}))},_focusListener:function(){var e=this,n=this.s.dt,o=this.s.namespace,r=null!==this.c.focus?this.c.focus:n.init().keys||n.settings()[0].keytable?"focus":"hover";"focus"===r?n.on("key-focus.autoFill",(function(t,i,n){e._attach(n.node())})).on("key-blur.autoFill",(function(t,i,n){e._detach()})):"click"===r?(t(n.table().body()).on("click"+o,"td, th",(function(t){e._attach(this)})),t(i.body).on("click"+o,(function(i){t(i.target).parents().filter(n.table().body()).length||e._detach()}))):t(n.table().body()).on("mouseenter"+o+" touchstart"+o,"td, th",(function(t){e._attach(this)})).on("mouseleave"+o+"touchend"+o,(function(i){t(i.relatedTarget).hasClass("dt-autofill-handle")||e._detach()}))},_focusListenerRemove:function(){var e=this.s.dt;e.off(".autoFill"),t(e.table().body()).off(this.s.namespace),t(i.body).off(this.s.namespace)},_getPosition:function(e,i){var n,o=e,r=0,s=0;i||(i=t(t(this.s.dt.table().node())[0].offsetParent));do{var a=o.offsetTop,l=o.offsetLeft;if(n=t(o.offsetParent),r+=a+1*parseInt(n.css("border-top-width")||0),s+=l+1*parseInt(n.css("border-left-width")||0),"body"===o.nodeName.toLowerCase())break;o=n.get(0)}while(n.get(0)!==i.get(0));return{top:r,left:s}},_mousedown:function(n){var o=this,r=this.s.dt;this.dom.start=this.dom.attachedTo,this.s.start={row:r.rows({page:"current"}).nodes().indexOf(t(this.dom.start).parent()[0]),column:t(this.dom.start).index()},t(i.body).on("mousemove.autoFill touchmove.autoFill",(function(e){o._mousemove(e),"touchmove"===e.type&&t(i.body).one("touchend.autoFill",(function(){o._detach()}))})).on("mouseup.autoFill touchend.autoFill",(function(t){o._mouseup(t)}));var s=this.dom.select,a=t(r.table().node()).offsetParent();s.top.appendTo(a),s.left.appendTo(a),s.right.appendTo(a),s.bottom.appendTo(a),this._drawSelection(this.dom.start,n),this.dom.handle.css("display","none");var l=this.dom.dtScroll;this.s.scroll={windowHeight:t(e).height(),windowWidth:t(e).width(),dtTop:l?l.offset().top:null,dtLeft:l?l.offset().left:null,dtHeight:l?l.outerHeight():null,dtWidth:l?l.outerWidth():null}},_mousemove:function(t){this.s.dt;var e=t.type.includes("touch")?i.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY):t.target,n=e.nodeName.toLowerCase();"td"!==n&&"th"!==n||(this._drawSelection(e,t),this._shiftScroll(t))},_mouseup:function(e){t(i.body).off(".autoFill");var o=this,r=this.s.dt,s=this.dom.select;s.top.remove(),s.left.remove(),s.right.remove(),s.bottom.remove(),this.dom.handle.css("display","block");var a=this.s.start,l=this.s.end;if(a.row!==l.row||a.column!==l.column){var c=r.cell(":eq("+a.row+")",a.column+":visible",{page:"current"});if(t("div.DTE",c.node()).length){var d=r.editor();return d.on("submitSuccess.dtaf close.dtaf",(function(){d.off(".dtaf"),setTimeout((function(){o._mouseup(e)}),100)})).on("submitComplete.dtaf preSubmitCancelled.dtaf close.dtaf",(function(){d.off(".dtaf")})),void d.submit()}for(var h=this._range(a.row,l.row),u=this._range(a.column,l.column),p=[],f=r.settings()[0],g=f.aoColumns,m=r.columns(this.c.columns).indexes(),v=0;v<h.length;v++)p.push(t.map(u,(function(t){var e=r.row(":eq("+h[v]+")",{page:"current"}),i=r.cell(e.index(),t+":visible"),o=i.data(),s=i.index(),a=g[s.column].editField;if(a!==n&&(o=f.oApi._fnGetObjectDataFn(a)(r.row(s.row).data())),-1!==m.indexOf(s.column))return{cell:i,data:o,label:i.data(),index:s}})));this._actionSelector(p),clearInterval(this.s.scrollInterval),this.s.scrollInterval=null}},_range:function(t,e){var i,n=[];if(t<=e)for(i=t;i<=e;i++)n.push(i);else for(i=t;i>=e;i--)n.push(i);return n},_shiftScroll:function(t){var i,n,o,r,s=this,a=(this.s.dt,this.s.scroll),l=!1,c=65,d=t.type.includes("touch")?t.touches[0].clientX:t.pageX-e.scrollX,h=t.type.includes("touch")?t.touches[0].clientY:t.pageY-e.scrollY,u=d;h<c?i=-5:h>a.windowHeight-c&&(i=5),u<c?n=-5:u>a.windowWidth-c&&(n=5),null!==a.dtTop&&h<a.dtTop+c?o=-5:null!==a.dtTop&&h>a.dtTop+a.dtHeight-c&&(o=5),null!==a.dtLeft&&d<a.dtLeft+c?r=-5:null!==a.dtLeft&&d>a.dtLeft+a.dtWidth-c&&(r=5),i||n||o||r?(a.windowVert=i,a.windowHoriz=n,a.dtVert=o,a.dtHoriz=r,l=!0):this.s.scrollInterval&&(clearInterval(this.s.scrollInterval),this.s.scrollInterval=null),!this.s.scrollInterval&&l&&(this.s.scrollInterval=setInterval((function(){if(e.scrollTo(e.scrollX+(a.windowHoriz?a.windowHoriz:0),e.scrollY+(a.windowVert?a.windowVert:0)),a.dtVert||a.dtHoriz){var t=s.dom.dtScroll[0];a.dtVert&&(t.scrollTop+=a.dtVert),a.dtHoriz&&(t.scrollLeft+=a.dtHoriz)}}),20))},_update:function(t,e){if(!1!==t){var i,n=this.s.dt,o=n.columns(this.c.columns).indexes();if(this._emitEvent("preAutoFill",[n,e]),this._editor(e),null!==this.c.update?this.c.update:!this.c.editor){for(var r=0,s=e.length;r<s;r++)for(var a=0,l=e[r].length;a<l;a++)i=e[r][a],-1!==o.indexOf(i.index.column)&&i.cell.data(i.set);n.draw(!1)}this._emitEvent("autoFill",[n,e])}}}),s.actions={increment:{available:function(t,e){var i=e[0][0].label;return!isNaN(i-parseFloat(i))},option:function(t,e){return t.i18n("autoFill.increment",'Increment / decrement each cell by: <input type="number" value="1">')},execute:function(e,i,n){for(var o=1*i[0][0].data,r=1*t("input",n).val(),s=0,a=i.length;s<a;s++)for(var l=0,c=i[s].length;l<c;l++)i[s][l].set=o,o+=r}},fill:{available:function(t,e){return!0},option:function(t,e){return t.i18n("autoFill.fill","Fill all cells with <i>%d</i>",e[0][0].label)},execute:function(t,e,i){for(var n=e[0][0].data,o=0,r=e.length;o<r;o++)for(var s=0,a=e[o].length;s<a;s++)e[o][s].set=n}},fillHorizontal:{available:function(t,e){return e.length>1&&e[0].length>1},option:function(t,e){return t.i18n("autoFill.fillHorizontal","Fill cells horizontally")},execute:function(t,e,i){for(var n=0,o=e.length;n<o;n++)for(var r=0,s=e[n].length;r<s;r++)e[n][r].set=e[n][0].data}},fillVertical:{available:function(t,e){return e.length>1},option:function(t,e){return t.i18n("autoFill.fillVertical","Fill cells vertically")},execute:function(t,e,i){for(var n=0,o=e.length;n<o;n++)for(var r=0,s=e[n].length;r<s;r++)e[n][r].set=e[0][r].data}},cancel:{available:function(){return!1},option:function(t){return t.i18n("autoFill.cancel","Cancel")},execute:function(){return!1}}},s.version="2.3.9",s.defaults={alwaysAsk:!1,focus:null,columns:"",enable:!0,update:null,editor:null,vertical:!0,horizontal:!0},s.classes={btn:"btn"};var a=t.fn.dataTable.Api;return a.register("autoFill()",(function(){return this})),a.register("autoFill().enabled()",(function(){var t=this.context[0];return!!t.autoFill&&t.autoFill.enabled()})),a.register("autoFill().enable()",(function(t){return this.iterator("table",(function(e){e.autoFill&&e.autoFill.enable(t)}))})),a.register("autoFill().disable()",(function(){return this.iterator("table",(function(t){t.autoFill&&t.autoFill.disable()}))})),t(i).on("preInit.dt.autofill",(function(e,i,n){if("dt"===e.namespace){var r=i.oInit.autoFill,a=o.defaults.autoFill;if(r||a){var l=t.extend({},r,a);!1!==r&&new s(i,l)}}})),o.AutoFill=s,o.AutoFill=s,s})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-autofill"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.AutoFill||require("datatables.net-autofill")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable;return o.AutoFill.classes.btn="btn btn-primary",o})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=0,s=0,a=o.ext.buttons;function l(e,i,n){t.fn.animate?e.stop().fadeIn(i,n):(e.css("display","block"),n&&n.call(e))}function c(e,i,n){t.fn.animate?e.stop().fadeOut(i,n):(e.css("display","none"),n&&n.call(e))}var d,h=function(e,i){if(!(this instanceof h))return function(t){return new h(t,e).container()};void 0===i&&(i={}),!0===i&&(i={}),Array.isArray(i)&&(i={buttons:i}),this.c=t.extend(!0,{},h.defaults,i),i.buttons&&(this.c.buttons=i.buttons),this.s={dt:new o.Api(e),buttons:[],listenKeys:"",namespace:"dtb"+r++},this.dom={container:t("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)},this._constructor()};t.extend(h.prototype,{action:function(t,e){var i=this._nodeToButton(t);return e===n?i.conf.action:(i.conf.action=e,this)},active:function(e,i){var o=this._nodeToButton(e),r=this.c.dom.button.active,s=t(o.node);return i===n?s.hasClass(r):(s.toggleClass(r,i===n||i),this)},add:function(t,e){var i=this.s.buttons;if("string"==typeof e){for(var o=e.split("-"),r=this.s,s=0,a=o.length-1;s<a;s++)r=r.buttons[1*o[s]];i=r.buttons,e=1*o[o.length-1]}return this._expandButton(i,t,r!==n,e),this._draw(),this},container:function(){return this.dom.container},disable:function(e){var i=this._nodeToButton(e);return t(i.node).addClass(this.c.dom.button.disabled).attr("disabled",!0),this},destroy:function(){t("body").off("keyup."+this.s.namespace);var e,i,n=this.s.buttons.slice();for(e=0,i=n.length;e<i;e++)this.remove(n[e].node);this.dom.container.remove();var o=this.s.dt.settings()[0];for(e=0,i=o.length;e<i;e++)if(o.inst===this){o.splice(e,1);break}return this},enable:function(e,i){if(!1===i)return this.disable(e);var n=this._nodeToButton(e);return t(n.node).removeClass(this.c.dom.button.disabled).removeAttr("disabled"),this},name:function(){return this.c.name},node:function(e){if(!e)return this.dom.container;var i=this._nodeToButton(e);return t(i.node)},processing:function(e,i){var o=this.s.dt,r=this._nodeToButton(e);return i===n?t(r.node).hasClass("processing"):(t(r.node).toggleClass("processing",i),t(o.table().node()).triggerHandler("buttons-processing.dt",[i,o.button(e),o,t(e),r.conf]),this)},remove:function(e){var i=this._nodeToButton(e),n=this._nodeToHost(e),o=this.s.dt;if(i.buttons.length)for(var r=i.buttons.length-1;r>=0;r--)this.remove(i.buttons[r].node);i.conf.destroy&&i.conf.destroy.call(o.button(e),o,t(e),i.conf),this._removeKey(i.conf),t(i.node).remove();var s=t.inArray(i,n);return n.splice(s,1),this},text:function(e,i){var o=this._nodeToButton(e),r=this.c.dom.collection.buttonLiner,s=o.inCollection&&r&&r.tag?r.tag:this.c.dom.buttonLiner.tag,a=this.s.dt,l=t(o.node),c=function(t){return"function"==typeof t?t(a,l,o.conf):t};return i===n?c(o.conf.text):(o.conf.text=i,s?l.children(s).html(c(i)):l.html(c(i)),this)},_constructor:function(){var e=this,n=this.s.dt,o=n.settings()[0],r=this.c.buttons;o._buttons||(o._buttons=[]),o._buttons.push({inst:this,name:this.c.name});for(var s=0,a=r.length;s<a;s++)this.add(r[s]);n.on("destroy",(function(t,i){i===o&&e.destroy()})),t("body").on("keyup."+this.s.namespace,(function(t){if(!i.activeElement||i.activeElement===i.body){var n=String.fromCharCode(t.keyCode).toLowerCase();-1!==e.s.listenKeys.toLowerCase().indexOf(n)&&e._keypress(n,t)}}))},_addKey:function(e){e.key&&(this.s.listenKeys+=t.isPlainObject(e.key)?e.key.key:e.key)},_draw:function(t,e){t||(t=this.dom.container,e=this.s.buttons),t.children().detach();for(var i=0,n=e.length;i<n;i++)t.append(e[i].inserter),t.append(" "),e[i].buttons&&e[i].buttons.length&&this._draw(e[i].collection,e[i].buttons)},_expandButton:function(e,i,o,r){for(var s=this.s.dt,a=Array.isArray(i)?i:[i],l=0,c=a.length;l<c;l++){var d=this._resolveExtends(a[l]);if(d)if(Array.isArray(d))this._expandButton(e,d,o,r);else{var h=this._buildButton(d,o);h&&(r!==n&&null!==r?(e.splice(r,0,h),r++):e.push(h),h.conf.buttons&&(h.collection=t("<"+this.c.dom.collection.tag+"/>"),h.conf._collection=h.collection,this._expandButton(h.buttons,h.conf.buttons,!0,r)),d.init&&d.init.call(s.button(h.node),s,t(h.node),d))}}},_buildButton:function(e,i){var o=this.c.dom.button,r=this.c.dom.buttonLiner,a=this.c.dom.collection,l=this.s.dt,c=function(t){return"function"==typeof t?t(l,p,e):t};if(i&&a.button&&(o=a.button),i&&a.buttonLiner&&(r=a.buttonLiner),e.available&&!e.available(l,e))return!1;var d=function(e,i,n,o){o.action.call(i.button(n),e,i,n,o),t(i.table().node()).triggerHandler("buttons-action.dt",[i.button(n),i,n,o])},h=e.tag||o.tag,u=e.clickBlurs===n||e.clickBlurs,p=t("<"+h+"/>").addClass(o.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",(function(t){t.preventDefault(),!p.hasClass(o.disabled)&&e.action&&d(t,l,p,e),u&&p.trigger("blur")})).on("keyup.dtb",(function(t){13===t.keyCode&&!p.hasClass(o.disabled)&&e.action&&d(t,l,p,e)}));if("a"===h.toLowerCase()&&p.attr("href","#"),"button"===h.toLowerCase()&&p.attr("type","button"),r.tag){var f=t("<"+r.tag+"/>").html(c(e.text)).addClass(r.className);"a"===r.tag.toLowerCase()&&f.attr("href","#"),p.append(f)}else p.html(c(e.text));!1===e.enabled&&p.addClass(o.disabled),e.className&&p.addClass(e.className),e.titleAttr&&p.attr("title",c(e.titleAttr)),e.attr&&p.attr(e.attr),e.namespace||(e.namespace=".dt-button-"+s++);var g,m=this.c.dom.buttonContainer;return g=m&&m.tag?t("<"+m.tag+"/>").addClass(m.className).append(p):p,this._addKey(e),this.c.buttonCreated&&(g=this.c.buttonCreated(e,g)),{conf:e,node:p.get(0),inserter:g,buttons:[],inCollection:i,collection:null}},_nodeToButton:function(t,e){e||(e=this.s.buttons);for(var i=0,n=e.length;i<n;i++){if(e[i].node===t)return e[i];if(e[i].buttons.length){var o=this._nodeToButton(t,e[i].buttons);if(o)return o}}},_nodeToHost:function(t,e){e||(e=this.s.buttons);for(var i=0,n=e.length;i<n;i++){if(e[i].node===t)return e;if(e[i].buttons.length){var o=this._nodeToHost(t,e[i].buttons);if(o)return o}}},_keypress:function(e,i){if(!i._buttonsHandled){var n=function(n,o){if(n.key)if(n.key===e)i._buttonsHandled=!0,t(o).click();else if(t.isPlainObject(n.key)){if(n.key.key!==e)return;if(n.key.shiftKey&&!i.shiftKey)return;if(n.key.altKey&&!i.altKey)return;if(n.key.ctrlKey&&!i.ctrlKey)return;if(n.key.metaKey&&!i.metaKey)return;i._buttonsHandled=!0,t(o).click()}},o=function(t){for(var e=0,i=t.length;e<i;e++)n(t[e].conf,t[e].node),t[e].buttons.length&&o(t[e].buttons)};o(this.s.buttons)}},_removeKey:function(e){if(e.key){var i=t.isPlainObject(e.key)?e.key.key:e.key,n=this.s.listenKeys.split(""),o=t.inArray(i,n);n.splice(o,1),this.s.listenKeys=n.join("")}},_resolveExtends:function(e){var i,o,r=this.s.dt,s=function(i){for(var o=0;!t.isPlainObject(i)&&!Array.isArray(i);){if(i===n)return;if("function"==typeof i){if(!(i=i(r,e)))return!1}else if("string"==typeof i){if(!a[i])throw"Unknown button type: "+i;i=a[i]}if(++o>30)throw"Buttons: Too many iterations"}return Array.isArray(i)?i:t.extend({},i)};for(e=s(e);e&&e.extend;){if(!a[e.extend])throw"Cannot extend unknown button type: "+e.extend;var l=s(a[e.extend]);if(Array.isArray(l))return l;if(!l)return!1;var c=l.className;e=t.extend({},l,e),c&&e.className!==c&&(e.className=c+" "+e.className);var d=e.postfixButtons;if(d){for(e.buttons||(e.buttons=[]),i=0,o=d.length;i<o;i++)e.buttons.push(d[i]);e.postfixButtons=null}var h=e.prefixButtons;if(h){for(e.buttons||(e.buttons=[]),i=0,o=h.length;i<o;i++)e.buttons.splice(i,0,h[i]);e.prefixButtons=null}e.extend=l.extend}return e},_popover:function(n,o,r){var s=o,a=this.c,d=t.extend({align:"button-left",autoClose:!1,background:!0,backgroundClassName:"dt-button-background",contentClassName:a.dom.collection.className,collectionLayout:"",collectionTitle:"",dropup:!1,fade:400,rightAlignClassName:"dt-button-right",tag:a.dom.collection.tag},r),u=o.node(),p=function(){c(t(".dt-button-collection"),d.fade,(function(){t(this).detach()})),t(s.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes()).attr("aria-expanded","false"),t("div.dt-button-background").off("click.dtb-collection"),h.background(!1,d.backgroundClassName,d.fade,u),t("body").off(".dtb-collection"),s.off("buttons-action.b-internal")};!1===n&&p();var f=t(s.buttons('[aria-haspopup="true"][aria-expanded="true"]').nodes());f.length&&(u=f.eq(0),p());var g=t("<div/>").addClass("dt-button-collection").addClass(d.collectionLayout).css("display","none");n=t(n).addClass(d.contentClassName).attr("role","menu").appendTo(g),u.attr("aria-expanded","true"),u.parents("body")[0]!==i.body&&(u=i.body.lastChild),d.collectionTitle&&g.prepend('<div class="dt-button-collection-title">'+d.collectionTitle+"</div>"),l(g.insertAfter(u),d.fade);var m=t(o.table().container()),v=g.css("position");if("dt-container"===d.align&&(u=u.parent(),g.css("width",m.width())),"absolute"===v){var y=u.position(),b=t(o.node()).position();g.css({top:b.top+u.outerHeight(),left:y.left});var x=g.outerHeight(),w=m.offset().top+m.height(),S=b.top+u.outerHeight()+x-w,C=b.top-x,k=m.offset().top,_=k-C,T=b.top-x-5;(S>_||d.dropup)&&-T<k&&g.css("top",T);var D=m.offset().left,E=D+m.width(),A=g.offset().left,I=A+g.width(),P=u.offset().left,M=P+u.outerWidth();if(g.hasClass(d.rightAlignClassName)||g.hasClass(d.leftAlignClassName)||"dt-container"===d.align){var L,R,O=0;g.hasClass(d.rightAlignClassName)?D>A+(O=M-I)&&(O+=(L=D-(A+O))>(R=E-(I+O))?R:L):E<I+(O=D-A)&&(O+=(L=D-(A+O))>(R=E-(I+O))?R:L),g.css("left",g.position().left+O)}else{var F=u.offset().top;O=0,O="button-right"===d.align?M-I:P-A,g.css("left",g.position().left+O)}}else(F=g.height()/2)>t(e).height()/2&&(F=t(e).height()/2),g.css("marginTop",-1*F);d.background&&h.background(!0,d.backgroundClassName,d.fade,u),t("div.dt-button-background").on("click.dtb-collection",(function(){})),t("body").on("click.dtb-collection",(function(e){var i=t.fn.addBack?"addBack":"andSelf",o=t(e.target).parent()[0];(!t(e.target).parents()[i]().filter(n).length&&!t(o).hasClass("dt-buttons")||t(e.target).hasClass("dt-button-background"))&&p()})).on("keyup.dtb-collection",(function(t){27===t.keyCode&&p()})),d.autoClose&&setTimeout((function(){s.on("buttons-action.b-internal",(function(t,e,i,n){n[0]!==u[0]&&p()}))}),0),t(g).trigger("buttons-popover.dt")}}),h.background=function(e,o,r,s){r===n&&(r=400),s||(s=i.body),e?l(t("<div/>").addClass(o).css("display","none").insertAfter(s),r):c(t("div."+o),r,(function(){t(this).removeClass(o).remove()}))},h.instanceSelector=function(e,i){if(e===n||null===e)return t.map(i,(function(t){return t.inst}));var o=[],r=t.map(i,(function(t){return t.name})),s=function(e){if(Array.isArray(e))for(var n=0,a=e.length;n<a;n++)s(e[n]);else if("string"==typeof e)if(-1!==e.indexOf(","))s(e.split(","));else{var l=t.inArray(e.trim(),r);-1!==l&&o.push(i[l].inst)}else"number"==typeof e&&o.push(i[e].inst)};return s(e),o},h.buttonSelector=function(e,i){for(var o=[],r=function(t,e,i){for(var o,s,a=0,l=e.length;a<l;a++)(o=e[a])&&(s=i!==n?i+a:a+"",t.push({node:o.node,name:o.conf.name,idx:s}),o.buttons&&r(t,o.buttons,s+"-"))},s=function(e,i){var a,l,c=[];r(c,i.s.buttons);var d=t.map(c,(function(t){return t.node}));if(Array.isArray(e)||e instanceof t)for(a=0,l=e.length;a<l;a++)s(e[a],i);else if(null===e||e===n||"*"===e)for(a=0,l=c.length;a<l;a++)o.push({inst:i,node:c[a].node});else if("number"==typeof e)o.push({inst:i,node:i.s.buttons[e].node});else if("string"==typeof e)if(-1!==e.indexOf(",")){var h=e.split(",");for(a=0,l=h.length;a<l;a++)s(h[a].trim(),i)}else if(e.match(/^\d+(\-\d+)*$/)){var u=t.map(c,(function(t){return t.idx}));o.push({inst:i,node:c[t.inArray(e,u)].node})}else if(-1!==e.indexOf(":name")){var p=e.replace(":name","");for(a=0,l=c.length;a<l;a++)c[a].name===p&&o.push({inst:i,node:c[a].node})}else t(d).filter(e).each((function(){o.push({inst:i,node:this})}));else if("object"==typeof e&&e.nodeName){var f=t.inArray(e,d);-1!==f&&o.push({inst:i,node:d[f]})}},a=0,l=e.length;a<l;a++){var c=e[a];s(i,c)}return o},h.stripData=function(t,e){return"string"!=typeof t||(t=(t=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")).replace(/<!\-\-.*?\-\->/g,""),e&&!e.stripHtml||(t=t.replace(/<[^>]*>/g,"")),e&&!e.trim||(t=t.replace(/^\s+|\s+$/g,"")),e&&!e.stripNewlines||(t=t.replace(/\n/g," ")),e&&!e.decodeEntities||(m.innerHTML=t,t=m.value)),t},h.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"},collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""}}},h.version="1.7.1",t.extend(a,{collection:{text:function(t){return t.i18n("buttons.collection","Collection")},className:"buttons-collection",init:function(t,e,i){e.attr("aria-expanded",!1)},action:function(t,e,i,n){t.stopPropagation(),n._collection.parents("body").length?this.popover(!1,n):this.popover(n._collection,n)},attr:{"aria-haspopup":!0}},copy:function(t,e){if(a.copyHtml5)return"copyHtml5"},csv:function(t,e){if(a.csvHtml5&&a.csvHtml5.available(t,e))return"csvHtml5"},excel:function(t,e){if(a.excelHtml5&&a.excelHtml5.available(t,e))return"excelHtml5"},pdf:function(t,e){if(a.pdfHtml5&&a.pdfHtml5.available(t,e))return"pdfHtml5"},pageLength:function(e){var i=e.settings()[0].aLengthMenu,n=[],o=[];if(Array.isArray(i[0]))n=i[0],o=i[1];else for(var r=0;r<i.length;r++){var s=i[r];t.isPlainObject(s)?(n.push(s.value),o.push(s.label)):(n.push(s),o.push(s))}return{extend:"collection",text:function(t){return t.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},t.page.len())},className:"buttons-page-length",autoClose:!0,buttons:t.map(n,(function(t,e){return{text:o[e],className:"button-page-length",action:function(e,i){i.page.len(t).draw()},init:function(e,i,n){var o=this,r=function(){o.active(e.page.len()===t)};e.on("length.dt"+n.namespace,r),r()},destroy:function(t,e,i){t.off("length.dt"+i.namespace)}}})),init:function(t,e,i){var n=this;t.on("length.dt"+i.namespace,(function(){n.text(i.text)}))},destroy:function(t,e,i){t.off("length.dt"+i.namespace)}}}}),o.Api.register("buttons()",(function(t,e){e===n&&(e=t,t=n),this.selector.buttonGroup=t;var i=this.iterator(!0,"table",(function(i){if(i._buttons)return h.buttonSelector(h.instanceSelector(t,i._buttons),e)}),!0);return i._groupSelector=t,i})),o.Api.register("button()",(function(t,e){var i=this.buttons(t,e);return i.length>1&&i.splice(1,i.length),i})),o.Api.registerPlural("buttons().active()","button().active()",(function(t){return t===n?this.map((function(t){return t.inst.active(t.node)})):this.each((function(e){e.inst.active(e.node,t)}))})),o.Api.registerPlural("buttons().action()","button().action()",(function(t){return t===n?this.map((function(t){return t.inst.action(t.node)})):this.each((function(e){e.inst.action(e.node,t)}))})),o.Api.register(["buttons().enable()","button().enable()"],(function(t){return this.each((function(e){e.inst.enable(e.node,t)}))})),o.Api.register(["buttons().disable()","button().disable()"],(function(){return this.each((function(t){t.inst.disable(t.node)}))})),o.Api.registerPlural("buttons().nodes()","button().node()",(function(){var e=t();return t(this.each((function(t){e=e.add(t.inst.node(t.node))}))),e})),o.Api.registerPlural("buttons().processing()","button().processing()",(function(t){return t===n?this.map((function(t){return t.inst.processing(t.node)})):this.each((function(e){e.inst.processing(e.node,t)}))})),o.Api.registerPlural("buttons().text()","button().text()",(function(t){return t===n?this.map((function(t){return t.inst.text(t.node)})):this.each((function(e){e.inst.text(e.node,t)}))})),o.Api.registerPlural("buttons().trigger()","button().trigger()",(function(){return this.each((function(t){t.inst.node(t.node).trigger("click")}))})),o.Api.register("button().popover()",(function(t,e){return this.map((function(i){return i.inst._popover(t,this.button(this[0].node),e)}))})),o.Api.register("buttons().containers()",(function(){var e=t(),i=this._groupSelector;return this.iterator(!0,"table",(function(t){if(t._buttons)for(var n=h.instanceSelector(i,t._buttons),o=0,r=n.length;o<r;o++)e=e.add(n[o].container())})),e})),o.Api.register("buttons().container()",(function(){return this.containers().eq(0)})),o.Api.register("button().add()",(function(t,e){var i=this.context;if(i.length){var n=h.instanceSelector(this._groupSelector,i[0]._buttons);n.length&&n[0].add(e,t)}return this.button(this._groupSelector,t)})),o.Api.register("buttons().destroy()",(function(){return this.pluck("inst").unique().each((function(t){t.destroy()})),this})),o.Api.registerPlural("buttons().remove()","buttons().remove()",(function(){return this.each((function(t){t.inst.remove(t.node)})),this})),o.Api.register("buttons.info()",(function(e,i,o){var r=this;return!1===e?(this.off("destroy.btn-info"),c(t("#datatables_buttons_info"),400,(function(){t(this).remove()})),clearTimeout(d),d=null,this):(d&&clearTimeout(d),t("#datatables_buttons_info").length&&t("#datatables_buttons_info").remove(),e=e?"<h2>"+e+"</h2>":"",l(t('<div id="datatables_buttons_info" class="dt-button-info"/>').html(e).append(t("<div/>")["string"==typeof i?"html":"append"](i)).css("display","none").appendTo("body")),o!==n&&0!==o&&(d=setTimeout((function(){r.buttons.info(!1)}),o)),this.on("destroy.btn-info",(function(){r.buttons.info(!1)})),this)})),o.Api.register("buttons.exportData()",(function(t){if(this.context.length)return v(new o.Api(this.context[0]),t)})),o.Api.register("buttons.exportInfo()",(function(t){return t||(t={}),{filename:u(t),title:f(t),messageTop:g(this,t.message||t.messageTop,"top"),messageBottom:g(this,t.messageBottom,"bottom")}}));var u=function(e){var i="*"===e.filename&&"*"!==e.title&&e.title!==n&&null!==e.title&&""!==e.title?e.title:e.filename;if("function"==typeof i&&(i=i()),i===n||null===i)return null;-1!==i.indexOf("*")&&(i=i.replace("*",t("head > title").text()).trim()),i=i.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,"");var o=p(e.extension);return o||(o=""),i+o},p=function(t){return null===t||t===n?null:"function"==typeof t?t():t},f=function(e){var i=p(e.title);return null===i?null:-1!==i.indexOf("*")?i.replace("*",t("head > title").text()||"Exported data"):i},g=function(e,i,n){var o=p(i);if(null===o)return null;var r=t("caption",e.table().container()).eq(0);return"*"===o?r.css("caption-side")!==n?null:r.length?r.text():"":o},m=t("<textarea/>")[0],v=function(e,i){var o=t.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(t){return h.stripData(t,o)},footer:function(t){return h.stripData(t,o)},body:function(t){return h.stripData(t,o)}},customizeData:null},i),r=e.columns(o.columns).indexes().map((function(t){var i=e.column(t).header();return o.format.header(i.innerHTML,t,i)})).toArray(),s=e.table().footer()?e.columns(o.columns).indexes().map((function(t){var i=e.column(t).footer();return o.format.footer(i?i.innerHTML:"",t,i)})).toArray():null,a=t.extend({},o.modifier);e.select&&"function"==typeof e.select.info&&a.selected===n&&e.rows(o.rows,t.extend({selected:!0},a)).any()&&t.extend(a,{selected:!0});for(var l=e.rows(o.rows,a).indexes().toArray(),c=e.cells(l,o.columns),d=c.render(o.orthogonal).toArray(),u=c.nodes().toArray(),p=r.length,f=[],g=0,m=0,v=p>0?d.length/p:0;m<v;m++){for(var y=[p],b=0;b<p;b++)y[b]=o.format.body(d[g],m,b,u[g]),g++;f[m]=y}var x={header:r,footer:s,body:f};return o.customizeData&&o.customizeData(x),x};function y(t,e){var i=new o.Api(t),n=e||i.init().buttons||o.defaults.buttons;return new h(i,n).container()}return t.fn.dataTable.Buttons=h,t.fn.DataTable.Buttons=h,t(i).on("init.dt plugin-init.dt",(function(t,e){if("dt"===t.namespace){var i=e.oInit.buttons||o.defaults.buttons;i&&!e._buttons&&new h(e,i).container()}})),o.ext.feature.push({fnInit:y,cFeature:"B"}),o.ext.features&&o.ext.features.register("buttons",y),h})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-buttons"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.Buttons||require("datatables.net-buttons")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable;return t.extend(!0,o.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group flex-wrap"},button:{className:"btn btn-secondary"},collection:{tag:"div",className:"dropdown-menu",button:{tag:"a",className:"dt-button dropdown-item",active:"active",disabled:"disabled"}}},buttonCreated:function(e,i){return e.buttons?t('<div class="btn-group"/>').append(i):i}}),o.ext.buttons.collection.className+=" dropdown-toggle",o.ext.buttons.collection.rightAlignClassName="dropdown-menu-right",o.Buttons})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i,n,o){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),i.fn.dataTable.Buttons||require("datatables.net-buttons")(e,i),t(i,e,e.document,n,o)}:t(jQuery,window,document)}((function(t,e,i,n,o,r){"use strict";var s=t.fn.dataTable;function a(){return n||e.JSZip}function l(){return o||e.pdfMake}s.Buttons.pdfMake=function(t){if(!t)return l();o=t},s.Buttons.jszip=function(t){if(!t)return a();n=t};var c=function(t){if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=t.document,i=function(){return t.URL||t.webkitURL||t},n=e.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in n,s=/constructor/i.test(t.HTMLElement)||t.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent),l=function(e){(t.setImmediate||t.setTimeout)((function(){throw e}),0)},c=function(t){setTimeout((function(){"string"==typeof t?i().revokeObjectURL(t):t.remove()}),4e4)},d=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},h=function(e,h,u){u||(e=d(e));var p,f=this,g="application/octet-stream"===e.type,m=function(){!function(t,e){for(var i=(e=[].concat(e)).length;i--;){var n=t["on"+e[i]];if("function"==typeof n)try{n.call(t,t)}catch(t){l(t)}}}(f,"writestart progress write writeend".split(" "))};if(f.readyState=f.INIT,o)return p=i().createObjectURL(e),void setTimeout((function(){var t,e;n.href=p,n.download=h,t=n,e=new MouseEvent("click"),t.dispatchEvent(e),m(),c(p),f.readyState=f.DONE}));!function(){if((a||g&&s)&&t.FileReader){var n=new FileReader;return n.onloadend=function(){var e=a?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=r,f.readyState=f.DONE,m()},n.readAsDataURL(e),void(f.readyState=f.INIT)}p||(p=i().createObjectURL(e)),g?t.location.href=p:t.open(p,"_blank")||(t.location.href=p),f.readyState=f.DONE,m(),c(p)}()},u=h.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,i){return e=e||t.name||"download",i||(t=d(t)),navigator.msSaveOrOpenBlob(t,e)}:(u.abort=function(){},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(t,e,i){return new h(t,e||t.name||"download",i)})}}("undefined"!=typeof self&&self||void 0!==e&&e||this.content);s.fileSave=c;var d=function(t){var e="Sheet1";return t.sheetName&&(e=t.sheetName.replace(/[\[\]\*\/\\\?\:]/g,"")),e},h=function(t){return t.newline?t.newline:navigator.userAgent.match(/Windows/)?"\r\n":"\n"},u=function(t,e){for(var i=h(e),n=t.buttons.exportData(e.exportOptions),o=e.fieldBoundary,s=e.fieldSeparator,a=new RegExp(o,"g"),l=e.escapeChar!==r?e.escapeChar:"\\",c=function(t){for(var e="",i=0,n=t.length;i<n;i++)i>0&&(e+=s),e+=o?o+(""+t[i]).replace(a,l+o)+o:t[i];return e},d=e.header?c(n.header)+i:"",u=e.footer&&n.footer?i+c(n.footer):"",p=[],f=0,g=n.body.length;f<g;f++)p.push(c(n.body[f]));return{str:d+p.join(i)+u,rows:p.length}},p=function(){if(-1===navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("Chrome")||-1!==navigator.userAgent.indexOf("Opera"))return!1;var t=navigator.userAgent.match(/AppleWebKit\/(\d+\.\d+)/);return!!(t&&t.length>1&&1*t[1]<603.1)};function f(t){for(var e="A".charCodeAt(0),i="Z".charCodeAt(0)-e+1,n="";t>=0;)n=String.fromCharCode(t%i+e)+n,t=Math.floor(t/i)-1;return n}try{var g,m=new XMLSerializer}catch(t){}function v(i,n){g===r&&(g=-1===m.serializeToString((new e.DOMParser).parseFromString(x["xl/worksheets/sheet1.xml"],"text/xml")).indexOf("xmlns:r")),t.each(n,(function(e,n){if(t.isPlainObject(n))v(i.folder(e),n);else{if(g){var o,r,s=n.childNodes[0],a=[];for(o=s.attributes.length-1;o>=0;o--){var l=s.attributes[o].nodeName,c=s.attributes[o].nodeValue;-1!==l.indexOf(":")&&(a.push({name:l,value:c}),s.removeAttribute(l))}for(o=0,r=a.length;o<r;o++){var d=n.createAttribute(a[o].name.replace(":","_dt_b_namespace_token_"));d.value=a[o].value,s.setAttributeNode(d)}}var h=m.serializeToString(n);g&&(-1===h.indexOf("<?xml")&&(h='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+h),h=(h=h.replace(/_dt_b_namespace_token_/g,":")).replace(/xmlns:NS[\d]+="" NS[\d]+:/g,"")),h=h.replace(/<([^<>]*?) xmlns=""([^<>]*?)>/g,"<$1 $2>"),i.file(e,h)}}))}function y(e,i,n){var o=e.createElement(i);return n&&(n.attr&&t(o).attr(n.attr),n.children&&t.each(n.children,(function(t,e){o.appendChild(e)})),null!==n.text&&n.text!==r&&o.appendChild(e.createTextNode(n.text))),o}function b(t,e){var i,n,o,s=t.header[e].length;t.footer&&t.footer[e].length>s&&(s=t.footer[e].length);for(var a=0,l=t.body.length;a<l;a++){var c=t.body[a][e];if(-1!==(o=null!==c&&c!==r?c.toString():"").indexOf("\n")?((n=o.split("\n")).sort((function(t,e){return e.length-t.length})),i=n[0].length):i=o.length,i>s&&(s=i),s>40)return 54}return(s*=1.35)>6?s:6}var x={"_rels/.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',"xl/_rels/workbook.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>',"[Content_Types].xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="jpeg" ContentType="image/jpeg" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /></Types>',"xl/workbook.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="24816"/><workbookPr showInkAnnotation="0" autoCompressPictures="0"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="25600" windowHeight="19020" tabRatio="500"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><definedNames/></workbook>',"xl/worksheets/sheet1.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><sheetData/><mergeCells count="0"/></worksheet>',"xl/styles.xml":'<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="6"><numFmt numFmtId="164" formatCode="#,##0.00_- [$$-45C]"/><numFmt numFmtId="165" formatCode="&quot;£&quot;#,##0.00"/><numFmt numFmtId="166" formatCode="[$€-2] #,##0.00"/><numFmt numFmtId="167" formatCode="0.0%"/><numFmt numFmtId="168" formatCode="#,##0;(#,##0)"/><numFmt numFmtId="169" formatCode="#,##0.00;(#,##0.00)"/></numFmts><fonts count="5" x14ac:knownFonts="1"><font><sz val="11" /><name val="Calibri" /></font><font><sz val="11" /><name val="Calibri" /><color rgb="FFFFFFFF" /></font><font><sz val="11" /><name val="Calibri" /><b /></font><font><sz val="11" /><name val="Calibri" /><i /></font><font><sz val="11" /><name val="Calibri" /><u /></font></fonts><fills count="6"><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="none" /></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD9D9D9" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="FFD99795" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6efce" /><bgColor indexed="64" /></patternFill></fill><fill><patternFill patternType="solid"><fgColor rgb="ffc6cfef" /><bgColor indexed="64" /></patternFill></fill></fills><borders count="2"><border><left /><right /><top /><bottom /><diagonal /></border><border diagonalUp="false" diagonalDown="false"><left style="thin"><color auto="1" /></left><right style="thin"><color auto="1" /></right><top style="thin"><color auto="1" /></top><bottom style="thin"><color auto="1" /></bottom><diagonal /></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" /></cellStyleXfs><cellXfs count="68"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="0" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="0" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="3" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="4" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="1" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="2" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="3" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="4" fillId="5" borderId="1" applyFont="1" applyFill="1" applyBorder="1"/><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="left"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="center"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="right"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment horizontal="fill"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment textRotation="90"/></xf><xf numFmtId="0" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyAlignment="1"><alignment wrapText="1"/></xf><xf numFmtId="9"   fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="164" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="165" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="166" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="167" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="168" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="169" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="3" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="4" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="1" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="2" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/><xf numFmtId="14" fontId="0" fillId="0" borderId="0" applyFont="1" applyFill="1" applyBorder="1" xfId="0" applyNumberFormat="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0" /></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4" /></styleSheet>'},w=[{match:/^\-?\d+\.\d%$/,style:60,fmt:function(t){return t/100}},{match:/^\-?\d+\.?\d*%$/,style:56,fmt:function(t){return t/100}},{match:/^\-?\$[\d,]+.?\d*$/,style:57},{match:/^\-?£[\d,]+.?\d*$/,style:58},{match:/^\-?€[\d,]+.?\d*$/,style:59},{match:/^\-?\d+$/,style:65},{match:/^\-?\d+\.\d{2}$/,style:66},{match:/^\([\d,]+\)$/,style:61,fmt:function(t){return-1*t.replace(/[\(\)]/g,"")}},{match:/^\([\d,]+\.\d{2}\)$/,style:62,fmt:function(t){return-1*t.replace(/[\(\)]/g,"")}},{match:/^\-?[\d,]+$/,style:63},{match:/^\-?[\d,]+\.\d{2}$/,style:64},{match:/^[\d]{4}\-[\d]{2}\-[\d]{2}$/,style:67,fmt:function(t){return Math.round(25569+Date.parse(t)/864e5)}}];return s.ext.buttons.copyHtml5={className:"buttons-copy buttons-html5",text:function(t){return t.i18n("buttons.copy","Copy")},action:function(e,n,o,r){this.processing(!0);var s=this,a=u(n,r),l=n.buttons.exportInfo(r),c=h(r),d=a.str,p=t("<div/>").css({height:1,width:1,overflow:"hidden",position:"fixed",top:0,left:0});l.title&&(d=l.title+c+c+d),l.messageTop&&(d=l.messageTop+c+c+d),l.messageBottom&&(d=d+c+c+l.messageBottom),r.customize&&(d=r.customize(d,r,n));var f=t("<textarea readonly/>").val(d).appendTo(p);if(i.queryCommandSupported("copy")){p.appendTo(n.table().container()),f[0].focus(),f[0].select();try{var g=i.execCommand("copy");if(p.remove(),g)return n.buttons.info(n.i18n("buttons.copyTitle","Copy to clipboard"),n.i18n("buttons.copySuccess",{1:"Copied one row to clipboard",_:"Copied %d rows to clipboard"},a.rows),2e3),void this.processing(!1)}catch(t){}}var m=t("<span>"+n.i18n("buttons.copyKeys","Press <i>ctrl</i> or <i>⌘</i> + <i>C</i> to copy the table data<br>to your system clipboard.<br><br>To cancel, click this message or press escape.")+"</span>").append(p);n.buttons.info(n.i18n("buttons.copyTitle","Copy to clipboard"),m,0),f[0].focus(),f[0].select();var v=t(m).closest(".dt-button-info"),y=function(){v.off("click.buttons-copy"),t(i).off(".buttons-copy"),n.buttons.info(!1)};v.on("click.buttons-copy",y),t(i).on("keydown.buttons-copy",(function(t){27===t.keyCode&&(y(),s.processing(!1))})).on("copy.buttons-copy cut.buttons-copy",(function(){y(),s.processing(!1)}))},exportOptions:{},fieldSeparator:"\t",fieldBoundary:"",header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*"},s.ext.buttons.csvHtml5={bom:!1,className:"buttons-csv buttons-html5",available:function(){return e.FileReader!==r&&e.Blob},text:function(t){return t.i18n("buttons.csv","CSV")},action:function(t,e,n,o){this.processing(!0);var r=u(e,o).str,s=e.buttons.exportInfo(o),a=o.charset;o.customize&&(r=o.customize(r,o,e)),!1!==a?(a||(a=i.characterSet||i.charset),a&&(a=";charset="+a)):a="",o.bom&&(r=String.fromCharCode(65279)+r),c(new Blob([r],{type:"text/csv"+a}),s.filename,!0),this.processing(!1)},filename:"*",extension:".csv",exportOptions:{},fieldSeparator:",",fieldBoundary:'"',escapeChar:'"',charset:null,header:!0,footer:!1},s.ext.buttons.excelHtml5={className:"buttons-excel buttons-html5",available:function(){return e.FileReader!==r&&a()!==r&&!p()&&m},text:function(t){return t.i18n("buttons.excel","Excel")},action:function(e,i,n,o){this.processing(!0);var s,l,h,u,p=this,g=0,m=function(e){var i=x[e];return t.parseXML(i)},S=m("xl/worksheets/sheet1.xml"),C=S.getElementsByTagName("sheetData")[0],k={_rels:{".rels":m("_rels/.rels")},xl:{_rels:{"workbook.xml.rels":m("xl/_rels/workbook.xml.rels")},"workbook.xml":m("xl/workbook.xml"),"styles.xml":m("xl/styles.xml"),worksheets:{"sheet1.xml":S}},"[Content_Types].xml":m("[Content_Types].xml")},_=i.buttons.exportData(o.exportOptions),T=function(t){u=y(S,"row",{attr:{r:h=g+1}});for(var e=0,i=t.length;e<i;e++){var n=f(e)+""+h,s=null;if(null===t[e]||t[e]===r||""===t[e]){if(!0!==o.createEmptyCells)continue;t[e]=""}var a=t[e];t[e]="function"==typeof t[e].trim?t[e].trim():t[e];for(var l=0,c=w.length;l<c;l++){var d=w[l];if(t[e].match&&!t[e].match(/^0\d+/)&&t[e].match(d.match)){var p=t[e].replace(/[^\d\.\-]/g,"");d.fmt&&(p=d.fmt(p)),s=y(S,"c",{attr:{r:n,s:d.style},children:[y(S,"v",{text:p})]});break}}if(!s)if("number"==typeof t[e]||t[e].match&&t[e].match(/^-?\d+(\.\d+)?$/)&&!t[e].match(/^0\d+/))s=y(S,"c",{attr:{t:"n",r:n},children:[y(S,"v",{text:t[e]})]});else{var m=a.replace?a.replace(/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,""):a;s=y(S,"c",{attr:{t:"inlineStr",r:n},children:{row:y(S,"is",{children:{row:y(S,"t",{text:m,attr:{"xml:space":"preserve"}})}})}})}u.appendChild(s)}C.appendChild(u),g++};o.customizeData&&o.customizeData(_);var D=function(e,i){var n=t("mergeCells",S);n[0].appendChild(y(S,"mergeCell",{attr:{ref:"A"+e+":"+f(i)+e}})),n.attr("count",parseFloat(n.attr("count"))+1),t("row:eq("+(e-1)+") c",S).attr("s","51")},E=i.buttons.exportInfo(o);E.title&&(T([E.title]),D(g,_.header.length-1)),E.messageTop&&(T([E.messageTop]),D(g,_.header.length-1)),o.header&&(T(_.header),t("row:last c",S).attr("s","2")),s=g;for(var A=0,I=_.body.length;A<I;A++)T(_.body[A]);l=g,o.footer&&_.footer&&(T(_.footer),t("row:last c",S).attr("s","2")),E.messageBottom&&(T([E.messageBottom]),D(g,_.header.length-1));var P=y(S,"cols");t("worksheet",S).prepend(P);for(var M=0,L=_.header.length;M<L;M++)P.appendChild(y(S,"col",{attr:{min:M+1,max:M+1,width:b(_,M),customWidth:1}}));var R=k.xl["workbook.xml"];t("sheets sheet",R).attr("name",d(o)),o.autoFilter&&(t("mergeCells",S).before(y(S,"autoFilter",{attr:{ref:"A"+s+":"+f(_.header.length-1)+l}})),t("definedNames",R).append(y(R,"definedName",{attr:{name:"_xlnm._FilterDatabase",localSheetId:"0",hidden:1},text:d(o)+"!$A$"+s+":"+f(_.header.length-1)+l}))),o.customize&&o.customize(k,o,i),0===t("mergeCells",S).children().length&&t("mergeCells",S).remove();var O=new(a()),F={type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};v(O,k),O.generateAsync?O.generateAsync(F).then((function(t){c(t,E.filename),p.processing(!1)})):(c(O.generate(F),E.filename),this.processing(!1))},filename:"*",extension:".xlsx",exportOptions:{},header:!0,footer:!1,title:"*",messageTop:"*",messageBottom:"*",createEmptyCells:!1,autoFilter:!1,sheetName:""},s.ext.buttons.pdfHtml5={className:"buttons-pdf buttons-html5",available:function(){return e.FileReader!==r&&l()},text:function(t){return t.i18n("buttons.pdf","PDF")},action:function(e,i,n,o){this.processing(!0);var s=i.buttons.exportData(o.exportOptions),a=i.buttons.exportInfo(o),c=[];o.header&&c.push(t.map(s.header,(function(t){return{text:"string"==typeof t?t:t+"",style:"tableHeader"}})));for(var d=0,h=s.body.length;d<h;d++)c.push(t.map(s.body[d],(function(t){return null!==t&&t!==r||(t=""),{text:"string"==typeof t?t:t+"",style:d%2?"tableBodyEven":"tableBodyOdd"}})));o.footer&&s.footer&&c.push(t.map(s.footer,(function(t){return{text:"string"==typeof t?t:t+"",style:"tableFooter"}})));var u={pageSize:o.pageSize,pageOrientation:o.orientation,content:[{table:{headerRows:1,body:c},layout:"noBorders"}],styles:{tableHeader:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154",alignment:"center"},tableBodyEven:{},tableBodyOdd:{fillColor:"#f3f3f3"},tableFooter:{bold:!0,fontSize:11,color:"white",fillColor:"#2d4154"},title:{alignment:"center",fontSize:15},message:{}},defaultStyle:{fontSize:10}};a.messageTop&&u.content.unshift({text:a.messageTop,style:"message",margin:[0,0,0,12]}),a.messageBottom&&u.content.push({text:a.messageBottom,style:"message",margin:[0,0,0,12]}),a.title&&u.content.unshift({text:a.title,style:"title",margin:[0,0,0,12]}),o.customize&&o.customize(u,o,i);var f=l().createPdf(u);"open"!==o.download||p()?f.download(a.filename):f.open(),this.processing(!1)},title:"*",filename:"*",extension:".pdf",exportOptions:{},orientation:"portrait",pageSize:"A4",header:!0,footer:!1,messageTop:"*",messageBottom:"*",customize:null,download:"download"},s.Buttons})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),i.fn.dataTable.Buttons||require("datatables.net-buttons")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=i.createElement("a"),s=function(t){r.href=t;var e=r.host;return-1===e.indexOf("/")&&0!==r.pathname.indexOf("/")&&(e+="/"),r.protocol+"//"+e+r.pathname+r.search};return o.ext.buttons.print={className:"buttons-print",text:function(t){return t.i18n("buttons.print","Print")},action:function(i,o,r,a){var l=o.buttons.exportData(t.extend({decodeEntities:!1},a.exportOptions)),c=o.buttons.exportInfo(a),d=o.columns(a.exportOptions.columns).flatten().map((function(t){return o.settings()[0].aoColumns[o.column(t).index()].sClass})).toArray(),h=function(t,e){for(var i="<tr>",o=0,r=t.length;o<r;o++){var s=null===t[o]||t[o]===n?"":t[o];i+="<"+e+" "+(d[o]?'class="'+d[o]+'"':"")+">"+s+"</"+e+">"}return i+"</tr>"},u='<table class="'+o.table().node().className+'">';a.header&&(u+="<thead>"+h(l.header,"th")+"</thead>"),u+="<tbody>";for(var p=0,f=l.body.length;p<f;p++)u+=h(l.body[p],"td");u+="</tbody>",a.footer&&l.footer&&(u+="<tfoot>"+h(l.footer,"th")+"</tfoot>"),u+="</table>";var g=e.open("","");if(g){g.document.close();var m="<title>"+c.title+"</title>";t("style, link").each((function(){var e;m+=("link"===(e=t(this).clone()[0]).nodeName.toLowerCase()&&(e.href=s(e.href)),e.outerHTML)}));try{g.document.head.innerHTML=m}catch(i){t(g.document.head).html(m)}g.document.body.innerHTML="<h1>"+c.title+"</h1><div>"+(c.messageTop||"")+"</div>"+u+"<div>"+(c.messageBottom||"")+"</div>",t(g.document.body).addClass("dt-print-view"),t("img",g.document.body).each((function(t,e){e.setAttribute("src",s(e.getAttribute("src")))})),a.customize&&a.customize(g,a,o);var v=function(){a.autoPrint&&(g.print(),g.close())};navigator.userAgent.match(/Trident\/\d.\d/)?v():g.setTimeout(v,1e3)}else o.buttons.info(o.i18n("buttons.printErrorTitle","Unable to open print view"),o.i18n("buttons.printErrorMsg","Please allow popups in your browser for this site to be able to view the print view."),5e3)},title:"*",messageTop:"*",messageBottom:"*",exportOptions:{},header:!0,footer:!1,autoPrint:!0,customize:null},o.Buttons})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),i.fn.dataTable.Buttons||require("datatables.net-buttons")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable;return t.extend(o.ext.buttons,{colvis:function(t,e){return{extend:"collection",text:function(t){return t.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",buttons:[{extend:"columnsToggle",columns:e.columns,columnText:e.columnText}]}},columnsToggle:function(t,e){return t.columns(e.columns).indexes().map((function(t){return{extend:"columnToggle",columns:t,columnText:e.columnText}})).toArray()},columnToggle:function(t,e){return{extend:"columnVisibility",columns:e.columns,columnText:e.columnText}},columnsVisibility:function(t,e){return t.columns(e.columns).indexes().map((function(t){return{extend:"columnVisibility",columns:t,visibility:e.visibility,columnText:e.columnText}})).toArray()},columnVisibility:{columns:n,text:function(t,e,i){return i._columnText(t,i)},className:"buttons-columnVisibility",action:function(t,e,i,o){var r=e.columns(o.columns),s=r.visible();r.visible(o.visibility!==n?o.visibility:!(s.length&&s[0]))},init:function(t,e,i){var n=this;e.attr("data-cv-idx",i.columns),t.on("column-visibility.dt"+i.namespace,(function(e,o){o.bDestroying||o.nTable!=t.settings()[0].nTable||n.active(t.column(i.columns).visible())})).on("column-reorder.dt"+i.namespace,(function(e,o,r){1===t.columns(i.columns).count()&&(n.text(i._columnText(t,i)),n.active(t.column(i.columns).visible()))})),this.active(t.column(i.columns).visible())},destroy:function(t,e,i){t.off("column-visibility.dt"+i.namespace).off("column-reorder.dt"+i.namespace)},_columnText:function(t,e){var i=t.column(e.columns).index(),n=t.settings()[0].aoColumns[i].sTitle;return n||(n=t.column(i).header().innerHTML),n=n.replace(/\n/g," ").replace(/<br\s*\/?>/gi," ").replace(/<select(.*?)<\/select>/g,"").replace(/<!\-\-.*?\-\->/g,"").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,""),e.columnText?e.columnText(t,i,n):n}},colvisRestore:{className:"buttons-colvisRestore",text:function(t){return t.i18n("buttons.colvisRestore","Restore visibility")},init:function(t,e,i){i._visOriginal=t.columns().indexes().map((function(e){return t.column(e).visible()})).toArray()},action:function(t,e,i,n){e.columns().every((function(t){var i=e.colReorder&&e.colReorder.transpose?e.colReorder.transpose(t,"toOriginal"):t;this.visible(n._visOriginal[i])}))}},colvisGroup:{className:"buttons-colvisGroup",action:function(t,e,i,n){e.columns(n.show).visible(!0,!1),e.columns(n.hide).visible(!1,!1),e.columns.adjust()},show:[],hide:[]}}),o.Buttons})),$.extend(!0,$.fn.dataTable.Buttons.defaults,{dom:{container:{className:"dt-buttons"},button:{className:"btn"}}}),$.fn.dataTable.AutoFill.classes.btn="btn btn-primary",function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable;function r(t){for(var e=[],i=0,n=t.length;i<n;i++)e[t[i]]=i;return e}function s(t,e,i){var n=t.splice(e,1)[0];t.splice(i,0,n)}function a(t,e,i){for(var n=[],o=0,r=t.childNodes.length;o<r;o++)1==t.childNodes[o].nodeType&&n.push(t.childNodes[o]);var s=n[e];null!==i?t.insertBefore(s,n[i]):t.appendChild(s)}t.fn.dataTableExt.oApi.fnColReorder=function(e,i,o,l,c){var d,h,u,p,f,g,m,v=e.aoColumns.length,y=function(t,e,i){if(t[e]&&"function"!=typeof t[e]){var n=t[e].split("."),o=n.shift();isNaN(1*o)||(t[e]=i[1*o]+"."+n.join("."))}};if(i!=o)if(i<0||i>=v)this.oApi._fnLog(e,1,"ColReorder 'from' index is out of bounds: "+i);else if(o<0||o>=v)this.oApi._fnLog(e,1,"ColReorder 'to' index is out of bounds: "+o);else{var b=[];for(d=0,h=v;d<h;d++)b[d]=d;s(b,i,o);var x=r(b);for(d=0,h=e.aaSorting.length;d<h;d++)e.aaSorting[d][0]=x[e.aaSorting[d][0]];if(null!==e.aaSortingFixed)for(d=0,h=e.aaSortingFixed.length;d<h;d++)e.aaSortingFixed[d][0]=x[e.aaSortingFixed[d][0]];for(d=0,h=v;d<h;d++){for(u=0,p=(m=e.aoColumns[d]).aDataSort.length;u<p;u++)m.aDataSort[u]=x[m.aDataSort[u]];m.idx=x[m.idx]}for(t.each(e.aLastSort,(function(t,i){e.aLastSort[t].src=x[i.src]})),d=0,h=v;d<h;d++)"number"==typeof(m=e.aoColumns[d]).mData?m.mData=x[m.mData]:t.isPlainObject(m.mData)&&(y(m.mData,"_",x),y(m.mData,"filter",x),y(m.mData,"sort",x),y(m.mData,"type",x));if(e.aoColumns[i].bVisible){var w=this.oApi._fnColumnIndexToVisible(e,i),S=null;for(d=o<i?o:o+1;null===S&&d<v;)S=this.oApi._fnColumnIndexToVisible(e,d),d++;for(d=0,h=(g=e.nTHead.getElementsByTagName("tr")).length;d<h;d++)a(g[d],w,S);if(null!==e.nTFoot)for(d=0,h=(g=e.nTFoot.getElementsByTagName("tr")).length;d<h;d++)a(g[d],w,S);for(d=0,h=e.aoData.length;d<h;d++)null!==e.aoData[d].nTr&&a(e.aoData[d].nTr,w,S)}for(s(e.aoColumns,i,o),d=0,h=v;d<h;d++)e.oApi._fnColumnOptions(e,d,{});for(s(e.aoPreSearchCols,i,o),d=0,h=e.aoData.length;d<h;d++){var C=e.aoData[d],k=C.anCells;if(k)for(s(k,i,o),u=0,f=k.length;u<f;u++)k[u]&&k[u]._DT_CellIndex&&(k[u]._DT_CellIndex.column=u);Array.isArray(C._aData)&&s(C._aData,i,o)}for(d=0,h=e.aoHeader.length;d<h;d++)s(e.aoHeader[d],i,o);if(null!==e.aoFooter)for(d=0,h=e.aoFooter.length;d<h;d++)s(e.aoFooter[d],i,o);for((c||c===n)&&t.fn.dataTable.Api(e).rows().invalidate("data"),d=0,h=v;d<h;d++)t(e.aoColumns[d].nTh).off(".DT"),this.oApi._fnSortAttachListener(e,e.aoColumns[d].nTh,d);t(e.oInstance).trigger("column-reorder.dt",[e,{from:i,to:o,mapping:x,drop:l,iFrom:i,iTo:o,aiInvertMapping:x}])}};var l=function(e,i){var n=new t.fn.dataTable.Api(e).settings()[0];if(n._colReorder)return n._colReorder;!0===i&&(i={});var o=t.fn.dataTable.camelToHungarian;return o&&(o(l.defaults,l.defaults,!0),o(l.defaults,i||{})),this.s={dt:null,enable:null,init:t.extend(!0,{},l.defaults,i),fixed:0,fixedRight:0,reorderCallback:null,mouse:{startX:-1,startY:-1,offsetX:-1,offsetY:-1,target:-1,targetIndex:-1,fromIndex:-1},aoTargets:[]},this.dom={drag:null,pointer:null},this.s.enable=this.s.init.bEnable,this.s.dt=n,this.s.dt._colReorder=this,this._fnConstruct(),this};return t.extend(l.prototype,{fnEnable:function(t){if(!1===t)return fnDisable();this.s.enable=!0},fnDisable:function(){this.s.enable=!1},fnReset:function(){return this._fnOrderColumns(this.fnOrder()),this},fnGetCurrentOrder:function(){return this.fnOrder()},fnOrder:function(e,i){var o,s,a=[],l=this.s.dt.aoColumns;if(e===n){for(o=0,s=l.length;o<s;o++)a.push(l[o]._ColReorder_iOrigCol);return a}if(i){var c=this.fnOrder();for(o=0,s=e.length;o<s;o++)a.push(t.inArray(e[o],c));e=a}return this._fnOrderColumns(r(e)),this},fnTranspose:function(e,i){i||(i="toCurrent");var n=this.fnOrder(),o=this.s.dt.aoColumns;return"toCurrent"===i?Array.isArray(e)?t.map(e,(function(e){return t.inArray(e,n)})):t.inArray(e,n):Array.isArray(e)?t.map(e,(function(t){return o[t]._ColReorder_iOrigCol})):o[e]._ColReorder_iOrigCol},_fnConstruct:function(){var e,i=this,n=this.s.dt.aoColumns.length,o=this.s.dt.nTable;for(this.s.init.iFixedColumns&&(this.s.fixed=this.s.init.iFixedColumns),this.s.init.iFixedColumnsLeft&&(this.s.fixed=this.s.init.iFixedColumnsLeft),this.s.fixedRight=this.s.init.iFixedColumnsRight?this.s.init.iFixedColumnsRight:0,this.s.init.fnReorderCallback&&(this.s.reorderCallback=this.s.init.fnReorderCallback),e=0;e<n;e++)e>this.s.fixed-1&&e<n-this.s.fixedRight&&this._fnMouseListener(e,this.s.dt.aoColumns[e].nTh),this.s.dt.aoColumns[e]._ColReorder_iOrigCol=e;this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",(function(t,e){i._fnStateSave.call(i,e)}),"ColReorder_State"),this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateLoadParams",(function(t,e){i.s.dt._colReorder.fnOrder(e.ColReorder,!0)}));var s=null;if(this.s.init.aiOrder&&(s=this.s.init.aiOrder.slice()),this.s.dt.oLoadedState&&void 0!==this.s.dt.oLoadedState.ColReorder&&this.s.dt.oLoadedState.ColReorder.length==this.s.dt.aoColumns.length&&(s=this.s.dt.oLoadedState.ColReorder),s)if(i.s.dt._bInitComplete){var a=r(s);i._fnOrderColumns.call(i,a)}else{var l=!1;t(o).on("draw.dt.colReorder",(function(){if(!i.s.dt._bInitComplete&&!l){l=!0;var t=r(s);i._fnOrderColumns.call(i,t)}}))}else this._fnSetColumnIndexes();t(o).on("destroy.dt.colReorder",(function(){t(o).off("destroy.dt.colReorder draw.dt.colReorder"),t.each(i.s.dt.aoColumns,(function(e,i){t(i.nTh).off(".ColReorder"),t(i.nTh).removeAttr("data-column-index")})),i.s.dt._colReorder=null,i.s=null}))},_fnOrderColumns:function(e){var i=!1;if(e.length==this.s.dt.aoColumns.length){for(var n=0,o=e.length;n<o;n++){var r=t.inArray(n,e);n!=r&&(s(e,r,n),this.s.dt.oInstance.fnColReorder(r,n,!0,!1),i=!0)}this._fnSetColumnIndexes(),i&&(t.fn.dataTable.Api(this.s.dt).rows().invalidate("data"),""===this.s.dt.oScroll.sX&&""===this.s.dt.oScroll.sY||this.s.dt.oInstance.fnAdjustColumnSizing(!1),this.s.dt.oInstance.oApi._fnSaveState(this.s.dt),null!==this.s.reorderCallback&&this.s.reorderCallback.call(this))}else this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"ColReorder - array reorder does not match known number of columns. Skipping.")},_fnStateSave:function(e){if(null!==this.s){var i,n,o,r=this.s.dt.aoColumns;if(e.ColReorder=[],e.aaSorting){for(i=0;i<e.aaSorting.length;i++)e.aaSorting[i][0]=r[e.aaSorting[i][0]]._ColReorder_iOrigCol;var s=t.extend(!0,[],e.aoSearchCols);for(i=0,n=r.length;i<n;i++)o=r[i]._ColReorder_iOrigCol,e.aoSearchCols[o]=s[i],e.abVisCols[o]=r[i].bVisible,e.ColReorder.push(o)}else if(e.order){for(i=0;i<e.order.length;i++)e.order[i][0]=r[e.order[i][0]]._ColReorder_iOrigCol;var a=t.extend(!0,[],e.columns);for(i=0,n=r.length;i<n;i++)o=r[i]._ColReorder_iOrigCol,e.columns[o]=a[i],e.ColReorder.push(o)}}},_fnMouseListener:function(e,i){var n=this;t(i).on("mousedown.ColReorder",(function(t){n.s.enable&&1===t.which&&n._fnMouseDown.call(n,t,i)})).on("touchstart.ColReorder",(function(t){n.s.enable&&n._fnMouseDown.call(n,t,i)}))},_fnMouseDown:function(e,o){var r=this,s=t(e.target).closest("th, td").offset(),a=parseInt(t(o).attr("data-column-index"),10);a!==n&&(this.s.mouse.startX=this._fnCursorPosition(e,"pageX"),this.s.mouse.startY=this._fnCursorPosition(e,"pageY"),this.s.mouse.offsetX=this._fnCursorPosition(e,"pageX")-s.left,this.s.mouse.offsetY=this._fnCursorPosition(e,"pageY")-s.top,this.s.mouse.target=this.s.dt.aoColumns[a].nTh,this.s.mouse.targetIndex=a,this.s.mouse.fromIndex=a,this._fnRegions(),t(i).on("mousemove.ColReorder touchmove.ColReorder",(function(t){r._fnMouseMove.call(r,t)})).on("mouseup.ColReorder touchend.ColReorder",(function(t){r._fnMouseUp.call(r,t)})))},_fnMouseMove:function(t){var e,i=this;if(null===this.dom.drag){if(Math.pow(Math.pow(this._fnCursorPosition(t,"pageX")-this.s.mouse.startX,2)+Math.pow(this._fnCursorPosition(t,"pageY")-this.s.mouse.startY,2),.5)<5)return;this._fnCreateDragNode()}this.dom.drag.css({left:this._fnCursorPosition(t,"pageX")-this.s.mouse.offsetX,top:this._fnCursorPosition(t,"pageY")-this.s.mouse.offsetY});for(var n=this.s.mouse.toIndex,o=this._fnCursorPosition(t,"pageX"),r=function(t){for(;t>=0;){if(--t<=0)return null;if(i.s.aoTargets[t+1].x!==i.s.aoTargets[t].x)return i.s.aoTargets[t]}},s=function(){for(var t=0;t<i.s.aoTargets.length-1;t++)if(i.s.aoTargets[t].x!==i.s.aoTargets[t+1].x)return i.s.aoTargets[t]},a=function(){for(var t=i.s.aoTargets.length-1;t>0;t--)if(i.s.aoTargets[t].x!==i.s.aoTargets[t-1].x)return i.s.aoTargets[t]},l=1;l<this.s.aoTargets.length;l++){var c=r(l);c||(c=s());var d=c.x+(this.s.aoTargets[l].x-c.x)/2;if(this._fnIsLtr()){if(o<d){e=c;break}}else if(o>d){e=c;break}}e?(this.dom.pointer.css("left",e.x),this.s.mouse.toIndex=e.to):(this.dom.pointer.css("left",a().x),this.s.mouse.toIndex=a().to),this.s.init.bRealtime&&n!==this.s.mouse.toIndex&&(this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex),this.s.mouse.fromIndex=this.s.mouse.toIndex,""===this.s.dt.oScroll.sX&&""===this.s.dt.oScroll.sY||this.s.dt.oInstance.fnAdjustColumnSizing(!1),this._fnRegions())},_fnMouseUp:function(e){t(i).off(".ColReorder"),null!==this.dom.drag&&(this.dom.drag.remove(),this.dom.pointer.remove(),this.dom.drag=null,this.dom.pointer=null,this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex,!0),this._fnSetColumnIndexes(),""===this.s.dt.oScroll.sX&&""===this.s.dt.oScroll.sY||this.s.dt.oInstance.fnAdjustColumnSizing(!1),this.s.dt.oInstance.oApi._fnSaveState(this.s.dt),null!==this.s.reorderCallback&&this.s.reorderCallback.call(this))},_fnRegions:function(){var e=this.s.dt.aoColumns,i=this._fnIsLtr();this.s.aoTargets.splice(0,this.s.aoTargets.length);var n=t(this.s.dt.nTable).offset().left,o=[];t.each(e,(function(e,r){if(r.bVisible&&"none"!==r.nTh.style.display){var s=t(r.nTh),a=s.offset().left;i&&(a+=s.outerWidth()),o.push({index:e,bound:a}),n=a}else o.push({index:e,bound:n})}));var r=o[0],s=t(e[r.index].nTh).outerWidth();this.s.aoTargets.push({to:0,x:r.bound-s});for(var a=0;a<o.length;a++){var l=o[a],c=l.index;l.index<this.s.mouse.fromIndex&&c++,this.s.aoTargets.push({to:c,x:l.bound})}0!==this.s.fixedRight&&this.s.aoTargets.splice(this.s.aoTargets.length-this.s.fixedRight),0!==this.s.fixed&&this.s.aoTargets.splice(0,this.s.fixed)},_fnCreateDragNode:function(){var e=""!==this.s.dt.oScroll.sX||""!==this.s.dt.oScroll.sY,i=this.s.dt.aoColumns[this.s.mouse.targetIndex].nTh,n=i.parentNode,o=n.parentNode,r=o.parentNode,s=t(i).clone();this.dom.drag=t(r.cloneNode(!1)).addClass("DTCR_clonedTable").append(t(o.cloneNode(!1)).append(t(n.cloneNode(!1)).append(s[0]))).css({position:"absolute",top:0,left:0,width:t(i).outerWidth(),height:t(i).outerHeight()}).appendTo("body"),this.dom.pointer=t("<div></div>").addClass("DTCR_pointer").css({position:"absolute",top:e?t(t(this.s.dt.nScrollBody).parent()).offset().top:t(this.s.dt.nTable).offset().top,height:e?t(t(this.s.dt.nScrollBody).parent()).height():t(this.s.dt.nTable).height()}).appendTo("body")},_fnSetColumnIndexes:function(){t.each(this.s.dt.aoColumns,(function(e,i){t(i.nTh).attr("data-column-index",e)}))},_fnCursorPosition:function(t,e){return-1!==t.type.indexOf("touch")?t.originalEvent.touches[0][e]:t[e]},_fnIsLtr:function(){return"rtl"!==t(this.s.dt.nTable).css("direction")}}),l.defaults={aiOrder:null,bEnable:!0,bRealtime:!0,iFixedColumnsLeft:0,iFixedColumnsRight:0,fnReorderCallback:null},l.version="1.5.6",t.fn.dataTable.ColReorder=l,t.fn.DataTable.ColReorder=l,"function"==typeof t.fn.dataTable&&"function"==typeof t.fn.dataTableExt.fnVersionCheck&&t.fn.dataTableExt.fnVersionCheck("1.10.8")?t.fn.dataTableExt.aoFeatures.push({fnInit:function(t){var e=t.oInstance;if(t._colReorder)e.oApi._fnLog(t,1,"ColReorder attempted to initialise twice. Ignoring second");else{var i=t.oInit,n=i.colReorder||i.oColReorder||{};new l(t,n)}return null},cFeature:"R",sFeature:"ColReorder"}):alert("Warning: ColReorder requires DataTables 1.10.8 or greater - www.datatables.net/download"),t(i).on("preInit.dt.colReorder",(function(e,i){if("dt"===e.namespace){var n=i.oInit.colReorder,r=o.defaults.colReorder;if(n||r){var s=t.extend({},n,r);!1!==n&&new l(i,s)}}})),t.fn.dataTable.Api.register("colReorder.reset()",(function(){return this.iterator("table",(function(t){t._colReorder.fnReset()}))})),t.fn.dataTable.Api.register("colReorder.order()",(function(t,e){return t?this.iterator("table",(function(i){i._colReorder.fnOrder(t,e)})):this.context.length?this.context[0]._colReorder.fnOrder():null})),t.fn.dataTable.Api.register("colReorder.transpose()",(function(t,e){return this.context.length&&this.context[0]._colReorder?this.context[0]._colReorder.fnTranspose(t,e):t})),t.fn.dataTable.Api.register("colReorder.move()",(function(t,e,i,n){return this.context.length&&(this.context[0]._colReorder.s.dt.oInstance.fnColReorder(t,e,i,n),this.context[0]._colReorder._fnSetColumnIndexes()),this})),t.fn.dataTable.Api.register("colReorder.enable()",(function(t){return this.iterator("table",(function(e){e._colReorder&&e._colReorder.fnEnable(t)}))})),t.fn.dataTable.Api.register("colReorder.disable()",(function(){return this.iterator("table",(function(t){t._colReorder&&t._colReorder.fnDisable()}))})),l})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-colreorder"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.ColReorder||require("datatables.net-colreorder")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){return t.fn.dataTable})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o,r=t.fn.dataTable,s=function(e,i){var o=this;if(this instanceof s){i!==n&&!0!==i||(i={});var r=t.fn.dataTable.camelToHungarian;r&&(r(s.defaults,s.defaults,!0),r(s.defaults,i));var a=new t.fn.dataTable.Api(e).settings()[0];if(this.s={dt:a,iTableColumns:a.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[],rtl:"rtl"===t(a.nTable).css("direction")},this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,head:null,body:null,foot:null}},clone:{left:{header:null,body:null,footer:null},right:{header:null,body:null,footer:null}}},a._oFixedColumns)throw"FixedColumns already initialised on this table";a._oFixedColumns=this,a._bInitComplete?this._fnConstruct(i):a.oApi._fnCallbackReg(a,"aoInitComplete",(function(){o._fnConstruct(i)}),"FixedColumns")}else alert("FixedColumns warning: FixedColumns must be initialised with the 'new' keyword.")};return t.extend(s.prototype,{fnUpdate:function(){this._fnDraw(!0)},fnRedrawLayout:function(){this._fnColCalc(),this._fnGridLayout(),this.fnUpdate()},fnRecalculateHeight:function(t){delete t._DTTC_iHeight,t.style.height="auto"},fnSetRowHeight:function(t,e){t.style.height=e+"px"},fnGetPosition:function(e){var i,n=this.s.dt.oInstance;if(t(e).parents(".DTFC_Cloned").length){if("tr"===e.nodeName.toLowerCase())return i=t(e).index(),n.fnGetPosition(t("tr",this.s.dt.nTBody)[i]);var o=t(e).index();return i=t(e.parentNode).index(),[n.fnGetPosition(t("tr",this.s.dt.nTBody)[i]),o,n.oApi._fnVisibleToColumnIndex(this.s.dt,o)]}return n.fnGetPosition(e)},fnToFixedNode:function(e,i){var n;return i<this.s.iLeftColumns?n=t(this.dom.clone.left.body).find("[data-dt-row="+e+"][data-dt-column="+i+"]"):i>=this.s.iRightColumns&&(n=t(this.dom.clone.right.body).find("[data-dt-row="+e+"][data-dt-column="+i+"]")),n&&n.length?n[0]:new t.fn.dataTable.Api(this.s.dt).cell(e,i).node()},_fnConstruct:function(o){var r=this;if("function"==typeof this.s.dt.oInstance.fnVersionCheck&&!0===this.s.dt.oInstance.fnVersionCheck("1.8.0"))if(""!==this.s.dt.oScroll.sX){this.s=t.extend(!0,this.s,s.defaults,o);var a,l=this.s.dt.oClasses;this.dom.grid.dt=t(this.s.dt.nTable).parents("div."+l.sScrollWrapper)[0],this.dom.scroller=t("div."+l.sScrollBody,this.dom.grid.dt)[0],this._fnColCalc(),this._fnGridSetup();var c=!1;t(this.s.dt.nTableWrapper).on("mousedown.DTFC",(function(e){0===e.button&&(c=!0,t(i).one("mouseup",(function(){c=!1})))})),t(this.dom.scroller).on("mouseover.DTFC touchstart.DTFC",(function(){c||(a="main")})).on("scroll.DTFC",(function(t){!a&&t.originalEvent&&(a="main"),"main"!==a&&"key"!==a||(r.s.iLeftColumns>0&&(r.dom.grid.left.liner.scrollTop=r.dom.scroller.scrollTop),r.s.iRightColumns>0&&(r.dom.grid.right.liner.scrollTop=r.dom.scroller.scrollTop))}));var d="onwheel"in i.createElement("div")?"wheel.DTFC":"mousewheel.DTFC";r.s.iLeftColumns>0&&(t(r.dom.grid.left.liner).on("mouseover.DTFC touchstart.DTFC",(function(){c||"key"===a||(a="left")})).on("scroll.DTFC",(function(t){!a&&t.originalEvent&&(a="left"),"left"===a&&(r.dom.scroller.scrollTop=r.dom.grid.left.liner.scrollTop,r.s.iRightColumns>0&&(r.dom.grid.right.liner.scrollTop=r.dom.grid.left.liner.scrollTop))})).on(d,(function(t){a="left";var e="wheel"===t.type?-t.originalEvent.deltaX:t.originalEvent.wheelDeltaX;r.dom.scroller.scrollLeft-=e})),t(r.dom.grid.left.head).on("mouseover.DTFC touchstart.DTFC",(function(){a="main"}))),r.s.iRightColumns>0&&(t(r.dom.grid.right.liner).on("mouseover.DTFC touchstart.DTFC",(function(){c||"key"===a||(a="right")})).on("scroll.DTFC",(function(t){!a&&t.originalEvent&&(a="right"),"right"===a&&(r.dom.scroller.scrollTop=r.dom.grid.right.liner.scrollTop,r.s.iLeftColumns>0&&(r.dom.grid.left.liner.scrollTop=r.dom.grid.right.liner.scrollTop))})).on(d,(function(t){a="right";var e="wheel"===t.type?-t.originalEvent.deltaX:t.originalEvent.wheelDeltaX;r.dom.scroller.scrollLeft-=e})),t(r.dom.grid.right.head).on("mouseover.DTFC touchstart.DTFC",(function(){a="main"}))),t(e).on("resize.DTFC",(function(){r._fnGridLayout.call(r)}));var h=!0,u=t(this.s.dt.nTable);u.on("draw.dt.DTFC",(function(){r._fnColCalc(),r._fnDraw.call(r,h),h=!1})).on("key-focus.dt.DTFC",(function(){a="key"})).on("column-sizing.dt.DTFC",(function(){r._fnColCalc(),r._fnGridLayout(r)})).on("column-visibility.dt.DTFC",(function(t,e,i,o,s){(s===n||s)&&(r._fnColCalc(),r._fnGridLayout(r),r._fnDraw(!0))})).on("select.dt.DTFC deselect.dt.DTFC",(function(t,e,i,n){"dt"===t.namespace&&r._fnDraw(!1)})).on("position.dts.dt.DTFC",(function(e,i){r.dom.grid.left.body&&t(r.dom.grid.left.body).find("table").eq(0).css("top",i),r.dom.grid.right.body&&t(r.dom.grid.right.body).find("table").eq(0).css("top",i)})).on("destroy.dt.DTFC",(function(){u.off(".DTFC"),t(r.dom.scroller).off(".DTFC"),t(e).off(".DTFC"),t(r.s.dt.nTableWrapper).off(".DTFC"),t(r.dom.grid.left.liner).off(".DTFC "+d),t(r.dom.grid.left.wrapper).remove(),t(r.dom.grid.right.liner).off(".DTFC "+d),t(r.dom.grid.right.wrapper).remove()})),this._fnGridLayout(),this.s.dt.oInstance.fnDraw(!1)}else this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");else alert("FixedColumns "+s.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation")},_fnColCalc:function(){var e=this,i=0,n=0;this.s.aiInnerWidths=[],this.s.aiOuterWidths=[],t.each(this.s.dt.aoColumns,(function(o,r){var s,a=t(r.nTh);if(a.filter(":visible").length){var l=a.outerWidth();0===e.s.aiOuterWidths.length&&(l+="string"==typeof(s=t(e.s.dt.nTable).css("border-left-width"))&&-1===s.indexOf("px")?1:parseInt(s,10)),e.s.aiOuterWidths.length===e.s.dt.aoColumns.length-1&&(l+="string"==typeof(s=t(e.s.dt.nTable).css("border-right-width"))&&-1===s.indexOf("px")?1:parseInt(s,10)),e.s.aiOuterWidths.push(l),e.s.aiInnerWidths.push(a.width()),o<e.s.iLeftColumns&&(i+=l),e.s.iTableColumns-e.s.iRightColumns<=o&&(n+=l)}else e.s.aiInnerWidths.push(0),e.s.aiOuterWidths.push(0)})),this.s.iLeftWidth=i,this.s.iRightWidth=n},_fnGridSetup:function(){var e,i=this._fnDTOverflow();this.dom.body=this.s.dt.nTable,this.dom.header=this.s.dt.nTHead.parentNode,this.dom.header.parentNode.parentNode.style.position="relative";var n=t('<div class="DTFC_ScrollWrapper" style="position:relative; clear:both;"><div class="DTFC_LeftWrapper" style="position:absolute; top:0; left:0;" aria-hidden="true"><div class="DTFC_LeftHeadWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div><div class="DTFC_LeftBodyWrapper" style="position:relative; top:0; left:0; height:0; overflow:hidden;"><div class="DTFC_LeftBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div></div><div class="DTFC_RightWrapper" style="position:absolute; top:0; right:0;" aria-hidden="true"><div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div><div class="DTFC_RightBodyWrapper" style="position:relative; top:0; left:0; height:0; overflow:hidden;"><div class="DTFC_RightBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_RightFootWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightFootBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div></div></div>')[0],o=n.childNodes[0],r=n.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(n,this.dom.grid.dt),n.appendChild(this.dom.grid.dt),this.dom.grid.wrapper=n,this.s.iLeftColumns>0&&(this.dom.grid.left.wrapper=o,this.dom.grid.left.head=o.childNodes[0],this.dom.grid.left.body=o.childNodes[1],this.dom.grid.left.liner=t("div.DTFC_LeftBodyLiner",n)[0],n.appendChild(o)),this.s.iRightColumns>0&&(this.dom.grid.right.wrapper=r,this.dom.grid.right.head=r.childNodes[0],this.dom.grid.right.body=r.childNodes[1],this.dom.grid.right.liner=t("div.DTFC_RightBodyLiner",n)[0],r.style.right=i.bar+"px",(e=t("div.DTFC_RightHeadBlocker",n)[0]).style.width=i.bar+"px",e.style.right=-i.bar+"px",this.dom.grid.right.headBlock=e,(e=t("div.DTFC_RightFootBlocker",n)[0]).style.width=i.bar+"px",e.style.right=-i.bar+"px",this.dom.grid.right.footBlock=e,n.appendChild(r)),this.s.dt.nTFoot&&(this.dom.footer=this.s.dt.nTFoot.parentNode,this.s.iLeftColumns>0&&(this.dom.grid.left.foot=o.childNodes[2]),this.s.iRightColumns>0&&(this.dom.grid.right.foot=r.childNodes[2])),this.s.rtl&&t("div.DTFC_RightHeadBlocker",n).css({left:-i.bar+"px",right:""})},_fnGridLayout:function(){var e,i=this,n=this.dom.grid,o=(t(n.wrapper).width(),this.s.dt.nTable.parentNode.offsetHeight),r=this.s.dt.nTable.parentNode.parentNode.offsetHeight,s=this._fnDTOverflow(),a=this.s.iLeftWidth,l=this.s.iRightWidth,c="rtl"===t(this.dom.body).css("direction"),d=function(e,n){s.bar?i._firefoxScrollError()?t(e).height()>34&&(e.style.width=n+s.bar+"px"):e.style.width=n+s.bar+"px":(e.style.width=n+20+"px",e.style.paddingRight="20px",e.style.boxSizing="border-box")};s.x&&(o-=s.bar),n.wrapper.style.height=r+"px",this.s.iLeftColumns>0&&((e=n.left.wrapper).style.width=a+"px",e.style.height="1px",c?(e.style.left="",e.style.right=0):(e.style.left=0,e.style.right=""),n.left.body.style.height=o+"px",n.left.foot&&(n.left.foot.style.top=(s.x?s.bar:0)+"px"),d(n.left.liner,a),n.left.liner.style.height=o+"px",n.left.liner.style.maxHeight=o+"px"),this.s.iRightColumns>0&&((e=n.right.wrapper).style.width=l+"px",e.style.height="1px",this.s.rtl?(e.style.left=s.y?s.bar+"px":0,e.style.right=""):(e.style.left="",e.style.right=s.y?s.bar+"px":0),n.right.body.style.height=o+"px",n.right.foot&&(n.right.foot.style.top=(s.x?s.bar:0)+"px"),d(n.right.liner,l),n.right.liner.style.height=o+"px",n.right.liner.style.maxHeight=o+"px",n.right.headBlock.style.display=s.y?"block":"none",n.right.footBlock.style.display=s.y?"block":"none")},_fnDTOverflow:function(){var t=this.s.dt.nTable,e=t.parentNode,i={x:!1,y:!1,bar:this.s.dt.oScroll.iBarWidth};return t.offsetWidth>e.clientWidth&&(i.x=!0),t.offsetHeight>e.clientHeight&&(i.y=!0),i},_fnDraw:function(e){this._fnGridLayout(),this._fnCloneLeft(e),this._fnCloneRight(e),t(this.dom.scroller).trigger("scroll"),null!==this.s.fnDrawCallback&&this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right),t(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(t){if(!(this.s.iRightColumns<=0)){var e,i=[];for(e=this.s.iTableColumns-this.s.iRightColumns;e<this.s.iTableColumns;e++)this.s.dt.aoColumns[e].bVisible&&i.push(e);this._fnClone(this.dom.clone.right,this.dom.grid.right,i,t)}},_fnCloneLeft:function(t){if(!(this.s.iLeftColumns<=0)){var e,i=[];for(e=0;e<this.s.iLeftColumns;e++)this.s.dt.aoColumns[e].bVisible&&i.push(e);this._fnClone(this.dom.clone.left,this.dom.grid.left,i,t)}},_fnCopyLayout:function(e,i,n){for(var o=[],r=[],s=[],a=0,l=e.length;a<l;a++){var c=[];c.nTr=t(e[a].nTr).clone(n,!1)[0];for(var d=0,h=this.s.iTableColumns;d<h;d++)if(-1!==t.inArray(d,i)){var u=t.inArray(e[a][d].cell,s);if(-1===u){var p=t(e[a][d].cell).clone(n,!1)[0];r.push(p),s.push(e[a][d].cell),c.push({cell:p,unique:e[a][d].unique})}else c.push({cell:r[u],unique:e[a][d].unique})}o.push(c)}return o},_fnClone:function(e,i,o,r){var s,a,l,c,d,h,u,p,f,g,m=this,v=this.s.dt;if(r){for(t(e.header).remove(),e.header=t(this.dom.header).clone(!0,!1)[0],e.header.className+=" DTFC_Cloned",e.header.style.width="100%",i.head.appendChild(e.header),p=this._fnCopyLayout(v.aoHeader,o,!0),(f=t(">thead",e.header)).empty(),s=0,a=p.length;s<a;s++)f[0].appendChild(p[s].nTr);v.oApi._fnDrawHead(v,p,!0)}else for(p=this._fnCopyLayout(v.aoHeader,o,!1),g=[],v.oApi._fnDetectHeader(g,t(">thead",e.header)[0]),s=0,a=p.length;s<a;s++)for(l=0,c=p[s].length;l<c;l++)g[s][l].cell.className=p[s][l].cell.className,t("span.DataTables_sort_icon",g[s][l].cell).each((function(){this.className=t("span.DataTables_sort_icon",p[s][l].cell)[0].className}));this._fnEqualiseHeights("thead",this.dom.header,e.header),"auto"==this.s.sHeightMatch&&t(">tbody>tr",m.dom.body).css("height","auto"),null!==e.body&&(t(e.body).remove(),e.body=null),e.body=t(this.dom.body).clone(!0)[0],e.body.className+=" DTFC_Cloned",e.body.style.paddingBottom=v.oScroll.iBarWidth+"px",e.body.style.marginBottom=2*v.oScroll.iBarWidth+"px",null!==e.body.getAttribute("id")&&e.body.removeAttribute("id"),t(">thead>tr",e.body).empty(),t(">tfoot",e.body).remove();var y=t("tbody",e.body)[0];if(t(y).empty(),v.aiDisplay.length>0){var b=t(">thead>tr",e.body)[0];for(u=0;u<o.length;u++){d=o[u],(h=t(v.aoColumns[d].nTh).clone(!0)[0]).innerHTML="";var x=h.style;x.paddingTop="0",x.paddingBottom="0",x.borderTopWidth="0",x.borderBottomWidth="0",x.height=0,x.width=m.s.aiInnerWidths[d]+"px",b.appendChild(h)}t(">tbody>tr",m.dom.body).each((function(e){var i=!1===m.s.dt.oFeatures.bServerSide?m.s.dt.aiDisplay[m.s.dt._iDisplayStart+e]:e,n=m.s.dt.aoData[i].anCells||t(this).children("td, th"),r=this.cloneNode(!1);for(r.removeAttribute("id"),r.setAttribute("data-dt-row",i),u=0;u<o.length;u++)d=o[u],n.length>0&&((h=t(n[d]).clone(!0,!0)[0]).removeAttribute("id"),h.setAttribute("data-dt-row",i),h.setAttribute("data-dt-column",d),r.appendChild(h));y.appendChild(r)}))}else t(">tbody>tr",m.dom.body).each((function(e){(h=this.cloneNode(!0)).className+=" DTFC_NoData",t("td",h).html(""),y.appendChild(h)}));if(e.body.style.width="100%",e.body.style.margin="0",e.body.style.padding="0",v.oScroller!==n){var w=v.oScroller.dom.force;i.forcer?i.forcer.style.height=w.style.height:(i.forcer=w.cloneNode(!0),i.liner.appendChild(i.forcer))}if(i.liner.appendChild(e.body),this._fnEqualiseHeights("tbody",m.dom.body,e.body),null!==v.nTFoot){if(r){null!==e.footer&&e.footer.parentNode.removeChild(e.footer),e.footer=t(this.dom.footer).clone(!0,!0)[0],e.footer.className+=" DTFC_Cloned",e.footer.style.width="100%",i.foot.appendChild(e.footer),p=this._fnCopyLayout(v.aoFooter,o,!0);var S=t(">tfoot",e.footer);for(S.empty(),s=0,a=p.length;s<a;s++)S[0].appendChild(p[s].nTr);v.oApi._fnDrawHead(v,p,!0)}else{p=this._fnCopyLayout(v.aoFooter,o,!1);var C=[];for(v.oApi._fnDetectHeader(C,t(">tfoot",e.footer)[0]),s=0,a=p.length;s<a;s++)for(l=0,c=p[s].length;l<c;l++)C[s][l].cell.className=p[s][l].cell.className}this._fnEqualiseHeights("tfoot",this.dom.footer,e.footer)}var k=v.oApi._fnGetUniqueThs(v,t(">thead",e.header)[0]);t(k).each((function(t){d=o[t],this.style.width=m.s.aiInnerWidths[d]+"px"})),null!==m.s.dt.nTFoot&&(k=v.oApi._fnGetUniqueThs(v,t(">tfoot",e.footer)[0]),t(k).each((function(t){d=o[t],this.style.width=m.s.aiInnerWidths[d]+"px"})))},_fnGetTrNodes:function(t){for(var e=[],i=0,n=t.childNodes.length;i<n;i++)"TR"==t.childNodes[i].nodeName.toUpperCase()&&e.push(t.childNodes[i]);return e},_fnEqualiseHeights:function(e,i,n){if("none"!=this.s.sHeightMatch||"thead"===e||"tfoot"===e){var o,r,s,a,l,c=i.getElementsByTagName(e)[0],d=n.getElementsByTagName(e)[0],h=t(">"+e+">tr:eq(0)",i).children(":first"),u=(h.outerHeight(),h.height(),this._fnGetTrNodes(c)),p=this._fnGetTrNodes(d),f=[];for(o=0,r=p.length;o<r;o++)a=u[o].offsetHeight,s=(l=p[o].offsetHeight)>a?l:a,"semiauto"==this.s.sHeightMatch&&(u[o]._DTTC_iHeight=s),f.push(s);for(o=0,r=p.length;o<r;o++)p[o].style.height=f[o]+"px",u[o].style.height=f[o]+"px"}},_firefoxScrollError:function(){if(o===n){var e=t("<div/>").css({position:"absolute",top:0,left:0,height:10,width:50,overflow:"scroll"}).appendTo("body");o=e[0].clientWidth===e[0].offsetWidth&&0!==this._fnDTOverflow().bar,e.remove()}return o}}),s.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"},s.version="3.3.3",r.Api.register("fixedColumns()",(function(){return this})),r.Api.register("fixedColumns().update()",(function(){return this.iterator("table",(function(t){t._oFixedColumns&&t._oFixedColumns.fnUpdate()}))})),r.Api.register("fixedColumns().relayout()",(function(){return this.iterator("table",(function(t){t._oFixedColumns&&t._oFixedColumns.fnRedrawLayout()}))})),r.Api.register("rows().recalcHeight()",(function(){return this.iterator("row",(function(t,e){t._oFixedColumns&&t._oFixedColumns.fnRecalculateHeight(this.row(e).node())}))})),r.Api.register("fixedColumns().rowIndex()",(function(e){return(e=t(e)).parents(".DTFC_Cloned").length?this.rows({page:"current"}).indexes()[e.index()]:this.row(e).index()})),r.Api.register("fixedColumns().cellIndex()",(function(e){if((e=t(e)).parents(".DTFC_Cloned").length){var i,n=e.parent().index(),o=this.rows({page:"current"}).indexes()[n];return i=e.parents(".DTFC_LeftWrapper").length?e.index():this.columns().flatten().length-this.context[0]._oFixedColumns.s.iRightColumns+e.index(),{row:o,column:this.column.index("toData",i),columnVisible:i}}return this.cell(e).index()})),r.Api.registerPlural("cells().fixedNodes()","cell().fixedNode()",(function(){return this.iterator("cell",(function(t,e,i){return t._oFixedColumns?t._oFixedColumns.fnToFixedNode(e,i):this.cell(e,i).node()}),1)})),t(i).on("init.dt.fixedColumns",(function(e,i){if("dt"===e.namespace){var n=i.oInit.fixedColumns,o=r.defaults.fixedColumns;if(n||o){var a=t.extend({},n,o);!1!==n&&new s(i,a)}}})),t.fn.dataTable.FixedColumns=s,t.fn.DataTable.FixedColumns=s,s})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-fixedcolumns"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.FixedColumns||require("datatables.net-fixedcolumns")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){return t.fn.dataTable})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=0,s=function(i,n){if(!(this instanceof s))throw"FixedHeader must be initialised with the 'new' keyword.";!0===n&&(n={}),i=new o.Api(i),this.c=t.extend(!0,{},s.defaults,n),this.s={dt:i,position:{theadTop:0,tbodyTop:0,tfootTop:0,tfootBottom:0,width:0,left:0,tfootHeight:0,theadHeight:0,windowHeight:t(e).height(),visible:!0},headerMode:null,footerMode:null,autoWidth:i.settings()[0].oFeatures.bAutoWidth,namespace:".dtfc"+r++,scrollLeft:{header:-1,footer:-1},enable:!0},this.dom={floatingHeader:null,thead:t(i.table().header()),tbody:t(i.table().body()),tfoot:t(i.table().footer()),header:{host:null,floating:null,floatingParent:t('<div class="dtfh-floatingparent">'),placeholder:null},footer:{host:null,floating:null,floatingParent:t('<div class="dtfh-floatingparent">'),placeholder:null}},this.dom.header.host=this.dom.thead.parent(),this.dom.footer.host=this.dom.tfoot.parent();var a=i.settings()[0];if(a._fixedHeader)throw"FixedHeader already initialised on table "+a.nTable.id;a._fixedHeader=this,this._constructor()};return t.extend(s.prototype,{destroy:function(){var i=this.dom;this.s.dt.off(".dtfc"),t(e).off(this.s.namespace),i.header.rightBlocker&&i.header.rightBlocker.remove(),i.header.leftBlocker&&i.header.leftBlocker.remove(),i.footer.rightBlocker&&i.footer.rightBlocker.remove(),i.footer.leftBlocker&&i.footer.leftBlocker.remove(),this.c.header&&this._modeChange("in-place","header",!0),this.c.footer&&i.tfoot.length&&this._modeChange("in-place","footer",!0)},enable:function(t,e){this.s.enable=t,(e||e===n)&&(this._positions(),this._scroll(!0))},enabled:function(){return this.s.enable},headerOffset:function(t){return t!==n&&(this.c.headerOffset=t,this.update()),this.c.headerOffset},footerOffset:function(t){return t!==n&&(this.c.footerOffset=t,this.update()),this.c.footerOffset},update:function(e){if(this.s.enable){var i=this.s.dt.table().node();t(i).is(":visible")?this.enable(!0,!1):this.enable(!1,!1),0!==t(i).children("thead").length&&(this._positions(),this._scroll(e===n||e))}},_constructor:function(){var i=this,n=this.s.dt;t(e).on("scroll"+this.s.namespace,(function(){i._scroll()})).on("resize"+this.s.namespace,o.util.throttle((function(){i.s.position.windowHeight=t(e).height(),i.update()}),50));var r=t(".fh-fixedHeader");!this.c.headerOffset&&r.length&&(this.c.headerOffset=r.outerHeight());var s=t(".fh-fixedFooter");!this.c.footerOffset&&s.length&&(this.c.footerOffset=s.outerHeight()),n.on("column-reorder.dt.dtfc column-visibility.dt.dtfc column-sizing.dt.dtfc responsive-display.dt.dtfc",(function(t,e){i.update()})).on("draw.dt.dtfc",(function(t,e){i.update(e!==n.settings()[0])})),n.on("destroy.dtfc",(function(){i.destroy()})),this._positions(),this._scroll()},_clone:function(e,n){var o=this,r=this.s.dt,s=this.dom[e],a="header"===e?this.dom.thead:this.dom.tfoot;if("footer"!==e||!this._scrollEnabled())if(!n&&s.floating)s.floating.removeClass("fixedHeader-floating fixedHeader-locked");else{var l=t(i).scrollLeft(),c=t(i).scrollTop();s.floating&&(null!==s.placeholder&&s.placeholder.remove(),this._unsize(e),s.floating.children().detach(),s.floating.remove());var d=t(r.table().node()),h=t(d.parent()),u=this._scrollEnabled();s.floating=t(r.table().node().cloneNode(!1)).attr("aria-hidden","true").css({"table-layout":"fixed",top:0,left:0}).removeAttr("id").append(a),s.floatingParent.css({width:h.width(),overflow:"hidden",height:"fit-content",position:"fixed",left:u?d.offset().left+h.scrollLeft():0}).css("header"===e?{top:this.c.headerOffset,bottom:""}:{top:"",bottom:this.c.footerOffset}).addClass("footer"===e?"dtfh-floatingparentfoot":"dtfh-floatingparenthead").append(s.floating).appendTo("body"),this._stickyPosition(s.floating,"-");var p=function(){var t=h.scrollLeft();o.s.scrollLeft={footer:t,header:t},s.floatingParent.scrollLeft(o.s.scrollLeft.header)};p(),h.off("scroll.dtfh").on("scroll.dtfh",p),s.placeholder=a.clone(!1),s.placeholder.find("*[id]").removeAttr("id"),s.host.prepend(s.placeholder),this._matchWidths(s.placeholder,s.floating),t(i).scrollTop(c).scrollLeft(l)}},_stickyPosition:function(e,i){if(this._scrollEnabled()){var n=this,o="rtl"===t(n.s.dt.table().node()).css("direction");e.find("th").each((function(){if("sticky"===t(this).css("position")){var e=t(this).css("right"),r=t(this).css("left");if("auto"===e||o)"auto"!==r&&o&&(s=+r.replace(/px/g,"")+("-"===i?-1:1)*n.s.dt.settings()[0].oBrowser.barWidth,t(this).css("left",s>0?s:0));else{var s=+e.replace(/px/g,"")+("-"===i?-1:1)*n.s.dt.settings()[0].oBrowser.barWidth;t(this).css("right",s>0?s:0)}}}))}},_matchWidths:function(e,i){var n=function(i){return t(i,e).map((function(){return 1*t(this).css("width").replace(/[^\d\.]/g,"")})).toArray()},o=function(e,n){t(e,i).each((function(e){t(this).css({width:n[e],minWidth:n[e]})}))},r=n("th"),s=n("td");o("th",r),o("td",s)},_unsize:function(e){var i=this.dom[e].floating;i&&("footer"===e||"header"===e&&!this.s.autoWidth)?t("th, td",i).css({width:"",minWidth:""}):i&&"header"===e&&t("th, td",i).css("min-width","")},_horizontal:function(e,i){var n=this.dom[e],o=(this.s.position,this.s.scrollLeft);if(n.floating&&o[e]!==i){if(this._scrollEnabled()){var r=t(t(this.s.dt.table().node()).parent()).scrollLeft();n.floating.scrollLeft(r),n.floatingParent.scrollLeft(r)}o[e]=i}},_modeChange:function(n,o,r){this.s.dt;var s=this.dom[o],a=this.s.position,l=this._scrollEnabled();if("footer"!==o||!l){var c=function(t){s.floating.attr("style",(function(e,i){return(i||"")+"width: "+t+"px !important;"})),l||s.floatingParent.attr("style",(function(e,i){return(i||"")+"width: "+t+"px !important;"}))},d=this.dom["footer"===o?"tfoot":"thead"],h=t.contains(d[0],i.activeElement)?i.activeElement:null,u=t(t(this.s.dt.table().node()).parent());if("in-place"===n)s.placeholder&&(s.placeholder.remove(),s.placeholder=null),this._unsize(o),"header"===o?s.host.prepend(d):s.host.append(d),s.floating&&(s.floating.remove(),s.floating=null,this._stickyPosition(s.host,"+")),s.floatingParent&&s.floatingParent.remove(),t(t(s.host.parent()).parent()).scrollLeft(u.scrollLeft());else if("in"===n){this._clone(o,r);var p=u.offset(),f=t(i).scrollTop(),g=f+t(e).height(),m=l?p.top:a.tbodyTop,v=l?p.top+u.outerHeight():a.tfootTop,y="footer"===o?m>g?a.tfootHeight:m+a.tfootHeight-g:f+this.c.headerOffset+a.theadHeight-v,b="header"===o?"top":"bottom",x=this.c[o+"Offset"]-(y>0?y:0);s.floating.addClass("fixedHeader-floating"),s.floatingParent.css(b,x).css({left:a.left,height:"header"===o?a.theadHeight:a.tfootHeight,"z-index":2}).append(s.floating),c(a.width),"footer"===o&&s.floating.css("top","")}else"below"===n?(this._clone(o,r),s.floating.addClass("fixedHeader-locked"),s.floatingParent.css({position:"absolute",top:a.tfootTop-a.theadHeight,left:a.left+"px"}),c(a.width)):"above"===n&&(this._clone(o,r),s.floating.addClass("fixedHeader-locked"),s.floatingParent.css({position:"absolute",top:a.tbodyTop,left:a.left+"px"}),c(a.width));h&&h!==i.activeElement&&setTimeout((function(){h.focus()}),10),this.s.scrollLeft.header=-1,this.s.scrollLeft.footer=-1,this.s[o+"Mode"]=n}},_positions:function(){var e=this.s.dt,i=e.table(),n=this.s.position,o=this.dom,r=t(i.node()),s=this._scrollEnabled(),a=t(e.table().header()),l=t(e.table().footer()),c=o.tbody,d=r.parent();n.visible=r.is(":visible"),n.width=r.outerWidth(),n.left=r.offset().left,n.theadTop=a.offset().top,n.tbodyTop=s?d.offset().top:c.offset().top,n.tbodyHeight=s?d.outerHeight():c.outerHeight(),n.theadHeight=a.outerHeight(),n.theadBottom=n.theadTop+n.theadHeight,l.length?(n.tfootTop=n.tbodyTop+n.tbodyHeight,n.tfootBottom=n.tfootTop+l.outerHeight(),n.tfootHeight=l.outerHeight()):(n.tfootTop=n.tbodyTop+c.outerHeight(),n.tfootBottom=n.tfootTop,n.tfootHeight=n.tfootTop)},_scroll:function(o){if(!this.s.dt.settings()[0].bDestroying){var r,s,a=this._scrollEnabled(),l=(b=t(this.s.dt.table().node()).parent()).offset(),c=b.outerHeight(),d=t(i).scrollLeft(),h=t(i).scrollTop(),u=t(e).height(),p=this.s.position,f=a?l.top:p.tbodyTop,g=a?l.left:p.left,m=a?l.top+c:p.tfootTop,v=a?b.outerWidth():p.tbodyWidth,y=h+u;if(this.c.header){if(this.s.enable)if(!p.visible||h+this.c.headerOffset+p.theadHeight<=f)r="in-place";else if(h+this.c.headerOffset+p.theadHeight>f&&h+this.c.headerOffset+p.theadHeight<m){r="in";var b=t(t(this.s.dt.table().node()).parent());h+this.c.headerOffset+p.theadHeight>m||this.dom.header.floatingParent===n?o=!0:this.dom.header.floatingParent.css({top:this.c.headerOffset,position:"fixed"}).append(this.dom.header.floating)}else r="below";else r="in-place";(o||r!==this.s.headerMode)&&this._modeChange(r,"header",o),this._horizontal("header",d)}var x={offset:{top:0,left:0},height:0},w={offset:{top:0,left:0},height:0};if(this.c.footer&&this.dom.tfoot.length){this.s.enable?!p.visible||p.tfootBottom+this.c.footerOffset<=y?s="in-place":m+p.tfootHeight+this.c.footerOffset>y&&f+this.c.footerOffset<y?(s="in",o=!0):s="above":s="in-place",(o||s!==this.s.footerMode)&&this._modeChange(s,"footer",o),this._horizontal("footer",d);var S=function(t){return{offset:t.offset(),height:t.outerHeight()}};if(x=this.dom.header.floating?S(this.dom.header.floating):S(this.dom.thead),w=this.dom.footer.floating?S(this.dom.footer.floating):S(this.dom.tfoot),a&&w.offset.top>h){var C=h-l.top,k=y+(C>-x.height?C:0)-(x.offset.top+(C<-x.height?x.height:0)+w.height);k<0&&(k=0),b.outerHeight(k),Math.round(b.outerHeight())>=Math.round(k)?t(this.dom.tfoot.parent()).addClass("fixedHeader-floating"):t(this.dom.tfoot.parent()).removeClass("fixedHeader-floating")}}if(this.dom.header.floating&&this.dom.header.floatingParent.css("left",g-d),this.dom.footer.floating&&this.dom.footer.floatingParent.css("left",g-d),this.s.dt.settings()[0]._fixedColumns!==n){var _=function(e,i,o){if(o===n){var r=t("div.dtfc-"+e+"-"+i+"-blocker");o=0===r.length?null:r.clone().appendTo("body").css("z-index",1)}return null!==o&&o.css({top:"top"===i?x.offset.top:w.offset.top,left:"right"===e?g+v-o.width():g}),o};this.dom.header.rightBlocker=_("right","top",this.dom.header.rightBlocker),this.dom.header.leftBlocker=_("left","top",this.dom.header.leftBlocker),this.dom.footer.rightBlocker=_("right","bottom",this.dom.footer.rightBlocker),this.dom.footer.leftBlocker=_("left","bottom",this.dom.footer.leftBlocker)}}},_scrollEnabled:function(){var t=this.s.dt.settings()[0].oScroll;return""!==t.sY||""!==t.sX}}),s.version="3.2.4",s.defaults={header:!0,footer:!1,headerOffset:0,footerOffset:0},t.fn.dataTable.FixedHeader=s,t.fn.DataTable.FixedHeader=s,t(i).on("init.dt.dtfh",(function(e,i,n){if("dt"===e.namespace){var r=i.oInit.fixedHeader,a=o.defaults.fixedHeader;if((r||a)&&!i._fixedHeader){var l=t.extend({},a,r);!1!==r&&new s(i,l)}}})),o.Api.register("fixedHeader()",(function(){})),o.Api.register("fixedHeader.adjust()",(function(){return this.iterator("table",(function(t){var e=t._fixedHeader;e&&e.update()}))})),o.Api.register("fixedHeader.enable()",(function(t){return this.iterator("table",(function(e){var i=e._fixedHeader;t=t===n||t,i&&t!==i.enabled()&&i.enable(t)}))})),o.Api.register("fixedHeader.enabled()",(function(){if(this.context.length){var t=this.context[0]._fixedHeader;if(t)return t.enabled()}return!1})),o.Api.register("fixedHeader.disable()",(function(){return this.iterator("table",(function(t){var e=t._fixedHeader;e&&e.enabled()&&e.enable(!1)}))})),t.each(["header","footer"],(function(t,e){o.Api.register("fixedHeader."+e+"Offset()",(function(t){var i=this.context;return t===n?i.length&&i[0]._fixedHeader?i[0]._fixedHeader[e+"Offset"]():n:this.iterator("table",(function(i){var n=i._fixedHeader;n&&n[e+"Offset"](t)}))}))})),s})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-fixedheader"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.FixedHeader||require("datatables.net-fixedheader")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){return t.fn.dataTable})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=0,s=0,a=function(e,i){if(!o.versionCheck||!o.versionCheck("1.10.8"))throw"KeyTable requires DataTables 1.10.8 or newer";this.c=t.extend(!0,{},o.defaults.keyTable,a.defaults,i),this.s={dt:new o.Api(e),enable:!0,focusDraw:!1,waitingForDraw:!1,lastFocus:null,namespace:".keyTable-"+r++,tabInput:null},this.dom={};var n=this.s.dt.settings()[0],s=n.keytable;if(s)return s;n.keytable=this,this._constructor()};return t.extend(a.prototype,{blur:function(){this._blur()},enable:function(t){this.s.enable=t},enabled:function(){return this.s.enable},focus:function(t,e){this._focus(this.s.dt.cell(t,e))},focused:function(t){if(!this.s.lastFocus)return!1;var e=this.s.lastFocus.cell.index();return t.row===e.row&&t.column===e.column},_constructor:function(){this._tabInput();var e=this,n=this.s.dt,o=t(n.table().node()),r=this.s.namespace,s=!1;if("static"===o.css("position")&&o.css("position","relative"),t(n.table().body()).on("click"+r,"th, td",(function(t){if(!1!==e.s.enable){var i=n.cell(this);i.any()&&e._focus(i,null,!1,t)}})),t(i).on("keydown"+r,(function(t){s||e._key(t)})),this.c.blurable&&t(i).on("mousedown"+r,(function(i){t(i.target).parents(".dataTables_filter").length&&e._blur(),t(i.target).parents().filter(n.table().container()).length||t(i.target).parents("div.DTE").length||t(i.target).parents("div.editor-datetime").length||t(i.target).parents("div.dt-datetime").length||t(i.target).parents().filter(".DTFC_Cloned").length||e._blur()})),this.c.editor){var a=this.c.editor;a.on("open.keyTableMain",(function(t,i,n){"inline"!==i&&e.s.enable&&(e.enable(!1),a.one("close"+r,(function(){e.enable(!0)})))})),this.c.editOnFocus&&n.on("key-focus"+r+" key-refocus"+r,(function(t,i,n,o){e._editor(null,o,!0)})),n.on("key"+r,(function(t,i,n,o,r){e._editor(n,r,!1)})),t(n.table().body()).on("dblclick"+r,"th, td",(function(t){!1!==e.s.enable&&n.cell(this).any()&&(e.s.lastFocus&&this!==e.s.lastFocus.cell.node()||e._editor(null,t,!0))})),a.on("preSubmit",(function(){s=!0})).on("preSubmitCancelled",(function(){s=!1})).on("submitComplete",(function(){s=!1}))}n.on("stateSaveParams"+r,(function(t,i,n){n.keyTable=e.s.lastFocus?e.s.lastFocus.cell.index():null})),n.on("column-visibility"+r,(function(t){e._tabInput()})),n.on("draw"+r,(function(t){if(e._tabInput(),!e.s.focusDraw&&e.s.lastFocus){var i=e.s.lastFocus.relative,o=n.page.info(),r=i.row+o.start;if(0===o.recordsDisplay)return;r>=o.recordsDisplay&&(r=o.recordsDisplay-1),e._focus(r,i.column,!0,t)}})),this.c.clipboard&&this._clipboard(),n.on("destroy"+r,(function(){e._blur(!0),n.off(r),t(n.table().body()).off("click"+r,"th, td").off("dblclick"+r,"th, td"),t(i).off("mousedown"+r).off("keydown"+r).off("copy"+r).off("paste"+r)}));var l=n.state.loaded();l&&l.keyTable?n.one("init",(function(){var t=n.cell(l.keyTable);t.any()&&t.focus()})):this.c.focus&&n.cell(this.c.focus).focus()},_blur:function(e){if(this.s.enable&&this.s.lastFocus){var i=this.s.lastFocus.cell;t(i.node()).removeClass(this.c.className),this.s.lastFocus=null,e||(this._updateFixedColumns(i.index().column),this._emitEvent("key-blur",[this.s.dt,i]))}},_clipboard:function(){var n=this.s.dt,o=this,r=this.s.namespace;e.getSelection&&(t(i).on("copy"+r,(function(t){var i=t.originalEvent,n=e.getSelection().toString(),r=o.s.lastFocus;!n&&r&&(i.clipboardData.setData("text/plain",r.cell.render(o.c.clipboardOrthogonal)),i.preventDefault())})),t(i).on("paste"+r,(function(t){var r,s=t.originalEvent,a=o.s.lastFocus,l=i.activeElement,c=o.c.editor;if(a&&(!l||"body"===l.nodeName.toLowerCase()))if(s.preventDefault(),e.clipboardData&&e.clipboardData.getData?r=e.clipboardData.getData("Text"):s.clipboardData&&s.clipboardData.getData&&(r=s.clipboardData.getData("text/plain")),c){var d=o._inlineOptions(a.cell.index());c.inline(d.cell,d.field,d.options).set(c.displayed()[0],r).submit()}else a.cell.data(r),n.draw(!1)})))},_columns:function(){var t=this.s.dt,e=t.columns(this.c.columns).indexes(),i=[];return t.columns(":visible").every((function(t){-1!==e.indexOf(t)&&i.push(t)})),i},_editor:function(e,n,o){if(this.s.lastFocus&&(!n||"draw"!==n.type)){var r=this,a=this.s.dt,l=this.c.editor,c=this.s.lastFocus.cell,d=this.s.namespace+"e"+s++;if(!(t("div.DTE",c.node()).length||null!==e&&(e>=0&&e<=9||11===e||12===e||e>=14&&e<=31||e>=112&&e<=123||e>=127&&e<=159))){n&&(n.stopPropagation(),13===e&&n.preventDefault());var h=function(){var e=r._inlineOptions(c.index());l.one("open"+d,(function(){l.off("cancelOpen"+d),o||t("div.DTE_Field_InputControl input, div.DTE_Field_InputControl textarea").select(),a.keys.enable(o?"tab-only":"navigation-only"),a.on("key-blur.editor",(function(t,e,i){l.displayed()&&i.node()===c.node()&&l.submit()})),o&&t(a.table().container()).addClass("dtk-focus-alt"),l.on("preSubmitCancelled"+d,(function(){setTimeout((function(){r._focus(c,null,!1)}),50)})),l.on("submitUnsuccessful"+d,(function(){r._focus(c,null,!1)})),l.one("close"+d,(function(){a.keys.enable(!0),a.off("key-blur.editor"),l.off(d),t(a.table().container()).removeClass("dtk-focus-alt"),r.s.returnSubmit&&(r.s.returnSubmit=!1,r._emitEvent("key-return-submit",[a,c]))}))})).one("cancelOpen"+d,(function(){l.off(d)})).inline(e.cell,e.field,e.options)};13===e?(o=!0,t(i).one("keyup",(function(){h()}))):h()}}},_inlineOptions:function(t){return this.c.editorOptions?this.c.editorOptions(t):{cell:t,field:n,options:n}},_emitEvent:function(e,i){this.s.dt.iterator("table",(function(n,o){t(n.nTable).triggerHandler(e,i)}))},_focus:function(o,r,s,a){var l=this,c=this.s.dt,d=c.page.info(),h=this.s.lastFocus;if(a||(a=null),this.s.enable){if("number"!=typeof o){if(!o.any())return;var u=o.index();if(r=u.column,(o=c.rows({filter:"applied",order:"applied"}).indexes().indexOf(u.row))<0)return;d.serverSide&&(o+=d.start)}if(-1!==d.length&&(o<d.start||o>=d.start+d.length))return this.s.focusDraw=!0,this.s.waitingForDraw=!0,void c.one("draw",(function(){l.s.focusDraw=!1,l.s.waitingForDraw=!1,l._focus(o,r,n,a)})).page(Math.floor(o/d.length)).draw(!1);if(-1!==t.inArray(r,this._columns())){d.serverSide&&(o-=d.start);var p=c.cells(null,r,{search:"applied",order:"applied"}).flatten(),f=c.cell(p[o]);if(h){if(h.node===f.node())return void this._emitEvent("key-refocus",[this.s.dt,f,a||null]);this._blur()}this._removeOtherFocus();var g=t(f.node());if(g.addClass(this.c.className),this._updateFixedColumns(r),s===n||!0===s){this._scroll(t(e),t(i.body),g,"offset");var m=c.table().body().parentNode;if(m!==c.table().header().parentNode){var v=t(m.parentNode);this._scroll(v,v,g,"position")}}this.s.lastFocus={cell:f,node:f.node(),relative:{row:c.rows({page:"current"}).indexes().indexOf(f.index().row),column:f.index().column}},this._emitEvent("key-focus",[this.s.dt,f,a||null]),c.state.save()}}},_key:function(e){if(this.s.waitingForDraw)e.preventDefault();else{var i=this.s.enable;this.s.returnSubmit=("navigation-only"===i||"tab-only"===i)&&13===e.keyCode;var n=!0===i||"navigation-only"===i;if(i&&(!(0===e.keyCode||e.ctrlKey||e.metaKey||e.altKey)||e.ctrlKey&&e.altKey)){var o=this.s.lastFocus;if(o)if(this.s.dt.cell(o.node).any()){var r=this.s.dt,s=!!this.s.dt.settings()[0].oScroll.sY;if(!this.c.keys||-1!==t.inArray(e.keyCode,this.c.keys))switch(e.keyCode){case 9:this._shift(e,e.shiftKey?"left":"right",!0);break;case 27:this.c.blurable&&!0===i&&this._blur();break;case 33:case 34:n&&!s&&(e.preventDefault(),r.page(33===e.keyCode?"previous":"next").draw(!1));break;case 35:case 36:if(n){e.preventDefault();var a=r.cells({page:"current"}).indexes(),l=this._columns();this._focus(r.cell(a[35===e.keyCode?a.length-1:l[0]]),null,!0,e)}break;case 37:n&&this._shift(e,"left");break;case 38:n&&this._shift(e,"up");break;case 39:n&&this._shift(e,"right");break;case 40:n&&this._shift(e,"down");break;case 113:if(this.c.editor){this._editor(null,e,!0);break}default:!0===i&&this._emitEvent("key",[r,e.keyCode,this.s.lastFocus.cell,e])}}else this.s.lastFocus=null}}},_removeOtherFocus:function(){var e=this.s.dt.table().node();t.fn.dataTable.tables({api:!0}).iterator("table",(function(t){this.table().node()!==e&&this.cell.blur()}))},_scroll:function(t,e,i,n){var o=i[n](),r=i.outerHeight(),s=i.outerWidth(),a=e.scrollTop(),l=e.scrollLeft(),c=t.height(),d=t.width();"position"===n&&(o.top+=parseInt(i.closest("table").css("top"),10)),o.top<a&&e.scrollTop(o.top),o.left<l&&e.scrollLeft(o.left),o.top+r>a+c&&r<c&&e.scrollTop(o.top+r-c),o.left+s>l+d&&s<d&&e.scrollLeft(o.left+s-d)},_shift:function(e,i,n){var o=this.s.dt,r=o.page.info(),s=r.recordsDisplay,a=this._columns(),l=this.s.lastFocus;if(l){var c=l.cell;if(c){var d=o.rows({filter:"applied",order:"applied"}).indexes().indexOf(c.index().row);r.serverSide&&(d+=r.start);var h=o.columns(a).indexes().indexOf(c.index().column),u=d,p=a[h];"rtl"===t(o.table().node()).css("direction")&&("right"===i?i="left":"left"===i&&(i="right")),"right"===i?h>=a.length-1?(u++,p=a[0]):p=a[h+1]:"left"===i?0===h?(u--,p=a[a.length-1]):p=a[h-1]:"up"===i?u--:"down"===i&&u++,u>=0&&u<s&&-1!==t.inArray(p,a)?(e&&e.preventDefault(),this._focus(u,p,!0,e)):n&&this.c.blurable?this._blur():e&&e.preventDefault()}}},_tabInput:function(){var e=this,i=this.s.dt,n=null!==this.c.tabIndex?this.c.tabIndex:i.settings()[0].iTabIndex;if(-1!=n){if(!this.s.tabInput){var o=t('<div><input type="text" tabindex="'+n+'"/></div>').css({position:"absolute",height:1,width:0,overflow:"hidden"});o.children().on("focus",(function(t){var n=i.cell(":eq(0)",e._columns(),{page:"current"});n.any()&&e._focus(n,null,!0,t)})),this.s.tabInput=o}var r=this.s.dt.cell(":eq(0)","0:visible",{page:"current",order:"current"}).node();r&&t(r).prepend(this.s.tabInput)}},_updateFixedColumns:function(t){var e=this.s.dt,i=e.settings()[0];if(i._oFixedColumns){var n=i._oFixedColumns.s.iLeftColumns,o=i.aoColumns.length-i._oFixedColumns.s.iRightColumns;(t<n||t>=o)&&e.fixedColumns().update()}}}),a.defaults={blurable:!0,className:"focus",clipboard:!0,clipboardOrthogonal:"display",columns:"",editor:null,editOnFocus:!1,editorOptions:null,focus:null,keys:null,tabIndex:null},a.version="2.6.4",t.fn.dataTable.KeyTable=a,t.fn.DataTable.KeyTable=a,o.Api.register("cell.blur()",(function(){return this.iterator("table",(function(t){t.keytable&&t.keytable.blur()}))})),o.Api.register("cell().focus()",(function(){return this.iterator("cell",(function(t,e,i){t.keytable&&t.keytable.focus(e,i)}))})),o.Api.register("keys.disable()",(function(){return this.iterator("table",(function(t){t.keytable&&t.keytable.enable(!1)}))})),o.Api.register("keys.enable()",(function(t){return this.iterator("table",(function(e){e.keytable&&e.keytable.enable(t===n||t)}))})),o.Api.register("keys.enabled()",(function(t){var e=this.context;return!!e.length&&!!e[0].keytable&&e[0].keytable.enabled()})),o.Api.register("keys.move()",(function(t){return this.iterator("table",(function(e){e.keytable&&e.keytable._shift(null,t,!1)}))})),o.ext.selector.cell.push((function(t,e,i){var o=e.focused,r=t.keytable,s=[];if(!r||o===n)return i;for(var a=0,l=i.length;a<l;a++)(!0===o&&r.focused(i[a])||!1===o&&!r.focused(i[a]))&&s.push(i[a]);return s})),t(i).on("preInit.dt.dtk",(function(e,i,n){if("dt"===e.namespace){var r=i.oInit.keys,s=o.defaults.keys;if(r||s){var l=t.extend({},s,r);!1!==r&&new a(i,l)}}})),a})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-keytable"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.KeyTable||require("datatables.net-keytable")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){return t.fn.dataTable})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=function(e,i){if(!o.versionCheck||!o.versionCheck("1.10.10"))throw"DataTables Responsive requires DataTables 1.10.10 or newer";this.s={dt:new o.Api(e),columns:[],current:[]},this.s.dt.settings()[0].responsive||(i&&"string"==typeof i.details?i.details={type:i.details}:i&&!1===i.details?i.details={type:!1}:i&&!0===i.details&&(i.details={type:"inline"}),this.c=t.extend(!0,{},r.defaults,o.defaults.responsive,i),e.responsive=this,this._constructor())};t.extend(r.prototype,{_constructor:function(){var i=this,n=this.s.dt,r=n.settings()[0],s=t(e).innerWidth();n.settings()[0]._responsive=this,t(e).on("resize.dtr orientationchange.dtr",o.util.throttle((function(){var n=t(e).innerWidth();n!==s&&(i._resize(),s=n)}))),r.oApi._fnCallbackReg(r,"aoRowCreatedCallback",(function(e,o,r){-1!==t.inArray(!1,i.s.current)&&t(">td, >th",e).each((function(e){var o=n.column.index("toData",e);!1===i.s.current[o]&&t(this).css("display","none")}))})),n.on("destroy.dtr",(function(){n.off(".dtr"),t(n.table().body()).off(".dtr"),t(e).off("resize.dtr orientationchange.dtr"),n.cells(".dtr-control").nodes().to$().removeClass("dtr-control"),t.each(i.s.current,(function(t,e){!1===e&&i._setColumnVis(t,!0)}))})),this.c.breakpoints.sort((function(t,e){return t.width<e.width?1:t.width>e.width?-1:0})),this._classLogic(),this._resizeAuto();var a=this.c.details;!1!==a.type&&(i._detailsInit(),n.on("column-visibility.dtr",(function(){i._timer&&clearTimeout(i._timer),i._timer=setTimeout((function(){i._timer=null,i._classLogic(),i._resizeAuto(),i._resize(!0),i._redrawChildren()}),100)})),n.on("draw.dtr",(function(){i._redrawChildren()})),t(n.table().node()).addClass("dtr-"+a.type)),n.on("column-reorder.dtr",(function(t,e,n){i._classLogic(),i._resizeAuto(),i._resize(!0)})),n.on("column-sizing.dtr",(function(){i._resizeAuto(),i._resize()})),n.on("column-calc.dt",(function(t,e){for(var n=i.s.current,o=0;o<n.length;o++){var r=e.visible.indexOf(o);!1===n[o]&&r>=0&&e.visible.splice(r,1)}})),n.on("preXhr.dtr",(function(){var t=[];n.rows().every((function(){this.child.isShown()&&t.push(this.id(!0))})),n.one("draw.dtr",(function(){i._resizeAuto(),i._resize(),n.rows(t).every((function(){i._detailsDisplay(this,!1)}))}))})),n.on("draw.dtr",(function(){i._controlClass()})).on("init.dtr",(function(e,o,r){"dt"===e.namespace&&(i._resizeAuto(),i._resize(),t.inArray(!1,i.s.current)&&n.columns.adjust())})),this._resize()},_columnsVisiblity:function(e){var i,n,o=this.s.dt,r=this.s.columns,s=r.map((function(t,e){return{columnIdx:e,priority:t.priority}})).sort((function(t,e){return t.priority!==e.priority?t.priority-e.priority:t.columnIdx-e.columnIdx})),a=t.map(r,(function(i,n){return!1===o.column(n).visible()?"not-visible":(!i.auto||null!==i.minWidth)&&(!0===i.auto?"-":-1!==t.inArray(e,i.includeIn))})),l=0;for(i=0,n=a.length;i<n;i++)!0===a[i]&&(l+=r[i].minWidth);var c=o.settings()[0].oScroll,d=c.sY||c.sX?c.iBarWidth:0,h=o.table().container().offsetWidth-d-l;for(i=0,n=a.length;i<n;i++)r[i].control&&(h-=r[i].minWidth);var u=!1;for(i=0,n=s.length;i<n;i++){var p=s[i].columnIdx;"-"===a[p]&&!r[p].control&&r[p].minWidth&&(u||h-r[p].minWidth<0?(u=!0,a[p]=!1):a[p]=!0,h-=r[p].minWidth)}var f=!1;for(i=0,n=r.length;i<n;i++)if(!r[i].control&&!r[i].never&&!1===a[i]){f=!0;break}for(i=0,n=r.length;i<n;i++)r[i].control&&(a[i]=f),"not-visible"===a[i]&&(a[i]=!1);return-1===t.inArray(!0,a)&&(a[0]=!0),a},_classLogic:function(){var e=this,i=this.c.breakpoints,o=this.s.dt,r=o.columns().eq(0).map((function(t){var e=this.column(t),i=e.header().className,r=o.settings()[0].aoColumns[t].responsivePriority,s=e.header().getAttribute("data-priority");return r===n&&(r=s===n||null===s?1e4:1*s),{className:i,includeIn:[],auto:!1,control:!1,never:!!i.match(/\b(dtr\-)?never\b/),priority:r}})),s=function(e,i){var n=r[e].includeIn;-1===t.inArray(i,n)&&n.push(i)},a=function(t,n,o,a){var l,c,d;if(o){if("max-"===o)for(l=e._find(n).width,c=0,d=i.length;c<d;c++)i[c].width<=l&&s(t,i[c].name);else if("min-"===o)for(l=e._find(n).width,c=0,d=i.length;c<d;c++)i[c].width>=l&&s(t,i[c].name);else if("not-"===o)for(c=0,d=i.length;c<d;c++)-1===i[c].name.indexOf(a)&&s(t,i[c].name)}else r[t].includeIn.push(n)};r.each((function(e,n){for(var o=e.className.split(" "),r=!1,s=0,l=o.length;s<l;s++){var c=o[s].trim();if("all"===c||"dtr-all"===c)return r=!0,void(e.includeIn=t.map(i,(function(t){return t.name})));if("none"===c||"dtr-none"===c||e.never)return void(r=!0);if("control"===c||"dtr-control"===c)return r=!0,void(e.control=!0);t.each(i,(function(t,e){var i=e.name.split("-"),o=new RegExp("(min\\-|max\\-|not\\-)?("+i[0]+")(\\-[_a-zA-Z0-9])?"),s=c.match(o);s&&(r=!0,s[2]===i[0]&&s[3]==="-"+i[1]?a(n,e.name,s[1],s[2]+s[3]):s[2]!==i[0]||s[3]||a(n,e.name,s[1],s[2]))}))}r||(e.auto=!0)})),this.s.columns=r},_controlClass:function(){if("inline"===this.c.details.type){var e=this.s.dt,i=this.s.current,n=t.inArray(!0,i);e.cells(null,(function(t){return t!==n}),{page:"current"}).nodes().to$().filter(".dtr-control").removeClass("dtr-control"),e.cells(null,n,{page:"current"}).nodes().to$().addClass("dtr-control")}},_detailsDisplay:function(e,i){var n=this,o=this.s.dt,s=this.c.details;if(s&&!1!==s.type){var a="string"==typeof s.renderer?r.renderer[s.renderer]():s.renderer,l=s.display(e,i,(function(){return a(o,e[0],n._detailsObj(e[0]))}));!0!==l&&!1!==l||t(o.table().node()).triggerHandler("responsive-display.dt",[o,e,l,i])}},_detailsInit:function(){var e=this,i=this.s.dt,o=this.c.details;"inline"===o.type&&(o.target="td.dtr-control, th.dtr-control"),i.on("draw.dtr",(function(){e._tabIndexes()})),e._tabIndexes(),t(i.table().body()).on("keyup.dtr","td, th",(function(e){13===e.keyCode&&t(this).data("dtr-keyboard")&&t(this).click()}));var r=o.target,s="string"==typeof r?r:"td, th";r===n&&null===r||t(i.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",s,(function(n){if(t(i.table().node()).hasClass("collapsed")&&-1!==t.inArray(t(this).closest("tr").get(0),i.rows().nodes().toArray())){if("number"==typeof r){var o=r<0?i.columns().eq(0).length+r:r;if(i.cell(this).index().column!==o)return}var s=i.row(t(this).closest("tr"));"click"===n.type?e._detailsDisplay(s,!1):"mousedown"===n.type?t(this).css("outline","none"):"mouseup"===n.type&&t(this).trigger("blur").css("outline","")}}))},_detailsObj:function(e){var i=this,n=this.s.dt;return t.map(this.s.columns,(function(o,r){if(!o.never&&!o.control){var s=n.settings()[0].aoColumns[r];return{className:s.sClass,columnIndex:r,data:n.cell(e,r).render(i.c.orthogonal),hidden:n.column(r).visible()&&!i.s.current[r],rowIndex:e,title:null!==s.sTitle?s.sTitle:t(n.column(r).header()).text()}}}))},_find:function(t){for(var e=this.c.breakpoints,i=0,n=e.length;i<n;i++)if(e[i].name===t)return e[i]},_redrawChildren:function(){var t=this,e=this.s.dt;e.rows({page:"current"}).iterator("row",(function(i,n){e.row(n),t._detailsDisplay(e.row(n),!0)}))},_resize:function(i){var n,o,r=this,s=this.s.dt,a=t(e).innerWidth(),l=this.c.breakpoints,c=l[0].name,d=this.s.columns,h=this.s.current.slice();for(n=l.length-1;n>=0;n--)if(a<=l[n].width){c=l[n].name;break}var u=this._columnsVisiblity(c);this.s.current=u;var p=!1;for(n=0,o=d.length;n<o;n++)if(!1===u[n]&&!d[n].never&&!d[n].control&&0==!s.column(n).visible()){p=!0;break}t(s.table().node()).toggleClass("collapsed",p);var f=!1,g=0;s.columns().eq(0).each((function(t,e){!0===u[e]&&g++,(i||u[e]!==h[e])&&(f=!0,r._setColumnVis(t,u[e]))})),f&&(this._redrawChildren(),t(s.table().node()).trigger("responsive-resize.dt",[s,this.s.current]),0===s.page.info().recordsDisplay&&t("td",s.table().body()).eq(0).attr("colspan",g)),r._controlClass()},_resizeAuto:function(){var e=this.s.dt,i=this.s.columns;if(this.c.auto&&-1!==t.inArray(!0,t.map(i,(function(t){return t.auto})))){t.isEmptyObject(s)||t.each(s,(function(t){var i=t.split("-");a(e,1*i[0],1*i[1])})),e.table().node().offsetWidth,e.columns;var n=e.table().node().cloneNode(!1),o=t(e.table().header().cloneNode(!1)).appendTo(n),r=t(e.table().body()).clone(!1,!1).empty().appendTo(n);n.style.width="auto";var l=e.columns().header().filter((function(t){return e.column(t).visible()})).to$().clone(!1).css("display","table-cell").css("width","auto").css("min-width",0);t(r).append(t(e.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");var c=e.table().footer();if(c){var d=t(c.cloneNode(!1)).appendTo(n),h=e.columns().footer().filter((function(t){return e.column(t).visible()})).to$().clone(!1).css("display","table-cell");t("<tr/>").append(h).appendTo(d)}t("<tr/>").append(l).appendTo(o),"inline"===this.c.details.type&&t(n).addClass("dtr-inline collapsed"),t(n).find("[name]").removeAttr("name"),t(n).css("position","relative");var u=t("<div/>").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(n);u.insertBefore(e.table().node()),l.each((function(t){var n=e.column.index("fromVisible",t);i[n].minWidth=this.offsetWidth||0})),u.remove()}},_responsiveOnlyHidden:function(){var e=this.s.dt;return t.map(this.s.current,(function(t,i){return!1===e.column(i).visible()||t}))},_setColumnVis:function(e,i){var n=this.s.dt,o=i?"":"none";t(n.column(e).header()).css("display",o).toggleClass("dtr-hidden",!i),t(n.column(e).footer()).css("display",o).toggleClass("dtr-hidden",!i),n.column(e).nodes().to$().css("display",o).toggleClass("dtr-hidden",!i),t.isEmptyObject(s)||n.cells(null,e).indexes().each((function(t){a(n,t.row,t.column)}))},_tabIndexes:function(){var e=this.s.dt,i=e.cells({page:"current"}).nodes().to$(),n=e.settings()[0],o=this.c.details.target;i.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]"),"number"==typeof o?e.cells(null,o,{page:"current"}).nodes().to$().attr("tabIndex",n.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"===o&&(o=">td:first-child, >th:first-child"),t(o,e.rows({page:"current"}).nodes()).attr("tabIndex",n.iTabIndex).data("dtr-keyboard",1))}}),r.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],r.display={childRow:function(e,i,n){return i?t(e.node()).hasClass("parent")?(e.child(n(),"child").show(),!0):void 0:e.child.isShown()?(e.child(!1),t(e.node()).removeClass("parent"),!1):(e.child(n(),"child").show(),t(e.node()).addClass("parent"),!0)},childRowImmediate:function(e,i,n){return!i&&e.child.isShown()||!e.responsive.hasHidden()?(e.child(!1),t(e.node()).removeClass("parent"),!1):(e.child(n(),"child").show(),t(e.node()).addClass("parent"),!0)},modal:function(e){return function(n,o,r){if(o)t("div.dtr-modal-content").empty().append(r());else{var s=function(){a.remove(),t(i).off("keypress.dtr")},a=t('<div class="dtr-modal"/>').append(t('<div class="dtr-modal-display"/>').append(t('<div class="dtr-modal-content"/>').append(r())).append(t('<div class="dtr-modal-close">&times;</div>').click((function(){s()})))).append(t('<div class="dtr-modal-background"/>').click((function(){s()}))).appendTo("body");t(i).on("keyup.dtr",(function(t){27===t.keyCode&&(t.stopPropagation(),s())}))}e&&e.header&&t("div.dtr-modal-content").prepend("<h2>"+e.header(n)+"</h2>")}}};var s={};function a(t,e,i){var o=e+"-"+i;if(s[o]){for(var r=t.cell(e,i).node(),a=s[o][0].parentNode.childNodes,l=[],c=0,d=a.length;c<d;c++)l.push(a[c]);for(var h=0,u=l.length;h<u;h++)r.appendChild(l[h]);s[o]=n}}r.renderer={listHiddenNodes:function(){return function(e,i,n){var o=t('<ul data-dtr-index="'+i+'" class="dtr-details"/>'),r=!1;return t.each(n,(function(i,n){if(n.hidden){var a=n.className?'class="'+n.className+'"':"";t("<li "+a+' data-dtr-index="'+n.columnIndex+'" data-dt-row="'+n.rowIndex+'" data-dt-column="'+n.columnIndex+'"><span class="dtr-title">'+n.title+"</span> </li>").append(t('<span class="dtr-data"/>').append(function(t,e,i){var n=e+"-"+i;if(s[n])return s[n];for(var o=[],r=t.cell(e,i).node().childNodes,a=0,l=r.length;a<l;a++)o.push(r[a]);return s[n]=o,o}(e,n.rowIndex,n.columnIndex))).appendTo(o),r=!0}})),!!r&&o}},listHidden:function(){return function(e,i,n){var o=t.map(n,(function(t){var e=t.className?'class="'+t.className+'"':"";return t.hidden?"<li "+e+' data-dtr-index="'+t.columnIndex+'" data-dt-row="'+t.rowIndex+'" data-dt-column="'+t.columnIndex+'"><span class="dtr-title">'+t.title+'</span> <span class="dtr-data">'+t.data+"</span></li>":""})).join("");return!!o&&t('<ul data-dtr-index="'+i+'" class="dtr-details"/>').append(o)}},tableAll:function(e){return e=t.extend({tableClass:""},e),function(i,n,o){var r=t.map(o,(function(t){return"<tr "+(t.className?'class="'+t.className+'"':"")+' data-dt-row="'+t.rowIndex+'" data-dt-column="'+t.columnIndex+'"><td>'+t.title+":</td> <td>"+t.data+"</td></tr>"})).join("");return t('<table class="'+e.tableClass+' dtr-details" width="100%"/>').append(r)}}},r.defaults={breakpoints:r.breakpoints,auto:!0,details:{display:r.display.childRow,renderer:r.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var l=t.fn.dataTable.Api;return l.register("responsive()",(function(){return this})),l.register("responsive.index()",(function(e){return{column:(e=t(e)).data("dtr-index"),row:e.parent().data("dtr-index")}})),l.register("responsive.rebuild()",(function(){return this.iterator("table",(function(t){t._responsive&&t._responsive._classLogic()}))})),l.register("responsive.recalc()",(function(){return this.iterator("table",(function(t){t._responsive&&(t._responsive._resizeAuto(),t._responsive._resize())}))})),l.register("responsive.hasHidden()",(function(){var e=this.context[0];return!!e._responsive&&-1!==t.inArray(!1,e._responsive._responsiveOnlyHidden())})),l.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",(function(){return this.iterator("column",(function(t,e){return!!t._responsive&&t._responsive._responsiveOnlyHidden()[e]}),1)})),r.version="2.2.9",t.fn.dataTable.Responsive=r,t.fn.DataTable.Responsive=r,t(i).on("preInit.dt.dtr",(function(e,i,n){if("dt"===e.namespace&&(t(i.nTable).hasClass("responsive")||t(i.nTable).hasClass("dt-responsive")||i.oInit.responsive||o.defaults.responsive)){var s=i.oInit.responsive;!1!==s&&new r(i,t.isPlainObject(s)?s:{})}})),r})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-responsive"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.Responsive||require("datatables.net-responsive")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=o.Responsive.display,s=r.modal,a=t('<div class="modal fade dtr-bs-modal" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body"/></div></div></div>');return r.modal=function(e){return function(i,n,o){if(t.fn.modal){if(!n){if(e&&e.header){var r=a.find("div.modal-header"),l=r.find("button").detach();r.empty().append('<h4 class="modal-title">'+e.header(i)+"</h4>").append(l)}a.find("div.modal-body").empty().append(o()),a.appendTo("body").modal()}}else s(i,n,o)}},o.Responsive})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=function(e,i){if(!o.versionCheck||!o.versionCheck("1.10.8"))throw"RowGroup requires DataTables 1.10.8 or newer";this.c=t.extend(!0,{},o.defaults.rowGroup,r.defaults,i),this.s={dt:new o.Api(e)},this.dom={};var n=this.s.dt.settings()[0],s=n.rowGroup;if(s)return s;n.rowGroup=this,this._constructor()};return t.extend(r.prototype,{dataSrc:function(e){if(e===n)return this.c.dataSrc;var i=this.s.dt;return this.c.dataSrc=e,t(i.table().node()).triggerHandler("rowgroup-datasrc.dt",[i,e]),this},disable:function(){return this.c.enable=!1,this},enable:function(t){return!1===t?this.disable():(this.c.enable=!0,this)},enabled:function(){return this.c.enable},_constructor:function(){var t=this,e=this.s.dt,i=e.settings()[0];e.on("draw.dtrg",(function(e,n){t.c.enable&&i===n&&t._draw()})),e.on("column-visibility.dt.dtrg responsive-resize.dt.dtrg",(function(){t._adjustColspan()})),e.on("destroy",(function(){e.off(".dtrg")}))},_adjustColspan:function(){t("tr."+this.c.className,this.s.dt.table().body()).find("td:visible").attr("colspan",this._colspan())},_colspan:function(){return this.s.dt.columns().visible().reduce((function(t,e){return t+e}),0)},_draw:function(){var t=this.s.dt,e=this._group(0,t.rows({page:"current"}).indexes());this._groupDisplay(0,e)},_group:function(t,e){for(var i,r=Array.isArray(this.c.dataSrc)?this.c.dataSrc:[this.c.dataSrc],s=o.ext.oApi._fnGetObjectDataFn(r[t]),a=this.s.dt,l=[],c=0,d=e.length;c<d;c++){var h,u=e[c];null!==(h=s(a.row(u).data()))&&h!==n||(h=this.c.emptyDataGroup),i!==n&&h===i||(l.push({dataPoint:h,rows:[]}),i=h),l[l.length-1].rows.push(u)}if(r[t+1]!==n)for(c=0,d=l.length;c<d;c++)l[c].children=this._group(t+1,l[c].rows);return l},_groupDisplay:function(t,e){for(var i,n=this.s.dt,o=0,r=e.length;o<r;o++){var s,a=e[o],l=a.dataPoint,c=a.rows;this.c.startRender&&(i=this.c.startRender.call(this,n.rows(c),l,t),(s=this._rowWrap(i,this.c.startClassName,t))&&s.insertBefore(n.row(c[0]).node())),this.c.endRender&&(i=this.c.endRender.call(this,n.rows(c),l,t),(s=this._rowWrap(i,this.c.endClassName,t))&&s.insertAfter(n.row(c[c.length-1]).node())),a.children&&this._groupDisplay(t+1,a.children)}},_rowWrap:function(e,i,o){return null!==e&&""!==e||(e=this.c.emptyDataGroup),e===n||null===e?null:("object"==typeof e&&e.nodeName&&"tr"===e.nodeName.toLowerCase()?t(e):e instanceof t&&e.length&&"tr"===e[0].nodeName.toLowerCase()?e:t("<tr/>").append(t("<th/>").attr("colspan",this._colspan()).attr("scope","row").append(e))).addClass(this.c.className).addClass(i).addClass("dtrg-level-"+o)}}),r.defaults={className:"dtrg-group",dataSrc:0,emptyDataGroup:"No group",enable:!0,endClassName:"dtrg-end",endRender:null,startClassName:"dtrg-start",startRender:function(t,e){return e}},r.version="1.2.0",t.fn.dataTable.RowGroup=r,t.fn.DataTable.RowGroup=r,o.Api.register("rowGroup()",(function(){return this})),o.Api.register("rowGroup().disable()",(function(){return this.iterator("table",(function(t){t.rowGroup&&t.rowGroup.enable(!1)}))})),o.Api.register("rowGroup().enable()",(function(t){return this.iterator("table",(function(e){e.rowGroup&&e.rowGroup.enable(t===n||t)}))})),o.Api.register("rowGroup().enabled()",(function(){var t=this.context;return!(!t.length||!t[0].rowGroup)&&t[0].rowGroup.enabled()})),o.Api.register("rowGroup().dataSrc()",(function(t){return t===n?this.context[0].rowGroup.dataSrc():this.iterator("table",(function(e){e.rowGroup&&e.rowGroup.dataSrc(t)}))})),t(i).on("preInit.dt.dtrg",(function(e,i,n){if("dt"===e.namespace){var s=i.oInit.rowGroup,a=o.defaults.rowGroup;if(s||a){var l=t.extend({},a,s);!1!==s&&new r(i,l)}}})),r})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-rowgroup"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.RowGroup||require("datatables.net-rowgroup")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){return t.fn.dataTable})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=function(e,i){if(!o.versionCheck||!o.versionCheck("1.10.8"))throw"DataTables RowReorder requires DataTables 1.10.8 or newer";this.c=t.extend(!0,{},o.defaults.rowReorder,r.defaults,i),this.s={bodyTop:null,dt:new o.Api(e),getDataFn:o.ext.oApi._fnGetObjectDataFn(this.c.dataSrc),middles:null,scroll:{},scrollInterval:null,setDataFn:o.ext.oApi._fnSetObjectDataFn(this.c.dataSrc),start:{top:0,left:0,offsetTop:0,offsetLeft:0,nodes:[]},windowHeight:0,documentOuterHeight:0,domCloneOuterHeight:0},this.dom={clone:null,dtScroll:t("div.dataTables_scrollBody",this.s.dt.table().container())};var n=this.s.dt.settings()[0],s=n.rowreorder;if(s)return s;this.dom.dtScroll.length||(this.dom.dtScroll=t(this.s.dt.table().container(),"tbody")),n.rowreorder=this,this._constructor()};t.extend(r.prototype,{_constructor:function(){var e=this,i=this.s.dt,n=t(i.table().node());"static"===n.css("position")&&n.css("position","relative"),t(i.table().container()).on("mousedown.rowReorder touchstart.rowReorder",this.c.selector,(function(n){if(e.c.enable){if(t(n.target).is(e.c.excludedChildren))return!0;var o=t(this).closest("tr"),r=i.row(o);return r.any()?(e._emitEvent("pre-row-reorder",{node:r.node(),index:r.index()}),e._mouseDown(n,o),!1):void 0}})),i.on("destroy.rowReorder",(function(){t(i.table().container()).off(".rowReorder"),i.off(".rowReorder")}))},_cachePositions:function(){var n=this.s.dt,o=t(n.table().node()).find("thead").outerHeight(),r=t.unique(n.rows({page:"current"}).nodes().toArray()),s=t.map(r,(function(e,i){var n=t(e).position().top-o;return(n+n+t(e).outerHeight())/2}));this.s.middles=s,this.s.bodyTop=t(n.table().body()).offset().top,this.s.windowHeight=t(e).height(),this.s.documentOuterHeight=t(i).outerHeight()},_clone:function(e){var i=this.s.dt,n=t(i.table().node().cloneNode(!1)).addClass("dt-rowReorder-float").append("<tbody/>").append(e.clone(!1)),o=e.outerWidth(),r=e.outerHeight(),s=e.children().map((function(){return t(this).width()}));n.width(o).height(r).find("tr").children().each((function(t){this.style.width=s[t]+"px"})),n.appendTo("body"),this.dom.clone=n,this.s.domCloneOuterHeight=n.outerHeight()},_clonePosition:function(t){var e,i=this.s.start,n=this._eventToPage(t,"Y")-i.top,o=this._eventToPage(t,"X")-i.left,r=this.c.snapX,s=n+i.offsetTop;e=!0===r?i.offsetLeft:"number"==typeof r?i.offsetLeft+r:o+i.offsetLeft,s<0?s=0:s+this.s.domCloneOuterHeight>this.s.documentOuterHeight&&(s=this.s.documentOuterHeight-this.s.domCloneOuterHeight),this.dom.clone.css({top:s,left:e})},_emitEvent:function(e,i){this.s.dt.iterator("table",(function(n,o){t(n.nTable).triggerHandler(e+".dt",i)}))},_eventToPage:function(t,e){return-1!==t.type.indexOf("touch")?t.originalEvent.touches[0]["page"+e]:t["page"+e]},_mouseDown:function(n,o){var r=this,s=this.s.dt,a=this.s.start,l=o.offset();a.top=this._eventToPage(n,"Y"),a.left=this._eventToPage(n,"X"),a.offsetTop=l.top,a.offsetLeft=l.left,a.nodes=t.unique(s.rows({page:"current"}).nodes().toArray()),this._cachePositions(),this._clone(o),this._clonePosition(n),this.dom.target=o,o.addClass("dt-rowReorder-moving"),t(i).on("mouseup.rowReorder touchend.rowReorder",(function(t){r._mouseUp(t)})).on("mousemove.rowReorder touchmove.rowReorder",(function(t){r._mouseMove(t)})),t(e).width()===t(i).width()&&t(i.body).addClass("dt-rowReorder-noOverflow");var c=this.dom.dtScroll;this.s.scroll={windowHeight:t(e).height(),windowWidth:t(e).width(),dtTop:c.length?c.offset().top:null,dtLeft:c.length?c.offset().left:null,dtHeight:c.length?c.outerHeight():null,dtWidth:c.length?c.outerWidth():null}},_mouseMove:function(e){this._clonePosition(e);for(var i=this._eventToPage(e,"Y")-this.s.bodyTop,n=this.s.middles,o=null,r=this.s.dt,s=0,a=n.length;s<a;s++)if(i<n[s]){o=s;break}if(null===o&&(o=n.length),null===this.s.lastInsert||this.s.lastInsert!==o){var l=t.unique(r.rows({page:"current"}).nodes().toArray());o>this.s.lastInsert?this.dom.target.insertAfter(l[o-1]):this.dom.target.insertBefore(l[o]),this._cachePositions(),this.s.lastInsert=o}this._shiftScroll(e)},_mouseUp:function(e){var n,o,r=this,s=this.s.dt,a=this.c.dataSrc;this.dom.clone.remove(),this.dom.clone=null,this.dom.target.removeClass("dt-rowReorder-moving"),t(i).off(".rowReorder"),t(i.body).removeClass("dt-rowReorder-noOverflow"),clearInterval(this.s.scrollInterval),this.s.scrollInterval=null;var l=this.s.start.nodes,c=t.unique(s.rows({page:"current"}).nodes().toArray()),d={},h=[],u=[],p=this.s.getDataFn,f=this.s.setDataFn;for(n=0,o=l.length;n<o;n++)if(l[n]!==c[n]){var g=s.row(c[n]).id(),m=s.row(c[n]).data(),v=s.row(l[n]).data();g&&(d[g]=p(v)),h.push({node:c[n],oldData:p(m),newData:p(v),newPosition:n,oldPosition:t.inArray(c[n],l)}),u.push(c[n])}var y=[h,{dataSrc:a,nodes:u,values:d,triggerRow:s.row(this.dom.target),originalEvent:e}];this._emitEvent("row-reorder",y);var b=function(){if(r.c.update){for(n=0,o=h.length;n<o;n++){var t=s.row(h[n].node).data();f(t,h[n].newData),s.columns().every((function(){this.dataSrc()===a&&s.cell(h[n].node,this.index()).invalidate("data")}))}r._emitEvent("row-reordered",y),s.draw(!1)}};this.c.editor?(this.c.enable=!1,this.c.editor.edit(u,!1,t.extend({submit:"changed"},this.c.formOptions)).multiSet(a,d).one("preSubmitCancelled.rowReorder",(function(){r.c.enable=!0,r.c.editor.off(".rowReorder"),s.draw(!1)})).one("submitUnsuccessful.rowReorder",(function(){s.draw(!1)})).one("submitSuccess.rowReorder",(function(){b()})).one("submitComplete",(function(){r.c.enable=!0,r.c.editor.off(".rowReorder")})).submit()):b()},_shiftScroll:function(n){var o,r,s=this,a=(this.s.dt,this.s.scroll),l=!1,c=n.pageY-i.body.scrollTop;c<t(e).scrollTop()+65?o=-5:c>a.windowHeight+t(e).scrollTop()-65&&(o=5),null!==a.dtTop&&n.pageY<a.dtTop+65?r=-5:null!==a.dtTop&&n.pageY>a.dtTop+a.dtHeight-65&&(r=5),o||r?(a.windowVert=o,a.dtVert=r,l=!0):this.s.scrollInterval&&(clearInterval(this.s.scrollInterval),this.s.scrollInterval=null),!this.s.scrollInterval&&l&&(this.s.scrollInterval=setInterval((function(){if(a.windowVert){var e=t(i).scrollTop();if(t(i).scrollTop(e+a.windowVert),e!==t(i).scrollTop()){var n=parseFloat(s.dom.clone.css("top"));s.dom.clone.css("top",n+a.windowVert)}}if(a.dtVert){var o=s.dom.dtScroll[0];a.dtVert&&(o.scrollTop+=a.dtVert)}}),20))}}),r.defaults={dataSrc:0,editor:null,enable:!0,formOptions:{},selector:"td:first-child",snapX:!1,update:!0,excludedChildren:"a"};var s=t.fn.dataTable.Api;return s.register("rowReorder()",(function(){return this})),s.register("rowReorder.enable()",(function(t){return t===n&&(t=!0),this.iterator("table",(function(e){e.rowreorder&&(e.rowreorder.c.enable=t)}))})),s.register("rowReorder.disable()",(function(){return this.iterator("table",(function(t){t.rowreorder&&(t.rowreorder.c.enable=!1)}))})),r.version="1.2.8",t.fn.dataTable.RowReorder=r,t.fn.DataTable.RowReorder=r,t(i).on("init.dt.dtr",(function(e,i,n){if("dt"===e.namespace){var s=i.oInit.rowReorder,a=o.defaults.rowReorder;if(s||a){var l=t.extend({},s,a);!1!==s&&new r(i,l)}}})),r})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-rowreorder"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.RowReorder||require("datatables.net-rowreorder")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){return t.fn.dataTable})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=function(e,o){if(this instanceof r){o===n&&(o={});var s=t.fn.dataTable.Api(e);this.s={dt:s.settings()[0],dtApi:s,tableTop:0,tableBottom:0,redrawTop:0,redrawBottom:0,autoHeight:!0,viewportRows:0,stateTO:null,stateSaveThrottle:function(){},drawTO:null,heights:{jump:null,page:null,virtual:null,scroll:null,row:null,viewport:null,labelHeight:0,xbar:0},topRowFloat:0,scrollDrawDiff:null,loaderVisible:!1,forceReposition:!1,baseRowTop:0,baseScrollTop:0,mousedown:!1,lastScrollTop:0},this.s=t.extend(this.s,r.oDefaults,o),this.s.heights.row=this.s.rowHeight,this.dom={force:i.createElement("div"),label:t('<div class="dts_label">0</div>'),scroller:null,table:null,loader:null},this.s.dt.oScroller||(this.s.dt.oScroller=this,this.construct())}else alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")};t.extend(r.prototype,{measure:function(e){this.s.autoHeight&&this._calcRowHeight();var i=this.s.heights;i.row&&(i.viewport=this._parseHeight(t(this.dom.scroller).css("max-height")),this.s.viewportRows=parseInt(i.viewport/i.row,10)+1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer);var o=this.dom.label.outerHeight();i.xbar=this.dom.scroller.offsetHeight-this.dom.scroller.clientHeight,i.labelHeight=o,(e===n||e)&&this.s.dt.oInstance.fnDraw(!1)},pageInfo:function(){var t=this.s.dt,e=this.dom.scroller.scrollTop,i=t.fnRecordsDisplay(),n=Math.ceil(this.pixelsToRow(e+this.s.heights.viewport,!1,this.s.ani));return{start:Math.floor(this.pixelsToRow(e,!1,this.s.ani)),end:i<n?i-1:n-1}},pixelsToRow:function(t,e,i){var o=t-this.s.baseScrollTop,r=i?(this._domain("physicalToVirtual",this.s.baseScrollTop)+o)/this.s.heights.row:o/this.s.heights.row+this.s.baseRowTop;return e||e===n?parseInt(r,10):r},rowToPixels:function(t,e,i){var o,r=t-this.s.baseRowTop;return i?(o=this._domain("virtualToPhysical",this.s.baseScrollTop),o+=r*this.s.heights.row):(o=this.s.baseScrollTop,o+=r*this.s.heights.row),e||e===n?parseInt(o,10):o},scrollToRow:function(e,i){var o=this,r=!1,s=this.rowToPixels(e),a=e-(this.s.displayBuffer-1)/2*this.s.viewportRows;a<0&&(a=0),(s>this.s.redrawBottom||s<this.s.redrawTop)&&this.s.dt._iDisplayStart!==a&&(r=!0,s=this._domain("virtualToPhysical",e*this.s.heights.row),this.s.redrawTop<s&&s<this.s.redrawBottom&&(this.s.forceReposition=!0,i=!1)),i===n||i?(this.s.ani=r,t(this.dom.scroller).animate({scrollTop:s},(function(){setTimeout((function(){o.s.ani=!1}),250)}))):t(this.dom.scroller).scrollTop(s)},construct:function(){var i=this,o=this.s.dtApi;if(this.s.dt.oFeatures.bPaginate){this.dom.force.style.position="relative",this.dom.force.style.top="0px",this.dom.force.style.left="0px",this.dom.force.style.width="1px",this.dom.scroller=t("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0],this.dom.scroller.appendChild(this.dom.force),this.dom.scroller.style.position="relative",this.dom.table=t(">table",this.dom.scroller)[0],this.dom.table.style.position="absolute",this.dom.table.style.top="0px",this.dom.table.style.left="0px",t(o.table().container()).addClass("dts DTS"),this.s.loadingIndicator&&(this.dom.loader=t('<div class="dataTables_processing dts_loading">'+this.s.dt.oLanguage.sLoadingRecords+"</div>").css("display","none"),t(this.dom.scroller.parentNode).css("position","relative").append(this.dom.loader)),this.dom.label.appendTo(this.dom.scroller),this.s.heights.row&&"auto"!=this.s.heights.row&&(this.s.autoHeight=!1),this.s.ingnoreScroll=!0,t(this.dom.scroller).on("scroll.dt-scroller",(function(t){i._scroll.call(i)})),t(this.dom.scroller).on("touchstart.dt-scroller",(function(){i._scroll.call(i)})),t(this.dom.scroller).on("mousedown.dt-scroller",(function(){i.s.mousedown=!0})).on("mouseup.dt-scroller",(function(){i.s.labelVisible=!1,i.s.mousedown=!1,i.dom.label.css("display","none")})),t(e).on("resize.dt-scroller",(function(){i.measure(!1),i._info()}));var r=!0,s=o.state.loaded();o.on("stateSaveParams.scroller",(function(t,e,n){r&&s?(n.scroller=s.scroller,r=!1,n.scroller&&(i.s.lastScrollTop=n.scroller.scrollTop)):n.scroller={topRow:i.s.topRowFloat,baseScrollTop:i.s.baseScrollTop,baseRowTop:i.s.baseRowTop,scrollTop:i.s.lastScrollTop}})),o.on("stateLoadParams.scroller",(function(t,e,o){o.scroller!==n&&i.scrollToRow(o.scroller.topRow)})),s&&s.scroller&&(this.s.topRowFloat=s.scroller.topRow,this.s.baseScrollTop=s.scroller.baseScrollTop,this.s.baseRowTop=s.scroller.baseRowTop),this.measure(!1),i.s.stateSaveThrottle=i.s.dt.oApi._fnThrottle((function(){i.s.dtApi.state.save()}),500),o.on("init.scroller",(function(){i.measure(!1),i.s.scrollType="jump",i._draw(),o.on("draw.scroller",(function(){i._draw()}))})),o.on("preDraw.dt.scroller",(function(){i._scrollForce()})),o.on("destroy.scroller",(function(){t(e).off("resize.dt-scroller"),t(i.dom.scroller).off(".dt-scroller"),t(i.s.dt.nTable).off(".scroller"),t(i.s.dt.nTableWrapper).removeClass("DTS"),t("div.DTS_Loading",i.dom.scroller.parentNode).remove(),i.dom.table.style.position="",i.dom.table.style.top="",i.dom.table.style.left=""}))}else this.s.dt.oApi._fnLog(this.s.dt,0,"Pagination must be enabled for Scroller")},_calcRowHeight:function(){var e=this.s.dt,i=e.nTable,n=i.cloneNode(!1),o=t("<tbody/>").appendTo(n),r=t('<div class="'+e.oClasses.sWrapper+' DTS"><div class="'+e.oClasses.sScrollWrapper+'"><div class="'+e.oClasses.sScrollBody+'"></div></div></div>');t("tbody tr:lt(4)",i).clone().appendTo(o);var s=t("tr",o).length;if(1===s)o.prepend("<tr><td>&#160;</td></tr>"),o.append("<tr><td>&#160;</td></tr>");else for(;s<3;s++)o.append("<tr><td>&#160;</td></tr>");t("div."+e.oClasses.sScrollBody,r).append(n);var a=this.s.dt.nHolding||i.parentNode;t(a).is(":visible")||(a="body"),r.find("input").removeAttr("name"),r.appendTo(a),this.s.heights.row=t("tr",o).eq(1).outerHeight(),r.remove()},_draw:function(){var e=this,i=this.s.heights,n=this.dom.scroller.scrollTop,o=t(this.s.dt.nTable).height(),r=this.s.dt._iDisplayStart,s=this.s.dt._iDisplayLength,a=this.s.dt.fnRecordsDisplay();this.s.skip=!0,!this.s.dt.bSorted&&!this.s.dt.bFiltered||0!==r||this.s.dt._drawHold||(this.s.topRowFloat=0),n="jump"===this.s.scrollType?this._domain("virtualToPhysical",this.s.topRowFloat*i.row):n,this.s.baseScrollTop=n,this.s.baseRowTop=this.s.topRowFloat;var l=n-(this.s.topRowFloat-r)*i.row;0===r?l=0:r+s>=a&&(l=i.scroll-o),this.dom.table.style.top=l+"px",this.s.tableTop=l,this.s.tableBottom=o+this.s.tableTop;var c=(n-this.s.tableTop)*this.s.boundaryScale;if(this.s.redrawTop=n-c,this.s.redrawBottom=n+c>i.scroll-i.viewport-i.row?i.scroll-i.viewport-i.row:n+c,this.s.skip=!1,e.s.ingnoreScroll)if(this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&void 0!==this.s.dt.oLoadedState.scroller){var d=!(!this.s.dt.sAjaxSource&&!e.s.dt.ajax||this.s.dt.oFeatures.bServerSide);(d&&this.s.dt.iDraw>=2||!d&&this.s.dt.iDraw>=1)&&setTimeout((function(){t(e.dom.scroller).scrollTop(e.s.dt.oLoadedState.scroller.scrollTop),setTimeout((function(){e.s.ingnoreScroll=!1}),0)}),0)}else e.s.ingnoreScroll=!1;this.s.dt.oFeatures.bInfo&&setTimeout((function(){e._info.call(e)}),0),t(this.s.dt.nTable).triggerHandler("position.dts.dt",l),this.dom.loader&&this.s.loaderVisible&&(this.dom.loader.css("display","none"),this.s.loaderVisible=!1)},_domain:function(t,e){var i,n=this.s.heights,o=1e4;if(n.virtual===n.scroll)return e;if(e<o)return e;if("virtualToPhysical"===t&&e>=n.virtual-o)return i=n.virtual-e,n.scroll-i;if("physicalToVirtual"===t&&e>=n.scroll-o)return i=n.scroll-e,n.virtual-i;var r=(n.virtual-o-o)/(n.scroll-o-o),s=o-r*o;return"virtualToPhysical"===t?(e-s)/r:r*e+s},_info:function(){if(this.s.dt.oFeatures.bInfo){var e,i=this.s.dt,n=i.oLanguage,o=this.dom.scroller.scrollTop,r=Math.floor(this.pixelsToRow(o,!1,this.s.ani)+1),s=i.fnRecordsTotal(),a=i.fnRecordsDisplay(),l=Math.ceil(this.pixelsToRow(o+this.s.heights.viewport,!1,this.s.ani)),c=a<l?a:l,d=i.fnFormatNumber(r),h=i.fnFormatNumber(c),u=i.fnFormatNumber(s),p=i.fnFormatNumber(a);e=0===i.fnRecordsDisplay()&&i.fnRecordsDisplay()==i.fnRecordsTotal()?n.sInfoEmpty+n.sInfoPostFix:0===i.fnRecordsDisplay()?n.sInfoEmpty+" "+n.sInfoFiltered.replace("_MAX_",u)+n.sInfoPostFix:i.fnRecordsDisplay()==i.fnRecordsTotal()?n.sInfo.replace("_START_",d).replace("_END_",h).replace("_MAX_",u).replace("_TOTAL_",p)+n.sInfoPostFix:n.sInfo.replace("_START_",d).replace("_END_",h).replace("_MAX_",u).replace("_TOTAL_",p)+" "+n.sInfoFiltered.replace("_MAX_",i.fnFormatNumber(i.fnRecordsTotal()))+n.sInfoPostFix;var f=n.fnInfoCallback;f&&(e=f.call(i.oInstance,i,r,c,s,a,e));var g=i.aanFeatures.i;if(void 0!==g)for(var m=0,v=g.length;m<v;m++)t(g[m]).html(e);t(i.nTable).triggerHandler("info.dt")}},_parseHeight:function(i){var n,o=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))(px|em|rem|vh)$/.exec(i);if(null===o)return 0;var r=parseFloat(o[1]),s=o[2];return"px"===s?n=r:"vh"===s?n=r/100*t(e).height():"rem"===s?n=r*parseFloat(t(":root").css("font-size")):"em"===s&&(n=r*parseFloat(t("body").css("font-size"))),n||0},_scroll:function(){var e,i=this,n=this.s.heights,o=this.dom.scroller.scrollTop;if(!this.s.skip&&!this.s.ingnoreScroll&&o!==this.s.lastScrollTop)if(this.s.dt.bFiltered||this.s.dt.bSorted)this.s.lastScrollTop=0;else{if(this._info(),clearTimeout(this.s.stateTO),this.s.stateTO=setTimeout((function(){i.s.dtApi.state.save()}),250),this.s.scrollType=Math.abs(o-this.s.lastScrollTop)>n.viewport?"jump":"cont",this.s.topRowFloat="cont"===this.s.scrollType?this.pixelsToRow(o,!1,!1):this._domain("physicalToVirtual",o)/n.row,this.s.topRowFloat<0&&(this.s.topRowFloat=0),this.s.forceReposition||o<this.s.redrawTop||o>this.s.redrawBottom){var r=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows);if(e=parseInt(this.s.topRowFloat,10)-r,this.s.forceReposition=!1,e<=0?e=0:e+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?(e=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength)<0&&(e=0):e%2!=0&&e++,this.s.targetTop=e,e!=this.s.dt._iDisplayStart){this.s.tableTop=t(this.s.dt.nTable).offset().top,this.s.tableBottom=t(this.s.dt.nTable).height()+this.s.tableTop;var s=function(){i.s.dt._iDisplayStart=i.s.targetTop,i.s.dt.oApi._fnDraw(i.s.dt)};this.s.dt.oFeatures.bServerSide?(this.s.forceReposition=!0,clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(s,this.s.serverWait)):s(),this.dom.loader&&!this.s.loaderVisible&&(this.dom.loader.css("display","block"),this.s.loaderVisible=!0)}}else this.s.topRowFloat=this.pixelsToRow(o,!1,!0);if(this.s.lastScrollTop=o,this.s.stateSaveThrottle(),"jump"===this.s.scrollType&&this.s.mousedown&&(this.s.labelVisible=!0),this.s.labelVisible){var a=(n.viewport-n.labelHeight-n.xbar)/n.scroll;this.dom.label.html(this.s.dt.fnFormatNumber(parseInt(this.s.topRowFloat,10)+1)).css("top",o+o*a).css("right",10-this.dom.scroller.scrollLeft).css("display","block")}}},_scrollForce:function(){var t=this.s.heights,e=1e6;t.virtual=t.row*this.s.dt.fnRecordsDisplay(),t.scroll=t.virtual,t.scroll>e&&(t.scroll=e),this.dom.force.style.height=t.scroll>this.s.heights.row?t.scroll+"px":this.s.heights.row+"px"}}),r.defaults={boundaryScale:.5,displayBuffer:9,loadingIndicator:!1,rowHeight:"auto",serverWait:200},r.oDefaults=r.defaults,r.version="2.0.7",t(i).on("preInit.dt.dtscroller",(function(e,i){if("dt"===e.namespace){var n=i.oInit.scroller,s=o.defaults.scroller;if(n||s){var a=t.extend({},n,s);!1!==n&&new r(i,a)}}})),t.fn.dataTable.Scroller=r,t.fn.DataTable.Scroller=r;var s=t.fn.dataTable.Api;return s.register("scroller()",(function(){return this})),s.register("scroller().rowToPixels()",(function(t,e,i){var n=this.context;if(n.length&&n[0].oScroller)return n[0].oScroller.rowToPixels(t,e,i)})),s.register("scroller().pixelsToRow()",(function(t,e,i){var n=this.context;if(n.length&&n[0].oScroller)return n[0].oScroller.pixelsToRow(t,e,i)})),s.register(["scroller().scrollToRow()","scroller.toPosition()"],(function(t,e){return this.iterator("table",(function(i){i.oScroller&&i.oScroller.scrollToRow(t,e)})),this})),s.register("row().scrollTo()",(function(t){var e=this;return this.iterator("row",(function(i,n){if(i.oScroller){var o=e.rows({order:"applied",search:"applied"}).indexes().indexOf(n);i.oScroller.scrollToRow(o,t)}})),this})),s.register("scroller.measure()",(function(t){return this.iterator("table",(function(e){e.oScroller&&e.oScroller.measure(t)})),this})),s.register("scroller.page()",(function(){var t=this.context;if(t.length&&t[0].oScroller)return t[0].oScroller.pageInfo()})),r})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-scroller"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.Scroller||require("datatables.net-scroller")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){return t.fn.dataTable})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable;function r(t,e,i){var n,o,r,s=function(e,i){if(e>i){var n=i;i=e,e=n}var o=!1;return t.columns(":visible").indexes().filter((function(t){return t===e&&(o=!0),t===i?(o=!1,!0):o}))},a=function(e,i){var n=t.rows({search:"applied"}).indexes();if(n.indexOf(e)>n.indexOf(i)){var o=i;i=e,e=o}var r=!1;return n.filter((function(t){return t===e&&(r=!0),t===i?(r=!1,!0):r}))};t.cells({selected:!0}).any()||i?(o=s(i.column,e.column),r=a(i.row,e.row)):(o=s(0,e.column),r=a(0,e.row)),n=t.cells(r,o).flatten(),t.cells(e,{selected:!0}).any()?t.cells(n).deselect():t.cells(n).select()}function s(e){var i=e.settings()[0]._select.selector;t(e.table().container()).off("mousedown.dtSelect",i).off("mouseup.dtSelect",i).off("click.dtSelect",i),t("body").off("click.dtSelect"+p(e.table().node()))}function a(i){var n,o=t(i.table().container()),r=i.settings()[0],s=r._select.selector;o.on("mousedown.dtSelect",s,(function(t){(t.shiftKey||t.metaKey||t.ctrlKey)&&o.css("-moz-user-select","none").one("selectstart.dtSelect",s,(function(){return!1})),e.getSelection&&(n=e.getSelection())})).on("mouseup.dtSelect",s,(function(){o.css("-moz-user-select","")})).on("click.dtSelect",s,(function(o){var r,s=i.select.items();if(n){var a=e.getSelection();if((!a.anchorNode||t(a.anchorNode).closest("table")[0]===i.table().node())&&a!==n)return}var c=i.settings()[0],d=i.settings()[0].oClasses.sWrapper.trim().replace(/ +/g,".");if(t(o.target).closest("div."+d)[0]==i.table().container()){var h=i.cell(t(o.target).closest("td, th"));if(h.any()){var p=t.Event("user-select.dt");if(l(i,p,[s,h,o]),!p.isDefaultPrevented()){var f=h.index();"row"===s?(r=f.row,u(o,i,c,"row",r)):"column"===s?(r=h.index().column,u(o,i,c,"column",r)):"cell"===s&&(r=h.index(),u(o,i,c,"cell",r)),c._select_lastCell=f}}}})),t("body").on("click.dtSelect"+p(i.table().node()),(function(e){if(r._select.blurable){if(t(e.target).parents().filter(i.table().container()).length)return;if(0===t(e.target).parents("html").length)return;if(t(e.target).parents("div.DTE").length)return;var n=t.Event("select-blur.dt");if(l(i,n,[e.target,e]),n.isDefaultPrevented())return;h(r,!0)}}))}function l(e,i,n,o){o&&!e.flatten().length||("string"==typeof i&&(i+=".dt"),n.unshift(e),t(e.table().node()).trigger(i,n))}function c(e){var i=new o.Api(e);e._select_init=!0,e.aoRowCreatedCallback.push({fn:function(i,n,o){var r,s,a=e.aoData[o];for(a._select_selected&&t(i).addClass(e._select.className),r=0,s=e.aoColumns.length;r<s;r++)(e.aoColumns[r]._select_selected||a._selected_cells&&a._selected_cells[r])&&t(a.anCells[r]).addClass(e._select.className)},sName:"select-deferRender"}),i.on("preXhr.dt.dtSelect",(function(t,e){if(e===i.settings()[0]){var o=i.rows({selected:!0}).ids(!0).filter((function(t){return t!==n})),r=i.cells({selected:!0}).eq(0).map((function(t){var e=i.row(t.row).id(!0);return e?{row:e,column:t.column}:n})).filter((function(t){return t!==n}));i.one("draw.dt.dtSelect",(function(){i.rows(o).select(),r.any()&&r.each((function(t){i.cells(t.row,t.column).select()}))}))}})),i.on("draw.dtSelect.dt select.dtSelect.dt deselect.dtSelect.dt info.dt",(function(){!function(e){var i=e.settings()[0];if(i._select.info&&i.aanFeatures.i&&"api"!==e.select.style()){var n=e.rows({selected:!0}).flatten().length,o=e.columns({selected:!0}).flatten().length,r=e.cells({selected:!0}).flatten().length,s=function(i,n,o){i.append(t('<span class="select-item"/>').append(e.i18n("select."+n+"s",{_:"%d "+n+"s selected",0:"",1:"1 "+n+" selected"},o)))};t.each(i.aanFeatures.i,(function(e,i){i=t(i);var a=t('<span class="select-info"/>');s(a,"row",n),s(a,"column",o),s(a,"cell",r);var l=i.children("span.select-info");l.length&&l.remove(),""!==a.text()&&i.append(a)}))}}(i),i.state.save()})),i.on("destroy.dtSelect",(function(){i.rows({selected:!0}).deselect(),s(i),i.off(".dtSelect"),t("body").off(".dtSelect"+p(i.table().node()))}))}function d(e,i,n,o){var r=e[i+"s"]({search:"applied"}).indexes(),s=t.inArray(o,r),a=t.inArray(n,r);if(e[i+"s"]({selected:!0}).any()||-1!==s){if(s>a){var l=a;a=s,s=l}r.splice(a+1,r.length),r.splice(0,s)}else r.splice(t.inArray(n,r)+1,r.length);e[i](n,{selected:!0}).any()?(r.splice(t.inArray(n,r),1),e[i+"s"](r).deselect()):e[i+"s"](r).select()}function h(t,e){if(e||"single"===t._select.style){var i=new o.Api(t);i.rows({selected:!0}).deselect(),i.columns({selected:!0}).deselect(),i.cells({selected:!0}).deselect()}}function u(t,e,i,n,o){var s=e.select.style(),a=e.select.toggleable(),l=e[n](o,{selected:!0}).any();if(!l||a)if("os"===s)if(t.ctrlKey||t.metaKey)e[n](o).select(!l);else if(t.shiftKey)"cell"===n?r(e,o,i._select_lastCell||null):d(e,n,o,i._select_lastCell?i._select_lastCell[n]:null);else{var c=e[n+"s"]({selected:!0});l&&1===c.flatten().length?e[n](o).deselect():(c.deselect(),e[n](o).select())}else"multi+shift"==s&&t.shiftKey?"cell"===n?r(e,o,i._select_lastCell||null):d(e,n,o,i._select_lastCell?i._select_lastCell[n]:null):e[n](o).select(!l)}function p(t){return t.id.replace(/[^a-zA-Z0-9\-\_]/g,"-")}o.select={},o.select.version="1.4.0-dev",o.select.init=function(e){var i=e.settings()[0];if(!i._select){var r=e.state.loaded(),s=function(t,i,o){if(null!==o&&o.select!==n){if(e.rows({selected:!0}).any()&&e.rows().deselect(),o.select.rows!==n&&e.rows(o.select.rows).select(),e.columns({selected:!0}).any()&&e.columns().deselect(),o.select.columns!==n&&e.columns(o.select.columns).select(),e.cells({selected:!0}).any()&&e.cells().deselect(),o.select.cells!==n)for(var r=0;r<o.select.cells.length;r++)e.cell(o.select.cells[r].row,o.select.cells[r].column).select();e.state.save()}};e.one("init",(function(){e.on("stateSaveParams",(function(t,i,n){n.select={},n.select.rows=e.rows({selected:!0}).ids(!0).toArray(),n.select.columns=e.columns({selected:!0})[0],n.select.cells=e.cells({selected:!0})[0].map((function(t){return{row:e.row(t.row).id(!0),column:t.column}}))})),s(0,0,r),e.on("stateLoaded stateLoadParams",s)}));var a=i.oInit.select,l=o.defaults.select,c=a===n?l:a,d="row",h="api",u=!1,p=!0,f=!0,g="td, th",m="selected",v=!1;i._select={},!0===c?(h="os",v=!0):"string"==typeof c?(h=c,v=!0):t.isPlainObject(c)&&(c.blurable!==n&&(u=c.blurable),c.toggleable!==n&&(p=c.toggleable),c.info!==n&&(f=c.info),c.items!==n&&(d=c.items),c.style!==n?(h=c.style,v=!0):(h="os",v=!0),c.selector!==n&&(g=c.selector),c.className!==n&&(m=c.className)),e.select.selector(g),e.select.items(d),e.select.style(h),e.select.blurable(u),e.select.toggleable(p),e.select.info(f),i._select.className=m,t.fn.dataTable.ext.order["select-checkbox"]=function(e,i){return this.api().column(i,{order:"index"}).nodes().map((function(i){return"row"===e._select.items?t(i).parent().hasClass(e._select.className):"cell"===e._select.items&&t(i).hasClass(e._select.className)}))},!v&&t(e.table().node()).hasClass("selectable")&&e.select.style("os")}},t.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],(function(t,e){o.ext.selector[e.type].push((function(t,i,n){var o,r=i.selected,s=[];if(!0!==r&&!1!==r)return n;for(var a=0,l=n.length;a<l;a++)o=t[e.prop][n[a]],(!0===r&&!0===o._select_selected||!1===r&&!o._select_selected)&&s.push(n[a]);return s}))})),o.ext.selector.cell.push((function(t,e,i){var o,r=e.selected,s=[];if(r===n)return i;for(var a=0,l=i.length;a<l;a++)o=t.aoData[i[a].row],(!0===r&&o._selected_cells&&!0===o._selected_cells[i[a].column]||!1===r&&(!o._selected_cells||!o._selected_cells[i[a].column]))&&s.push(i[a]);return s}));var f=o.Api.register,g=o.Api.registerPlural;function m(t,e){return function(i){return i.i18n("buttons."+t,e)}}function v(t){var e=t._eventNamespace;return"draw.dt.DT"+e+" select.dt.DT"+e+" deselect.dt.DT"+e}f("select()",(function(){return this.iterator("table",(function(t){o.select.init(new o.Api(t))}))})),f("select.blurable()",(function(t){return t===n?this.context[0]._select.blurable:this.iterator("table",(function(e){e._select.blurable=t}))})),f("select.toggleable()",(function(t){return t===n?this.context[0]._select.toggleable:this.iterator("table",(function(e){e._select.toggleable=t}))})),f("select.info()",(function(t){return t===n?this.context[0]._select.info:this.iterator("table",(function(e){e._select.info=t}))})),f("select.items()",(function(t){return t===n?this.context[0]._select.items:this.iterator("table",(function(e){e._select.items=t,l(new o.Api(e),"selectItems",[t])}))})),f("select.style()",(function(t){return t===n?this.context[0]._select.style:this.iterator("table",(function(e){e._select||o.select.init(new o.Api(e)),e._select_init||c(e),e._select.style=t;var i=new o.Api(e);s(i),"api"!==t&&a(i),l(new o.Api(e),"selectStyle",[t])}))})),f("select.selector()",(function(t){return t===n?this.context[0]._select.selector:this.iterator("table",(function(e){s(new o.Api(e)),e._select.selector=t,"api"!==e._select.style&&a(new o.Api(e))}))})),g("rows().select()","row().select()",(function(e){var i=this;return!1===e?this.deselect():(this.iterator("row",(function(e,i){h(e),e.aoData[i]._select_selected=!0,t(e.aoData[i].nTr).addClass(e._select.className)})),this.iterator("table",(function(t,e){l(i,"select",["row",i[e]],!0)})),this)})),f("row().selected()",(function(){var t=this.context[0];return!!(t&&this.length&&t.aoData[this[0]]&&t.aoData[this[0]]._select_selected)})),g("columns().select()","column().select()",(function(e){var i=this;return!1===e?this.deselect():(this.iterator("column",(function(e,i){h(e),e.aoColumns[i]._select_selected=!0;var n=new o.Api(e).column(i);t(n.header()).addClass(e._select.className),t(n.footer()).addClass(e._select.className),n.nodes().to$().addClass(e._select.className)})),this.iterator("table",(function(t,e){l(i,"select",["column",i[e]],!0)})),this)})),f("column().selected()",(function(){var t=this.context[0];return!!(t&&this.length&&t.aoColumns[this[0]]&&t.aoColumns[this[0]]._select_selected)})),g("cells().select()","cell().select()",(function(e){var i=this;return!1===e?this.deselect():(this.iterator("cell",(function(e,i,o){h(e);var r=e.aoData[i];r._selected_cells===n&&(r._selected_cells=[]),r._selected_cells[o]=!0,r.anCells&&t(r.anCells[o]).addClass(e._select.className)})),this.iterator("table",(function(t,e){l(i,"select",["cell",i.cells(i[e]).indexes().toArray()],!0)})),this)})),f("cell().selected()",(function(){var t=this.context[0];if(t&&this.length){var e=t.aoData[this[0][0].row];if(e&&e._selected_cells&&e._selected_cells[this[0][0].column])return!0}return!1})),g("rows().deselect()","row().deselect()",(function(){var e=this;return this.iterator("row",(function(e,i){e.aoData[i]._select_selected=!1,e._select_lastCell=null,t(e.aoData[i].nTr).removeClass(e._select.className)})),this.iterator("table",(function(t,i){l(e,"deselect",["row",e[i]],!0)})),this})),g("columns().deselect()","column().deselect()",(function(){var e=this;return this.iterator("column",(function(e,i){e.aoColumns[i]._select_selected=!1;var n=new o.Api(e),r=n.column(i);t(r.header()).removeClass(e._select.className),t(r.footer()).removeClass(e._select.className),n.cells(null,i).indexes().each((function(i){var n=e.aoData[i.row],o=n._selected_cells;!n.anCells||o&&o[i.column]||t(n.anCells[i.column]).removeClass(e._select.className)}))})),this.iterator("table",(function(t,i){l(e,"deselect",["column",e[i]],!0)})),this})),g("cells().deselect()","cell().deselect()",(function(){var e=this;return this.iterator("cell",(function(e,i,o){var r=e.aoData[i];r._selected_cells!==n&&(r._selected_cells[o]=!1),r.anCells&&!e.aoColumns[o]._select_selected&&t(r.anCells[o]).removeClass(e._select.className)})),this.iterator("table",(function(t,i){l(e,"deselect",["cell",e[i]],!0)})),this}));var y=0;return t.extend(o.ext.buttons,{selected:{text:m("selected","Selected"),className:"buttons-selected",limitTo:["rows","columns","cells"],init:function(e,i,n){var o=this;n._eventNamespace=".select"+y++,e.on(v(n),(function(){o.enable(function(e,i){return!(-1===t.inArray("rows",i.limitTo)||!e.rows({selected:!0}).any())||!(-1===t.inArray("columns",i.limitTo)||!e.columns({selected:!0}).any())||!(-1===t.inArray("cells",i.limitTo)||!e.cells({selected:!0}).any())}(e,n))})),this.disable()},destroy:function(t,e,i){t.off(i._eventNamespace)}},selectedSingle:{text:m("selectedSingle","Selected single"),className:"buttons-selected-single",init:function(t,e,i){var n=this;i._eventNamespace=".select"+y++,t.on(v(i),(function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;n.enable(1===e)})),this.disable()},destroy:function(t,e,i){t.off(i._eventNamespace)}},selectAll:{text:m("selectAll","Select all"),className:"buttons-select-all",action:function(){this[this.select.items()+"s"]().select()}},selectNone:{text:m("selectNone","Deselect all"),className:"buttons-select-none",action:function(){h(this.settings()[0],!0)},init:function(t,e,i){var n=this;i._eventNamespace=".select"+y++,t.on(v(i),(function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;n.enable(e>0)})),this.disable()},destroy:function(t,e,i){t.off(i._eventNamespace)}}}),t.each(["Row","Column","Cell"],(function(t,e){var i=e.toLowerCase();o.ext.buttons["select"+e+"s"]={text:m("select"+e+"s","Select "+i+"s"),className:"buttons-select-"+i+"s",action:function(){this.select.items(i)},init:function(t){var e=this;t.on("selectItems.dt.DT",(function(t,n,o){e.active(o===i)}))}}})),t(i).on("preInit.dt.dtSelect",(function(t,e){"dt"===t.namespace&&o.select.init(new o.Api(e))})),o.select})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-select"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net-bs4")(e,i).$),i.fn.dataTable.select||require("datatables.net-select")(e,i),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){return t.fn.dataTable})),function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],(function(e){return t(e,window,document)})):"object"==typeof exports?module.exports=function(e,i){return e||(e=window),i&&i.fn.dataTable||(i=require("datatables.net")(e,i).$),t(i,e,e.document)}:t(jQuery,window,document)}((function(t,e,i,n){"use strict";var o=t.fn.dataTable,r=0,s=function(e,i){if(!o.versionCheck||!o.versionCheck("1.10.8"))throw"Warning: altEditor requires DataTables 1.10.8 or greater";this.c=t.extend(!0,{},o.defaults.altEditor,s.defaults,i),this.s={dt:new o.Api(e),namespace:".altEditor"+r++},this.dom={modal:t('<div class="dt-altEditor-handle"/>')},this._constructor()};return t.extend(s.prototype,{_constructor:function(){var e=this,n=this.s.dt;n.settings()[0].oInit.onAddRow&&(e.onAddRow=n.settings()[0].oInit.onAddRow),n.settings()[0].oInit.onDeleteRow&&(e.onDeleteRow=n.settings()[0].oInit.onDeleteRow),n.settings()[0].oInit.onEditRow&&(e.onEditRow=n.settings()[0].oInit.onEditRow),this._setup(),n.on("destroy.altEditor",(function(){n.off(".altEditor"),t(n.table().body()).off(e.s.namespace),t(i.body).off(e.s.namespace)}))},_setup:function(){var e=this,i=this.s.dt,n="altEditor-modal-"+(""+Math.random()).replace(".","");this.modal_selector="#"+n;var o='<div class="modal fade" id="'+n+'" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h5 class="modal-title"></h5><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><i class="fal fa-times"></i></span></button></div><div class="modal-body"><p></p></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button><input type="submit" form="altEditor-form" class="btn btn-primary"></input></div></div></div></div>';t("body").append(o),i.button("edit:name")&&(i.button("edit:name").action((function(t,i,n,o){e._openEditModal()})),t(this.modal_selector).on("click","#editRowBtn",(function(t){e._inputValidation()&&(t.preventDefault(),t.stopPropagation(),e._editRowData())}))),i.button("delete:name")&&(i.button("delete:name").action((function(t,i,n,o){e._openDeleteModal()})),t(this.modal_selector).on("click","#deleteRowBtn",(function(i){i.preventDefault(),i.stopPropagation(),e._deleteRow(),t(this).prop("disabled",!0)}))),i.button("add:name")&&(i.button("add:name").action((function(t,i,n,o){e._openAddModal()})),t(this.modal_selector).on("click","#addRowBtn",(function(t){e._inputValidation()&&(t.preventDefault(),t.stopPropagation(),e._addRowData())}))),this.s.dt.button("refresh:name")&&this.s.dt.button("refresh:name").action((function(t,e,i,n){e.ajax&&e.ajax.url()&&e.ajax.reload()}))},_emitEvent:function(e,i){this.s.dt.iterator("table",(function(n,o){t(n.nTable).triggerHandler(e+".dt",i)}))},_openEditModal:function(){var e=this,i=this.s.dt,n=[];for(var o in i.context[0].aoColumns){var r=i.context[0].aoColumns[o];n[o]={title:r.sTitle,name:r.data?r.data:r.mData,type:r.type?r.type:"text",options:r.options?r.options:[],msg:r.errorMsg?r.errorMsg:"",hoverMsg:r.hoverMsg?r.hoverMsg:"",pattern:r.pattern?r.pattern:".*",special:r.special?r.special:"",unique:!!r.unique&&r.unique,uniqueMsg:r.uniqueMsg?r.uniqueMsg:"",placeholderMsg:r.placeholderMsg?r.placeholderMsg:"",maxLength:!!r.maxLength&&r.maxLength,multiple:!!r.multiple&&r.multiple,select2:!!r.select2&&r.select2,datepicker:!!r.datepicker&&r.datepicker}}var s=i.rows({selected:!0}),a="";for(var l in a+="<form name='altEditor-form' role='form' novalidate>",n)if(n[l].type.indexOf("hidden")>=0)a+="<input type='hidden' id='"+n[l].name+"' value='"+s.data()[0][n[l].name]+"'></input>";else{if(a+="<div class='form-group row'>",a+="<label for='"+n[l].name+"' class='col-lg-3 col-form-label form-label text-left text-lg-right'>"+n[l].title+":</label>",a+="<div class='col-lg-9'>",(n[l].type.indexOf("text")>=0||n[l].type.indexOf("date")>=0||n[l].type.indexOf("email")>=0||n[l].type.indexOf("password")>=0||n[l].type.indexOf("number")>=0||n[l].type.indexOf("time")>=0)&&(a+="<input type='"+e._quoteattr(n[l].type)+"' id='"+e._quoteattr(n[l].name)+"'  pattern='"+e._quoteattr(n[l].pattern)+"'  title='"+e._quoteattr(n[l].hoverMsg)+"' name='"+e._quoteattr(n[l].title)+"' placeholder='"+e._quoteattr(n[l].placeholderMsg)+"' data-special='"+e._quoteattr(n[l].special)+"' data-errorMsg='"+e._quoteattr(n[l].msg)+"' data-uniqueMsg='"+e._quoteattr(n[l].uniqueMsg)+"' data-unique='"+n[l].unique+"'"+(0==n[l].maxLength?"":" maxlength='"+n[l].maxLength+"'")+" style='overflow:hidden' class='form-control' value='"+e._quoteattr(s.data()[0][n[l].name])+"'>",a+="<label id='"+n[l].name+"label' class='errorLabel help-block text-danger' style='display: none'></label>"),n[l].type.indexOf("readonly")>=0&&(a+="<input type='text' readonly  id='"+n[l].name+"' name='"+n[l].title+"' placeholder='"+n[l].placeholderMsg+"' style='overflow:hidden' class='form-control' value='"+s.data()[0][n[l].name]+"'>"),n[l].type.indexOf("select")>=0){var c="";for(o=0;o<n[l].options.length;o++)s.data()[0][n[l].name].toString().indexOf(n[l].options[o])>=0?c+="<option value='"+n[l].options[o]+"'selected>"+n[l].options[o]+"</option>":c+="<option value='"+n[l].options[o]+"'>"+n[l].options[o]+"</option>";a+="<select class='custom-select form-control"+(n[l].select2?" select2":"")+"' id='"+n[l].name+"' name='"+n[l].title+"' "+(n[l].multiple?"multiple":"")+">"+c+"</select>"}a+="</div><div style='clear:both;'></div></div>"}a+="</form>";var d=this.modal_selector;for(var l in t(d).on("show.bs.modal",(function(){t(d).find(".modal-title").html("Edit Record"),t(d).find(".modal-body").html(a),t(d).find(".modal-footer").html('<button type="button" data-content="remove" class="btn btn-default" data-dismiss="modal">Cancel</button><button type="button" data-content="remove" class="btn btn-primary" id="editRowBtn">Save</button>')})),t(d).modal("show"),t(d+" input[0]").focus(),n)n[l].select2&&t(d).find("select#"+n[l].name).select2(n[l].select2);for(var l in n)n[l].datepicker&&t(d).find("#"+n[l].name).datepicker(n[l].datepicker)},_editRowData:function(){var e=this,i=this.s.dt,n={};i.rows({selected:!0}),t('form[name="altEditor-form"] *').filter(":input").each((function(e){n[t(this).attr("id")]=t(this).val()})),console.log(n),e.onEditRow(e,n,(function(t,i,n,o,r){e._editRowCallback(t,i,n,o,r)}),(function(t){e._errorCallback(t)}))},_openDeleteModal:function(){var e=this,i=this.s.dt,n=[];for(var o in i.context[0].aoColumns)n.push({title:i.context[0].aoColumns[o].sTitle,type:i.context[0].aoColumns[o].type?i.context[0].aoColumns[o].type:"text",name:i.context[0].aoColumns[o].data?i.context[0].aoColumns[o].data:i.context[0].aoColumns[o].mData});var r=i.rows({selected:!0}),s="";for(var a in s+="<form name='altEditor-form' role='form'><div class='row'>",n)n[a].type.indexOf("hidden")>=0?s+="<input type='hidden' id='"+n[a].title+"' value='"+r.data()[0][n[a].name]+"' readonly></input>":s+="<div class='col-12 mb-2'><label class='form-label' for='"+e._quoteattr(n[a].name)+"'>"+n[a].title+":&nbsp</label> <input  type='hidden'  id='"+e._quoteattr(n[a].title)+"' name='"+e._quoteattr(n[a].title)+"' placeholder='"+e._quoteattr(n[a].placeholderMsg)+"' style='overflow:hidden'  class='form-control' value='"+e._quoteattr(r.data()[0][n[a].name])+"' >"+r.data()[0][n[a].name]+"</input></div>";s+="</div></form>";var l=this.modal_selector;t(l).on("show.bs.modal",(function(){t(l).find(".modal-title").html("Delete Record"),t(l).find(".modal-body").html(s),t(l).find(".modal-footer").html('<button type="button" data-content="remove" class="btn btn-default" data-dismiss="modal">Cancel</button><button type="button"  data-content="remove" class="btn btn-danger" id="deleteRowBtn"><i class="fal fa-times"></i> Delete</button>')})),t(l).modal("show"),t(l+" input[0]").focus()},_deleteRow:function(){for(var t=this,e=this.s.dt,i={},n=e.rows({selected:!0}),o=0;o<e.context[0].aoColumns.length;o++){var r=e.context[0].aoColumns[o].data?e.context[0].aoColumns[o].data:e.context[0].aoColumns[o].mData?e.context[0].aoColumns[o].mData:e.context[0].aoColumns[o].idx;i[r]=n.data()[0][r]}t.onDeleteRow(t,i,(function(e){t._deleteRowCallback(e)}),(function(e){t._errorCallback(e)}))},_openAddModal:function(){var e=this,i=this.s.dt,n=[];for(var o in i.context[0].aoColumns){var r=i.context[0].aoColumns[o];n[o]={title:r.sTitle,name:r.data?r.data:r.mData,type:r.type?r.type:"text",defaultValue:r.defaultValue?r.defaultValue:"",options:r.options?r.options:[],msg:r.errorMsg?r.errorMsg:"",hoverMsg:r.hoverMsg?r.hoverMsg:"",pattern:r.pattern?r.pattern:".*",special:r.special?r.special:"",placeholderMsg:r.placeholderMsg?r.placeholderMsg:"",unique:!!r.unique&&r.unique,uniqueMsg:r.uniqueMsg?r.uniqueMsg:"",maxLength:!!r.maxLength&&r.maxLength,multiple:!!r.multiple&&r.multiple,select2:!!r.select2&&r.select2}}var s="";for(var a in s+="<form name='altEditor-form' role='form' class='needs-validation' novalidate=''>",n)if(n[a].type.indexOf("hidden")>=0);else{if(s+="<div class='form-group row'><label class='form-label col-sm-3 col-form-label text-left text-sm-right' for='"+n[a].name+"'>"+n[a].title+":</label><div class='col-lg-9'>",(n[a].type.indexOf("text")>=0||n[a].type.indexOf("date")>=0||n[a].type.indexOf("email")>=0||n[a].type.indexOf("password")>=0||n[a].type.indexOf("number")>=0||n[a].type.indexOf("time")>=0)&&(s+="<input type='"+e._quoteattr(n[a].type)+"' id='"+e._quoteattr(n[a].name)+"'  pattern='"+e._quoteattr(n[a].pattern)+"'  title='"+e._quoteattr(n[a].hoverMsg)+"' name='"+e._quoteattr(n[a].title)+"' placeholder='"+e._quoteattr(n[a].placeholderMsg)+"' value='"+e._quoteattr(n[a].defaultValue)+"' data-special='"+n[a].special+"' data-errorMsg='"+e._quoteattr(n[a].msg)+"' data-uniqueMsg='"+e._quoteattr(n[a].uniqueMsg)+"' data-unique='"+n[a].unique+"'"+(0==n[a].maxLength?"":" maxlength='"+n[a].maxLength+"'")+" style='overflow:hidden' class='form-control' value=''>",s+="<label id='"+e._quoteattr(n[a].name)+"label' class='errorLabel help-block text-danger' style='display:none'></label>"),n[a].type.indexOf("readonly")>=0&&(s+="<input type='text' readonly  id='"+e._quoteattr(n[a].name)+"' name='"+e._quoteattr(n[a].title)+"' placeholder='"+e._quoteattr(n[a].placeholderMsg)+"' style='overflow:hidden' class='form-control' value=''>"),n[a].type.indexOf("select")>=0){var l="";for(o=0;o<n[a].options.length;o++)l+="<option value='"+e._quoteattr(n[a].options[o])+"'>"+n[a].options[o]+"</option>";s+="<select class='custom-select form-control"+(n[a].select2?" select2":"")+"' id='"+e._quoteattr(n[a].name)+"' name='"+e._quoteattr(n[a].title)+"' "+(n[a].multiple?"multiple":"")+">"+l+"</select>"}s+="</div><div style='clear:both;'></div></div>"}s+="</form>";var c=this.modal_selector;for(var a in t(c).on("show.bs.modal",(function(){t(c).find(".modal-title").html("Add Record"),t(c).find(".modal-body").html(s),t(c).find(".modal-footer").html('<button type="button" data-content="remove" class="btn btn-default" data-dismiss="modal">Cancel</button><button type="button"  data-content="remove" class="btn btn-primary" id="addRowBtn">Add</button>')})),t(c).modal("show"),t(c+" input[0]").focus(),n)n[a].select2&&t(c).find("select#"+n[a].name).select2(n[a].select2)},_addRowData:function(){var e=this,i=(this.s.dt,{});t('form[name="altEditor-form"] *').filter(":input").each((function(e){i[t(this).attr("id")]=t(this).val()})),e.onAddRow(e,i,(function(t){e._addRowCallback(t)}),(function(t){e._errorCallback(t)}))},_deleteRowCallback:function(e,i,n){var o=this.modal_selector;t(o+" .modal-body .alert").remove(),t(o+" .modal-body").append('<div class="alert alert-success" role="alert"><strong>Success!</strong></div>'),this.s.dt.row({selected:!0}).remove(),this.s.dt.draw(),t("div"+o).find("button#addRowBtn").prop("disabled",!0),t("div"+o).find("button#editRowBtn").prop("disabled",!0),t("div"+o).find("button#deleteRowBtn").prop("disabled",!0),t(o).modal("hide")},_addRowCallback:function(e,i,n){var o="string"==typeof e?JSON.parse(e):e,r=this.modal_selector;t(r+" .modal-body .alert").remove(),t(r+" .modal-body").append('<div class="alert alert-success" role="alert"><strong>Success!</strong></div>'),this.s.dt.row.add(o).draw(!1),t("div"+r).find("button#addRowBtn").prop("disabled",!0),t("div"+r).find("button#editRowBtn").prop("disabled",!0),t("div"+r).find("button#deleteRowBtn").prop("disabled",!0),t(r).modal("hide")},_editRowCallback:function(e,i,n){var o="string"==typeof e?JSON.parse(e):e,r=this.modal_selector;t(r+" .modal-body .alert").remove(),t(r+" .modal-body").prepend('<div class="alert alert-success" role="alert"><strong>Success!</strong></div>'),this.s.dt.row({selected:!0}).data(o),this.s.dt.draw(),t("div"+r).find("button#addRowBtn").prop("disabled",!0),t("div"+r).find("button#editRowBtn").prop("disabled",!0),t("div"+r).find("button#deleteRowBtn").prop("disabled",!0),t(r).modal("hide")},_errorCallback:function(e,i,n){var o=e,r=this.modal_selector;t(r+" .modal-body .alert").remove();var s="There was an unknown error!";if(o.responseJSON&&o.responseJSON.errors)for(var a in s="",o.responseJSON.errors)s+=o.responseJSON.errors[a][0];var l='<div class="alert alert-danger" role="alert"><strong>Error!</strong> '+(null==o.status?"":"Response code: "+o.status)+" "+s+"</div>";t(r+" .modal-body").append(l)},onAddRow:function(t,e,i,n){console.log("Missing AJAX configuration for INSERT"),i(e)},onEditRow:function(t,e,i,n){console.log("Missing AJAX configuration for UPDATE"),i(e)},onDeleteRow:function(t,e,i,n){console.log("Missing AJAX configuration for DELETE"),i(e)},_inputValidation:function(){var e=this.s.dt,i=!1,n=0;return t('form[name="altEditor-form"] *').filter(":text").each((function(i){var o="#"+t(this).attr("id")+"label";if(t(o).hide(),t(o).empty(),t(this).val().match(t(this).attr("pattern"))){if("true"==t(this).attr("data-unique")){var r=e.column("th:contains('"+t(this).attr("name")+"')").data(),s=null;for(var a in null!=e.row({selected:!0}).index()&&(s=e.cell(e.row({selected:!0}).index(),e.column("th:contains('"+t(this).attr("name")+"')").index()).data()),r)t(this).val()==r[a]&&r[a]!=s&&(t(o).html(t(this).attr("data-uniqueMsg")),t(o).show(),n++)}}else t(o).html(t(this).attr("data-errorMsg")),t(o).show(),n++})),0==n&&(i=!0),i},_quoteattr:function(t,e){return null==t?"":(e=e?"&#13;":"\n",(""+t).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r\n/g,e).replace(/[\r\n]/g,e))}}),s.version="2.0",s.defaults={alwaysAsk:!1,focus:null,columns:"",update:null,editor:null},s.classes={btn:"btn"},t(i).on("preInit.dt.altEditor",(function(e,i,n){if("dt"===e.namespace){var r=i.oInit.altEditor,a=o.defaults.altEditor;if(r||a){var l=t.extend({},r,a);!1!==r&&new s(i,l)}}})),o.altEditor=s,s})),function(){"use strict";function t(t){t.fn._fadeIn=t.fn.fadeIn;var e=t.noop||function(){},i=/MSIE/.test(navigator.userAgent),n=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),o=(document.documentMode,t.isFunction(document.createElement("div").style.setExpression));t.block=function(t){a(window,t)},t.unblock=function(t){l(window,t)},t.growlUI=function(e,i,n,o){var r=t('<div class="growlUI"></div>');e&&r.append("<h1>"+e+"</h1>"),i&&r.append("<h2>"+i+"</h2>"),void 0===n&&(n=3e3);var s=function(e){e=e||{},t.block({message:r,fadeIn:void 0!==e.fadeIn?e.fadeIn:700,fadeOut:void 0!==e.fadeOut?e.fadeOut:1e3,timeout:void 0!==e.timeout?e.timeout:n,centerY:!1,showOverlay:!1,onUnblock:o,css:t.block.defaults.growlCSS})};s(),r.css("opacity"),r.mouseover((function(){s({fadeIn:0,timeout:3e4});var e=t(".blockMsg");e.stop(),e.fadeTo(300,1)})).mouseout((function(){t(".blockMsg").fadeOut(1e3)}))},t.fn.block=function(e){if(this[0]===window)return t.block(e),this;var i=t.extend({},t.block.defaults,e||{});return this.each((function(){var e=t(this);i.ignoreIfBlocked&&e.data("block.isBlocked")||e.unblock({fadeOut:0})})),this.each((function(){"static"==t.css(this,"position")&&(this.style.position="relative",t(this).data("block.static",!0)),this.style.zoom=1,a(this,e)}))},t.fn.unblock=function(e){return this[0]===window?(t.unblock(e),this):this.each((function(){l(this,e)}))},t.block.version=2.7,t.block.defaults={message:'<div class="md-preloader text-center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="32" width="32" viewbox="0 0 75 75"><circle cx="37.5" cy="37.5" r="33.5" stroke-width="6"/></svg></div>',title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var r=null,s=[];function a(a,c){var h,f,g=a==window,m=c&&void 0!==c.message?c.message:void 0;if(!(c=t.extend({},t.block.defaults,c||{})).ignoreIfBlocked||!t(a).data("block.isBlocked")){if(c.overlayCSS=t.extend({},t.block.defaults.overlayCSS,c.overlayCSS||{}),h=t.extend({},t.block.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),f=t.extend({},t.block.defaults.themedCSS,c.themedCSS||{}),m=void 0===m?c.message:m,g&&r&&l(window,{fadeOut:0}),m&&"string"!=typeof m&&(m.parentNode||m.jquery)){var v=m.jquery?m[0]:m,y={};t(a).data("block.history",y),y.el=v,y.parent=v.parentNode,y.display=v.style.display,y.position=v.style.position,y.parent&&y.parent.removeChild(v)}t(a).data("block.onUnblock",c.onUnblock);var b,x,w,S,C=c.baseZ;b=i||c.forceIframe?t('<iframe class="block" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):t('<div class="block" style="display:none"></div>'),x=c.theme?t('<div class="block blockOverlay ui-widget-overlay" style="z-index:'+C+++';display:none"></div>'):t('<div class="block blockOverlay" style="z-index:'+C+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&g?(S='<div class="block '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:fixed">',c.title&&(S+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),S+='<div class="ui-widget-content ui-dialog-content"></div>',S+="</div>"):c.theme?(S='<div class="block '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(C+10)+';display:none;position:absolute">',c.title&&(S+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),S+='<div class="ui-widget-content ui-dialog-content"></div>',S+="</div>"):S=g?'<div class="block '+c.blockMsgClass+' blockPage" style="z-index:'+(C+10)+';display:none;position:fixed"></div>':'<div class="block '+c.blockMsgClass+' blockElement" style="z-index:'+(C+10)+';display:none;position:absolute"></div>',w=t(S),m&&(c.theme?(w.css(f),w.addClass("ui-widget-content")):w.css(h)),c.theme||x.css(c.overlayCSS),x.css("position",g?"fixed":"absolute"),(i||c.forceIframe)&&b.css("opacity",0);var k=[b,x,w],_=t(g?"body":a);t.each(k,(function(){this.appendTo(_)})),c.theme&&c.draggable&&t.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var T=o&&(!t.support.boxModel||t("object,embed",g?null:a).length>0);if(n||T){if(g&&c.allowBodyStretch&&t.support.boxModel&&t("html,body").css("height","100%"),(n||!t.support.boxModel)&&!g)var D=p(a,"borderTopWidth"),E=p(a,"borderLeftWidth"),A=D?"(0 - "+D+")":0,I=E?"(0 - "+E+")":0;t.each(k,(function(t,e){var i=e[0].style;if(i.position="absolute",t<2)g?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),g?i.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),I&&i.setExpression("left",I),A&&i.setExpression("top",A);else if(c.centerY)g&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0;else if(!c.centerY&&g){var n="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';i.setExpression("top",n)}}))}if(m&&(c.theme?w.find(".ui-widget-content").append(m):w.append(m),(m.jquery||m.nodeType)&&t(m).show()),(i||c.forceIframe)&&c.showOverlay&&b.show(),c.fadeIn){var P=c.onBlock?c.onBlock:e,M=c.showOverlay&&!m?P:e,L=m?P:e;c.showOverlay&&x._fadeIn(c.fadeIn,M),m&&w._fadeIn(c.fadeIn,L)}else c.showOverlay&&x.show(),m&&w.show(),c.onBlock&&c.onBlock.bind(w)();if(d(1,a,c),g?(r=w[0],s=t(c.focusableElements,r),c.focusInput&&setTimeout(u,20)):function(t,e,i){var n=t.parentNode,o=t.style,r=(n.offsetWidth-t.offsetWidth)/2-p(n,"borderLeftWidth"),s=(n.offsetHeight-t.offsetHeight)/2-p(n,"borderTopWidth");e&&(o.left=r>0?r+"px":"0"),i&&(o.top=s>0?s+"px":"0")}(w[0],c.centerX,c.centerY),c.timeout){var R=setTimeout((function(){g?t.unblock(c):t(a).unblock(c)}),c.timeout);t(a).data("block.timeout",R)}}}function l(e,i){var n,o,a=e==window,l=t(e),h=l.data("block.history"),u=l.data("block.timeout");u&&(clearTimeout(u),l.removeData("block.timeout")),i=t.extend({},t.block.defaults,i||{}),d(0,e,i),null===i.onUnblock&&(i.onUnblock=l.data("block.onUnblock"),l.removeData("block.onUnblock")),o=a?t("body").children().filter(".block").add("body > .block"):l.find(">.block"),i.cursorReset&&(o.length>1&&(o[1].style.cursor=i.cursorReset),o.length>2&&(o[2].style.cursor=i.cursorReset)),a&&(r=s=null),i.fadeOut?(n=o.length,o.stop().fadeOut(i.fadeOut,(function(){0==--n&&c(o,h,i,e)}))):c(o,h,i,e)}function c(e,i,n,o){var r=t(o);if(!r.data("block.isBlocked")){e.each((function(t,e){this.parentNode&&this.parentNode.removeChild(this)})),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.el.style.cursor="default",i.parent&&i.parent.appendChild(i.el),r.removeData("block.history")),r.data("block.static")&&r.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(o,n);var s=t(document.body),a=s.width(),l=s[0].style.width;s.width(a-1).width(a),s[0].style.width=l}}function d(e,i,n){var o=i==window,s=t(i);if((e||(!o||r)&&(o||s.data("block.isBlocked")))&&(s.data("block.isBlocked",e),o&&n.bindEvents&&(!e||n.showOverlay))){var a="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";e?t(document).bind(a,n,h):t(document).unbind(a,h)}}function h(e){if("keydown"===e.type&&e.keyCode&&9==e.keyCode&&r&&e.data.constrainTabKey){var i=s,n=!e.shiftKey&&e.target===i[i.length-1],o=e.shiftKey&&e.target===i[0];if(n||o)return setTimeout((function(){u(o)}),10),!1}var a=e.data,l=t(e.target);return l.hasClass("blockOverlay")&&a.onOverlayClick&&a.onOverlayClick(e),l.parents("div."+a.blockMsgClass).length>0||0===l.parents().children().filter("div.block").length}function u(t){if(s){var e=s[!0===t?s.length-1:0];e&&e.focus()}}function p(e,i){return parseInt(t.css(e,i),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],t):t(jQuery)}(),function(){var t,e,i,n,o,r,s,a,l=[].slice,c={}.hasOwnProperty;s=function(){},e=function(){function t(){}return t.prototype.addEventListener=t.prototype.on,t.prototype.on=function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this},t.prototype.emit=function(){var t,e,i,n,o;if(i=arguments[0],t=2<=arguments.length?l.call(arguments,1):[],this._callbacks=this._callbacks||{},e=this._callbacks[i])for(n=0,o=e.length;n<o;n++)e[n].apply(this,t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.off=function(t,e){var i,n,o,r;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(!(i=this._callbacks[t]))return this;if(1===arguments.length)return delete this._callbacks[t],this;for(n=o=0,r=i.length;o<r;n=++o)if(i[n]===e){i.splice(n,1);break}return this},t}(),t=function(t){var i,n;function o(t,e){var n,r,s;if(this.element=t,this.version=o.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(o.instances.push(this),this.element.dropzone=this,n=null!=(s=o.optionsForElement(this.element))?s:{},this.options=i({},this.defaultOptions,n,null!=e?e:{}),this.options.forceFallback||!o.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(r=this.getExistingFallback())&&r.parentNode&&r.parentNode.removeChild(r),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=o.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=o.getElements(this.options.clickable,"clickable")),this.init()}return function(t,e){for(var i in e)c.call(e,i)&&(t[i]=e[i]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(o,t),o.prototype.Emitter=e,o.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],o.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1e3,maxFiles:null,filesizeBase:1e3,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(t,e){return e()},init:function(){return s},forceFallback:!1,fallback:function(){var t,e,i,n,r,s;for(this.element.className=this.element.className+" dz-browser-not-supported",n=0,r=(s=this.element.getElementsByTagName("div")).length;n<r;n++)t=s[n],/(^| )dz-message($| )/.test(t.className)&&(e=t,t.className="dz-message");return e||(e=o.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e)),(i=e.getElementsByTagName("span")[0])&&(i.textContent=this.options.dictFallbackMessage),this.element.appendChild(this.getFallbackForm())},resize:function(t){var e,i,n;return e={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},i=t.width/t.height,e.optWidth=this.options.thumbnailWidth,e.optHeight=this.options.thumbnailHeight,null==e.optWidth&&null==e.optHeight?(e.optWidth=e.srcWidth,e.optHeight=e.srcHeight):null==e.optWidth?e.optWidth=i*e.optHeight:null==e.optHeight&&(e.optHeight=1/i*e.optWidth),n=e.optWidth/e.optHeight,t.height<e.optHeight||t.width<e.optWidth?(e.trgHeight=e.srcHeight,e.trgWidth=e.srcWidth):i>n?(e.srcHeight=t.height,e.srcWidth=e.srcHeight*n):(e.srcWidth=t.width,e.srcHeight=e.srcWidth/n),e.srcX=(t.width-e.srcWidth)/2,e.srcY=(t.height-e.srcHeight)/2,e},drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:s,dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:s,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var e,i,n,r,s,a,l,c,d,h,u,p,f;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(t.previewElement=o.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),n=0,a=(d=t.previewElement.querySelectorAll("[data-dz-name]")).length;n<a;n++)d[n].textContent=t.name;for(r=0,l=(h=t.previewElement.querySelectorAll("[data-dz-size]")).length;r<l;r++)h[r].innerHTML=this.filesize(t.size);for(this.options.addRemoveLinks&&(t._removeLink=o.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),t.previewElement.appendChild(t._removeLink)),f=this,e=function(e){return e.preventDefault(),e.stopPropagation(),t.status===o.UPLOADING?o.confirm(f.options.dictCancelUploadConfirmation,(function(){return f.removeFile(t)})):f.options.dictRemoveFileConfirmation?o.confirm(f.options.dictRemoveFileConfirmation,(function(){return f.removeFile(t)})):f.removeFile(t)},p=[],s=0,c=(u=t.previewElement.querySelectorAll("[data-dz-remove]")).length;s<c;s++)i=u[s],p.push(i.addEventListener("click",e));return p}},removedfile:function(t){var e;return t.previewElement&&null!=(e=t.previewElement)&&e.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){var i,n,o,r;if(t.previewElement){for(t.previewElement.classList.remove("dz-file-preview"),n=0,o=(r=t.previewElement.querySelectorAll("[data-dz-thumbnail]")).length;n<o;n++)(i=r[n]).alt=t.name,i.src=e;return setTimeout((function(){return t.previewElement.classList.add("dz-image-preview")}),1)}},error:function(t,e){var i,n,o,r,s;if(t.previewElement){for(t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error),s=[],n=0,o=(r=t.previewElement.querySelectorAll("[data-dz-errormessage]")).length;n<o;n++)i=r[n],s.push(i.textContent=e);return s}},errormultiple:s,processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:s,uploadprogress:function(t,e,i){var n,o,r,s,a;if(t.previewElement){for(a=[],o=0,r=(s=t.previewElement.querySelectorAll("[data-dz-uploadprogress]")).length;o<r;o++)"PROGRESS"===(n=s[o]).nodeName?a.push(n.value=e):a.push(n.style.width=e+"%");return a}},totaluploadprogress:s,sending:s,sendingmultiple:s,success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:s,canceled:function(t){return this.emit("error",t,"Upload canceled.")},canceledmultiple:s,complete:function(t){if(t._removeLink&&(t._removeLink.textContent=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:s,maxfilesexceeded:s,maxfilesreached:s,queuecomplete:s,previewTemplate:'<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail /></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size></span></div>\n    <div class="dz-filename"><span data-dz-name></span></div>\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n  <div class="dz-success-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Check</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n      </g>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Error</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n          <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>'},i=function(){var t,e,i,n,o,r,s;for(n=arguments[0],r=0,s=(i=2<=arguments.length?l.call(arguments,1):[]).length;r<s;r++)for(t in e=i[r])o=e[t],n[t]=o;return n},o.prototype.getAcceptedFiles=function(){var t,e,i,n,o;for(o=[],e=0,i=(n=this.files).length;e<i;e++)(t=n[e]).accepted&&o.push(t);return o},o.prototype.getRejectedFiles=function(){var t,e,i,n,o;for(o=[],e=0,i=(n=this.files).length;e<i;e++)(t=n[e]).accepted||o.push(t);return o},o.prototype.getFilesWithStatus=function(t){var e,i,n,o,r;for(r=[],i=0,n=(o=this.files).length;i<n;i++)(e=o[i]).status===t&&r.push(e);return r},o.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(o.QUEUED)},o.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(o.UPLOADING)},o.prototype.getActiveFiles=function(){var t,e,i,n,r;for(r=[],e=0,i=(n=this.files).length;e<i;e++)(t=n[e]).status!==o.UPLOADING&&t.status!==o.QUEUED||r.push(t);return r},o.prototype.init=function(){var t,e,i,n,r,s,a,l;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(o.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&(l=this,i=function(){return l.hiddenFileInput&&document.body.removeChild(l.hiddenFileInput),l.hiddenFileInput=document.createElement("input"),l.hiddenFileInput.setAttribute("type","file"),(null==l.options.maxFiles||l.options.maxFiles>1)&&l.hiddenFileInput.setAttribute("multiple","multiple"),l.hiddenFileInput.className="dz-hidden-input",null!=l.options.acceptedFiles&&l.hiddenFileInput.setAttribute("accept",l.options.acceptedFiles),null!=l.options.capture&&l.hiddenFileInput.setAttribute("capture",l.options.capture),l.hiddenFileInput.style.visibility="hidden",l.hiddenFileInput.style.position="absolute",l.hiddenFileInput.style.top="0",l.hiddenFileInput.style.left="0",l.hiddenFileInput.style.height="0",l.hiddenFileInput.style.width="0",document.body.appendChild(l.hiddenFileInput),l.hiddenFileInput.addEventListener("change",(function(){var t,e,n,o;if((e=l.hiddenFileInput.files).length)for(n=0,o=e.length;n<o;n++)t=e[n],l.addFile(t);return i()}))},i()),this.URL=null!=(s=window.URL)?s:window.webkitURL,n=0,r=(a=this.events).length;n<r;n++)t=a[n],this.on(t,this.options[t]);return this.on("uploadprogress",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("canceled",function(t){return function(e){return t.emit("complete",e)}}(this)),this.on("complete",function(t){return function(e){if(0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout((function(){return t.emit("queuecomplete")}),0)}}(this)),e=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(t){return function(e){return t.emit("dragstart",e)}}(this),dragenter:function(t){return function(i){return e(i),t.emit("dragenter",i)}}(this),dragover:function(t){return function(i){var n;try{n=i.dataTransfer.effectAllowed}catch(t){}return i.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",e(i),t.emit("dragover",i)}}(this),dragleave:function(t){return function(e){return t.emit("dragleave",e)}}(this),drop:function(t){return function(i){return e(i),t.drop(i)}}(this),dragend:function(t){return function(e){return t.emit("dragend",e)}}(this)}}],this.clickableElements.forEach(function(t){return function(e){return t.listeners.push({element:e,events:{click:function(i){if(e!==t.element||i.target===t.element||o.elementInside(i.target,t.element.querySelector(".dz-message")))return t.hiddenFileInput.click()}}})}}(this)),this.enable(),this.options.init.call(this)},o.prototype.destroy=function(){var t;return this.disable(),this.removeAllFiles(!0),(null!=(t=this.hiddenFileInput)?t.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,o.instances.splice(o.instances.indexOf(this),1)},o.prototype.updateTotalUploadProgress=function(){var t,e,i,n,o,r,s;if(i=0,e=0,this.getActiveFiles().length){for(o=0,r=(s=this.getActiveFiles()).length;o<r;o++)i+=(t=s[o]).upload.bytesSent,e+=t.upload.total;n=100*i/e}else n=100;return this.emit("totaluploadprogress",n,e,i)},o.prototype._getParamName=function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")},o.prototype.getFallbackForm=function(){var t,e,i,n;return(t=this.getExistingFallback())?t:(i='<div class="dz-fallback">',this.options.dictFallbackText&&(i+="<p>"+this.options.dictFallbackText+"</p>"),i+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>',e=o.createElement(i),"FORM"!==this.element.tagName?(n=o.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>')).appendChild(e):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=n?n:e)},o.prototype.getExistingFallback=function(){var t,e,i,n,o,r;for(e=function(t){var e,i,n;for(i=0,n=t.length;i<n;i++)if(e=t[i],/(^| )fallback($| )/.test(e.className))return e},n=0,o=(r=["div","form"]).length;n<o;n++)if(i=r[n],t=e(this.element.getElementsByTagName(i)))return t},o.prototype.setupEventListeners=function(){var t,e,i,n,o,r,s;for(s=[],n=0,o=(r=this.listeners).length;n<o;n++)t=r[n],s.push(function(){var n,o;for(e in o=[],n=t.events)i=n[e],o.push(t.element.addEventListener(e,i,!1));return o}());return s},o.prototype.removeEventListeners=function(){var t,e,i,n,o,r,s;for(s=[],n=0,o=(r=this.listeners).length;n<o;n++)t=r[n],s.push(function(){var n,o;for(e in o=[],n=t.events)i=n[e],o.push(t.element.removeEventListener(e,i,!1));return o}());return s},o.prototype.disable=function(){var t,e,i,n,o;for(this.clickableElements.forEach((function(t){return t.classList.remove("dz-clickable")})),this.removeEventListeners(),o=[],e=0,i=(n=this.files).length;e<i;e++)t=n[e],o.push(this.cancelUpload(t));return o},o.prototype.enable=function(){return this.clickableElements.forEach((function(t){return t.classList.add("dz-clickable")})),this.setupEventListeners()},o.prototype.filesize=function(t){var e,i,n,o,r,s,a;for(i=n=null,e=s=0,a=(r=["TB","GB","MB","KB","b"]).length;s<a;e=++s)if(o=r[e],t>=Math.pow(this.options.filesizeBase,4-e)/10){i=t/Math.pow(this.options.filesizeBase,4-e),n=o;break}return"<strong>"+(i=Math.round(10*i)/10)+"</strong> "+n},o.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},o.prototype.drop=function(t){var e,i;t.dataTransfer&&(this.emit("drop",t),(e=t.dataTransfer.files).length&&((i=t.dataTransfer.items)&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)))},o.prototype.paste=function(t){var e,i;if(null!=(null!=t&&null!=(i=t.clipboardData)?i.items:void 0))return this.emit("paste",t),(e=t.clipboardData.items).length?this._addFilesFromItems(e):void 0},o.prototype.handleFiles=function(t){var e,i,n,o;for(o=[],i=0,n=t.length;i<n;i++)e=t[i],o.push(this.addFile(e));return o},o.prototype._addFilesFromItems=function(t){var e,i,n,o,r;for(r=[],n=0,o=t.length;n<o;n++)null!=(i=t[n]).webkitGetAsEntry&&(e=i.webkitGetAsEntry())?e.isFile?r.push(this.addFile(i.getAsFile())):e.isDirectory?r.push(this._addFilesFromDirectory(e,e.name)):r.push(void 0):null==i.getAsFile||null!=i.kind&&"file"!==i.kind?r.push(void 0):r.push(this.addFile(i.getAsFile()));return r},o.prototype._addFilesFromDirectory=function(t,e){var i,n,o;return i=t.createReader(),o=this,n=function(t){var i,n,r;for(n=0,r=t.length;n<r;n++)(i=t[n]).isFile?i.file((function(t){if(!o.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath=e+"/"+t.name,o.addFile(t)})):i.isDirectory&&o._addFilesFromDirectory(i,e+"/"+i.name)},i.readEntries(n,(function(t){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(t):void 0}))},o.prototype.accept=function(t,e){return t.size>1024*this.options.maxFilesize*1024?e(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):o.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(e(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,e):e(this.options.dictInvalidFileType)},o.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0},this.files.push(t),t.status=o.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,(e=this,function(i){return i?(t.accepted=!1,e._errorProcessing([t],i)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}));var e},o.prototype.enqueueFiles=function(t){var e,i,n;for(i=0,n=t.length;i<n;i++)e=t[i],this.enqueueFile(e);return null},o.prototype.enqueueFile=function(t){if(t.status!==o.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=o.QUEUED,this.options.autoProcessQueue)return setTimeout((e=this,function(){return e.processQueue()}),0);var e},o.prototype._thumbnailQueue=[],o.prototype._processingThumbnail=!1,o.prototype._enqueueThumbnail=function(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout((e=this,function(){return e._processThumbnailQueue()}),0);var e},o.prototype._processThumbnailQueue=function(){var t;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length)return this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),(t=this,function(){return t._processingThumbnail=!1,t._processThumbnailQueue()}))},o.prototype.removeFile=function(t){if(t.status===o.UPLOADING&&this.cancelUpload(t),this.files=a(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")},o.prototype.removeAllFiles=function(t){var e,i,n,r;for(null==t&&(t=!1),i=0,n=(r=this.files.slice()).length;i<n;i++)((e=r[i]).status!==o.UPLOADING||t)&&this.removeFile(e);return null},o.prototype.createThumbnail=function(t,e){var i,n;return(i=new FileReader).onload=(n=this,function(){return"image/svg+xml"===t.type?(n.emit("thumbnail",t,i.result),void(null!=e&&e())):n.createThumbnailFromUrl(t,i.result,e)}),i.readAsDataURL(t)},o.prototype.createThumbnailFromUrl=function(t,e,i){var n,o;return(n=document.createElement("img")).onload=(o=this,function(){var e,s,a,l,c,d,h,u;if(t.width=n.width,t.height=n.height,null==(a=o.options.resize.call(o,t)).trgWidth&&(a.trgWidth=a.optWidth),null==a.trgHeight&&(a.trgHeight=a.optHeight),s=(e=document.createElement("canvas")).getContext("2d"),e.width=a.trgWidth,e.height=a.trgHeight,r(s,n,null!=(c=a.srcX)?c:0,null!=(d=a.srcY)?d:0,a.srcWidth,a.srcHeight,null!=(h=a.trgX)?h:0,null!=(u=a.trgY)?u:0,a.trgWidth,a.trgHeight),l=e.toDataURL("image/png"),o.emit("thumbnail",t,l),null!=i)return i()}),null!=i&&(n.onerror=i),n.src=e},o.prototype.processQueue=function(){var t,e,i,n;if(e=this.options.parallelUploads,t=i=this.getUploadingFiles().length,!(i>=e)&&(n=this.getQueuedFiles()).length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,e-i));for(;t<e;){if(!n.length)return;this.processFile(n.shift()),t++}}},o.prototype.processFile=function(t){return this.processFiles([t])},o.prototype.processFiles=function(t){var e,i,n;for(i=0,n=t.length;i<n;i++)(e=t[i]).processing=!0,e.status=o.UPLOADING,this.emit("processing",e);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)},o.prototype._getFilesWithXhr=function(t){var e;return function(){var i,n,o,r;for(r=[],i=0,n=(o=this.files).length;i<n;i++)(e=o[i]).xhr===t&&r.push(e);return r}.call(this)},o.prototype.cancelUpload=function(t){var e,i,n,r,s,a,l;if(t.status===o.UPLOADING){for(n=0,s=(i=this._getFilesWithXhr(t.xhr)).length;n<s;n++)(e=i[n]).status=o.CANCELED;for(t.xhr.abort(),r=0,a=i.length;r<a;r++)e=i[r],this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else(l=t.status)!==o.ADDED&&l!==o.QUEUED||(t.status=o.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()},n=function(){var t,e;return e=arguments[0],t=2<=arguments.length?l.call(arguments,1):[],"function"==typeof e?e.apply(this,t):e},o.prototype.uploadFile=function(t){return this.uploadFiles([t])},o.prototype.uploadFiles=function(t){var e,r,s,a,l,c,d,h,u,p,f,g,m,v,y,b,x,w,S,C,k,_,T,D,E,A,I,P,M,L,R,O,F,N;for(w=new XMLHttpRequest,S=0,T=t.length;S<T;S++)(e=t[S]).xhr=w;for(a in g=n(this.options.method,t),b=n(this.options.url,t),w.open(g,b,!0),w.withCredentials=!!this.options.withCredentials,v=null,N=this,s=function(){var i,n,o;for(o=[],i=0,n=t.length;i<n;i++)e=t[i],o.push(N._errorProcessing(t,v||N.options.dictResponseError.replace("{{statusCode}}",w.status),w));return o},y=function(i){return function(n){var o,r,s,a,l,c,d,h,u;if(null!=n)for(r=100*n.loaded/n.total,s=0,c=t.length;s<c;s++)(e=t[s]).upload={progress:r,total:n.total,bytesSent:n.loaded};else{for(o=!0,r=100,a=0,d=t.length;a<d;a++)100===(e=t[a]).upload.progress&&e.upload.bytesSent===e.upload.total||(o=!1),e.upload.progress=r,e.upload.bytesSent=e.upload.total;if(o)return}for(u=[],l=0,h=t.length;l<h;l++)e=t[l],u.push(i.emit("uploadprogress",e,r,e.upload.bytesSent));return u}}(this),w.onload=function(e){return function(i){var n;if(t[0].status!==o.CANCELED&&4===w.readyState){if(v=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json"))try{v=JSON.parse(v)}catch(t){i=t,v="Invalid JSON response from server."}return y(),200<=(n=w.status)&&n<300?e._finished(t,v,i):s()}}}(this),w.onerror=function(){if(t[0].status!==o.CANCELED)return s()},(null!=(P=w.upload)?P:w).onprogress=y,c={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&i(c,this.options.headers),c)l=c[a],w.setRequestHeader(a,l);if(r=new FormData,this.options.params)for(f in M=this.options.params)x=M[f],r.append(f,x);for(C=0,D=t.length;C<D;C++)e=t[C],this.emit("sending",e,w,r);if(this.options.uploadMultiple&&this.emit("sendingmultiple",t,w,r),"FORM"===this.element.tagName)for(k=0,E=(L=this.element.querySelectorAll("input, textarea, select, button")).length;k<E;k++)if(u=(h=L[k]).getAttribute("name"),p=h.getAttribute("type"),"SELECT"===h.tagName&&h.hasAttribute("multiple"))for(_=0,A=(R=h.options).length;_<A;_++)(m=R[_]).selected&&r.append(u,m.value);else(!p||"checkbox"!==(O=p.toLowerCase())&&"radio"!==O||h.checked)&&r.append(u,h.value);for(d=I=0,F=t.length-1;0<=F?I<=F:I>=F;d=0<=F?++I:--I)r.append(this._getParamName(d),t[d],t[d].name);return w.send(r)},o.prototype._finished=function(t,e,i){var n,r,s;for(r=0,s=t.length;r<s;r++)(n=t[r]).status=o.SUCCESS,this.emit("success",n,e,i),this.emit("complete",n);if(this.options.uploadMultiple&&(this.emit("successmultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()},o.prototype._errorProcessing=function(t,e,i){var n,r,s;for(r=0,s=t.length;r<s;r++)(n=t[r]).status=o.ERROR,this.emit("error",n,e,i),this.emit("complete",n);if(this.options.uploadMultiple&&(this.emit("errormultiple",t,e,i),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()},o}(e),t.version="4.0.1",t.options={},t.optionsForElement=function(e){return e.getAttribute("id")?t.options[i(e.getAttribute("id"))]:void 0},t.instances=[],t.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},t.autoDiscover=!0,t.discover=function(){var e,i,n,o,r,s;for(document.querySelectorAll?n=document.querySelectorAll(".dropzone"):(n=[],e=function(t){var e,i,o,r;for(r=[],i=0,o=t.length;i<o;i++)e=t[i],/(^| )dropzone($| )/.test(e.className)?r.push(n.push(e)):r.push(void 0);return r},e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))),s=[],o=0,r=n.length;o<r;o++)i=n[o],!1!==t.optionsForElement(i)?s.push(new t(i)):s.push(void 0);return s},t.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],t.isBrowserSupported=function(){var e,i,n,o;if(e=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(i=0,n=(o=t.blacklistedBrowsers).length;i<n;i++)o[i].test(navigator.userAgent)&&(e=!1);else e=!1;else e=!1;return e},a=function(t,e){var i,n,o,r;for(r=[],n=0,o=t.length;n<o;n++)(i=t[n])!==e&&r.push(i);return r},i=function(t){return t.replace(/[\-_](\w)/g,(function(t){return t.charAt(1).toUpperCase()}))},t.createElement=function(t){var e;return(e=document.createElement("div")).innerHTML=t,e.childNodes[0]},t.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},t.getElement=function(t,e){var i;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},t.getElements=function(t,e){var i,n,o,r,s,a,l;if(t instanceof Array){n=[];try{for(o=0,s=t.length;o<s;o++)i=t[o],n.push(this.getElement(i,e))}catch(t){n=null}}else if("string"==typeof t)for(n=[],r=0,a=(l=document.querySelectorAll(t)).length;r<a;r++)i=l[r],n.push(i);else null!=t.nodeType&&(n=[t]);if(null==n||!n.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return n},t.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},t.isValidFile=function(t,e){var i,n,o,r,s;if(!e)return!0;for(e=e.split(","),i=(n=t.type).replace(/\/.*$/,""),r=0,s=e.length;r<s;r++)if("."===(o=(o=e[r]).trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(o.toLowerCase(),t.name.length-o.length))return!0}else if(/\/\*$/.test(o)){if(i===o.replace(/\/.*$/,""))return!0}else if(n===o)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each((function(){return new t(this,e)}))}),"undefined"!=typeof module&&null!==module?module.exports=t:window.Dropzone=t,t.ADDED="added",t.QUEUED="queued",t.ACCEPTED=t.QUEUED,t.UPLOADING="uploading",t.PROCESSING=t.UPLOADING,t.CANCELED="canceled",t.ERROR="error",t.SUCCESS="success",o=function(t){var e,i,n,o,r,s,a,l;for(t.naturalWidth,r=t.naturalHeight,(e=document.createElement("canvas")).width=1,e.height=r,(i=e.getContext("2d")).drawImage(t,0,0),n=i.getImageData(0,0,1,r).data,l=0,o=r,s=r;s>l;)0===n[4*(s-1)+3]?o=s:l=s,s=o+l>>1;return 0==(a=s/r)?1:a},r=function(t,e,i,n,r,s,a,l,c,d){var h;return h=o(e),t.drawImage(e,i,n,r,s,a,l,c,d/h)},n=function(t,e){var i,n,o,r,s,a,l,c,d;if(o=!1,d=!0,n=t.document,c=n.documentElement,i=n.addEventListener?"addEventListener":"attachEvent",l=n.addEventListener?"removeEventListener":"detachEvent",a=n.addEventListener?"":"on",r=function(i){if("readystatechange"!==i.type||"complete"===n.readyState)return("load"===i.type?t:n)[l](a+i.type,r,!1),!o&&(o=!0)?e.call(t,i.type||i):void 0},s=function(){try{c.doScroll("left")}catch(t){return void setTimeout(s,50)}return r("poll")},"complete"!==n.readyState){if(n.createEventObject&&c.doScroll){try{d=!t.frameElement}catch(t){}d&&s()}return n[i](a+"DOMContentLoaded",r,!1),n[i](a+"readystatechange",r,!1),t[i](a+"load",r,!1)}},t._autoDiscoverFunction=function(){if(t.autoDiscover)return t.discover()},n(window,t._autoDiscoverFunction)}.call(this),function(t){"use strict";function e(t,e,i){if(void 0===t.selectionStart){t.focus();var n=t.createTextRange();n.collapse(!0),n.moveEnd("character",i),n.moveStart("character",e),n.select()}else t.selectionStart=e,t.selectionEnd=i}function i(t,e){"string"==typeof t[e]&&(t[e]*=1)}function n(e,n){!function(e,i){t.each(i,(function(t,n){"function"==typeof n?i[t]=n(e,i,t):"function"==typeof e.autoNumeric[n]&&(i[t]=e.autoNumeric[n](e,i,t))}))}(e,n),n.oEvent=null,n.tagList=["b","caption","cite","code","dd","del","div","dfn","dt","em","h1","h2","h3","h4","h5","h6","ins","kdb","label","li","output","p","q","s","sample","span","strong","td","th","u","var"];var o=n.vMax.toString().split("."),r=n.vMin||0===n.vMin?n.vMin.toString().split("."):[];if(i(n,"vMax"),i(n,"vMin"),i(n,"mDec"),n.mDec="CHF"===n.mRound?"2":n.mDec,n.allowLeading=!0,n.aNeg=n.vMin<0?"-":"",o[0]=o[0].replace("-",""),r[0]=r[0].replace("-",""),n.mInt=Math.max(o[0].length,r[0].length,1),null===n.mDec){var s=0,a=0;o[1]&&(s=o[1].length),r[1]&&(a=r[1].length),n.mDec=Math.max(s,a)}null===n.altDec&&n.mDec>0&&("."===n.aDec&&","!==n.aSep?n.altDec=",":","===n.aDec&&"."!==n.aSep&&(n.altDec="."));var l=n.aNeg?"([-\\"+n.aNeg+"]?)":"(-?)";n.aNegRegAutoStrip=l,n.skipFirstAutoStrip=new RegExp(l+"[^-"+(n.aNeg?"\\"+n.aNeg:"")+"\\"+n.aDec+"\\d].*?(\\d|\\"+n.aDec+"\\d)"),n.skipLastAutoStrip=new RegExp("(\\d\\"+n.aDec+"?)[^\\"+n.aDec+"\\d]\\D*$");var c="-"+n.aNum+"\\"+n.aDec;return n.allowedAutoStrip=new RegExp("[^"+c+"]","gi"),n.numRegAutoStrip=new RegExp(l+"(?:\\"+n.aDec+"?(\\d+\\"+n.aDec+"\\d+)|(\\d*(?:\\"+n.aDec+"\\d*)?))"),n}function o(t,e,i){if(e.aSign)for(;t.indexOf(e.aSign)>-1;)t=t.replace(e.aSign,"");t=(t=(t=t.replace(e.skipFirstAutoStrip,"$1$2")).replace(e.skipLastAutoStrip,"$1")).replace(e.allowedAutoStrip,""),e.altDec&&(t=t.replace(e.altDec,e.aDec));var n=t.match(e.numRegAutoStrip);if(t=n?[n[1],n[2],n[3]].join(""):"",("allow"===e.lZero||"keep"===e.lZero)&&"strip"!==i){var o=[],r="";-1!==(o=t.split(e.aDec))[0].indexOf("-")&&(r="-",o[0]=o[0].replace("-","")),o[0].length>e.mInt&&"0"===o[0].charAt(0)&&(o[0]=o[0].slice(1)),t=r+o.join(e.aDec)}if(i&&"deny"===e.lZero||i&&"allow"===e.lZero&&!1===e.allowLeading){var s="^"+e.aNegRegAutoStrip+"0*(\\d"+("leading"===i?")":"|$)");s=new RegExp(s),t=t.replace(s,"$1$2")}return t}function r(t,e,i){return e=e.split(","),"set"===i||"focusout"===i?(t=t.replace("-",""),t=e[0]+t+e[1]):"get"!==i&&"focusin"!==i&&"pageLoad"!==i||t.charAt(0)!==e[0]||(t=(t=t.replace(e[0],"-")).replace(e[1],"")),t}function s(t,e,i){if(e&&i){var n=t.split(e);n[1]&&n[1].length>i&&(i>0?(n[1]=n[1].substring(0,i),t=n.join(e)):t=n[0])}return t}function a(t,e,i){return e&&"."!==e&&(t=t.replace(e,".")),i&&"-"!==i&&(t=t.replace(i,"-")),t.match(/\d/)||(t+="0"),t}function l(t,e){if(t){var i=+t;if(i<1e-6&&i>-1)(t=+t)<1e-6&&t>0&&(t=(t=(t+10).toString()).substring(1)),t<0&&t>-1&&(t="-"+(t=(t-10).toString()).substring(2)),t=t.toString();else{var n=t.split(".");void 0!==n[1]&&(0==+n[1]?t=n[0]:(n[1]=n[1].replace(/0*$/,""),t=n.join(".")))}}return"keep"===e.lZero?t:t.replace(/^0*(\d)/,"$1")}function c(t,e,i){return i&&"-"!==i&&(t=t.replace("-",i)),e&&"."!==e&&(t=t.replace(".",e)),t}function d(e,i){var n=+(e=a(e=s(e=o(e,i),i.aDec,i.mDec),i.aDec,i.aNeg));return"set"===i.oEvent&&(n<i.vMin||n>i.vMax)&&t.error("The value ("+n+") from the 'set' method falls outside of the vMin / vMax range"),n>=i.vMin&&n<=i.vMax}function h(t,e,i){return""===t||t===e.aNeg?"zero"===e.wEmpty?t+"0":"sign"===e.wEmpty||i?t+e.aSign:t:null}function u(t,e){var i=(t=o(t,e)).replace(",","."),n=h(t,e,!0);if(null!==n)return n;var s="";s=2===e.dGroup?/(\d)((\d)(\d{2}?)+)$/:4===e.dGroup?/(\d)((\d{4}?)+)$/:/(\d)((\d{3}?)+)$/;var a=t.split(e.aDec);e.altDec&&1===a.length&&(a=t.split(e.altDec));var l=a[0];if(e.aSep)for(;s.test(l);)l=l.replace(s,"$1"+e.aSep+"$2");if(0!==e.mDec&&a.length>1?(a[1].length>e.mDec&&(a[1]=a[1].substring(0,e.mDec)),t=l+e.aDec+a[1]):t=l,e.aSign){var c=-1!==t.indexOf(e.aNeg);t=t.replace(e.aNeg,""),t="p"===e.pSign?e.aSign+t:t+e.aSign,c&&(t=e.aNeg+t)}return"set"===e.oEvent&&i<0&&null!==e.nBracket&&(t=r(t,e.nBracket,e.oEvent)),t}function p(t,e){t=""===t?"0":t.toString(),i(e,"mDec"),"CHF"===e.mRound&&(t=(Math.round(20*t)/20).toString());var n="",o=0,r="",s="boolean"==typeof e.aPad||null===e.aPad?e.aPad?e.mDec:0:+e.aPad,a=function(t){var e=0===s?/(\.(?:\d*[1-9])?)0*$/:1===s?/(\.\d(?:\d*[1-9])?)0*$/:new RegExp("(\\.\\d{"+s+"}(?:\\d*[1-9])?)0*$");return t=t.replace(e,"$1"),0===s&&(t=t.replace(/\.$/,"")),t};"-"===t.charAt(0)&&(r="-",t=t.replace("-","")),t.match(/^\d/)||(t="0"+t),"-"===r&&0==+t&&(r=""),(+t>0&&"keep"!==e.lZero||t.length>0&&"allow"===e.lZero)&&(t=t.replace(/^0*(\d)/,"$1"));var l=t.lastIndexOf("."),c=-1===l?t.length-1:l,d=t.length-1-c;if(d<=e.mDec){if(n=t,d<s){-1===l&&(n+=".");for(var h="000000";d<s;)n+=h=h.substring(0,s-d),d+=h.length}else d>s?n=a(n):0===d&&0===s&&(n=n.replace(/\.$/,""));if("CHF"!==e.mRound)return 0==+n?n:r+n;"CHF"===e.mRound&&(l=n.lastIndexOf("."),t=n)}var u=l+e.mDec,p=+t.charAt(u+1),f=t.substring(0,u+1).split(""),g="."===t.charAt(u)?t.charAt(u-1)%2:t.charAt(u)%2,m=!0;if(1!==g&&(g=0===g&&t.substring(u+2,t.length)>0?1:0),p>4&&"S"===e.mRound||p>4&&"A"===e.mRound&&""===r||p>5&&"A"===e.mRound&&"-"===r||p>5&&"s"===e.mRound||p>5&&"a"===e.mRound&&""===r||p>4&&"a"===e.mRound&&"-"===r||p>5&&"B"===e.mRound||5===p&&"B"===e.mRound&&1===g||p>0&&"C"===e.mRound&&""===r||p>0&&"F"===e.mRound&&"-"===r||p>0&&"U"===e.mRound||"CHF"===e.mRound)for(o=f.length-1;o>=0;o-=1)if("."!==f[o]){if("CHF"===e.mRound&&f[o]<=2&&m){f[o]=0,m=!1;break}if("CHF"===e.mRound&&f[o]<=7&&m){f[o]=5,m=!1;break}if("CHF"===e.mRound&&m?(f[o]=10,m=!1):f[o]=+f[o]+1,f[o]<10)break;o>0&&(f[o]="0")}return 0==+(n=a((f=f.slice(0,u+1)).join("")))?n:r+n}function f(e,i){this.settings=i,this.that=e,this.$that=t(e),this.formatted=!1,this.settingsClone=n(this.$that,this.settings),this.value=e.value}function g(e){return"string"==typeof e&&(e="#"+(e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]")).replace(/(:|\.)/g,"\\$1")),t(e)}function m(t,e,i){var n=t.data("autoNumeric");n||(n={},t.data("autoNumeric",n));var o=n.holder;return(void 0===o&&e||i)&&(o=new f(t.get(0),e),n.holder=o),o}f.prototype={init:function(t){this.value=this.that.value,this.settingsClone=n(this.$that,this.settings),this.ctrlKey=t.ctrlKey,this.cmdKey=t.metaKey,this.shiftKey=t.shiftKey,this.selection=function(t){var e={};if(void 0===t.selectionStart){t.focus();var i=document.selection.createRange();e.length=i.text.length,i.moveStart("character",-t.value.length),e.end=i.text.length,e.start=e.end-e.length}else e.start=t.selectionStart,e.end=t.selectionEnd,e.length=e.end-e.start;return e}(this.that),"keydown"!==t.type&&"keyup"!==t.type||(this.kdCode=t.keyCode),this.which=t.which,this.processed=!1,this.formatted=!1},setSelection:function(t,i,n){t=Math.max(t,0),i=Math.min(i,this.that.value.length),this.selection={start:t,end:i,length:i-t},(void 0===n||n)&&e(this.that,t,i)},setPosition:function(t,e){this.setSelection(t,t,e)},getBeforeAfter:function(){var t=this.value;return[t.substring(0,this.selection.start),t.substring(this.selection.end,t.length)]},getBeforeAfterStriped:function(){var t=this.getBeforeAfter();return t[0]=o(t[0],this.settingsClone),t[1]=o(t[1],this.settingsClone),t},normalizeParts:function(t,e){var i=this.settingsClone;e=o(e,i),""!==(t=o(t,i,!!e.match(/^\d/)||"leading"))&&t!==i.aNeg||"deny"!==i.lZero||e>""&&(e=e.replace(/^0*(\d)/,"$1"));var n=t+e;if(i.aDec){var r=n.match(new RegExp("^"+i.aNegRegAutoStrip+"\\"+i.aDec));r&&(n=(t=t.replace(r[1],r[1]+"0"))+e)}return"zero"!==i.wEmpty||n!==i.aNeg&&""!==n||(t+="0"),[t,e]},setValueParts:function(t,e){var i=this.settingsClone,n=this.normalizeParts(t,e),o=n.join(""),r=n[0].length;return!!d(o,i)&&(r>(o=s(o,i.aDec,i.mDec)).length&&(r=o.length),this.value=o,this.setPosition(r,!1),!0)},signPosition:function(){var t=this.settingsClone,e=t.aSign,i=this.that;if(e){var n=e.length;if("p"===t.pSign)return t.aNeg&&i.value&&i.value.charAt(0)===t.aNeg?[1,n+1]:[0,n];var o=i.value.length;return[o-n,o]}return[1e3,-1]},expandSelectionOnSign:function(t){var e=this.signPosition(),i=this.selection;i.start<e[1]&&i.end>e[0]&&((i.start<e[0]||i.end>e[1])&&this.value.substring(Math.max(i.start,e[0]),Math.min(i.end,e[1])).match(/^\s*$/)?i.start<e[0]?this.setSelection(i.start,e[0],t):this.setSelection(e[1],i.end,t):this.setSelection(Math.min(i.start,e[0]),Math.max(i.end,e[1]),t))},checkPaste:function(){if(void 0!==this.valuePartsBeforePaste){var t=this.getBeforeAfter(),e=this.valuePartsBeforePaste;delete this.valuePartsBeforePaste,t[0]=t[0].substr(0,e[0].length)+o(t[0].substr(e[0].length),this.settingsClone),this.setValueParts(t[0],t[1])||(this.value=e.join(""),this.setPosition(e[0].length,!1))}},skipAllways:function(t){var e=this.kdCode,i=this.which,n=this.ctrlKey,o=this.cmdKey,r=this.shiftKey;if((n||o)&&"keyup"===t.type&&void 0!==this.valuePartsBeforePaste||r&&45===e)return this.checkPaste(),!1;if(e>=112&&e<=123||e>=91&&e<=93||e>=9&&e<=31||e<8&&(0===i||i===e)||144===e||145===e||45===e)return!0;if((n||o)&&65===e)return!0;if((n||o)&&(67===e||86===e||88===e))return"keydown"===t.type&&this.expandSelectionOnSign(),86!==e&&45!==e||("keydown"===t.type||"keypress"===t.type?void 0===this.valuePartsBeforePaste&&(this.valuePartsBeforePaste=this.getBeforeAfter()):this.checkPaste()),"keydown"===t.type||"keypress"===t.type||67===e;if(n||o)return!0;if(37===e||39===e){var s=this.settingsClone.aSep,a=this.selection.start,l=this.that.value;return"keydown"===t.type&&s&&!this.shiftKey&&(37===e&&l.charAt(a-2)===s?this.setPosition(a-1):39===e&&l.charAt(a+1)===s&&this.setPosition(a+1)),!0}return e>=34&&e<=40},processAllways:function(){var t;return(8===this.kdCode||46===this.kdCode)&&(this.selection.length?(this.expandSelectionOnSign(!1),t=this.getBeforeAfterStriped(),this.setValueParts(t[0],t[1])):(t=this.getBeforeAfterStriped(),8===this.kdCode?t[0]=t[0].substring(0,t[0].length-1):t[1]=t[1].substring(1,t[1].length),this.setValueParts(t[0],t[1])),!0)},processKeypress:function(){var t=this.settingsClone,e=String.fromCharCode(this.which),i=this.getBeforeAfterStriped(),n=i[0],o=i[1];return e===t.aDec||t.altDec&&e===t.altDec||("."===e||","===e)&&110===this.kdCode?!t.mDec||!t.aDec||(t.aNeg&&o.indexOf(t.aNeg)>-1||n.indexOf(t.aDec)>-1||o.indexOf(t.aDec)>0||(0===o.indexOf(t.aDec)&&(o=o.substr(1)),this.setValueParts(n+t.aDec,o)),!0):"-"===e||"+"===e?!t.aNeg||(""===n&&o.indexOf(t.aNeg)>-1&&(n=t.aNeg,o=o.substring(1,o.length)),n=n.charAt(0)===t.aNeg?n.substring(1,n.length):"-"===e?t.aNeg+n:n,this.setValueParts(n,o),!0):!(e>="0"&&e<="9"&&(t.aNeg&&""===n&&o.indexOf(t.aNeg)>-1&&(n=t.aNeg,o=o.substring(1,o.length)),t.vMax<=0&&t.vMin<t.vMax&&-1===this.value.indexOf(t.aNeg)&&"0"!==e&&(n=t.aNeg+n),this.setValueParts(n+e,o),0))},formatQuick:function(){var t=this.settingsClone,e=this.getBeforeAfterStriped(),i=this.value;if((""===t.aSep||""!==t.aSep&&-1===i.indexOf(t.aSep))&&(""===t.aSign||""!==t.aSign&&-1===i.indexOf(t.aSign))){var n=[],o="";(n=i.split(t.aDec))[0].indexOf("-")>-1&&(o="-",n[0]=n[0].replace("-",""),e[0]=e[0].replace("-","")),n[0].length>t.mInt&&"0"===e[0].charAt(0)&&(e[0]=e[0].slice(1)),e[0]=o+e[0]}var r=u(this.value,this.settingsClone),s=r.length;if(r){for(var a=e[0].split(""),l=0;l<a.length;l+=1)a[l].match("\\d")||(a[l]="\\"+a[l]);var c=new RegExp("^.*?"+a.join(".*?")),d=r.match(c);d?(0===(s=d[0].length)&&r.charAt(0)!==t.aNeg||1===s&&r.charAt(0)===t.aNeg)&&t.aSign&&"p"===t.pSign&&(s=this.settingsClone.aSign.length+("-"===r.charAt(0)?1:0)):t.aSign&&"s"===t.pSign&&(s-=t.aSign.length)}this.that.value=r,this.setPosition(s),this.formatted=!0}};var v={init:function(i){return this.each((function(){var n=t(this),s=n.data("autoNumeric"),l=n.data();if("object"==typeof s)return this;if((s=t.extend({},{aNum:"0123456789",aSep:",",dGroup:"3",aDec:".",altDec:null,aSign:"",pSign:"p",vMax:"9999999999999.99",vMin:"0.00",mDec:null,mRound:"S",aPad:!0,nBracket:null,wEmpty:"empty",lZero:"allow",aForm:!0,onSomeEvent:function(){}},l,i)).aDec===s.aSep)return t.error("autoNumeric will not function properly when the decimal character aDec: '"+s.aDec+"' and thousand separator aSep: '"+s.aSep+"' are the same character"),this;n.data("autoNumeric",s),s.runOnce=!1;var f=m(n,s);if(-1===t.inArray(n.prop("tagName").toLowerCase(),s.tagList)&&"input"!==n.prop("tagName").toLowerCase())return t.error("The <"+n.prop("tagName").toLowerCase()+"> is not supported by autoNumeric()"),this;if(!1===s.runOnce&&s.aForm){if(n.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])")){var g=!0;""===n[0].value&&"empty"===s.wEmpty&&(n[0].value="",g=!1),""===n[0].value&&"sign"===s.wEmpty&&(n[0].value=s.aSign,g=!1),g&&n.autoNumeric("set",n.val())}-1!==t.inArray(n.prop("tagName").toLowerCase(),s.tagList)&&""!==n.text()&&n.autoNumeric("set",n.text())}s.runOnce=!0,n.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])")&&(n.on("keydown.autoNumeric",(function(e){return(f=m(n)).settings.aDec===f.settings.aSep?(t.error("autoNumeric will not function properly when the decimal character aDec: '"+f.settings.aDec+"' and thousand separator aSep: '"+f.settings.aSep+"' are the same character"),this):f.that.readOnly?(f.processed=!0,!0):(f.init(e),f.settings.oEvent="keydown",f.skipAllways(e)?(f.processed=!0,!0):f.processAllways()?(f.processed=!0,f.formatQuick(),e.preventDefault(),!1):(f.formatted=!1,!0))})),n.on("keypress.autoNumeric",(function(t){var e=m(n),i=e.processed;return e.init(t),e.settings.oEvent="keypress",!!e.skipAllways(t)||(i?(t.preventDefault(),!1):e.processAllways()||e.processKeypress()?(e.formatQuick(),t.preventDefault(),!1):void(e.formatted=!1))})),n.on("keyup.autoNumeric",(function(t){var i=m(n);i.init(t),i.settings.oEvent="keyup";var o=i.skipAllways(t);return i.kdCode=0,delete i.valuePartsBeforePaste,n[0].value===i.settings.aSign&&("s"===i.settings.pSign?e(this,0,0):e(this,i.settings.aSign.length,i.settings.aSign.length)),!!o||""===this.value||void(i.formatted||i.formatQuick())})),n.on("focusin.autoNumeric",(function(){var t=m(n);if(t.settingsClone.oEvent="focusin",null!==t.settingsClone.nBracket){var i=n.val();n.val(r(i,t.settingsClone.nBracket,t.settingsClone.oEvent))}t.inVal=n.val();var o=h(t.inVal,t.settingsClone,!0);null!==o&&(n.val(o),"s"===t.settings.pSign?e(this,0,0):e(this,t.settings.aSign.length,t.settings.aSign.length))})),n.on("focusout.autoNumeric",(function(){var t=m(n),e=t.settingsClone,i=n.val(),s=i;t.settingsClone.oEvent="focusout";var l="";"allow"===e.lZero&&(e.allowLeading=!1,l="leading"),""!==i&&(i=null===h(i=o(i,e,l),e)&&d(i,e,n[0])?c(i=p(i=a(i,e.aDec,e.aNeg),e),e.aDec,e.aNeg):"");var f=h(i,e,!1);null===f&&(f=u(i,e)),f!==s&&n.val(f),f!==t.inVal&&(n.change(),delete t.inVal),null!==e.nBracket&&n.autoNumeric("get")<0&&(t.settingsClone.oEvent="focusout",n.val(r(n.val(),e.nBracket,e.oEvent)))})))}))},destroy:function(){return t(this).each((function(){var e=t(this);e.off(".autoNumeric"),e.removeData("autoNumeric")}))},update:function(e){return t(this).each((function(){var i=g(t(this)),n=i.data("autoNumeric");if("object"!=typeof n)return t.error("You must initialize autoNumeric('init', {options}) prior to calling the 'update' method"),this;var o=i.autoNumeric("get");return m(i,n=t.extend(n,e),!0),n.aDec===n.aSep?(t.error("autoNumeric will not function properly when the decimal character aDec: '"+n.aDec+"' and thousand separator aSep: '"+n.aSep+"' are the same character"),this):(i.data("autoNumeric",n),""!==i.val()||""!==i.text()?i.autoNumeric("set",o):void 0)}))},set:function(e){if(null!==e)return t(this).each((function(){var i=g(t(this)),n=i.data("autoNumeric"),s=e.toString(),a=e.toString();return"object"!=typeof n?(t.error("You must initialize autoNumeric('init', {options}) prior to calling the 'set' method"),this):(a!==i.attr("value")&&"input"===i.prop("tagName").toLowerCase()&&!1===n.runOnce&&(s=o(s=null!==n.nBracket?r(i.val(),n.nBracket,"pageLoad"):s,n)),a!==i.attr("value")&&a!==i.text()||!1!==n.runOnce||(s=s.replace(",",".")),t.isNumeric(+s)?(s=l(s,n),n.oEvent="set",s.toString(),""!==s&&(s=p(s,n)),d(s=c(s,n.aDec,n.aNeg),n)||(s=p("",n)),s=u(s,n),i.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])")?i.val(s):-1!==t.inArray(i.prop("tagName").toLowerCase(),n.tagList)?i.text(s):(t.error("The <"+i.prop("tagName").toLowerCase()+"> is not supported by autoNumeric()"),!1)):"")}))},get:function(){var e=g(t(this)),i=e.data("autoNumeric");if("object"!=typeof i)return t.error("You must initialize autoNumeric('init', {options}) prior to calling the 'get' method"),this;i.oEvent="get";var n="";if(e.is("input[type=text], input[type=hidden], input[type=tel], input:not([type])"))n=e.eq(0).val();else{if(-1===t.inArray(e.prop("tagName").toLowerCase(),i.tagList))return t.error("The <"+e.prop("tagName").toLowerCase()+"> is not supported by autoNumeric()"),!1;n=e.eq(0).text()}return""===n&&"empty"===i.wEmpty||n===i.aSign&&("sign"===i.wEmpty||"empty"===i.wEmpty)?"":(null!==i.nBracket&&""!==n&&(n=r(n,i.nBracket,i.oEvent)),(i.runOnce||!1===i.aForm)&&(n=o(n,i)),0==+(n=a(n,i.aDec,i.aNeg))&&"keep"!==i.lZero&&(n="0"),"keep"===i.lZero?n:n=l(n,i))},getString:function(){for(var e=!1,i=g(t(this)),n=i.serialize(),o=n.split("&"),r=t("form").index(i),s=0;s<o.length;s+=1){var a=o[s].split("="),l=t("form:eq("+r+') input[name="'+decodeURIComponent(a[0])+'"]');"object"==typeof l.data("autoNumeric")&&null!==a[1]&&(a[1]=l.autoNumeric("get"),o[s]=a.join("="),e=!0)}return!0===e?o.join("&"):n},getArray:function(){var e=!1,i=g(t(this)),n=i.serializeArray(),o=t("form").index(i);return t.each(n,(function(i,n){var r=t("form:eq("+o+') input[name="'+decodeURIComponent(n.name)+'"]');"object"==typeof r.data("autoNumeric")&&(""!==n.value&&(n.value=r.autoNumeric("get").toString()),e=!0)})),!0===e?n:this},getSettings:function(){return g(t(this)).eq(0).data("autoNumeric")}};t.fn.autoNumeric=function(e){return v[e]?v[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error('Method "'+e+'" is not supported by autoNumeric()'):v.init.apply(this,arguments)}}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}((function(t){"use strict";var e=t(window),i=t(document),n=function(e,i){this.$element=t(e),this.defaults=t.extend({},n.defaults,this.$element.data(),t.isPlainObject(i)?i:{}),this.init()};n.prototype={constructor:n,init:function(){var e=this.defaults.trigger;this.$trigger=e?t(e):this.$element,this.$picker=t(this.defaults.template),this.$years=this.$picker.find("[data-type='years picker']"),this.$months=this.$picker.find("[data-type='months picker']"),this.$days=this.$picker.find("[data-type='days picker']"),this.$picker.appendTo("body"),this.place(),this.hide(),this.format=n.fn.parseFormat(this.defaults.dateFormat),this.fillWeek(),this.enable()},enable:function(){this.enabled||(this.$element.is("input")&&(this.$element.on("keyup",t.proxy(this.update,this)),this.defaults.trigger||this.$element.on("focus",t.proxy(this.show,this))),this.$trigger.on("click",t.proxy(this.show,this)),this.$picker.on({click:t.proxy(this.click,this),mousedown:t.proxy(this.mousedown,this)}),this.update(),this.enabled=!0)},disable:function(){this.enabled&&(this.$element.is("input")&&(this.$element.off("keyup",this.update),this.defaults.trigger||this.$element.off("focus",this.show)),this.$trigger.off("click",this.show),this.$picker.off({click:this.click,mousedown:this.mousedown}),this.hide(),this.enabled=!1)},showView:function(t){var e=this.format;if(e.year||e.month||e.day)switch(t){case 2:case"years":this.$months.hide(),this.$days.hide(),e.year?(this.fillYears(),this.$years.show()):this.showView(0);break;case 1:case"months":this.$years.hide(),this.$days.hide(),e.month?(this.fillMonths(),this.$months.show()):this.showView(2);break;default:this.$years.hide(),this.$months.hide(),e.day?(this.fillDays(),this.$days.show()):this.showView(1)}},hideView:function(){this.defaults.autoClose&&this.hide()},place:function(){var t=this.$trigger.offset(),e=this.$trigger.outerHeight();this.$picker.css({top:t.top+e,left:t.left})},show:function(){this.enabled&&(this.$picker.show(),e.on("resize",t.proxy(this.place,this)),i.on("mousedown",t.proxy(this.hide,this)),this.place(),this.showView(this.defaults.viewStart))},hide:function(){this.$picker.hide(),e.off("resize",this.place),i.off("mousedown",this.hide)},mousedown:function(t){t.stopPropagation(),t.preventDefault()},update:function(){var t=this.$element.is("input")?this.$element.prop("value"):this.$element.text();this.date=n.fn.parseDate(t,this.format),this.viewDate=new Date(this.date.getFullYear(),this.date.getMonth(),this.date.getDate(),0,0,0,0),this.fillAll()},output:function(){var t=this.$element,e=n.fn.formatDate(this.date,this.format);t.is("input")?t.prop("value",e).trigger("change"):t.text(e)},template:function(e){var i={text:"",type:"",selected:!1,disabled:!1};return t.extend(i,e),["<"+this.defaults.itemTag+" ",i.selected?'class="'+this.defaults.selectedClass+'"':i.disabled?'class="'+this.defaults.disabledClass+'"':"",i.type?' data-type="'+i.type+'"':"",">",i.text,"</"+this.defaults.itemTag+">"].join("")},fillAll:function(){this.fillYears(),this.fillMonths(),this.fillDays()},fillYears:function(){var t,e,i,n=[],o=this.defaults.yearSuffix||"",r=this.date.getFullYear(),s=this.viewDate.getFullYear();for(i=s-5+o+" - "+(s+6)+o,e=-5;7>e;e++)t=s+e===r,n.push(this.template({text:s+e,type:t?"year selected":"year",selected:t,disabled:-5===e||6===e}));this.$picker.find("[data-type='years current']").html(i),this.$picker.find("[data-type='years']").empty().html(n.join(""))},fillMonths:function(){var t,e,i,n=[],o=this.defaults.monthsShort,r=this.date.getFullYear(),s=this.date.getMonth(),a=this.viewDate.getFullYear();for(i=a.toString()+this.defaults.yearSuffix||"",e=0;12>e;e++)t=a===r&&e===s,n.push(this.template({text:o[e],type:t?"month selected":"month",selected:t}));this.$picker.find("[data-type='year current']").html(i),this.$picker.find("[data-type='months']").empty().html(n.join(""))},fillWeek:function(){var e,i=[],n=this.defaults.daysMin,o=parseInt(this.defaults.weekStart,10)%7;for(n=t.merge(n.slice(o),n.slice(0,o)),e=0;7>e;e++)i.push(this.template({text:n[e]}));this.$picker.find("[data-type='week']").empty().html(i.join(""))},fillDays:function(){var e,i,o,r,s,a,l=[],c=[],d=[],h=[],u=this.defaults.monthsShort,p=this.defaults.yearSuffix||"",f=this.date.getFullYear(),g=this.date.getMonth(),m=this.date.getDate(),v=this.viewDate.getFullYear(),y=this.viewDate.getMonth(),b=parseInt(this.defaults.weekStart,10)%7;for(a=this.defaults.showMonthAfterYear?v+p+" "+u[y]:u[y]+" "+v+p,o=0===y?n.fn.getDaysInMonth(v-1,11):n.fn.getDaysInMonth(v,y-1),r=1;o>=r;r++)c.push(this.template({text:r,type:"day prev",disabled:!0}));for(s=(s=(new Date(v,y,1,0,0,0,0).getDay()-b+7)%7)>0?s:7,c=c.slice(o-s),o=11===y?n.fn.getDaysInMonth(v+1,0):n.fn.getDaysInMonth(v,y+1),r=1;o>=r;r++)h.push(this.template({text:r,type:"day next",disabled:!0}));for(o=n.fn.getDaysInMonth(v,y),s=(s=(7-(new Date(v,y,o,0,0,0,0).getDay()+1-b))%7)>=42-(c.length+o)?s:s+7,h=h.slice(0,s),r=1;o>=r;r++)e=v===f&&y===g&&r===m,i=this.defaults.isDisabled(new Date(v,y,r)),d.push(this.template({text:r,type:i?"day disabled":e?"day selected":"day",selected:e,disabled:i}));t.merge(l,c),t.merge(l,d),t.merge(l,h),this.$picker.find("[data-type='month current']").html(a),this.$picker.find("[data-type='days']").empty().html(l.join(""))},click:function(e){var i,n,o,r,s,a=t(e.target),l=!1;if(e.stopPropagation(),e.preventDefault(),0!==a.length)switch(i=this.viewDate.getFullYear(),n=this.viewDate.getMonth(),o=this.viewDate.getDate(),s=a.data().type){case"years prev":case"years next":i="years prev"===s?i-10:i+10,r=a.text(),(l=/^\d{2,4}$/.test(r))&&(i=parseInt(r,10),this.date=new Date(i,n,Math.min(o,28),0,0,0,0)),this.viewDate=new Date(i,n,Math.min(o,28),0,0,0,0),this.fillYears(),l&&(this.showView(1),this.output());break;case"year prev":case"year next":i="year prev"===s?i-1:i+1,this.viewDate=new Date(i,n,Math.min(o,28),0,0,0,0),this.fillMonths();break;case"year current":this.format.year&&this.showView(2);break;case"year selected":this.format.month?this.showView(1):this.hideView();break;case"year":i=parseInt(a.text(),10),this.date=new Date(i,n,Math.min(o,28),0,0,0,0),this.viewDate=new Date(i,n,Math.min(o,28),0,0,0,0),this.format.month?this.showView(1):this.hideView(),this.output();break;case"month prev":case"month next":n="month prev"===s?n-1:"month next"===s?n+1:n,this.viewDate=new Date(i,n,Math.min(o,28),0,0,0,0),this.fillDays();break;case"month current":this.format.month&&this.showView(1);break;case"month selected":this.format.day?this.showView(0):this.hideView();break;case"month":n=a.parent().children().index(a),this.date=new Date(i,n,Math.min(o,28),0,0,0,0),this.viewDate=new Date(i,n,Math.min(o,28),0,0,0,0),this.format.day?this.showView(0):this.hideView(),this.output();break;case"day prev":case"day next":case"day":n="day prev"===s?n-1:"day next"===s?n+1:n,o=parseInt(a.text(),10),this.date=new Date(i,n,o,0,0,0,0),this.viewDate=new Date(i,n,o,0,0,0,0),this.fillDays(),"day"===s&&this.hideView(),this.output();break;case"day selected":this.hideView(),this.output();break;case"day disabled":this.hideView()}}},n.fn={isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,this.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},parseFormat:function(t){var e,i,n=t.match(/[.\/\-\s].*?/)||"/",o=t.split(/\W+/);if(!o||0===o.length)throw new Error("Invalid date format.");for(t={separator:n[0],parts:o},i=0,e=o.length;e>i;i++)switch(o[i]){case"dd":case"d":t.day=!0;break;case"mm":case"m":t.month=!0;break;case"yyyy":case"yy":t.year=!0}return t},parseDate:function(t,e){var i,n,o,r,s,a,l;if(i="string"==typeof t&&t.length>0?t.split(e.separator):[],n=e.parts.length,o=(t=new Date).getFullYear(),r=t.getDate(),s=t.getMonth(),i.length===n)for(l=0;n>l;l++)switch(a=parseInt(i[l],10)||1,e.parts[l]){case"dd":case"d":r=a;break;case"mm":case"m":s=a-1;break;case"yy":o=2e3+a;break;case"yyyy":o=a}return new Date(o,s,r,0,0,0,0)},formatDate:function(t,e){var i,n={d:t.getDate(),m:t.getMonth()+1,yy:t.getFullYear().toString().substring(2),yyyy:t.getFullYear()},o=[],r=e.parts.length;for(n.dd=(n.d<10?"0":"")+n.d,n.mm=(n.m<10?"0":"")+n.m,i=0;r>i;i++)o.push(n[e.parts[i]]);return o.join(e.separator)}},n.defaults={autoClose:!1,dateFormat:"mm/dd/yyyy",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],disabledClass:"disabled",isDisabled:function(){return!1},itemTag:"li",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],selectedClass:"selected",showMonthAfterYear:!1,template:['<div class="datepicker-container" data-type="datepicker">','<div class="datepicker-arrow"></div>','<div class="datepicker-content">','<div class="content-years" data-type="years picker">','<ul class="datepicker-title">','<li class="datepicker-prev" data-type="years prev">&lsaquo;</li>','<li class="col-5" data-type="years current"></li>','<li class="datepicker-next" data-type="years next">&rsaquo;</li>',"</ul>",'<ul class="datepicker-years" data-type="years"></ul>',"</div>",'<div class="content-months" data-type="months picker">','<ul class="datepicker-title">','<li class="datepicker-prev" data-type="year prev">&lsaquo;</li>','<li class="col-5" data-type="year current"></li>','<li class="datepicker-next" data-type="year next">&rsaquo;</li>',"</ul>",'<ul class="datepicker-months" data-type="months"></ul>',"</div>",'<div class="content-days" data-type="days picker">','<ul class="datepicker-title">','<li class="datepicker-prev" data-type="month prev">&lsaquo;</li>','<li class="col-5" data-type="month current"></li>','<li class="datepicker-next" data-type="month next">&rsaquo;</li>',"</ul>",'<ul class="datepicker-week" data-type="week"></ul>','<ul class="datepicker-days" data-type="days"></ul>',"</div>","</div>","</div>"].join(""),trigger:void 0,viewStart:0,weekStart:0,yearSuffix:""},n.setDefaults=function(e){t.extend(n.defaults,e)},t.fn.datepicker=function(e){return this.each((function(){var i=t(this),o=i.data("datepicker");o||(o=new n(this,e),i.data("datepicker",o)),"string"==typeof e&&t.isFunction(o[e])&&o[e]()}))},t.fn.datepicker.constructor=n,t.fn.datepicker.setDefaults=n.setDefaults,t((function(){t("[datepicker]").datepicker()}))})),function(t,e){if("function"==typeof define&&define.amd)define(["moment","jquery"],(function(t,i){return i.fn||(i.fn={}),"function"!=typeof t&&t.hasOwnProperty("default")&&(t=t.default),e(t,i)}));else if("object"==typeof module&&module.exports){var i="undefined"!=typeof window?window.jQuery:void 0;i||(i=require("jquery")).fn||(i.fn={});var n="undefined"!=typeof window&&void 0!==window.moment?window.moment:require("moment");module.exports=e(n,i)}else t.daterangepicker=e(t.moment,t.jQuery)}(this,(function(t,e){var i=function(i,n,o){if(this.parentEl="body",this.element=e(i),this.startDate=t().startOf("day"),this.endDate=t().endOf("day"),this.minDate=!1,this.maxDate=!1,this.maxSpan=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.minYear=t().subtract(100,"year").format("YYYY"),this.maxYear=t().add(100,"year").format("YYYY"),this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyButtonClasses="btn-primary",this.cancelButtonClasses="btn-default",this.locale={direction:"ltr",format:t.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:t.weekdaysMin(),monthNames:t.monthsShort(),firstDay:t.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof n&&null!==n||(n={}),"string"==typeof(n=e.extend(this.element.data(),n)).template||n.template instanceof e||(n.template='<div class="daterangepicker"><div class="ranges"></div><div class="drp-calendar left"><div class="calendar-table"></div><div class="calendar-time"></div></div><div class="drp-calendar right"><div class="calendar-table"></div><div class="calendar-time"></div></div><div class="drp-buttons"><span class="drp-selected"></span><button class="cancelBtn" type="button"></button><button class="applyBtn" disabled="disabled" type="button"></button> </div></div>'),this.parentEl=n.parentEl&&e(n.parentEl).length?e(n.parentEl):e(this.parentEl),this.container=e(n.template).appendTo(this.parentEl),"object"==typeof n.locale&&("string"==typeof n.locale.direction&&(this.locale.direction=n.locale.direction),"string"==typeof n.locale.format&&(this.locale.format=n.locale.format),"string"==typeof n.locale.separator&&(this.locale.separator=n.locale.separator),"object"==typeof n.locale.daysOfWeek&&(this.locale.daysOfWeek=n.locale.daysOfWeek.slice()),"object"==typeof n.locale.monthNames&&(this.locale.monthNames=n.locale.monthNames.slice()),"number"==typeof n.locale.firstDay&&(this.locale.firstDay=n.locale.firstDay),"string"==typeof n.locale.applyLabel&&(this.locale.applyLabel=n.locale.applyLabel),"string"==typeof n.locale.cancelLabel&&(this.locale.cancelLabel=n.locale.cancelLabel),"string"==typeof n.locale.weekLabel&&(this.locale.weekLabel=n.locale.weekLabel),"string"==typeof n.locale.customRangeLabel)){(u=document.createElement("textarea")).innerHTML=n.locale.customRangeLabel;var r=u.value;this.locale.customRangeLabel=r}if(this.container.addClass(this.locale.direction),"string"==typeof n.startDate&&(this.startDate=t(n.startDate,this.locale.format)),"string"==typeof n.endDate&&(this.endDate=t(n.endDate,this.locale.format)),"string"==typeof n.minDate&&(this.minDate=t(n.minDate,this.locale.format)),"string"==typeof n.maxDate&&(this.maxDate=t(n.maxDate,this.locale.format)),"object"==typeof n.startDate&&(this.startDate=t(n.startDate)),"object"==typeof n.endDate&&(this.endDate=t(n.endDate)),"object"==typeof n.minDate&&(this.minDate=t(n.minDate)),"object"==typeof n.maxDate&&(this.maxDate=t(n.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof n.applyButtonClasses&&(this.applyButtonClasses=n.applyButtonClasses),"string"==typeof n.applyClass&&(this.applyButtonClasses=n.applyClass),"string"==typeof n.cancelButtonClasses&&(this.cancelButtonClasses=n.cancelButtonClasses),"string"==typeof n.cancelClass&&(this.cancelButtonClasses=n.cancelClass),"object"==typeof n.maxSpan&&(this.maxSpan=n.maxSpan),"object"==typeof n.dateLimit&&(this.maxSpan=n.dateLimit),"string"==typeof n.opens&&(this.opens=n.opens),"string"==typeof n.drops&&(this.drops=n.drops),"boolean"==typeof n.showWeekNumbers&&(this.showWeekNumbers=n.showWeekNumbers),"boolean"==typeof n.showISOWeekNumbers&&(this.showISOWeekNumbers=n.showISOWeekNumbers),"string"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses),"object"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses.join(" ")),"boolean"==typeof n.showDropdowns&&(this.showDropdowns=n.showDropdowns),"number"==typeof n.minYear&&(this.minYear=n.minYear),"number"==typeof n.maxYear&&(this.maxYear=n.maxYear),"boolean"==typeof n.showCustomRangeLabel&&(this.showCustomRangeLabel=n.showCustomRangeLabel),"boolean"==typeof n.singleDatePicker&&(this.singleDatePicker=n.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof n.timePicker&&(this.timePicker=n.timePicker),"boolean"==typeof n.timePickerSeconds&&(this.timePickerSeconds=n.timePickerSeconds),"number"==typeof n.timePickerIncrement&&(this.timePickerIncrement=n.timePickerIncrement),"boolean"==typeof n.timePicker24Hour&&(this.timePicker24Hour=n.timePicker24Hour),"boolean"==typeof n.autoApply&&(this.autoApply=n.autoApply),"boolean"==typeof n.autoUpdateInput&&(this.autoUpdateInput=n.autoUpdateInput),"boolean"==typeof n.linkedCalendars&&(this.linkedCalendars=n.linkedCalendars),"function"==typeof n.isInvalidDate&&(this.isInvalidDate=n.isInvalidDate),"function"==typeof n.isCustomDate&&(this.isCustomDate=n.isCustomDate),"boolean"==typeof n.alwaysShowCalendars&&(this.alwaysShowCalendars=n.alwaysShowCalendars),0!=this.locale.firstDay)for(var s=this.locale.firstDay;s>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),s--;var a,l,c;if(void 0===n.startDate&&void 0===n.endDate&&e(this.element).is(":text")){var d=e(this.element).val(),h=d.split(this.locale.separator);a=l=null,2==h.length?(a=t(h[0],this.locale.format),l=t(h[1],this.locale.format)):this.singleDatePicker&&""!==d&&(a=t(d,this.locale.format),l=t(d,this.locale.format)),null!==a&&null!==l&&(this.setStartDate(a),this.setEndDate(l))}if("object"==typeof n.ranges){for(c in n.ranges){a="string"==typeof n.ranges[c][0]?t(n.ranges[c][0],this.locale.format):t(n.ranges[c][0]),l="string"==typeof n.ranges[c][1]?t(n.ranges[c][1],this.locale.format):t(n.ranges[c][1]),this.minDate&&a.isBefore(this.minDate)&&(a=this.minDate.clone());var u,p=this.maxDate;if(this.maxSpan&&p&&a.clone().add(this.maxSpan).isAfter(p)&&(p=a.clone().add(this.maxSpan)),p&&l.isAfter(p)&&(l=p.clone()),!(this.minDate&&l.isBefore(this.minDate,this.timepicker?"minute":"day")||p&&a.isAfter(p,this.timepicker?"minute":"day")))(u=document.createElement("textarea")).innerHTML=c,r=u.value,this.ranges[r]=[a,l]}var f="<ul>";for(c in this.ranges)f+='<li data-range-key="'+c+'">'+c+"</li>";this.showCustomRangeLabel&&(f+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+"</li>"),f+="</ul>",this.container.find(".ranges").prepend(f)}"function"==typeof o&&(this.callback=o),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&this.container.addClass("auto-apply"),"object"==typeof n.ranges&&this.container.addClass("show-ranges"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".drp-calendar.left").addClass("single"),this.container.find(".drp-calendar.left").show(),this.container.find(".drp-calendar.right").hide(),!this.timePicker&&this.autoApply&&this.container.addClass("auto-apply")),(void 0===n.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyButtonClasses.length&&this.container.find(".applyBtn").addClass(this.applyButtonClasses),this.cancelButtonClasses.length&&this.container.find(".cancelBtn").addClass(this.cancelButtonClasses),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".drp-calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)),this.container.find(".ranges").on("click.daterangepicker","li",e.proxy(this.clickRange,this)),this.container.find(".drp-buttons").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):(this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.on("keydown.daterangepicker",e.proxy(this.toggle,this))),this.updateElement()};return i.prototype={constructor:i,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.maxSpan&&this.startDate.clone().add(this.maxSpan).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.maxSpan)),this.previousRightTime=this.endDate.clone(),this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").prop("disabled",!1).removeClass("disabled"):this.container.find(".right .calendar-time select").prop("disabled",!0).addClass("disabled")),this.endDate&&this.container.find(".drp-selected").html(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){var t,e,i,n;this.timePicker&&(this.endDate?(t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),isNaN(e)&&(e=parseInt(this.container.find(".left .minuteselect option:last").val(),10)),i=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(n=this.container.find(".left .ampmselect").val())&&t<12&&(t+=12),"AM"===n&&12===t&&(t=0))):(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(e)&&(e=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),i=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,this.timePicker24Hour||("PM"===(n=this.container.find(".right .ampmselect").val())&&t<12&&(t+=12),"AM"===n&&12===t&&(t=0))),this.leftCalendar.month.hour(t).minute(e).second(i),this.rightCalendar.month.hour(t).minute(e).second(i));this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(i){var n,o=(n="left"==i?this.leftCalendar:this.rightCalendar).month.month(),r=n.month.year(),s=n.month.hour(),a=n.month.minute(),l=n.month.second(),c=t([r,o]).daysInMonth(),d=t([r,o,1]),h=t([r,o,c]),u=t(d).subtract(1,"month").month(),p=t(d).subtract(1,"month").year(),f=t([p,u]).daysInMonth(),g=d.day();(n=[]).firstDay=d,n.lastDay=h;for(var m=0;m<6;m++)n[m]=[];var v=f-g+this.locale.firstDay+1;v>f&&(v-=7),g==this.locale.firstDay&&(v=f-6);for(var y=t([p,u,v,12,a,l]),b=(m=0,0),x=0;m<42;m++,b++,y=t(y).add(24,"hour"))m>0&&b%7==0&&(b=0,x++),n[x][b]=y.clone().hour(s).minute(a).second(l),y.hour(12),this.minDate&&n[x][b].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&n[x][b].isBefore(this.minDate)&&"left"==i&&(n[x][b]=this.minDate.clone()),this.maxDate&&n[x][b].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&n[x][b].isAfter(this.maxDate)&&"right"==i&&(n[x][b]=this.maxDate.clone());"left"==i?this.leftCalendar.calendar=n:this.rightCalendar.calendar=n;var w="left"==i?this.minDate:this.startDate,S=this.maxDate,C=("left"==i?this.startDate:this.endDate,this.locale.direction,'<table class="table-condensed">');C+="<thead>",C+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(C+="<th></th>"),w&&!w.isBefore(n.firstDay)||this.linkedCalendars&&"left"!=i?C+="<th></th>":C+='<th class="prev available"><span></span></th>';var k=this.locale.monthNames[n[1][1].month()]+n[1][1].format(" YYYY");if(this.showDropdowns){for(var _=n[1][1].month(),T=n[1][1].year(),D=S&&S.year()||this.maxYear,E=w&&w.year()||this.minYear,A=T==E,I=T==D,P='<select class="monthselect">',M=0;M<12;M++)(!A||w&&M>=w.month())&&(!I||S&&M<=S.month())?P+="<option value='"+M+"'"+(M===_?" selected='selected'":"")+">"+this.locale.monthNames[M]+"</option>":P+="<option value='"+M+"'"+(M===_?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[M]+"</option>";P+="</select>";for(var L='<select class="yearselect">',R=E;R<=D;R++)L+='<option value="'+R+'"'+(R===T?' selected="selected"':"")+">"+R+"</option>";k=P+(L+="</select>")}if(C+='<th colspan="5" class="month">'+k+"</th>",S&&!S.isAfter(n.lastDay)||this.linkedCalendars&&"right"!=i&&!this.singleDatePicker?C+="<th></th>":C+='<th class="next available"><span></span></th>',C+="</tr>",C+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(C+='<th class="week">'+this.locale.weekLabel+"</th>"),e.each(this.locale.daysOfWeek,(function(t,e){C+="<th>"+e+"</th>"})),C+="</tr>",C+="</thead>",C+="<tbody>",null==this.endDate&&this.maxSpan){var O=this.startDate.clone().add(this.maxSpan).endOf("day");S&&!O.isBefore(S)||(S=O)}for(x=0;x<6;x++){for(C+="<tr>",this.showWeekNumbers?C+='<td class="week">'+n[x][0].week()+"</td>":this.showISOWeekNumbers&&(C+='<td class="week">'+n[x][0].isoWeek()+"</td>"),b=0;b<7;b++){var F=[];n[x][b].isSame(new Date,"day")&&F.push("today"),n[x][b].isoWeekday()>5&&F.push("weekend"),n[x][b].month()!=n[1][1].month()&&F.push("off","ends"),this.minDate&&n[x][b].isBefore(this.minDate,"day")&&F.push("off","disabled"),S&&n[x][b].isAfter(S,"day")&&F.push("off","disabled"),this.isInvalidDate(n[x][b])&&F.push("off","disabled"),n[x][b].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&F.push("active","start-date"),null!=this.endDate&&n[x][b].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&F.push("active","end-date"),null!=this.endDate&&n[x][b]>this.startDate&&n[x][b]<this.endDate&&F.push("in-range");var N=this.isCustomDate(n[x][b]);!1!==N&&("string"==typeof N?F.push(N):Array.prototype.push.apply(F,N));var H="",z=!1;for(m=0;m<F.length;m++)H+=F[m]+" ","disabled"==F[m]&&(z=!0);z||(H+="available"),C+='<td class="'+H.replace(/^\s+|\s+$/g,"")+'" data-title="r'+x+"c"+b+'">'+n[x][b].date()+"</td>"}C+="</tr>"}C+="</tbody>",C+="</table>",this.container.find(".drp-calendar."+i+" .calendar-table").html(C)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,i,n,o=this.maxDate;if(!this.maxSpan||this.maxDate&&!this.startDate.clone().add(this.maxSpan).isBefore(this.maxDate)||(o=this.startDate.clone().add(this.maxSpan)),"left"==t)i=this.startDate.clone(),n=this.minDate;else if("right"==t){i=this.endDate.clone(),n=this.startDate;var r=this.container.find(".drp-calendar.right .calendar-time");if(""!=r.html()&&(i.hour(isNaN(i.hour())?r.find(".hourselect option:selected").val():i.hour()),i.minute(isNaN(i.minute())?r.find(".minuteselect option:selected").val():i.minute()),i.second(isNaN(i.second())?r.find(".secondselect option:selected").val():i.second()),!this.timePicker24Hour)){var s=r.find(".ampmselect option:selected").val();"PM"===s&&i.hour()<12&&i.hour(i.hour()+12),"AM"===s&&12===i.hour()&&i.hour(0)}i.isBefore(this.startDate)&&(i=this.startDate.clone()),o&&i.isAfter(o)&&(i=o.clone())}e='<select class="hourselect">';for(var a=this.timePicker24Hour?0:1,l=this.timePicker24Hour?23:12,c=a;c<=l;c++){var d=c;this.timePicker24Hour||(d=i.hour()>=12?12==c?12:c+12:12==c?0:c);var h=i.clone().hour(d),u=!1;n&&h.minute(59).isBefore(n)&&(u=!0),o&&h.minute(0).isAfter(o)&&(u=!0),d!=i.hour()||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+c+"</option>":'<option value="'+c+'">'+c+"</option>":e+='<option value="'+c+'" selected="selected">'+c+"</option>"}for(e+="</select> ",e+=': <select class="minuteselect">',c=0;c<60;c+=this.timePickerIncrement){var p=c<10?"0"+c:c;h=i.clone().minute(c),u=!1,n&&h.second(59).isBefore(n)&&(u=!0),o&&h.second(0).isAfter(o)&&(u=!0),i.minute()!=c||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+p+"</option>":'<option value="'+c+'">'+p+"</option>":e+='<option value="'+c+'" selected="selected">'+p+"</option>"}if(e+="</select> ",this.timePickerSeconds){for(e+=': <select class="secondselect">',c=0;c<60;c++)p=c<10?"0"+c:c,h=i.clone().second(c),u=!1,n&&h.isBefore(n)&&(u=!0),o&&h.isAfter(o)&&(u=!0),i.second()!=c||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+p+"</option>":'<option value="'+c+'">'+p+"</option>":e+='<option value="'+c+'" selected="selected">'+p+"</option>";e+="</select> "}if(!this.timePicker24Hour){e+='<select class="ampmselect">';var f="",g="";n&&i.clone().hour(12).minute(0).second(0).isBefore(n)&&(f=' disabled="disabled" class="disabled"'),o&&i.clone().hour(0).minute(0).second(0).isAfter(o)&&(g=' disabled="disabled" class="disabled"'),i.hour()>=12?e+='<option value="AM"'+f+'>AM</option><option value="PM" selected="selected"'+g+">PM</option>":e+='<option value="AM" selected="selected"'+f+'>AM</option><option value="PM"'+g+">PM</option>",e+="</select>"}this.container.find(".drp-calendar."+t+" .calendar-time").html(e)}},updateFormInputs:function(){this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").prop("disabled",!1):this.container.find("button.applyBtn").prop("disabled",!0)},move:function(){var t,i={top:0,left:0},n=this.drops,o=e(window).width();switch(this.parentEl.is("body")||(i={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},o=this.parentEl[0].clientWidth+this.parentEl.offset().left),n){case"auto":(t=this.element.offset().top+this.element.outerHeight()-i.top)+this.container.outerHeight()>=this.parentEl[0].scrollHeight&&(t=this.element.offset().top-this.container.outerHeight()-i.top,n="up");break;case"up":t=this.element.offset().top-this.container.outerHeight()-i.top;break;default:t=this.element.offset().top+this.element.outerHeight()-i.top}this.container.css({top:0,left:0,right:"auto"});var r=this.container.outerWidth();if(this.container.toggleClass("drop-up","up"==n),"left"==this.opens){var s=o-this.element.offset().left-this.element.outerWidth();r+s>e(window).width()?this.container.css({top:t,right:"auto",left:9}):this.container.css({top:t,right:s,left:"auto"})}else if("center"==this.opens)(a=this.element.offset().left-i.left+this.element.outerWidth()/2-r/2)<0?this.container.css({top:t,right:"auto",left:9}):a+r>e(window).width()?this.container.css({top:t,left:"auto",right:0}):this.container.css({top:t,left:a,right:"auto"});else{var a;(a=this.element.offset().left-i.left)+r>e(window).width()?this.container.css({top:t,left:"auto",right:0}):this.container.css({top:t,left:a,right:"auto"})}},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy((function(t){this.outsideClick(t)}),this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy((function(t){this.move(t)}),this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate.clone(),this.endDate.clone(),this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var i=e(t.target);"focusin"==t.type||i.closest(this.element).length||i.closest(this.container).length||i.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var i=this.ranges[e];this.startDate=i[0],this.endDate=i[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){e(t.target).parents(".drp-calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),n=i.substr(1,1),o=i.substr(3,1),r=e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[n][o]:this.rightCalendar.calendar[n][o],s=this.leftCalendar,a=this.rightCalendar,l=this.startDate;this.endDate||this.container.find(".drp-calendar tbody td").each((function(t,i){if(!e(i).hasClass("week")){var n=e(i).attr("data-title"),o=n.substr(1,1),c=n.substr(3,1),d=e(i).parents(".drp-calendar").hasClass("left")?s.calendar[o][c]:a.calendar[o][c];d.isAfter(l)&&d.isBefore(r)||d.isSame(r,"day")?e(i).addClass("in-range"):e(i).removeClass("in-range")}}))}},clickDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),n=i.substr(1,1),o=i.substr(3,1),r=e(t.target).parents(".drp-calendar").hasClass("left")?this.leftCalendar.calendar[n][o]:this.rightCalendar.calendar[n][o];if(this.endDate||r.isBefore(this.startDate,"day")){if(this.timePicker){var s=parseInt(this.container.find(".left .hourselect").val(),10);this.timePicker24Hour||("PM"===(c=this.container.find(".left .ampmselect").val())&&s<12&&(s+=12),"AM"===c&&12===s&&(s=0));var a=parseInt(this.container.find(".left .minuteselect").val(),10);isNaN(a)&&(a=parseInt(this.container.find(".left .minuteselect option:last").val(),10));var l=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;r=r.clone().hour(s).minute(a).second(l)}this.endDate=null,this.setStartDate(r.clone())}else if(!this.endDate&&r.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{var c;if(this.timePicker)s=parseInt(this.container.find(".right .hourselect").val(),10),this.timePicker24Hour||("PM"===(c=this.container.find(".right .ampmselect").val())&&s<12&&(s+=12),"AM"===c&&12===s&&(s=0)),a=parseInt(this.container.find(".right .minuteselect").val(),10),isNaN(a)&&(a=parseInt(this.container.find(".right .minuteselect option:last").val(),10)),l=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,r=r.clone().hour(s).minute(a).second(l);this.setEndDate(r.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),!this.timePicker&&this.autoApply&&this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var i in this.ranges){if(this.timePicker){var n=this.timePickerSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm";if(this.startDate.format(n)==this.ranges[i][0].format(n)&&this.endDate.format(n)==this.ranges[i][1].format(n)){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").attr("data-range-key");break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[i][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[i][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").attr("data-range-key");break}e++}t&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").attr("data-range-key"):this.chosenLabel=null,this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var i=e(t.target).closest(".drp-calendar").hasClass("left"),n=i?"left":"right",o=this.container.find(".drp-calendar."+n),r=parseInt(o.find(".monthselect").val(),10),s=o.find(".yearselect").val();i||(s<this.startDate.year()||s==this.startDate.year()&&r<this.startDate.month())&&(r=this.startDate.month(),s=this.startDate.year()),this.minDate&&(s<this.minDate.year()||s==this.minDate.year()&&r<this.minDate.month())&&(r=this.minDate.month(),s=this.minDate.year()),this.maxDate&&(s>this.maxDate.year()||s==this.maxDate.year()&&r>this.maxDate.month())&&(r=this.maxDate.month(),s=this.maxDate.year()),i?(this.leftCalendar.month.month(r).year(s),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(r).year(s),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var i=e(t.target).closest(".drp-calendar"),n=i.hasClass("left"),o=parseInt(i.find(".hourselect").val(),10),r=parseInt(i.find(".minuteselect").val(),10);isNaN(r)&&(r=parseInt(i.find(".minuteselect option:last").val(),10));var s=this.timePickerSeconds?parseInt(i.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var a=i.find(".ampmselect").val();"PM"===a&&o<12&&(o+=12),"AM"===a&&12===o&&(o=0)}if(n){var l=this.startDate.clone();l.hour(o),l.minute(r),l.second(s),this.setStartDate(l),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==l.format("YYYY-MM-DD")&&this.endDate.isBefore(l)&&this.setEndDate(l.clone())}else if(this.endDate){var c=this.endDate.clone();c.hour(o),c.minute(r),c.second(s),this.setEndDate(c)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},elementChanged:function(){if(this.element.is("input")&&this.element.val().length){var e=this.element.val().split(this.locale.separator),i=null,n=null;2===e.length&&(i=t(e[0],this.locale.format),n=t(e[1],this.locale.format)),(this.singleDatePicker||null===i||null===n)&&(n=i=t(this.element.val(),this.locale.format)),i.isValid()&&n.isValid()&&(this.setStartDate(i),this.setEndDate(n),this.updateView())}},keydown:function(t){9!==t.keyCode&&13!==t.keyCode||this.hide(),27===t.keyCode&&(t.preventDefault(),t.stopPropagation(),this.hide())},updateElement:function(){if(this.element.is("input")&&this.autoUpdateInput){var t=this.startDate.format(this.locale.format);this.singleDatePicker||(t+=this.locale.separator+this.endDate.format(this.locale.format)),t!==this.element.val()&&this.element.val(t).trigger("change")}},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},e.fn.daterangepicker=function(t,n){var o=e.extend(!0,{},e.fn.daterangepicker.defaultOptions,t);return this.each((function(){var t=e(this);t.data("daterangepicker")&&t.data("daterangepicker").remove(),t.data("daterangepicker",new i(t,o,n))})),this},i})),function(t){var e=t.Promise,i=e&&"resolve"in e&&"reject"in e&&"all"in e&&"race"in e&&function(){var t;return new e((function(e){t=e})),"function"==typeof t}();"undefined"!=typeof exports&&exports?(exports.Promise=i?e:S,exports.Polyfill=S):"function"==typeof define&&define.amd?define((function(){return i?e:S})):i||(t.Promise=S);var n="pending",o="sealed",r="fulfilled",s="rejected",a=function(){};function l(t){return"[object Array]"===Object.prototype.toString.call(t)}var c,d="undefined"!=typeof setImmediate?setImmediate:setTimeout,h=[];function u(){for(var t=0;t<h.length;t++)h[t][0](h[t][1]);h=[],c=!1}function p(t,e){h.push([t,e]),c||(c=!0,d(u,0))}function f(t){var e=t.owner,i=e.state_,n=e.data_,o=t[i],a=t.then;if("function"==typeof o){i=r;try{n=o(n)}catch(t){y(a,t)}}g(a,n)||(i===r&&m(a,n),i===s&&y(a,n))}function g(t,e){var i;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"==typeof e)){var n=e.then;if("function"==typeof n)return n.call(e,(function(n){i||(i=!0,e!==n?m(t,n):v(t,n))}),(function(e){i||(i=!0,y(t,e))})),!0}}catch(e){return i||y(t,e),!0}return!1}function m(t,e){t!==e&&g(t,e)||v(t,e)}function v(t,e){t.state_===n&&(t.state_=o,t.data_=e,p(x,t))}function y(t,e){t.state_===n&&(t.state_=o,t.data_=e,p(w,t))}function b(t){var e=t.then_;t.then_=void 0;for(var i=0;i<e.length;i++)f(e[i])}function x(t){t.state_=r,b(t)}function w(t){t.state_=s,b(t)}function S(t){if("function"!=typeof t)throw new TypeError("Promise constructor takes a function argument");if(this instanceof S==0)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[],function(t,e){function i(t){y(e,t)}try{t((function(t){m(e,t)}),i)}catch(t){i(t)}}(t,this)}S.prototype={constructor:S,state_:n,then_:null,data_:void 0,then:function(t,e){var i={owner:this,then:new this.constructor(a),fulfilled:t,rejected:e};return this.state_===r||this.state_===s?p(f,i):this.then_.push(i),i.then},catch:function(t){return this.then(null,t)}},S.all=function(t){if(!l(t))throw new TypeError("You must pass an array to Promise.all().");return new this((function(e,i){var n=[],o=0;function r(t){return o++,function(i){n[t]=i,--o||e(n)}}for(var s,a=0;a<t.length;a++)(s=t[a])&&"function"==typeof s.then?s.then(r(a),i):n[a]=s;o||e(n)}))},S.race=function(t){if(!l(t))throw new TypeError("You must pass an array to Promise.race().");return new this((function(e,i){for(var n,o=0;o<t.length;o++)(n=t[o])&&"function"==typeof n.then?n.then(e,i):e(n)}))},S.resolve=function(t){return t&&"object"==typeof t&&t.constructor===this?t:new this((function(e){e(t)}))},S.reject=function(t){return new this((function(e,i){i(t)}))}}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,(function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function o(){return o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},o.apply(this,arguments)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function l(t,e,i){return l=a()?Reflect.construct:function(t,e,i){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return i&&s(o,i.prototype),o},l.apply(null,arguments)}function c(t,e,i){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(i):o.value}},c(t,e,i||t)}var d="SweetAlert2:",h=function(t){return Object.keys(t).map((function(e){return t[e]}))},u=function(t){return Array.prototype.slice.call(t)},p=function(t){console.warn("".concat(d," ").concat(t))},f=function(t){console.error("".concat(d," ").concat(t))},g=[],m=function(t){return"function"==typeof t?t():t},v=function(t){return t&&"function"==typeof t.toPromise},y=function(t){return v(t)?t.toPromise():Promise.resolve(t)},b=function(t){return t&&Promise.resolve(t)===t},x=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),w=function(e){return e instanceof Element||function(e){return"object"===t(e)&&e.jquery}(e)},S=function(t){var e={};for(var i in t)e[t[i]]="swal2-"+t[i];return e},C=S(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","toast-column","show","hide","close","title","header","content","html-container","actions","confirm","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),k=S(["success","warning","info","question","error"]),_=function(){return document.body.querySelector(".".concat(C.container))},T=function(t){var e=_();return e?e.querySelector(t):null},D=function(t){return T(".".concat(t))},E=function(){return D(C.popup)},A=function(){var t=E();return u(t.querySelectorAll(".".concat(C.icon)))},I=function(){var t=A().filter((function(t){return lt(t)}));return t.length?t[0]:null},P=function(){return D(C.title)},M=function(){return D(C.content)},L=function(){return D(C.image)},R=function(){return D(C["progress-steps"])},O=function(){return D(C["validation-message"])},F=function(){return T(".".concat(C.actions," .").concat(C.confirm))},N=function(){return T(".".concat(C.actions," .").concat(C.cancel))},H=function(){return D(C.actions)},z=function(){return D(C.header)},B=function(){return D(C.footer)},$=function(){return D(C["timer-progress-bar"])},j=function(){return D(C.close)},W=function(){var t=u(E().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((function(t,e){return(t=parseInt(t.getAttribute("tabindex")))>(e=parseInt(e.getAttribute("tabindex")))?1:t<e?-1:0})),e=u(E().querySelectorAll('\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n')).filter((function(t){return"-1"!==t.getAttribute("tabindex")}));return function(t){for(var e=[],i=0;i<t.length;i++)-1===e.indexOf(t[i])&&e.push(t[i]);return e}(t.concat(e)).filter((function(t){return lt(t)}))},Y=function(){return!X()&&!document.body.classList.contains(C["no-backdrop"])},X=function(){return document.body.classList.contains(C["toast-shown"])},V=function(){return E().hasAttribute("data-loading")},q={previousBodyPadding:null},U=function(t,e){if(t.textContent="",e){var i=(new DOMParser).parseFromString(e,"text/html");u(i.querySelector("head").childNodes).forEach((function(e){t.appendChild(e)})),u(i.querySelector("body").childNodes).forEach((function(e){t.appendChild(e)}))}},G=function(t,e){if(!e)return!1;for(var i=e.split(/\s+/),n=0;n<i.length;n++)if(!t.classList.contains(i[n]))return!1;return!0},Z=function(e,i,n){if(function(t,e){u(t.classList).forEach((function(i){-1===h(C).indexOf(i)&&-1===h(k).indexOf(i)&&-1===h(e.showClass).indexOf(i)&&t.classList.remove(i)}))}(e,i),i.customClass&&i.customClass[n]){if("string"!=typeof i.customClass[n]&&!i.customClass[n].forEach)return p("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(t(i.customClass[n]),'"'));et(e,i.customClass[n])}};function K(t,e){if(!e)return null;switch(e){case"select":case"textarea":case"file":return nt(t,C[e]);case"checkbox":return t.querySelector(".".concat(C.checkbox," input"));case"radio":return t.querySelector(".".concat(C.radio," input:checked"))||t.querySelector(".".concat(C.radio," input:first-child"));case"range":return t.querySelector(".".concat(C.range," input"));default:return nt(t,C.input)}}var Q,J=function(t){if(t.focus(),"file"!==t.type){var e=t.value;t.value="",t.value=e}},tt=function(t,e,i){t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach((function(e){t.forEach?t.forEach((function(t){i?t.classList.add(e):t.classList.remove(e)})):i?t.classList.add(e):t.classList.remove(e)})))},et=function(t,e){tt(t,e,!0)},it=function(t,e){tt(t,e,!1)},nt=function(t,e){for(var i=0;i<t.childNodes.length;i++)if(G(t.childNodes[i],e))return t.childNodes[i]},ot=function(t,e,i){i||0===parseInt(i)?t.style[e]="number"==typeof i?"".concat(i,"px"):i:t.style.removeProperty(e)},rt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";t.style.opacity="",t.style.display=e},st=function(t){t.style.opacity="",t.style.display="none"},at=function(t,e,i){e?rt(t,i):st(t)},lt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},ct=function(t){return!!(t.scrollHeight>t.clientHeight)},dt=function(t){var e=window.getComputedStyle(t),i=parseFloat(e.getPropertyValue("animation-duration")||"0"),n=parseFloat(e.getPropertyValue("transition-duration")||"0");return i>0||n>0},ht=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=$();lt(i)&&(e&&(i.style.transition="none",i.style.width="100%"),setTimeout((function(){i.style.transition="width ".concat(t/1e3,"s linear"),i.style.width="0%"}),10))},ut=function(){return"undefined"==typeof window||"undefined"==typeof document},pt='\n <div aria-labelledby="'.concat(C.title,'" aria-describedby="').concat(C.content,'" class="').concat(C.popup,'" tabindex="-1">\n   <div class="').concat(C.header,'">\n     <ul class="').concat(C["progress-steps"],'"></ul>\n     <div class="').concat(C.icon," ").concat(k.error,'"></div>\n     <div class="').concat(C.icon," ").concat(k.question,'"></div>\n     <div class="').concat(C.icon," ").concat(k.warning,'"></div>\n     <div class="').concat(C.icon," ").concat(k.info,'"></div>\n     <div class="').concat(C.icon," ").concat(k.success,'"></div>\n     <img class="').concat(C.image,'" />\n     <h2 class="').concat(C.title,'" id="').concat(C.title,'"></h2>\n     <button type="button" class="').concat(C.close,'"></button>\n   </div>\n   <div class="').concat(C.content,'">\n     <div id="').concat(C.content,'" class="').concat(C["html-container"],'"></div>\n     <input class="').concat(C.input,'" />\n     <input type="file" class="').concat(C.file,'" />\n     <div class="').concat(C.range,'">\n       <input type="range" />\n       <output></output>\n     </div>\n     <select class="').concat(C.select,'"></select>\n     <div class="').concat(C.radio,'"></div>\n     <label for="').concat(C.checkbox,'" class="').concat(C.checkbox,'">\n       <input type="checkbox" />\n       <span class="').concat(C.label,'"></span>\n     </label>\n     <textarea class="').concat(C.textarea,'"></textarea>\n     <div class="').concat(C["validation-message"],'" id="').concat(C["validation-message"],'"></div>\n   </div>\n   <div class="').concat(C.actions,'">\n     <button type="button" class="').concat(C.confirm,'">OK</button>\n     <button type="button" class="').concat(C.cancel,'">Cancel</button>\n   </div>\n   <div class="').concat(C.footer,'"></div>\n   <div class="').concat(C["timer-progress-bar-container"],'">\n     <div class="').concat(C["timer-progress-bar"],'"></div>\n   </div>\n </div>\n').replace(/(^|\n)\s*/g,""),ft=function(t){Me.isVisible()&&Q!==t.target.value&&Me.resetValidationMessage(),Q=t.target.value},gt=function(e,i){e instanceof HTMLElement?i.appendChild(e):"object"===t(e)?mt(e,i):e&&U(i,e)},mt=function(t,e){t.jquery?vt(e,t):U(e,t.toString())},vt=function(t,e){if(t.textContent="",0 in e)for(var i=0;i in e;i++)t.appendChild(e[i].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},yt=function(){if(ut())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&void 0!==t.style[i])return e[i];return!1}();function bt(t,e,i){var n;at(t,i["show".concat((n=e,n.charAt(0).toUpperCase()+n.slice(1)),"Button")],"inline-block"),U(t,i["".concat(e,"ButtonText")]),t.setAttribute("aria-label",i["".concat(e,"ButtonAriaLabel")]),t.className=C[e],Z(t,i,"".concat(e,"Button")),et(t,i["".concat(e,"ButtonClass")])}var xt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},wt=["input","file","range","select","radio","checkbox","textarea"],St=function(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)},Ct=function(t){var e=C[t]?C[t]:C.input;return nt(M(),e)},kt={};kt.text=kt.email=kt.password=kt.number=kt.tel=kt.url=function(e,i){return"string"==typeof i.inputValue||"number"==typeof i.inputValue?e.value=i.inputValue:b(i.inputValue)||p('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(t(i.inputValue),'"')),St(e,i),e.type=i.input,e},kt.file=function(t,e){return St(t,e),t},kt.range=function(t,e){var i=t.querySelector("input"),n=t.querySelector("output");return i.value=e.inputValue,i.type=e.input,n.value=e.inputValue,t},kt.select=function(t,e){if(t.textContent="",e.inputPlaceholder){var i=document.createElement("option");U(i,e.inputPlaceholder),i.value="",i.disabled=!0,i.selected=!0,t.appendChild(i)}return t},kt.radio=function(t){return t.textContent="",t},kt.checkbox=function(t,e){var i=K(M(),"checkbox");i.value=1,i.id=C.checkbox,i.checked=Boolean(e.inputValue);var n=t.querySelector("span");return U(n,e.inputPlaceholder),t},kt.textarea=function(t,e){if(t.value=e.inputValue,St(t,e),"MutationObserver"in window){var i=parseInt(window.getComputedStyle(E()).width),n=parseInt(window.getComputedStyle(E()).paddingLeft)+parseInt(window.getComputedStyle(E()).paddingRight);new MutationObserver((function(){var e=t.offsetWidth+n;E().style.width=e>i?"".concat(e,"px"):null})).observe(t,{attributes:!0,attributeFilter:["style"]})}return t};var _t=function(t,e){var i=M().querySelector("#".concat(C.content));e.html?(gt(e.html,i),rt(i,"block")):e.text?(i.textContent=e.text,rt(i,"block")):st(i),function(t,e){var i=M(),n=xt.innerParams.get(t),o=!n||e.input!==n.input;wt.forEach((function(t){var n=C[t],r=nt(i,n);(function(t,e){var i=K(M(),t);if(i)for(var n in function(t){for(var e=0;e<t.attributes.length;e++){var i=t.attributes[e].name;-1===["type","value","style"].indexOf(i)&&t.removeAttribute(i)}}(i),e)"range"===t&&"placeholder"===n||i.setAttribute(n,e[n])})(t,e.inputAttributes),r.className=n,o&&st(r)})),e.input&&(o&&function(t){if(!kt[t.input])return f('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=Ct(t.input),i=kt[t.input](e,t);rt(i),setTimeout((function(){J(i)}))}(e),function(t){var e=Ct(t.input);t.customClass&&et(e,t.customClass.input)}(e))}(t,e),Z(M(),e,"content")},Tt=function(t){return'<div class="'.concat(C["icon-content"],'">').concat(t,"</div>")},Dt=[],Et=function(){return _()&&_().getAttribute("data-queue-step")},At=function(t,e){var i=z();Z(i,e,"header"),function(t,e){var i=R();if(!e.progressSteps||0===e.progressSteps.length)return st(i);rt(i),i.textContent="";var n=parseInt(void 0===e.currentProgressStep?Et():e.currentProgressStep);n>=e.progressSteps.length&&p("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((function(t,o){var r=function(t){var e=document.createElement("li");return et(e,C["progress-step"]),U(e,t),e}(t);if(i.appendChild(r),o===n&&et(r,C["active-progress-step"]),o!==e.progressSteps.length-1){var s=function(t){var e=document.createElement("li");return et(e,C["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e}(e);i.appendChild(s)}}))}(0,e),function(t,e){var i=xt.innerParams.get(t);if(i&&e.icon===i.icon&&I())Z(I(),e,"icon");else if(function(){for(var t=A(),e=0;e<t.length;e++)st(t[e])}(),e.icon)if(-1!==Object.keys(k).indexOf(e.icon)){var n=T(".".concat(C.icon,".").concat(k[e.icon]));rt(n),function(t,e){t.textContent="",e.iconHtml?U(t,Tt(e.iconHtml)):"success"===e.icon?U(t,'\n      <div class="swal2-success-circular-line-left"></div>\n      <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n      <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n      <div class="swal2-success-circular-line-right"></div>\n    '):"error"===e.icon?U(t,'\n      <span class="swal2-x-mark">\n        <span class="swal2-x-mark-line-left"></span>\n        <span class="swal2-x-mark-line-right"></span>\n      </span>\n    '):U(t,Tt({question:"?",warning:"!",info:"i"}[e.icon]))}(n,e),function(){for(var t=E(),e=window.getComputedStyle(t).getPropertyValue("background-color"),i=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),n=0;n<i.length;n++)i[n].style.backgroundColor=e}(),Z(n,e,"icon"),et(n,e.showClass.icon)}else f('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"'))}(t,e),function(t,e){var i=L();if(!e.imageUrl)return st(i);rt(i,""),i.setAttribute("src",e.imageUrl),i.setAttribute("alt",e.imageAlt),ot(i,"width",e.imageWidth),ot(i,"height",e.imageHeight),i.className=C.image,Z(i,e,"image")}(0,e),function(t,e){var i=P();at(i,e.title||e.titleText),e.title&&gt(e.title,i),e.titleText&&(i.innerText=e.titleText),Z(i,e,"title")}(0,e),function(t,e){var i=j();U(i,e.closeButtonHtml),Z(i,e,"closeButton"),at(i,e.showCloseButton),i.setAttribute("aria-label",e.closeButtonAriaLabel)}(0,e)},It=function(t,e){!function(t,e){var i=E();ot(i,"width",e.width),ot(i,"padding",e.padding),e.background&&(i.style.background=e.background),function(t,e){t.className="".concat(C.popup," ").concat(lt(t)?e.showClass.popup:""),e.toast?(et([document.documentElement,document.body],C["toast-shown"]),et(t,C.toast)):et(t,C.modal),Z(t,e,"popup"),"string"==typeof e.customClass&&et(t,e.customClass),e.icon&&et(t,C["icon-".concat(e.icon)])}(i,e)}(0,e),function(t,e){var i=_();if(i){!function(t,e){"string"==typeof e?t.style.background=e:e||et([document.documentElement,document.body],C["no-backdrop"])}(i,e.backdrop),!e.backdrop&&e.allowOutsideClick&&p('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),function(t,e){e in C?et(t,C[e]):(p('The "position" parameter is not valid, defaulting to "center"'),et(t,C.center))}(i,e.position),function(t,e){if(e&&"string"==typeof e){var i="grow-".concat(e);i in C&&et(t,C[i])}}(i,e.grow),Z(i,e,"container");var n=document.body.getAttribute("data-swal2-queue-step");n&&(i.setAttribute("data-queue-step",n),document.body.removeAttribute("data-swal2-queue-step"))}}(0,e),At(t,e),_t(t,e),function(t,e){var i=H(),n=F(),o=N();e.showConfirmButton||e.showCancelButton||st(i),Z(i,e,"actions"),bt(n,"confirm",e),bt(o,"cancel",e),e.buttonsStyling?function(t,e,i){if(et([t,e],C.styled),i.confirmButtonColor&&(t.style.backgroundColor=i.confirmButtonColor),i.cancelButtonColor&&(e.style.backgroundColor=i.cancelButtonColor),!V()){var n=window.getComputedStyle(t).getPropertyValue("background-color");t.style.borderLeftColor=n,t.style.borderRightColor=n}}(n,o,e):(it([n,o],C.styled),n.style.backgroundColor=n.style.borderLeftColor=n.style.borderRightColor="",o.style.backgroundColor=o.style.borderLeftColor=o.style.borderRightColor=""),e.reverseButtons&&n.parentNode.insertBefore(o,n)}(0,e),function(t,e){var i=B();at(i,e.footer),e.footer&&gt(e.footer,i),Z(i,e,"footer")}(0,e),"function"==typeof e.onRender&&e.onRender(E())},Pt=function(){return F()&&F().click()},Mt=function(){var t=E();t||Me.fire(),t=E();var e=H(),i=F();rt(e),rt(i,"inline-block"),et([t,e],C.loading),i.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Lt={},Rt=function(){if(Lt.timeout)return function(){var t=$(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var i=parseInt(window.getComputedStyle(t).width),n=parseInt(e/i*100);t.style.removeProperty("transition"),t.style.width="".concat(n,"%")}(),Lt.timeout.stop()},Ot=function(){if(Lt.timeout){var t=Lt.timeout.start();return ht(t),t}},Ft={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,onDestroy:void 0,scrollbarPadding:!0},Nt=["allowEscapeKey","allowOutsideClick","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","footer","hideClass","html","icon","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","text","title","titleText"],Ht={animation:'showClass" and "hideClass'},zt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],Bt=function(t){return Object.prototype.hasOwnProperty.call(Ft,t)},$t=function(t){return Ht[t]},jt=function(t){Bt(t)||p('Unknown parameter "'.concat(t,'"'))},Wt=function(t){-1!==zt.indexOf(t)&&p('The parameter "'.concat(t,'" is incompatible with toasts'))},Yt=function(t){$t(t)&&function(t,e){var i;i='"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'),-1===g.indexOf(i)&&(g.push(i),p(i))}(t,$t(t))},Xt=Object.freeze({isValidParameter:Bt,isUpdatableParameter:function(t){return-1!==Nt.indexOf(t)},isDeprecatedParameter:$t,argsToParams:function(e){var i={};return"object"!==t(e[0])||w(e[0])?["title","html","icon"].forEach((function(n,o){var r=e[o];"string"==typeof r||w(r)?i[n]=r:void 0!==r&&f("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(t(r)))})):o(i,e[0]),i},isVisible:function(){return lt(E())},clickConfirm:Pt,clickCancel:function(){return N()&&N().click()},getContainer:_,getPopup:E,getTitle:P,getContent:M,getHtmlContainer:function(){return D(C["html-container"])},getImage:L,getIcon:I,getIcons:A,getCloseButton:j,getActions:H,getConfirmButton:F,getCancelButton:N,getHeader:z,getFooter:B,getTimerProgressBar:$,getFocusableElements:W,getValidationMessage:O,isLoading:V,fire:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return l(this,e)},mixin:function(t){var i=function(i){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(u,i);var l,d,h=(l=u,d=a(),function(){var t,e=r(l);if(d){var i=r(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function u(){return e(this,u),h.apply(this,arguments)}return n(u,[{key:"_main",value:function(e){return c(r(u.prototype),"_main",this).call(this,o({},t,e))}}]),u}(this);return i},queue:function(t){var e=this;Dt=t;var i=function(t,e){Dt=[],t(e)},n=[];return new Promise((function(t){!function o(r,s){r<Dt.length?(document.body.setAttribute("data-swal2-queue-step",r),e.fire(Dt[r]).then((function(e){void 0!==e.value?(n.push(e.value),o(r+1,s)):i(t,{dismiss:e.dismiss})}))):i(t,{value:n})}(0)}))},getQueueStep:Et,insertQueueStep:function(t,e){return e&&e<Dt.length?Dt.splice(e,0,t):Dt.push(t)},deleteQueueStep:function(t){void 0!==Dt[t]&&Dt.splice(t,1)},showLoading:Mt,enableLoading:Mt,getTimerLeft:function(){return Lt.timeout&&Lt.timeout.getTimerLeft()},stopTimer:Rt,resumeTimer:Ot,toggleTimer:function(){var t=Lt.timeout;return t&&(t.running?Rt():Ot())},increaseTimer:function(t){if(Lt.timeout){var e=Lt.timeout.increase(t);return ht(e,!0),e}},isTimerRunning:function(){return Lt.timeout&&Lt.timeout.isRunning()}});function Vt(){var t=xt.innerParams.get(this);if(t){var e=xt.domCache.get(this);t.showConfirmButton||(st(e.confirmButton),t.showCancelButton||st(e.actions)),it([e.popup,e.actions],C.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.cancelButton.disabled=!1}}var qt=function(t){var e=_();return t===e||!(ct(e)||"INPUT"===t.tagName||ct(M())&&M().contains(t))},Ut=function(){return!!window.MSInputMethodContext&&!!document.documentMode},Gt=function(){var t=_(),e=E();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")},Zt={swalPromiseResolve:new WeakMap};function Kt(t,e,i,n){i?ee(t,n):(new Promise((function(t){var e=window.scrollX,i=window.scrollY;Lt.restoreFocusTimeout=setTimeout((function(){Lt.previousActiveElement&&Lt.previousActiveElement.focus?(Lt.previousActiveElement.focus(),Lt.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),void 0!==e&&void 0!==i&&window.scrollTo(e,i)})).then((function(){return ee(t,n)})),Lt.keydownTarget.removeEventListener("keydown",Lt.keydownHandler,{capture:Lt.keydownListenerCapture}),Lt.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),Y()&&(null!==q.previousBodyPadding&&(document.body.style.paddingRight="".concat(q.previousBodyPadding,"px"),q.previousBodyPadding=null),function(){if(G(document.body,C.iosfix)){var t=parseInt(document.body.style.top,10);it(document.body,C.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}(),"undefined"!=typeof window&&Ut()&&window.removeEventListener("resize",Gt),u(document.body.children).forEach((function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")}))),it([document.documentElement,document.body],[C.shown,C["height-auto"],C["no-backdrop"],C["toast-shown"],C["toast-column"]])}function Qt(t){var e=E();if(e){var i=xt.innerParams.get(this);if(i&&!G(e,i.hideClass.popup)){var n=Zt.swalPromiseResolve.get(this);it(e,i.showClass.popup),et(e,i.hideClass.popup);var o=_();it(o,i.showClass.backdrop),et(o,i.hideClass.backdrop),Jt(this,e,i),void 0!==t?(t.isDismissed=void 0!==t.dismiss,t.isConfirmed=void 0===t.dismiss):t={isDismissed:!0,isConfirmed:!1},n(t||{})}}}var Jt=function(t,e,i){var n=_(),o=yt&&dt(e),r=i.onClose,s=i.onAfterClose;null!==r&&"function"==typeof r&&r(e),o?te(t,e,n,s):Kt(t,n,X(),s)},te=function(t,e,i,n){Lt.swalCloseEventFinishedCallback=Kt.bind(null,t,i,X(),n),e.addEventListener(yt,(function(t){t.target===e&&(Lt.swalCloseEventFinishedCallback(),delete Lt.swalCloseEventFinishedCallback)}))},ee=function(t,e){setTimeout((function(){"function"==typeof e&&e(),t._destroy()}))};function ie(t,e,i){var n=xt.domCache.get(t);e.forEach((function(t){n[t].disabled=i}))}function ne(t,e){if(!t)return!1;if("radio"===t.type)for(var i=t.parentNode.parentNode.querySelectorAll("input"),n=0;n<i.length;n++)i[n].disabled=e;else t.disabled=e}var oe=function(){function t(i,n){e(this,t),this.callback=i,this.remaining=n,this.running=!1,this.start()}return n(t,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}},{key:"increase",value:function(t){var e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),t}(),re={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}};function se(t){!function(t){t.inputValidator||Object.keys(re).forEach((function(e){t.input===e&&(t.inputValidator=re[e])}))}(t),t.showLoaderOnConfirm&&!t.preConfirm&&p("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),t.animation=m(t.animation),function(t){(!t.target||"string"==typeof t.target&&!document.querySelector(t.target)||"string"!=typeof t.target&&!t.target.appendChild)&&(p('Target parameter is not valid, defaulting to "body"'),t.target="body")}(t),"string"==typeof t.title&&(t.title=t.title.split("\n").join("<br />")),function(t){var e,i=!!(e=_())&&(e.parentNode.removeChild(e),it([document.documentElement,document.body],[C["no-backdrop"],C["toast-shown"],C["has-column"]]),!0);if(ut())f("SweetAlert2 requires document to initialize");else{var n=document.createElement("div");n.className=C.container,i&&et(n,C["no-transition"]),U(n,pt);var o,r,s,a,l,c,d,h,u,p="string"==typeof(o=t.target)?document.querySelector(o):o;p.appendChild(n),function(t){var e=E();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&et(_(),C.rtl)}(p),r=M(),s=nt(r,C.input),a=nt(r,C.file),l=r.querySelector(".".concat(C.range," input")),c=r.querySelector(".".concat(C.range," output")),d=nt(r,C.select),h=r.querySelector(".".concat(C.checkbox," input")),u=nt(r,C.textarea),s.oninput=ft,a.onchange=ft,d.onchange=ft,h.onchange=ft,u.oninput=ft,l.oninput=function(t){ft(t),c.value=l.value},l.onchange=function(t){ft(t),l.nextSibling.value=l.value}}}(t)}function ae(t){var e=E();if(t.target===e){var i=_();e.removeEventListener(yt,ae),i.style.overflowY="auto"}}var le,ce=function(t,e){yt&&dt(e)?(t.style.overflowY="hidden",e.addEventListener(yt,ae)):t.style.overflowY="auto"},de=function(t,e,i){!function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!G(document.body,C.iosfix)){var t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),et(document.body,C.iosfix),function(){var t,e=_();e.ontouchstart=function(e){t=qt(e.target)},e.ontouchmove=function(e){t&&(e.preventDefault(),e.stopPropagation())}}(),navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||E().scrollHeight>window.innerHeight-44&&(_().style.paddingBottom="".concat(44,"px"))}}(),"undefined"!=typeof window&&Ut()&&(Gt(),window.addEventListener("resize",Gt)),e&&"hidden"!==i&&(null===q.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(q.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(q.previousBodyPadding+function(){var t=document.createElement("div");t.className=C["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))),setTimeout((function(){t.scrollTop=0}))},he=function(t,e,i){et(t,i.showClass.backdrop),rt(e),et(e,i.showClass.popup),et([document.documentElement,document.body],C.shown),i.heightAuto&&i.backdrop&&!i.toast&&et([document.documentElement,document.body],C["height-auto"])},ue=function(e,i){var n=M(),o=function(t){return pe[i.input](n,fe(t),i)};v(i.inputOptions)||b(i.inputOptions)?(Mt(),y(i.inputOptions).then((function(t){e.hideLoading(),o(t)}))):"object"===t(i.inputOptions)?o(i.inputOptions):f("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(t(i.inputOptions)))},pe={select:function(t,e,i){var n=nt(t,C.select),o=function(t,e,n){var o=document.createElement("option");o.value=n,U(o,e),i.inputValue.toString()===n.toString()&&(o.selected=!0),t.appendChild(o)};e.forEach((function(t){var e=t[0],i=t[1];if(Array.isArray(i)){var r=document.createElement("optgroup");r.label=e,r.disabled=!1,n.appendChild(r),i.forEach((function(t){return o(r,t[1],t[0])}))}else o(n,i,e)})),n.focus()},radio:function(t,e,i){var n=nt(t,C.radio);e.forEach((function(t){var e=t[0],o=t[1],r=document.createElement("input"),s=document.createElement("label");r.type="radio",r.name=C.radio,r.value=e,i.inputValue.toString()===e.toString()&&(r.checked=!0);var a=document.createElement("span");U(a,o),a.className=C.label,s.appendChild(r),s.appendChild(a),n.appendChild(s)}));var o=n.querySelectorAll("input");o.length&&o[0].focus()}},fe=function e(i){var n=[];return"undefined"!=typeof Map&&i instanceof Map?i.forEach((function(i,o){var r=i;"object"===t(r)&&(r=e(r)),n.push([o,r])})):Object.keys(i).forEach((function(o){var r=i[o];"object"===t(r)&&(r=e(r)),n.push([o,r])})),n},ge=function(t,e){t.closePopup({value:e})},me=function(t,e,i){e.showLoaderOnConfirm&&Mt(),e.preConfirm?(t.resetValidationMessage(),Promise.resolve().then((function(){return y(e.preConfirm(i,e.validationMessage))})).then((function(e){lt(O())||!1===e?t.hideLoading():ge(t,void 0===e?i:e)}))):ge(t,i)},ve=function(t,e,i){for(var n=W(),o=0;o<n.length;o++)return(e+=i)===n.length?e=0:-1===e&&(e=n.length-1),n[e].focus();E().focus()},ye=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"],be=["Escape","Esc"],xe=function(t,e,i){if(!e.isComposing&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(i.input))return;Pt(),e.preventDefault()}},we=function(t,e){for(var i=t.target,n=W(),o=-1,r=0;r<n.length;r++)if(i===n[r]){o=r;break}t.shiftKey?ve(0,o,-1):ve(0,o,1),t.stopPropagation(),t.preventDefault()},Se=function(){var t=F(),e=N();document.activeElement===t&&lt(e)?e.focus():document.activeElement===e&&lt(t)&&t.focus()},Ce=function(t,e,i){m(e.allowEscapeKey)&&(t.preventDefault(),i(x.esc))},ke=!1,_e=function(t,e,i){return new Promise((function(n){var o=function(e){t.closePopup({dismiss:e})};Zt.swalPromiseResolve.set(t,n),e.confirmButton.onclick=function(){return function(t,e){t.disableButtons(),e.input?function(t,e){var i=function(t,e){var i=t.getInput();if(!i)return null;switch(e.input){case"checkbox":return function(t){return t.checked?1:0}(i);case"radio":return function(t){return t.checked?t.value:null}(i);case"file":return function(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null}(i);default:return e.inputAutoTrim?i.value.trim():i.value}}(t,e);e.inputValidator?(t.disableInput(),Promise.resolve().then((function(){return y(e.inputValidator(i,e.validationMessage))})).then((function(n){t.enableButtons(),t.enableInput(),n?t.showValidationMessage(n):me(t,e,i)}))):t.getInput().checkValidity()?me(t,e,i):(t.enableButtons(),t.showValidationMessage(e.validationMessage))}(t,e):me(t,e,!0)}(t,i)},e.cancelButton.onclick=function(){return function(t,e){t.disableButtons(),e(x.cancel)}(t,o)},e.closeButton.onclick=function(){return o(x.close)},function(t,e,i){xt.innerParams.get(t).toast?function(t,e,i){e.popup.onclick=function(){var e=xt.innerParams.get(t);e.showConfirmButton||e.showCancelButton||e.showCloseButton||e.input||i(x.close)}}(t,e,i):(function(t){t.popup.onmousedown=function(){t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(ke=!0)}}}(e),function(t){t.container.onmousedown=function(){t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(ke=!0)}}}(e),function(t,e,i){e.container.onclick=function(n){var o=xt.innerParams.get(t);ke?ke=!1:n.target===e.container&&m(o.allowOutsideClick)&&i(x.backdrop)}}(t,e,i))}(t,e,o),function(t,e,i,n){e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1),i.toast||(e.keydownHandler=function(e){return function(t,e,i){var n=xt.innerParams.get(t);n.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?xe(t,e,n):"Tab"===e.key?we(e,n):-1!==ye.indexOf(e.key)?Se():-1!==be.indexOf(e.key)&&Ce(e,n,i)}(t,e,n)},e.keydownTarget=i.keydownListenerCapture?window:E(),e.keydownListenerCapture=i.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)}(t,Lt,i,o),i.toast&&(i.input||i.footer||i.showCloseButton)?et(document.body,C["toast-column"]):it(document.body,C["toast-column"]),function(t,e){"select"===e.input||"radio"===e.input?ue(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&(v(e.inputValue)||b(e.inputValue))&&function(t,e){var i=t.getInput();st(i),y(e.inputValue).then((function(n){i.value="number"===e.input?parseFloat(n)||0:"".concat(n),rt(i),i.focus(),t.hideLoading()})).catch((function(e){f("Error in inputValue promise: ".concat(e)),i.value="",rt(i),i.focus(),t.hideLoading()}))}(t,e)}(t,i),function(t){var e=_(),i=E();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(i);var n=window.getComputedStyle(document.body).overflowY;he(e,i,t),ce(e,i),Y()&&(de(e,t.scrollbarPadding,n),u(document.body.children).forEach((function(t){t===_()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,_())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}))),X()||Lt.previousActiveElement||(Lt.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout((function(){return t.onOpen(i)})),it(e,C["no-transition"])}(i),Te(Lt,i,o),De(e,i),setTimeout((function(){e.container.scrollTop=0}))}))},Te=function(t,e,i){var n=$();st(n),e.timer&&(t.timeout=new oe((function(){i("timer"),delete t.timeout}),e.timer),e.timerProgressBar&&(rt(n),setTimeout((function(){t.timeout.running&&ht(e.timer)}))))},De=function(t,e){if(!e.toast)return m(e.allowEnterKey)?e.focusCancel&&lt(t.cancelButton)?t.cancelButton.focus():e.focusConfirm&&lt(t.confirmButton)?t.confirmButton.focus():void ve(0,-1,1):Ee()},Ee=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()},Ae=function(t){for(var e in t)t[e]=new WeakMap},Ie=Object.freeze({hideLoading:Vt,disableLoading:Vt,getInput:function(t){var e=xt.innerParams.get(t||this),i=xt.domCache.get(t||this);return i?K(i.content,e.input):null},close:Qt,closePopup:Qt,closeModal:Qt,closeToast:Qt,enableButtons:function(){ie(this,["confirmButton","cancelButton"],!1)},disableButtons:function(){ie(this,["confirmButton","cancelButton"],!0)},enableInput:function(){return ne(this.getInput(),!1)},disableInput:function(){return ne(this.getInput(),!0)},showValidationMessage:function(t){var e=xt.domCache.get(this);U(e.validationMessage,t);var i=window.getComputedStyle(e.popup);e.validationMessage.style.marginLeft="-".concat(i.getPropertyValue("padding-left")),e.validationMessage.style.marginRight="-".concat(i.getPropertyValue("padding-right")),rt(e.validationMessage);var n=this.getInput();n&&(n.setAttribute("aria-invalid",!0),n.setAttribute("aria-describedBy",C["validation-message"]),J(n),et(n,C.inputerror))},resetValidationMessage:function(){var t=xt.domCache.get(this);t.validationMessage&&st(t.validationMessage);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),it(e,C.inputerror))},getProgressSteps:function(){return xt.domCache.get(this).progressSteps},_main:function(t){!function(t){for(var e in t)jt(e),t.toast&&Wt(e),Yt(e)}(t),Lt.currentInstance&&Lt.currentInstance._destroy(),Lt.currentInstance=this;var e=function(t){var e=o({},Ft.showClass,t.showClass),i=o({},Ft.hideClass,t.hideClass),n=o({},Ft,t);return n.showClass=e,n.hideClass=i,!1===t.animation&&(n.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},n.hideClass={}),n}(t);se(e),Object.freeze(e),Lt.timeout&&(Lt.timeout.stop(),delete Lt.timeout),clearTimeout(Lt.restoreFocusTimeout);var i=function(t){var e={popup:E(),container:_(),content:M(),actions:H(),confirmButton:F(),cancelButton:N(),closeButton:j(),validationMessage:O(),progressSteps:R()};return xt.domCache.set(t,e),e}(this);return It(this,e),xt.innerParams.set(this,e),_e(this,i,e)},update:function(t){var e=E(),i=xt.innerParams.get(this);if(!e||G(e,i.hideClass.popup))return p("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var n={};Object.keys(t).forEach((function(e){Me.isUpdatableParameter(e)?n[e]=t[e]:p('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js'))}));var r=o({},i,n);It(this,r),xt.innerParams.set(this,r),Object.defineProperties(this,{params:{value:o({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var t=xt.domCache.get(this),e=xt.innerParams.get(this);e&&(t.popup&&Lt.swalCloseEventFinishedCallback&&(Lt.swalCloseEventFinishedCallback(),delete Lt.swalCloseEventFinishedCallback),Lt.deferDisposalTimer&&(clearTimeout(Lt.deferDisposalTimer),delete Lt.deferDisposalTimer),"function"==typeof e.onDestroy&&e.onDestroy(),function(t){delete t.params,delete Lt.keydownHandler,delete Lt.keydownTarget,Ae(xt),Ae(Zt)}(this))}}),Pe=function(){function t(){if(e(this,t),"undefined"!=typeof window){"undefined"==typeof Promise&&f("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),le=this;for(var i=arguments.length,n=new Array(i),o=0;o<i;o++)n[o]=arguments[o];var r=Object.freeze(this.constructor.argsToParams(n));Object.defineProperties(this,{params:{value:r,writable:!1,enumerable:!0,configurable:!0}});var s=this._main(this.params);xt.promise.set(this,s)}}return n(t,[{key:"then",value:function(t){return xt.promise.get(this).then(t)}},{key:"finally",value:function(t){return xt.promise.get(this).finally(t)}}]),t}();o(Pe.prototype,Ie),o(Pe,Xt),Object.keys(Ie).forEach((function(t){Pe[t]=function(){var e;if(le)return(e=le)[t].apply(e,arguments)}})),Pe.DismissReason=x,Pe.version="9.17.2";var Me=Pe;return Me.default=Me,Me})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),function(t){"use strict";Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;return function(){return e.apply(t)}});var e=0;function i(t,e){return new i.prototype.init(t,e)}t.fn.redactor=function(e){var n=[],o=Array.prototype.slice.call(arguments,1);return"string"==typeof e?this.each((function(){var i,r=t.data(this,"redactor");if("-1"!=e.search(/\./)?void 0!==r[(i=e.split("."))[0]]&&(i=r[i[0]][i[1]]):i=r[e],void 0!==r&&t.isFunction(i)){var s=i.apply(r,o);void 0!==s&&s!==r&&n.push(s)}else t.error('No such method "'+e+'" for Redactor')})):this.each((function(){t.data(this,"redactor",{}),t.data(this,"redactor",i(this,e))})),0===n.length?this:1===n.length?n[0]:n},t.Redactor=i,t.Redactor.VERSION="10.2.5",t.Redactor.modules=["alignment","autosave","block","buffer","build","button","caret","clean","code","core","dropdown","file","focus","image","indent","inline","insert","keydown","keyup","lang","line","link","linkify","list","modal","observe","paragraphize","paste","placeholder","progress","selection","shortcuts","tabifier","tidy","toolbar","upload","utils"],t.Redactor.opts={lang:"en",direction:"ltr",plugins:!1,focus:!1,focusEnd:!1,placeholder:!1,visual:!0,tabindex:!1,minHeight:!1,maxHeight:!1,linebreaks:!1,replaceDivs:!0,paragraphize:!0,cleanStyleOnEnter:!1,enterKey:!0,cleanOnPaste:!0,cleanSpaces:!0,pastePlainText:!1,autosave:!1,autosaveName:!1,autosaveInterval:60,autosaveOnChange:!1,autosaveFields:!1,linkTooltip:!0,linkProtocol:"http",linkNofollow:!1,linkSize:50,imageEditable:!0,imageLink:!0,imagePosition:!0,imageFloatMargin:"10px",imageResizable:!0,imageUpload:null,imageUploadParam:"file",uploadImageField:!1,dragImageUpload:!0,fileUpload:null,fileUploadParam:"file",dragFileUpload:!0,s3:!1,convertLinks:!0,convertUrlLinks:!0,convertImageLinks:!0,convertVideoLinks:!0,preSpaces:4,tabAsSpaces:!1,tabKey:!0,scrollTarget:!1,toolbar:!0,toolbarFixed:!0,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarExternal:!1,toolbarOverflow:!1,source:!0,buttons:["html","formatting","bold","italic","deleted","unorderedlist","orderedlist","outdent","indent","image","file","link","alignment","horizontalrule"],buttonsHide:[],buttonsHideOnMobile:[],formatting:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],formattingAdd:!1,tabifier:!0,deniedTags:["script","style"],allowedTags:!1,paragraphizeBlocks:["table","div","pre","form","ul","ol","h1","h2","h3","h4","h5","h6","dl","blockquote","figcaption","address","section","header","footer","aside","article","object","style","script","iframe","select","input","textarea","button","option","map","area","math","hr","fieldset","legend","hgroup","nav","figure","details","menu","summary","p"],removeComments:!1,replaceTags:[["strike","del"],["b","strong"]],replaceStyles:[["font-weight:\\s?bold","strong"],["font-style:\\s?italic","em"],["text-decoration:\\s?underline","u"],["text-decoration:\\s?line-through","del"]],removeDataAttr:!1,removeAttr:!1,allowedAttr:!1,removeWithoutAttr:["span"],removeEmpty:["p"],activeButtons:["deleted","italic","bold","underline","unorderedlist","orderedlist","alignleft","aligncenter","alignright","justify"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted",ul:"unorderedlist",ol:"orderedlist",u:"underline"},shortcuts:{"ctrl+shift+m, meta+shift+m":{func:"inline.removeFormat"},"ctrl+b, meta+b":{func:"inline.format",params:["bold"]},"ctrl+i, meta+i":{func:"inline.format",params:["italic"]},"ctrl+h, meta+h":{func:"inline.format",params:["superscript"]},"ctrl+l, meta+l":{func:"inline.format",params:["subscript"]},"ctrl+k, meta+k":{func:"link.show"},"ctrl+shift+7":{func:"list.toggle",params:["orderedlist"]},"ctrl+shift+8":{func:"list.toggle",params:["unorderedlist"]}},shortcutsAdd:!1,buffer:[],rebuffer:[],emptyHtml:"<p>&#x200b;</p>",invisibleSpace:"&#x200b;",imageTypes:["image/png","image/jpeg","image/gif"],indentValue:20,verifiedTags:["a","img","b","strong","sub","sup","i","em","u","small","strike","del","cite","ul","ol","li"],inlineTags:["strong","b","u","em","i","code","del","ins","samp","kbd","sup","sub","mark","var","cite","small"],alignmentTags:["P","H1","H2","H3","H4","H5","H6","DL","DT","DD","DIV","TD","BLOCKQUOTE","OUTPUT","FIGCAPTION","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE"],blockLevelElements:["PRE","UL","OL","LI"],highContrast:!1,observe:{dropdowns:[]},langs:{en:{html:"HTML",video:"Insert Video",image:"Insert Image",table:"Table",link:"Link",link_insert:"Insert link",link_edit:"Edit link",unlink:"Unlink",formatting:"Formatting",paragraph:"Normal text",quote:"Quote",code:"Code",header1:"Header 1",header2:"Header 2",header3:"Header 3",header4:"Header 4",header5:"Header 5",bold:"Bold",italic:"Italic",fontcolor:"Font Color",backcolor:"Back Color",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",cancel:"Cancel",insert:"Insert",save:"Save",_delete:"Delete",insert_table:"Insert Table",insert_row_above:"Add Row Above",insert_row_below:"Add Row Below",insert_column_left:"Add Column Left",insert_column_right:"Add Column Right",delete_column:"Delete Column",delete_row:"Delete Row",delete_table:"Delete Table",rows:"Rows",columns:"Columns",add_head:"Add Head",delete_head:"Delete Head",title:"Title",image_position:"Position",none:"None",left:"Left",right:"Right",center:"Center",image_web_link:"Image Web Link",text:"Text",mailto:"Email",web:"URL",video_html_code:"Video Embed Code or Youtube/Vimeo Link",file:"Insert File",upload:"Upload",download:"Download",choose:"Choose",or_choose:"Or choose",drop_file_here:"Drop file here",align_left:"Align text to the left",align_center:"Center text",align_right:"Align text to the right",align_justify:"Justify text",horizontalrule:"Insert Horizontal Rule",deleted:"Deleted",anchor:"Anchor",link_new_tab:"Open link in new tab",underline:"Underline",alignment:"Alignment",filename:"Name (optional)",edit:"Edit",upload_label:"Drop file here or "}},linkify:{regexps:{youtube:/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.\-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/gi,vimeo:/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,image:/((https?|www)[^\s]+\.)(jpe?g|png|gif)(\?[^\s-]+)?/gi,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi}},codemirror:!1},i.fn=t.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,UP:38,DOWN:40,ENTER:13,SPACE:32,ESC:27,TAB:9,CTRL:17,META:91,SHIFT:16,ALT:18,RIGHT:39,LEFT:37,LEFT_WIN:91},init:function(i,n){if(this.$element=t(i),this.uuid=e++,this.rtePaste=!1,this.$pasteBox=!1,this.loadOptions(n),this.loadModules(),this.formatting={},t.merge(this.opts.blockLevelElements,this.opts.alignmentTags),this.reIsBlock=new RegExp("^("+this.opts.blockLevelElements.join("|")+")$","i"),this.tidy.setupAllowed(),!1!==this.opts.deniedTags)for(var o=["html","head","link","body","meta","applet"],r=0;r<o.length;r++)this.opts.deniedTags.push(o[r]);this.lang.load(),t.extend(this.opts.shortcuts,this.opts.shortcutsAdd),this.core.setCallback("start"),this.start=!0,this.build.run()},loadOptions:function(e){this.opts=t.extend({},t.extend(!0,{},t.Redactor.opts),this.$element.data(),e)},getModuleMethods:function(t){return Object.getOwnPropertyNames(t).filter((function(e){return"function"==typeof t[e]}))},loadModules:function(){for(var e=t.Redactor.modules.length,i=0;i<e;i++)this.bindModuleMethods(t.Redactor.modules[i])},bindModuleMethods:function(t){if(void 0!==this[t]){this[t]=this[t]();for(var e=this.getModuleMethods(this[t]),i=e.length,n=0;n<i;n++)this[t][e[n]]=this[t][e[n]].bind(this)}},alignment:function(){return{left:function(){this.alignment.set("")},right:function(){this.alignment.set("right")},center:function(){this.alignment.set("center")},justify:function(){this.alignment.set("justify")},set:function(t){this.utils.browser("msie")||this.opts.linebreaks||this.$editor.focus(),this.alignment.blocks=this.selection.getBlocks(),this.alignment.type=t,this.buffer.set(),this.selection.save(),this.alignment.isLinebreaksOrNoBlocks()?this.alignment.setText():this.alignment.setBlocks(),this.selection.restore(),this.code.sync()},setText:function(){var e=this.selection.wrap("div");t(e).attr("data-tagblock","redactor").css("text-align",this.alignment.type)},setBlocks:function(){t.each(this.alignment.blocks,t.proxy((function(t,e){var i=this.utils.getAlignmentElement(e);i&&(this.alignment.isNeedReplaceElement(i)?this.alignment.replaceElement(i):this.alignment.alignElement(i))}),this))},isLinebreaksOrNoBlocks:function(){return this.opts.linebreaks&&!1===this.alignment.blocks[0]},isNeedReplaceElement:function(t){return""===this.alignment.type&&void 0!==t.data("tagblock")},replaceElement:function(t){t.replaceWith(t.html())},alignElement:function(t){t.css("text-align",this.alignment.type),this.utils.removeEmptyAttr(t,"style")}}},autosave:function(){return{html:!1,enable:function(){this.opts.autosave&&(this.autosave.name=this.opts.autosaveName?this.opts.autosaveName:this.$textarea.attr("name"),this.opts.autosaveOnChange||(this.autosaveInterval=setInterval(this.autosave.load,1e3*this.opts.autosaveInterval)))},onChange:function(){this.opts.autosaveOnChange&&this.autosave.load()},load:function(){if(this.opts.autosave&&(this.autosave.source=this.code.get(),this.autosave.html!==this.autosave.source)){var e={};e.name=this.autosave.name,e[this.autosave.name]=this.autosave.source,e=this.autosave.getHiddenFields(e),t.ajax({url:this.opts.autosave,type:"post",data:e}).done(this.autosave.success)}},getHiddenFields:function(e){return!1===this.opts.autosaveFields||"object"!=typeof this.opts.autosaveFields||t.each(this.opts.autosaveFields,t.proxy((function(i,n){null!==n&&0===n.toString().indexOf("#")&&(n=t(n).val()),e[i]=n}),this)),e},success:function(e){var i;try{i=t.parseJSON(e)}catch(t){i=e}var n=void 0===i.error?"autosave":"autosaveError";this.core.setCallback(n,this.autosave.name,i),this.autosave.html=this.autosave.source},disable:function(){clearInterval(this.autosaveInterval)}}},block:function(){return{formatting:function(t){var e,i;this.block.clearStyle=!1,void 0!==this.formatting[t].data?e="data":void 0!==this.formatting[t].attr?e="attr":void 0!==this.formatting[t].class&&(e="class"),void 0!==this.formatting[t].clear&&(this.block.clearStyle=!0),e&&(i=this.formatting[t][e]),this.block.format(this.formatting[t].tag,e,i)},format:function(e,i,n){if("quote"==e&&(e="blockquote"),-1!=t.inArray(e,["p","pre","blockquote","h1","h2","h3","h4","h5","h6"])){this.block.isRemoveInline="pre"==e||-1!=e.search(/h[1-6]/i),this.utils.browser("msie")||this.$editor.focus();var o,r=t.trim(this.$editor.html());this.block.isEmpty=this.utils.isEmpty(r),this.utils.browser("mozilla")&&!this.focus.isFocused()&&this.block.isEmpty&&(this.opts.linebreaks||(o=this.$editor.children().first(),this.caret.setEnd(o))),this.block.blocks=this.selection.getBlocks(),this.block.blocksSize=this.block.blocks.length,this.block.type=i,this.block.value=n,this.buffer.set(),this.selection.save(),this.block.set(e),this.selection.restore(),this.code.sync(),this.observe.load()}},set:function(t){this.selection.get(),this.block.containerTag=this.range.commonAncestorContainer.tagName,this.range.collapsed?this.block.setCollapsed(t):this.block.setMultiple(t)},setCollapsed:function(e){if(this.opts.linebreaks&&this.block.isEmpty&&"p"!=e){var i=document.createElement(e);return this.$editor.html(i),void this.caret.setEnd(i)}var n=this.block.blocks[0];if(!1!==n)if("LI"!=n.tagName){if("TD"!=this.block.containerTag&&"TH"!=this.block.containerTag||this.opts.linebreaks)if(n.tagName.toLowerCase()!=e)if(this.opts.linebreaks&&"p"==e)t(n).append("<br>"),this.utils.replaceWithContents(n);else{var o=this.utils.replaceToTag(n,e);this.block.toggle(o),"p"!=e&&"blockquote"!=e&&o.find("img").remove(),this.block.isRemoveInline&&this.utils.removeInlineTags(o),("p"==e||this.block.headTag)&&o.find("p").contents().unwrap(),this.block.formatTableWrapping(o)}else if("blockquote"==e&&n.tagName.toLowerCase()==e)if(this.opts.linebreaks)t(n).append("<br>"),this.utils.replaceWithContents(n);else{var r=this.utils.replaceToTag(n,"p");this.block.toggle(r)}else n.tagName.toLowerCase()==e&&this.block.toggle(t(n));else document.execCommand("formatblock",!1,"<"+e+">"),n=this.selection.getBlock(),this.block.toggle(t(n));void 0===this.block.type&&void 0===this.block.value&&t(n).removeAttr("class").removeAttr("style")}else{if("blockquote"!=e)return;this.block.formatListToBlockquote()}},setMultiple:function(e){var i=this.block.blocks[0],n="TD"==this.block.containerTag||"TH"==this.block.containerTag;if(!1!==i&&1===this.block.blocksSize)if(i.tagName.toLowerCase()==e&&"blockquote"==e)if(this.opts.linebreaks)t(i).append("<br>"),this.utils.replaceWithContents(i);else{var o=this.utils.replaceToTag(i,"p");this.block.toggle(o)}else if("LI"==i.tagName){if("blockquote"!=e)return;this.block.formatListToBlockquote()}else if("BLOCKQUOTE"==this.block.containerTag)this.block.formatBlockquote(e);else if(this.opts.linebreaks&&(n||this.range.commonAncestorContainer!=i))this.block.formatWrap(e);else if(this.opts.linebreaks&&"p"==e)t(i).prepend("<br>").append("<br>"),this.utils.replaceWithContents(i);else if("TD"===i.tagName)this.block.formatWrap(e);else{var r=this.utils.replaceToTag(i,e);this.block.toggle(r),this.block.isRemoveInline&&this.utils.removeInlineTags(r),("p"==e||this.block.headTag)&&r.find("p").contents().unwrap()}else if(this.opts.linebreaks||"p"!=e){if("blockquote"==e){for(var s=0,a=0;a<this.block.blocksSize;a++)"BLOCKQUOTE"==this.block.blocks[a].tagName&&s++;if(s==this.block.blocksSize)return void t.each(this.block.blocks,t.proxy((function(e,i){var n=!1;this.opts.linebreaks?(t(i).prepend("<br>").append("<br>"),n=this.utils.replaceWithContents(i)):n=this.utils.replaceToTag(i,"p"),n&&void 0===this.block.type&&void 0===this.block.value&&n.removeAttr("class").removeAttr("style")}),this))}this.block.formatWrap(e)}else{var l=0,c=!1;"class"==this.block.type&&(c="toggle",l=t(this.block.blocks).filter("."+this.block.value).length,this.block.blocksSize==l?c="toggle":(this.block.blocksSize>l||0===l)&&(c="set"));var d=["ul","ol","li","td","th","dl","dt","dd"];t.each(this.block.blocks,t.proxy((function(i,n){if(-1==t.inArray(n.tagName.toLowerCase(),d)){var o=this.utils.replaceToTag(n,e);c?"toggle"==c?this.block.toggle(o):"remove"==c?this.block.remove(o):"set"==c&&this.block.setForce(o):this.block.toggle(o),"p"!=e&&"blockquote"!=e&&o.find("img").remove(),this.block.isRemoveInline&&this.utils.removeInlineTags(o),("p"==e||this.block.headTag)&&o.find("p").contents().unwrap(),void 0===this.block.type&&void 0===this.block.value&&o.removeAttr("class").removeAttr("style")}}),this))}},setForce:function(t){this.block.clearStyle&&t.removeAttr("class").removeAttr("style"),"class"!=this.block.type?"attr"!=this.block.type&&"data"!=this.block.type||t.attr(this.block.value.name,this.block.value.value):t.addClass(this.block.value)},toggle:function(t){return this.block.clearStyle&&t.removeAttr("class").removeAttr("style"),"class"==this.block.type?void t.toggleClass(this.block.value):"attr"==this.block.type||"data"==this.block.type?void(t.attr(this.block.value.name)==this.block.value.value?t.removeAttr(this.block.value.name):t.attr(this.block.value.name,this.block.value.value)):void t.removeAttr("style class")},remove:function(t){t.removeClass(this.block.value)},formatListToBlockquote:function(){var e=t(this.block.blocks[0]).closest("ul, ol",this.$editor[0]);t(e).find("ul, ol").contents().unwrap(),t(e).find("li").append(t("<br>")).contents().unwrap();var i=this.utils.replaceToTag(e,"blockquote");this.block.toggle(i)},formatBlockquote:function(e){document.execCommand("outdent"),document.execCommand("formatblock",!1,e),this.clean.clearUnverified(),this.$editor.find("p:empty").remove();var i=this.selection.getBlock();"p"!=e&&t(i).find("img").remove(),this.opts.linebreaks||this.block.toggle(t(i)),this.$editor.find("ul, ol, tr, blockquote, p").each(t.proxy(this.utils.removeEmpty,this)),this.opts.linebreaks&&"p"==e&&this.utils.replaceWithContents(i)},formatWrap:function(e){if("UL"==this.block.containerTag||"OL"==this.block.containerTag){if("blockquote"!=e)return;this.block.formatListToBlockquote()}var i=this.selection.wrap(e);if(!1!==i){var n=t(i);if(this.block.formatTableWrapping(n),n.find(this.opts.blockLevelElements.join(",")+", td, table, thead, tbody, tfoot, th, tr").contents().unwrap(),"p"!=e&&"blockquote"!=e&&n.find("img").remove(),t.each(this.block.blocks,t.proxy(this.utils.removeEmpty,this)),n.append(this.selection.getMarker(2)),this.opts.linebreaks||this.block.toggle(n),this.$editor.find("ul, ol, tr, blockquote, p").each(t.proxy(this.utils.removeEmpty,this)),n.find("blockquote:empty").remove(),this.block.isRemoveInline&&this.utils.removeInlineTags(n),this.opts.linebreaks&&"p"==e&&this.utils.replaceWithContents(n),this.opts.linebreaks){var o=n.next().next();0!=o.size()&&"BR"===o[0].tagName&&o.remove()}}},formatTableWrapping:function(t){0!==t.closest("table",this.$editor[0]).length&&(0===t.closest("tr",this.$editor[0]).length&&t.wrap("<tr>"),0===t.closest("td",this.$editor[0]).length&&0===t.closest("th").length&&t.wrap("<td>"))},removeData:function(e,i){var n=this.selection.getBlocks();t(n).removeAttr("data-"+e),this.code.sync()},setData:function(e,i){var n=this.selection.getBlocks();t(n).attr("data-"+e,i),this.code.sync()},toggleData:function(e,i){var n=this.selection.getBlocks();t.each(n,(function(){t(this).attr("data-"+e)?t(this).removeAttr("data-"+e):t(this).attr("data-"+e,i)}))},removeAttr:function(e,i){var n=this.selection.getBlocks();t(n).removeAttr(e),this.code.sync()},setAttr:function(e,i){var n=this.selection.getBlocks();t(n).attr(e,i),this.code.sync()},toggleAttr:function(e,i){var n=this.selection.getBlocks();t.each(n,(function(){t(this).attr(name)?t(this).removeAttr(name):t(this).attr(name,i)}))},removeClass:function(e){var i=this.selection.getBlocks();t(i).removeClass(e),this.utils.removeEmptyAttr(i,"class"),this.code.sync()},setClass:function(e){var i=this.selection.getBlocks();t(i).addClass(e),this.code.sync()},toggleClass:function(e){var i=this.selection.getBlocks();t(i).toggleClass(e),this.code.sync()}}},buffer:function(){return{set:function(t){void 0===t||"undo"==t?this.buffer.setUndo():this.buffer.setRedo()},setUndo:function(){this.selection.save(),this.opts.buffer.push(this.$editor.html()),this.selection.restore()},setRedo:function(){this.selection.save(),this.opts.rebuffer.push(this.$editor.html()),this.selection.restore()},getUndo:function(){this.$editor.html(this.opts.buffer.pop())},getRedo:function(){this.$editor.html(this.opts.rebuffer.pop())},add:function(){this.opts.buffer.push(this.$editor.html())},undo:function(){0!==this.opts.buffer.length&&(this.buffer.set("redo"),this.buffer.getUndo(),this.selection.restore(),setTimeout(t.proxy(this.observe.load,this),50))},redo:function(){0!==this.opts.rebuffer.length&&(this.buffer.set("undo"),this.buffer.getRedo(),this.selection.restore(),setTimeout(t.proxy(this.observe.load,this),50))}}},build:function(){return{focused:!1,blured:!0,run:function(){this.build.createContainerBox(),this.build.loadContent(),this.build.loadEditor(),this.build.enableEditor(),this.build.setCodeAndCall()},isTextarea:function(){return"TEXTAREA"===this.$element[0].tagName},createContainerBox:function(){this.$box=t('<div class="redactor-box" role="application" />')},createTextarea:function(){this.$textarea=t("<textarea />").attr("name",this.build.getTextareaName())},getTextareaName:function(){return"undefined"==typeof name?"content-"+this.uuid:this.$element.attr("id")},loadContent:function(){var e=this.build.isTextarea()?"val":"html";this.content=t.trim(this.$element[e]())},enableEditor:function(){this.$editor.attr({contenteditable:!0,dir:this.opts.direction})},loadEditor:function(){var t=this.build.isTextarea()?"fromTextarea":"fromElement";this.build[t]()},fromTextarea:function(){this.$editor=t("<div />"),this.$textarea=this.$element,this.$box.insertAfter(this.$element).append(this.$editor).append(this.$element),this.$editor.addClass("redactor-editor"),this.$element.hide()},fromElement:function(){this.$editor=this.$element,this.build.createTextarea(),this.$box.insertAfter(this.$editor).append(this.$editor).append(this.$textarea),this.$editor.addClass("redactor-editor"),this.$textarea.hide()},setCodeAndCall:function(){this.code.set(this.content),this.build.setOptions(),this.build.callEditor(),this.opts.visual||setTimeout(t.proxy(this.code.showCode,this),200)},callEditor:function(){this.build.disableMozillaEditing(),this.build.disableIeLinks(),this.build.setEvents(),this.build.setHelpers(),this.opts.toolbar&&(this.opts.toolbar=this.toolbar.init(),this.toolbar.build()),this.modal.loadTemplates(),this.build.plugins(),setTimeout(t.proxy(this.observe.load,this),4),this.core.setCallback("init")},setOptions:function(){t(this.$textarea).attr("dir",this.opts.direction),this.opts.linebreaks&&this.$editor.addClass("redactor-linebreaks"),this.opts.tabindex&&this.$editor.attr("tabindex",this.opts.tabindex),this.opts.minHeight&&this.$editor.css("minHeight",this.opts.minHeight),this.opts.maxHeight&&this.$editor.css("maxHeight",this.opts.maxHeight)},setEventDropUpload:function(t){if(t.preventDefault(),(this.opts.dragImageUpload||this.opts.dragFileUpload)&&(null!==this.opts.imageUpload||null!==this.opts.fileUpload)){var e=t.dataTransfer.files;this.upload.directUpload(e[0],t)}},setEventDrop:function(t){this.code.sync(),setTimeout(this.clean.clearUnverified,1),this.core.setCallback("drop",t)},setEvents:function(){this.$editor.on("dragover.redactor dragenter.redactor",(function(t){t.preventDefault(),t.stopPropagation()})),this.$editor.on("drop.redactor",t.proxy((function(t){return t=t.originalEvent||t,void 0===window.FormData||!t.dataTransfer||(0===t.dataTransfer.files.length?this.build.setEventDrop(t):(this.build.setEventDropUpload(t),setTimeout(this.clean.clearUnverified,1),void this.core.setCallback("drop",t)))}),this)),this.$editor.on("click.redactor",t.proxy((function(t){var e=this.core.getEvent(),i="click"!=e&&"arrow"!=e&&"click";this.core.addEvent(i),this.utils.disableSelectAll(),this.core.setCallback("click",t)}),this)),this.$editor.on("paste.redactor",t.proxy(this.paste.init,this)),this.$editor.on("cut.redactor",t.proxy(this.code.sync,this)),this.$editor.on("keydown.redactor",t.proxy(this.keydown.init,this)),this.$editor.on("keyup.redactor",t.proxy(this.keyup.init,this)),t.isFunction(this.opts.codeKeydownCallback)&&this.$textarea.on("keydown.redactor-textarea",t.proxy(this.opts.codeKeydownCallback,this)),t.isFunction(this.opts.codeKeyupCallback)&&this.$textarea.on("keyup.redactor-textarea",t.proxy(this.opts.codeKeyupCallback,this)),this.$editor.on("focus.redactor",t.proxy((function(e){t.isFunction(this.opts.focusCallback)&&this.core.setCallback("focus",e),this.build.focused=!0,this.build.blured=!1,!1===this.selection.getCurrent()&&(this.selection.get(),this.range.setStart(this.$editor[0],0),this.range.setEnd(this.$editor[0],0),this.selection.addRange())}),this)),t(document).on("mousedown.redactor-blur."+this.uuid,t.proxy((function(e){this.start||this.rtePaste||0===t(e.target).closest(".redactor-editor, .redactor-toolbar, .redactor-dropdown").size()&&(this.utils.disableSelectAll(),!this.build.blured&&t.isFunction(this.opts.blurCallback)&&this.core.setCallback("blur",e),this.build.focused=!1,this.build.blured=!0)}),this))},setHelpers:function(){this.linkify.isEnabled()&&this.linkify.format(),this.placeholder.enable(),this.opts.focus&&setTimeout(this.focus.setStart,100),this.opts.focusEnd&&setTimeout(this.focus.setEnd,100)},plugins:function(){this.opts.plugins&&t.each(this.opts.plugins,t.proxy((function(e,n){var o="undefined"!=typeof RedactorPlugins&&void 0!==RedactorPlugins[n]?RedactorPlugins:i.fn;if(t.isFunction(o[n])){this[n]=o[n]();for(var r=this.getModuleMethods(this[n]),s=r.length,a=0;a<s;a++)this[n][r[a]]=this[n][r[a]].bind(this);t.isFunction(this[n].init)&&this[n].init()}}),this))},disableMozillaEditing:function(){if(this.utils.browser("mozilla"))try{document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1)}catch(t){}},disableIeLinks:function(){this.utils.browser("msie")&&document.execCommand("AutoUrlDetect",!1,!1)}}},button:function(){return{build:function(e,i){var n=t('<a href="#" class="re-icon re-'+e+'" rel="'+e+'" />').attr({role:"button","aria-label":i.title,tabindex:"-1"});if((i.func||i.command||i.dropdown)&&this.button.setEvent(n,e,i),i.dropdown){n.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0);var o=t('<div class="redactor-dropdown redactor-dropdown-'+this.uuid+" redactor-dropdown-box-"+e+'" style="display: none;">');n.data("dropdown",o),this.dropdown.build(e,o,i.dropdown)}return this.utils.isDesktop()&&this.button.createTooltip(n,e,i.title),n},setEvent:function(e,i,n){e.on("touchstart click",t.proxy((function(t){if(e.hasClass("redactor-button-disabled"))return!1;var o="func",r=n.func;n.command?(o="command",r=n.command):n.dropdown&&(o="dropdown",r=!1),this.button.onClick(t,i,o,r)}),this))},createTooltip:function(e,i,n){var o=t("<span>").addClass("redactor-toolbar-tooltip redactor-toolbar-tooltip-"+this.uuid+" redactor-toolbar-tooltip-"+i).hide().html(n);o.appendTo("body"),e.on("mouseover",(function(){if(!t(this).hasClass("redactor-button-disabled")){var i=e.offset();o.css({top:i.top+e.innerHeight()+"px",left:i.left+e.innerWidth()/2-o.innerWidth()/2+"px"}),o.show()}})),e.on("mouseout",(function(){o.hide()}))},onClick:function(e,i,n,o){this.button.caretOffset=this.caret.getOffset(),e.preventDefault(),t(document).find(".redactor-toolbar-tooltip").hide(),this.utils.browser("msie")&&(e.returnValue=!1),"command"==n?this.inline.format(o):"dropdown"==n?this.dropdown.show(e,i):this.button.onClickCallback(e,o,i)},onClickCallback:function(e,i,n){var o;if(t.isFunction(i))i.call(this,n);else if("-1"!=i.search(/\./)){if(void 0===this[(o=i.split("."))[0]])return;this[o[0]][o[1]](n)}else this[i](n);this.observe.buttons(e,n)},get:function(t){return this.$toolbar.find("a.re-"+t)},setActive:function(t){this.button.get(t).addClass("redactor-act")},setInactive:function(t){this.button.get(t).removeClass("redactor-act")},setInactiveAll:function(t){void 0===t?this.$toolbar.find("a.re-icon").removeClass("redactor-act"):this.$toolbar.find("a.re-icon").not(".re-"+t).removeClass("redactor-act")},setActiveInVisual:function(){this.$toolbar.find("a.re-icon").not("a.re-html, a.re-fullscreen").removeClass("redactor-button-disabled")},setInactiveInCode:function(){this.$toolbar.find("a.re-icon").not("a.re-html, a.re-fullscreen").addClass("redactor-button-disabled")},changeIcon:function(t,e){this.button.get(t).addClass("re-"+e)},removeIcon:function(t,e){this.button.get(t).removeClass("re-"+e)},setAwesome:function(t,e){var i=this.button.get(t);i.removeClass("redactor-btn-image").addClass("fa-redactor-btn"),i.html('<i class="fa '+e+'"></i>')},addCallback:function(e,i){if("buffer"!=e){var n="dropdown"==i?"dropdown":"func",o=e.attr("rel");e.on("touchstart click",t.proxy((function(t){if(e.hasClass("redactor-button-disabled"))return!1;this.button.onClick(t,o,n,i)}),this))}},addDropdown:function(e,i){e.addClass("redactor-toolbar-link-dropdown").attr("aria-haspopup",!0);var n=e.attr("rel");this.button.addCallback(e,"dropdown");var o=t('<div class="redactor-dropdown redactor-dropdown-'+this.uuid+" redactor-dropdown-box-"+n+'" style="display: none;">');return e.data("dropdown",o),i&&this.dropdown.build(n,o,i),o},add:function(e,i){if(this.opts.toolbar){if(this.button.isMobileUndoRedo(e))return"buffer";var n=this.button.build(e,{title:i});return n.addClass("redactor-btn-image"),this.$toolbar.append(t("<li>").append(n)),n}},addFirst:function(e,i){if(this.opts.toolbar){if(this.button.isMobileUndoRedo(e))return"buffer";var n=this.button.build(e,{title:i});return n.addClass("redactor-btn-image"),this.$toolbar.prepend(t("<li>").append(n)),n}},addAfter:function(e,i,n){if(this.opts.toolbar){if(this.button.isMobileUndoRedo(i))return"buffer";var o=this.button.build(i,{title:n});o.addClass("redactor-btn-image");var r=this.button.get(e);return 0!==r.length?r.parent().after(t("<li>").append(o)):this.$toolbar.append(t("<li>").append(o)),o}},addBefore:function(e,i,n){if(this.opts.toolbar){if(this.button.isMobileUndoRedo(i))return"buffer";var o=this.button.build(i,{title:n});o.addClass("redactor-btn-image");var r=this.button.get(e);return 0!==r.length?r.parent().before(t("<li>").append(o)):this.$toolbar.append(t("<li>").append(o)),o}},remove:function(t){this.button.get(t).remove()},isMobileUndoRedo:function(t){return("undo"==t||"redo"==t)&&!this.utils.isDesktop()}}},caret:function(){return{setStart:function(e){if(this.utils.isBlock(e))this.caret.set(e,0,e,0);else{var i=this.utils.createSpaceElement();t(e).prepend(i),this.caret.setEnd(i)}},setEnd:function(t){if(1==(t=t[0]||t).lastChild.nodeType)return this.caret.setAfter(t.lastChild);this.caret.set(t,1,t,1)},set:function(e,i,n,o){if(e=e[0]||e,n=n[0]||n,this.utils.isBlockTag(e.tagName)&&""===e.innerHTML&&(e.innerHTML=this.opts.invisibleSpace),"BR"==e.tagName&&!1===this.opts.linebreaks){var r=t(this.opts.emptyHtml)[0];t(e).replaceWith(r),n=e=r}this.selection.get();try{this.range.setStart(e,i),this.range.setEnd(n,o)}catch(t){}this.selection.addRange()},setAfter:function(e){try{var i=t(e)[0].tagName;if("BR"==i||this.utils.isBlock(e))"BR"!=i&&this.utils.browser("msie")?this.caret.setStart(t(e).next()):this.caret.setAfterOrBefore(e,"after");else{var n=this.utils.createSpaceElement();t(e).after(n),this.caret.setEnd(n)}}catch(i){n=this.utils.createSpaceElement(),t(e).after(n),this.caret.setEnd(n)}},setBefore:function(e){this.utils.isBlock(e)?this.caret.setEnd(t(e).prev()):this.caret.setAfterOrBefore(e,"before")},setAfterOrBefore:function(t,e){if(this.utils.browser("msie")||this.$editor.focus(),t=t[0]||t,this.selection.get(),"after"==e)try{this.range.setStartAfter(t),this.range.setEndAfter(t)}catch(t){}else try{this.range.setStartBefore(t),this.range.setEndBefore(t)}catch(t){}this.range.collapse(!1),this.selection.addRange()},getOffsetOfElement:function(e){e=e[0]||e,this.selection.get();var i=this.range.cloneRange();return i.selectNodeContents(e),i.setEnd(this.range.endContainer,this.range.endOffset),t.trim(i.toString()).length},getOffset:function(){var t=0;if(window.getSelection().rangeCount>0){var e=window.getSelection().getRangeAt(0),i=e.cloneRange();i.selectNodeContents(this.$editor[0]),i.setEnd(e.endContainer,e.endOffset),t=i.toString().length}return t},setOffset:function(t,e){void 0===e&&(e=t),this.focus.isFocused()||this.focus.setStart(),this.selection.get();for(var i,n=0,o=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);i=o.nextNode();)if((n+=i.nodeValue.length)>t&&(this.range.setStart(i,i.nodeValue.length+t-n),t=1/0),n>=e){this.range.setEnd(i,i.nodeValue.length+e-n);break}this.range.collapse(!1),this.selection.addRange()},setToPoint:function(t,e){this.caret.setOffset(t,e)},getCoords:function(){return this.caret.getOffset()}}},clean:function(){return{onSet:function(e){e=(e=(e=(e=this.clean.savePreCode(e)).replace(/<script(.*?[^>]?)>([\w\W]*?)<\/script>/gi,'<pre class="redactor-script-tag" style="display: none;" $1>$2</pre>')).replace(/\$/g,"&#36;")).replace(/<a href="(.*?[^>]?)®(.*?[^>]?)">/gi,'<a href="$1&reg$2">'),this.opts.replaceDivs&&!this.opts.linebreaks&&(e=this.clean.replaceDivs(e)),this.opts.linebreaks&&(e=this.clean.replaceParagraphsToBr(e)),e=this.clean.saveFormTags(e);var i=t("<div>");i.html(e);var n=i.find("font[style]");return 0!==n.length&&(n.replaceWith((function(){var e=t(this);return t("<span>").attr("style",e.attr("style")).append(e.contents())})),e=i.html()),i.remove(),e=(e=e.replace(/<font(.*?)>/gi,"")).replace(/<\/font>/gi,""),e=this.tidy.load(e),this.opts.paragraphize&&(e=this.paragraphize.load(e)),e=this.clean.setVerified(e),(e=this.clean.convertInline(e)).replace(/&amp;/g,"&")},onSync:function(e){if(e=(e=e.replace(/\u200B/g,"")).replace(/&#x200b;/gi,""),this.opts.cleanSpaces&&(e=e.replace(/&nbsp;/gi," ")),-1!=e.search(/^<p>(||\s||<br\s?\/?>||&nbsp;)<\/p>$/i))return"";e=e.replace(/<pre class="redactor-script-tag" style="display: none;"(.*?[^>]?)>([\w\W]*?)<\/pre>/gi,"<script$1>$2<\/script>"),e=this.clean.restoreFormTags(e),t.each({"™":"&trade;","©":"&copy;","…":"&hellip;","—":"&mdash;","‐":"&dash;"},(function(t,i){e=e.replace(new RegExp(t,"g"),i)})),this.utils.browser("mozilla")&&(e=e.replace(/<br\s?\/?>$/gi,"")),e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("<br\\s?/?></li>","gi"),"</li>")).replace(new RegExp("</li><br\\s?/?>","gi"),"</li>")).replace(/<(.*?)rel="\s*?"(.*?[^>]?)>/gi,'<$1$2">')).replace(/<(.*?)style="\s*?"(.*?[^>]?)>/gi,'<$1$2">')).replace(/="">/gi,">")).replace(/""">/gi,'">')).replace(/"">/gi,'">')).replace(/<div(.*?)data-tagblock="redactor"(.*?[^>])>/gi,"<div$1$2>")).replace(/<(.*?) data-verified="redactor"(.*?[^>])>/gi,"<$1$2>");var i=t("<div/>").html(t.parseHTML(e,document,!0));return i.find("span").removeAttr("rel"),i.find("pre .redactor-invisible-space").each((function(){t(this).contents().unwrap()})),e=(e=(e=(e=(e=(e=(e=(e=(e=i.html()).replace(/<img(.*?[^>])rel="(.*?[^>])"(.*?[^>])>/gi,"<img$1$3>")).replace(/<span class="redactor-invisible-space">(.*?)<\/span>/gi,"$1")).replace(/ data-save-url="(.*?[^>])"/gi,"")).replace(/<span(.*?)id="redactor-image-box"(.*?[^>])>([\w\W]*?)<img(.*?)><\/span>/gi,"$3<img$4>")).replace(/<span(.*?)id="redactor-image-resizer"(.*?[^>])>(.*?)<\/span>/gi,"")).replace(/<span(.*?)id="redactor-image-editter"(.*?[^>])>(.*?)<\/span>/gi,"")).replace(/<font(.*?)>/gi,"")).replace(/<\/font>/gi,""),e=this.tidy.load(e),this.opts.linkNofollow&&(e=(e=e.replace(/<a(.*?)rel="nofollow"(.*?[^>])>/gi,"<a$1$2>")).replace(/<a(.*?[^>])>/gi,'<a$1 rel="nofollow">')),e=(e=(e=(e=e.replace(/\sdata-redactor-(tag|class|style)="(.*?[^>])"/gi,"")).replace(new RegExp('<(.*?) data-verified="redactor"(.*?[^>])>',"gi"),"<$1$2>")).replace(new RegExp('<(.*?) data-verified="redactor">',"gi"),"<$1>")).replace(/&amp;/g,"&")},onPaste:function(e,i){if(e=(e=(e=(e=(e=(e=t.trim(e)).replace(/\$/g,"&#36;")).replace(/<span class="s[0-9]">/gi,"<span>")).replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," ")).replace(/<span class="Apple-tab-span"[^>]*>\t<\/span>/gi,"\t")).replace(/<span[^>]*>(\s|&nbsp;)<\/span>/gi," "),this.opts.pastePlainText)return this.clean.getPlainText(e);if(!this.utils.isSelectAll()&&void 0===i){if(this.utils.isCurrentOrParent(["FIGCAPTION","A"]))return this.clean.getPlainText(e,!1);if(this.utils.isCurrentOrParent("PRE"))return e=(e=(e=(e=e.replace(/”/g,'"')).replace(/“/g,'"')).replace(/‘/g,"'")).replace(/’/g,"'"),this.clean.getPreCode(e);if(this.utils.isCurrentOrParent(["BLOCKQUOTE","H1","H2","H3","H4","H5","H6"])){if(e=this.clean.getOnlyImages(e),!this.utils.browser("msie")){var n=this.selection.getBlock();n&&"P"==n.tagName&&(e=e.replace(/<img(.*?)>/gi,"<p><img$1></p>"))}return e}if(this.utils.isCurrentOrParent(["TD"]))return e=this.clean.onPasteTidy(e,"td"),this.opts.linebreaks&&(e=this.clean.replaceParagraphsToBr(e)),this.clean.replaceDivsToBr(e);if(this.utils.isCurrentOrParent(["LI"]))return this.clean.onPasteTidy(e,"li")}return e=this.clean.isSingleLine(e,i),this.clean.singleLine||(this.opts.linebreaks&&(e=this.clean.replaceParagraphsToBr(e)),this.opts.replaceDivs&&(e=this.clean.replaceDivs(e)),e=this.clean.saveFormTags(e)),e=this.clean.onPasteWord(e),e=this.clean.onPasteExtra(e),e=this.clean.onPasteTidy(e,"all"),!this.clean.singleLine&&this.opts.paragraphize&&(e=this.paragraphize.load(e)),e=this.clean.removeDirtyStyles(e),e=this.clean.onPasteRemoveSpans(e),e=this.clean.onPasteRemoveEmpty(e),this.clean.convertInline(e)},onPasteWord:function(e){if((e=(e=(e=e.replace(/<!--[\s\S]*?-->/gi,"")).replace(/<style[^>]*>[\s\S]*?<\/style>/gi,"")).replace(/<o\:p[^>]*>[\s\S]*?<\/o\:p>/gi,"")).match(/class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i)){e=(e=(e=(e=(e=e.replace(/<!--[\s\S]+?-->/gi,"")).replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,"")).replace(/<(\/?)s>/gi,"<$1strike>")).replace(/ /gi," ")).replace(/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,(function(t,e){return e.length>0?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join(" "):""})),e=(e=(e=this.clean.onPasteIeFixLinks(e)).replace(/<img(.*?)v:shapes=(.*?)>/gi,"")).replace(/src="file\:\/\/(.*?)"/,'src=""');var i=t("<div/>").html(e),n=!1,o=1,r=[];i.find("p[style]").each((function(){var e=t(this).attr("style").match(/mso\-list\:l([0-9]+)\slevel([0-9]+)/);if(e){var s=parseInt(e[1]),a=parseInt(e[2]),l=t(this).html().match(/^[\w]+\./)?"ol":"ul",c=t("<li/>").html(t(this).html());if(c.html(c.html().replace(/^([\w\.]+)</,"<")),c.find("span:first").remove(),1==a&&-1==t.inArray(s,r)){var d=t("<"+l+"/>").attr({"data-level":a,"data-list":s}).html(c);t(this).replaceWith(d),n=s,r.push(s)}else{if(a>o){for(var h=i.find('[data-level="'+o+'"][data-list="'+n+'"]'),u=o;u<a;u++)(d=t("<"+l+"/>")).appendTo(h.find("li").last()),h=d;h.attr({"data-level":a,"data-list":s}).html(c)}else i.find('[data-level="'+a+'"][data-list="'+s+'"]').last().append(c);o=a,n=s,t(this).remove()}}})),i.find("[data-level][data-list]").removeAttr("data-level data-list"),e=(e=(e=(e=(e=(e=(e=(e=i.html()).replace(/·/g,"")).replace(/<p class="Mso(.*?)"/gi,"<p")).replace(/ class=\"(mso[^\"]*)\"/gi,"")).replace(/ class=(mso\w+)/gi,"")).replace(/<o:p(.*?)>([\w\W]*?)<\/o:p>/gi,"$2")).replace(/\n/g," ")).replace(/<p>\n?<li>/gi,"<li>")}return e},onPasteExtra:function(t){return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$2")).replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi,"$3")).replace(/<span[^>]*(font-style: italic; font-weight: bold|font-weight: bold; font-style: italic)[^>]*>/gi,'<span style="font-weight: bold;"><span style="font-style: italic;">')).replace(/<span[^>]*font-style: italic[^>]*>/gi,'<span style="font-style: italic;">')).replace(/<span[^>]*font-weight: bold[^>]*>/gi,'<span style="font-weight: bold;">')).replace(/<span[^>]*text-decoration: underline[^>]*>/gi,'<span style="text-decoration: underline;">')).replace(/<img>/gi,"")).replace(/\n{3,}/gi,"\n")).replace(/<font(.*?)>([\w\W]*?)<\/font>/gi,"$2")).replace(/<p><p>/gi,"<p>")).replace(/<\/p><\/p>/gi,"</p>")).replace(/<li>(\s*|\t*|\n*)<p>/gi,"<li>")).replace(/<\/p>(\s*|\t*|\n*)<\/li>/gi,"</li>")).replace(/<\/p>\s<p/gi,"</p><p")).replace(/<img src="webkit-fake-url\:\/\/(.*?)"(.*?)>/gi,"")).replace(/<p>•([\w\W]*?)<\/p>/gi,"<li>$1</li>"),this.utils.browser("mozilla")&&(t=t.replace(/<br\s?\/?>$/gi,"")),t},onPasteTidy:function(t,e){var i=["span","a","pre","blockquote","small","em","strong","code","kbd","mark","address","cite","var","samp","dfn","sup","sub","b","i","u","del","ol","ul","li","dl","dt","dd","p","br","video","audio","iframe","embed","param","object","img","table","td","th","tr","tbody","tfoot","thead","h1","h2","h3","h4","h5","h6"],n=!1,o=[["a","*"],["img",["src","alt"]],["span",["class","rel","data-verified"]],["iframe","*"],["video","*"],["audio","*"],["embed","*"],["object","*"],["param","*"],["source","*"]];"all"==e?(n=["p","span","h1","h2","h3","h4","h5","h6"],o=[["table","class"],["td",["colspan","rowspan"]],["a","*"],["img",["src","alt","data-redactor-inserted-image"]],["span",["class","rel","data-verified"]],["iframe","*"],["video","*"],["audio","*"],["embed","*"],["object","*"],["param","*"],["source","*"]]):"td"==e?i=["ul","ol","li","span","a","small","em","strong","code","kbd","mark","cite","var","samp","dfn","sup","sub","b","i","u","del","ol","ul","li","dl","dt","dd","br","iframe","video","audio","embed","param","object","img","h1","h2","h3","h4","h5","h6"]:"li"==e&&(i=["ul","ol","li","span","a","small","em","strong","code","kbd","mark","cite","var","samp","dfn","sup","sub","b","i","u","del","br","iframe","video","audio","embed","param","object","img"]);var r={deniedTags:!!this.opts.deniedTags&&this.opts.deniedTags,allowedTags:this.opts.allowedTags?this.opts.allowedTags:i,removeComments:!0,removePhp:!0,removeAttr:!!this.opts.removeAttr&&this.opts.removeAttr,allowedAttr:this.opts.allowedAttr?this.opts.allowedAttr:o,removeEmpty:n};return this.tidy.load(t,r)},onPasteRemoveEmpty:function(t){return t=t.replace(/<(p|h[1-6])>(|\s|\n|\t|<br\s?\/?>)<\/(p|h[1-6])>/gi,""),this.opts.linebreaks||(t=t.replace(/<br>$/i,"")),t},onPasteRemoveSpans:function(t){return(t=t.replace(/<span>(.*?)<\/span>/gi,"$1")).replace(/<span[^>]*>\s|&nbsp;<\/span>/gi," ")},onPasteIeFixLinks:function(e){return this.utils.browser("msie")?(0===t.trim(e).search(/^<a(.*?)>(.*?)<\/a>$/i)&&(e=e.replace(/^<a(.*?)>(.*?)<\/a>$/i,"$2")),e):e},isSingleLine:function(t,e){if(this.clean.singleLine=!1,!this.utils.isSelectAll()&&void 0===e){var i=this.opts.blockLevelElements.join("|").replace("P|","").replace("DIV|",""),n=t.match(new RegExp("</("+i+")>","gi")),o=t.match(/<\/(p|div)>/gi);!n&&(null===o||o&&o.length<=1)&&(t.match(/<br\s?\/?>/gi)||(this.clean.singleLine=!0,t=t.replace(/<\/?(p|div)(.*?)>/gi,"")))}return t},stripTags:function(t,e){return e=(((e||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join(""),t.replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,(function(t,i){return e.indexOf("<"+i.toLowerCase()+">")>-1?t:""}))},savePreCode:function(t){return t=this.clean.savePreFormatting(t),t=this.clean.saveCodeFormatting(t),this.clean.restoreSelectionMarker(t)},savePreFormatting:function(e){var i=e.match(/<pre(.*?)>([\w\W]*?)<\/pre>/gi);return null!==i&&t.each(i,t.proxy((function(t,i){var n=i.match(/<pre(.*?)>([\w\W]*?)<\/pre>/i);n[2]=n[2].replace(/<br\s?\/?>/g,"\n"),n[2]=n[2].replace(/&nbsp;/g," "),this.opts.preSpaces&&(n[2]=n[2].replace(/\t/g,Array(this.opts.preSpaces+1).join(" "))),n[2]=this.clean.encodeEntities(n[2]),n[2]=n[2].replace(/\$/g,"&#36;"),e=e.replace(i,"<pre"+n[1]+">"+n[2]+"</pre>")}),this)),e},saveCodeFormatting:function(e){var i=e.match(/<code(.*?)>([\w\W]*?)<\/code>/gi);return null!==i&&t.each(i,t.proxy((function(t,i){var n=i.match(/<code(.*?)>([\w\W]*?)<\/code>/i);n[2]=n[2].replace(/&nbsp;/g," "),n[2]=this.clean.encodeEntities(n[2]),n[2]=n[2].replace(/\$/g,"&#36;"),e=e.replace(i,"<code"+n[1]+">"+n[2]+"</code>")}),this)),e},restoreSelectionMarker:function(t){return t.replace(/&lt;span id=&quot;selection-marker-([0-9])&quot; class=&quot;redactor-selection-marker&quot; data-verified=&quot;redactor&quot;&gt;​&lt;\/span&gt;/g,'<span id="selection-marker-$1" class="redactor-selection-marker" data-verified="redactor">​</span>')},getTextFromHtml:function(e){e=e.replace(/<br\s?\/?>|<\/H[1-6]>|<\/p>|<\/div>|<\/li>|<\/td>/gi,"\n");var i=document.createElement("div");return i.innerHTML=e,e=i.textContent||i.innerText,t.trim(e)},getPlainText:function(t,e){return t=(t=(t=(t=this.clean.getTextFromHtml(t)).replace(/\n\s*\n/g,"\n")).replace(/\n\n/g,"\n")).replace(/\n/g,"<br />"),this.opts.paragraphize&&void 0===e&&!this.utils.browser("mozilla")&&(t=this.paragraphize.load(t)),t},getPreCode:function(t){return t=(t=t.replace(/<img(.*?) style="(.*?)"(.*?[^>])>/gi,"<img$1$3>")).replace(/<img(.*?)>/gi,"&lt;img$1&gt;"),t=this.clean.getTextFromHtml(t),this.opts.preSpaces&&(t=t.replace(/\t/g,Array(this.opts.preSpaces+1).join(" "))),this.clean.encodeEntities(t)},getOnlyImages:function(t){return(t=(t=t.replace(/<img(.*?)>/gi,"[img$1]")).replace(/<([Ss]*?)>/gi,"")).replace(/\[img(.*?)\]/gi,"<img$1>")},getOnlyLinksAndImages:function(t){return(t=(t=(t=(t=t.replace(/<a(.*?)href="(.*?)"(.*?)>([\w\W]*?)<\/a>/gi,'[a href="$2"]$4[/a]')).replace(/<img(.*?)>/gi,"[img$1]")).replace(/<(.*?)>/gi,"")).replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi,'<a href="$1">$2</a>')).replace(/\[img(.*?)\]/gi,"<img$1>")},encodeEntities:function(t){return(t=String(t).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},removeDirtyStyles:function(e){if(this.utils.browser("msie"))return e;var i=document.createElement("div");return i.innerHTML=e,this.clean.clearUnverifiedRemove(t(i)),e=i.innerHTML,t(i).remove(),e},clearUnverified:function(){if(!this.utils.browser("msie")){this.clean.clearUnverifiedRemove(this.$editor);var t=this.$editor.find("h1, h2, h3, h4, h5, h6");t.find("span").removeAttr("style"),t.find(this.opts.verifiedTags.join(", ")).removeAttr("style"),this.code.sync()}},clearUnverifiedRemove:function(e){e.find(this.opts.verifiedTags.join(", ")).removeAttr("style"),e.find("span").not('[data-verified="redactor"]').removeAttr("style"),e.find('span[data-verified="redactor"], img[data-verified="redactor"]').each((function(e,i){var n=t(i);n.attr("style",n.attr("rel"))}))},cleanEmptyParagraph:function(){},setVerified:function(t){if(this.utils.browser("msie"))return t;var e=(t=(t=t.replace(new RegExp("<img(.*?[^>])>","gi"),'<img$1 data-verified="redactor">')).replace(new RegExp("<span(.*?[^>])>","gi"),'<span$1 data-verified="redactor">')).match(new RegExp('<(span|img)(.*?)style="(.*?)"(.*?[^>])>',"gi"));if(e)for(var i=e.length,n=0;n<i;n++)try{var o=e[n].replace(/style="(.*?)"/i,'style="$1" rel="$1"');t=t.replace(e[n],o)}catch(t){}return t},convertInline:function(e){var i=t("<div />").html(e),n=this.opts.inlineTags;return n.push("span"),i.find(n.join(",")).each((function(){var e=t(this),i=this.tagName.toLowerCase();e.attr("data-redactor-tag",i),"span"==i&&(e.attr("style")?e.attr("data-redactor-style",e.attr("style")):e.attr("class")&&e.attr("data-redactor-class",e.attr("class")))})),e=i.html(),i.remove(),e},normalizeLists:function(){this.$editor.find("li").each((function(e,i){var n=t(i).next();0===n.length||"UL"!=n[0].tagName&&"OL"!=n[0].tagName||t(i).append(n)}))},removeSpaces:function(t){return(t=(t=(t=(t=(t=(t=(t=t.replace(/\n/g,"")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g," ")).replace(/[\s\n]*$/g," ")).replace(/>\s{2,}</g,"> <")).replace(/\n\n/g,"\n")).replace(/\u200B/g,"")},replaceDivs:function(t){return(t=(t=this.opts.linebreaks?(t=t.replace(/<div><br\s?\/?><\/div>/gi,"<br />")).replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"$2<br />"):t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p$1>$2</p>")).replace(/<div(.*?[^>])>/gi,"")).replace(/<\/div>/gi,"")},replaceDivsToBr:function(t){return(t=(t=t.replace(/<div\s(.*?)>/gi,"<p>")).replace(/<div><br\s?\/?><\/div>/gi,"<br /><br />")).replace(/<div>([\w\W]*?)<\/div>/gi,"$1<br /><br />")},replaceParagraphsToBr:function(t){return(t=(t=(t=t.replace(/<p\s(.*?)>/gi,"<p>")).replace(/<p><br\s?\/?><\/p>/gi,"<br />")).replace(/<p>([\w\W]*?)<\/p>/gi,"$1<br /><br />")).replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi,"</blockquote>")},saveFormTags:function(t){return t.replace(/<form(.*?)>([\w\W]*?)<\/form>/gi,'<section$1 rel="redactor-form-tag">$2</section>')},restoreFormTags:function(t){return t.replace(/<section(.*?) rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi,"<form$1$2>$3</form>")}}},code:function(){return{set:function(e){e=t.trim(e.toString()),e=this.clean.onSet(e),this.utils.browser("msie")&&(e=e.replace(/<span(.*?)id="selection-marker-(1|2)"(.*?)><\/span>/gi,"")),this.$editor.html(e),this.code.sync(),""!==e&&this.placeholder.remove(),setTimeout(t.proxy(this.buffer.add,this),15),!1===this.start&&this.observe.load()},get:function(){var t=this.$textarea.val();return this.opts.replaceDivs&&(t=this.clean.replaceDivs(t)),this.opts.linebreaks&&(t=this.clean.replaceParagraphsToBr(t)),this.tabifier.get(t)},sync:function(){setTimeout(t.proxy(this.code.startSync,this),10)},startSync:function(){var t=this.$editor.html();this.code.syncCode&&this.code.syncCode==t||this.start&&""==t||(this.code.syncCode=t,t=this.core.setCallback("syncBefore",t),t=this.clean.onSync(t),this.$textarea.val(t),this.core.setCallback("sync",t),!1===this.start&&this.core.setCallback("change",t),this.start=!1,0==this.autosave.html&&(this.autosave.html=this.code.get()),this.opts.codemirror&&this.$textarea.next(".CodeMirror").each((function(e,i){i.CodeMirror.setValue(t)})),this.autosave.onChange(),this.autosave.enable())},toggle:function(){this.opts.visual?this.code.showCode():this.code.showVisual()},showCode:function(){this.selection.save(),this.code.offset=this.caret.getOffset();var e=t(window).scrollTop(),i=(this.$editor.innerWidth(),this.$editor.innerHeight());this.$editor.hide();var n=this.$textarea.val();this.modified=this.clean.removeSpaces(n),n=this.tabifier.get(n);var o=0,r=0,s=t("<div/>").append(t.parseHTML(this.clean.onSync(this.$editor.html()),document,!0)),a=s.find("span.redactor-selection-marker");if(a.length>0){var l=this.tabifier.get(s.html()).replace(/&amp;/g,"&");1==a.length?(o=this.utils.strpos(l,s.find("#selection-marker-1").prop("outerHTML")),r=o):2==a.length&&(o=this.utils.strpos(l,s.find("#selection-marker-1").prop("outerHTML")),r=this.utils.strpos(l,s.find("#selection-marker-2").prop("outerHTML"))-s.find("#selection-marker-1").prop("outerHTML").toString().length)}this.selection.removeMarkers(),this.$textarea.val(n),this.opts.codemirror?this.$textarea.next(".CodeMirror").each((function(e,s){t(s).show(),s.CodeMirror.setValue(n),s.CodeMirror.setSize("100%",i),s.CodeMirror.refresh(),o==r?s.CodeMirror.setCursor(s.CodeMirror.posFromIndex(o).line,s.CodeMirror.posFromIndex(r).ch):s.CodeMirror.setSelection({line:s.CodeMirror.posFromIndex(o).line,ch:s.CodeMirror.posFromIndex(o).ch},{line:s.CodeMirror.posFromIndex(r).line,ch:s.CodeMirror.posFromIndex(r).ch}),s.CodeMirror.focus()})):(this.$textarea.height(i).show().focus(),this.$textarea.on("keydown.redactor-textarea-indenting",this.code.textareaIndenting),t(window).scrollTop(e),this.$textarea[0].setSelectionRange&&this.$textarea[0].setSelectionRange(o,r),this.$textarea[0].scrollTop=0),this.opts.visual=!1,this.button.setInactiveInCode(),this.button.setActive("html"),this.core.setCallback("source",n)},showVisual:function(){var t;if(!this.opts.visual){var e,i=0,n=0;if(this.opts.codemirror?this.$textarea.next(".CodeMirror").each((function(o,r){e=r.CodeMirror.listSelections(),i=r.CodeMirror.indexFromPos(e[0].anchor),n=r.CodeMirror.indexFromPos(e[0].head),t=r.CodeMirror.getValue()})):(i=this.$textarea.get(0).selectionStart,n=this.$textarea.get(0).selectionEnd,t=this.$textarea.hide().val()),i>n&&n>0){var o=i;i=n,n=o}if(i=this.code.enlargeOffset(t,i),n=this.code.enlargeOffset(t,n),t=t.substr(0,i)+this.selection.getMarkerAsHtml(1)+t.substr(i),n>i){var r=this.selection.getMarkerAsHtml(1).toString().length;t=t.substr(0,n+r)+this.selection.getMarkerAsHtml(2)+t.substr(n+r)}this.modified!==this.clean.removeSpaces(t)&&this.code.set(t),this.opts.codemirror&&this.$textarea.next(".CodeMirror").hide(),this.$editor.show(),this.utils.isEmpty(t)||this.placeholder.remove(),this.selection.restore(),this.$textarea.off("keydown.redactor-textarea-indenting"),this.button.setActiveInVisual(),this.button.setInactive("html"),this.observe.load(),this.opts.visual=!0,this.core.setCallback("visual",t)}},textareaIndenting:function(t){if(9!==t.keyCode)return!0;var e=this.$textarea,i=e.get(0).selectionStart;return e.val(e.val().substring(0,i)+"\t"+e.val().substring(e.get(0).selectionEnd)),e.get(0).selectionStart=e.get(0).selectionEnd=i+1,!1},enlargeOffset:function(t,e){var i=t.length,n=0;if(">"==t[e])n++;else for(var o=e;o<=i&&(n++,">"!=t[o]);o++)if("<"==t[o]||o==i){n=0;break}return e+n}}},core:function(){return{getObject:function(){return t.extend({},this)},getEditor:function(){return this.$editor},getBox:function(){return this.$box},getElement:function(){return this.$element},getTextarea:function(){return this.$textarea},getToolbar:function(){return!!this.$toolbar&&this.$toolbar},addEvent:function(t){this.core.event=t},getEvent:function(){return this.core.event},setCallback:function(e,i,n){var o=e+"Callback",r=this.opts[o];if(this.$textarea){var s=!1,a=t._data(this.$textarea[0],"events");if(void 0!==a&&void 0!==a[o]&&t.each(a[o],t.proxy((function(t,e){if("redactor"==e.namespace){var n=void 0===n?[i]:[i,n];s=void 0===n?e.handler.call(this,i):e.handler.call(this,i,n)}}),this)),s)return s}return t.isFunction(r)?void 0===n?r.call(this,i):r.call(this,i,n):void 0===n?i:n},destroy:function(){this.opts.destroyed=!0,this.core.setCallback("destroy"),this.$element.off(".redactor").removeData("redactor"),this.$editor.off(".redactor"),t(document).off("mousedown.redactor-blur."+this.uuid),t(document).off("mousedown.redactor."+this.uuid),t(document).off("click.redactor-image-delete."+this.uuid),t(document).off("click.redactor-image-resize-hide."+this.uuid),t(document).off("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid),t("body").off("scroll.redactor."+this.uuid),t(this.opts.toolbarFixedTarget).off("scroll.redactor."+this.uuid),this.$editor.removeClass("redactor-editor redactor-linebreaks redactor-placeholder"),this.$editor.removeAttr("contenteditable");var e=this.code.get();this.opts.toolbar&&this.$toolbar.find("a").each((function(){var e=t(this);e.data("dropdown")&&(e.data("dropdown").remove(),e.data("dropdown",{}))})),this.build.isTextarea()?(this.$box.after(this.$element),this.$box.remove(),this.$element.val(e).show()):(this.$box.after(this.$editor),this.$box.remove(),this.$element.html(e).show()),this.$pasteBox&&this.$pasteBox.remove(),this.$modalBox&&this.$modalBox.remove(),this.$modalOverlay&&this.$modalOverlay.remove(),t(".redactor-toolbar-tooltip-"+this.uuid).remove(),clearInterval(this.autosaveInterval)}}},dropdown:function(){return{build:function(e,i,n){"formatting"==e&&this.opts.formattingAdd&&t.each(this.opts.formattingAdd,t.proxy((function(t,e){var i,o=e.tag;void 0!==e.class&&(o=o+"-"+e.class),e.type=this.utils.isBlockTag(e.tag)?"block":"inline",i=void 0!==e.func?e.func:"inline"==e.type?"inline.formatting":"block.formatting",this.opts.linebreaks&&"block"==e.type&&"p"==e.tag||(this.formatting[o]={tag:e.tag,style:e.style,class:e.class,attr:e.attr,data:e.data,clear:e.clear},n[o]={func:i,title:e.title})}),this)),t.each(n,t.proxy((function(n,o){var r=t('<a href="#" class="redactor-dropdown-'+n+'" role="button">'+o.title+"</a>");"formatting"==e&&r.addClass("redactor-formatting-"+n),r.on("click",t.proxy((function(e){e.preventDefault();var i="func",r=o.func;o.command?(i="command",r=o.command):o.dropdown&&(i="dropdown",r=o.dropdown),t(e.target).hasClass("redactor-dropdown-link-inactive")||(this.button.onClick(e,n,i,r),this.dropdown.hideAll())}),this)),this.observe.addDropdown(r,n,o),i.append(r)}),this))},show:function(e,i){if(!this.opts.visual)return e.preventDefault(),!1;var n=this.button.get(i),o=n.data("dropdown").appendTo(document.body);if(this.opts.highContrast&&o.addClass("redactor-dropdown-contrast"),n.hasClass("dropact"))this.dropdown.hideAll();else{this.dropdown.hideAll(),this.observe.dropdowns(),this.core.setCallback("dropdownShow",{dropdown:o,key:i,button:n}),this.button.setActive(i),n.addClass("dropact");var r=n.offset(),s=o.width();r.left+s>t(document).width()&&(r.left=Math.max(0,r.left-s));var a=r.left+"px";if(this.$toolbar.hasClass("toolbar-fixed-box")){var l=this.$toolbar.innerHeight()+this.opts.toolbarFixedTopOffset,c="fixed";this.opts.toolbarFixedTarget!==document&&(l=this.$toolbar.innerHeight()+this.$toolbar.offset().top+this.opts.toolbarFixedTopOffset,c="absolute"),o.css({position:c,left:a,top:l+"px"}).show()}else l=n.innerHeight()+r.top+"px",o.css({position:"absolute",left:a,top:l}).show();this.core.setCallback("dropdownShown",{dropdown:o,key:i,button:n}),this.$dropdown=o}t(document).one("click.redactor-dropdown",t.proxy(this.dropdown.hide,this)),this.$editor.one("click.redactor-dropdown",t.proxy(this.dropdown.hide,this)),t(document).one("keyup.redactor-dropdown",t.proxy(this.dropdown.closeHandler,this)),o.on("mouseover.redactor-dropdown",t.proxy(this.utils.disableBodyScroll,this)).on("mouseout.redactor-dropdown",t.proxy(this.utils.enableBodyScroll,this)),e.stopPropagation()},closeHandler:function(t){t.which==this.keyCode.ESC&&(this.dropdown.hideAll(),this.$editor.focus())},hideAll:function(){this.$toolbar.find("a.dropact").removeClass("redactor-act").removeClass("dropact"),this.utils.enableBodyScroll(),t(".redactor-dropdown-"+this.uuid).hide(),t(".redactor-dropdown-link-selected").removeClass("redactor-dropdown-link-selected"),this.$dropdown&&(this.$dropdown.off(".redactor-dropdown"),this.core.setCallback("dropdownHide",this.$dropdown),this.$dropdown=!1)},hide:function(e){var i=t(e.target);i.hasClass("dropact")||i.hasClass("redactor-dropdown-link-inactive")||(i.hasClass("redactor-dropdown")&&(i.removeClass("dropact"),i.off("mouseover mouseout")),this.dropdown.hideAll())}}},file:function(){return{show:function(){this.modal.load("file",this.lang.get("file"),700),this.upload.init("#redactor-modal-file-upload",this.opts.fileUpload,this.file.insert),this.selection.save(),this.selection.get();var e=this.sel.toString();t("#redactor-filename").val(e),this.modal.show()},insert:function(e,i,n){if(void 0!==e.error)return this.modal.close(),this.selection.restore(),void this.core.setCallback("fileUploadError",e);var o;if("string"==typeof e)o=e;else{var r=t("#redactor-filename").val();void 0!==r&&""!==r||(r=e.filename),o='<a href="'+e.filelink+'" id="filelink-marker">'+r+"</a>"}if(i){this.selection.removeMarkers();var s=this.selection.getMarker();this.insert.nodeToCaretPositionFromPoint(n,s)}else this.modal.close();if(this.selection.restore(),this.buffer.set(),this.insert.htmlWithoutClean(o),"string"!=typeof e){var a=t(this.$editor.find("a#filelink-marker"));0!==a.length?a.removeAttr("id").removeAttr("style"):a=!1,this.core.setCallback("fileUpload",a,e)}}}},focus:function(){return{setStart:function(){this.$editor.focus();var t=this.$editor.children().first();if(0!==t.length&&0!==t[0].length&&"BR"!=t[0].tagName&&3!=t[0].nodeType){if("UL"==t[0].tagName||"OL"==t[0].tagName){var e=t.find("li").first();if(!this.utils.isBlock(e)&&""===e.text())return void this.caret.setStart(e)}if(this.opts.linebreaks&&!this.utils.isBlockTag(t[0].tagName))return this.selection.get(),this.range.setStart(this.$editor[0],0),this.range.setEnd(this.$editor[0],0),void this.selection.addRange();this.caret.setStart(t)}},setEnd:function(){var t=this.$editor.children().last();this.$editor.focus(),0!==t.size()&&(this.utils.isEmpty(this.$editor.html())?(this.selection.get(),this.range.collapse(!0),this.range.setStartAfter(t[0]),this.range.setEnd(t[0],0),this.selection.addRange()):(this.selection.get(),this.range.selectNodeContents(t[0]),this.range.collapse(!1),this.selection.addRange()))},isFocused:function(){return this.$editor[0]===document.activeElement}}},image:function(){return{show:function(){this.modal.load("image",this.lang.get("image"),700),this.upload.init("#redactor-modal-image-droparea",this.opts.imageUpload,this.image.insert),this.selection.save(),this.modal.show()},showEdit:function(e){var i=e.closest("a",this.$editor[0]);if(this.modal.load("imageEdit",this.lang.get("edit"),705),this.modal.createCancelButton(),this.image.buttonDelete=this.modal.createDeleteButton(this.lang.get("_delete")),this.image.buttonSave=this.modal.createActionButton(this.lang.get("save")),this.image.buttonDelete.on("click",t.proxy((function(){this.image.remove(e)}),this)),this.image.buttonSave.on("click",t.proxy((function(){this.image.update(e)}),this)),t(".redactor-link-tooltip").remove(),t("#redactor-image-title").val(e.attr("alt")),this.opts.imageLink){var n=t("#redactor-image-link");n.attr("href",e.attr("src")),0!==i.length&&(n.val(i.attr("href")),"_blank"==i.attr("target")&&t("#redactor-image-link-blank").prop("checked",!0))}else t(".redactor-image-link-option").hide();if(this.opts.imagePosition){var o="block"==e.css("display")&&"none"==e.css("float")?"center":e.css("float");t("#redactor-image-align").val(o)}else t(".redactor-image-position-option").hide();this.modal.show(),t("#redactor-image-title").focus()},setFloating:function(e){var i="",n="",o="";switch(t("#redactor-image-align").val()){case"left":i="left",o="0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+" 0";break;case"right":i="right",o="0 0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin;break;case"center":n="block",o="auto"}e.css({float:i,display:n,margin:o}),e.attr("rel",e.attr("style"))},update:function(e){this.image.hideResize(),this.buffer.set();var i,n=e.closest("a",this.$editor[0]),o=t("#redactor-image-title").val().replace(/(<([^>]+)>)/gi,"");if(e.attr("alt",o),this.image.setFloating(e),""!==(i=(i=t.trim(t("#redactor-image-link").val())).replace(/(<([^>]+)>)/gi,""))){var r="((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}",s=new RegExp("^(http|ftp|https)://"+r,"i"),a=new RegExp("^"+r,"i");-1==i.search(s)&&0===i.search(a)&&this.opts.linkProtocol&&(i=this.opts.linkProtocol+"://"+i);var l=!!t("#redactor-image-link-blank").prop("checked");if(0===n.length){var c=t('<a href="'+i+'">'+this.utils.getOuterHtml(e)+"</a>");l&&c.attr("target","_blank"),e.replaceWith(c)}else n.attr("href",i),l?n.attr("target","_blank"):n.removeAttr("target")}else 0!==n.length&&n.replaceWith(this.utils.getOuterHtml(e));this.modal.close(),this.observe.images(),this.code.sync()},setEditable:function(e){this.opts.imageEditable&&e.on("dragstart",t.proxy(this.image.onDrag,this));var i=t.proxy((function(i){this.observe.image=e,this.image.resizer=this.image.loadEditableControls(e),t(document).on("mousedown.redactor-image-resize-hide."+this.uuid,t.proxy(this.image.hideResize,this)),this.opts.imageResizable&&this.image.resizer.on("mousedown.redactor touchstart.redactor",t.proxy((function(t){this.image.setResizable(t,e)}),this))}),this);e.off("mousedown.redactor").on("mousedown.redactor",t.proxy(this.image.hideResize,this)),e.off("click.redactor touchstart.redactor").on("click.redactor touchstart.redactor",i)},setResizable:function(t,e){t.preventDefault(),this.image.resizeHandle={x:t.pageX,y:t.pageY,el:e,ratio:e.width()/e.height(),h:e.height()},(t=t.originalEvent||t).targetTouches&&(this.image.resizeHandle.x=t.targetTouches[0].pageX,this.image.resizeHandle.y=t.targetTouches[0].pageY),this.image.startResize()},startResize:function(){t(document).on("mousemove.redactor-image-resize touchmove.redactor-image-resize",t.proxy(this.image.moveResize,this)),t(document).on("mouseup.redactor-image-resize touchend.redactor-image-resize",t.proxy(this.image.stopResize,this))},moveResize:function(t){t.preventDefault(),t=t.originalEvent||t;var e=this.image.resizeHandle.h;t.targetTouches?e+=t.targetTouches[0].pageY-this.image.resizeHandle.y:e+=t.pageY-this.image.resizeHandle.y;var i=Math.round(e*this.image.resizeHandle.ratio);e<50||i<100||(e=Math.round(this.image.resizeHandle.el.width()/this.image.resizeHandle.ratio),this.image.resizeHandle.el.attr({width:i,height:e}),this.image.resizeHandle.el.width(i),this.image.resizeHandle.el.height(e),this.code.sync())},stopResize:function(){this.handle=!1,t(document).off(".redactor-image-resize"),this.image.hideResize()},onDrag:function(e){if(0!==this.$editor.find("#redactor-image-box").length)return e.preventDefault(),!1;this.$editor.on("drop.redactor-image-inside-drop",t.proxy((function(){setTimeout(t.proxy(this.image.onDrop,this),1)}),this))},onDrop:function(){this.image.fixImageSourceAfterDrop(),this.observe.images(),this.$editor.off("drop.redactor-image-inside-drop"),this.clean.clearUnverified(),this.code.sync()},fixImageSourceAfterDrop:function(){this.$editor.find("img[data-save-url]").each((function(){var e=t(this);e.attr("src",e.attr("data-save-url")),e.removeAttr("data-save-url")}))},hideResize:function(e){if(!e||0===t(e.target).closest("#redactor-image-box",this.$editor[0]).length){if(e&&"IMG"==e.target.tagName){var i=t(e.target);i.attr("data-save-url",i.attr("src"))}var n=this.$editor.find("#redactor-image-box");0!==n.length&&(t("#redactor-image-editter").remove(),t("#redactor-image-resizer").remove(),n.find("img").css({marginTop:n[0].style.marginTop,marginBottom:n[0].style.marginBottom,marginLeft:n[0].style.marginLeft,marginRight:n[0].style.marginRight}),n.css("margin",""),n.find("img").css("opacity",""),n.replaceWith((function(){return t(this).contents()})),t(document).off("mousedown.redactor-image-resize-hide."+this.uuid),void 0!==this.image.resizeHandle&&this.image.resizeHandle.el.attr("rel",this.image.resizeHandle.el.attr("style")),this.code.sync())}},loadResizableControls:function(e,i){if(this.opts.imageResizable&&!this.utils.isMobile()){var n=t('<span id="redactor-image-resizer" data-redactor="verified"></span>');return this.utils.isDesktop()||n.css({width:"15px",height:"15px"}),n.attr("contenteditable",!1),i.append(n),i.append(e),n}return i.append(e),!1},loadEditableControls:function(e){var i=t('<span id="redactor-image-box" data-redactor="verified">');if(i.css("float",e.css("float")).attr("contenteditable",!1),"auto"!=e[0].style.margin?(i.css({marginTop:e[0].style.marginTop,marginBottom:e[0].style.marginBottom,marginLeft:e[0].style.marginLeft,marginRight:e[0].style.marginRight}),e.css("margin","")):i.css({display:"block",margin:"auto"}),e.css("opacity",".5").after(i),this.opts.imageEditable){this.image.editter=t('<span id="redactor-image-editter" data-redactor="verified">'+this.lang.get("edit")+"</span>"),this.image.editter.attr("contenteditable",!1),this.image.editter.on("click",t.proxy((function(){this.image.showEdit(e)}),this)),i.append(this.image.editter);var n=this.image.editter.innerWidth();this.image.editter.css("margin-left","-"+n/2+"px")}return this.image.loadResizableControls(e,i)},remove:function(e){var i,n=t(e),o=n.closest("a",this.$editor[0]),r=n.closest("figure",this.$editor[0]),s=n.parent();0!==t("#redactor-image-box").length&&(s=t("#redactor-image-box").parent()),0!==r.length?(i=r.next(),r.remove()):0!==o.length?(s=o.parent(),o.remove()):n.remove(),t("#redactor-image-box").remove(),0!==r.length?this.caret.setStart(i):this.caret.setStart(s),this.core.setCallback("imageDelete",n[0].src,n),this.modal.close(),this.code.sync()},insert:function(e,i,n){if(void 0!==e.error)return this.modal.close(),this.selection.restore(),void this.core.setCallback("imageUploadError",e);var o;"string"==typeof e?o=t(e).attr("data-redactor-inserted-image","true"):(o=t("<img>")).attr("src",e.filelink).attr("data-redactor-inserted-image","true");var r=o,s=this.utils.isCurrentOrParent("P");if(s&&(r=t("<blockquote />").append(o)),i){this.selection.removeMarkers();var a=this.selection.getMarker();this.insert.nodeToCaretPositionFromPoint(n,a)}else this.modal.close();this.selection.restore(),this.buffer.set(),this.insert.html(this.utils.getOuterHtml(r),!1);var l=this.$editor.find("img[data-redactor-inserted-image=true]").removeAttr("data-redactor-inserted-image");s?l.parent().contents().unwrap().wrap("<p />"):this.opts.linebreaks&&(this.utils.isEmpty(this.code.get())||l.before("<br>"),l.after("<br>")),"string"!=typeof e&&this.core.setCallback("imageUpload",l,e)}}},indent:function(){return{increase:function(){this.utils.browser("msie")||this.$editor.focus(),this.buffer.set(),this.selection.save();var t=this.selection.getBlock();t&&"LI"==t.tagName?this.indent.increaseLists():!1===t&&this.opts.linebreaks?this.indent.increaseText():this.indent.increaseBlocks(),this.selection.restore(),this.code.sync()},increaseLists:function(){document.execCommand("indent"),this.indent.fixEmptyIndent(),this.clean.normalizeLists(),this.clean.clearUnverified()},increaseBlocks:function(){t.each(this.selection.getBlocks(),t.proxy((function(t,e){if("TD"!==e.tagName&&"TH"!==e.tagName){var i=this.utils.getAlignmentElement(e),n=this.utils.normalize(i.css("margin-left"))+this.opts.indentValue;i.css("margin-left",n+"px")}}),this))},increaseText:function(){var e=this.selection.wrap("div");t(e).attr("data-tagblock","redactor"),t(e).css("margin-left",this.opts.indentValue+"px")},decrease:function(){this.buffer.set(),this.selection.save();var t=this.selection.getBlock();t&&"LI"==t.tagName?this.indent.decreaseLists():this.indent.decreaseBlocks(),this.selection.restore(),this.code.sync()},decreaseLists:function(){document.execCommand("outdent");var e=this.selection.getCurrent(),i=t(e).closest("li",this.$editor[0]);this.indent.fixEmptyIndent(),this.opts.linebreaks||0!==i.length||(document.execCommand("formatblock",!1,"p"),this.$editor.find("ul, ol, blockquote, p").each(t.proxy(this.utils.removeEmpty,this))),this.clean.clearUnverified()},decreaseBlocks:function(){t.each(this.selection.getBlocks(),t.proxy((function(t,e){var i=this.utils.getAlignmentElement(e),n=this.utils.normalize(i.css("margin-left"))-this.opts.indentValue;n<=0?this.opts.linebreaks&&void 0!==i.data("tagblock")?i.replaceWith(i.html()+"<br />"):(i.css("margin-left",""),this.utils.removeEmptyAttr(i,"style")):i.css("margin-left",n+"px")}),this))},fixEmptyIndent:function(){var e=this.selection.getBlock();if(this.range.collapsed&&e&&"LI"==e.tagName&&this.utils.isEmpty(t(e).text())){var i=t(e);i.find("span").not(".redactor-selection-marker").contents().unwrap(),i.append("<br>")}}}},inline:function(){return{formatting:function(t){var e,i;void 0!==this.formatting[t].style?e="style":void 0!==this.formatting[t].class&&(e="class"),e&&(i=this.formatting[t][e]),this.inline.format(this.formatting[t].tag,e,i)},format:function(e,i,n){var o=this.selection.getCurrent();if(!(o&&"TR"===o.tagName||this.utils.isCurrentOrParent("PRE")||this.utils.isCurrentOrParentHeader())){for(var r=["b","bold","i","italic","underline","strikethrough","deleted","superscript","subscript"],s=["strong","strong","em","em","u","del","del","sup","sub"],a=0;a<r.length;a++)e==r[a]&&(e=s[a]);if(this.opts.allowedTags){if(-1==t.inArray(e,this.opts.allowedTags))return}else if(-1!==t.inArray(e,this.opts.deniedTags))return;this.inline.type=i||!1,this.inline.value=n||!1,this.buffer.set(),this.utils.browser("msie")||this.opts.linebreaks||this.$editor.focus(),this.selection.get(),this.range.collapsed?this.inline.formatCollapsed(e):this.inline.formatMultiple(e)}},formatCollapsed:function(e){var i=this.selection.getCurrent(),n=t(i).closest(e+"[data-redactor-tag="+e+"]",this.$editor[0]);if(0===n.length||"style"==this.inline.type||"SPAN"==n[0].tagName){(o=t("<"+e+">").attr("data-verified","redactor").attr("data-redactor-tag",e)).html(this.opts.invisibleSpace),o=this.inline.setFormat(o);var o=this.insert.node(o);this.caret.setEnd(o),this.code.sync()}else this.utils.isEmpty(n.text())?(this.caret.setAfter(n[0]),n.remove(),this.code.sync()):this.utils.isEndOfElement(n)&&this.caret.setAfter(n[0])},formatMultiple:function(e){if(this.inline.formatConvert(e),this.selection.save(),document.execCommand("strikethrough"),this.$editor.find("strike").each(t.proxy((function(i,n){var o,r=t(n);this.inline.formatRemoveSameChildren(r,e),this.inline.type?(o=t("<span>").attr("data-redactor-tag",e).attr("data-verified","redactor"),o=this.inline.setFormat(o)):o=t("<"+e+">").attr("data-redactor-tag",e).attr("data-verified","redactor"),r.replaceWith(o.html(r.contents()));var s=o.parent();if("A"===o[0].tagName&&s&&"U"===s[0].tagName&&o.parent().replaceWith(o),"span"==e&&s&&"SPAN"===s[0].tagName&&"style"===this.inline.type)for(var a=this.inline.value.split(";"),l=0;l<a.length;l++){if(""===a[l])return;var c=a[l].split(":");s.css(c[0],""),this.utils.removeEmptyAttr(s,"style")&&s.replaceWith(s.contents())}}),this)),"span"!=e&&this.$editor.find(this.opts.inlineTags.join(", ")).each(t.proxy((function(e,i){var n=t(i);"U"!==i.tagName||0!==i.attributes.length?"line-through"===n.css("text-decoration")&&(n.css("text-decoration",""),this.utils.removeEmptyAttr(n,"style")):n.replaceWith(n.contents())}),this)),"del"!=e){var i=this;this.$editor.find("inline").each((function(t,e){i.utils.replaceToTag(e,"del")}))}"u"!=e&&(i=this,this.$editor.find("unline").each((function(t,e){i.utils.replaceToTag(e,"u")}))),this.selection.restore(),this.code.sync()},formatRemoveSameChildren:function(e,i){var n=this;e.children(i).each((function(){var e=t(this);if(!e.hasClass("redactor-selection-marker"))if("style"==n.inline.type)for(var i=n.inline.value.split(";"),o=0;o<i.length;o++){if(""===i[o])return;var r=i[o].split(":");e.css(r[0],""),n.utils.removeEmptyAttr(e,"style")&&e.replaceWith(e.contents())}else e.contents().unwrap()}))},formatConvert:function(e){this.selection.save();var i="";"class"==this.inline.type?i="[data-redactor-class="+this.inline.value+"]":"style"==this.inline.type&&(i='[data-redactor-style="'+this.inline.value+'"]');var n=this;"del"!=e&&this.$editor.find("del").each((function(t,e){n.utils.replaceToTag(e,"inline")})),"u"!=e&&this.$editor.find("u").each((function(t,e){n.utils.replaceToTag(e,"unline")})),"span"!=e&&this.$editor.find(e).each((function(){var e=t(this);e.replaceWith(t("<strike />").html(e.contents()))})),this.$editor.find('[data-redactor-tag="'+e+'"]'+i).each((function(){if(""!==i||"span"!=e||this.tagName.toLowerCase()!=e){var n=t(this);n.replaceWith(t("<strike />").html(n.contents()))}})),this.selection.restore()},setFormat:function(t){switch(this.inline.type){case"class":t.hasClass(this.inline.value)?(t.removeClass(this.inline.value),t.removeAttr("data-redactor-class")):(t.addClass(this.inline.value),t.attr("data-redactor-class",this.inline.value));break;case"style":t[0].style.cssText=this.inline.value,t.attr("data-redactor-style",this.inline.value)}return t},removeStyle:function(){this.buffer.set();var e=this.selection.getCurrent(),i=this.selection.getInlines();if(this.selection.save(),e&&"SPAN"===e.tagName){var n=t(e);n.removeAttr("style"),0===n[0].attributes.length&&n.replaceWith(n.contents())}t.each(i,t.proxy((function(e,i){var n=t(i);-1==t.inArray(i.tagName.toLowerCase(),this.opts.inlineTags)||n.hasClass("redactor-selection-marker")||(n.removeAttr("style"),0===n[0].attributes.length&&n.replaceWith(n.contents()))}),this)),this.selection.restore(),this.code.sync()},removeStyleRule:function(e){this.buffer.set();var i=this.selection.getParent(),n=this.selection.getInlines();if(this.selection.save(),i&&"SPAN"===i.tagName){var o=t(i);o.css(e,""),this.utils.removeEmptyAttr(o,"style"),0===o[0].attributes.length&&o.replaceWith(o.contents())}t.each(n,t.proxy((function(i,n){var o=t(n);-1==t.inArray(n.tagName.toLowerCase(),this.opts.inlineTags)||o.hasClass("redactor-selection-marker")||(o.css(e,""),this.utils.removeEmptyAttr(o,"style"),0===o[0].attributes.length&&o.replaceWith(o.contents()))}),this)),this.selection.restore(),this.code.sync()},removeFormat:function(){this.buffer.set();var e=this.selection.getCurrent();this.selection.save(),document.execCommand("removeFormat"),e&&"SPAN"===e.tagName&&t(e).replaceWith(t(e).contents()),t.each(this.selection.getNodes(),t.proxy((function(e,i){var n=t(i);-1==t.inArray(i.tagName.toLowerCase(),this.opts.inlineTags)||n.hasClass("redactor-selection-marker")||n.replaceWith(n.contents())}),this)),this.selection.restore(),this.code.sync()},toggleClass:function(t){this.inline.format("span","class",t)},toggleStyle:function(t){this.inline.format("span","style",t)}}},insert:function(){return{set:function(e,i){this.placeholder.remove(),e=this.clean.setVerified(e),void 0===i&&(e=this.clean.onPaste(e,!1)),this.$editor.html(e),this.selection.remove(),this.focus.setEnd(),this.clean.normalizeLists(),this.code.sync(),this.observe.load(),void 0===i&&setTimeout(t.proxy(this.clean.clearUnverified,this),10)},text:function(e){if(this.placeholder.remove(),e=e.toString(),e=t.trim(e),e=this.clean.getPlainText(e,!1),this.$editor.focus(),this.utils.browser("msie"))this.insert.htmlIe(e);else{this.selection.get(),this.range.deleteContents();var i=document.createElement("div");i.innerHTML=e;for(var n,o,r=document.createDocumentFragment();n=i.firstChild;)o=r.appendChild(n);if(this.range.insertNode(r),o){var s=this.range.cloneRange();s.setStartAfter(o),s.collapse(!0),this.sel.removeAllRanges(),this.sel.addRange(s)}}this.code.sync(),this.clean.clearUnverified()},htmlWithoutClean:function(t){this.insert.html(t,!1)},html:function(e,i){this.placeholder.remove(),void 0===i&&(i=!0),this.opts.linebreaks||this.$editor.focus(),e=this.clean.setVerified(e),i&&(e=this.clean.onPaste(e)),this.utils.browser("msie")?this.insert.htmlIe(e):(this.clean.singleLine?this.insert.execHtml(e):document.execCommand("insertHTML",!1,e),this.insert.htmlFixMozilla()),this.clean.normalizeLists(),this.opts.linebreaks||this.$editor.find("p").each(t.proxy(this.utils.removeEmpty,this)),this.code.sync(),this.observe.load(),i&&this.clean.clearUnverified()},htmlFixMozilla:function(){if(this.utils.browser("mozilla")){var e=t(this.selection.getBlock()).next();e.length>0&&"P"==e[0].tagName&&""===e.html()&&e.remove()}},htmlIe:function(e){if(this.utils.isIe11()){var i=this.utils.isCurrentOrParent("P"),n=t("<div>").append(e).contents().is("p, :header, dl, ul, ol, div, table, td, blockquote, pre, address, section, header, footer, aside, article");i&&n?this.insert.ie11FixInserting(i,e):this.insert.ie11PasteFrag(e)}else document.selection.createRange().pasteHTML(e)},execHtml:function(t){t=this.clean.setVerified(t),this.selection.get(),this.range.deleteContents();var e=document.createElement("div");e.innerHTML=t;for(var i,n,o=document.createDocumentFragment();i=e.firstChild;)n=o.appendChild(i);this.range.insertNode(o),this.range.collapse(!0),this.caret.setAfter(n)},node:function(e,i){e=e[0]||e;var n=this.caret.getOffset(),o=this.utils.getOuterHtml(e);return null!==(o=this.clean.setVerified(o)).match(/</g)&&(e=t(o)[0]),this.selection.get(),!1!==i&&this.range.deleteContents(),this.range.insertNode(e),this.range.collapse(!1),this.selection.addRange(),this.caret.setOffset(n),e},nodeToPoint:function(t,e,i){var n;if(t=t[0]||t,this.selection.get(),document.caretPositionFromPoint){var o=document.caretPositionFromPoint(e,i);this.range.setStart(o.offsetNode,o.offset),this.range.collapse(!0),this.range.insertNode(t)}else if(document.caretRangeFromPoint)(n=document.caretRangeFromPoint(e,i)).insertNode(t);else if(void 0!==document.body.createTextRange){(n=document.body.createTextRange()).moveToPoint(e,i);var r=n.duplicate();r.moveToPoint(e,i),n.setEndPoint("EndToEnd",r),n.select()}},nodeToCaretPositionFromPoint:function(t,e){var i;e=e[0]||e;var n=t.clientX,o=t.clientY;if(document.caretPositionFromPoint){var r=document.caretPositionFromPoint(n,o);(i=document.getSelection().getRangeAt(0)).setStart(r.offsetNode,r.offset),i.collapse(!0),i.insertNode(e)}else if(document.caretRangeFromPoint)(i=document.caretRangeFromPoint(n,o)).insertNode(e);else if(void 0!==document.body.createTextRange){(i=document.body.createTextRange()).moveToPoint(n,o);var s=i.duplicate();s.moveToPoint(n,o),i.setEndPoint("EndToEnd",s),i.select()}},ie11FixInserting:function(e,i){var n=document.createElement("span");n.className="redactor-ie-paste",this.insert.node(n);var o=t(e).html();o=(o="<p>"+o.replace(/<span class="redactor-ie-paste"><\/span>/gi,"</p>"+i+"<p>")+"</p>").replace(/<p><\/p>/gi,""),t(e).replaceWith(o)},ie11PasteFrag:function(t){this.selection.get(),this.range.deleteContents();var e=document.createElement("div");e.innerHTML=t;for(var i,n=document.createDocumentFragment();i=e.firstChild;)n.appendChild(i);this.range.insertNode(n),this.range.collapse(!1),this.selection.addRange()}}},keydown:function(){return{init:function(e){if(!this.rtePaste){var i=e.which,n=i>=37&&i<=40;if(this.keydown.ctrl=e.ctrlKey||e.metaKey,this.keydown.current=this.selection.getCurrent(),this.keydown.parent=this.selection.getParent(),this.keydown.block=this.selection.getBlock(),this.keydown.pre=this.utils.isTag(this.keydown.current,"pre"),this.keydown.blockquote=this.utils.isTag(this.keydown.current,"blockquote"),this.keydown.figcaption=this.utils.isTag(this.keydown.current,"figcaption"),this.shortcuts.init(e,i),this.utils.isDesktop()&&(this.keydown.checkEvents(n,i),this.keydown.setupBuffer(e,i)),this.keydown.addArrowsEvent(n),this.keydown.setupSelectAll(e,i),!1===this.core.setCallback("keydown",e))return e.preventDefault(),!1;if(this.opts.enterKey&&(this.utils.browser("msie")||this.utils.browser("mozilla"))&&(i===this.keyCode.DOWN||i===this.keyCode.RIGHT)){var o=!1,r=!1;if(this.keydown.block&&"TD"===this.keydown.block.tagName&&(r=t(this.keydown.block).closest("table",this.$editor[0])),r&&r.find("td").last()[0]===this.keydown.block&&(o=!0),this.utils.isEndOfElement()&&o){var s=t(this.opts.emptyHtml);r.after(s),this.caret.setStart(s)}}if(this.opts.enterKey&&i===this.keyCode.DOWN&&this.keydown.onArrowDown(),!this.opts.enterKey&&i===this.keyCode.ENTER)return e.preventDefault(),void(this.range.collapsed||this.range.deleteContents());if(i==this.keyCode.ENTER&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey){var a,l;if(!1===this.core.setCallback("enter",e))return e.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(e))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(e);if(this.keydown.blockquote||this.keydown.figcaption)return a=this.selection.getCurrent(),0!==(l=t(a).next()).length&&"BR"==l[0].tagName?this.keydown.insertBreakLine(e):this.utils.isEndOfElement()&&a&&"SPAN"!=a?this.keydown.insertDblBreakLine(e):this.keydown.insertBreakLine(e);if(this.opts.linebreaks&&!this.keydown.block)return a=this.selection.getCurrent(),0!==(l=t(this.keydown.current).next()).length&&"BR"==l[0].tagName?this.keydown.insertBreakLine(e):!1!==a&&t(a).hasClass("redactor-invisible-space")?(this.caret.setAfter(a),t(a).contents().unwrap(),this.keydown.insertDblBreakLine(e)):this.utils.isEndOfEditor()?this.keydown.insertDblBreakLine(e):(0===l.length&&!1===a&&l.context,this.keydown.insertBreakLine(e));if(this.opts.linebreaks&&this.keydown.block)setTimeout(t.proxy(this.keydown.replaceDivToBreakLine,this),1);else if(!this.opts.linebreaks&&this.keydown.block){if(setTimeout(t.proxy(this.keydown.replaceDivToParagraph,this),1),"LI"===this.keydown.block.tagName){a=this.selection.getCurrent();var c=t(a).closest("li",this.$editor[0]),d=c.closest("ul,ol",this.$editor[0]);if(0!==c.length&&this.utils.isEmpty(c.html())&&0===d.next().length&&this.utils.isEmpty(d.find("li").last().html()))return d.find("li").last().remove(),s=t(this.opts.emptyHtml),d.after(s),this.caret.setStart(s),!1}}else if(!this.opts.linebreaks&&!this.keydown.block)return this.keydown.insertParagraph(e)}if(i===this.keyCode.ENTER&&(e.ctrlKey||e.shiftKey))return this.keydown.onShiftEnter(e);if(i===this.keyCode.TAB||e.metaKey&&221===i||e.metaKey&&219===i)return this.keydown.onTab(e,i);if(i===this.keyCode.BACKSPACE||i===this.keyCode.DELETE){var h=this.selection.getNodes();if(h)for(var u,p=h.length,f=0;f<p;f++){var g=t(h[f]).children("img");if(0!==g.length){var m=this;t.each(g,(function(e,i){var n=t(i);"none"==n.css("float")&&(m.core.setCallback("imageDelete",i.src,n),u=i)}))}else"IMG"==h[f].tagName&&u!=h[f]&&(this.core.setCallback("imageDelete",h[f].src,t(h[f])),u=h[f])}}if(i===this.keyCode.BACKSPACE){var v=this.selection.getBlock(),y="0px"!==t(v).css("margin-left");if(v&&y&&this.range.collapsed&&this.utils.isStartOfElement())return this.indent.decrease(),void e.preventDefault();if(this.utils.browser("mozilla")){var b=this.selection.getPrev(),x=t(b).prev()[0];b&&"HR"===b.tagName&&t(b).remove(),x&&"HR"===x.tagName&&t(x).remove()}this.keydown.removeInvisibleSpace(),this.keydown.removeEmptyListInTable(e)}this.code.sync()}},checkEvents:function(t,e){t||"click"!=this.core.getEvent()&&"arrow"!=this.core.getEvent()||(this.core.addEvent(!1),this.keydown.checkKeyEvents(e)&&this.buffer.set())},checkKeyEvents:function(e){var i=this.keyCode,n=[i.BACKSPACE,i.DELETE,i.ENTER,i.ESC,i.TAB,i.CTRL,i.META,i.ALT,i.SHIFT];return-1==t.inArray(e,n)},addArrowsEvent:function(t){t&&("click"!=this.core.getEvent()&&"arrow"!=this.core.getEvent()?this.core.addEvent("arrow"):this.core.addEvent(!1))},setupBuffer:function(t,e){return this.keydown.ctrl&&90===e&&!t.shiftKey&&!t.altKey&&this.opts.buffer.length?(t.preventDefault(),void this.buffer.undo()):this.keydown.ctrl&&90===e&&t.shiftKey&&!t.altKey&&0!==this.opts.rebuffer.length?(t.preventDefault(),void this.buffer.redo()):void(this.keydown.ctrl||e!=this.keyCode.BACKSPACE&&e!=this.keyCode.DELETE&&(e!=this.keyCode.ENTER||t.ctrlKey||t.shiftKey)||this.buffer.set())},setupSelectAll:function(t,e){this.keydown.ctrl&&65===e?this.utils.enableSelectAll():e==this.keyCode.LEFT_WIN||this.keydown.ctrl||this.utils.disableSelectAll()},onArrowDown:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],e=0;e<t.length;e++)if(t[e])return this.keydown.insertAfterLastElement(t[e]),!1},onShiftEnter:function(t){return this.buffer.set(),this.utils.isEndOfElement()?this.keydown.insertDblBreakLine(t):this.keydown.insertBreakLine(t)},onTab:function(t,e){return!this.opts.tabKey||!(!this.utils.isEmpty(this.code.get())||!1!==this.opts.tabAsSpaces)||(t.preventDefault(),this.keydown.pre&&!t.shiftKey?(i=this.opts.preSpaces?document.createTextNode(Array(this.opts.preSpaces+1).join(" ")):document.createTextNode("\t"),this.insert.node(i),this.code.sync()):!1!==this.opts.tabAsSpaces?(i=document.createTextNode(Array(this.opts.tabAsSpaces+1).join(" ")),this.insert.node(i),this.code.sync()):t.metaKey&&219===e?this.indent.decrease():t.metaKey&&221===e?this.indent.increase():t.shiftKey?this.indent.decrease():this.indent.increase(),!1);var i},replaceDivToBreakLine:function(){var e=this.selection.getBlock(),i=e.innerHTML.replace(/<br\s?\/?>/gi,"");if(("DIV"===e.tagName||"P"===e.tagName)&&""===i&&!t(e).hasClass("redactor-editor")){var n=document.createElement("br");return t(e).replaceWith(n),this.caret.setBefore(n),this.code.sync(),!1}},replaceDivToParagraph:function(){var e=this.selection.getBlock(),i=e.innerHTML.replace(/<br\s?\/?>/gi,"");if("DIV"===e.tagName&&this.utils.isEmpty(i)&&!t(e).hasClass("redactor-editor")){var n=document.createElement("p");return n.innerHTML=this.opts.invisibleSpace,t(e).replaceWith(n),this.caret.setStart(n),this.code.sync(),!1}this.opts.cleanStyleOnEnter&&"P"==e.tagName&&t(e).removeAttr("class").removeAttr("style")},insertParagraph:function(t){t.preventDefault(),this.selection.get();var e=document.createElement("p");return e.innerHTML=this.opts.invisibleSpace,this.range.deleteContents(),this.range.insertNode(e),this.caret.setStart(e),this.code.sync(),!1},exitFromBlockquote:function(e){if(this.utils.isEndOfElement()){var i=t.trim(t(this.keydown.block).html());if(-1!=i.search(/(<br\s?\/?>){2}$/i)){if(e.preventDefault(),this.opts.linebreaks){var n=document.createElement("br");t(this.keydown.blockquote).after(n),this.caret.setBefore(n),t(this.keydown.block).html(i.replace(/<br\s?\/?>$/i,""))}else{var o=t(this.opts.emptyHtml);t(this.keydown.blockquote).after(o),this.caret.setStart(o)}return!0}}},insertAfterLastElement:function(e){if(this.utils.isEndOfElement())if(this.buffer.set(),this.opts.linebreaks){var i=t("<div>").append(t.trim(this.$editor.html())).contents(),n=i.last()[0];if("SPAN"==n.tagName&&""===n.innerHTML&&(n=i.prev()[0]),this.utils.getOuterHtml(n)!=this.utils.getOuterHtml(e))return;var o=document.createElement("br");t(e).after(o),this.caret.setAfter(o)}else{if(this.$editor.contents().last()[0]!==e)return;var r=t(this.opts.emptyHtml);t(e).after(r),this.caret.setStart(r)}},insertNewLine:function(t){t.preventDefault();var e=document.createTextNode("\n");return this.selection.get(),this.range.deleteContents(),this.range.insertNode(e),this.caret.setAfter(e),this.code.sync(),!1},insertBreakLine:function(t){return this.keydown.insertBreakLineProcessing(t)},insertDblBreakLine:function(t){return this.keydown.insertBreakLineProcessing(t,!0)},insertBreakLineProcessing:function(e,i){e.stopPropagation(),this.selection.get();var n=document.createElement("br");this.utils.browser("msie")?(this.range.collapse(!1),this.range.setEnd(this.range.endContainer,this.range.endOffset)):this.range.deleteContents(),this.range.insertNode(n);var o=t(n).parent("a");if(o.length>0&&(o.find(n).remove(),o.after(n)),!0===i){var r=t(n).next();if(0!==r.length&&"BR"===r[0].tagName&&this.utils.isEndOfEditor())return this.caret.setAfter(n),this.code.sync(),!1;var s=document.createElement("br");this.range.insertNode(s),this.caret.setAfter(s)}else if(this.utils.browser("msie")){var a=document.createElement("span");a.innerHTML="&#x200b;",t(n).after(a),this.range.setStartAfter(a),this.range.setEndAfter(a),t(a).remove()}else{var l=document.createRange();l.setStartAfter(n),l.collapse(!0);var c=window.getSelection();c.removeAllRanges(),c.addRange(l)}return this.code.sync(),!1},removeInvisibleSpace:function(){var e=t(this.keydown.current);0===e.text().search(/^\u200B$/g)&&e.remove()},removeEmptyListInTable:function(e){var i=t(this.keydown.current),n=t(this.keydown.parent),o=i.closest("td",this.$editor[0]);if(0!==o.length&&i.closest("li",this.$editor[0])&&1===n.children("li").length){if(!this.utils.isEmpty(i.text()))return;e.preventDefault(),i.remove(),n.remove(),this.caret.setStart(o)}}}},keyup:function(){return{init:function(e){if(!this.rtePaste){var i=e.which;this.keyup.current=this.selection.getCurrent(),this.keyup.parent=this.selection.getParent();var n=this.utils.isRedactorParent(t(this.keyup.parent).parent());if(!1===this.core.setCallback("keyup",e))return e.preventDefault(),!1;if(!this.opts.linebreaks&&3===this.keyup.current.nodeType&&this.keyup.current.length<=1&&(!1===this.keyup.parent||"BODY"==this.keyup.parent.tagName)&&this.keyup.replaceToParagraph(),!this.opts.linebreaks&&this.utils.isRedactorParent(this.keyup.current)&&"DIV"===this.keyup.current.tagName&&this.keyup.replaceToParagraph(!1),this.opts.linebreaks||!t(this.keyup.parent).hasClass("redactor-invisible-space")||!1!==n&&"BODY"!=n[0].tagName||(t(this.keyup.parent).contents().unwrap(),this.keyup.replaceToParagraph()),this.linkify.isEnabled()&&this.linkify.isKey(i)&&this.linkify.format(),i===this.keyCode.DELETE||i===this.keyCode.BACKSPACE){if(this.utils.browser("mozilla")){var o=t(this.keydown.current).closest("td",this.$editor[0]);if(0!==o.size()&&""!==o.text())return e.preventDefault(),!1}return this.clean.clearUnverified(),this.observe.image?(e.preventDefault(),this.image.hideResize(),this.buffer.set(),this.image.remove(this.observe.image),this.observe.image=!1,!1):(this.$editor.find("p").each(t.proxy((function(e,i){this.utils.removeEmpty(e,t(i).html())}),this)),this.opts.linebreaks&&this.keyup.current&&"DIV"==this.keyup.current.tagName&&this.utils.isEmpty(this.keyup.current.innerHTML)&&(t(this.keyup.current).after(this.selection.getMarkerAsHtml()),this.selection.restore(),t(this.keyup.current).remove()),this.keyup.removeEmptyLists(),this.keyup.formatEmpty(e))}}},replaceToParagraph:function(e){var i,n=t(this.keyup.current);i=!1===e?t("<p>").append(n.html()):t("<p>").append(n.clone()),n.replaceWith(i);var o=t(i).next();void 0!==o[0]&&"BR"==o[0].tagName&&o.remove(),this.caret.setEnd(i)},removeEmptyLists:function(){var e=function(){""===t.trim(this.innerHTML).replace(/\/t\/n/g,"")&&t(this).remove()};this.$editor.find("li").each(e),this.$editor.find("ul, ol").each(e)},formatEmpty:function(e){var i=t.trim(this.$editor.html());if(this.utils.isEmpty(i))return e.preventDefault(),this.opts.linebreaks?(this.$editor.html(this.selection.getMarkerAsHtml()),this.selection.restore()):(this.$editor.html(this.opts.emptyHtml),this.focus.setStart()),this.code.sync(),!1}}},lang:function(){return{load:function(){this.opts.curLang=this.opts.langs[this.opts.lang]},get:function(t){return void 0!==this.opts.curLang[t]?this.opts.curLang[t]:""}}},line:function(){return{insert:function(){this.buffer.set();var t=this.selection.getBlocks();!1!==t[0]&&this.line.isExceptLastOrFirst(t)?this.utils.browser("msie")||this.$editor.focus():this.utils.browser("msie")?this.line.insertInIe():this.line.insertInOthersBrowsers()},isExceptLastOrFirst:function(e){var i=["li","td","th","blockquote","figcaption","pre","dl","dt","dd"],n=e[0].tagName.toLowerCase(),o=this.selection.getLastBlock();o=void 0===o?n:o.tagName.toLowerCase();var r=-1!=t.inArray(n,i),s=-1!=t.inArray(o,i);if(r&&s||r)return!0},insertInIe:function(){this.utils.saveScroll(),this.buffer.set(),this.insert.node(document.createElement("hr")),this.utils.restoreScroll(),this.code.sync()},insertInOthersBrowsers:function(){this.buffer.set();var t='<p id="redactor-insert-line"><br /></p>';this.opts.linebreaks&&(t='<br id="redactor-insert-line">'),document.execCommand("insertHtml",!1,"<hr>"+t),this.line.setFocus(),this.code.sync()},setFocus:function(){var e=this.$editor.find("#redactor-insert-line"),i=t(e).next()[0],n=i;this.utils.browser("mozilla")&&i&&""===i.innerHTML&&(n=t(i).next()[0],t(i).remove()),n?(e.remove(),this.opts.linebreaks||(this.$editor.focus(),this.line.setStart(n))):(e.removeAttr("id"),this.line.setStart(e[0]))},setStart:function(t){if(void 0!==t){var e=document.createTextNode("​");this.selection.get(),this.range.setStart(t,0),this.range.insertNode(e),this.range.collapse(!0),this.selection.addRange()}}}},link:function(){return{show:function(e){void 0!==e&&e.preventDefault&&e.preventDefault(),this.observe.isCurrent("a")?this.modal.load("link",this.lang.get("link_edit"),600):this.modal.load("link",this.lang.get("link_insert"),600),this.modal.createCancelButton();var i=this.observe.isCurrent("a")?this.lang.get("edit"):this.lang.get("insert");this.link.buttonInsert=this.modal.createActionButton(i),this.selection.get(),this.link.getData(),this.link.cleanUrl(),"_blank"==this.link.target&&t("#redactor-link-blank").prop("checked",!0),this.link.$inputUrl=t("#redactor-link-url"),this.link.$inputText=t("#redactor-link-url-text"),this.link.$inputText.val(this.link.text),this.link.$inputUrl.val(this.link.url),this.link.buttonInsert.on("click",t.proxy(this.link.insert,this)),t(".redactor-link-tooltip").remove(),this.selection.save(),this.modal.show(),this.link.$inputUrl.focus()},cleanUrl:function(){var t=self.location.href.replace(/\/$/i,"");if(void 0!==this.link.url&&(this.link.url=this.link.url.replace(t,""),this.link.url=this.link.url.replace(/^\/#/,"#"),this.link.url=this.link.url.replace("mailto:",""),!this.opts.linkProtocol)){var e=new RegExp("^(http|ftp|https)://"+self.location.host,"i");this.link.url=this.link.url.replace(e,"")}},getData:function(){this.link.$node=!1;var e=t(this.selection.getCurrent()).closest("a",this.$editor[0]);0!==e.length&&"A"===e[0].tagName?(this.link.$node=e,this.link.url=e.attr("href"),this.link.text=e.text(),this.link.target=e.attr("target")):(this.link.text=this.sel.toString(),this.link.url="",this.link.target="")},insert:function(){this.placeholder.remove();var e="",i=this.link.$inputUrl.val(),n=this.link.$inputText.val().replace(/(<([^>]+)>)/gi,"");if(""!==t.trim(i)){if(-1!=i.search("@")&&!1===/(http|ftp|https):\/\//i.test(i))i="mailto:"+(i=i.replace("mailto:",""));else if(0!==i.search("#")){t("#redactor-link-blank").prop("checked")&&(e="_blank");var o="((xn--)?[a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}",r=new RegExp("^(http|ftp|https)://"+o,"i"),s=new RegExp("^"+o,"i"),a=new RegExp(".(html|php)$","i");-1==i.search(r)&&-1==i.search(a)&&0===i.search(s)&&this.opts.linkProtocol&&(i=this.opts.linkProtocol+"://"+i)}this.link.set(n,i,e),this.modal.close()}else this.link.$inputUrl.addClass("redactor-input-error").on("keyup",(function(){t(this).removeClass("redactor-input-error"),t(this).off("keyup")}))},set:function(e,i,n){e=t.trim(e.replace(/<|>/g,"")),this.selection.restore();var o=this.selection.getBlocks();if(""!==e||""!==i){if(""===e&&""!==i&&(e=i),this.link.$node){this.buffer.set();var r=this.link.$node,s=r.children();if(s.length>0){for(;s.length;)s=s.children();s=s.end()}else s=r;r.attr("href",i),s.text(e),""!==n?r.attr("target",n):r.removeAttr("target"),this.selection.selectElement(r),this.code.sync()}else{if(this.utils.browser("mozilla")&&""===this.link.text){var a=t("<a />").attr("href",i).text(e);""!==n&&a.attr("target",n),a=t(this.insert.node(a)),this.opts.linebreaks&&a.after("&nbsp;"),this.selection.selectElement(a)}else this.utils.browser("msie")?(a=t('<a href="'+i+'">').text(e),""!==n&&a.attr("target",n),a=t(this.insert.node(a)),this.selection.getText().match(/\s$/)&&a.after(" "),this.selection.selectElement(a)):(document.execCommand("createLink",!1,i),a=t(this.selection.getCurrent()).closest("a",this.$editor[0]),this.utils.browser("mozilla")&&(a=t('a[_moz_dirty=""]')),""!==n&&a.attr("target",n),a.removeAttr("style").removeAttr("_moz_dirty"),this.selection.getText().match(/\s$/)&&a.after(" "),""===this.link.text&&this.link.text==e||((!this.opts.linebreaks&&o&&o.length<=1||this.opts.linebreaks)&&a.text(e),this.selection.selectElement(a)));this.code.sync(),this.core.setCallback("insertedLink",a)}setTimeout(t.proxy((function(){this.observe.links()}),this),5)}},unlink:function(e){void 0!==e&&e.preventDefault&&e.preventDefault();var i=this.selection.getNodes();if(i){this.buffer.set();for(var n=i.length,o=[],r=0;r<n;r++){"A"===i[r].tagName&&o.push(i[r]);var s=t(i[r]).closest("a",this.$editor[0]);s.replaceWith(s.contents())}this.core.setCallback("deletedLink",o),t(".redactor-link-tooltip").remove(),this.code.sync()}},toggleClass:function(t){this.link.setClass(t,"toggleClass")},addClass:function(t){this.link.setClass(t,"addClass")},removeClass:function(t){this.link.setClass(t,"removeClass")},setClass:function(e,i){var n=this.selection.getInlinesTags(["a"]);!1!==n&&t.each(n,(function(){t(this)[i](e)}))}}},linkify:function(){return{isKey:function(t){return t==this.keyCode.ENTER||t==this.keyCode.SPACE},isEnabled:function(){return this.opts.convertLinks&&(this.opts.convertUrlLinks||this.opts.convertImageLinks||this.opts.convertVideoLinks)&&!this.utils.isCurrentOrParent("PRE")},format:function(){var e=this.linkify,i=this.opts;this.$editor.find(":not(iframe,img,a,pre)").addBack().contents().filter((function(){return 3===this.nodeType&&""!=t.trim(this.nodeValue)&&!t(this).parent().is("pre")&&(this.nodeValue.match(i.linkify.regexps.youtube)||this.nodeValue.match(i.linkify.regexps.vimeo)||this.nodeValue.match(i.linkify.regexps.image)||this.nodeValue.match(i.linkify.regexps.url))})).each((function(){var n=t(this).text(),o=n;i.convertVideoLinks&&(o.match(i.linkify.regexps.youtube)||o.match(i.linkify.regexps.vimeo))?o=e.convertVideoLinks(o):i.convertImageLinks&&o.match(i.linkify.regexps.image)?o=e.convertImages(o):i.convertUrlLinks&&(o=e.convertLinks(o)),t(this).before(n.replace(n,o)).remove()}));var n=this.$editor.find(".redactor-linkify-object").each((function(){var e=t(this);return e.removeClass("redactor-linkify-object"),""===e.attr("class")&&e.removeAttr("class"),e[0]}));setTimeout(t.proxy((function(){this.observe.load(),this.core.setCallback("linkify",n)}),this),100),this.code.sync()},convertVideoLinks:function(t){var e='<iframe class="redactor-linkify-object" width="500" height="281" src="',i='" frameborder="0" allowfullscreen></iframe>';return t.match(this.opts.linkify.regexps.youtube)&&(t=t.replace(this.opts.linkify.regexps.youtube,e+"//www.youtube.com/embed/$1"+i)),t.match(this.opts.linkify.regexps.vimeo)&&(t=t.replace(this.opts.linkify.regexps.vimeo,e+"//player.vimeo.com/video/$2"+i)),t},convertImages:function(t){var e=t.match(this.opts.linkify.regexps.image);return e&&(t=t.replace(t,'<img src="'+e+'" class="redactor-linkify-object" />'),this.opts.linebreaks&&(this.utils.isEmpty(this.code.get())||(t="<br>"+t)),t+="<br>"),t},convertLinks:function(e){var i=e.match(this.opts.linkify.regexps.url);if(i)for(var n=(i=t.grep(i,(function(e,n){return t.inArray(e,i)===n}))).length,o=0;o<n;o++){var r=i[o],s=r,a=this.opts.linkProtocol+"://";null!==r.match(/(https?|ftp):\/\//i)&&(a=""),s.length>this.opts.linkSize&&(s=s.substring(0,this.opts.linkSize)+"..."),-1===s.search("%")&&(s=decodeURIComponent(s));var l="\\b";-1!=t.inArray(r.slice(-1),["/","&","="])&&(l="");var c=new RegExp("("+r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+l+")","g");e=e.replace(c,'<a href="'+a+t.trim(r)+'" class="redactor-linkify-object">'+t.trim(s)+"</a>")}return e}}},list:function(){return{toggle:function(e){this.placeholder.remove(),this.utils.browser("msie")||this.opts.linebreaks||this.$editor.focus(),this.buffer.set(),this.selection.save();var i,n,o=this.selection.getParent(),r=t(o).closest("ol, ul",this.$editor[0]);this.utils.isRedactorParent(r)||0===r.length||(r=!1);var s=!1;if(r&&r.length){s=!0;var a=r[0].tagName;i="orderedlist"===e&&"UL"===a,n="unorderedlist"===e&&"OL"===a}i?this.utils.replaceToTag(r,"ol"):n?this.utils.replaceToTag(r,"ul"):s?this.list.remove(e,r):this.list.insert(e),this.selection.restore(),this.code.sync()},insert:function(e){var i=this.selection.getCurrent(),n=t(i).closest("td, th",this.$editor[0]);this.utils.browser("msie")&&this.opts.linebreaks?this.list.insertInIe(e):document.execCommand("insert"+e);var o=this.selection.getParent(),r=t(o).closest("ol, ul",this.$editor[0]);if(0!==n.length){var s=n.clone();n.after(s).remove("")}if(this.utils.isEmpty(r.find("li").text())){var a=r.children("li");a.find("br").remove(),a.append(this.selection.getMarkerAsHtml()),this.opts.linebreaks&&this.utils.browser("mozilla")&&2==a.size()&&this.utils.isEmpty(a.eq(1).text())&&a.eq(1).remove()}if(r.length){var l=r.parent();this.utils.isRedactorParent(l)&&"LI"!=l[0].tagName&&this.utils.isBlock(l[0])&&l.replaceWith(l.contents())}this.utils.browser("msie")||this.$editor.focus(),this.clean.clearUnverified()},insertInIe:function(e){var i=this.selection.wrap("div"),n=t(i).html(),o=t("orderedlist"==e?"<ol>":"<ul>"),r=t("<li>");if(""===t.trim(n))r.append(this.selection.getMarkerAsHtml()),o.append(r),this.$editor.find("#selection-marker-1").replaceWith(o);else{var s=n.split(/<br\s?\/?>/gi);if(s)for(var a=0;a<s.length;a++)""!==t.trim(s[a])&&o.append(t("<li>").html(s[a]));else r.append(n),o.append(r);t(i).replaceWith(o)}},remove:function(e,i){t.inArray("ul",this.selection.getBlocks())&&(e="unorderedlist"),document.execCommand("insert"+e);var n=t(this.selection.getCurrent());this.indent.fixEmptyIndent(),this.opts.linebreaks||0!==n.closest("li, th, td",this.$editor[0]).length||(document.execCommand("formatblock",!1,"p"),this.$editor.find("ul, ol, blockquote").each(t.proxy(this.utils.removeEmpty,this)));var o=t(this.selection.getCurrent()).closest("table",this.$editor[0]),r=o.prev();this.opts.linebreaks||0===o.length||0===r.length||"BR"!=r[0].tagName||r.remove(),this.clean.clearUnverified()}}},modal:function(){return{callbacks:{},loadTemplates:function(){this.opts.modal={imageEdit:String()+'<section id="redactor-modal-image-edit"><label>'+this.lang.get("title")+'</label><input type="text" id="redactor-image-title" /><label class="redactor-image-link-option">'+this.lang.get("link")+'</label><input type="text" id="redactor-image-link" class="redactor-image-link-option" aria-label="'+this.lang.get("link")+'" /><label class="redactor-image-link-option"><input type="checkbox" id="redactor-image-link-blank" aria-label="'+this.lang.get("link_new_tab")+'"> '+this.lang.get("link_new_tab")+'</label><label class="redactor-image-position-option">'+this.lang.get("image_position")+'</label><select class="redactor-image-position-option" id="redactor-image-align" aria-label="'+this.lang.get("image_position")+'"><option value="none">'+this.lang.get("none")+'</option><option value="left">'+this.lang.get("left")+'</option><option value="center">'+this.lang.get("center")+'</option><option value="right">'+this.lang.get("right")+"</option></select></section>",image:String()+'<section id="redactor-modal-image-insert"><div id="redactor-modal-image-droparea"></div></section>',file:String()+'<section id="redactor-modal-file-insert"><div id="redactor-modal-file-upload-box"><label>'+this.lang.get("filename")+'</label><input type="text" id="redactor-filename" aria-label="'+this.lang.get("filename")+'" /><br><br><div id="redactor-modal-file-upload"></div></div></section>',link:String()+'<section id="redactor-modal-link-insert"><label>URL</label><input type="url" id="redactor-link-url" aria-label="URL" /><label>'+this.lang.get("text")+'</label><input type="text" id="redactor-link-url-text" aria-label="'+this.lang.get("text")+'" /><label><input type="checkbox" id="redactor-link-blank"> '+this.lang.get("link_new_tab")+"</label></section>"},t.extend(this.opts,this.opts.modal)},addCallback:function(t,e){this.modal.callbacks[t]=e},createTabber:function(e){this.modal.$tabber=t("<div>").attr("id","redactor-modal-tabber"),e.prepend(this.modal.$tabber)},addTab:function(e,i,n){var o=t('<a href="#" rel="tab'+e+'">').text(i);n&&o.addClass("active");var r=this;o.on("click",(function(e){e.preventDefault(),t(".redactor-tab").hide(),t(".redactor-"+t(this).attr("rel")).show(),r.modal.$tabber.find("a").removeClass("active"),t(this).addClass("active")})),this.modal.$tabber.append(o)},addTemplate:function(t,e){this.opts.modal[t]=e},getTemplate:function(t){return this.opts.modal[t]},getModal:function(){return this.$modalBody.find("section")},load:function(t,e,i){this.modal.templateName=t,this.modal.width=i,this.modal.build(),this.modal.enableEvents(),this.modal.setTitle(e),this.modal.setDraggable(),this.modal.setContent(),void 0!==this.modal.callbacks[t]&&this.modal.callbacks[t].call(this)},show:function(){this.utils.disableBodyScroll(),this.utils.isMobile()?this.modal.showOnMobile():this.modal.showOnDesktop(),this.opts.highContrast&&this.$modalBox.addClass("redactor-modal-contrast"),this.$modalOverlay.show(),this.$modalBox.show(),this.$modal.attr("tabindex","-1"),this.$modal.focus(),this.modal.setButtonsWidth(),this.utils.saveScroll(),this.utils.isMobile()||(setTimeout(t.proxy(this.modal.showOnDesktop,this),0),t(window).on("resize.redactor-modal",t.proxy(this.modal.resize,this))),this.core.setCallback("modalOpened",this.modal.templateName,this.$modal),t(document).off("focusin.modal"),this.$modal.find("input[type=text],input[type=url],input[type=email]").on("keydown.redactor-modal",t.proxy(this.modal.setEnter,this))},showOnDesktop:function(){var e=this.$modal.outerHeight(),i=t(window).height(),n=t(window).width();this.modal.width>n?this.$modal.css({width:"96%",marginTop:i/2-e/2+"px"}):e>i?this.$modal.css({width:this.modal.width+"px",marginTop:"20px"}):this.$modal.css({width:this.modal.width+"px",marginTop:i/2-e/2+"px"})},showOnMobile:function(){this.$modal.css({width:"96%",marginTop:"2%"})},resize:function(){this.utils.isMobile()?this.modal.showOnMobile():this.modal.showOnDesktop()},setTitle:function(t){this.$modalHeader.html(t)},setContent:function(){this.$modalBody.html(this.modal.getTemplate(this.modal.templateName))},setDraggable:function(){void 0!==t.fn.draggable&&(this.$modal.draggable({handle:this.$modalHeader}),this.$modalHeader.css("cursor","move"))},setEnter:function(t){13==t.which&&(t.preventDefault(),this.$modal.find("button.redactor-modal-action-btn").click())},createCancelButton:function(){var e=t("<button>").addClass("redactor-modal-btn redactor-modal-close-btn").html(this.lang.get("cancel"));e.on("click",t.proxy(this.modal.close,this)),this.$modalFooter.append(e)},createDeleteButton:function(t){return this.modal.createButton(t,"delete")},createActionButton:function(t){return this.modal.createButton(t,"action")},createButton:function(e,i){var n=t("<button>").addClass("redactor-modal-btn").addClass("redactor-modal-"+i+"-btn").html(e);return this.$modalFooter.append(n),n},setButtonsWidth:function(){var t=this.$modalFooter.find("button"),e=t.length;0!==e&&t.css("width",100/e+"%")},build:function(){this.modal.buildOverlay(),this.$modalBox=t('<div id="redactor-modal-box"/>').hide(),this.$modal=t('<div id="redactor-modal" role="dialog" aria-labelledby="redactor-modal-header" />'),this.$modalHeader=t('<header id="redactor-modal-header"/>'),this.$modalClose=t('<button type="button" id="redactor-modal-close" tabindex="1" aria-label="Close" />').html("&times;"),this.$modalBody=t('<div id="redactor-modal-body" />'),this.$modalFooter=t("<footer />"),this.$modal.append(this.$modalHeader),this.$modal.append(this.$modalClose),this.$modal.append(this.$modalBody),this.$modal.append(this.$modalFooter),this.$modalBox.append(this.$modal),this.$modalBox.appendTo(document.body)},buildOverlay:function(){this.$modalOverlay=t('<div id="redactor-modal-overlay">').hide(),t("body").prepend(this.$modalOverlay)},enableEvents:function(){this.$modalClose.on("click.redactor-modal",t.proxy(this.modal.close,this)),t(document).on("keyup.redactor-modal",t.proxy(this.modal.closeHandler,this)),this.$editor.on("keyup.redactor-modal",t.proxy(this.modal.closeHandler,this)),this.$modalBox.on("click.redactor-modal",t.proxy(this.modal.close,this))},disableEvents:function(){this.$modalClose.off("click.redactor-modal"),t(document).off("keyup.redactor-modal"),this.$editor.off("keyup.redactor-modal"),this.$modalBox.off("click.redactor-modal"),t(window).off("resize.redactor-modal")},closeHandler:function(t){t.which==this.keyCode.ESC&&this.modal.close(!1)},close:function(e){if(e){if(!t(e.target).hasClass("redactor-modal-close-btn")&&e.target!=this.$modalClose[0]&&e.target!=this.$modalBox[0])return;e.preventDefault()}this.$modalBox&&(this.modal.disableEvents(),this.utils.enableBodyScroll(),this.$modalOverlay.remove(),this.$modalBox.fadeOut("fast",t.proxy((function(){this.$modalBox.remove(),setTimeout(t.proxy(this.utils.restoreScroll,this),0),void 0!==e&&this.selection.restore(),t(document.body).css("overflow",this.modal.bodyOveflow),this.core.setCallback("modalClosed",this.modal.templateName)}),this)))}}},observe:function(){return{load:function(){if(void 0===this.opts.destroyed){if(this.utils.browser("msie")){var e=this;this.$editor.find("pre, code").on("mouseover",(function(){e.$editor.attr("contenteditable",!1),t(this).attr("contenteditable",!0)})).on("mouseout",(function(){e.$editor.attr("contenteditable",!0),t(this).removeAttr("contenteditable")}))}this.observe.images(),this.observe.links()}},toolbar:function(t,e){this.observe.buttons(t,e),this.observe.dropdowns()},isCurrent:function(e,i){return void 0===i&&(i=t(this.selection.getCurrent())),i.is(e)||i.parents(e).length>0},dropdowns:function(){var e=t(this.selection.getCurrent());t.each(this.opts.observe.dropdowns,t.proxy((function(t,i){var n=i.observe,o=n.element,r=i.item,s=void 0!==n.in&&n.in,a=void 0!==n.out&&n.out;e.closest(o).size()>0?this.observe.setDropdownProperties(r,s,a):this.observe.setDropdownProperties(r,a,s)}),this))},setDropdownProperties:function(t,e,i){i&&void 0!==i.attr&&this.observe.setDropdownAttr(t,i.attr,!0),void 0!==e.attr&&this.observe.setDropdownAttr(t,e.attr),void 0!==e.title&&t.text(e.title)},setDropdownAttr:function(e,i,n){t.each(i,(function(t,i){"class"==t?n?e.removeClass(i):e.addClass(i):n?e.removeAttr(t):e.attr(t,i)}))},addDropdown:function(t,e,i){void 0!==i.observe&&(i.item=t,this.opts.observe.dropdowns.push(i))},buttons:function(e,i){var n=this.selection.getCurrent(),o=this.selection.getParent();if(!1!==e?this.button.setInactiveAll():this.button.setInactiveAll(i),!1!==e||"html"===i){t.each(this.opts.activeButtonsStates,t.proxy((function(e,i){var r=t(o).closest(e,this.$editor[0]),s=t(n).closest(e,this.$editor[0]);(0===r.length||this.utils.isRedactorParent(r))&&this.utils.isRedactorParent(s)&&(0===r.length&&0===s.closest(e,this.$editor[0]).length||this.button.setActive(i))}),this));var r=t(o).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);if(this.utils.isRedactorParent(o)&&r.length){var s=""===r.css("text-align")?"left":r.css("text-align");this.button.setActive("align"+s)}}else-1!=t.inArray(i,this.opts.activeButtons)&&this.button.toggleActive(i)},addButton:function(t,e){this.opts.activeButtons.push(e),this.opts.activeButtonsStates[t]=e},images:function(){this.$editor.find("img").each(t.proxy((function(e,i){var n=t(i);n.closest("a",this.$editor[0]).on("click",(function(t){t.preventDefault()})),this.utils.browser("msie")&&n.attr("unselectable","on"),this.image.setEditable(n)}),this)),t(document).on("click.redactor-image-delete."+this.uuid,t.proxy((function(t){this.observe.image=!1,"IMG"==t.target.tagName&&this.utils.isRedactorParent(t.target)&&(this.observe.image=(!this.observe.image||this.observe.image!=t.target)&&t.target)}),this))},links:function(){this.opts.linkTooltip&&(this.$editor.find("a").on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,t.proxy(this.observe.showTooltip,this)),this.$editor.on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,t.proxy(this.observe.closeTooltip,this)),t(document).on("touchstart.redactor."+this.uuid+" click.redactor."+this.uuid,t.proxy(this.observe.closeTooltip,this)))},getTooltipPosition:function(t){return t.offset()},showTooltip:function(e){var i=t(e.target);if("IMG"!=i[0].tagName&&("A"!==i[0].tagName&&(i=i.closest("a",this.$editor[0])),"A"===i[0].tagName)){var n=i,o=this.observe.getTooltipPosition(n),r=t('<span class="redactor-link-tooltip"></span>'),s=n.attr("href");void 0===s&&(s=""),s.length>24&&(s=s.substring(0,24)+"...");var a=t('<a href="'+n.attr("href")+'" target="_blank" />').html(s).addClass("redactor-link-tooltip-action"),l=t('<a href="#" />').html(this.lang.get("edit")).on("click",t.proxy(this.link.show,this)).addClass("redactor-link-tooltip-action"),c=t('<a href="#" />').html(this.lang.get("unlink")).on("click",t.proxy(this.link.unlink,this)).addClass("redactor-link-tooltip-action");r.append(a).append(" | ").append(l).append(" | ").append(c),r.css({top:o.top+parseInt(n.css("line-height"),10)+"px",left:o.left+"px"}),t(".redactor-link-tooltip").remove(),t("body").append(r)}},closeTooltip:function(e){var i=(e=e.originalEvent||e).target,n=t(i).closest("a",this.$editor[0]);0!==n.length&&"A"===n[0].tagName&&"A"!==i.tagName||"A"===i.tagName&&this.utils.isRedactorParent(i)||t(i).hasClass("redactor-link-tooltip-action")||t(".redactor-link-tooltip").remove()}}},paragraphize:function(){return{load:function(e){return this.opts.linebreaks?e:""===e||"<p></p>"===e?this.opts.emptyHtml:(e+="\n",this.paragraphize.safes=[],this.paragraphize.z=0,e=e.replace(/(<br\s?\/?>){1,}\n?<\/blockquote>/gi,"</blockquote>"),e=this.paragraphize.getSafes(e),e=this.paragraphize.getSafesComments(e),e=this.paragraphize.replaceBreaksToNewLines(e),e=this.paragraphize.replaceBreaksToParagraphs(e),e=this.paragraphize.clear(e),e=(e=this.paragraphize.restoreSafes(e)).replace(new RegExp("<br\\s?/?>\n?<("+this.opts.paragraphizeBlocks.join("|")+")(.*?[^>])>","gi"),"<p><br /></p>\n<$1$2>"),t.trim(e))},getSafes:function(e){var i=t("<div />").append(e);return i.find("blockquote p").replaceWith((function(){return t(this).append("<br />").contents()})),e=i.html(),i.find(this.opts.paragraphizeBlocks.join(", ")).each(t.proxy((function(t,i){this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=i.outerHTML,e=e.replace(i.outerHTML,"\n{replace"+this.paragraphize.z+"}")}),this)),e},getSafesComments:function(e){var i=e.match(/<!--([\w\W]*?)-->/gi);return i?(t.each(i,t.proxy((function(t,i){this.paragraphize.z++,this.paragraphize.safes[this.paragraphize.z]=i,e=e.replace(i,"\n{replace"+this.paragraphize.z+"}")}),this)),e):e},restoreSafes:function(e){return t.each(this.paragraphize.safes,(function(t,i){i=void 0!==i?i.replace(/\$/g,"&#36;"):i,e=e.replace("{replace"+t+"}",i)})),e},replaceBreaksToParagraphs:function(t){var e=t.split(new RegExp("\n","g"),-1);if(t="",e)for(var i=e.length,n=0;n<i;n++){if(!e.hasOwnProperty(n))return;-1==e[n].search("{replace")?(e[n]=e[n].replace(/<p>\n\t?<\/p>/gi,""),e[n]=e[n].replace(/<p><\/p>/gi,""),""!==e[n]&&(t+="<p>"+e[n].replace(/^\n+|\n+$/g,"")+"</p>")):t+=e[n]}return t},replaceBreaksToNewLines:function(t){return(t=(t=(t=(t=t.replace(/<br \/>\s*<br \/>/gi,"\n\n")).replace(/<br\s?\/?>\n?<br\s?\/?>/gi,"\n<br /><br />")).replace(new RegExp("\r\n","g"),"\n")).replace(new RegExp("\r","g"),"\n")).replace(new RegExp("/\n\n+/"),"g","\n\n")},clear:function(t){return(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(new RegExp("</blockquote></p>","gi"),"</blockquote>")).replace(new RegExp("<p></blockquote>","gi"),"</blockquote>")).replace(new RegExp("<p><blockquote>","gi"),"<blockquote>")).replace(new RegExp("<blockquote></p>","gi"),"<blockquote>")).replace(new RegExp("<p><p ","gi"),"<p ")).replace(new RegExp("<p><p>","gi"),"<p>")).replace(new RegExp("</p></p>","gi"),"</p>")).replace(new RegExp("<p>\\s?</p>","gi"),"")).replace(new RegExp("\n</p>","gi"),"</p>")).replace(new RegExp("<p>\t?\t?\n?<p>","gi"),"<p>")).replace(new RegExp("<p>\t*</p>","gi"),"")}}},paste:function(){return{init:function(e){this.opts.cleanOnPaste?(this.rtePaste=!0,this.buffer.set(),this.selection.save(),this.utils.saveScroll(),this.paste.createPasteBox(),t(window).on("scroll.redactor-freeze",t.proxy((function(){t(window).scrollTop(this.saveBodyScroll)}),this)),setTimeout(t.proxy((function(){var e=this.$pasteBox.html();this.$pasteBox.remove(),this.selection.restore(),this.utils.restoreScroll(),this.paste.insert(e),t(window).off("scroll.redactor-freeze"),this.linkify.isEnabled()&&this.linkify.format()}),this),1)):setTimeout(t.proxy(this.code.sync,this),1)},createPasteBox:function(){if(this.$pasteBox=t("<div>").html("").attr("contenteditable","true").css({position:"fixed",width:0,top:0,left:"-9999px"}),this.utils.browser("msie"))this.$box.append(this.$pasteBox);else{var e=t(".modal-body:visible");e.length>0?e.append(this.$pasteBox):t("body").append(this.$pasteBox)}this.$pasteBox.get(0).focus()},insert:function(e){e=this.core.setCallback("pasteBefore",e),e=this.utils.isSelectAll()?this.clean.onPaste(e,!1):this.clean.onPaste(e),e=this.core.setCallback("paste",e),this.utils.isSelectAll()?this.insert.set(e,!1):this.insert.html(e,!1),this.utils.disableSelectAll(),this.rtePaste=!1,setTimeout(t.proxy(this.clean.clearUnverified,this),10),setTimeout(t.proxy((function(){var e=this.$editor.find("span");t.each(e,(function(e,i){""===i.innerHTML.replace(/\u200B/,"")&&0===i.attributes.length&&t(i).remove()}))}),this),10)}}},placeholder:function(){return{enable:function(){this.placeholder.is()&&(this.$editor.attr("placeholder",this.$element.attr("placeholder")),this.placeholder.toggle(),this.$editor.on("keydown.redactor-placeholder",t.proxy(this.placeholder.toggle,this)))},toggle:function(){setTimeout(t.proxy((function(){var t=this.utils.isEmpty(this.$editor.html(),!1)?"addClass":"removeClass";this.$editor[t]("redactor-placeholder")}),this),5)},remove:function(){this.$editor.removeClass("redactor-placeholder")},is:function(){return this.opts.placeholder?this.$element.attr("placeholder",this.opts.placeholder):!(void 0===this.$element.attr("placeholder")||""===this.$element.attr("placeholder"))}}},progress:function(){return{show:function(){t(document.body).append(t('<div id="redactor-progress"><span></span></div>')),t("#redactor-progress").fadeIn()},hide:function(){t("#redactor-progress").fadeOut(1500,(function(){t(this).remove()}))}}},selection:function(){return{get:function(){this.sel=document.getSelection(),document.getSelection&&this.sel.getRangeAt&&this.sel.rangeCount?this.range=this.sel.getRangeAt(0):this.range=document.createRange()},addRange:function(){try{this.sel.removeAllRanges()}catch(t){}this.sel.addRange(this.range)},getCurrent:function(){var t=!1;return this.selection.get(),this.sel&&this.sel.rangeCount>0&&(t=this.sel.getRangeAt(0).startContainer),this.utils.isRedactorParent(t)},getParent:function(e){return!!(e=e||this.selection.getCurrent())&&this.utils.isRedactorParent(t(e).parent()[0])},getPrev:function(){return window.getSelection().anchorNode.previousSibling},getNext:function(){return window.getSelection().anchorNode.nextSibling},getBlock:function(e){for(e=e||this.selection.getCurrent();e;){if(this.utils.isBlockTag(e.tagName))return!t(e).hasClass("redactor-editor")&&e;e=e.parentNode}return!1},getInlines:function(e,i){if(this.selection.get(),this.range&&this.range.collapsed)return!1;var n=[];e=void 0===e||!1===e?this.selection.getNodes():e;var o=this.opts.inlineTags;if(o.push("span"),void 0!==i)for(var r=0;r<i.length;r++)o.push(i[r]);return t.each(e,t.proxy((function(e,i){-1!=t.inArray(i.tagName.toLowerCase(),o)&&n.push(i)}),this)),0!==n.length&&n},getInlinesTags:function(e){if(this.selection.get(),this.range&&this.range.collapsed)return!1;var i=[],n=this.selection.getNodes();return t.each(n,t.proxy((function(n,o){-1!=t.inArray(o.tagName.toLowerCase(),e)&&i.push(o)}),this)),0!==i.length&&i},getBlocks:function(e){if(this.selection.get(),this.range&&this.range.collapsed)return[this.selection.getBlock()];var i=[];return e=void 0===e?this.selection.getNodes():e,t.each(e,t.proxy((function(t,e){this.utils.isBlock(e)&&i.push(e)}),this)),0===i.length?[this.selection.getBlock()]:i},getLastBlock:function(){return this.selection.lastBlock},getNodes:function(){this.selection.get();var e=this.selection.getNodesMarker(1),i=this.selection.getNodesMarker(2);if(!1===this.range.collapsed){if(window.getSelection){var n=window.getSelection();if(n.rangeCount>0){var o=n.getRangeAt(0),r=o.startContainer,s=o.startOffset,a=o.cloneRange();a.collapse(!1),a.insertNode(i),a.setStart(r,s),a.collapse(!0),a.insertNode(e),o.setStartAfter(e),o.setEndBefore(i),n.removeAllRanges(),n.addRange(o)}}}else this.selection.setNodesMarker(this.range,e,!0),i=e;var l=[],c=0,d=this;this.$editor.find("*").each((function(){if(this==e){var n=t(this).parent();0!==n.length&&"BODY"!=n[0].tagName&&d.utils.isRedactorParent(n[0])&&l.push(n[0]),l.push(this),c=1}else c>0&&(l.push(this),c+=1);if(this==i)return!1}));for(var h=[],u=l.length,p=0;p<u;p++)"nodes-marker-1"!=l[p].id&&"nodes-marker-2"!=l[p].id&&h.push(l[p]);return this.selection.removeNodesMarkers(),h},getNodesMarker:function(e){return t('<span id="nodes-marker-'+e+'" class="redactor-nodes-marker" data-verified="redactor">'+this.opts.invisibleSpace+"</span>")[0]},setNodesMarker:function(t,e,i){t=t.cloneRange();try{t.collapse(i),t.insertNode(e)}catch(t){}},removeNodesMarkers:function(){t(document).find("span.redactor-nodes-marker").remove(),this.$editor.find("span.redactor-nodes-marker").remove()},fromPoint:function(t,e){this.caret.setOffset(t,e)},wrap:function(t){if(this.selection.get(),this.range.collapsed)return!1;var e=document.createElement(t);return e.appendChild(this.range.extractContents()),this.range.insertNode(e),e},selectElement:function(t){this.utils.browser("mozilla")?(t=t[0]||t,document.createRange().selectNodeContents(t)):this.caret.set(t,0,t,1)},selectAll:function(){this.selection.get(),this.range.selectNodeContents(this.$editor[0]),this.selection.addRange()},remove:function(){this.selection.get(),this.sel.removeAllRanges()},save:function(){this.selection.createMarkers()},createMarkers:function(){this.selection.get();var t=this.selection.getMarker(1);if(this.selection.setMarker(this.range,t,!0),!1===this.range.collapsed){var e=this.selection.getMarker(2);this.selection.setMarker(this.range,e,!1),this.utils.browser("chrome")&&this.caret.set(t,0,e,0)}this.savedSel=this.$editor.html()},getMarker:function(e){return void 0===e&&(e=1),t('<span id="selection-marker-'+e+'" class="redactor-selection-marker"  data-verified="redactor">'+this.opts.invisibleSpace+"</span>")[0]},getMarkerAsHtml:function(t){return this.utils.getOuterHtml(this.selection.getMarker(t))},setMarker:function(t,e,i){t=t.cloneRange();try{t.collapse(i),t.insertNode(e)}catch(t){this.focus.setStart()}},restore:function(){var t=this.$editor.find("span#selection-marker-1"),e=this.$editor.find("span#selection-marker-2");this.utils.browser("mozilla")&&this.$editor.focus(),0!==t.length&&0!==e.length?this.caret.set(t,0,e,0):0!==t.length?this.caret.set(t,0,t,0):this.$editor.focus(),this.selection.removeMarkers(),this.savedSel=!1},removeMarkers:function(){this.$editor.find("span.redactor-selection-marker").each((function(e,i){""===t(i).text().replace(/\u200B/g,"")?t(i).remove():t(i).replaceWith((function(){return t(this).contents()}))}))},getText:function(){return this.selection.get(),this.sel.toString()},getHtml:function(){var t="";if(this.selection.get(),this.sel.rangeCount){for(var e=document.createElement("div"),i=this.sel.rangeCount,n=0;n<i;++n)e.appendChild(this.sel.getRangeAt(n).cloneContents());t=e.innerHTML}return this.clean.onSync(t)},replaceSelection:function(t){this.selection.get(),this.range.deleteContents();var e=document.createElement("div");e.innerHTML=t;for(var i,n=document.createDocumentFragment();i=e.firstChild;)n.appendChild(i);this.range.insertNode(n)},replaceWithHtml:function(t){t=this.selection.getMarkerAsHtml(1)+t+this.selection.getMarkerAsHtml(2),this.selection.get(),window.getSelection&&window.getSelection().getRangeAt?this.selection.replaceSelection(t):document.selection&&document.selection.createRange&&this.range.pasteHTML(t),this.selection.restore(),this.code.sync()}}},shortcuts:function(){return{init:function(e,i){if(!this.opts.shortcuts)return!e.ctrlKey&&!e.metaKey||66!==i&&73!==i||e.preventDefault(),!1;t.each(this.opts.shortcuts,t.proxy((function(i,n){for(var o=i.split(","),r=o.length,s=0;s<r;s++)"string"==typeof o[s]&&this.shortcuts.handler(e,t.trim(o[s]),t.proxy((function(){var t;"-1"!=n.func.search(/\./)?void 0!==this[(t=n.func.split("."))[0]]&&this[t[0]][t[1]].apply(this,n.params):this[n.func].apply(this,n.params)}),this))}),this))},handler:function(e,i,n){var o={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"};i=i.toLowerCase().split(" ");var r={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[e.keyCode],s=String.fromCharCode(e.which).toLowerCase(),a="",l={};t.each(["alt","ctrl","meta","shift"],(function(t,i){e[i+"Key"]&&r!==i&&(a+=i+"+")})),r&&(l[a+r]=!0),s&&(l[a+s]=!0,l[a+o[s]]=!0,"shift+"===a&&(l[o[s]]=!0));for(var c=0,d=i.length;c<d;c++)if(l[i[c]])return e.preventDefault(),n.apply(this,arguments)}}},tabifier:function(){return{get:function(t){if(!this.opts.tabifier)return t;var e=["area","body","head","hr","i?frame","link","meta","noscript","style","script","table","tbody","thead","tfoot"],i=["li","dt","dt","h[1-6]","option","script"];this.tabifier.lineBefore=new RegExp("^<(/?"+e.join("|/?")+"|"+i.join("|")+")[ >]"),this.tabifier.lineAfter=new RegExp("^<(br|/?"+e.join("|/?")+"|/"+i.join("|/")+")[ >]"),this.tabifier.newLevel=new RegExp("^</?("+["p","blockquote","div","dl","fieldset","form","frameset","map","ol","pre","select","td","th","tr","ul"].join("|")+")[ >]");var n=0,o=t.length,r=0,s=null,a=null,l="",c="",d="";for(this.tabifier.cleanlevel=0;n<o;n++){if(r=n,-1==t.substr(n).indexOf("<"))return c+=t.substr(n),this.tabifier.finish(c);for(;r<o&&"<"!=t.charAt(r);)r++;for(n!=r&&((d=t.substr(n,r-n)).match(/^\s{2,}$/g)||("\n"==c.charAt(c.length-1)?c+=this.tabifier.getTabs():"\n"==d.charAt(0)&&(c+="\n"+this.tabifier.getTabs(),d=d.replace(/^\s+/,"")),c+=d),d.match(/\n/)&&(c+="\n"+this.tabifier.getTabs())),s=r;r<o&&">"!=t.charAt(r);)r++;var h;if(n=r,"!--"==(l=t.substr(s,r-s)).substr(1,3)){if(!l.match(/--$/)){for(;"--\x3e"!=t.substr(r,3);)r++;r+=2,l=t.substr(s,r-s),n=r}"\n"!=c.charAt(c.length-1)&&(c+="\n"),c+=this.tabifier.getTabs(),c+=l+">\n"}else"!"==l[1]?c=this.tabifier.placeTag(l+">",c):"?"==l[1]?c+=l+">\n":(h=l.match(/^<(script|style|pre)/i))?(h[1]=h[1].toLowerCase(),l=this.tabifier.cleanTag(l),c=this.tabifier.placeTag(l,c),(a=String(t.substr(n+1)).toLowerCase().indexOf("</"+h[1]))&&(d=t.substr(n+1,a),n+=a,c+=d)):(l=this.tabifier.cleanTag(l),c=this.tabifier.placeTag(l,c))}return this.tabifier.finish(c)},getTabs:function(){for(var t="",e=0;e<this.tabifier.cleanlevel;e++)t+="\t";return t},finish:function(t){return t=(t=(t=(t=t.replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/,"")).replace(/[\s\n]*$/,"")).replace(/<script(.*?)>\n<\/script>/gi,"<script$1><\/script>"),this.tabifier.cleanlevel=0,t},cleanTag:function(t){var e,i="",n="";for((t=(t=(t=t.replace(/\n/g," ")).replace(/\s{2,}/g," ")).replace(/^\s+|\s+$/g," ")).match(/\/$/)&&(n="/",t=t.replace(/\/+$/,""));e=/\s*([^= ]+)(?:=((['"']).*?\3|[^ ]+))?/.exec(t);)e[2]?i+=e[1].toLowerCase()+"="+e[2]:e[1]&&(i+=e[1].toLowerCase()),i+=" ",t=t.substr(e[0].length);return i.replace(/\s*$/,"")+n+">"},placeTag:function(t,e){var i=t.match(this.tabifier.newLevel);return(t.match(this.tabifier.lineBefore)||i)&&(e=e.replace(/\s*$/,""),e+="\n"),i&&"/"==t.charAt(1)&&this.tabifier.cleanlevel--,"\n"==e.charAt(e.length-1)&&(e+=this.tabifier.getTabs()),i&&"/"!=t.charAt(1)&&this.tabifier.cleanlevel++,e+=t,(t.match(this.tabifier.lineAfter)||t.match(this.tabifier.newLevel))&&(e=e.replace(/ *$/,"")),e}}},tidy:function(){return{setupAllowed:function(){var e=t.inArray("span",this.opts.removeEmpty);if(-1!==e&&this.opts.removeEmpty.splice(e,1),this.opts.allowedTags&&(this.opts.deniedTags=!1),this.opts.allowedAttr&&(this.opts.removeAttr=!1),!this.opts.linebreaks){var i=["p","section"];this.opts.allowedTags&&this.tidy.addToAllowed(i),this.opts.deniedTags&&this.tidy.removeFromDenied(i)}},addToAllowed:function(e){for(var i=e.length,n=0;n<i;n++)-1==t.inArray(e[n],this.opts.allowedTags)&&this.opts.allowedTags.push(e[n])},removeFromDenied:function(e){for(var i=e.length,n=0;n<i;n++){var o=t.inArray(e[n],this.opts.deniedTags);-1!=o&&this.opts.deniedTags.splice(o,1)}},load:function(e,i){return this.tidy.settings={deniedTags:this.opts.deniedTags,allowedTags:this.opts.allowedTags,removeComments:this.opts.removeComments,replaceTags:this.opts.replaceTags,replaceStyles:this.opts.replaceStyles,removeDataAttr:this.opts.removeDataAttr,removeAttr:this.opts.removeAttr,allowedAttr:this.opts.allowedAttr,removeWithoutAttr:this.opts.removeWithoutAttr,removeEmpty:this.opts.removeEmpty},t.extend(this.tidy.settings,i),e=this.tidy.removeComments(e),this.tidy.$div=t("<div />").append(e),this.tidy.replaceTags(),this.tidy.replaceStyles(),this.tidy.removeTags(),this.tidy.removeAttr(),this.tidy.removeEmpty(),this.tidy.removeParagraphsInLists(),this.tidy.removeDataAttr(),this.tidy.removeWithoutAttr(),e=this.tidy.$div.html(),this.tidy.$div.remove(),e},removeComments:function(t){return this.tidy.settings.removeComments?t.replace(/<!--[\s\S]*?-->/gi,""):t},replaceTags:function(e){if(!this.tidy.settings.replaceTags)return e;for(var i=this.tidy.settings.replaceTags.length,n=[],o=[],r=0;r<i;r++)o.push(this.tidy.settings.replaceTags[r][1]),n.push(this.tidy.settings.replaceTags[r][0]);t.each(n,t.proxy((function(e,i){this.tidy.$div.find(i).replaceWith((function(){return t("<"+o[e]+" />",{html:t(this).html()})}))}),this))},replaceStyles:function(){if(this.tidy.settings.replaceStyles){var e=this.tidy.settings.replaceStyles.length;this.tidy.$div.find("span").each(t.proxy((function(i,n){for(var o=t(n),r=o.attr("style"),s=0;s<e;s++)if(r&&r.match(new RegExp("^"+this.tidy.settings.replaceStyles[s][0],"i"))){var a=this.tidy.settings.replaceStyles[s][1];o.replaceWith((function(){var e=document.createElement(a);return t(e).append(t(this).contents())}))}}),this))}},removeTags:function(){!this.tidy.settings.deniedTags&&this.tidy.settings.allowedTags&&this.tidy.$div.find("*").not(this.tidy.settings.allowedTags.join(",")).each((function(e,i){""===i.innerHTML?t(i).remove():t(i).contents().unwrap()})),this.tidy.settings.deniedTags&&this.tidy.$div.find(this.tidy.settings.deniedTags.join(",")).each((function(e,i){t(i).hasClass("redactor-script-tag")||t(i).hasClass("redactor-selection-marker")||(""===i.innerHTML?t(i).remove():t(i).contents().unwrap())}))},removeAttr:function(){var e;if(!this.tidy.settings.removeAttr&&this.tidy.settings.allowedAttr){var i=[],n=[];e=this.tidy.settings.allowedAttr.length;for(var o=0;o<e;o++)i.push(this.tidy.settings.allowedAttr[o][0]),n.push(this.tidy.settings.allowedAttr[o][1]);this.tidy.$div.find("*").each(t.proxy((function(e,o){var r=t(o),s=t.inArray(r[0].tagName.toLowerCase(),i),a=this.tidy.removeAttrGetRemoves(s,n,r);a&&t.each(a,(function(t,e){r.removeAttr(e)}))}),this))}if(this.tidy.settings.removeAttr)for(e=this.tidy.settings.removeAttr.length,o=0;o<e;o++){var r=this.tidy.settings.removeAttr[o][1];t.isArray(r)&&(r=r.join(" ")),this.tidy.$div.find(this.tidy.settings.removeAttr[o][0]).removeAttr(r)}},removeAttrGetRemoves:function(e,i,n){var o=[];return-1==e?t.each(n[0].attributes,(function(t,e){o.push(e.name)})):"*"==i[e]?o=[]:t.each(n[0].attributes,(function(n,r){t.isArray(i[e])?-1==t.inArray(r.name,i[e])&&o.push(r.name):i[e]!=r.name&&o.push(r.name)})),o},removeAttrs:function(e,i){return i=new RegExp(i,"g"),e.each((function(){for(var e=t(this),n=this.attributes.length-1;n>=0;n--){var o=this.attributes[n];o&&o.specified&&o.name.search(i)>=0&&e.removeAttr(o.name)}}))},removeEmpty:function(){this.tidy.settings.removeEmpty&&this.tidy.$div.find(this.tidy.settings.removeEmpty.join(",")).each((function(){var e=t(this),i=e.text();""===(i=(i=(i=i.replace(/\u200B/g,"")).replace(/&nbsp;/gi,"")).replace(/\s/g,""))&&0===e.children().length&&e.remove()}))},removeParagraphsInLists:function(){this.tidy.$div.find("li p").contents().unwrap()},removeDataAttr:function(){if(this.tidy.settings.removeDataAttr){var e=this.tidy.settings.removeDataAttr;t.isArray(this.tidy.settings.removeDataAttr)&&(e=this.tidy.settings.removeDataAttr.join(",")),this.tidy.removeAttrs(this.tidy.$div.find(e),"^(data-)")}},removeWithoutAttr:function(){this.tidy.settings.removeWithoutAttr&&this.tidy.$div.find(this.tidy.settings.removeWithoutAttr.join(",")).each((function(){0===this.attributes.length&&t(this).contents().unwrap()}))}}},toolbar:function(){return{init:function(){return{html:{title:this.lang.get("html"),func:"code.toggle"},formatting:{title:this.lang.get("formatting"),dropdown:{p:{title:this.lang.get("paragraph"),func:"block.format"},blockquote:{title:this.lang.get("quote"),func:"block.format"},pre:{title:this.lang.get("code"),func:"block.format"},h1:{title:this.lang.get("header1"),func:"block.format"},h2:{title:this.lang.get("header2"),func:"block.format"},h3:{title:this.lang.get("header3"),func:"block.format"},h4:{title:this.lang.get("header4"),func:"block.format"},h5:{title:this.lang.get("header5"),func:"block.format"}}},bold:{title:this.lang.get("bold"),func:"inline.format"},italic:{title:this.lang.get("italic"),func:"inline.format"},deleted:{title:this.lang.get("deleted"),func:"inline.format"},underline:{title:this.lang.get("underline"),func:"inline.format"},unorderedlist:{title:"&bull; "+this.lang.get("unorderedlist"),func:"list.toggle"},orderedlist:{title:"1. "+this.lang.get("orderedlist"),func:"list.toggle"},outdent:{title:"< "+this.lang.get("outdent"),func:"indent.decrease"},indent:{title:"> "+this.lang.get("indent"),func:"indent.increase"},image:{title:this.lang.get("image"),func:"image.show"},file:{title:this.lang.get("file"),func:"file.show"},link:{title:this.lang.get("link"),dropdown:{link:{title:this.lang.get("link_insert"),func:"link.show",observe:{element:"a",in:{title:this.lang.get("link_edit")},out:{title:this.lang.get("link_insert")}}},unlink:{title:this.lang.get("unlink"),func:"link.unlink",observe:{element:"a",out:{attr:{class:"redactor-dropdown-link-inactive","aria-disabled":!0}}}}}},alignment:{title:this.lang.get("alignment"),dropdown:{left:{title:this.lang.get("align_left"),func:"alignment.left"},center:{title:this.lang.get("align_center"),func:"alignment.center"},right:{title:this.lang.get("align_right"),func:"alignment.right"},justify:{title:this.lang.get("align_justify"),func:"alignment.justify"}}},horizontalrule:{title:this.lang.get("horizontalrule"),func:"line.insert"}}},build:function(){this.toolbar.hideButtons(),this.toolbar.hideButtonsOnMobile(),this.toolbar.isButtonSourceNeeded(),0!==this.opts.buttons.length&&(this.$toolbar=this.toolbar.createContainer(),this.toolbar.setOverflow(),this.toolbar.append(),this.toolbar.setFormattingTags(),this.toolbar.loadButtons(),this.toolbar.setFixed(),this.opts.activeButtons&&this.$editor.on("mouseup.redactor keyup.redactor focus.redactor",t.proxy(this.observe.toolbar,this)))},createContainer:function(){return t("<ul>").addClass("redactor-toolbar").attr({id:"redactor-toolbar-"+this.uuid,role:"toolbar"})},setFormattingTags:function(){t.each(this.opts.toolbar.formatting.dropdown,t.proxy((function(e,i){-1==t.inArray(e,this.opts.formatting)&&delete this.opts.toolbar.formatting.dropdown[e]}),this))},loadButtons:function(){t.each(this.opts.buttons,t.proxy((function(e,i){if(this.opts.toolbar[i]){if("file"===i){if(!1===this.opts.fileUpload)return;if(!this.opts.fileUpload&&!1===this.opts.s3)return}if("image"===i){if(!1===this.opts.imageUpload)return;if(!this.opts.imageUpload&&!1===this.opts.s3)return}var n=this.opts.toolbar[i];this.$toolbar.append(t("<li>").append(this.button.build(i,n)))}}),this))},append:function(){this.opts.toolbarExternal?(this.$toolbar.addClass("redactor-toolbar-external"),t(this.opts.toolbarExternal).html(this.$toolbar)):this.$box.prepend(this.$toolbar)},setFixed:function(){this.utils.isDesktop()&&(this.opts.toolbarExternal||this.opts.toolbarFixed&&(this.toolbar.observeScroll(),t(this.opts.toolbarFixedTarget).on("scroll.redactor."+this.uuid,t.proxy(this.toolbar.observeScroll,this))))},setOverflow:function(){this.utils.isMobile()&&this.opts.toolbarOverflow&&this.$toolbar.addClass("redactor-toolbar-overflow")},isButtonSourceNeeded:function(){if(!this.opts.source){var t=this.opts.buttons.indexOf("html");-1!==t&&this.opts.buttons.splice(t,1)}},hideButtons:function(){0!==this.opts.buttonsHide.length&&t.each(this.opts.buttonsHide,t.proxy((function(t,e){var i=this.opts.buttons.indexOf(e);this.opts.buttons.splice(i,1)}),this))},hideButtonsOnMobile:function(){this.utils.isMobile()&&0!==this.opts.buttonsHideOnMobile.length&&t.each(this.opts.buttonsHideOnMobile,t.proxy((function(t,e){var i=this.opts.buttons.indexOf(e);this.opts.buttons.splice(i,1)}),this))},observeScroll:function(){var e=t(this.opts.toolbarFixedTarget).scrollTop(),i=1;this.opts.toolbarFixedTarget===document&&(i=this.$box.offset().top),e+this.opts.toolbarFixedTopOffset>i?this.toolbar.observeScrollEnable(e,i):this.toolbar.observeScrollDisable()},observeScrollEnable:function(e,i){var n=this.opts.toolbarFixedTopOffset+e-i,o=i+this.$box.height()-32,r=this.$box.innerWidth();this.$toolbar.addClass("toolbar-fixed-box"),this.$toolbar.css({position:"absolute",width:r,top:n+"px",left:0}),e>o&&t(".redactor-dropdown-"+this.uuid+":visible").hide(),this.toolbar.setDropdownsFixed(),this.$toolbar.css("visibility",e<o?"visible":"hidden")},observeScrollDisable:function(){this.$toolbar.css({position:"relative",width:"auto",top:0,left:0,visibility:"visible"}),this.toolbar.unsetDropdownsFixed(),this.$toolbar.removeClass("toolbar-fixed-box")},setDropdownsFixed:function(){var e=this.$toolbar.innerHeight()+this.opts.toolbarFixedTopOffset,i="fixed";this.opts.toolbarFixedTarget!==document&&(e=this.$toolbar.innerHeight()+this.$toolbar.offset().top+this.opts.toolbarFixedTopOffset,i="absolute"),t(".redactor-dropdown-"+this.uuid).each((function(){t(this).css({position:i,top:e+"px"})}))},unsetDropdownsFixed:function(){var e=this.$toolbar.innerHeight()+this.$toolbar.offset().top;t(".redactor-dropdown-"+this.uuid).each((function(){t(this).css({position:"absolute",top:e+"px"})}))}}},upload:function(){return{init:function(e,i,n){this.upload.direct=!1,this.upload.callback=n,this.upload.url=i,this.upload.$el=t(e),this.upload.$droparea=t('<div id="redactor-droparea" />'),this.upload.$placeholdler=t('<div id="redactor-droparea-placeholder" />').text(this.lang.get("upload_label")),this.upload.$input=t('<input type="file" name="file" />'),this.upload.$placeholdler.append(this.upload.$input),this.upload.$droparea.append(this.upload.$placeholdler),this.upload.$el.append(this.upload.$droparea),this.upload.$droparea.off("redactor.upload"),this.upload.$input.off("redactor.upload"),this.upload.$droparea.on("dragover.redactor.upload",t.proxy(this.upload.onDrag,this)),this.upload.$droparea.on("dragleave.redactor.upload",t.proxy(this.upload.onDragLeave,this)),this.upload.$input.on("change.redactor.upload",t.proxy((function(t){t=t.originalEvent||t,this.upload.traverseFile(this.upload.$input[0].files[0],t)}),this)),this.upload.$droparea.on("drop.redactor.upload",t.proxy((function(t){t.preventDefault(),this.upload.$droparea.removeClass("drag-hover").addClass("drag-drop"),this.upload.onDrop(t)}),this))},directUpload:function(t,e){this.upload.direct=!0,this.upload.traverseFile(t,e)},onDrop:function(t){var e=(t=t.originalEvent||t).dataTransfer.files;this.upload.traverseFile(e[0],t)},traverseFile:function(t,e){if(this.opts.s3)return this.upload.setConfig(t),void this.upload.s3uploadFile(t);var i=window.FormData?new FormData:null;if(window.FormData){this.upload.setConfig(t);var n="image"==this.upload.type?this.opts.imageUploadParam:this.opts.fileUploadParam;i.append(n,t)}this.progress.show(),this.core.setCallback("uploadStart",e,i),this.upload.sendData(i,e)},setConfig:function(t){this.upload.getType(t),this.upload.direct&&(this.upload.url="image"==this.upload.type?this.opts.imageUpload:this.opts.fileUpload,this.upload.callback="image"==this.upload.type?this.image.insert:this.file.insert)},getType:function(t){this.upload.type="image",-1==this.opts.imageTypes.indexOf(t.type)&&(this.upload.type="file"),null===this.opts.imageUpload&&null!==this.opts.fileUpload&&(this.upload.type="file")},getHiddenFields:function(e,i){return!1===e||"object"!=typeof e||t.each(e,t.proxy((function(e,n){null!==n&&0===n.toString().indexOf("#")&&(n=t(n).val()),i.append(e,n)}),this)),i},sendData:function(e,i){"image"==this.upload.type?(e=this.upload.getHiddenFields(this.opts.uploadImageFields,e),e=this.upload.getHiddenFields(this.upload.imageFields,e)):(e=this.upload.getHiddenFields(this.opts.uploadFileFields,e),e=this.upload.getHiddenFields(this.upload.fileFields,e));var n=new XMLHttpRequest;n.open("POST",this.upload.url),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.onreadystatechange=t.proxy((function(){if(4==n.readyState){var e,o=n.responseText;o=(o=o.replace(/^\[/,"")).replace(/\]$/,"");try{e="string"==typeof o?t.parseJSON(o):o}catch(t){e={error:!0}}this.progress.hide(),this.upload.direct||this.upload.$droparea.removeClass("drag-drop"),this.upload.callback(e,this.upload.direct,i)}}),this),n.send(e)},onDrag:function(t){t.preventDefault(),this.upload.$droparea.addClass("drag-hover")},onDragLeave:function(t){t.preventDefault(),this.upload.$droparea.removeClass("drag-hover")},clearImageFields:function(){this.upload.imageFields={}},addImageFields:function(t,e){this.upload.imageFields[t]=e},removeImageFields:function(t){delete this.upload.imageFields[t]},clearFileFields:function(){this.upload.fileFields={}},addFileFields:function(t,e){this.upload.fileFields[t]=e},removeFileFields:function(t){delete this.upload.fileFields[t]},s3uploadFile:function(e){this.upload.s3executeOnSignedUrl(e,t.proxy((function(t){this.upload.s3uploadToS3(e,t)}),this))},s3executeOnSignedUrl:function(t,e){var i=new XMLHttpRequest,n="-1"!==this.opts.s3.search(/\?/)?"?":"&";i.open("GET",this.opts.s3+n+"name="+t.name+"&type="+t.type,!0),i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined");var o=this;i.onreadystatechange=function(t){4==this.readyState&&200==this.status?(o.progress.show(),e(decodeURIComponent(this.responseText))):4==this.readyState&&this.status},i.send()},s3createCORSRequest:function(t,e){var i=new XMLHttpRequest;return"withCredentials"in i?i.open(t,e,!0):"undefined"!=typeof XDomainRequest?(i=new XDomainRequest).open(t,e):i=null,i},s3uploadToS3:function(e,i){var n=this.upload.s3createCORSRequest("PUT",i);n&&(n.onload=t.proxy((function(){if(200==n.status){this.progress.hide();var t=i.split("?");if(!t[0])return!1;this.upload.direct||this.upload.$droparea.removeClass("drag-drop");var e={filelink:t[0]};if("file"==this.upload.type){var o=t[0].split("/");e.filename=o[o.length-1]}this.upload.callback(e,this.upload.direct,!1)}}),this),n.onerror=function(){},n.upload.onprogress=function(t){},n.setRequestHeader("Content-Type",e.type),n.setRequestHeader("x-amz-acl","public-read"),n.send(e))}}},utils:function(){return{isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent)},isDesktop:function(){return!/(iPhone|iPod|iPad|BlackBerry|Android)/.test(navigator.userAgent)},isString:function(t){return"[object String]"==Object.prototype.toString.call(t)},isEmpty:function(e,i){return e=(e=(e=(e=(e=(e=(e=e.replace(/[\u200B-\u200D\uFEFF]/g,"")).replace(/&nbsp;/gi,"")).replace(/<\/?br\s?\/?>/g,"")).replace(/\s/g,"")).replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,"")).replace(/<iframe(.*?[^>])>$/i,"iframe")).replace(/<source(.*?[^>])>$/i,"source"),!1!==i&&(e=(e=e.replace(/<[^\/>][^>]*><\/[^>]+>/gi,"")).replace(/<[^\/>][^>]*><\/[^>]+>/gi,"")),""===t.trim(e)},normalize:function(t){return void 0===t?0:parseInt(t.replace("px",""),10)},hexToRgb:function(t){if(void 0!==t){if(-1==t.search(/^#/))return t;t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,n){return e+e+i+i+n+n}));var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgb("+parseInt(e[1],16)+", "+parseInt(e[2],16)+", "+parseInt(e[3],16)+")"}},getOuterHtml:function(e){return t("<div>").append(t(e).eq(0).clone()).html()},getAlignmentElement:function(e){return-1!==t.inArray(e.tagName,this.opts.alignmentTags)?t(e):t(e).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0])},removeEmptyAttr:function(e,i){var n=t(e);return void 0===n.attr(i)||""===n.attr(i)&&(n.removeAttr(i),!0)},removeEmpty:function(e,i){var n=t(t.parseHTML(i));if(n.find(".redactor-invisible-space").removeAttr("style").removeAttr("class"),0===n.find("hr, br, img, iframe, source").length){var o=t.trim(n.text());this.utils.isEmpty(o,!1)&&n.remove()}},saveScroll:function(){this.saveEditorScroll=this.$editor.scrollTop(),this.saveBodyScroll=t(window).scrollTop(),this.opts.scrollTarget&&(this.saveTargetScroll=t(this.opts.scrollTarget).scrollTop())},restoreScroll:function(){void 0===this.saveScroll&&void 0===this.saveBodyScroll||(t(window).scrollTop(this.saveBodyScroll),this.$editor.scrollTop(this.saveEditorScroll),this.opts.scrollTarget&&t(this.opts.scrollTarget).scrollTop(this.saveTargetScroll))},createSpaceElement:function(){var t=document.createElement("span");return t.className="redactor-invisible-space",t.innerHTML=this.opts.invisibleSpace,t},removeInlineTags:function(e){var i=this.opts.inlineTags;i.push("span"),"PRE"==e.tagName&&i.push("a"),t(e).find(i.join(",")).not("span.redactor-selection-marker").contents().unwrap()},replaceWithContents:function(e,i){var n=this;return t(e).replaceWith((function(){return!0===i&&n.utils.removeInlineTags(this),t(this).contents()})),t(e)},replaceToTag:function(e,i,n){var o,r=this;return t(e).replaceWith((function(){o=t("<"+i+" />").append(t(this).contents());for(var e=0;e<this.attributes.length;e++)o.attr(this.attributes[e].name,this.attributes[e].value);return!0===n&&r.utils.removeInlineTags(o),o})),o},isStartOfElement:function(){var t=this.selection.getBlock();return!!t&&0===this.caret.getOffsetOfElement(t)},isEndOfElement:function(e){return!(void 0===e&&!(e=this.selection.getBlock()))&&this.caret.getOffsetOfElement(e)==t.trim(t(e).text()).replace(/\n\r\n/g,"").length},isStartOfEditor:function(){return 0===this.caret.getOffsetOfElement(this.$editor[0])},isEndOfEditor:function(){var e=this.$editor[0];return this.caret.getOffsetOfElement(e)==t.trim(t(e).html().replace(/(<([^>]+)>)/gi,"")).length},isBlock:function(t){return(t=t[0]||t)&&this.utils.isBlockTag(t.tagName)},isBlockTag:function(t){return void 0!==t&&this.reIsBlock.test(t)},isTag:function(e,i){var n=t(e).closest(i,this.$editor[0]);return 1==n.length&&n[0]},isSelectAll:function(){return this.selectAll},enableSelectAll:function(){this.selectAll=!0},disableSelectAll:function(){this.selectAll=!1},isRedactorParent:function(e){return!!e&&0!==t(e).parents(".redactor-editor").length&&!t(e).hasClass("redactor-editor")&&e},isCurrentOrParentHeader:function(){return this.utils.isCurrentOrParent(["H1","H2","H3","H4","H5","H6"])},isCurrentOrParent:function(e){var i=this.selection.getParent(),n=this.selection.getCurrent();if(t.isArray(e)){var o=0;return t.each(e,t.proxy((function(t,e){this.utils.isCurrentOrParentOne(n,i,e)&&o++}),this)),0!==o}return this.utils.isCurrentOrParentOne(n,i,e)},isCurrentOrParentOne:function(t,e,i){return i=i.toUpperCase(),e&&e.tagName===i?e:!(!t||t.tagName!==i)&&t},isOldIe:function(){return!!(this.utils.browser("msie")&&parseInt(this.utils.browser("version"),10)<9)},isLessIe10:function(){return!!(this.utils.browser("msie")&&parseInt(this.utils.browser("version"),10)<10)},isIe11:function(){return!!navigator.userAgent.match(/Trident\/7\./)},browser:function(t){var e=navigator.userAgent.toLowerCase(),i=/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return"safari"==t?void 0!==i[3]&&"safari"==i[3]:"version"==t?i[2]:"webkit"==t?"chrome"==i[1]||"opr"==i[1]||"webkit"==i[1]:"rv"==i[1]?"msie"==t:"opr"==i[1]?"webkit"==t:t==i[1]},strpos:function(t,e,i){var n=t.indexOf(e,i);return n>=0&&n},disableBodyScroll:function(){var e=t("html"),i=window.innerWidth;if(!i){var n=document.documentElement.getBoundingClientRect();i=n.right-Math.abs(n.left)}var o=document.body.clientWidth<i,r=this.utils.measureScrollbar();e.css("overflow","hidden"),o&&e.css("padding-right",r)},measureScrollbar:function(){var e=t("body"),i=document.createElement("div");i.className="redactor-scrollbar-measure",e.append(i);var n=i.offsetWidth-i.clientWidth;return e[0].removeChild(i),n},enableBodyScroll:function(){t("html").css({overflow:"","padding-right":""}),t("body").remove("redactor-scrollbar-measure")}}}},t(window).on("load.tools.redactor",(function(){t('[data-tools="redactor"]').redactor()})),i.prototype.init.prototype=i.prototype}(jQuery),function(t,e,i){"use strict";t.fn.hideseek=function(e){return e=t.extend({list:".hideseek-data",nodata:"",attribute:"text",matches:!1,highlight:!1,ignore:"",headers:"",navigation:!1,ignore_accents:!1,hidden_mode:!1,min_chars:1},e),this.each((function(){var i=t(this);i.opts=[],t.map(["list","nodata","attribute","matches","highlight","ignore","headers","navigation","ignore_accents","hidden_mode","min_chars"],(function(t,n){i.opts[t]=i.data(t)||e[t]})),i.opts.headers&&(i.opts.ignore+=i.opts.ignore?", "+i.opts.headers:i.opts.headers);var n=t(i.opts.list);i.opts.navigation&&i.attr("autocomplete","off"),i.opts.hidden_mode&&n.children().hide(),i.keyup((function(e){if(-1==[38,40,13].indexOf(e.keyCode)&&(8==e.keyCode||i.val().length>=i.opts.min_chars)){var o=i.val().toLowerCase();n.children(i.opts.ignore.trim()?":not("+i.opts.ignore+")":"").removeClass("selected").each((function(){var e=("text"!=i.opts.attribute?t(this).attr(i.opts.attribute)||"":t(this).text()).toLowerCase();-1==e.removeAccents(i.opts.ignore_accents).indexOf(o)||o===(!!i.opts.hidden_mode&&"")?t(this).hide():(r(t(this)),i.opts.matches&&null!==o.match(new RegExp(Object.keys(i.opts.matches)[0]))&&(null!==e.match(new RegExp(Object.values(i.opts.matches)[0]))?r(t(this)):t(this).hide())),i.trigger("_after_each")})),i.opts.nodata&&(n.find(".no-results").remove(),n.children(':not([style*="display: none"])').length||(n.children().first().clone().removeHighlight().addClass("no-results").show().prependTo(i.opts.list).text(i.opts.nodata),i.trigger("_after_nodata"))),i.opts.headers&&t(i.opts.headers,n).each((function(){t(this).nextUntil(i.opts.headers).not('[style*="display: none"],'+i.opts.ignore).length?t(this).show():t(this).hide()})),i.trigger("_after")}function r(t){i.opts.highlight?t.removeHighlight().highlight(o).show():t.show()}function s(t){return t.children(".selected:visible")}var a;i.opts.navigation&&(38==e.keyCode?s(n).length?((a=n,s(a).prevAll(":visible:first")).addClass("selected"),s(n).last().removeClass("selected")):n.children(":visible").last().addClass("selected"):40==e.keyCode?s(n).length?(function(t){return s(t).nextAll(":visible:first")}(n).addClass("selected"),s(n).first().removeClass("selected")):n.children(":visible").first().addClass("selected"):13==e.keyCode&&(s(n).find("a").length?document.location=s(n).find("a").attr("href"):i.val(s(n).text())))}))}))},t(document).ready((function(){t('[data-toggle="hideseek"]').hideseek()}))}(jQuery),jQuery.fn.highlight=function(t){function e(t,i){var n=0;if(3==t.nodeType){var o=t.data.removeAccents(!0).toUpperCase().indexOf(i);if(o>=0){var r=document.createElement("mark");r.className="highlight";var s=t.splitText(o);s.splitText(i.length);var a=s.cloneNode(!0);r.appendChild(a),s.parentNode.replaceChild(r,s),n=1}}else if(1==t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var l=0;l<t.childNodes.length;++l)l+=e(t.childNodes[l],i);return n}return this.length&&t&&t.length?this.each((function(){e(this,t.toUpperCase())})):this},jQuery.fn.removeHighlight=function(){return this.find("mark.highlight").each((function(){with(this.parentNode.firstChild.nodeName,this.parentNode)replaceChild(this.firstChild,this),normalize()})).end()},String.prototype.removeAccents=function(t){return t?this.replace(/[áàãâä]/gi,"a").replace(/[éè¨ê]/gi,"e").replace(/[íìïî]/gi,"i").replace(/[óòöôõ]/gi,"o").replace(/[úùüû]/gi,"u").replace(/[ç]/gi,"c").replace(/[ñ]/gi,"n"):this},("function"==typeof define&&define.amd?define:function(t,e){"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):window.toastr=e(window.jQuery)})(["jquery"],(function(t){return d=0,h={clear:function(n,o){var s=r();a||e(s),i(n,s,o)||function(e){for(var n=a.children(),o=n.length-1;0<=o;o--)i(t(n[o]),e)}(s)},remove:function(i){var n=r();a||e(n),i&&0===t(":focus",i).length?s(i):a.children().length&&a.remove()},error:function(t,e,i){return o({type:"error",iconClass:r().iconClasses.error,message:t,optionsOverride:i,title:e})},getContainer:e,info:function(t,e,i){return o({type:"info",iconClass:r().iconClasses.info,message:t,optionsOverride:i,title:e})},options:{},subscribe:function(t){l=t},success:function(t,e,i){return o({type:"success",iconClass:r().iconClasses.success,message:t,optionsOverride:i,title:e})},version:"2.1.4",warning:function(t,e,i){return o({type:"warning",iconClass:r().iconClasses.warning,message:t,optionsOverride:i,title:e})}};function e(e,i){return e=e||r(),(a=t("#"+e.containerId)).length||i&&(n=e,(a=t("<div/>").attr("id",n.containerId).addClass(n.positionClass)).appendTo(t(n.target))),a;var n}function i(e,i,n){var o=!(!n||!n.force)&&n.force;return e&&(o||0===t(":focus",e).length)&&(e[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){s(e)}}),1)}function n(t){l&&l(t)}function o(i){var o=r(),l=i.iconClass||o.iconClass;if(void 0!==i.optionsOverride&&(o=t.extend(o,i.optionsOverride),l=i.optionsOverride.iconClass||l),!function(t,e){if(t.preventDuplicates){if(e.message===c)return 1;c=e.message}}(o,i)){d++,a=e(o,!0);var h=null,u=t("<div/>"),p=t("<div/>"),f=t("<div/>"),g=t("<div/>"),m=t(o.closeHtml),v={intervalId:null,hideEta:null,maxHideTime:null},y={toastId:d,state:"visible",startTime:new Date,options:o,map:i};return i.iconClass&&u.addClass(o.toastClass).addClass(l),function(){var t;i.title&&(t=i.title,o.escapeHtml&&(t=b(i.title)),p.append(t).addClass(o.titleClass),u.append(p))}(),function(){var t;i.message&&(t=i.message,o.escapeHtml&&(t=b(i.message)),f.append(t).addClass(o.messageClass),u.append(f))}(),o.closeButton&&(m.addClass(o.closeClass).attr("role","button"),u.prepend(m)),o.progressBar&&(g.addClass(o.progressClass),u.prepend(g)),o.rtl&&u.addClass("rtl"),o.newestOnTop?a.prepend(u):a.append(u),function(){var t="";switch(i.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}u.attr("aria-live",t)}(),u.hide(),u[o.showMethod]({duration:o.showDuration,easing:o.showEasing,complete:o.onShown}),0<o.timeOut&&(h=setTimeout(x,o.timeOut),v.maxHideTime=parseFloat(o.timeOut),v.hideEta=(new Date).getTime()+v.maxHideTime,o.progressBar&&(v.intervalId=setInterval((function(){var t=(v.hideEta-(new Date).getTime())/v.maxHideTime*100;g.width(t+"%")}),10))),o.closeOnHover&&u.hover((function(){clearTimeout(h),v.hideEta=0,u.stop(!0,!0)[o.showMethod]({duration:o.showDuration,easing:o.showEasing})}),(function(){(0<o.timeOut||0<o.extendedTimeOut)&&(h=setTimeout(x,o.extendedTimeOut),v.maxHideTime=parseFloat(o.extendedTimeOut),v.hideEta=(new Date).getTime()+v.maxHideTime)})),!o.onclick&&o.tapToDismiss&&u.click(x),o.closeButton&&m&&m.click((function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),o.onCloseClick&&o.onCloseClick(t),x(!0)})),o.onclick&&u.click((function(t){o.onclick(t),x()})),n(y),o.debug&&console&&console.log(y),u}function b(t){return null==t&&(t=""),t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function x(e){var i=e&&!1!==o.closeMethod?o.closeMethod:o.hideMethod,r=e&&!1!==o.closeDuration?o.closeDuration:o.hideDuration,a=e&&!1!==o.closeEasing?o.closeEasing:o.hideEasing;if(!t(":focus",u).length||e)return clearTimeout(v.intervalId),u[i]({duration:r,easing:a,complete:function(){s(u),clearTimeout(h),o.onHidden&&"hidden"!==y.state&&o.onHidden(),y.state="hidden",y.endTime=new Date,n(y)}})}}function r(){return t.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},h.options)}function s(t){a=a||e(),t.is(":visible")||(t.remove(),t=null,0===a.children().length&&(a.remove(),c=void 0))}var a,l,c,d,h})),function(t,e){Croppic=function(t,e){var n=this;for(i in n.id=t,n.obj=$("#"+t),n.outputDiv=n.obj,n.options={uploadUrl:"",uploadData:{},cropUrl:"",cropData:{},outputUrlId:"",imgEyecandy:!0,imgEyecandyOpacity:.2,zoomFactor:10,doubleZoomControls:!0,modal:!1,customUploadButtonId:"",loaderHtml:"",onBeforeImgUpload:null,onAfterImgUpload:null,onImgDrag:null,onImgZoom:null,onBeforeImgCrop:null,onAfterImgCrop:null},e)n.options[i]=e[i];n.init()},Croppic.prototype={id:"",imgInitW:0,imgInitH:0,imgW:0,imgH:0,objW:0,objH:0,windowW:0,windowH:$(t).height(),obj:{},outputDiv:{},outputUrlObj:{},img:{},defaultImg:{},croppedImg:{},imgEyecandy:{},form:{},cropControlsUpload:{},cropControlsCrop:{},cropControlZoomMuchIn:{},cropControlZoomMuchOut:{},cropControlZoomIn:{},cropControlZoomOut:{},cropControlCrop:{},cropControlReset:{},cropControlRemoveCroppedImage:{},modal:{},loader:{},init:function(){var t=this;t.objW=t.obj.width(),t.objH=t.obj.height(),$.isEmptyObject(t.defaultImg)&&(t.defaultImg=t.obj.find("img")),t.createImgUploadControls(),t.bindImgUploadControl()},createImgUploadControls:function(){var t=this,e="";""===t.options.customUploadButtonId&&(e='<i class="cropControlUpload"></i>');var i='<i class="cropControlRemoveCroppedImage"></i>';$.isEmptyObject(t.croppedImg)&&(i="");var n='<div class="cropControls cropControlsUpload"> '+e+i+" </div>";t.outputDiv.append(n),t.cropControlsUpload=t.outputDiv.find(".cropControlsUpload"),""===t.options.customUploadButtonId?t.imgUploadControl=t.outputDiv.find(".cropControlUpload"):(t.imgUploadControl=$("#"+t.options.customUploadButtonId),t.imgUploadControl.show()),$.isEmptyObject(t.croppedImg)||(t.cropControlRemoveCroppedImage=t.outputDiv.find(".cropControlRemoveCroppedImage"))},bindImgUploadControl:function(){var t=this,i='<form class="'+t.id+'_imgUploadForm" style="display: none; visibility: hidden;">  <input type="file" name="img">  </form>';t.outputDiv.append(i),t.form=t.outputDiv.find("."+t.id+"_imgUploadForm"),t.imgUploadControl.off("click"),t.imgUploadControl.on("click",(function(){t.form.find('input[type="file"]').trigger("click")})),$.isEmptyObject(t.croppedImg)||t.cropControlRemoveCroppedImage.on("click",(function(){t.croppedImg.remove(),$(this).hide(),$.isEmptyObject(t.defaultImg)||t.obj.append(t.defaultImg),""!==t.options.outputUrlId&&$("#"+t.options.outputUrlId).val("")})),t.form.find('input[type="file"]').change((function(){t.options.onBeforeImgUpload&&t.options.onBeforeImgUpload.call(t),t.showLoader(),t.imgUploadControl.hide();var i=new FormData(t.form[0]);for(var n in t.options.uploadData)t.options.uploadData.hasOwnProperty(n)&&i.append(n,t.options.uploadData[n]);$.ajax({url:t.options.uploadUrl,data:i,context:e.body,cache:!1,contentType:!1,processData:!1,type:"POST"}).always((function(e){response=jQuery.parseJSON(e),"success"==response.status&&(t.imgInitW=t.imgW=response.width,t.imgInitH=t.imgH=response.height,t.options.modal&&t.createModal(),$.isEmptyObject(t.croppedImg)||t.croppedImg.remove(),t.imgUrl=response.url,t.obj.append('<img src="'+response.url+'">'),t.initCropper(),t.hideLoader(),t.options.onAfterImgUpload&&t.options.onAfterImgUpload.call(t)),"error"==response.status&&(t.obj.append('<p style="width:100%; height:100%; text-align:center; line-height:'+t.objH+'px;">'+response.message+"</p>"),t.hideLoader(),setTimeout((function(){t.reset()}),2e3))}))}))},createModal:function(){var t=this,e=t.windowH/2-t.objH/2,i='<div id="croppicModal"><div id="croppicModalObj" style="width:'+t.objW+"px; height:"+t.objH+"px; margin:0 auto; margin-top:"+e+'px; position: relative;"> </div></div>';$("body").append(i),t.modal=$("#croppicModal"),t.obj=$("#croppicModalObj")},destroyModal:function(){var t=this;t.obj=t.outputDiv,t.modal.remove()},initCropper:function(){var t=this;t.img=t.obj.find("img"),t.img.wrap('<div class="cropImgWrapper" style="overflow:hidden; z-index:1; position:absolute; width:'+t.objW+"px; height:"+t.objH+'px;"></div>'),t.createCropControls(),t.options.imgEyecandy&&t.createEyecandy(),t.initDrag(),t.initialScaleImg()},createEyecandy:function(){var t=this;t.imgEyecandy=t.img.clone(),t.imgEyecandy.css({"z-index":"0",opacity:t.options.imgEyecandyOpacity}).appendTo(t.obj)},destroyEyecandy:function(){this.imgEyecandy.remove()},initialScaleImg:function(){var t=this;t.zoom(-t.imgInitW),t.zoom(40),t.img.css({left:-(t.imgW-t.objW)/2,top:-(t.imgH-t.objH)/2,position:"relative"}),t.options.imgEyecandy&&t.imgEyecandy.css({left:-(t.imgW-t.objW)/2,top:-(t.imgH-t.objH)/2,position:"relative"})},createCropControls:function(){var t,e=this,i='<i class="cropControlZoomIn"></i>',n='<i class="cropControlZoomOut"></i>',o='<i class="cropControlCrop"></i>',r='<i class="cropControlReset"></i>';t=e.options.doubleZoomControls?'<div class="cropControls cropControlsCrop"><i class="cropControlZoomMuchIn"></i>'+i+n+'<i class="cropControlZoomMuchOut"></i>'+o+r+"</div>":'<div class="cropControls cropControlsCrop">'+i+n+o+r+"</div>",e.obj.append(t),e.cropControlsCrop=e.obj.find(".cropControlsCrop"),e.options.doubleZoomControls&&(e.cropControlZoomMuchIn=e.cropControlsCrop.find(".cropControlZoomMuchIn"),e.cropControlZoomMuchIn.on("click",(function(){e.zoom(10*e.options.zoomFactor)})),e.cropControlZoomMuchOut=e.cropControlsCrop.find(".cropControlZoomMuchOut"),e.cropControlZoomMuchOut.on("click",(function(){e.zoom(10*-e.options.zoomFactor)}))),e.cropControlZoomIn=e.cropControlsCrop.find(".cropControlZoomIn"),e.cropControlZoomIn.on("click",(function(){e.zoom(e.options.zoomFactor)})),e.cropControlZoomOut=e.cropControlsCrop.find(".cropControlZoomOut"),e.cropControlZoomOut.on("click",(function(){e.zoom(-e.options.zoomFactor)})),e.cropControlCrop=e.cropControlsCrop.find(".cropControlCrop"),e.cropControlCrop.on("click",(function(){e.crop()})),e.cropControlReset=e.cropControlsCrop.find(".cropControlReset"),e.cropControlReset.on("click",(function(){e.reset()}))},initDrag:function(){var t=this;t.img.on("mousedown",(function(e){e.preventDefault();var i=t.img.css("z-index"),n=t.img.outerHeight(),o=t.img.outerWidth(),r=t.img.offset().top+n-e.pageY,s=t.img.offset().left+o-e.pageX;t.img.css("z-index",1e3).on("mousemove",(function(e){var a=e.pageY+r-n,l=e.pageX+s-o;t.img.offset({top:a,left:l}).on("mouseup",(function(){$(this).removeClass("draggable").css("z-index",i)})),t.options.imgEyecandy&&t.imgEyecandy.offset({top:a,left:l}),parseInt(t.img.css("top"))>0&&(t.img.css("top",0),t.options.imgEyecandy&&t.imgEyecandy.css("top",0));var c=-(t.imgH-t.objH);parseInt(t.img.css("top"))<c&&(t.img.css("top",c),t.options.imgEyecandy&&t.imgEyecandy.css("top",c)),parseInt(t.img.css("left"))>0&&(t.img.css("left",0),t.options.imgEyecandy&&t.imgEyecandy.css("left",0));var d=-(t.imgW-t.objW);parseInt(t.img.css("left"))<d&&(t.img.css("left",d),t.options.imgEyecandy&&t.imgEyecandy.css("left",d)),t.options.onImgDrag&&t.options.onImgDrag.call(t)}))})).on("mouseup",(function(){t.img.off("mousemove")})).on("mouseout",(function(){t.img.off("mousemove")}))},zoom:function(t){var e=this,i=e.imgW/e.imgH,n=e.imgW+t,o=n/i,r=!0;(n<e.objW||o<e.objH)&&(n-e.objW<o-e.objH?o=(n=e.objW)/i:n=i*(o=e.objH),r=!1),(n>e.imgInitW||o>e.imgInitH)&&(n-e.imgInitW<o-e.imgInitH?o=(n=e.imgInitW)/i:n=i*(o=e.imgInitH),r=!1),e.imgW=n,e.img.width(n),e.imgH=o,e.img.height(o);var s=parseInt(e.img.css("top"))-t/2,a=parseInt(e.img.css("left"))-t/2;s>0&&(s=0),a>0&&(a=0);var l=-(o-e.objH);s<l&&(s=l);var c=-(n-e.objW);a<c&&(a=c),r&&e.img.css({top:s,left:a}),e.options.imgEyecandy&&(e.imgEyecandy.width(n),e.imgEyecandy.height(o),r&&e.imgEyecandy.css({top:s,left:a})),e.options.onImgZoom&&e.options.onImgZoom.call(e)},crop:function(){var t=this;t.options.onBeforeImgCrop&&t.options.onBeforeImgCrop.call(t),t.cropControlsCrop.hide(),t.showLoader();var i={imgUrl:t.imgUrl,imgInitW:t.imgInitW,imgInitH:t.imgInitH,imgW:t.imgW,imgH:t.imgH,imgY1:Math.abs(parseInt(t.img.css("top"))),imgX1:Math.abs(parseInt(t.img.css("left"))),cropH:t.objH,cropW:t.objW},n=new FormData;for(var o in i)i.hasOwnProperty(o)&&n.append(o,i[o]);for(var o in t.options.cropData)t.options.cropData.hasOwnProperty(o)&&n.append(o,t.options.cropData[o]);$.ajax({url:t.options.cropUrl,data:n,context:e.body,cache:!1,contentType:!1,processData:!1,type:"POST"}).always((function(e){response=jQuery.parseJSON(e),"success"==response.status&&(t.imgEyecandy.hide(),t.destroy(),t.obj.append('<img class="croppedImg" src="'+response.url+'">'),""!==t.options.outputUrlId&&$("#"+t.options.outputUrlId).val(response.url),t.croppedImg=t.obj.find(".croppedImg"),t.init(),t.hideLoader()),"error"==response.status&&t.obj.append('<p style="width:100%; height:100%;>'+response.message+'</p>">'),t.options.onAfterImgCrop&&t.options.onAfterImgCrop.call(t)}))},showLoader:function(){var t=this;t.obj.append(t.options.loaderHtml),t.loader=t.obj.find(".loader")},hideLoader:function(){this.loader.remove()},reset:function(){var t=this;t.destroy(),t.init(),$.isEmptyObject(t.croppedImg)||(t.obj.append(t.croppedImg),""!==t.options.outputUrlId&&$("#"+t.options.outputUrlId).val(t.croppedImg.attr("url")))},destroy:function(){var t=this;t.options.modal&&!$.isEmptyObject(t.modal)&&t.destroyModal(),t.options.imgEyecandy&&!$.isEmptyObject(t.imgEyecandy)&&t.destroyEyecandy(),$.isEmptyObject(t.cropControlsUpload)||t.cropControlsUpload.remove(),$.isEmptyObject(t.cropControlsCrop)||t.cropControlsCrop.remove(),$.isEmptyObject(t.loader)||t.loader.remove(),$.isEmptyObject(t.form)||t.form.remove(),t.obj.html("")}}}(window,document),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).FullCalendar={})}(this,(function(t){"use strict";var e={className:!0,colSpan:!0,rowSpan:!0},i={"<tr":"tbody","<td":"tr"};function n(t,i,n){var o=document.createElement(t);if(i)for(var r in i)"style"===r?v(o,i[r]):e[r]?o[r]=i[r]:o.setAttribute(r,i[r]);return"string"==typeof n?o.innerHTML=n:null!=n&&a(o,n),o}function o(t){t=t.trim();var e=document.createElement(s(t));return e.innerHTML=t,e.firstChild}function r(t){return Array.prototype.slice.call(function(t){t=t.trim();var e=document.createElement(s(t));return e.innerHTML=t,e.childNodes}(t))}function s(t){return i[t.substr(0,3)]||"div"}function a(t,e){for(var i=c(e),n=0;n<i.length;n++)t.appendChild(i[n])}function l(t,e){for(var i=c(e),n=t.firstChild||null,o=0;o<i.length;o++)t.insertBefore(i[o],n)}function c(t){return"string"==typeof t?r(t):t instanceof Node?[t]:Array.prototype.slice.call(t)}function d(t){t.parentNode&&t.parentNode.removeChild(t)}var h=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector,u=Element.prototype.closest||function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(f(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null};function p(t,e){return u.call(t,e)}function f(t,e){return h.call(t,e)}function g(t,e){for(var i=t instanceof HTMLElement?[t]:t,n=[],o=0;o<i.length;o++)for(var r=i[o].querySelectorAll(e),s=0;s<r.length;s++)n.push(r[s]);return n}var m=/(top|left|right|bottom|width|height)$/i;function v(t,e){for(var i in e)y(t,i,e[i])}function y(t,e,i){null==i?t.style[e]="":"number"==typeof i&&m.test(e)?t.style[e]=i+"px":t.style[e]=i}function b(t,e){var i={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return i.left<i.right&&i.top<i.bottom&&i}var x=null;function w(){return null===x&&(x=function(){var t=n("div",{style:{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}},"<div></div>");document.body.appendChild(t);var e=t.firstChild.getBoundingClientRect().left>t.getBoundingClientRect().left;return d(t),e}()),x}function S(t){return t=Math.max(0,t),Math.round(t)}function C(t,e){void 0===e&&(e=!1);var i=window.getComputedStyle(t),n=parseInt(i.borderLeftWidth,10)||0,o=parseInt(i.borderRightWidth,10)||0,r=parseInt(i.borderTopWidth,10)||0,s=parseInt(i.borderBottomWidth,10)||0,a=S(t.offsetWidth-t.clientWidth-n-o),l={borderLeft:n,borderRight:o,borderTop:r,borderBottom:s,scrollbarBottom:S(t.offsetHeight-t.clientHeight-r-s),scrollbarLeft:0,scrollbarRight:0};return w()&&"rtl"===i.direction?l.scrollbarLeft=a:l.scrollbarRight=a,e&&(l.paddingLeft=parseInt(i.paddingLeft,10)||0,l.paddingRight=parseInt(i.paddingRight,10)||0,l.paddingTop=parseInt(i.paddingTop,10)||0,l.paddingBottom=parseInt(i.paddingBottom,10)||0),l}function k(t,e){void 0===e&&(e=!1);var i=_(t),n=C(t,e),o={left:i.left+n.borderLeft+n.scrollbarLeft,right:i.right-n.borderRight-n.scrollbarRight,top:i.top+n.borderTop,bottom:i.bottom-n.borderBottom-n.scrollbarBottom};return e&&(o.left+=n.paddingLeft,o.right-=n.paddingRight,o.top+=n.paddingTop,o.bottom-=n.paddingBottom),o}function _(t){var e=t.getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,right:e.right+window.pageXOffset,bottom:e.bottom+window.pageYOffset}}function T(t){return t.getBoundingClientRect().height+D(t)}function D(t){var e=window.getComputedStyle(t);return parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}function E(t){for(var e=[];t instanceof HTMLElement;){var i=window.getComputedStyle(t);if("fixed"===i.position)break;/(auto|scroll)/.test(i.overflow+i.overflowY+i.overflowX)&&e.push(t),t=t.parentNode}return e}function A(t){t.preventDefault()}function I(t,e,i,n){function o(t){var e=p(t.target,i);e&&n.call(e,t,e)}return t.addEventListener(e,o),function(){t.removeEventListener(e,o)}}var P=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"],M=["sun","mon","tue","wed","thu","fri","sat"];function L(t,e){var i=W(t);return i[2]+=e,Y(i)}function R(t,e){var i=W(t);return i[6]+=e,Y(i)}function O(t,e){return(e.valueOf()-t.valueOf())/864e5}function F(t,e){var i=z(t),n=z(e);return{years:0,months:0,days:Math.round(O(i,n)),milliseconds:e.valueOf()-n.valueOf()-(t.valueOf()-i.valueOf())}}function N(t,e){var i=H(t,e);return null!==i&&i%7==0?i/7:null}function H(t,e){return V(t)===V(e)?Math.round(O(t,e)):null}function z(t){return Y([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function B(t,e,i,n){var o,r,s=Y([e,0,-(7+Y([e,0,r=7+(o=i)-n]).getUTCDay()-o)%7+r-1+1]),a=z(t),l=Math.round(O(s,a));return Math.floor(l/7)+1}function $(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function j(t){return new Date(t[0],t[1]||0,null==t[2]?1:t[2],t[3]||0,t[4]||0,t[5]||0)}function W(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function Y(t){return 1===t.length&&(t=t.concat([0])),new Date(Date.UTC.apply(Date,t))}function X(t){return!isNaN(t.valueOf())}function V(t){return 1e3*t.getUTCHours()*60*60+1e3*t.getUTCMinutes()*60+1e3*t.getUTCSeconds()+t.getUTCMilliseconds()}var q=["years","months","days","milliseconds"],U=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function G(t,e){var i;return"string"==typeof t?function(t){var e=U.exec(t);if(e){var i=e[1]?-1:1;return{years:0,months:0,days:i*(e[2]?parseInt(e[2],10):0),milliseconds:i*(60*(e[3]?parseInt(e[3],10):0)*60*1e3+60*(e[4]?parseInt(e[4],10):0)*1e3+1e3*(e[5]?parseInt(e[5],10):0)+(e[6]?parseInt(e[6],10):0))}}return null}(t):"object"==typeof t&&t?Z(t):"number"==typeof t?Z(((i={})[e||"milliseconds"]=t,i)):null}function Z(t){return{years:t.years||t.year||0,months:t.months||t.month||0,days:(t.days||t.day||0)+7*K(t),milliseconds:60*(t.hours||t.hour||0)*60*1e3+60*(t.minutes||t.minute||0)*1e3+1e3*(t.seconds||t.second||0)+(t.milliseconds||t.millisecond||t.ms||0)}}function K(t){return t.weeks||t.week||0}function Q(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function J(t){return tt(t)/864e5}function tt(t){return 31536e6*t.years+2592e6*t.months+864e5*t.days+t.milliseconds}function et(t,e){var i=t.milliseconds;if(i){if(i%1e3!=0)return{unit:"millisecond",value:i};if(i%6e4!=0)return{unit:"second",value:i/1e3};if(i%36e5!=0)return{unit:"minute",value:i/6e4};if(i)return{unit:"hour",value:i/36e5}}return t.days?e||t.days%7!=0?{unit:"day",value:t.days}:{unit:"week",value:t.days/7}:t.months?{unit:"month",value:t.months}:t.years?{unit:"year",value:t.years}:{unit:"millisecond",value:0}}function it(t){t.forEach((function(t){t.style.height=""}))}function nt(t){var e,i,n=[],o=[];for("string"==typeof t?o=t.split(/\s*,\s*/):"function"==typeof t?o=[t]:Array.isArray(t)&&(o=t),e=0;e<o.length;e++)"string"==typeof(i=o[e])?n.push("-"===i.charAt(0)?{field:i.substring(1),order:-1}:{field:i,order:1}):"function"==typeof i&&n.push({func:i});return n}function ot(t,e,i){for(var n,o=0;o<i.length;o++)if(n=rt(t,e,i[o]))return n;return 0}function rt(t,e,i){return i.func?i.func(t,e):st(t[i.field],e[i.field])*(i.order||1)}function st(t,e){return t||e?null==e?-1:null==t?1:"string"==typeof t||"string"==typeof e?String(t).localeCompare(String(e)):t-e:0}function at(t){return t.charAt(0).toUpperCase()+t.slice(1)}function lt(t,e){var i=String(t);return"000".substr(0,e-i.length)+i}function ct(t){return t%1==0}function dt(t,e,i){if("function"==typeof t&&(t=[t]),t){var n=void 0,o=void 0;for(n=0;n<t.length;n++)o=t[n].apply(e,i)||o;return o}}function ht(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0;i<t.length;i++)if(void 0!==t[i])return t[i]}function ut(t,e){var i,n,o,r,s,a=function(){var l=(new Date).valueOf()-r;l<e?i=setTimeout(a,e-l):(i=null,s=t.apply(o,n),o=n=null)};return function(){return o=this,n=arguments,r=(new Date).valueOf(),i=i||setTimeout(a,e),s}}function pt(t,e,i,n){void 0===i&&(i={});var o={};for(var r in e){var s=e[r];void 0!==t[r]?o[r]=s===Function?"function"==typeof t[r]?t[r]:null:s?s(t[r]):t[r]:void 0!==i[r]?o[r]=i[r]:s===String?o[r]="":s&&s!==Number&&s!==Boolean&&s!==Function?o[r]=s(null):o[r]=null}if(n)for(var r in t)void 0===e[r]&&(n[r]=t[r]);return o}function ft(t){var e=Math.floor(O(t.start,t.end))||1,i=z(t.start);return{start:i,end:L(i,e)}}function gt(t,e){void 0===e&&(e=G(0));var i,n=null,o=null;return t.end&&(o=z(t.end),(i=t.end.valueOf()-o.valueOf())&&i>=tt(e)&&(o=L(o,1))),t.start&&(n=z(t.start),o&&o<=n&&(o=L(n,1))),{start:n,end:o}}function mt(t,e,i,n){return"year"===n?G(i.diffWholeYears(t,e),"year"):"month"===n?G(i.diffWholeMonths(t,e),"month"):F(t,e)}var vt=function(t,e){return(vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function yt(t,e){function i(){this.constructor=t}vt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var bt=function(){return(bt=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},xt=Object.prototype.hasOwnProperty;function wt(t,e){var i,n,o,r,s,a,l={};if(e)for(i=0;i<e.length;i++){for(n=e[i],o=[],r=t.length-1;0<=r;r--)if("object"==typeof(s=t[r][n])&&s)o.unshift(s);else if(void 0!==s){l[n]=s;break}o.length&&(l[n]=wt(o))}for(i=t.length-1;0<=i;i--)for(n in a=t[i])n in l||(l[n]=a[n]);return l}function St(t,e){var i={};for(var n in t)e(t[n],n)&&(i[n]=t[n]);return i}function Ct(t,e){var i={};for(var n in t)i[n]=e(t[n],n);return i}function kt(t){for(var e={},i=0,n=t;i<n.length;i++)e[n[i]]=!0;return e}function _t(t){var e=[];for(var i in t)e.push(t[i]);return e}function Tt(t,e){for(var i in t)if(xt.call(t,i)&&!(i in e))return!1;for(var i in e)if(xt.call(e,i)&&t[i]!==e[i])return!1;return!0}function Dt(t,e,i,n){for(var o={defs:{},instances:{}},r=0,s=t;r<s.length;r++){var a=Ye(s[r],e,i,n);a&&Et(a,o)}return o}function Et(t,e){return void 0===e&&(e={defs:{},instances:{}}),e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function At(t,e,i){var n,o,r,s,a,l=i.dateEnv,c=t.defs,d=St(d=t.instances,(function(t){return!c[t.defId].recurringDef}));for(var h in c){var u=c[h];if(u.recurringDef)for(var p=(p=u.recurringDef.duration)||(u.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration),f=0,g=(n=u,o=p,r=e,s=i.dateEnv,a=void 0,a=i.pluginSystem.hooks.recurringTypes[n.recurringDef.typeId].expand(n.recurringDef.typeData,{start:s.subtract(r.start,o),end:r.end},s),n.allDay&&(a=a.map(z)),a);f<g.length;f++){var m=g[f],v=Ve(h,{start:m,end:l.add(m,p)});d[v.instanceId]=v}}return{defs:c,instances:d}}function It(t,e){var i=t.instances[e];if(i){var n=t.defs[i.defId],o=Lt(t,(function(t){return e=n,i=t,Boolean(e.groupId&&e.groupId===i.groupId);var e,i}));return o.defs[n.defId]=n,o.instances[i.instanceId]=i,o}return{defs:{},instances:{}}}function Pt(t,e){var i;if(e){i=[];for(var n=0,o=t;n<o.length;n++){var r=o[n],s=e(r);s?i.push(s):null==s&&i.push(r)}}else i=t;return i}function Mt(t,e){return{defs:bt({},t.defs,e.defs),instances:bt({},t.instances,e.instances)}}function Lt(t,e){var i=St(t.defs,e),n=St(t.instances,(function(t){return i[t.defId]}));return{defs:i,instances:n}}function Rt(t,e){var i,n,o=[],r=e.start;for(t.sort(Ot),i=0;i<t.length;i++)(n=t[i]).start>r&&o.push({start:r,end:n.start}),n.end>r&&(r=n.end);return r<e.end&&o.push({start:r,end:e.end}),o}function Ot(t,e){return t.start.valueOf()-e.start.valueOf()}function Ft(t,e){var i=t.start,n=t.end,o=null;return null!==e.start&&(i=null===i?e.start:new Date(Math.max(i.valueOf(),e.start.valueOf()))),null!=e.end&&(n=null===n?e.end:new Date(Math.min(n.valueOf(),e.end.valueOf()))),(null===i||null===n||i<n)&&(o={start:i,end:n}),o}function Nt(t,e){return(null===t.start?null:t.start.valueOf())===(null===e.start?null:e.start.valueOf())&&(null===t.end?null:t.end.valueOf())===(null===e.end?null:e.end.valueOf())}function Ht(t,e){return(null===t.end||null===e.start||t.end>e.start)&&(null===t.start||null===e.end||t.start<e.end)}function zt(t,e){return(null===t.start||null!==e.start&&e.start>=t.start)&&(null===t.end||null!==e.end&&e.end<=t.end)}function Bt(t,e){return(null===t.start||e>=t.start)&&(null===t.end||e<t.end)}function $t(t,e){var i,n=t.length;if(n!==e.length)return!1;for(i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function jt(t){var e,i;return function(){return e&&$t(e,arguments)||(e=arguments,i=t.apply(this,arguments)),i}}function Wt(t,e){var i=null;return function(){var n=t.apply(this,arguments);return null!==i&&(i===n||e(i,n))||(i=n),i}}var Yt={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Xt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Vt=/\s*([ap])\.?m\.?/i,qt=/,/g,Ut=/\s+/g,Gt=/\u200e/g,Zt=/UTC|GMT/,Kt=(Qt.prototype.format=function(t,e){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,e)(t)},Qt.prototype.formatRange=function(t,e,i){var n,o,r,s=this.standardDateProps,a=this.extendedSettings,l=(n=t.marker,o=e.marker,(r=i.calendarSystem).getMarkerYear(n)===r.getMarkerYear(o)?r.getMarkerMonth(n)===r.getMarkerMonth(o)?r.getMarkerDay(n)===r.getMarkerDay(o)?V(n)===V(o)?0:1:2:4:5);if(!l)return this.format(t,i);var c=l;!(1<c)||"numeric"!==s.year&&"2-digit"!==s.year||"numeric"!==s.month&&"2-digit"!==s.month||"numeric"!==s.day&&"2-digit"!==s.day||(c=1);var d=this.format(t,i),h=this.format(e,i);if(d===h)return d;var u=Jt(function(t,e){var i={};for(var n in t)n in Xt&&!(Xt[n]<=e)||(i[n]=t[n]);return i}(s,c),a,i),p=u(t),f=u(e),g=function(t,e,i,n){for(var o=0;o<t.length;){var r=t.indexOf(e,o);if(-1===r)break;var s=t.substr(0,r);o=r+e.length;for(var a=t.substr(o),l=0;l<i.length;){var c=i.indexOf(n,l);if(-1===c)break;var d=i.substr(0,c);l=c+n.length;var h=i.substr(l);if(s===d&&a===h)return{before:s,after:a}}}return null}(d,p,h,f),m=a.separator||"";return g?g.before+p+m+f+g.after:d+m+h},Qt.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";default:return"day"}},Qt);function Qt(t){var e={},i={},n=0;for(var o in t)o in Yt?(i[o]=t[o],n=Math.max(Yt[o],n)):(e[o]=t[o],o in Xt&&(n=Math.max(Xt[o],n)));this.standardDateProps=e,this.extendedSettings=i,this.severity=n,this.buildFormattingFunc=jt(Jt)}function Jt(t,e,i){var n=Object.keys(t).length;return 1===n&&"short"===t.timeZoneName?function(t){return re(t.timeZoneOffset)}:0===n&&e.week?function(t){return function(t,e,i,n){var o=[];return"narrow"===n?o.push(e):"short"===n&&o.push(e," "),o.push(i.simpleNumberFormat.format(t)),i.options.isRtl&&o.reverse(),o.join("")}(i.computeWeekNumber(t.marker),i.weekLabel,i.locale,e.week)}:function(t,e,i){t=bt({},t),e=bt({},e),function(t,e){t.timeZoneName&&(t.hour||(t.hour="2-digit"),t.minute||(t.minute="2-digit")),"long"===t.timeZoneName&&(t.timeZoneName="short"),e.omitZeroMinute&&(t.second||t.millisecond)&&delete e.omitZeroMinute}(t,e),t.timeZone="UTC";var n,o,r=new Intl.DateTimeFormat(i.locale.codes,t);return e.omitZeroMinute&&(delete(o=bt({},t)).minute,n=new Intl.DateTimeFormat(i.locale.codes,o)),function(o){var s=o.marker;return function(t,e,i,n,o){return t=t.replace(Gt,""),"short"===i.timeZoneName&&(t=function(t,e){var i=!1;return t=t.replace(Zt,(function(){return i=!0,e})),i||(t+=" "+e),t}(t,"UTC"===o.timeZone||null==e.timeZoneOffset?"UTC":re(e.timeZoneOffset))),n.omitCommas&&(t=t.replace(qt,"").trim()),n.omitZeroMinute&&(t=t.replace(":00","")),!1===n.meridiem?t=t.replace(Vt,"").trim():"narrow"===n.meridiem?t=t.replace(Vt,(function(t,e){return e.toLocaleLowerCase()})):"short"===n.meridiem?t=t.replace(Vt,(function(t,e){return e.toLocaleLowerCase()+"m"})):"lowercase"===n.meridiem&&(t=t.replace(Vt,(function(t){return t.toLocaleLowerCase()}))),(t=t.replace(Ut," ")).trim()}((n&&!s.getUTCMinutes()?n:r).format(s),o,t,e,i)}}(t,e,i)}var te=(ee.prototype.format=function(t,e){return e.cmdFormatter(this.cmdStr,se(t,null,e,this.separator))},ee.prototype.formatRange=function(t,e,i){return i.cmdFormatter(this.cmdStr,se(t,e,i,this.separator))},ee);function ee(t,e){this.cmdStr=t,this.separator=e}var ie=(ne.prototype.format=function(t,e){return this.func(se(t,null,e))},ne.prototype.formatRange=function(t,e,i){return this.func(se(t,e,i))},ne);function ne(t){this.func=t}function oe(t,e){return"object"==typeof t&&t?("string"==typeof e&&(t=bt({separator:e},t)),new Kt(t)):"string"==typeof t?new te(t,e):"function"==typeof t?new ie(t):void 0}function re(t,e){void 0===e&&(e=!1);var i=t<0?"-":"+",n=Math.abs(t),o=Math.floor(n/60),r=Math.round(n%60);return e?i+lt(o,2)+":"+lt(r,2):"GMT"+i+o+(r?":"+lt(r,2):"")}function se(t,e,i,n){var o=ae(t,i.calendarSystem);return{date:o,start:o,end:e?ae(e,i.calendarSystem):null,timeZone:i.timeZone,localeCodes:i.locale.codes,separator:n}}function ae(t,e){var i=e.markerToArray(t.marker);return{marker:t.marker,timeZoneOffset:t.timeZoneOffset,array:i,year:i[0],month:i[1],day:i[2],hour:i[3],minute:i[4],second:i[5],millisecond:i[6]}}var le=(ce.prototype.remove=function(){this.calendar.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},ce.prototype.refetch=function(){this.calendar.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(ce.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!0,configurable:!0}),Object.defineProperty(ce.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!0,configurable:!0}),ce);function ce(t,e){this.calendar=t,this.internalEventSource=e}var de=(he.prototype.setProp=function(t,e){var i,n,o;t in je||(t in $e?("function"==typeof $e[t]&&(e=$e[t](e)),this.mutate({standardProps:((i={})[t]=e,i)})):t in Oe&&("function"==typeof Oe[t]&&(e=Oe[t](e)),o="color"===t?{backgroundColor:e,borderColor:e}:"editable"===t?{startEditable:e,durationEditable:e}:((n={})[t]=e,n),this.mutate({standardProps:{ui:o}})))},he.prototype.setExtendedProp=function(t,e){var i;this.mutate({extendedProps:((i={})[t]=e,i)})},he.prototype.setStart=function(t,e){void 0===e&&(e={});var i,n=this._calendar.dateEnv,o=n.createMarker(t);o&&this._instance&&(i=mt(this._instance.range.start,o,n,e.granularity),e.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i}))},he.prototype.setEnd=function(t,e){void 0===e&&(e={});var i,n,o=this._calendar.dateEnv;(null==t||(i=o.createMarker(t)))&&this._instance&&(i?(n=mt(this._instance.range.end,i,o,e.granularity),this.mutate({endDelta:n})):this.mutate({standardProps:{hasEnd:!1}}))},he.prototype.setDates=function(t,e,i){void 0===i&&(i={});var n,o,r,s,a=this._calendar.dateEnv,l={allDay:i.allDay},c=a.createMarker(t);c&&(null==e||(n=a.createMarker(e)))&&this._instance&&(o=this._instance.range,!0===i.allDay&&(o=ft(o)),r=mt(o.start,c,a,i.granularity),n?Q(r,s=mt(o.end,n,a,i.granularity))?this.mutate({datesDelta:r,standardProps:l}):this.mutate({startDelta:r,endDelta:s,standardProps:l}):(l.hasEnd=!1,this.mutate({datesDelta:r,standardProps:l})))},he.prototype.moveStart=function(t){var e=G(t);e&&this.mutate({startDelta:e})},he.prototype.moveEnd=function(t){var e=G(t);e&&this.mutate({endDelta:e})},he.prototype.moveDates=function(t){var e=G(t);e&&this.mutate({datesDelta:e})},he.prototype.setAllDay=function(t,e){void 0===e&&(e={});var i={allDay:t},n=e.maintainDuration;null==n&&(n=this._calendar.opt("allDayMaintainDuration")),this._def.allDay!==t&&(i.hasEnd=n),this.mutate({standardProps:i})},he.prototype.formatRange=function(t){var e=this._calendar.dateEnv,i=this._instance,n=oe(t,this._calendar.opt("defaultRangeSeparator"));return this._def.hasEnd?e.formatRange(i.range.start,i.range.end,n,{forcedStartTzo:i.forcedStartTzo,forcedEndTzo:i.forcedEndTzo}):e.format(i.range.start,n,{forcedTzo:i.forcedStartTzo})},he.prototype.mutate=function(t){var e,i=this._def,n=this._instance;n&&(this._calendar.dispatch({type:"MUTATE_EVENTS",instanceId:n.instanceId,mutation:t,fromApi:!0}),e=this._calendar.state.eventStore,this._def=e.defs[i.defId],this._instance=e.instances[n.instanceId])},he.prototype.remove=function(){this._calendar.dispatch({type:"REMOVE_EVENT_DEF",defId:this._def.defId})},Object.defineProperty(he.prototype,"source",{get:function(){var t=this._def.sourceId;return t?new le(this._calendar,this._calendar.state.eventSources[t]):null},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"start",{get:function(){return this._instance?this._calendar.dateEnv.toDate(this._instance.range.start):null},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._calendar.dateEnv.toDate(this._instance.range.end):null},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"id",{get:function(){return this._def.publicId},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"title",{get:function(){return this._def.title},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"url",{get:function(){return this._def.url},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"rendering",{get:function(){return this._def.rendering},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!0,configurable:!0}),Object.defineProperty(he.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!0,configurable:!0}),he);function he(t,e,i){this._calendar=t,this._def=e,this._instance=i||null}function ue(t,e,i,n){var o={},r={},s={},a=[],l=[],c=ge(t.defs,e);for(var d in t.defs)"inverse-background"===(x=t.defs[d]).rendering&&(x.groupId?(o[x.groupId]=[],s[x.groupId]||(s[x.groupId]=x)):r[d]=[]);for(var h in t.instances){var u=t.instances[h],p=c[(x=t.defs[u.defId]).defId],f=u.range,g=!x.allDay&&n?gt(f,n):f,m=Ft(g,i);m&&("inverse-background"===x.rendering?x.groupId?o[x.groupId].push(m):r[u.defId].push(m):("background"===x.rendering?a:l).push({def:x,ui:p,instance:u,range:m,isStart:g.start&&g.start.valueOf()===m.start.valueOf(),isEnd:g.end&&g.end.valueOf()===m.end.valueOf()}))}for(var v in o)for(var y=0,b=Rt(o[v],i);y<b.length;y++){var x,w=b[y];p=c[(x=s[v]).defId],a.push({def:x,ui:p,instance:null,range:w,isStart:!1,isEnd:!1})}for(var d in r)for(var S=0,C=Rt(r[d],i);S<C.length;S++)w=C[S],a.push({def:t.defs[d],ui:c[d],instance:null,range:w,isStart:!1,isEnd:!1});return{bg:a,fg:l}}function pe(t,e,i){var n=t.calendar,o=t.view;n.hasPublicHandlers("eventRender")&&(e=e.filter((function(t){var e=n.publiclyTrigger("eventRender",[{event:new de(n,t.eventRange.def,t.eventRange.instance),isMirror:i,isStart:t.isStart,isEnd:t.isEnd,el:t.el,view:o}]);return!1!==e&&(e&&!0!==e&&(t.el=e),!0)})));for(var r,s=0,a=e;s<a.length;s++){var l=a[s];r=l,l.el.fcSeg=r}return e}function fe(t){return t.fcSeg||null}function ge(t,e){return Ct(t,(function(t){return me(t,e)}))}function me(t,e){var i=[];return e[""]&&i.push(e[""]),e[t.defId]&&i.push(e[t.defId]),i.push(t.ui),ze(i)}function ve(t,e,i){var n=t.calendar,o=t.view;if(n.hasPublicHandlers("eventPositioned"))for(var r=0,s=e;r<s.length;r++){var a=s[r];n.publiclyTriggerAfterSizing("eventPositioned",[{event:new de(n,a.eventRange.def,a.eventRange.instance),isMirror:i,isStart:a.isStart,isEnd:a.isEnd,el:a.el,view:o}])}n.state.loadingLevel||(n.afterSizingTriggers._eventsPositioned=[null])}function ye(t,e,i){for(var n=t.calendar,o=t.view,r=0,s=e;r<s.length;r++){var a=s[r];n.trigger("eventElRemove",a.el)}if(n.hasPublicHandlers("eventDestroy"))for(var l=0,c=e;l<c.length;l++)a=c[l],n.publiclyTrigger("eventDestroy",[{event:new de(n,a.eventRange.def,a.eventRange.instance),isMirror:i,el:a.el,view:o}])}function be(t,e,i,n){var o=ge(t.defs,e),r={defs:{},instances:{}};for(var s in t.defs){var a=t.defs[s];r.defs[s]=xe(a,o[s],i,n.pluginSystem.hooks.eventDefMutationAppliers,n)}for(var l in t.instances){var c=t.instances[l];a=r.defs[c.defId],r.instances[l]=we(c,a,o[c.defId],i,n)}return r}function xe(t,e,i,n,o){var r=i.standardProps||{};null==r.hasEnd&&e.durationEditable&&(i.startDelta||i.endDelta)&&(r.hasEnd=!0);var s=bt({},t,r,{ui:bt({},t.ui,r.ui)});i.extendedProps&&(s.extendedProps=bt({},s.extendedProps,i.extendedProps));for(var a=0,l=n;a<l.length;a++)(0,l[a])(s,i,o);return!s.hasEnd&&o.opt("forceEventDuration")&&(s.hasEnd=!0),s}function we(t,e,i,n,o){var r=o.dateEnv,s=n.standardProps&&!0===n.standardProps.allDay,a=n.standardProps&&!1===n.standardProps.hasEnd,l=bt({},t);return s&&(l.range=ft(l.range)),n.datesDelta&&i.startEditable&&(l.range={start:r.add(l.range.start,n.datesDelta),end:r.add(l.range.end,n.datesDelta)}),n.startDelta&&i.durationEditable&&(l.range={start:r.add(l.range.start,n.startDelta),end:l.range.end}),n.endDelta&&i.durationEditable&&(l.range={start:l.range.start,end:r.add(l.range.end,n.endDelta)}),a&&(l.range={start:l.range.start,end:o.getDefaultEventEnd(e.allDay,l.range.start)}),e.allDay&&(l.range={start:z(l.range.start),end:z(l.range.end)}),l.range.end<l.range.start&&(l.range.end=o.getDefaultEventEnd(e.allDay,l.range.start)),l}function Se(t,e,i,n,o){switch(e.type){case"RECEIVE_EVENTS":return function(t,e,i,n,o,r){if(e&&i===e.latestFetchId){var s=Dt(function(t,e,i){var n=i.opt("eventDataTransform"),o=e?e.eventDataTransform:null;return o&&(t=Pt(t,o)),n&&(t=Pt(t,n)),t}(o,e,r),e.sourceId,r);return n&&(s=At(s,n,r)),Mt(Ce(t,e.sourceId),s)}return t}(t,i[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,o);case"ADD_EVENTS":return function(t,e,i,n){return i&&(e=At(e,i,n)),Mt(t,e)}(t,e.eventStore,n?n.activeRange:null,o);case"MERGE_EVENTS":return Mt(t,e.eventStore);case"PREV":case"NEXT":case"SET_DATE":case"SET_VIEW_TYPE":return n?At(t,n.activeRange,o):t;case"CHANGE_TIMEZONE":return d=t,h=e.oldDateEnv,u=o.dateEnv,p=d.defs,f=Ct(d.instances,(function(t){var e=p[t.defId];return e.allDay||e.recurringDef?t:bt({},t,{range:{start:u.createMarker(h.toDate(t.range.start,t.forcedStartTzo)),end:u.createMarker(h.toDate(t.range.end,t.forcedEndTzo))},forcedStartTzo:u.canComputeOffset?null:t.forcedStartTzo,forcedEndTzo:u.canComputeOffset?null:t.forcedEndTzo})})),{defs:p,instances:f};case"MUTATE_EVENTS":return r=t,s=e.instanceId,a=e.mutation,l=e.fromApi,c=o,Mt(r,be(It(r,s),l?{"":{startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}:c.eventUiBases,a,c));case"REMOVE_EVENT_INSTANCES":return ke(t,e.instances);case"REMOVE_EVENT_DEF":return Lt(t,(function(t){return t.defId!==e.defId}));case"REMOVE_EVENT_SOURCE":return Ce(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Lt(t,(function(t){return!t.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};case"RESET_EVENTS":return{defs:t.defs,instances:t.instances};default:return t}var r,s,a,l,c,d,h,u,p,f}function Ce(t,e){return Lt(t,(function(t){return t.sourceId!==e}))}function ke(t,e){return{defs:t.defs,instances:St(t.instances,(function(t){return!e[t.instanceId]}))}}function _e(t,e){return Te({eventDrag:t},e)}function Te(t,e){var i=e.view,n=bt({businessHours:i?i.props.businessHours:{defs:{},instances:{}},dateSelection:"",eventStore:e.state.eventStore,eventUiBases:e.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},t);return(e.pluginSystem.hooks.isPropsValid||De)(n,e)}function De(t,e,i,n){return void 0===i&&(i={}),!(t.eventDrag&&!function(t,e,i,n){var o=t.eventDrag,r=o.mutatedEvents,s=r.defs,a=r.instances,l=ge(s,o.isEvent?t.eventUiBases:{"":e.selectionConfig});n&&(l=Ct(l,n));var c=ke(t.eventStore,o.affectedEvents.instances),d=c.defs,h=c.instances,u=ge(d,t.eventUiBases);for(var p in a){var f=a[p],g=f.range,m=l[f.defId],v=s[f.defId];if(!Ee(m.constraints,g,c,t.businessHours,e))return;var y=e.opt("eventOverlap");for(var b in"function"!=typeof y&&(y=null),h){var x=h[b];if(Ht(g,x.range)){if(!1===u[x.defId].overlap&&o.isEvent)return;if(!1===m.overlap)return;if(y&&!y(new de(e,d[x.defId],x),new de(e,v,f)))return}}for(var w=e.state.eventStore,S=0,C=m.allows;S<C.length;S++){var k,_=C[S],T=bt({},i,{range:f.range,allDay:v.allDay}),D=w.defs[v.defId],E=w.instances[p];if(k=D?new de(e,D,E):new de(e,v),!_(e.buildDateSpanApi(T),k))return}}return 1}(t,e,i,n)||t.dateSelection&&!function(t,e,i,n){var o=t.eventStore,r=o.defs,s=o.instances,a=t.dateSelection,l=a.range,c=e.selectionConfig;if(n&&(c=n(c)),Ee(c.constraints,l,o,t.businessHours,e)){var d=e.opt("selectOverlap");for(var h in"function"!=typeof d&&(d=null),s){var u=s[h];if(Ht(l,u.range)){if(!1===c.overlap)return;if(d&&!d(new de(e,r[u.defId],u)))return}}for(var p=0,f=c.allows;p<f.length;p++){var g=f[p],m=bt({},i,a);if(!g(e.buildDateSpanApi(m),null))return}return 1}}(t,e,i,n))}function Ee(t,e,i,n,o){for(var r=0,s=t;r<s.length;r++)if(!Pe(Ae(s[r],e,i,n,o),e))return;return 1}function Ae(t,e,i,n,o){return"businessHours"===t?Ie(At(n,e,o)):"string"==typeof t?Ie(Lt(i,(function(e){return e.groupId===t}))):"object"==typeof t&&t?Ie(At(t,e,o)):[]}function Ie(t){var e=t.instances,i=[];for(var n in e)i.push(e[n].range);return i}function Pe(t,e){for(var i=0,n=t;i<n.length;i++)if(zt(n[i],e))return 1}function Me(t){return(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function Le(t){var e=[];for(var i in t){var n=t[i];null!=n&&""!==n&&e.push(i+":"+n)}return e.join(";")}function Re(t){return Array.isArray(t)?t:"string"==typeof t?t.split(/\s+/):[]}var Oe={editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:null,overlap:null,allow:null,className:Re,classNames:Re,color:String,backgroundColor:String,borderColor:String,textColor:String};function Fe(t,e,i){var n,o,r=pt(t,Oe,{},i),s=(n=r.constraint,o=e,Array.isArray(n)?Dt(n,"",o,!0):"object"==typeof n&&n?Dt([n],"",o,!0):null!=n?String(n):null);return{startEditable:null!=r.startEditable?r.startEditable:r.editable,durationEditable:null!=r.durationEditable?r.durationEditable:r.editable,constraints:null!=s?[s]:[],overlap:r.overlap,allows:null!=r.allow?[r.allow]:[],backgroundColor:r.backgroundColor||r.color,borderColor:r.borderColor||r.color,textColor:r.textColor,classNames:r.classNames.concat(r.className)}}function Ne(t,e,i,n){var o={},r={};for(var s in Oe){var a=t+at(s);o[s]=e[a],r[a]=!0}if("event"===t&&(o.editable=e.editable),n)for(var s in e)r[s]||(n[s]=e[s]);return Fe(o,i)}var He={startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function ze(t){return t.reduce(Be,He)}function Be(t,e){return{startEditable:null!=e.startEditable?e.startEditable:t.startEditable,durationEditable:null!=e.durationEditable?e.durationEditable:t.durationEditable,constraints:t.constraints.concat(e.constraints),overlap:"boolean"==typeof e.overlap?e.overlap:t.overlap,allows:t.allows.concat(e.allows),backgroundColor:e.backgroundColor||t.backgroundColor,borderColor:e.borderColor||t.borderColor,textColor:e.textColor||t.textColor,classNames:t.classNames.concat(e.classNames)}}var $e={id:String,groupId:String,title:String,url:String,rendering:String,extendedProps:null},je={start:null,date:null,end:null,allDay:null},We=0;function Ye(t,e,i,n){var o=function(t,e){var i=null;return t&&(i=e.state.eventSources[t].allDayDefault),null==i&&(i=e.opt("allDayDefault")),i}(e,i),r={},s=function(t,e,i,n,o){for(var r=0;r<n.length;r++){var s={},a=n[r].parse(t,s,i);if(a){var l=s.allDay;return delete s.allDay,null==l&&null==(l=e)&&null==(l=a.allDayGuess)&&(l=!1),bt(o,s),{allDay:l,duration:a.duration,typeData:a.typeData,typeId:r}}}return null}(t,o,i.dateEnv,i.pluginSystem.hooks.recurringTypes,r);if(s)return(a=Xe(r,e,s.allDay,Boolean(s.duration),i)).recurringDef={typeId:s.typeId,typeData:s.typeData,duration:s.duration},{def:a,instance:null};var a,l={},c=function(t,e,i,n,o){var r,s,a=function(t,e){var i=pt(t,je,{},e);return i.start=null!==i.start?i.start:i.date,delete i.date,i}(t,n),l=a.allDay,c=null,d=!1,h=null;if(r=i.dateEnv.createMarkerMeta(a.start))c=r.marker;else if(!o)return null;return null!=a.end&&(s=i.dateEnv.createMarkerMeta(a.end)),null==l&&(l=null!=e?e:(!r||r.isTimeUnspecified)&&(!s||s.isTimeUnspecified)),l&&c&&(c=z(c)),s&&(h=s.marker,l&&(h=z(h)),c&&h<=c&&(h=null)),h?d=!0:o||(d=i.opt("forceEventDuration")||!1,h=i.dateEnv.add(c,l?i.defaultAllDayEventDuration:i.defaultTimedEventDuration)),{allDay:l,hasEnd:d,range:{start:c,end:h},forcedStartTzo:r?r.forcedTzo:null,forcedEndTzo:s?s.forcedTzo:null}}(t,o,i,l,n);return c?{def:a=Xe(l,e,c.allDay,c.hasEnd,i),instance:Ve(a.defId,c.range,c.forcedStartTzo,c.forcedEndTzo)}:null}function Xe(t,e,i,n,o){var r,s,a,l,c,d={},h=(r=o,s=d,l=pt(t,$e,{},a={}),c=Fe(a,r,s),l.publicId=l.id,delete l.id,l.ui=c,l);h.defId=String(We++),h.sourceId=e,h.allDay=i,h.hasEnd=n;for(var u=0,p=o.pluginSystem.hooks.eventDefParsers;u<p.length;u++){var f={};(0,p[u])(h,d,f),d=f}return h.extendedProps=bt(d,h.extendedProps||{}),Object.freeze(h.ui.classNames),Object.freeze(h.extendedProps),h}function Ve(t,e,i,n){return{instanceId:String(We++),defId:t,range:e,forcedStartTzo:null==i?null:i,forcedEndTzo:null==n?null:n}}var qe={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],rendering:"inverse-background",classNames:"fc-nonbusiness",groupId:"_businessHours"};function Ue(t,e){return Dt(function(t){return(!0===t?[{}]:Array.isArray(t)?t.filter((function(t){return t.daysOfWeek})):"object"==typeof t&&t?[t]:[]).map((function(t){return bt({},qe,t)}))}(t),"",e)}function Ge(t,e,i){void 0===i&&(i=[]);var n,o,r=[];function s(){if(o){for(var t=0,i=r;t<i.length;t++)i[t].unrender();e&&e.apply(n,o),o=null}}function a(){o&&$t(o,arguments)||(s(),n=this,o=arguments,t.apply(this,arguments))}a.dependents=r,a.unrender=s;for(var l=0,c=i;l<c.length;l++)c[l].dependents.push(a);return a}var Ze={defs:{},instances:{}},Ke=(Qe.prototype.splitProps=function(t){var e=this,i=this.getKeyInfo(t),n=this.getKeysForEventDefs(t.eventStore),o=this.splitDateSelection(t.dateSelection),r=this.splitIndividualUi(t.eventUiBases,n),s=this.splitEventStore(t.eventStore,n),a=this.splitEventDrag(t.eventDrag),l=this.splitEventResize(t.eventResize),c={};for(var d in this.eventUiBuilders=Ct(i,(function(t,i){return e.eventUiBuilders[i]||jt(Je)})),i){var h=i[d],u=s[d]||Ze,p=this.eventUiBuilders[d];c[d]={businessHours:h.businessHours||t.businessHours,dateSelection:o[d]||null,eventStore:u,eventUiBases:p(t.eventUiBases[""],h.ui,r[d]),eventSelection:u.instances[t.eventSelection]?t.eventSelection:"",eventDrag:a[d]||null,eventResize:l[d]||null}}return c},Qe.prototype._splitDateSpan=function(t){var e={};if(t)for(var i=0,n=this.getKeysForDateSpan(t);i<n.length;i++)e[n[i]]=t;return e},Qe.prototype._getKeysForEventDefs=function(t){var e=this;return Ct(t.defs,(function(t){return e.getKeysForEventDef(t)}))},Qe.prototype._splitEventStore=function(t,e){var i=t.defs,n=t.instances,o={};for(var r in i)for(var s=0,a=e[r];s<a.length;s++)o[c=a[s]]||(o[c]={defs:{},instances:{}}),o[c].defs[r]=i[r];for(var l in n)for(var c,d=n[l],h=0,u=e[d.defId];h<u.length;h++)o[c=u[h]]&&(o[c].instances[l]=d);return o},Qe.prototype._splitIndividualUi=function(t,e){var i={};for(var n in t)if(n)for(var o=0,r=e[n];o<r.length;o++){var s=r[o];i[s]||(i[s]={}),i[s][n]=t[n]}return i},Qe.prototype._splitInteraction=function(t){var e={};if(t){var i=this._splitEventStore(t.affectedEvents,this._getKeysForEventDefs(t.affectedEvents)),n=this._getKeysForEventDefs(t.mutatedEvents),o=this._splitEventStore(t.mutatedEvents,n),r=function(n){e[n]||(e[n]={affectedEvents:i[n]||Ze,mutatedEvents:o[n]||Ze,isEvent:t.isEvent,origSeg:t.origSeg})};for(var s in i)r(s);for(var s in o)r(s)}return e},Qe);function Qe(){this.getKeysForEventDefs=jt(this._getKeysForEventDefs),this.splitDateSelection=jt(this._splitDateSpan),this.splitEventStore=jt(this._splitEventStore),this.splitIndividualUi=jt(this._splitIndividualUi),this.splitEventDrag=jt(this._splitInteraction),this.splitEventResize=jt(this._splitInteraction),this.eventUiBuilders={}}function Je(t,e,i){var n=[];t&&n.push(t),e&&n.push(e);var o={"":ze(n)};return i&&bt(o,i),o}function ti(t,e,i,n,o){var r,s,a,l;return i instanceof Date?r=i:(r=i.date,s=i.type,a=i.forceOff),l={date:e.formatIso(r,{omitTime:!0}),type:s||"day"},"string"==typeof n&&(o=n,n=null),n=n?" "+function(t){var e=[];for(var i in t){var n=t[i];null!=n&&e.push(i+'="'+Me(n)+'"')}return e.join(" ")}(n):"",o=o||"",!a&&t.navLinks?"<a"+n+' data-goto="'+Me(JSON.stringify(l))+'">'+o+"</a>":"<span"+n+">"+o+"</span>"}function ei(t,e,i,n){var o,r,s=i.calendar,a=i.options,l=i.theme,c=i.dateEnv,d=[];return Bt(e.activeRange,t)?(d.push("fc-"+M[t.getUTCDay()]),a.monthMode&&c.getMonth(t)!==c.getMonth(e.currentRange.start)&&d.push("fc-other-month"),r=L(o=z(s.getNow()),1),t<o?d.push("fc-past"):r<=t?d.push("fc-future"):(d.push("fc-today"),!0!==n&&d.push(l.getClass("today")))):d.push("fc-disabled-day"),d}function ii(t,e,i){function n(){r||(r=!0,e.apply(this,arguments))}function o(){r||(r=!0,i&&i.apply(this,arguments))}var r=!1,s=t(n,o);s&&"function"==typeof s.then&&s.then(n,o)}var ni=(oi.mixInto=function(t){this.mixIntoObj(t.prototype)},oi.mixIntoObj=function(t){var e=this;Object.getOwnPropertyNames(this.prototype).forEach((function(i){t[i]||(t[i]=e.prototype[i])}))},oi.mixOver=function(t){var e=this;Object.getOwnPropertyNames(this.prototype).forEach((function(i){t.prototype[i]=e.prototype[i]}))},oi);function oi(){}var ri,si=(yt(ai,ri=ni),ai.prototype.on=function(t,e){return li(this._handlers||(this._handlers={}),t,e),this},ai.prototype.one=function(t,e){return li(this._oneHandlers||(this._oneHandlers={}),t,e),this},ai.prototype.off=function(t,e){return this._handlers&&ci(this._handlers,t,e),this._oneHandlers&&ci(this._oneHandlers,t,e),this},ai.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return this.triggerWith(t,this,e),this},ai.prototype.triggerWith=function(t,e,i){return this._handlers&&dt(this._handlers[t],e,i),this._oneHandlers&&(dt(this._oneHandlers[t],e,i),delete this._oneHandlers[t]),this},ai.prototype.hasHandlers=function(t){return this._handlers&&this._handlers[t]&&this._handlers[t].length||this._oneHandlers&&this._oneHandlers[t]&&this._oneHandlers[t].length},ai);function ai(){return null!==ri&&ri.apply(this,arguments)||this}function li(t,e,i){(t[e]||(t[e]=[])).push(i)}function ci(t,e,i){i?t[e]&&(t[e]=t[e].filter((function(t){return t!==i}))):delete t[e]}var di=(hi.prototype.build=function(){var t=this.originEl,e=this.originClientRect=t.getBoundingClientRect();this.isHorizontal&&this.buildElHorizontals(e.left),this.isVertical&&this.buildElVerticals(e.top)},hi.prototype.buildElHorizontals=function(t){for(var e=[],i=[],n=0,o=this.els;n<o.length;n++){var r=o[n].getBoundingClientRect();e.push(r.left-t),i.push(r.right-t)}this.lefts=e,this.rights=i},hi.prototype.buildElVerticals=function(t){for(var e=[],i=[],n=0,o=this.els;n<o.length;n++){var r=o[n].getBoundingClientRect();e.push(r.top-t),i.push(r.bottom-t)}this.tops=e,this.bottoms=i},hi.prototype.leftToIndex=function(t){for(var e=this.lefts,i=this.rights,n=e.length,o=0;o<n;o++)if(t>=e[o]&&t<i[o])return o},hi.prototype.topToIndex=function(t){for(var e=this.tops,i=this.bottoms,n=e.length,o=0;o<n;o++)if(t>=e[o]&&t<i[o])return o},hi.prototype.getWidth=function(t){return this.rights[t]-this.lefts[t]},hi.prototype.getHeight=function(t){return this.bottoms[t]-this.tops[t]},hi);function hi(t,e,i,n){this.originEl=t,this.els=e,this.isHorizontal=i,this.isVertical=n}var ui=(pi.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},pi.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},pi.prototype.canScrollVertically=function(){return 0<this.getMaxScrollTop()},pi.prototype.canScrollHorizontally=function(){return 0<this.getMaxScrollLeft()},pi.prototype.canScrollUp=function(){return 0<this.getScrollTop()},pi.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},pi.prototype.canScrollLeft=function(){return 0<this.getScrollLeft()},pi.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},pi);function pi(){}var fi,gi=(yt(mi,fi=ui),mi.prototype.getScrollTop=function(){return this.el.scrollTop},mi.prototype.getScrollLeft=function(){return this.el.scrollLeft},mi.prototype.setScrollTop=function(t){this.el.scrollTop=t},mi.prototype.setScrollLeft=function(t){this.el.scrollLeft=t},mi.prototype.getScrollWidth=function(){return this.el.scrollWidth},mi.prototype.getScrollHeight=function(){return this.el.scrollHeight},mi.prototype.getClientHeight=function(){return this.el.clientHeight},mi.prototype.getClientWidth=function(){return this.el.clientWidth},mi);function mi(t){var e=fi.call(this)||this;return e.el=t,e}var vi,yi=(yt(bi,vi=ui),bi.prototype.getScrollTop=function(){return window.pageYOffset},bi.prototype.getScrollLeft=function(){return window.pageXOffset},bi.prototype.setScrollTop=function(t){window.scroll(window.pageXOffset,t)},bi.prototype.setScrollLeft=function(t){window.scroll(t,window.pageYOffset)},bi.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},bi.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},bi.prototype.getClientHeight=function(){return document.documentElement.clientHeight},bi.prototype.getClientWidth=function(){return document.documentElement.clientWidth},bi);function bi(){return null!==vi&&vi.apply(this,arguments)||this}var xi,wi=(yt(Si,xi=gi),Si.prototype.clear=function(){this.setHeight("auto"),this.applyOverflow()},Si.prototype.destroy=function(){d(this.el)},Si.prototype.applyOverflow=function(){v(this.el,{overflowX:this.overflowX,overflowY:this.overflowY})},Si.prototype.lockOverflow=function(t){var e=this.overflowX,i=this.overflowY;t=t||this.getScrollbarWidths(),"auto"===e&&(e=t.bottom||this.canScrollHorizontally()?"scroll":"hidden"),"auto"===i&&(i=t.left||t.right||this.canScrollVertically()?"scroll":"hidden"),v(this.el,{overflowX:e,overflowY:i})},Si.prototype.setHeight=function(t){y(this.el,"height",t)},Si.prototype.getScrollbarWidths=function(){var t=C(this.el);return{left:t.scrollbarLeft,right:t.scrollbarRight,bottom:t.scrollbarBottom}},Si);function Si(t,e){var i=xi.call(this,n("div",{className:"fc-scroller"}))||this;return i.overflowX=t,i.overflowY=e,i.applyOverflow(),i}var Ci=(ki.prototype.processIconOverride=function(){this.iconOverrideOption&&this.setIconOverride(this.calendarOptions[this.iconOverrideOption])},ki.prototype.setIconOverride=function(t){var e,i;if("object"==typeof t&&t){for(i in e=bt({},this.iconClasses),t)e[i]=this.applyIconOverridePrefix(t[i]);this.iconClasses=e}else!1===t&&(this.iconClasses={})},ki.prototype.applyIconOverridePrefix=function(t){var e=this.iconOverridePrefix;return e&&0!==t.indexOf(e)&&(t=e+t),t},ki.prototype.getClass=function(t){return this.classes[t]||""},ki.prototype.getIconClass=function(t){var e=this.iconClasses[t];return e?this.baseIconClass+" "+e:""},ki.prototype.getCustomButtonIconClass=function(t){var e;return this.iconOverrideCustomButtonOption&&(e=t[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(e):""},ki);function ki(t){this.calendarOptions=t,this.processIconOverride()}Ci.prototype.classes={},Ci.prototype.iconClasses={},Ci.prototype.baseIconClass="",Ci.prototype.iconOverridePrefix="";var _i=0,Ti=(Di.prototype.extend=function(t,e){return new Di(this.calendar,this.theme,this.dateEnv,t||this.options,e||this.view)},Di);function Di(t,e,i,n,o){this.calendar=t,this.theme=e,this.dateEnv=i,this.options=n,this.view=o,this.isRtl="rtl"===n.dir,this.eventOrderSpecs=nt(n.eventOrder),this.nextDayThreshold=G(n.nextDayThreshold)}var Ei=(Ai.addEqualityFuncs=function(t){this.prototype.equalityFuncs=bt({},this.prototype.equalityFuncs,t)},Ai.prototype.receiveProps=function(t,e){var i=this.context;this.context=e,i||this.firstContext(e);var n=function(t,e,i){var n={},o=!1;for(var r in e)r in t&&(t[r]===e[r]||i[r]&&i[r](t[r],e[r]))?n[r]=t[r]:(n[r]=e[r],o=!0);for(var r in t)if(!(r in e)){o=!0;break}return{anyChanges:o,comboProps:n}}(this.props||{},t,this.equalityFuncs),o=n.anyChanges,r=n.comboProps;this.props=r,o&&(i&&this.beforeUpdate(),this.render(r,e),i&&this.afterUpdate())},Ai.prototype.render=function(t,e){},Ai.prototype.firstContext=function(t){},Ai.prototype.beforeUpdate=function(){},Ai.prototype.afterUpdate=function(){},Ai.prototype.destroy=function(){},Ai);function Ai(){this.uid=String(_i++)}Ei.prototype.equalityFuncs={};var Ii,Pi=(yt(Mi,Ii=Ei),Mi.prototype.destroy=function(){Ii.prototype.destroy.call(this),d(this.el)},Mi.prototype.buildPositionCaches=function(){},Mi.prototype.queryHit=function(t,e,i,n){return null},Mi.prototype.isInteractionValid=function(t){var e=this.context.calendar,i=this.props.dateProfile,n=t.mutatedEvents.instances;if(i)for(var o in n)if(!zt(i.validRange,n[o].range))return!1;return _e(t,e)},Mi.prototype.isDateSelectionValid=function(t){var e=this.context.calendar,i=this.props.dateProfile;return!(i&&!zt(i.validRange,t.range))&&Te({dateSelection:t},e)},Mi.prototype.isValidSegDownEl=function(t){return!this.props.eventDrag&&!this.props.eventResize&&!p(t,".fc-mirror")&&(this.isPopover()||!this.isInPopover(t))},Mi.prototype.isValidDateDownEl=function(t){var e=p(t,this.fgSegSelector);return(!e||e.classList.contains("fc-mirror"))&&!p(t,".fc-more")&&!p(t,"a[data-goto]")&&!this.isInPopover(t)},Mi.prototype.isPopover=function(){return this.el.classList.contains("fc-popover")},Mi.prototype.isInPopover=function(t){return Boolean(p(t,".fc-popover"))},Mi);function Mi(t){var e=Ii.call(this)||this;return e.el=t,e}Pi.prototype.fgSegSelector=".fc-event-container > *",Pi.prototype.bgSegSelector=".fc-bgevent:not(.fc-nonbusiness)";var Li=0;function Ri(t){return{id:String(Li++),deps:t.deps||[],reducers:t.reducers||[],eventDefParsers:t.eventDefParsers||[],isDraggableTransformers:t.isDraggableTransformers||[],eventDragMutationMassagers:t.eventDragMutationMassagers||[],eventDefMutationAppliers:t.eventDefMutationAppliers||[],dateSelectionTransformers:t.dateSelectionTransformers||[],datePointTransforms:t.datePointTransforms||[],dateSpanTransforms:t.dateSpanTransforms||[],views:t.views||{},viewPropsTransformers:t.viewPropsTransformers||[],isPropsValid:t.isPropsValid||null,externalDefTransforms:t.externalDefTransforms||[],eventResizeJoinTransforms:t.eventResizeJoinTransforms||[],viewContainerModifiers:t.viewContainerModifiers||[],eventDropTransformers:t.eventDropTransformers||[],componentInteractions:t.componentInteractions||[],calendarInteractions:t.calendarInteractions||[],themeClasses:t.themeClasses||{},eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],namedTimeZonedImpl:t.namedTimeZonedImpl,defaultView:t.defaultView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{}}}var Oi=(Fi.prototype.add=function(t){if(!this.addedHash[t.id]){this.addedHash[t.id]=!0;for(var e=0,i=t.deps;e<i.length;e++){var n=i[e];this.add(n)}this.hooks=(r=t,{reducers:(o=this.hooks).reducers.concat(r.reducers),eventDefParsers:o.eventDefParsers.concat(r.eventDefParsers),isDraggableTransformers:o.isDraggableTransformers.concat(r.isDraggableTransformers),eventDragMutationMassagers:o.eventDragMutationMassagers.concat(r.eventDragMutationMassagers),eventDefMutationAppliers:o.eventDefMutationAppliers.concat(r.eventDefMutationAppliers),dateSelectionTransformers:o.dateSelectionTransformers.concat(r.dateSelectionTransformers),datePointTransforms:o.datePointTransforms.concat(r.datePointTransforms),dateSpanTransforms:o.dateSpanTransforms.concat(r.dateSpanTransforms),views:bt({},o.views,r.views),viewPropsTransformers:o.viewPropsTransformers.concat(r.viewPropsTransformers),isPropsValid:r.isPropsValid||o.isPropsValid,externalDefTransforms:o.externalDefTransforms.concat(r.externalDefTransforms),eventResizeJoinTransforms:o.eventResizeJoinTransforms.concat(r.eventResizeJoinTransforms),viewContainerModifiers:o.viewContainerModifiers.concat(r.viewContainerModifiers),eventDropTransformers:o.eventDropTransformers.concat(r.eventDropTransformers),calendarInteractions:o.calendarInteractions.concat(r.calendarInteractions),componentInteractions:o.componentInteractions.concat(r.componentInteractions),themeClasses:bt({},o.themeClasses,r.themeClasses),eventSourceDefs:o.eventSourceDefs.concat(r.eventSourceDefs),cmdFormatter:r.cmdFormatter||o.cmdFormatter,recurringTypes:o.recurringTypes.concat(r.recurringTypes),namedTimeZonedImpl:r.namedTimeZonedImpl||o.namedTimeZonedImpl,defaultView:o.defaultView||r.defaultView,elementDraggingImpl:o.elementDraggingImpl||r.elementDraggingImpl,optionChangeHandlers:bt({},o.optionChangeHandlers,r.optionChangeHandlers)})}var o,r},Fi);function Fi(){this.hooks={reducers:[],eventDefParsers:[],isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerModifiers:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,defaultView:"",elementDraggingImpl:null,optionChangeHandlers:{}},this.addedHash={}}var Ni=Ri({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(t){return Array.isArray(t)?t:Array.isArray(t.events)?t.events:null},fetch:function(t,e){e({rawEvents:t.eventSource.meta})}}]}),Hi=Ri({eventSourceDefs:[{parseMeta:function(t){return"function"==typeof t?t:"function"==typeof t.events?t.events:null},fetch:function(t,e,i){var n=t.calendar.dateEnv;ii(t.eventSource.meta.bind(null,{start:n.toDate(t.range.start),end:n.toDate(t.range.end),startStr:n.formatIso(t.range.start),endStr:n.formatIso(t.range.end),timeZone:n.timeZone}),(function(t){e({rawEvents:t})}),i)}}]});function zi(t,e,i,n,o){var r,s,a=null;"GET"===(t=t.toUpperCase())?(s=i,e=(r=e)+(-1===r.indexOf("?")?"?":"&")+Bi(s)):a=Bi(i);var l=new XMLHttpRequest;l.open(t,e,!0),"GET"!==t&&l.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),l.onload=function(){if(200<=l.status&&l.status<400)try{var t=JSON.parse(l.responseText);n(t,l)}catch(t){o("Failure parsing JSON",l)}else o("Request failed",l)},l.onerror=function(){o("Request failed",l)},l.send(a)}function Bi(t){var e=[];for(var i in t)e.push(encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return e.join("&")}var $i=Ri({eventSourceDefs:[{parseMeta:function(t){if("string"==typeof t)t={url:t};else if(!t||"object"!=typeof t||!t.url)return null;return{url:t.url,method:(t.method||"GET").toUpperCase(),extraParams:t.extraParams,startParam:t.startParam,endParam:t.endParam,timeZoneParam:t.timeZoneParam}},fetch:function(t,e,i){var n=t.eventSource.meta,o=function(t,e,i){var n,o,r,s,a=i.dateEnv,l={};return null==(n=t.startParam)&&(n=i.opt("startParam")),null==(o=t.endParam)&&(o=i.opt("endParam")),null==(r=t.timeZoneParam)&&(r=i.opt("timeZoneParam")),s="function"==typeof t.extraParams?t.extraParams():t.extraParams||{},bt(l,s),l[n]=a.formatIso(e.start),l[o]=a.formatIso(e.end),"local"!==a.timeZone&&(l[r]=a.timeZone),l}(n,t.range,t.calendar);zi(n.method,n.url,o,(function(t,i){e({rawEvents:t,xhr:i})}),(function(t,e){i({message:t,xhr:e})}))}}]}),ji=Ri({recurringTypes:[{parse:function(t,e,i){var n,o,r=i.createMarker.bind(i),s=pt(t,{daysOfWeek:null,startTime:G,endTime:G,startRecur:r,endRecur:r},{},e),a=!1;for(var l in s)if(null!=s[l]){a=!0;break}if(a){var c=null;return"duration"in e&&(c=G(e.duration),delete e.duration),!c&&s.startTime&&s.endTime&&(n=s.endTime,o=s.startTime,c={years:n.years-o.years,months:n.months-o.months,days:n.days-o.days,milliseconds:n.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!s.startTime&&!s.endTime),duration:c,typeData:s}}return null},expand:function(t,e,i){var n=Ft(e,{start:t.startRecur,end:t.endRecur});return n?function(t,e,i,n){for(var o=t?kt(t):null,r=z(i.start),s=i.end,a=[];r<s;){var l=void 0;o&&!o[r.getUTCDay()]||(l=e?n.add(r,e):r,a.push(l)),r=L(r,1)}return a}(t.daysOfWeek,t.startTime,n,i):[]}}]}),Wi=Ri({optionChangeHandlers:{events:function(t,e,i){Yi([t],e,i)},eventSources:Yi,plugins:function(t,e){e.addPluginInputs(t)}}});function Yi(t,e,i){for(var n=_t(e.state.eventSources),o=[],r=0,s=t;r<s.length;r++){for(var a=s[r],l=!1,c=0;c<n.length;c++)if(i(n[c]._raw,a)){n.splice(c,1),l=!0;break}l||o.push(a)}for(var d=0,h=n;d<h.length;d++){var u=h[d];e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:u.sourceId})}for(var p=0,f=o;p<f.length;p++){var g=f[p];e.addEventSource(g)}}var Xi={defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",columnHeader:!0,defaultView:"",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,scrollTime:"06:00:00",minTime:"00:00:00",maxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",timeGridEventMinHeight:0,themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",eventLimit:!1,eventLimitClick:"popover",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5},Vi={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"}},qi=["header","footer","buttonText","buttonIcons"],Ui=[Ni,Hi,$i,ji,Wi],Gi={code:"en",week:{dow:0,doy:4},dir:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekLabel:"W",allDayText:"all-day",eventLimitText:"more",noEventsMessage:"No events to display"};function Zi(t){for(var e=0<t.length?t[0].code:"en",i=window.FullCalendarLocalesAll||[],n=window.FullCalendarLocales||{},o=i.concat(_t(n),t),r={en:Gi},s=0,a=o;s<a.length;s++){var l=a[s];r[l.code]=l}return{map:r,defaultCode:e}}function Ki(t,e){return"object"!=typeof t||Array.isArray(t)?(n=e,r=function(t,e){for(var i=0;i<t.length;i++)for(var n=t[i].toLocaleLowerCase().split("-"),o=n.length;0<o;o--){var r=n.slice(0,o).join("-");if(e[r])return e[r]}return null}(o=[].concat((i=t)||[]),n)||Gi,Qi(i,o,r)):Qi(t.code,[t.code],t);var i,n,o,r}function Qi(t,e,i){var n=wt([Gi,i],["buttonText"]);delete n.code;var o=n.week;return delete n.week,{codeArg:t,codes:e,week:o,simpleNumberFormat:new Intl.NumberFormat(t),options:n}}var Ji=(tn.prototype.mutate=function(t,e,i){if(Object.keys(t).length||e.length){var n=i?this.dynamicOverrides:this.overrides;bt(n,t);for(var o=0,r=e;o<r.length;o++)delete n[r[o]];this.compute()}},tn.prototype.compute=function(){var t=ht(this.dynamicOverrides.locales,this.overrides.locales,Xi.locales),e=ht(this.dynamicOverrides.locale,this.overrides.locale,Xi.locale),i=Zi(t),n=Ki(e||i.defaultCode,i.map).options,o="rtl"===ht(this.dynamicOverrides.dir,this.overrides.dir,n.dir)?Vi:{};this.dirDefaults=o,this.localeDefaults=n,this.computed=wt([Xi,o,n,this.overrides,this.dynamicOverrides],qi)},tn);function tn(t){this.overrides=bt({},t),this.dynamicOverrides={},this.compute()}var en,nn={},on=(rn.prototype.getMarkerYear=function(t){return t.getUTCFullYear()},rn.prototype.getMarkerMonth=function(t){return t.getUTCMonth()},rn.prototype.getMarkerDay=function(t){return t.getUTCDate()},rn.prototype.arrayToMarker=Y,rn.prototype.markerToArray=W,rn);function rn(){}en=on,nn.gregory=en;var sn=/^\s*(\d{4})(-(\d{2})(-(\d{2})([T ](\d{2}):(\d{2})(:(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function an(t){var e=sn.exec(t);if(e){var i=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?1e3*Number("0."+e[12]):0));if(X(i)){var n=null;return e[13]&&(n=("-"===e[15]?-1:1)*(60*Number(e[16]||0)+Number(e[18]||0))),{marker:i,isTimeUnspecified:!e[6],timeZoneOffset:n}}}return null}var ln=(cn.prototype.createMarker=function(t){var e=this.createMarkerMeta(t);return null===e?null:e.marker},cn.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Y($(new Date))},cn.prototype.createMarkerMeta=function(t){if("string"==typeof t)return this.parse(t);var e=null;return"number"==typeof t?e=this.timestampToMarker(t):t instanceof Date?(t=t.valueOf(),isNaN(t)||(e=this.timestampToMarker(t))):Array.isArray(t)&&(e=Y(t)),null!==e&&X(e)?{marker:e,isTimeUnspecified:!1,forcedTzo:null}:null},cn.prototype.parse=function(t){var e=an(t);if(null===e)return null;var i=e.marker,n=null;return null!==e.timeZoneOffset&&(this.canComputeOffset?i=this.timestampToMarker(i.valueOf()-60*e.timeZoneOffset*1e3):n=e.timeZoneOffset),{marker:i,isTimeUnspecified:e.isTimeUnspecified,forcedTzo:n}},cn.prototype.getYear=function(t){return this.calendarSystem.getMarkerYear(t)},cn.prototype.getMonth=function(t){return this.calendarSystem.getMarkerMonth(t)},cn.prototype.add=function(t,e){var i=this.calendarSystem.markerToArray(t);return i[0]+=e.years,i[1]+=e.months,i[2]+=e.days,i[6]+=e.milliseconds,this.calendarSystem.arrayToMarker(i)},cn.prototype.subtract=function(t,e){var i=this.calendarSystem.markerToArray(t);return i[0]-=e.years,i[1]-=e.months,i[2]-=e.days,i[6]-=e.milliseconds,this.calendarSystem.arrayToMarker(i)},cn.prototype.addYears=function(t,e){var i=this.calendarSystem.markerToArray(t);return i[0]+=e,this.calendarSystem.arrayToMarker(i)},cn.prototype.addMonths=function(t,e){var i=this.calendarSystem.markerToArray(t);return i[1]+=e,this.calendarSystem.arrayToMarker(i)},cn.prototype.diffWholeYears=function(t,e){var i=this.calendarSystem;return V(t)===V(e)&&i.getMarkerDay(t)===i.getMarkerDay(e)&&i.getMarkerMonth(t)===i.getMarkerMonth(e)?i.getMarkerYear(e)-i.getMarkerYear(t):null},cn.prototype.diffWholeMonths=function(t,e){var i=this.calendarSystem;return V(t)===V(e)&&i.getMarkerDay(t)===i.getMarkerDay(e)?i.getMarkerMonth(e)-i.getMarkerMonth(t)+12*(i.getMarkerYear(e)-i.getMarkerYear(t)):null},cn.prototype.greatestWholeUnit=function(t,e){var i,n,o,r=this.diffWholeYears(t,e);return null!==r?{unit:"year",value:r}:null!==(r=this.diffWholeMonths(t,e))?{unit:"month",value:r}:null!==(r=N(t,e))?{unit:"week",value:r}:null!==(r=H(t,e))?{unit:"day",value:r}:(i=t,ct(r=(e.valueOf()-i.valueOf())/36e5)?{unit:"hour",value:r}:(n=t,ct(r=(e.valueOf()-n.valueOf())/6e4)?{unit:"minute",value:r}:(o=t,ct(r=(e.valueOf()-o.valueOf())/1e3)?{unit:"second",value:r}:{unit:"millisecond",value:e.valueOf()-t.valueOf()})))},cn.prototype.countDurationsBetween=function(t,e,i){var n;return i.years&&null!==(n=this.diffWholeYears(t,e))?n/(J(i)/365):i.months&&null!==(n=this.diffWholeMonths(t,e))?n/(J(i)/30):i.days&&null!==(n=H(t,e))?n/J(i):(e.valueOf()-t.valueOf())/tt(i)},cn.prototype.startOf=function(t,e){return"year"===e?this.startOfYear(t):"month"===e?this.startOfMonth(t):"week"===e?this.startOfWeek(t):"day"===e?z(t):"hour"===e?Y([(o=t).getUTCFullYear(),o.getUTCMonth(),o.getUTCDate(),o.getUTCHours()]):"minute"===e?Y([(n=t).getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes()]):"second"===e?Y([(i=t).getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds()]):void 0;var i,n,o},cn.prototype.startOfYear=function(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t)])},cn.prototype.startOfMonth=function(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t),this.calendarSystem.getMarkerMonth(t)])},cn.prototype.startOfWeek=function(t){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(t),this.calendarSystem.getMarkerMonth(t),t.getUTCDate()-(t.getUTCDay()-this.weekDow+7)%7])},cn.prototype.computeWeekNumber=function(t){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(t)):function(t,e,i){var n=t.getUTCFullYear(),o=B(t,n,e,i);if(o<1)return B(t,n-1,e,i);var r=B(t,n+1,e,i);return 1<=r?Math.min(o,r):o}(t,this.weekDow,this.weekDoy)},cn.prototype.format=function(t,e,i){return void 0===i&&(i={}),e.format({marker:t,timeZoneOffset:null!=i.forcedTzo?i.forcedTzo:this.offsetForMarker(t)},this)},cn.prototype.formatRange=function(t,e,i,n){return void 0===n&&(n={}),n.isEndExclusive&&(e=R(e,-1)),i.formatRange({marker:t,timeZoneOffset:null!=n.forcedStartTzo?n.forcedStartTzo:this.offsetForMarker(t)},{marker:e,timeZoneOffset:null!=n.forcedEndTzo?n.forcedEndTzo:this.offsetForMarker(e)},this)},cn.prototype.formatIso=function(t,e){void 0===e&&(e={});var i=null;return e.omitTimeZoneOffset||(i=null!=e.forcedTzo?e.forcedTzo:this.offsetForMarker(t)),function(t,e,i){void 0===i&&(i=!1);var n=(n=t.toISOString()).replace(".000","");return i&&(n=n.replace("T00:00:00Z","")),10<n.length&&(null==e?n=n.replace("Z",""):0!==e&&(n=n.replace("Z",re(e,!0)))),n}(t,i,e.omitTime)},cn.prototype.timestampToMarker=function(t){return"local"===this.timeZone?Y($(new Date(t))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Y(this.namedTimeZoneImpl.timestampToArray(t)):new Date(t)},cn.prototype.offsetForMarker=function(t){return"local"===this.timeZone?-j(W(t)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(W(t)):null},cn.prototype.toDate=function(t,e){return"local"===this.timeZone?j(W(t)):"UTC"===this.timeZone?new Date(t.valueOf()):this.namedTimeZoneImpl?new Date(t.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(W(t))*60):new Date(t.valueOf()-(e||0))},cn);function cn(t){var e,i=this.timeZone=t.timeZone,n="local"!==i&&"UTC"!==i;t.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new t.namedTimeZoneImpl(i)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=(e=t.calendarSystem,new nn[e]),this.locale=t.locale,this.weekDow=t.locale.week.dow,this.weekDoy=t.locale.week.doy,"ISO"===t.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof t.firstDay&&(this.weekDow=t.firstDay),"function"==typeof t.weekNumberCalculation&&(this.weekNumberFunc=t.weekNumberCalculation),this.weekLabel=null!=t.weekLabel?t.weekLabel:t.locale.options.weekLabel,this.cmdFormatter=t.cmdFormatter}var dn={id:String,allDayDefault:Boolean,eventDataTransform:Function,success:Function,failure:Function},hn=0;function un(t,e){return!e.pluginSystem.hooks.eventSourceDefs[t.sourceDefId].ignoreRange}function pn(t,e){for(var i=e.pluginSystem.hooks.eventSourceDefs,n=i.length-1;0<=n;n--){var o=i[n].parseMeta(t);if(o){var r=fn("object"==typeof t?t:{},o,n,e);return r._raw=t,r}}return null}function fn(t,e,i,n){var o={},r=pt(t,dn,{},o),s={},a=Fe(o,n,s);return r.isFetching=!1,r.latestFetchId="",r.fetchRange=null,r.publicId=String(t.id||""),r.sourceId=String(hn++),r.sourceDefId=i,r.meta=e,r.ui=a,r.extendedProps=s,r}var gn=0;function mn(t,e,i){return vn(t,St(t,(function(t){return o=e,un(n=t,r=i)?!r.opt("lazyFetching")||!n.fetchRange||n.isFetching||o.start<n.fetchRange.start||o.end>n.fetchRange.end:!n.latestFetchId;var n,o,r})),e,i)}function vn(t,e,i,n){var o={};for(var r in t){var s=t[r];e[r]?o[r]=yn(s,i,n):o[r]=s}return o}function yn(t,e,i){var n=i.pluginSystem.hooks.eventSourceDefs[t.sourceDefId],o=String(gn++);return n.fetch({eventSource:t,calendar:i,range:e},(function(n){var r,s,a=n.rawEvents,l=i.opt("eventSourceSuccess");t.success&&(s=t.success(a,n.xhr)),l&&(r=l(a,n.xhr)),a=s||r||a,i.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:o,fetchRange:e,rawEvents:a})}),(function(n){var r=i.opt("eventSourceFailure");console.warn(n.message,n),t.failure&&t.failure(n),r&&r(n),i.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:o,fetchRange:e,error:n})})),bt({},t,{isFetching:!0,latestFetchId:o})}var bn=(xn.prototype.buildPrev=function(t,e){var i=this.dateEnv,n=i.subtract(i.startOf(e,t.currentRangeUnit),t.dateIncrement);return this.build(n,-1)},xn.prototype.buildNext=function(t,e){var i=this.dateEnv,n=i.add(i.startOf(e,t.currentRangeUnit),t.dateIncrement);return this.build(n,1)},xn.prototype.build=function(t,e,i){void 0===i&&(i=!1);var n,o,r,s,a,l,c,d,h,u=this.buildValidRange();return u=this.trimHiddenDays(u),i&&(d=t,t=null!=(h=u).start&&d<h.start?h.start:null!=h.end&&d>=h.end?new Date(h.end.valueOf()-1):d),r=this.buildCurrentRangeInfo(t,e),s=/^(year|month|week|day)$/.test(r.unit),a=this.buildRenderRange(this.trimHiddenDays(r.range),r.unit,s),l=a=this.trimHiddenDays(a),this.options.showNonCurrentDates||(l=Ft(l,r.range)),n=G(this.options.minTime),o=G(this.options.maxTime),l=Ft(l=this.adjustActiveRange(l,n,o),u),c=Ht(r.range,u),{validRange:u,currentRange:r.range,currentRangeUnit:r.unit,isRangeAllDay:s,activeRange:l,renderRange:a,minTime:n,maxTime:o,isValid:c,dateIncrement:this.buildDateIncrement(r.duration)}},xn.prototype.buildValidRange=function(){return this.getRangeOption("validRange",this.calendar.getNow())||{start:null,end:null}},xn.prototype.buildCurrentRangeInfo=function(t,e){var i,n=this.viewSpec,o=this.dateEnv,r=null,s=null,a=null;return n.duration?(r=n.duration,s=n.durationUnit,a=this.buildRangeFromDuration(t,e,r,s)):(i=this.options.dayCount)?(s="day",a=this.buildRangeFromDayCount(t,e,i)):(a=this.buildCustomVisibleRange(t))?s=o.greatestWholeUnit(a.start,a.end).unit:(s=et(r=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(t,e,r,s)),{duration:r,unit:s,range:a}},xn.prototype.getFallbackDuration=function(){return G({day:1})},xn.prototype.adjustActiveRange=function(t,e,i){var n=this.dateEnv,o=t.start,r=t.end;return this.viewSpec.class.prototype.usesMinMaxTime&&(J(e)<0&&(o=z(o),o=n.add(o,e)),1<J(i)&&(r=L(r=z(r),-1),r=n.add(r,i))),{start:o,end:r}},xn.prototype.buildRangeFromDuration=function(t,e,i,n){var o,r,s,a,l,c=this.dateEnv,d=this.options.dateAlignment;function h(){s=c.startOf(t,d),a=c.add(s,i),l={start:s,end:a}}return d||(o=this.options.dateIncrement,d=o&&tt(r=G(o))<tt(i)?et(r,!K(o)).unit:n),J(i)<=1&&this.isHiddenDay(s)&&(s=z(s=this.skipHiddenDays(s,e))),h(),this.trimHiddenDays(l)||(t=this.skipHiddenDays(t,e),h()),l},xn.prototype.buildRangeFromDayCount=function(t,e,i){var n,o=this.dateEnv,r=this.options.dateAlignment,s=0,a=t;for(r&&(a=o.startOf(a,r)),a=z(a),n=a=this.skipHiddenDays(a,e);n=L(n,1),this.isHiddenDay(n)||s++,s<i;);return{start:a,end:n}},xn.prototype.buildCustomVisibleRange=function(t){var e=this.dateEnv,i=this.getRangeOption("visibleRange",e.toDate(t));return!i||null!=i.start&&null!=i.end?i:null},xn.prototype.buildRenderRange=function(t,e,i){return t},xn.prototype.buildDateIncrement=function(t){var e,i=this.options.dateIncrement;return i?G(i):(e=this.options.dateAlignment)?G(1,e):t||G({days:1})},xn.prototype.getRangeOption=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n,o,r,s,a=this.options[t];return"function"==typeof a&&(a=a.apply(null,e)),a&&(n=a,o=this.dateEnv,s=r=null,n.start&&(r=o.createMarker(n.start)),n.end&&(s=o.createMarker(n.end)),a=!r&&!s||r&&s&&s<r?null:{start:r,end:s}),a&&gt(a)},xn.prototype.initHiddenDays=function(){var t,e=this.options.hiddenDays||[],i=[],n=0;for(!1===this.options.weekends&&e.push(0,6),t=0;t<7;t++)(i[t]=-1!==e.indexOf(t))||n++;if(!n)throw new Error("invalid hiddenDays");this.isHiddenDayHash=i},xn.prototype.trimHiddenDays=function(t){var e=t.start,i=t.end;return e=e&&this.skipHiddenDays(e),i=i&&this.skipHiddenDays(i,-1,!0),null==e||null==i||e<i?{start:e,end:i}:null},xn.prototype.isHiddenDay=function(t){return t instanceof Date&&(t=t.getUTCDay()),this.isHiddenDayHash[t]},xn.prototype.skipHiddenDays=function(t,e,i){for(void 0===e&&(e=1),void 0===i&&(i=!1);this.isHiddenDayHash[(t.getUTCDay()+(i?e:0)+7)%7];)t=L(t,e);return t},xn);function xn(t,e){this.viewSpec=t,this.options=t.options,this.dateEnv=e.dateEnv,this.calendar=e,this.initHiddenDays()}function wn(t){var e=0;for(var i in t)t[i].isFetching&&e++;return e}var Sn={start:null,end:null,allDay:Boolean};function Cn(t,e,i,n){if(e[t])return e[t];var o=function(t,e,i,n){function o(t){return r&&null!==r[t]?r[t]:s&&null!==s[t]?s[t]:null}var r=i[t],s=n[t],a=o("class"),l=o("superType");!l&&a&&(l=kn(a,n)||kn(a,i));var c=null;if(l){if(l===t)throw new Error("Can't have a custom view type that references itself");c=Cn(l,e,i,n)}return!a&&c&&(a=c.class),a?{type:t,class:a,defaults:bt({},c?c.defaults:{},r?r.options:{}),overrides:bt({},c?c.overrides:{},s?s.options:{})}:null}(t,e,i,n);return o&&(e[t]=o),o}function kn(t,e){var i=Object.getPrototypeOf(t.prototype);for(var n in e){var o=e[n];if(o.class&&o.class.prototype===i)return n}return""}function _n(t){return Ct(t,Dn)}var Tn={type:String,class:null};function Dn(t){"function"==typeof t&&(t={class:t});var e={},i=pt(t,Tn,{},e);return{superType:i.type,class:i.class,options:e}}var En,An=(yt(In,En=Ei),In.prototype.destroy=function(){En.prototype.destroy.call(this),this._renderLayout.unrender(),d(this.el)},In.prototype.render=function(t){this._renderLayout(t.layout),this._updateTitle(t.title),this._updateActiveButton(t.activeButton),this._updateToday(t.isTodayEnabled),this._updatePrev(t.isPrevEnabled),this._updateNext(t.isNextEnabled)},In.prototype.renderLayout=function(t){var e=this.el;this.viewsWithButtons=[],a(e,this.renderSection("left",t.left)),a(e,this.renderSection("center",t.center)),a(e,this.renderSection("right",t.right))},In.prototype.unrenderLayout=function(){this.el.innerHTML=""},In.prototype.renderSection=function(t,e){var i=this,r=this.context,s=r.theme,l=r.calendar,c=l.optionsManager,d=l.viewSpecs,h=n("div",{className:"fc-"+t}),u=c.computed.customButtons||{},p=c.overrides.buttonText||{},f=c.computed.buttonText||{};return e&&e.split(" ").forEach((function(t,e){var n,r,c=[],g=!0;t.split(",").forEach((function(t,e){var n,r,a,h,m,v,y,b,x;"title"===t?(c.push(o("<h2>&nbsp;</h2>")),g=!1):((n=u[t])?(a=function(t){n.click&&n.click.call(b,t)},(h=s.getCustomButtonIconClass(n))||(h=s.getIconClass(t))||(m=n.text)):(r=d[t])?(i.viewsWithButtons.push(t),a=function(){l.changeView(t)},(m=r.buttonTextOverride)||(h=s.getIconClass(t))||(m=r.buttonTextDefault)):l[t]&&(a=function(){l[t]()},(m=p[t])||(h=s.getIconClass(t))||(m=f[t])),a&&(y=["fc-"+t+"-button",s.getClass("button")],m?(v=Me(m),x=""):h&&(v="<span class='"+h+"'></span>",x=' aria-label="'+t+'"'),(b=o('<button type="button" class="'+y.join(" ")+'"'+x+">"+v+"</button>")).addEventListener("click",a),c.push(b)))})),1<c.length?(n=document.createElement("div"),r=s.getClass("buttonGroup"),g&&r&&n.classList.add(r),a(n,c),h.appendChild(n)):a(h,c)})),h},In.prototype.updateToday=function(t){this.toggleButtonEnabled("today",t)},In.prototype.updatePrev=function(t){this.toggleButtonEnabled("prev",t)},In.prototype.updateNext=function(t){this.toggleButtonEnabled("next",t)},In.prototype.updateTitle=function(t){g(this.el,"h2").forEach((function(e){e.innerText=t}))},In.prototype.updateActiveButton=function(t){var e=this.context.theme.getClass("buttonActive");g(this.el,"button").forEach((function(i){t&&i.classList.contains("fc-"+t+"-button")?i.classList.add(e):i.classList.remove(e)}))},In.prototype.toggleButtonEnabled=function(t,e){g(this.el,".fc-"+t+"-button").forEach((function(t){t.disabled=!e}))},In);function In(t){var e=En.call(this)||this;return e._renderLayout=Ge(e.renderLayout,e.unrenderLayout),e._updateTitle=Ge(e.updateTitle,null,[e._renderLayout]),e._updateActiveButton=Ge(e.updateActiveButton,null,[e._renderLayout]),e._updateToday=Ge(e.updateToday,null,[e._renderLayout]),e._updatePrev=Ge(e.updatePrev,null,[e._renderLayout]),e._updateNext=Ge(e.updateNext,null,[e._renderLayout]),e.el=n("div",{className:"fc-toolbar "+t}),e}var Pn,Mn=(yt(Ln,Pn=Ei),Ln.prototype.render=function(t,e){this.freezeHeight();var i=this.computeTitle(t.dateProfile,t.viewSpec.options);this.renderSkeleton(e),this.renderToolbars(t.viewSpec,t.dateProfile,t.currentDate,i),this.renderView(t,i),this.updateSize(),this.thawHeight()},Ln.prototype.destroy=function(){this.header&&this.header.destroy(),this.footer&&this.footer.destroy(),this.renderSkeleton.unrender(),Pn.prototype.destroy.call(this)},Ln.prototype._renderSkeleton=function(t){this.updateElClassNames(t),l(this.el,this.contentEl=n("div",{className:"fc-view-container"}));for(var e=t.calendar,i=0,o=e.pluginSystem.hooks.viewContainerModifiers;i<o.length;i++)(0,o[i])(this.contentEl,e)},Ln.prototype._unrenderSkeleton=function(){this.view&&(this.savedScroll=this.view.queryScroll(),this.view.destroy(),this.view=null),d(this.contentEl),this.removeElClassNames()},Ln.prototype.removeElClassNames=function(){for(var t=this.el.classList,e=0,i=this.elClassNames;e<i.length;e++){var n=i[e];t.remove(n)}this.elClassNames=[]},Ln.prototype.updateElClassNames=function(t){this.removeElClassNames();var e=t.theme,i=t.options;this.elClassNames=["fc","fc-"+i.dir,e.getClass("widget")];for(var n=this.el.classList,o=0,r=this.elClassNames;o<r.length;o++){var s=r[o];n.add(s)}},Ln.prototype._renderToolbars=function(t,e,i,n){var o=this.context,r=this.header,s=this.footer,c=o.options,d=o.calendar,h=c.header,u=c.footer,p=this.props.dateProfileGenerator,f=d.getNow(),g=p.build(f),m=p.buildPrev(e,i),v=p.buildNext(e,i),y={title:n,activeButton:t.type,isTodayEnabled:g.isValid&&!Bt(e.currentRange,f),isPrevEnabled:m.isValid,isNextEnabled:v.isValid};h?(r||(r=this.header=new An("fc-header-toolbar"),l(this.el,r.el)),r.receiveProps(bt({layout:h},y),o)):r&&(r.destroy(),r=this.header=null),u?(s||(s=this.footer=new An("fc-footer-toolbar"),a(this.el,s.el)),s.receiveProps(bt({layout:u},y),o)):s&&(s.destroy(),s=this.footer=null)},Ln.prototype._unrenderToolbars=function(){this.header&&(this.header.destroy(),this.header=null),this.footer&&(this.footer.destroy(),this.footer=null)},Ln.prototype.renderView=function(t,e){var i=this.view,n=this.context,o=n.calendar,r=n.options,s=t.viewSpec,a=t.dateProfileGenerator;i&&i.viewSpec===s||(i&&i.destroy(),i=this.view=new s.class(s,this.contentEl),this.savedScroll&&(i.addScroll(this.savedScroll,!0),this.savedScroll=null)),i.title=e;for(var l={dateProfileGenerator:a,dateProfile:t.dateProfile,businessHours:this.parseBusinessHours(s.options.businessHours),eventStore:t.eventStore,eventUiBases:t.eventUiBases,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize},c=0,d=this.buildViewPropTransformers(o.pluginSystem.hooks.viewPropsTransformers);c<d.length;c++){var h=d[c];bt(l,h.transform(l,s,t,r))}i.receiveProps(l,this.buildComponentContext(this.context,s,i))},Ln.prototype.updateSize=function(t){void 0===t&&(t=!1);var e=this.view;e&&(!t&&null!=this.isHeightAuto||this.computeHeightVars(),e.updateSize(t,this.viewHeight,this.isHeightAuto),e.updateNowIndicator(),e.popScroll(t))},Ln.prototype.computeHeightVars=function(){var t,e=this.context.calendar,i=e.opt("height"),n=e.opt("contentHeight");this.isHeightAuto="auto"===i||"auto"===n,"number"==typeof n?this.viewHeight=n:"function"==typeof n?this.viewHeight=n():"number"==typeof i?this.viewHeight=i-this.queryToolbarsHeight():"function"==typeof i?this.viewHeight=i()-this.queryToolbarsHeight():"parent"===i?(t=this.el.parentNode,this.viewHeight=t.getBoundingClientRect().height-this.queryToolbarsHeight()):this.viewHeight=Math.round(this.contentEl.getBoundingClientRect().width/Math.max(e.opt("aspectRatio"),.5))},Ln.prototype.queryToolbarsHeight=function(){var t=0;return this.header&&(t+=T(this.header.el)),this.footer&&(t+=T(this.footer.el)),t},Ln.prototype.freezeHeight=function(){v(this.el,{height:this.el.getBoundingClientRect().height,overflow:"hidden"})},Ln.prototype.thawHeight=function(){v(this.el,{height:"",overflow:""})},Ln);function Ln(t){var e=Pn.call(this)||this;return e.elClassNames=[],e.renderSkeleton=Ge(e._renderSkeleton,e._unrenderSkeleton),e.renderToolbars=Ge(e._renderToolbars,e._unrenderToolbars,[e.renderSkeleton]),e.buildComponentContext=jt(On),e.buildViewPropTransformers=jt(Fn),e.el=t,e.computeTitle=jt(Rn),e.parseBusinessHours=jt((function(t){return Ue(t,e.context.calendar)})),e}function Rn(t,e){var i=/^(year|month)$/.test(t.currentRangeUnit)?t.currentRange:t.activeRange;return this.context.dateEnv.formatRange(i.start,i.end,oe(e.titleFormat||function(t){var e=t.currentRangeUnit;if("year"===e)return{year:"numeric"};if("month"===e)return{year:"numeric",month:"long"};var i=H(t.currentRange.start,t.currentRange.end);return null!==i&&1<i?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(t),e.titleRangeSeparator),{isEndExclusive:t.isRangeAllDay})}function On(t,e,i){return t.extend(e.options,i)}function Fn(t){return t.map((function(t){return new t}))}var Nn=(Hn.prototype.destroy=function(){},Hn);function Hn(t){this.component=t.component}var zn,Bn={},$n=(yt(jn,zn=Nn),jn);function jn(t){var e=zn.call(this,t)||this;e.handleSegClick=function(t,i){var n,o,r=e.component,s=r.context,a=s.calendar,l=s.view,c=fe(i);c&&r.isValidSegDownEl(t.target)&&(o=(n=p(t.target,".fc-has-url"))?n.querySelector("a[href]").href:"",a.publiclyTrigger("eventClick",[{el:i,event:new de(r.context.calendar,c.eventRange.def,c.eventRange.instance),jsEvent:t,view:l}]),o&&!t.defaultPrevented&&(window.location.href=o))};var i=t.component;return e.destroy=I(i.el,"click",i.fgSegSelector+","+i.bgSegSelector,e.handleSegClick),e}var Wn,Yn=(yt(Xn,Wn=Nn),Xn.prototype.destroy=function(){this.removeHoverListeners(),this.component.context.calendar.off("eventElRemove",this.handleEventElRemove)},Xn.prototype.triggerEvent=function(t,e,i){var n=this.component,o=n.context,r=o.calendar,s=o.view,a=fe(i);e&&!n.isValidSegDownEl(e.target)||r.publiclyTrigger(t,[{el:i,event:new de(r,a.eventRange.def,a.eventRange.instance),jsEvent:e,view:s}])},Xn);function Xn(t){var e=Wn.call(this,t)||this;e.handleEventElRemove=function(t){t===e.currentSegEl&&e.handleSegLeave(null,e.currentSegEl)},e.handleSegEnter=function(t,i){fe(i)&&(i.classList.add("fc-allow-mouse-resize"),e.currentSegEl=i,e.triggerEvent("eventMouseEnter",t,i))},e.handleSegLeave=function(t,i){e.currentSegEl&&(i.classList.remove("fc-allow-mouse-resize"),e.currentSegEl=null,e.triggerEvent("eventMouseLeave",t,i))};var i,n,o,r,s,a=t.component;return e.removeHoverListeners=(i=a.el,n=a.fgSegSelector+","+a.bgSegSelector,o=e.handleSegEnter,r=e.handleSegLeave,I(i,"mouseover",n,(function(t,e){var i;e!==s&&(o(t,s=e),i=function(t){s=null,r(t,e),e.removeEventListener("mouseleave",i)},e.addEventListener("mouseleave",i))}))),a.context.calendar.on("eventElRemove",e.handleEventElRemove),e}var Vn,qn=(yt(Un,Vn=Ci),Un);function Un(){return null!==Vn&&Vn.apply(this,arguments)||this}qn.prototype.classes={widget:"fc-unthemed",widgetHeader:"fc-widget-header",widgetContent:"fc-widget-content",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active",popoverHeader:"fc-widget-header",popoverContent:"fc-widget-content",headerRow:"fc-widget-header",dayRow:"fc-widget-content",listView:"fc-widget-content"},qn.prototype.baseIconClass="fc-icon",qn.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},qn.prototype.iconOverrideOption="buttonIcons",qn.prototype.iconOverrideCustomButtonOption="icon",qn.prototype.iconOverridePrefix="fc-icon-";var Gn=(Zn.prototype.addPluginInputs=function(t){for(var e=0,i=function(t){for(var e=[],i=0,n=t;i<n.length;i++){var o,r=n[i];"string"==typeof r?(o="FullCalendar"+at(r),window[o]?e.push(window[o].default):console.warn("Plugin file not loaded for "+r)):e.push(r)}return Ui.concat(e)}(t);e<i.length;e++){var n=i[e];this.pluginSystem.add(n)}},Object.defineProperty(Zn.prototype,"view",{get:function(){return this.component?this.component.view:null},enumerable:!0,configurable:!0}),Zn.prototype.render=function(){this.component?this.requestRerender():(this.component=new Mn(this.el),this.renderableEventStore={defs:{},instances:{}},this.bindHandlers(),this.executeRender())},Zn.prototype.destroy=function(){if(this.component){this.unbindHandlers(),this.component.destroy(),this.component=null;for(var t=0,e=this.calendarInteractions;t<e.length;t++)e[t].destroy();this.publiclyTrigger("_destroyed")}},Zn.prototype.bindHandlers=function(){var t=this;this.removeNavLinkListener=I(this.el,"click","a[data-goto]",(function(e,i){var n=(n=i.getAttribute("data-goto"))?JSON.parse(n):{},o=t.dateEnv,r=o.createMarker(n.date),s=n.type,a=t.viewOpt("navLink"+at(s)+"Click");"function"==typeof a?a(o.toDate(r),e):("string"==typeof a&&(s=a),t.zoomTo(r,s))})),this.opt("handleWindowResize")&&window.addEventListener("resize",this.windowResizeProxy=ut(this.windowResize.bind(this),this.opt("windowResizeDelay")))},Zn.prototype.unbindHandlers=function(){this.removeNavLinkListener(),this.windowResizeProxy&&(window.removeEventListener("resize",this.windowResizeProxy),this.windowResizeProxy=null)},Zn.prototype.hydrate=function(){var t=this;this.state=this.buildInitialState();var e=this.opt("eventSources")||[],i=this.opt("events"),n=[];i&&e.unshift(i);for(var o=0,r=e;o<r.length;o++){var s=pn(r[o],this);s&&n.push(s)}this.batchRendering((function(){t.dispatch({type:"INIT"}),t.dispatch({type:"ADD_EVENT_SOURCES",sources:n}),t.dispatch({type:"SET_VIEW_TYPE",viewType:t.opt("defaultView")||t.pluginSystem.hooks.defaultView})}))},Zn.prototype.buildInitialState=function(){return{viewType:null,loadingLevel:0,eventSourceLoadingLevel:0,currentDate:this.getInitialDate(),dateProfile:null,eventSources:{},eventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null}},Zn.prototype.dispatch=function(t){if(this.actionQueue.push(t),!this.isReducing){this.isReducing=!0;for(var e=this.state;this.actionQueue.length;)this.state=this.reduce(this.state,this.actionQueue.shift(),this);var i=this.state;this.isReducing=!1,!e.loadingLevel&&i.loadingLevel?this.publiclyTrigger("loading",[!0]):e.loadingLevel&&!i.loadingLevel&&this.publiclyTrigger("loading",[!1]);var n=this.component&&this.component.view;e.eventStore!==i.eventStore&&e.eventStore&&(this.isEventsUpdated=!0),e.dateProfile!==i.dateProfile&&(e.dateProfile&&n&&this.publiclyTrigger("datesDestroy",[{view:n,el:n.el}]),this.isDatesUpdated=!0),e.viewType!==i.viewType&&(e.viewType&&n&&this.publiclyTrigger("viewSkeletonDestroy",[{view:n,el:n.el}]),this.isViewUpdated=!0),this.requestRerender()}},Zn.prototype.reduce=function(t,e,i){for(var n=function(t,e){return"SET_VIEW_TYPE"===e.type?e.viewType:t}(t.viewType,e),o=function(t,e,i,n,o){var r;switch(e.type){case"PREV":r=o.dateProfileGenerators[n].buildPrev(t,i);break;case"NEXT":r=o.dateProfileGenerators[n].buildNext(t,i);break;case"SET_DATE":t.activeRange&&Bt(t.currentRange,e.dateMarker)||(r=o.dateProfileGenerators[n].build(e.dateMarker,void 0,!0));break;case"SET_VIEW_TYPE":var s=o.dateProfileGenerators[n];if(!s)throw new Error(n?'The FullCalendar view "'+n+'" does not exist. Make sure your plugins are loaded correctly.':"No available FullCalendar view plugins.");r=s.build(e.dateMarker||i,void 0,!0)}return!r||!r.isValid||t&&function(t,e){return Nt(t.validRange,e.validRange)&&Nt(t.activeRange,e.activeRange)&&Nt(t.renderRange,e.renderRange)&&Q(t.minTime,e.minTime)&&Q(t.maxTime,e.maxTime)}(t,r)?t:r}(t.dateProfile,e,t.currentDate,n,i),r=function(t,e,i,n){switch(e.type){case"ADD_EVENT_SOURCES":return function(t,e,i,n){for(var o={},r=0,s=e;r<s.length;r++){var a=s[r];o[a.sourceId]=a}return i&&(o=mn(o,i,n)),bt({},t,o)}(t,e.sources,i?i.activeRange:null,n);case"REMOVE_EVENT_SOURCE":return r=t,s=e.sourceId,St(r,(function(t){return t.sourceId!==s}));case"PREV":case"NEXT":case"SET_DATE":case"SET_VIEW_TYPE":return i?mn(t,i.activeRange,n):t;case"FETCH_EVENT_SOURCES":case"CHANGE_TIMEZONE":return vn(t,e.sourceIds?kt(e.sourceIds):(o=n,St(t,(function(t){return un(t,o)}))),i?i.activeRange:null,n);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(t,e,i,n){var o,r=t[e];return r&&i===r.latestFetchId?bt({},t,((o={})[e]=bt({},r,{isFetching:!1,fetchRange:n}),o)):t}(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}var o,r,s}(t.eventSources,e,o,i),s=bt({},t,{viewType:n,dateProfile:o,currentDate:function(t,e,i){switch(e.type){case"PREV":case"NEXT":return Bt(i.currentRange,t)?t:i.currentRange.start;case"SET_DATE":case"SET_VIEW_TYPE":var n=e.dateMarker||t;return i.activeRange&&!Bt(i.activeRange,n)?i.currentRange.start:n;default:return t}}(t.currentDate,e,o),eventSources:r,eventStore:Se(t.eventStore,e,r,o,i),dateSelection:function(t,e){switch(e.type){case"SELECT_DATES":return e.selection;case"UNSELECT_DATES":return null;default:return t}}(t.dateSelection,e),eventSelection:function(t,e){switch(e.type){case"SELECT_EVENT":return e.eventInstanceId;case"UNSELECT_EVENT":return"";default:return t}}(t.eventSelection,e),eventDrag:function(t,e){switch(e.type){case"SET_EVENT_DRAG":var i=e.state;return{affectedEvents:i.affectedEvents,mutatedEvents:i.mutatedEvents,isEvent:i.isEvent,origSeg:i.origSeg};case"UNSET_EVENT_DRAG":return null;default:return t}}(t.eventDrag,e),eventResize:function(t,e){switch(e.type){case"SET_EVENT_RESIZE":var i=e.state;return{affectedEvents:i.affectedEvents,mutatedEvents:i.mutatedEvents,isEvent:i.isEvent,origSeg:i.origSeg};case"UNSET_EVENT_RESIZE":return null;default:return t}}(t.eventResize,e),eventSourceLoadingLevel:wn(r),loadingLevel:wn(r)}),a=0,l=i.pluginSystem.hooks.reducers;a<l.length;a++)s=(0,l[a])(s,e,i);return s},Zn.prototype.requestRerender=function(){this.needsRerender=!0,this.delayedRerender()},Zn.prototype.tryRerender=function(){this.component&&this.needsRerender&&!this.renderingPauseDepth&&!this.isRendering&&this.executeRender()},Zn.prototype.batchRendering=function(t){this.renderingPauseDepth++,t(),this.renderingPauseDepth--,this.needsRerender&&this.requestRerender()},Zn.prototype.executeRender=function(){this.needsRerender=!1,this.isRendering=!0,this.renderComponent(),this.isRendering=!1,this.needsRerender&&this.delayedRerender()},Zn.prototype.renderComponent=function(){var t=this.state,e=this.component,i=t.viewType,n=this.viewSpecs[i];if(!n)throw new Error('View type "'+i+'" is not valid');var o=this.renderableEventStore=t.eventSourceLoadingLevel&&!this.opt("progressiveEventRendering")?this.renderableEventStore:t.eventStore,r=this.buildEventUiSingleBase(n.options),s=this.buildEventUiBySource(t.eventSources),a=this.eventUiBases=this.buildEventUiBases(o.defs,r,s);e.receiveProps(bt({},t,{viewSpec:n,dateProfileGenerator:this.dateProfileGenerators[i],dateProfile:t.dateProfile,eventStore:o,eventUiBases:a,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize}),this.buildComponentContext(this.theme,this.dateEnv,this.optionsManager.computed)),this.isViewUpdated&&(this.isViewUpdated=!1,this.publiclyTrigger("viewSkeletonRender",[{view:e.view,el:e.view.el}])),this.isDatesUpdated&&(this.isDatesUpdated=!1,this.publiclyTrigger("datesRender",[{view:e.view,el:e.view.el}])),this.isEventsUpdated&&(this.isEventsUpdated=!1),this.releaseAfterSizingTriggers()},Zn.prototype.setOption=function(t,e){var i;this.mutateOptions(((i={})[t]=e,i),[],!0)},Zn.prototype.getOption=function(t){return this.optionsManager.computed[t]},Zn.prototype.opt=function(t){return this.optionsManager.computed[t]},Zn.prototype.viewOpt=function(t){return this.viewOpts()[t]},Zn.prototype.viewOpts=function(){return this.viewSpecs[this.state.viewType].options},Zn.prototype.mutateOptions=function(t,e,i,n){var o=this,r=this.pluginSystem.hooks.optionChangeHandlers,s={},a={},l=this.dateEnv,c=!1,d=!1,h=Boolean(e.length);for(var u in t)r[u]?a[u]=t[u]:s[u]=t[u];for(var p in s)/^(height|contentHeight|aspectRatio)$/.test(p)?d=!0:/^(defaultDate|defaultView)$/.test(p)||(h=!0,"timeZone"===p&&(c=!0));this.optionsManager.mutate(s,e,i),h&&this.handleOptions(this.optionsManager.computed),this.batchRendering((function(){if(h?(c&&o.dispatch({type:"CHANGE_TIMEZONE",oldDateEnv:l}),o.dispatch({type:"SET_VIEW_TYPE",viewType:o.state.viewType})):d&&o.updateSize(),n)for(var t in a)r[t](a[t],o,n)}))},Zn.prototype.handleOptions=function(t){var e=this,i=this.pluginSystem.hooks;this.defaultAllDayEventDuration=G(t.defaultAllDayEventDuration),this.defaultTimedEventDuration=G(t.defaultTimedEventDuration),this.delayedRerender=this.buildDelayedRerender(t.rerenderDelay),this.theme=this.buildTheme(t);var n=this.parseRawLocales(t.locales);this.availableRawLocales=n.map;var o=this.buildLocale(t.locale||n.defaultCode,n.map);this.dateEnv=this.buildDateEnv(o,t.timeZone,i.namedTimeZonedImpl,t.firstDay,t.weekNumberCalculation,t.weekLabel,i.cmdFormatter),this.selectionConfig=this.buildSelectionConfig(t),this.viewSpecs=function(t,e){var i=_n(t),n=_n(e.overrides.views);return Ct(function(t,e){var i,n={};for(i in t)Cn(i,n,t,e);for(i in e)Cn(i,n,t,e);return n}(i,n),(function(t){return function(t,e,i){var n,o=t.overrides.duration||t.defaults.duration||i.dynamicOverrides.duration||i.overrides.duration,r=null,s="",a="",l={};function c(e){var i=e.buttonText||{},n=t.defaults.buttonTextKey;return null!=n&&null!=i[n]?i[n]:null!=i[t.type]?i[t.type]:null!=i[a]?i[a]:void 0}return o&&(r=G(o))&&(s=(n=et(r,!K(o))).unit,1===n.value&&(l=e[a=s]?e[s].options:{})),{type:t.type,class:t.class,duration:r,durationUnit:s,singleUnit:a,options:bt({},Xi,t.defaults,i.dirDefaults,i.localeDefaults,i.overrides,l,t.overrides,i.dynamicOverrides),buttonTextOverride:c(i.dynamicOverrides)||c(i.overrides)||t.overrides.buttonText,buttonTextDefault:c(i.localeDefaults)||c(i.dirDefaults)||t.defaults.buttonText||c(Xi)||t.type}}(t,n,e)}))}(i.views,this.optionsManager),this.dateProfileGenerators=Ct(this.viewSpecs,(function(t){return new t.class.prototype.dateProfileGeneratorClass(t,e)}))},Zn.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.availableRawLocales)},Zn.prototype._buildSelectionConfig=function(t){return Ne("select",t,this)},Zn.prototype._buildEventUiSingleBase=function(t){return t.editable&&(t=bt({},t,{eventEditable:!0})),Ne("event",t,this)},Zn.prototype.hasPublicHandlers=function(t){return this.hasHandlers(t)||this.opt(t)},Zn.prototype.publiclyTrigger=function(t,e){var i=this.opt(t);if(this.triggerWith(t,this,e),i)return i.apply(this,e)},Zn.prototype.publiclyTriggerAfterSizing=function(t,e){var i=this.afterSizingTriggers;(i[t]||(i[t]=[])).push(e)},Zn.prototype.releaseAfterSizingTriggers=function(){var t=this.afterSizingTriggers;for(var e in t)for(var i=0,n=t[e];i<n.length;i++){var o=n[i];this.publiclyTrigger(e,o)}this.afterSizingTriggers={}},Zn.prototype.isValidViewType=function(t){return Boolean(this.viewSpecs[t])},Zn.prototype.changeView=function(t,e){var i=null;e&&(e.start&&e.end?(this.optionsManager.mutate({visibleRange:e},[]),this.handleOptions(this.optionsManager.computed)):i=this.dateEnv.createMarker(e)),this.unselect(),this.dispatch({type:"SET_VIEW_TYPE",viewType:t,dateMarker:i})},Zn.prototype.zoomTo=function(t,e){var i;e=e||"day",i=this.viewSpecs[e]||this.getUnitViewSpec(e),this.unselect(),i?this.dispatch({type:"SET_VIEW_TYPE",viewType:i.type,dateMarker:t}):this.dispatch({type:"SET_DATE",dateMarker:t})},Zn.prototype.getUnitViewSpec=function(t){var e,i,n=this.component,o=[];for(var r in n.header&&o.push.apply(o,n.header.viewsWithButtons),n.footer&&o.push.apply(o,n.footer.viewsWithButtons),this.viewSpecs)o.push(r);for(e=0;e<o.length;e++)if((i=this.viewSpecs[o[e]])&&i.singleUnit===t)return i},Zn.prototype.getInitialDate=function(){var t=this.opt("defaultDate");return null!=t?this.dateEnv.createMarker(t):this.getNow()},Zn.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},Zn.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},Zn.prototype.prevYear=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.addYears(this.state.currentDate,-1)})},Zn.prototype.nextYear=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.addYears(this.state.currentDate,1)})},Zn.prototype.today=function(){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.getNow()})},Zn.prototype.gotoDate=function(t){this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.createMarker(t)})},Zn.prototype.incrementDate=function(t){var e=G(t);e&&(this.unselect(),this.dispatch({type:"SET_DATE",dateMarker:this.dateEnv.add(this.state.currentDate,e)}))},Zn.prototype.getDate=function(){return this.dateEnv.toDate(this.state.currentDate)},Zn.prototype.formatDate=function(t,e){var i=this.dateEnv;return i.format(i.createMarker(t),oe(e))},Zn.prototype.formatRange=function(t,e,i){var n=this.dateEnv;return n.formatRange(n.createMarker(t),n.createMarker(e),oe(i,this.opt("defaultRangeSeparator")),i)},Zn.prototype.formatIso=function(t,e){var i=this.dateEnv;return i.formatIso(i.createMarker(t),{omitTime:e})},Zn.prototype.windowResize=function(t){!this.isHandlingWindowResize&&this.component&&t.target===window&&(this.isHandlingWindowResize=!0,this.updateSize(),this.publiclyTrigger("windowResize",[this.view]),this.isHandlingWindowResize=!1)},Zn.prototype.updateSize=function(){this.component&&this.component.updateSize(!0)},Zn.prototype.registerInteractiveComponent=function(t,e){var i,n={component:t,el:(i=e).el,useEventCenter:null==i.useEventCenter||i.useEventCenter},o=[$n,Yn].concat(this.pluginSystem.hooks.componentInteractions).map((function(t){return new t(n)}));this.interactionsStore[t.uid]=o,Bn[t.uid]=n},Zn.prototype.unregisterInteractiveComponent=function(t){for(var e=0,i=this.interactionsStore[t.uid];e<i.length;e++)i[e].destroy();delete this.interactionsStore[t.uid],delete Bn[t.uid]},Zn.prototype.select=function(t,e){var i=function(t,e,i){var n=function(t,e){var i={},n=pt(t,Sn,{},i),o=n.start?e.createMarkerMeta(n.start):null,r=n.end?e.createMarkerMeta(n.end):null,s=n.allDay;return null==s&&(s=o&&o.isTimeUnspecified&&(!r||r.isTimeUnspecified)),i.range={start:o?o.marker:null,end:r?r.marker:null},i.allDay=s,i}(t,e),o=n.range;if(!o.start)return null;if(!o.end){if(null==i)return null;o.end=e.add(o.start,i)}return n}(null==e?null!=t.start?t:{start:t,end:null}:{start:t,end:e},this.dateEnv,G({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),this.triggerDateSelect(i))},Zn.prototype.unselect=function(t){this.state.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),this.triggerDateUnselect(t))},Zn.prototype.triggerDateSelect=function(t,e){var i=bt({},this.buildDateSpanApi(t),{jsEvent:e?e.origEvent:null,view:this.view});this.publiclyTrigger("select",[i])},Zn.prototype.triggerDateUnselect=function(t){this.publiclyTrigger("unselect",[{jsEvent:t?t.origEvent:null,view:this.view}])},Zn.prototype.triggerDateClick=function(t,e,i,n){var o=bt({},this.buildDatePointApi(t),{dayEl:e,jsEvent:n,view:i});this.publiclyTrigger("dateClick",[o])},Zn.prototype.buildDatePointApi=function(t){for(var e,i,n={},o=0,r=this.pluginSystem.hooks.datePointTransforms;o<r.length;o++){var s=r[o];bt(n,s(t,this))}return bt(n,(e=t,{date:(i=this.dateEnv).toDate(e.range.start),dateStr:i.formatIso(e.range.start,{omitTime:e.allDay}),allDay:e.allDay})),n},Zn.prototype.buildDateSpanApi=function(t){for(var e,i,n={},o=0,r=this.pluginSystem.hooks.dateSpanTransforms;o<r.length;o++){var s=r[o];bt(n,s(t,this))}return bt(n,(e=t,{start:(i=this.dateEnv).toDate(e.range.start),end:i.toDate(e.range.end),startStr:i.formatIso(e.range.start,{omitTime:e.allDay}),endStr:i.formatIso(e.range.end,{omitTime:e.allDay}),allDay:e.allDay})),n},Zn.prototype.getNow=function(){var t=this.opt("now");return"function"==typeof t&&(t=t()),null==t?this.dateEnv.createNowMarker():this.dateEnv.createMarker(t)},Zn.prototype.getDefaultEventEnd=function(t,e){var i=e;return t?(i=z(i),this.dateEnv.add(i,this.defaultAllDayEventDuration)):this.dateEnv.add(i,this.defaultTimedEventDuration)},Zn.prototype.addEvent=function(t,e){if(t instanceof de){var i=t._def,n=t._instance;return this.state.eventStore.defs[i.defId]||this.dispatch({type:"ADD_EVENTS",eventStore:Et({def:i,instance:n})}),t}var o;if(e instanceof le)o=e.internalEventSource.sourceId;else if(null!=e){var r=this.getEventSourceById(e);if(!r)return console.warn('Could not find an event source with ID "'+e+'"'),null;o=r.internalEventSource.sourceId}var s=Ye(t,o,this);return s?(this.dispatch({type:"ADD_EVENTS",eventStore:Et(s)}),new de(this,s.def,s.def.recurringDef?null:s.instance)):null},Zn.prototype.getEventById=function(t){var e=this.state.eventStore,i=e.defs,n=e.instances;for(var o in t=String(t),i){var r=i[o];if(r.publicId===t){if(r.recurringDef)return new de(this,r,null);for(var s in n){var a=n[s];if(a.defId===r.defId)return new de(this,r,a)}}}return null},Zn.prototype.getEvents=function(){var t=this.state.eventStore,e=t.defs,i=t.instances,n=[];for(var o in i){var r=i[o],s=e[r.defId];n.push(new de(this,s,r))}return n},Zn.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},Zn.prototype.rerenderEvents=function(){this.dispatch({type:"RESET_EVENTS"})},Zn.prototype.getEventSources=function(){var t=this.state.eventSources,e=[];for(var i in t)e.push(new le(this,t[i]));return e},Zn.prototype.getEventSourceById=function(t){var e=this.state.eventSources;for(var i in t=String(t),e)if(e[i].publicId===t)return new le(this,e[i]);return null},Zn.prototype.addEventSource=function(t){if(t instanceof le)return this.state.eventSources[t.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[t.internalEventSource]}),t;var e=pn(t,this);return e?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e]}),new le(this,e)):null},Zn.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},Zn.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},Zn.prototype.scrollToTime=function(t){var e=G(t);e&&this.component.view.scrollToDuration(e)},Zn);function Zn(t,e){var i=this;this.buildComponentContext=jt(Kn),this.parseRawLocales=jt(Zi),this.buildLocale=jt(Ki),this.buildDateEnv=jt(Qn),this.buildTheme=jt(Jn),this.buildEventUiSingleBase=jt(this._buildEventUiSingleBase),this.buildSelectionConfig=jt(this._buildSelectionConfig),this.buildEventUiBySource=Wt(eo,Tt),this.buildEventUiBases=jt(io),this.interactionsStore={},this.actionQueue=[],this.isReducing=!1,this.needsRerender=!1,this.isRendering=!1,this.renderingPauseDepth=0,this.buildDelayedRerender=jt(to),this.afterSizingTriggers={},this.isViewUpdated=!1,this.isDatesUpdated=!1,this.isEventsUpdated=!1,this.el=t,this.optionsManager=new Ji(e||{}),this.pluginSystem=new Oi,this.addPluginInputs(this.optionsManager.computed.plugins||[]),this.handleOptions(this.optionsManager.computed),this.publiclyTrigger("_init"),this.hydrate(),this.calendarInteractions=this.pluginSystem.hooks.calendarInteractions.map((function(t){return new t(i)}))}function Kn(t,e,i){return new Ti(this,t,e,i,null)}function Qn(t,e,i,n,o,r,s){return new ln({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:i,locale:t,weekNumberCalculation:o,firstDay:n,weekLabel:r,cmdFormatter:s})}function Jn(t){return new(this.pluginSystem.hooks.themeClasses[t.themeSystem]||qn)(t)}function to(t){var e=this.tryRerender.bind(this);return null!=t&&(e=ut(e,t)),e}function eo(t){return Ct(t,(function(t){return t.ui}))}function io(t,e,i){var n={"":e};for(var o in t){var r=t[o];r.sourceId&&i[r.sourceId]&&(n[o]=i[r.sourceId])}return n}si.mixInto(Gn);var no,oo=(yt(ro,no=Pi),ro.prototype.initialize=function(){},Object.defineProperty(ro.prototype,"activeStart",{get:function(){return this.context.dateEnv.toDate(this.props.dateProfile.activeRange.start)},enumerable:!0,configurable:!0}),Object.defineProperty(ro.prototype,"activeEnd",{get:function(){return this.context.dateEnv.toDate(this.props.dateProfile.activeRange.end)},enumerable:!0,configurable:!0}),Object.defineProperty(ro.prototype,"currentStart",{get:function(){return this.context.dateEnv.toDate(this.props.dateProfile.currentRange.start)},enumerable:!0,configurable:!0}),Object.defineProperty(ro.prototype,"currentEnd",{get:function(){return this.context.dateEnv.toDate(this.props.dateProfile.currentRange.end)},enumerable:!0,configurable:!0}),ro.prototype.render=function(t,e){this.renderDatesMem(t.dateProfile),this.renderBusinessHoursMem(t.businessHours),this.renderDateSelectionMem(t.dateSelection),this.renderEventsMem(t.eventStore),this.renderEventSelectionMem(t.eventSelection),this.renderEventDragMem(t.eventDrag),this.renderEventResizeMem(t.eventResize)},ro.prototype.beforeUpdate=function(){this.addScroll(this.queryScroll())},ro.prototype.destroy=function(){no.prototype.destroy.call(this),this.renderDatesMem.unrender()},ro.prototype.updateSize=function(t,e,i){var n=this.context.calendar;t&&this.addScroll(this.queryScroll()),(t||n.isViewUpdated||n.isDatesUpdated||n.isEventsUpdated)&&this.updateBaseSize(t,e,i)},ro.prototype.updateBaseSize=function(t,e,i){},ro.prototype.renderDatesWrap=function(t){this.renderDates(t),this.addScroll({duration:G(this.context.options.scrollTime)})},ro.prototype.unrenderDatesWrap=function(){this.stopNowIndicator(),this.unrenderDates()},ro.prototype.renderDates=function(t){},ro.prototype.unrenderDates=function(){},ro.prototype.renderBusinessHours=function(t){},ro.prototype.unrenderBusinessHours=function(){},ro.prototype.renderDateSelectionWrap=function(t){t&&this.renderDateSelection(t)},ro.prototype.unrenderDateSelectionWrap=function(t){t&&this.unrenderDateSelection(t)},ro.prototype.renderDateSelection=function(t){},ro.prototype.unrenderDateSelection=function(t){},ro.prototype.renderEvents=function(t){},ro.prototype.unrenderEvents=function(){},ro.prototype.sliceEvents=function(t,e){var i=this.props;return ue(t,i.eventUiBases,i.dateProfile.activeRange,e?this.context.nextDayThreshold:null).fg},ro.prototype.renderEventSelectionWrap=function(t){t&&this.renderEventSelection(t)},ro.prototype.unrenderEventSelectionWrap=function(t){t&&this.unrenderEventSelection(t)},ro.prototype.renderEventSelection=function(t){},ro.prototype.unrenderEventSelection=function(t){},ro.prototype.renderEventDragWrap=function(t){t&&this.renderEventDrag(t)},ro.prototype.unrenderEventDragWrap=function(t){t&&this.unrenderEventDrag(t)},ro.prototype.renderEventDrag=function(t){},ro.prototype.unrenderEventDrag=function(t){},ro.prototype.renderEventResizeWrap=function(t){t&&this.renderEventResize(t)},ro.prototype.unrenderEventResizeWrap=function(t){t&&this.unrenderEventResize(t)},ro.prototype.renderEventResize=function(t){},ro.prototype.unrenderEventResize=function(t){},ro.prototype.startNowIndicator=function(t,e){var i,n,o,r=this,s=this.context,a=s.calendar,l=s.dateEnv;s.options.nowIndicator&&!this.initialNowDate&&(i=this.getNowIndicatorUnit(t,e))&&(n=this.updateNowIndicator.bind(this),this.initialNowDate=a.getNow(),this.initialNowQueriedMs=(new Date).valueOf(),o=l.add(l.startOf(this.initialNowDate,i),G(1,i)).valueOf()-this.initialNowDate.valueOf(),this.nowIndicatorTimeoutID=setTimeout((function(){r.nowIndicatorTimeoutID=null,n(),o="second"===i?1e3:6e4,r.nowIndicatorIntervalID=setInterval(n,o)}),o))},ro.prototype.updateNowIndicator=function(){this.props.dateProfile&&this.initialNowDate&&(this.unrenderNowIndicator(),this.renderNowIndicator(R(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs)),this.isNowIndicatorRendered=!0)},ro.prototype.stopNowIndicator=function(){this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearInterval(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},ro.prototype.getNowIndicatorUnit=function(t,e){},ro.prototype.renderNowIndicator=function(t){},ro.prototype.unrenderNowIndicator=function(){},ro.prototype.addScroll=function(t,e){e&&(t.isForced=e),bt(this.queuedScroll||(this.queuedScroll={}),t)},ro.prototype.popScroll=function(t){this.applyQueuedScroll(t),this.queuedScroll=null},ro.prototype.applyQueuedScroll=function(t){this.queuedScroll&&this.applyScroll(this.queuedScroll,t)},ro.prototype.queryScroll=function(){var t={};return this.props.dateProfile&&bt(t,this.queryDateScroll()),t},ro.prototype.applyScroll=function(t,e){var i=t.duration,n=t.isForced;null==i||n||(delete t.duration,this.props.dateProfile&&bt(t,this.computeDateScroll(i))),this.props.dateProfile&&this.applyDateScroll(t)},ro.prototype.computeDateScroll=function(t){return{}},ro.prototype.queryDateScroll=function(){return{}},ro.prototype.applyDateScroll=function(t){},ro.prototype.scrollToDuration=function(t){this.applyScroll({duration:t},!1)},ro);function ro(t,e){var i=no.call(this,n("div",{className:"fc-view fc-"+t.type+"-view"}))||this;return i.renderDatesMem=Ge(i.renderDatesWrap,i.unrenderDatesWrap),i.renderBusinessHoursMem=Ge(i.renderBusinessHours,i.unrenderBusinessHours,[i.renderDatesMem]),i.renderDateSelectionMem=Ge(i.renderDateSelectionWrap,i.unrenderDateSelectionWrap,[i.renderDatesMem]),i.renderEventsMem=Ge(i.renderEvents,i.unrenderEvents,[i.renderDatesMem]),i.renderEventSelectionMem=Ge(i.renderEventSelectionWrap,i.unrenderEventSelectionWrap,[i.renderEventsMem]),i.renderEventDragMem=Ge(i.renderEventDragWrap,i.unrenderEventDragWrap,[i.renderDatesMem]),i.renderEventResizeMem=Ge(i.renderEventResizeWrap,i.unrenderEventResizeWrap,[i.renderDatesMem]),i.viewSpec=t,i.type=t.type,e.appendChild(i.el),i.initialize(),i}si.mixInto(oo),oo.prototype.usesMinMaxTime=!1,oo.prototype.dateProfileGeneratorClass=bn;var so=(ao.prototype.renderSegs=function(t,e,i){this.context=t,this.rangeUpdated(),e=this.renderSegEls(e,i),this.segs=e,this.attachSegs(e,i),this.isSizeDirty=!0,ve(this.context,this.segs,Boolean(i))},ao.prototype.unrender=function(t,e,i){ye(this.context,this.segs,Boolean(i)),this.detachSegs(this.segs),this.segs=[]},ao.prototype.rangeUpdated=function(){var t,e,i=this.context.options;this.eventTimeFormat=oe(i.eventTimeFormat||this.computeEventTimeFormat(),i.defaultRangeSeparator),null==(t=i.displayEventTime)&&(t=this.computeDisplayEventTime()),null==(e=i.displayEventEnd)&&(e=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=e},ao.prototype.renderSegEls=function(t,e){var i,n="";if(t.length){for(i=0;i<t.length;i++)n+=this.renderSegHtml(t[i],e);r(n).forEach((function(e,i){var n=t[i];e&&(n.el=e)})),t=pe(this.context,t,Boolean(e))}return t},ao.prototype.getSegClasses=function(t,e,i,n){var o=["fc-event",t.isStart?"fc-start":"fc-not-start",t.isEnd?"fc-end":"fc-not-end"].concat(t.eventRange.ui.classNames);return e&&o.push("fc-draggable"),i&&o.push("fc-resizable"),n&&(o.push("fc-mirror"),n.isDragging&&o.push("fc-dragging"),n.isResizing&&o.push("fc-resizing")),o},ao.prototype.getTimeText=function(t,e,i){var n=t.def,o=t.instance;return this._getTimeText(o.range.start,n.hasEnd?o.range.end:null,n.allDay,e,i,o.forcedStartTzo,o.forcedEndTzo)},ao.prototype._getTimeText=function(t,e,i,n,o,r,s){var a=this.context.dateEnv;return null==n&&(n=this.eventTimeFormat),null==o&&(o=this.displayEventEnd),this.displayEventTime&&!i?o&&e?a.formatRange(t,e,n,{forcedStartTzo:r,forcedEndTzo:s}):a.format(t,n,{forcedTzo:r}):""},ao.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0}},ao.prototype.computeDisplayEventTime=function(){return!0},ao.prototype.computeDisplayEventEnd=function(){return!0},ao.prototype.getSkinCss=function(t){return{"background-color":t.backgroundColor,"border-color":t.borderColor,color:t.textColor}},ao.prototype.sortEventSegs=function(t){var e=this.context.eventOrderSpecs,i=t.map(lo);return i.sort((function(t,i){return ot(t,i,e)})),i.map((function(t){return t._seg}))},ao.prototype.computeSizes=function(t){(t||this.isSizeDirty)&&this.computeSegSizes(this.segs)},ao.prototype.assignSizes=function(t){(t||this.isSizeDirty)&&(this.assignSegSizes(this.segs),this.isSizeDirty=!1)},ao.prototype.computeSegSizes=function(t){},ao.prototype.assignSegSizes=function(t){},ao.prototype.hideByHash=function(t){if(t)for(var e=0,i=this.segs;e<i.length;e++){var n=i[e];t[n.eventRange.instance.instanceId]&&(n.el.style.visibility="hidden")}},ao.prototype.showByHash=function(t){if(t)for(var e=0,i=this.segs;e<i.length;e++){var n=i[e];t[n.eventRange.instance.instanceId]&&(n.el.style.visibility="")}},ao.prototype.selectByInstanceId=function(t){if(t)for(var e=0,i=this.segs;e<i.length;e++){var n=i[e],o=n.eventRange.instance;o&&o.instanceId===t&&n.el&&n.el.classList.add("fc-selected")}},ao.prototype.unselectByInstanceId=function(t){if(t)for(var e=0,i=this.segs;e<i.length;e++){var n=i[e];n.el&&n.el.classList.remove("fc-selected")}},ao);function ao(){this.segs=[],this.isSizeDirty=!1}function lo(t){var e=t.eventRange.def,i=t.eventRange.instance.range,n=i.start?i.start.valueOf():0,o=i.end?i.end.valueOf():0;return bt({},e.extendedProps,e,{id:e.publicId,start:n,end:o,duration:o-n,allDay:Number(e.allDay),_seg:t})}var co=(ho.prototype.getSegsByType=function(t){return this.segsByType[t]||[]},ho.prototype.renderSegs=function(t,e,i){var n;this.context=e;var o=this.renderSegEls(t,i),r=this.attachSegs(t,o);r&&(n=this.containerElsByType[t]||(this.containerElsByType[t]=[])).push.apply(n,r),this.segsByType[t]=o,"bgEvent"===t&&ve(e,o,!1),this.dirtySizeFlags[t]=!0},ho.prototype.unrender=function(t,e){var i=this.segsByType[t];i&&("bgEvent"===t&&ye(e,i,!1),this.detachSegs(t,i))},ho.prototype.renderSegEls=function(t,e){var i,n=this,o="";if(e.length){for(i=0;i<e.length;i++)o+=this.renderSegHtml(t,e[i]);r(o).forEach((function(t,i){var n=e[i];t&&(n.el=t)})),"bgEvent"===t&&(e=pe(this.context,e,!1)),e=e.filter((function(t){return f(t.el,n.fillSegTag)}))}return e},ho.prototype.renderSegHtml=function(t,e){var i=null,n=[];return"highlight"!==t&&"businessHours"!==t&&(i={"background-color":e.eventRange.ui.backgroundColor}),"highlight"!==t&&(n=n.concat(e.eventRange.ui.classNames)),"businessHours"===t?n.push("fc-bgevent"):n.push("fc-"+t.toLowerCase()),"<"+this.fillSegTag+(n.length?' class="'+n.join(" ")+'"':"")+(i?' style="'+Le(i)+'"':"")+"></"+this.fillSegTag+">"},ho.prototype.detachSegs=function(t,e){var i=this.containerElsByType[t];i&&(i.forEach(d),delete this.containerElsByType[t])},ho.prototype.computeSizes=function(t){for(var e in this.segsByType)(t||this.dirtySizeFlags[e])&&this.computeSegSizes(this.segsByType[e])},ho.prototype.assignSizes=function(t){for(var e in this.segsByType)(t||this.dirtySizeFlags[e])&&this.assignSegSizes(this.segsByType[e]);this.dirtySizeFlags={}},ho.prototype.computeSegSizes=function(t){},ho.prototype.assignSegSizes=function(t){},ho);function ho(){this.fillSegTag="div",this.dirtySizeFlags={},this.containerElsByType={},this.segsByType={}}var uo=(po.prototype.destroy=function(){},po.prototype.setMirrorIsVisible=function(t){},po.prototype.setMirrorNeedsRevert=function(t){},po.prototype.setAutoScrollEnabled=function(t){},po);function po(t){this.emitter=new si}function fo(t){var e=Ki(t.locale||"en",Zi([]).map);return t=bt({timeZone:Xi.timeZone,calendarSystem:"gregory"},t,{locale:e}),new ln(t)}var go={startTime:G,duration:G,create:Boolean,sourceId:String},mo={create:!0};function vo(t,e){return!t||10<e?{weekday:"short"}:1<e?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"}}function yo(t,e,i,n,o,r,s,a){var l=r.dateEnv,c=r.theme,d=r.options,h=Bt(e.activeRange,t),u=["fc-day-header",c.getClass("widgetHeader")],p="function"==typeof d.columnHeaderHtml?d.columnHeaderHtml(l.toDate(t)):"function"==typeof d.columnHeaderText?Me(d.columnHeaderText(l.toDate(t))):Me(l.format(t,o));return i?u=u.concat(ei(t,e,r,!0)):u.push("fc-"+M[t.getUTCDay()]),'<th class="'+u.join(" ")+'"'+(h&&i?' data-date="'+l.formatIso(t,{omitTime:!0})+'"':"")+(1<s?' colspan="'+s+'"':"")+(a?" "+a:"")+">"+(h?ti(d,l,{date:t,forceOff:!i||1===n},p):p)+"</th>"}var bo,xo=(yt(wo,bo=Ei),wo.prototype.render=function(t,e){var i=t.dates,n=t.datesRepDistinctDays,o=[];this.renderSkeleton(e),t.renderIntroHtml&&o.push(t.renderIntroHtml());for(var r=oe(e.options.columnHeaderFormat||vo(n,i.length)),s=0,a=i;s<a.length;s++){var l=a[s];o.push(yo(l,t.dateProfile,n,i.length,r,e))}e.isRtl&&o.reverse(),this.thead.innerHTML="<tr>"+o.join("")+"</tr>"},wo.prototype.destroy=function(){bo.prototype.destroy.call(this),this.renderSkeleton.unrender()},wo.prototype._renderSkeleton=function(t){var e=t.theme,i=this.parentEl;i.innerHTML="",i.appendChild(this.el=o('<div class="fc-row '+e.getClass("headerRow")+'"><table class="'+e.getClass("tableGrid")+'"><thead></thead></table></div>')),this.thead=this.el.querySelector("thead")},wo.prototype._unrenderSkeleton=function(){d(this.el)},wo);function wo(t){var e=bo.call(this)||this;return e.renderSkeleton=Ge(e._renderSkeleton,e._unrenderSkeleton),e.parentEl=t,e}var So=(Co.prototype.sliceRange=function(t){var e=this.getDateDayIndex(t.start),i=this.getDateDayIndex(L(t.end,-1)),n=Math.max(0,e),o=Math.min(this.cnt-1,i);return(n=Math.ceil(n))<=(o=Math.floor(o))?{firstIndex:n,lastIndex:o,isStart:e===n,isEnd:i===o}:null},Co.prototype.getDateDayIndex=function(t){var e=this.indices,i=Math.floor(O(this.dates[0],t));return i<0?e[0]-1:i>=e.length?e[e.length-1]+1:e[i]},Co);function Co(t,e){for(var i=t.start,n=t.end,o=[],r=[],s=-1;i<n;)e.isHiddenDay(i)?o.push(s+.5):(s++,o.push(s),r.push(i)),i=L(i,1);this.dates=r,this.indices=o,this.cnt=r.length}var ko=(_o.prototype.buildCells=function(){for(var t=[],e=0;e<this.rowCnt;e++){for(var i=[],n=0;n<this.colCnt;n++)i.push(this.buildCell(e,n));t.push(i)}return t},_o.prototype.buildCell=function(t,e){return{date:this.daySeries.dates[t*this.colCnt+e]}},_o.prototype.buildHeaderDates=function(){for(var t=[],e=0;e<this.colCnt;e++)t.push(this.cells[0][e].date);return t},_o.prototype.sliceRange=function(t){var e=this.colCnt,i=this.daySeries.sliceRange(t),n=[];if(i)for(var o=i.firstIndex,r=i.lastIndex,s=o;s<=r;){var a=Math.floor(s/e),l=Math.min((a+1)*e,r+1);n.push({row:a,firstCol:s%e,lastCol:(l-1)%e,isStart:i.isStart&&s===o,isEnd:i.isEnd&&l-1===r}),s=l}return n},_o);function _o(t,e){var i,n,o,r=t.dates;if(e){for(n=r[0].getUTCDay(),i=1;i<r.length&&r[i].getUTCDay()!==n;i++);o=Math.ceil(r.length/i)}else o=1,i=r.length;this.rowCnt=o,this.colCnt=i,this.daySeries=t,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}var To=(Do.prototype.sliceProps=function(t,e,i,n,o){for(var r=[],s=5;s<arguments.length;s++)r[s-5]=arguments[s];var a=t.eventUiBases,l=this.sliceEventStore.apply(this,[t.eventStore,a,e,i,o].concat(r));return{dateSelectionSegs:this.sliceDateSelection.apply(this,[t.dateSelection,a,o].concat(r)),businessHourSegs:this.sliceBusinessHours.apply(this,[t.businessHours,e,i,n,o].concat(r)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,[t.eventDrag,a,e,i,o].concat(r)),eventResize:this.sliceEventResize.apply(this,[t.eventResize,a,e,i,o].concat(r)),eventSelection:t.eventSelection}},Do.prototype.sliceNowDate=function(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];return this._sliceDateSpan.apply(this,[{range:{start:t,end:R(t,1)},allDay:!1},{},e].concat(i))},Do.prototype._sliceBusinessHours=function(t,e,i,n,o){for(var r=[],s=5;s<arguments.length;s++)r[s-5]=arguments[s];return t?this._sliceEventStore.apply(this,[At(t,Eo(e,Boolean(i)),n),{},e,i,o].concat(r)).bg:[]},Do.prototype._sliceEventStore=function(t,e,i,n,o){for(var r=[],s=5;s<arguments.length;s++)r[s-5]=arguments[s];if(t){var a=ue(t,e,Eo(i,Boolean(n)),n);return{bg:this.sliceEventRanges(a.bg,o,r),fg:this.sliceEventRanges(a.fg,o,r)}}return{bg:[],fg:[]}},Do.prototype._sliceInteraction=function(t,e,i,n,o){for(var r=[],s=5;s<arguments.length;s++)r[s-5]=arguments[s];if(!t)return null;var a=ue(t.mutatedEvents,e,Eo(i,Boolean(n)),n);return{segs:this.sliceEventRanges(a.fg,o,r),affectedInstances:t.affectedEvents.instances,isEvent:t.isEvent,sourceSeg:t.origSeg}},Do.prototype._sliceDateSpan=function(t,e,i){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];if(!t)return[];for(var r,s,a,l,c=(r=t,s=e,a=i.context.calendar,{def:l=Xe({editable:!1},"",r.allDay,!0,a),ui:me(l,s),instance:Ve(l.defId,r.range),range:r.range,isStart:!0,isEnd:!0}),d=this.sliceRange.apply(this,[t.range].concat(n)),h=0,u=d;h<u.length;h++){var p=u[h];p.component=i,p.eventRange=c}return d},Do.prototype.sliceEventRanges=function(t,e,i){for(var n=[],o=0,r=t;o<r.length;o++){var s=r[o];n.push.apply(n,this.sliceEventRange(s,e,i))}return n},Do.prototype.sliceEventRange=function(t,e,i){for(var n=this.sliceRange.apply(this,[t.range].concat(i)),o=0,r=n;o<r.length;o++){var s=r[o];s.component=e,s.eventRange=t,s.isStart=t.isStart&&s.isStart,s.isEnd=t.isEnd&&s.isEnd}return n},Do);function Do(){this.sliceBusinessHours=jt(this._sliceBusinessHours),this.sliceDateSelection=jt(this._sliceDateSpan),this.sliceEventStore=jt(this._sliceEventStore),this.sliceEventDrag=jt(this._sliceInteraction),this.sliceEventResize=jt(this._sliceInteraction)}function Eo(t,e){var i=t.activeRange;return e?i:{start:R(i.start,t.minTime.milliseconds),end:R(i.end,t.maxTime.milliseconds-864e5)}}t.Calendar=Gn,t.Component=Ei,t.ComponentContext=Ti,t.DateComponent=Pi,t.DateEnv=ln,t.DateProfileGenerator=bn,t.DayHeader=xo,t.DaySeries=So,t.DayTable=ko,t.ElementDragging=uo,t.ElementScrollController=gi,t.EmitterMixin=si,t.EventApi=de,t.FgEventRenderer=so,t.FillRenderer=co,t.Interaction=Nn,t.Mixin=ni,t.NamedTimeZoneImpl=function(t){this.timeZoneName=t},t.PositionCache=di,t.ScrollComponent=wi,t.ScrollController=ui,t.Slicer=To,t.Splitter=Ke,t.Theme=Ci,t.View=oo,t.WindowScrollController=yi,t.addDays=L,t.addDurations=function(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}},t.addMs=R,t.addWeeks=function(t,e){var i=W(t);return i[2]+=7*e,Y(i)},t.allowContextMenu=function(t){t.removeEventListener("contextmenu",A)},t.allowSelection=function(t){t.classList.remove("fc-unselectable"),t.removeEventListener("selectstart",A)},t.appendToElement=a,t.applyAll=dt,t.applyMutationToEventStore=be,t.applyStyle=v,t.applyStyleProp=y,t.asRoughMinutes=function(t){return tt(t)/6e4},t.asRoughMs=tt,t.asRoughSeconds=function(t){return tt(t)/1e3},t.buildGotoAnchorHtml=ti,t.buildSegCompareObj=lo,t.capitaliseFirstLetter=at,t.combineEventUis=ze,t.compareByFieldSpec=rt,t.compareByFieldSpecs=ot,t.compareNumbers=function(t,e){return t-e},t.compensateScroll=function(t,e){e.left&&v(t,{borderLeftWidth:1,marginLeft:e.left-1}),e.right&&v(t,{borderRightWidth:1,marginRight:e.right-1})},t.computeClippingRect=function(t){return E(t).map((function(t){return k(t)})).concat({left:window.pageXOffset,right:window.pageXOffset+document.documentElement.clientWidth,top:window.pageYOffset,bottom:window.pageYOffset+document.documentElement.clientHeight}).reduce((function(t,e){return b(t,e)||e}))},t.computeEdges=C,t.computeEventDraggable=function(t,e,i){for(var n=t.calendar,o=t.view,r=n.pluginSystem.hooks.isDraggableTransformers,s=i.startEditable,a=0,l=r;a<l.length;a++)s=(0,l[a])(s,e,i,o);return s},t.computeEventEndResizable=function(t,e,i){return i.durationEditable},t.computeEventStartResizable=function(t,e,i){return i.durationEditable&&t.options.eventResizableFromStart},t.computeFallbackHeaderFormat=vo,t.computeHeightAndMargins=T,t.computeInnerRect=k,t.computeRect=_,t.computeVisibleDayRange=gt,t.config={},t.constrainPoint=function(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}},t.createDuration=G,t.createElement=n,t.createEmptyEventStore=function(){return{defs:{},instances:{}}},t.createEventInstance=Ve,t.createFormatter=oe,t.createPlugin=Ri,t.cssToStr=Le,t.debounce=ut,t.diffDates=mt,t.diffDayAndTime=F,t.diffDays=O,t.diffPoints=function(t,e){return{left:t.left-e.left,top:t.top-e.top}},t.diffWeeks=function(t,e){return O(t,e)/7},t.diffWholeDays=H,t.diffWholeWeeks=N,t.disableCursor=function(){document.body.classList.add("fc-not-allowed")},t.distributeHeight=function(t,e,i){var n=Math.floor(e/t.length),o=Math.floor(e-n*(t.length-1)),r=[],s=[],a=[],l=0;it(t),t.forEach((function(e,i){var c=i===t.length-1?o:n,d=e.getBoundingClientRect().height,h=d+D(e);h<c?(r.push(e),s.push(h),a.push(d)):l+=h})),i&&(e-=l,n=Math.floor(e/r.length),o=Math.floor(e-n*(r.length-1))),r.forEach((function(t,e){var i=e===r.length-1?o:n,l=s[e],c=i-(l-a[e]);l<i&&(t.style.height=c+"px")}))},t.elementClosest=p,t.elementMatches=f,t.enableCursor=function(){document.body.classList.remove("fc-not-allowed")},t.eventTupleToStore=Et,t.filterEventStoreDefs=Lt,t.filterHash=St,t.findChildren=function(t,e){for(var i=t instanceof HTMLElement?[t]:t,n=[],o=0;o<i.length;o++)for(var r=i[o].children,s=0;s<r.length;s++){var a=r[s];e&&!f(a,e)||n.push(a)}return n},t.findElements=g,t.flexibleCompare=st,t.forceClassName=function(t,e,i){i?t.classList.add(e):t.classList.remove(e)},t.formatDate=function(t,e){void 0===e&&(e={});var i=fo(e),n=oe(e),o=i.createMarkerMeta(t);return o?i.format(o.marker,n,{forcedTzo:o.forcedTzo}):""},t.formatIsoTimeString=function(t){return lt(t.getUTCHours(),2)+":"+lt(t.getUTCMinutes(),2)+":"+lt(t.getUTCSeconds(),2)},t.formatRange=function(t,e,i){var n=fo("object"==typeof i&&i?i:{}),o=oe(i,Xi.defaultRangeSeparator),r=n.createMarkerMeta(t),s=n.createMarkerMeta(e);return r&&s?n.formatRange(r.marker,s.marker,o,{forcedStartTzo:r.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:i.isEndExclusive}):""},t.getAllDayHtml=function(t){return t.allDayHtml||Me(t.allDayText)},t.getClippingParents=E,t.getDayClasses=ei,t.getElSeg=fe,t.getRectCenter=function(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}},t.getRelevantEvents=It,t.globalDefaults=Xi,t.greatestDurationDenominator=et,t.hasBgRendering=function(t){return"background"===t.rendering||"inverse-background"===t.rendering},t.htmlEscape=Me,t.htmlToElement=o,t.insertAfterElement=function(t,e){for(var i=c(e),n=t.nextSibling||null,o=0;o<i.length;o++)t.parentNode.insertBefore(i[o],n)},t.interactionSettingsStore=Bn,t.interactionSettingsToStore=function(t){var e={};return e[t.component.uid]=t,e},t.intersectRanges=Ft,t.intersectRects=b,t.isArraysEqual=$t,t.isDateSpansEqual=function(t,e){return Nt(t.range,e.range)&&t.allDay===e.allDay&&function(t,e){for(var i in e)if("range"!==i&&"allDay"!==i&&t[i]!==e[i])return!1;for(var i in t)if(!(i in e))return!1;return!0}(t,e)},t.isInt=ct,t.isInteractionValid=_e,t.isMultiDayRange=function(t){var e=gt(t);return 1<O(e.start,e.end)},t.isPropsEqual=Tt,t.isPropsValid=De,t.isSingleDay=function(t){return 0===t.years&&0===t.months&&1===t.days&&0===t.milliseconds},t.isValidDate=X,t.listenBySelector=I,t.mapHash=Ct,t.matchCellWidths=function(t){var e=0;return t.forEach((function(t){var i,n=t.firstChild;n instanceof HTMLElement&&(i=n.getBoundingClientRect().width,e<i&&(e=i))})),e++,t.forEach((function(t){t.style.width=e+"px"})),e},t.memoize=jt,t.memoizeOutput=Wt,t.memoizeRendering=Ge,t.mergeEventStores=Mt,t.multiplyDuration=function(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}},t.padStart=lt,t.parseBusinessHours=Ue,t.parseDragMeta=function(t){var e={},i=pt(t,go,mo,e);return i.leftoverProps=e,i},t.parseEventDef=Xe,t.parseFieldSpecs=nt,t.parseMarker=an,t.pointInsideRect=function(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom},t.prependToElement=l,t.preventContextMenu=function(t){t.addEventListener("contextmenu",A)},t.preventDefault=A,t.preventSelection=function(t){t.classList.add("fc-unselectable"),t.addEventListener("selectstart",A)},t.processScopedUiProps=Ne,t.rangeContainsMarker=Bt,t.rangeContainsRange=zt,t.rangesEqual=Nt,t.rangesIntersect=Ht,t.refineProps=pt,t.removeElement=d,t.removeExact=function(t,e){for(var i=0,n=0;n<t.length;)t[n]===e?(t.splice(n,1),i++):n++;return i},t.renderDateCell=yo,t.requestJson=zi,t.sliceEventStore=ue,t.startOfDay=z,t.subtractInnerElHeight=function(t,e){var i={position:"relative",left:-1};v(t,i),v(e,i);var n=t.getBoundingClientRect().height-e.getBoundingClientRect().height,o={position:"",left:""};return v(t,o),v(e,o),n},t.translateRect=function(t,e,i){return{left:t.left+e,right:t.right+e,top:t.top+i,bottom:t.bottom+i}},t.uncompensateScroll=function(t){v(t,{marginLeft:"",marginRight:"",borderLeftWidth:"",borderRightWidth:""})},t.undistributeHeight=it,t.unpromisify=ii,t.version="4.4.0",t.whenTransitionDone=function(t,e){var i=function(n){e(n),P.forEach((function(e){t.removeEventListener(e,i)}))};P.forEach((function(e){t.addEventListener(e,i)}))},t.wholeDivideDurations=function(t,e){for(var i=null,n=0;n<q.length;n++){var o=q[n];if(e[o]){var r=t[o]/e[o];if(!ct(r)||null!==i&&i!==r)return null;i=r}else if(t[o])return null}return i},Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],e):e((t=t||self).FullCalendarDayGrid={},t.FullCalendar)}(this,(function(t,e){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function n(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o,r=function(){return(r=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=(n(a,o=e.DateProfileGenerator),a.prototype.buildRenderRange=function(t,i,n){var r,s,a=this.dateEnv,l=o.prototype.buildRenderRange.call(this,t,i,n),c=l.start,d=l.end;return/^(year|month)$/.test(i)&&(c=a.startOfWeek(c),(r=a.startOfWeek(d)).valueOf()!==d.valueOf()&&(d=e.addWeeks(r,1))),this.options.monthMode&&this.options.fixedWeekCount&&(s=Math.ceil(e.diffWeeks(c,d)),d=e.addWeeks(d,6-s)),{start:c,end:d}},a);function a(){return null!==o&&o.apply(this,arguments)||this}var l=(c.prototype.show=function(){this.isHidden&&(this.el||this.render(),this.el.style.display="",this.position(),this.isHidden=!1,this.trigger("show"))},c.prototype.hide=function(){this.isHidden||(this.el.style.display="none",this.isHidden=!0,this.trigger("hide"))},c.prototype.render=function(){var t=this,i=this.options,n=this.el=e.createElement("div",{className:"fc-popover "+(i.className||""),style:{top:"0",left:"0"}});"function"==typeof i.content&&i.content(n),i.parentEl.appendChild(n),e.listenBySelector(n,"click",".fc-close",(function(e){t.hide()})),i.autoHide&&document.addEventListener("mousedown",this.documentMousedown)},c.prototype.destroy=function(){this.hide(),this.el&&(e.removeElement(this.el),this.el=null),document.removeEventListener("mousedown",this.documentMousedown)},c.prototype.position=function(){var t=this.options,i=this.el,n=i.getBoundingClientRect(),o=e.computeRect(i.offsetParent),r=e.computeClippingRect(t.parentEl),s=t.top||0,a=void 0!==t.left?t.left:void 0!==t.right?t.right-n.width:0;s=Math.min(s,r.bottom-n.height-this.margin),s=Math.max(s,r.top+this.margin),a=Math.min(a,r.right-n.width-this.margin),a=Math.max(a,r.left+this.margin),e.applyStyle(i,{top:s-o.top,left:a-o.left})},c.prototype.trigger=function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))},c);function c(t){var e=this;this.isHidden=!0,this.margin=10,this.documentMousedown=function(t){e.el&&!e.el.contains(t.target)&&e.hide()},this.options=t}var d,h=(n(u,d=e.FgEventRenderer),u.prototype.renderSegHtml=function(t,i){var n,o,r=this.context,s=t.eventRange,a=s.def,l=s.ui,c=a.allDay,d=e.computeEventDraggable(r,a,l),h=c&&t.isStart&&e.computeEventStartResizable(r,a,l),u=c&&t.isEnd&&e.computeEventEndResizable(r,a,l),p=this.getSegClasses(t,d,h||u,i),f=e.cssToStr(this.getSkinCss(l)),g="";return p.unshift("fc-day-grid-event","fc-h-event"),t.isStart&&(n=this.getTimeText(s))&&(g='<span class="fc-time">'+e.htmlEscape(n)+"</span>"),o='<span class="fc-title">'+(e.htmlEscape(a.title||"")||"&nbsp;")+"</span>",'<a class="'+p.join(" ")+'"'+(a.url?' href="'+e.htmlEscape(a.url)+'"':"")+(f?' style="'+f+'"':"")+'><div class="fc-content">'+("rtl"===r.options.dir?o+" "+g:g+" "+o)+"</div>"+(h?'<div class="fc-resizer fc-start-resizer"></div>':"")+(u?'<div class="fc-resizer fc-end-resizer"></div>':"")+"</a>"},u.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"}},u.prototype.computeDisplayEventEnd=function(){return!1},u);function u(){return null!==d&&d.apply(this,arguments)||this}var p,f=(n(g,p=h),g.prototype.attachSegs=function(t,e){var i=this.rowStructs=this.renderSegRows(t);this.dayGrid.rowEls.forEach((function(t,e){t.querySelector(".fc-content-skeleton > table").appendChild(i[e].tbodyEl)})),e||this.dayGrid.removeSegPopover()},g.prototype.detachSegs=function(){for(var t,i=this.rowStructs||[];t=i.pop();)e.removeElement(t.tbodyEl);this.rowStructs=null},g.prototype.renderSegRows=function(t){for(var e=[],i=this.groupSegRows(t),n=0;n<i.length;n++)e.push(this.renderSegRow(n,i[n]));return e},g.prototype.renderSegRow=function(t,i){var n,o,r,s,a,l,c,d=this.context.isRtl,h=this.dayGrid,u=h.colCnt,p=this.buildSegLevels(i),f=Math.max(1,p.length),g=document.createElement("tbody"),m=[],v=[],y=[];function b(t){for(;r<t;)(c=(y[n-1]||[])[r])?c.rowSpan=(c.rowSpan||1)+1:(c=document.createElement("td"),s.appendChild(c)),v[n][r]=c,y[n][r]=c,r++}for(n=0;n<f;n++){if(o=p[n],r=0,s=document.createElement("tr"),m.push([]),v.push([]),y.push([]),o)for(a=0;a<o.length;a++){l=o[a];var x=d?u-1-l.lastCol:l.firstCol,w=d?u-1-l.firstCol:l.lastCol;for(b(x),c=e.createElement("td",{className:"fc-event-container"},l.el),x!==w?c.colSpan=w-x+1:y[n][r]=c;r<=w;)v[n][r]=c,m[n][r]=l,r++;s.appendChild(c)}b(u);var S=h.renderProps.renderIntroHtml();S&&(d?e.appendToElement(s,S):e.prependToElement(s,S)),g.appendChild(s)}return{row:t,tbodyEl:g,cellMatrix:v,segMatrix:m,segLevels:p,segs:i}},g.prototype.buildSegLevels=function(t){var e,i,n,o=this.context.isRtl,r=this.dayGrid.colCnt,s=[];for(t=this.sortEventSegs(t),e=0;e<t.length;e++){for(i=t[e],n=0;n<s.length&&m(i,s[n]);n++);i.level=n,i.leftCol=o?r-1-i.lastCol:i.firstCol,i.rightCol=o?r-1-i.firstCol:i.lastCol,(s[n]||(s[n]=[])).push(i)}for(n=0;n<s.length;n++)s[n].sort(v);return s},g.prototype.groupSegRows=function(t){for(var e=[],i=0;i<this.dayGrid.rowCnt;i++)e.push([]);for(i=0;i<t.length;i++)e[t[i].row].push(t[i]);return e},g.prototype.computeDisplayEventEnd=function(){return 1===this.dayGrid.colCnt},g);function g(t){var e=p.call(this)||this;return e.dayGrid=t,e}function m(t,e){for(var i,n=0;n<e.length;n++)if((i=e[n]).firstCol<=t.lastCol&&i.lastCol>=t.firstCol)return 1}function v(t,e){return t.leftCol-e.leftCol}var y,b=(n(x,y=f),x.prototype.attachSegs=function(t,i){var n=i.sourceSeg,o=this.rowStructs=this.renderSegRows(t);this.dayGrid.rowEls.forEach((function(t,i){var r=e.htmlToElement('<div class="fc-mirror-skeleton"><table></table></div>'),s=n&&n.row===i?n.el:(s=t.querySelector(".fc-content-skeleton tbody"))||t.querySelector(".fc-content-skeleton table"),a=s.getBoundingClientRect().top-t.getBoundingClientRect().top;r.style.top=a+"px",r.querySelector("table").appendChild(o[i].tbodyEl),t.appendChild(r)}))},x);function x(){return null!==y&&y.apply(this,arguments)||this}var w,S='<td style="pointer-events:none"></td>',C=(n(k,w=e.FillRenderer),k.prototype.renderSegs=function(t,e,i){"bgEvent"===t&&(i=i.filter((function(t){return t.eventRange.def.allDay}))),w.prototype.renderSegs.call(this,t,e,i)},k.prototype.attachSegs=function(t,e){for(var i,n,o=[],r=0;r<e.length;r++)i=e[r],n=this.renderFillRow(t,i),this.dayGrid.rowEls[i.row].appendChild(n),o.push(n);return o},k.prototype.renderFillRow=function(t,i){var n=this.dayGrid,o=this.context.isRtl,r=n.colCnt,s=o?r-1-i.lastCol:i.firstCol,a=(o?r-1-i.firstCol:i.lastCol)+1,l="businessHours"===t?"bgevent":t.toLowerCase(),c=e.htmlToElement('<div class="fc-'+l+'-skeleton"><table><tr></tr></table></div>'),d=c.getElementsByTagName("tr")[0];0<s&&e.appendToElement(d,new Array(s+1).join(S)),i.el.colSpan=a-s,d.appendChild(i.el),a<r&&e.appendToElement(d,new Array(r-a+1).join(S));var h=n.renderProps.renderIntroHtml();return h&&(o?e.appendToElement(d,h):e.prependToElement(d,h)),c},k);function k(t){var e=w.call(this)||this;return e.fillSegTag="td",e.dayGrid=t,e}var _,T=(n(D,_=e.DateComponent),D.prototype.firstContext=function(t){t.calendar.registerInteractiveComponent(this,{el:this.el,useEventCenter:!1})},D.prototype.render=function(t,e){this.renderFrame(t.date),this.renderFgEvents(e,t.fgSegs),this.renderEventSelection(t.eventSelection),this.renderEventDrag(t.eventDragInstances),this.renderEventResize(t.eventResizeInstances)},D.prototype.destroy=function(){_.prototype.destroy.call(this),this.renderFrame.unrender(),this.context.calendar.unregisterInteractiveComponent(this)},D.prototype._renderFrame=function(t){var i=this.context,n=i.theme,o=i.dateEnv,r=i.options,s=o.format(t,e.createFormatter(r.dayPopoverFormat));this.el.innerHTML='<div class="fc-header '+n.getClass("popoverHeader")+'"><span class="fc-title">'+e.htmlEscape(s)+'</span><span class="fc-close '+n.getIconClass("close")+'"></span></div><div class="fc-body '+n.getClass("popoverContent")+'"><div class="fc-event-container"></div></div>',this.segContainerEl=this.el.querySelector(".fc-event-container")},D.prototype.queryHit=function(t,i,n,o){var r=this.props.date;if(t<n&&i<o)return{component:this,dateSpan:{allDay:!0,range:{start:r,end:e.addDays(r,1)}},dayEl:this.el,rect:{left:0,top:0,right:n,bottom:o},layer:1}},D);function D(t){var i=_.call(this,t)||this,n=i.eventRenderer=new A(i),o=i.renderFrame=e.memoizeRendering(i._renderFrame);return i.renderFgEvents=e.memoizeRendering(n.renderSegs.bind(n),n.unrender.bind(n),[o]),i.renderEventSelection=e.memoizeRendering(n.selectByInstanceId.bind(n),n.unselectByInstanceId.bind(n),[i.renderFgEvents]),i.renderEventDrag=e.memoizeRendering(n.hideByHash.bind(n),n.showByHash.bind(n),[o]),i.renderEventResize=e.memoizeRendering(n.hideByHash.bind(n),n.showByHash.bind(n),[o]),i}var E,A=(n(I,E=h),I.prototype.attachSegs=function(t){for(var e=0,i=t;e<i.length;e++){var n=i[e];this.dayTile.segContainerEl.appendChild(n.el)}},I.prototype.detachSegs=function(t){for(var i=0,n=t;i<n.length;i++){var o=n[i];e.removeElement(o.el)}},I);function I(t){var e=E.call(this)||this;return e.dayTile=t,e}var P=(M.prototype.renderHtml=function(t){var e=[];t.renderIntroHtml&&e.push(t.renderIntroHtml());for(var i=0,n=t.cells;i<n.length;i++){var o=n[i];e.push(L(o.date,t.dateProfile,this.context,o.htmlAttrs))}return t.cells.length||e.push('<td class="fc-day '+this.context.theme.getClass("widgetContent")+'"></td>'),"rtl"===this.context.options.dir&&e.reverse(),"<tr>"+e.join("")+"</tr>"},M);function M(t){this.context=t}function L(t,i,n,o){var r=n.dateEnv,s=n.theme,a=e.rangeContainsMarker(i.activeRange,t),l=e.getDayClasses(t,i,n);return l.unshift("fc-day",s.getClass("widgetContent")),'<td class="'+l.join(" ")+'"'+(a?' data-date="'+r.formatIso(t,{omitTime:!0})+'"':"")+(o?" "+o:"")+"></td>"}var R,O=e.createFormatter({day:"numeric"}),F=e.createFormatter({week:"numeric"}),N=(n(H,R=e.DateComponent),H.prototype.render=function(t,e){var i=t.cells;this.rowCnt=i.length,this.colCnt=i[0].length,this.renderCells(i,t.isRigid),this.renderBusinessHours(e,t.businessHourSegs),this.renderDateSelection(e,t.dateSelectionSegs),this.renderBgEvents(e,t.bgEventSegs),this.renderFgEvents(e,t.fgEventSegs),this.renderEventSelection(t.eventSelection),this.renderEventDrag(t.eventDrag),this.renderEventResize(t.eventResize),this.segPopoverTile&&this.updateSegPopoverTile()},H.prototype.destroy=function(){R.prototype.destroy.call(this),this.renderCells.unrender()},H.prototype.getCellRange=function(t,i){var n=this.props.cells[t][i].date;return{start:n,end:e.addDays(n,1)}},H.prototype.updateSegPopoverTile=function(t,e){var i=this.props;this.segPopoverTile.receiveProps({date:t||this.segPopoverTile.props.date,fgSegs:e||this.segPopoverTile.props.fgSegs,eventSelection:i.eventSelection,eventDragInstances:i.eventDrag?i.eventDrag.affectedInstances:null,eventResizeInstances:i.eventResize?i.eventResize.affectedInstances:null},this.context)},H.prototype._renderCells=function(t,i){for(var n,o=this.context,r=o.calendar,s=o.view,a=o.isRtl,l=o.dateEnv,c=this.rowCnt,d=this.colCnt,h="",u=0;u<c;u++)h+=this.renderDayRowHtml(u,i);for(this.el.innerHTML=h,this.rowEls=e.findElements(this.el,".fc-row"),this.cellEls=e.findElements(this.el,".fc-day, .fc-disabled-day"),a&&this.cellEls.reverse(),this.rowPositions=new e.PositionCache(this.el,this.rowEls,!1,!0),this.colPositions=new e.PositionCache(this.el,this.cellEls.slice(0,d),!0,!1),u=0;u<c;u++)for(n=0;n<d;n++)r.publiclyTrigger("dayRender",[{date:l.toDate(t[u][n].date),el:this.getCellEl(u,n),view:s}]);this.isCellSizesDirty=!0},H.prototype._unrenderCells=function(){this.removeSegPopover()},H.prototype.renderDayRowHtml=function(t,e){var i=this.context.theme,n=["fc-row","fc-week",i.getClass("dayRow")];e&&n.push("fc-rigid");var o=new P(this.context);return'<div class="'+n.join(" ")+'"><div class="fc-bg"><table class="'+i.getClass("tableGrid")+'">'+o.renderHtml({cells:this.props.cells[t],dateProfile:this.props.dateProfile,renderIntroHtml:this.renderProps.renderBgIntroHtml})+'</table></div><div class="fc-content-skeleton"><table>'+(this.getIsNumbersVisible()?"<thead>"+this.renderNumberTrHtml(t)+"</thead>":"")+"</table></div></div>"},H.prototype.getIsNumbersVisible=function(){return this.getIsDayNumbersVisible()||this.renderProps.cellWeekNumbersVisible||this.renderProps.colWeekNumbersVisible},H.prototype.getIsDayNumbersVisible=function(){return 1<this.rowCnt},H.prototype.renderNumberTrHtml=function(t){var e=this.context.isRtl,i=this.renderProps.renderNumberIntroHtml(t,this);return"<tr>"+(e?"":i)+this.renderNumberCellsHtml(t)+(e?i:"")+"</tr>"},H.prototype.renderNumberCellsHtml=function(t){for(var e,i=[],n=0;n<this.colCnt;n++)e=this.props.cells[t][n].date,i.push(this.renderNumberCellHtml(e));return this.context.isRtl&&i.reverse(),i.join("")},H.prototype.renderNumberCellHtml=function(t){var i,n,o=this.context,r=o.dateEnv,s=o.options,a="",l=e.rangeContainsMarker(this.props.dateProfile.activeRange,t),c=this.getIsDayNumbersVisible()&&l;return c||this.renderProps.cellWeekNumbersVisible?((i=e.getDayClasses(t,this.props.dateProfile,this.context)).unshift("fc-day-top"),this.renderProps.cellWeekNumbersVisible&&(n=r.weekDow),a+='<td class="'+i.join(" ")+'"'+(l?' data-date="'+r.formatIso(t,{omitTime:!0})+'"':"")+">",this.renderProps.cellWeekNumbersVisible&&t.getUTCDay()===n&&(a+=e.buildGotoAnchorHtml(s,r,{date:t,type:"week"},{class:"fc-week-number"},r.format(t,F))),c&&(a+=e.buildGotoAnchorHtml(s,r,t,{class:"fc-day-number"},r.format(t,O))),a+="</td>"):"<td></td>"},H.prototype.updateSize=function(t){var e=this.context.calendar,i=this.fillRenderer,n=this.eventRenderer,o=this.mirrorRenderer;(t||this.isCellSizesDirty||e.isEventsUpdated)&&(this.buildPositionCaches(),this.isCellSizesDirty=!1),i.computeSizes(t),n.computeSizes(t),o.computeSizes(t),i.assignSizes(t),n.assignSizes(t),o.assignSizes(t)},H.prototype.buildPositionCaches=function(){this.buildColPositions(),this.buildRowPositions()},H.prototype.buildColPositions=function(){this.colPositions.build()},H.prototype.buildRowPositions=function(){this.rowPositions.build(),this.rowPositions.bottoms[this.rowCnt-1]+=this.bottomCoordPadding},H.prototype.positionToHit=function(t,e){var i=this.colPositions,n=this.rowPositions,o=i.leftToIndex(t),r=n.topToIndex(e);if(null!=r&&null!=o)return{row:r,col:o,dateSpan:{range:this.getCellRange(r,o),allDay:!0},dayEl:this.getCellEl(r,o),relativeRect:{left:i.lefts[o],right:i.rights[o],top:n.tops[r],bottom:n.bottoms[r]}}},H.prototype.getCellEl=function(t,e){return this.cellEls[t*this.colCnt+e]},H.prototype._renderEventDrag=function(t){t&&(this.eventRenderer.hideByHash(t.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,t.segs))},H.prototype._unrenderEventDrag=function(t){t&&(this.eventRenderer.showByHash(t.affectedInstances),this.fillRenderer.unrender("highlight",this.context))},H.prototype._renderEventResize=function(t){t&&(this.eventRenderer.hideByHash(t.affectedInstances),this.fillRenderer.renderSegs("highlight",this.context,t.segs),this.mirrorRenderer.renderSegs(this.context,t.segs,{isResizing:!0,sourceSeg:t.sourceSeg}))},H.prototype._unrenderEventResize=function(t){t&&(this.eventRenderer.showByHash(t.affectedInstances),this.fillRenderer.unrender("highlight",this.context),this.mirrorRenderer.unrender(this.context,t.segs,{isResizing:!0,sourceSeg:t.sourceSeg}))},H.prototype.removeSegPopover=function(){this.segPopover&&this.segPopover.hide()},H.prototype.limitRows=function(t){for(var e,i=this.eventRenderer.rowStructs||[],n=0;n<i.length;n++)this.unlimitRow(n),!1!==(e=!!t&&("number"==typeof t?t:this.computeRowLevelLimit(n)))&&this.limitRow(n,e)},H.prototype.computeRowLevelLimit=function(t){for(var i,n=this.rowEls[t].getBoundingClientRect().bottom,o=e.findChildren(this.eventRenderer.rowStructs[t].tbodyEl),r=0;r<o.length;r++)if((i=o[r]).classList.remove("fc-limited"),i.getBoundingClientRect().bottom>n)return r;return!1},H.prototype.limitRow=function(t,i){function n(n){for(;k<n;)(c=b.getCellSegs(t,k,i)).length&&(u=r[i-1][k],y=b.renderMoreLink(t,k,c),v=e.createElement("div",null,y),u.appendChild(v),C.push(v)),k++}var o,r,s,a,l,c,d,h,u,p,f,g,m,v,y,b=this,x=this.colCnt,w=this.context.isRtl,S=this.eventRenderer.rowStructs[t],C=[],k=0;if(i&&i<S.segLevels.length){for(o=S.segLevels[i-1],r=S.cellMatrix,(s=e.findChildren(S.tbodyEl).slice(i)).forEach((function(t){t.classList.add("fc-limited")})),a=0;a<o.length;a++){l=o[a];var _=w?x-1-l.lastCol:l.firstCol,T=w?x-1-l.firstCol:l.lastCol;for(n(_),h=[],d=0;k<=T;)c=this.getCellSegs(t,k,i),h.push(c),d+=c.length,k++;if(d){for(p=(u=r[i-1][_]).rowSpan||1,f=[],g=0;g<h.length;g++)m=e.createElement("td",{className:"fc-more-cell",rowSpan:p}),c=h[g],y=this.renderMoreLink(t,_+g,[l].concat(c)),v=e.createElement("div",null,y),m.appendChild(v),f.push(m),C.push(m);u.classList.add("fc-limited"),e.insertAfterElement(u,f),s.push(u)}}n(this.colCnt),S.moreEls=C,S.limitedEls=s}},H.prototype.unlimitRow=function(t){var i=this.eventRenderer.rowStructs[t];i.moreEls&&(i.moreEls.forEach(e.removeElement),i.moreEls=null),i.limitedEls&&(i.limitedEls.forEach((function(t){t.classList.remove("fc-limited")})),i.limitedEls=null)},H.prototype.renderMoreLink=function(t,i,n){var o=this,r=this.context,s=r.calendar,a=r.view,l=r.dateEnv,c=r.options,d=r.isRtl,h=e.createElement("a",{className:"fc-more"});return h.innerText=this.getMoreLinkText(n.length),h.addEventListener("click",(function(e){var r=c.eventLimitClick,h=d?o.colCnt-i-1:i,u=o.props.cells[t][h].date,p=e.currentTarget,f=o.getCellEl(t,i),g=o.getCellSegs(t,i),m=o.resliceDaySegs(g,u),v=o.resliceDaySegs(n,u);"function"==typeof r&&(r=s.publiclyTrigger("eventLimitClick",[{date:l.toDate(u),allDay:!0,dayEl:f,moreEl:p,segs:m,hiddenSegs:v,jsEvent:e,view:a}])),"popover"===r?o.showSegPopover(t,i,p,m):"string"==typeof r&&s.zoomTo(u,r)})),h},H.prototype.showSegPopover=function(t,i,n,o){var r=this,s=this.context,a=s.calendar,c=s.view,d=s.theme,h=s.isRtl,u=h?this.colCnt-i-1:i,p=n.parentNode,f=1===this.rowCnt?c.el:this.rowEls[t],g={className:"fc-more-popover "+d.getClass("popover"),parentEl:c.el,top:e.computeRect(f).top,autoHide:!0,content:function(e){r.segPopoverTile=new T(e),r.updateSegPopoverTile(r.props.cells[t][u].date,o)},hide:function(){r.segPopoverTile.destroy(),r.segPopoverTile=null,r.segPopover.destroy(),r.segPopover=null}};h?g.right=e.computeRect(p).right+1:g.left=e.computeRect(p).left-1,this.segPopover=new l(g),this.segPopover.show(),a.releaseAfterSizingTriggers()},H.prototype.resliceDaySegs=function(t,i){for(var n={start:i,end:e.addDays(i,1)},o=[],s=0,a=t;s<a.length;s++){var l=a[s],c=l.eventRange,d=c.range,h=e.intersectRanges(d,n);h&&o.push(r({},l,{eventRange:{def:c.def,ui:r({},c.ui,{durationEditable:!1}),instance:c.instance,range:h},isStart:l.isStart&&h.start.valueOf()===d.start.valueOf(),isEnd:l.isEnd&&h.end.valueOf()===d.end.valueOf()}))}return o},H.prototype.getMoreLinkText=function(t){var e=this.context.options.eventLimitText;return"function"==typeof e?e(t):"+"+t+" "+e},H.prototype.getCellSegs=function(t,e,i){for(var n,o=this.eventRenderer.rowStructs[t].segMatrix,r=i||0,s=[];r<o.length;)(n=o[r][e])&&s.push(n),r++;return s},H);function H(t,i){var n=R.call(this,t)||this;n.bottomCoordPadding=0,n.isCellSizesDirty=!1,n.renderProps=i;var o=n.eventRenderer=new f(n),r=n.fillRenderer=new C(n);n.mirrorRenderer=new b(n);var s=n.renderCells=e.memoizeRendering(n._renderCells,n._unrenderCells);return n.renderBusinessHours=e.memoizeRendering(r.renderSegs.bind(r,"businessHours"),r.unrender.bind(r,"businessHours"),[s]),n.renderDateSelection=e.memoizeRendering(r.renderSegs.bind(r,"highlight"),r.unrender.bind(r,"highlight"),[s]),n.renderBgEvents=e.memoizeRendering(r.renderSegs.bind(r,"bgEvent"),r.unrender.bind(r,"bgEvent"),[s]),n.renderFgEvents=e.memoizeRendering(o.renderSegs.bind(o),o.unrender.bind(o),[s]),n.renderEventSelection=e.memoizeRendering(o.selectByInstanceId.bind(o),o.unselectByInstanceId.bind(o),[n.renderFgEvents]),n.renderEventDrag=e.memoizeRendering(n._renderEventDrag,n._unrenderEventDrag,[s]),n.renderEventResize=e.memoizeRendering(n._renderEventResize,n._unrenderEventResize,[s]),n}var z,B=e.createFormatter({week:"numeric"}),$=(n(j,z=e.View),j.prototype._processOptions=function(t){t.weekNumbers?t.weekNumbersWithinDays?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0):(this.colWeekNumbersVisible=!1,this.cellWeekNumbersVisible=!1)},j.prototype.render=function(t,e){z.prototype.render.call(this,t,e),this.processOptions(e.options),this.renderSkeleton(e)},j.prototype.destroy=function(){z.prototype.destroy.call(this),this.renderSkeleton.unrender()},j.prototype._renderSkeleton=function(t){this.el.classList.add("fc-dayGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new e.ScrollComponent("hidden","auto");var i=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(i),i.classList.add("fc-day-grid-container");var n=e.createElement("div",{className:"fc-day-grid"});i.appendChild(n),this.dayGrid=new N(n,{renderNumberIntroHtml:this.renderDayGridNumberIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:this.colWeekNumbersVisible,cellWeekNumbersVisible:this.cellWeekNumbersVisible})},j.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-dayGrid-view"),this.dayGrid.destroy(),this.scroller.destroy()},j.prototype.renderSkeletonHtml=function(){var t=this.context,e=t.theme,i=t.options;return'<table class="'+e.getClass("tableGrid")+'">'+(i.columnHeader?'<thead class="fc-head"><tr><td class="fc-head-container '+e.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+e.getClass("widgetContent")+'"></td></tr></tbody></table>'},j.prototype.weekNumberStyleAttr=function(){return null!=this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},j.prototype.hasRigidRows=function(){var t=this.context.options.eventLimit;return t&&"number"!=typeof t},j.prototype.updateSize=function(t,e,i){z.prototype.updateSize.call(this,t,e,i),this.dayGrid.updateSize(t)},j.prototype.updateBaseSize=function(t,i,n){var o,r,s=this.dayGrid,a=this.context.options.eventLimit,l=this.header?this.header.el:null;s.rowEls?(this.colWeekNumbersVisible&&(this.weekNumberWidth=e.matchCellWidths(e.findElements(this.el,".fc-week-number"))),this.scroller.clear(),l&&e.uncompensateScroll(l),s.removeSegPopover(),a&&"number"==typeof a&&s.limitRows(a),o=this.computeScrollerHeight(i),this.setGridHeight(o,n),a&&"number"!=typeof a&&s.limitRows(a),n||(this.scroller.setHeight(o),((r=this.scroller.getScrollbarWidths()).left||r.right)&&(l&&e.compensateScroll(l,r),o=this.computeScrollerHeight(i),this.scroller.setHeight(o)),this.scroller.lockOverflow(r))):n||(o=this.computeScrollerHeight(i),this.scroller.setHeight(o))},j.prototype.computeScrollerHeight=function(t){return t-e.subtractInnerElHeight(this.el,this.scroller.el)},j.prototype.setGridHeight=function(t,i){this.context.options.monthMode?(i&&(t*=this.dayGrid.rowCnt/6),e.distributeHeight(this.dayGrid.rowEls,t,!i)):i?e.undistributeHeight(this.dayGrid.rowEls):e.distributeHeight(this.dayGrid.rowEls,t,!0)},j.prototype.computeDateScroll=function(t){return{top:0}},j.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},j.prototype.applyDateScroll=function(t){void 0!==t.top&&this.scroller.setScrollTop(t.top)},j);function j(){var t=null!==z&&z.apply(this,arguments)||this;return t.processOptions=e.memoize(t._processOptions),t.renderSkeleton=e.memoizeRendering(t._renderSkeleton,t._unrenderSkeleton),t.renderHeadIntroHtml=function(){var i=t.context,n=i.theme,o=i.options;return t.colWeekNumbersVisible?'<th class="fc-week-number '+n.getClass("widgetHeader")+'" '+t.weekNumberStyleAttr()+"><span>"+e.htmlEscape(o.weekLabel)+"</span></th>":""},t.renderDayGridNumberIntroHtml=function(i,n){var o=t.context,r=o.options,s=o.dateEnv,a=n.props.cells[i][0].date;return t.colWeekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+">"+e.buildGotoAnchorHtml(r,s,{date:a,type:"week",forceOff:1===n.colCnt},s.format(a,B))+"</td>":""},t.renderDayGridBgIntroHtml=function(){var e=t.context.theme;return t.colWeekNumbersVisible?'<td class="fc-week-number '+e.getClass("widgetContent")+'" '+t.weekNumberStyleAttr()+"></td>":""},t.renderDayGridIntroHtml=function(){return t.colWeekNumbersVisible?'<td class="fc-week-number" '+t.weekNumberStyleAttr()+"></td>":""},t}$.prototype.dateProfileGeneratorClass=s;var W,Y=(n(X,W=e.DateComponent),X.prototype.firstContext=function(t){t.calendar.registerInteractiveComponent(this,{el:this.dayGrid.el})},X.prototype.destroy=function(){W.prototype.destroy.call(this),this.context.calendar.unregisterInteractiveComponent(this)},X.prototype.render=function(t,e){var i=this.dayGrid,n=t.dateProfile,o=t.dayTable;i.receiveProps(r({},this.slicer.sliceProps(t,n,t.nextDayThreshold,e.calendar,i,o),{dateProfile:n,cells:o.cells,isRigid:t.isRigid}),e)},X.prototype.buildPositionCaches=function(){this.dayGrid.buildPositionCaches()},X.prototype.queryHit=function(t,e){var i=this.dayGrid.positionToHit(t,e);if(i)return{component:this.dayGrid,dateSpan:i.dateSpan,dayEl:i.dayEl,rect:{left:i.relativeRect.left,right:i.relativeRect.right,top:i.relativeRect.top,bottom:i.relativeRect.bottom},layer:0}},X);function X(t){var e=W.call(this,t.el)||this;return e.slicer=new q,e.dayGrid=t,e}var V,q=(n(U,V=e.Slicer),U.prototype.sliceRange=function(t,e){return e.sliceRange(t)},U);function U(){return null!==V&&V.apply(this,arguments)||this}var G,Z=(n(K,G=$),K.prototype.render=function(t,e){G.prototype.render.call(this,t,e);var i=this.props.dateProfile,n=this.dayTable=this.buildDayTable(i,t.dateProfileGenerator);this.header&&this.header.receiveProps({dateProfile:i,dates:n.headerDates,datesRepDistinctDays:1===n.rowCnt,renderIntroHtml:this.renderHeadIntroHtml},e),this.simpleDayGrid.receiveProps({dateProfile:i,dayTable:n,businessHours:t.businessHours,dateSelection:t.dateSelection,eventStore:t.eventStore,eventUiBases:t.eventUiBases,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,isRigid:this.hasRigidRows(),nextDayThreshold:this.context.nextDayThreshold},e)},K.prototype._renderSkeleton=function(t){G.prototype._renderSkeleton.call(this,t),t.options.columnHeader&&(this.header=new e.DayHeader(this.el.querySelector(".fc-head-container"))),this.simpleDayGrid=new Y(this.dayGrid)},K.prototype._unrenderSkeleton=function(){G.prototype._unrenderSkeleton.call(this),this.header&&this.header.destroy(),this.simpleDayGrid.destroy()},K);function K(){var t=null!==G&&G.apply(this,arguments)||this;return t.buildDayTable=e.memoize(Q),t}function Q(t,i){var n=new e.DaySeries(t.renderRange,i);return new e.DayTable(n,/year|month|week/.test(t.currentRangeUnit))}var J=e.createPlugin({defaultView:"dayGridMonth",views:{dayGrid:Z,dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});t.AbstractDayGridView=$,t.DayBgRow=P,t.DayGrid=N,t.DayGridSlicer=q,t.DayGridView=Z,t.SimpleDayGrid=Y,t.buildBasicDayTable=Q,t.default=J,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],e):e((t=t||self).FullCalendarList={},t.FullCalendar)}(this,(function(t,e){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function n(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o,r=(n(s,o=e.FgEventRenderer),s.prototype.attachSegs=function(t){t.length?this.listView.renderSegList(t):this.listView.renderEmptyMessage()},s.prototype.detachSegs=function(){},s.prototype.renderSegHtml=function(t){var i=this.context,n=i.theme,o=i.options,r=t.eventRange,s=r.def,a=r.instance,l=r.ui,c=s.url,d=["fc-list-item"].concat(l.classNames),h=l.backgroundColor,u=s.allDay?e.getAllDayHtml(o):e.isMultiDayRange(r.range)?t.isStart?e.htmlEscape(this._getTimeText(a.range.start,t.end,!1)):t.isEnd?e.htmlEscape(this._getTimeText(t.start,a.range.end,!1)):e.getAllDayHtml(o):e.htmlEscape(this.getTimeText(r));return c&&d.push("fc-has-url"),'<tr class="'+d.join(" ")+'">'+(this.displayEventTime?'<td class="fc-list-item-time '+n.getClass("widgetContent")+'">'+(u||"")+"</td>":"")+'<td class="fc-list-item-marker '+n.getClass("widgetContent")+'"><span class="fc-event-dot"'+(h?' style="background-color:'+h+'"':"")+'></span></td><td class="fc-list-item-title '+n.getClass("widgetContent")+'"><a'+(c?' href="'+e.htmlEscape(c)+'"':"")+">"+e.htmlEscape(s.title||"")+"</a></td></tr>"},s.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:"short"}},s);function s(t){var e=o.call(this)||this;return e.listView=t,e}var a,l=(n(c,a=e.View),c.prototype.firstContext=function(t){t.calendar.registerInteractiveComponent(this,{el:this.el})},c.prototype.render=function(t,e){a.prototype.render.call(this,t,e);var i=this.computeDateVars(t.dateProfile),n=i.dayDates,o=i.dayRanges;this.dayDates=n,this.renderSkeleton(e),this.renderContent(e,this.eventStoreToSegs(t.eventStore,t.eventUiBases,o))},c.prototype.destroy=function(){a.prototype.destroy.call(this),this.renderSkeleton.unrender(),this.renderContent.unrender(),this.context.calendar.unregisterInteractiveComponent(this)},c.prototype._renderSkeleton=function(t){var i=t.theme;this.el.classList.add("fc-list-view");for(var n=0,o=(i.getClass("listView")||"").split(" ");n<o.length;n++){var r=o[n];r&&this.el.classList.add(r)}this.scroller=new e.ScrollComponent("hidden","auto"),this.el.appendChild(this.scroller.el),this.contentEl=this.scroller.el},c.prototype._unrenderSkeleton=function(){this.scroller.destroy()},c.prototype.updateSize=function(t,e,i){a.prototype.updateSize.call(this,t,e,i),this.eventRenderer.computeSizes(t),this.eventRenderer.assignSizes(t),this.scroller.clear(),i||this.scroller.setHeight(this.computeScrollerHeight(e))},c.prototype.computeScrollerHeight=function(t){return t-e.subtractInnerElHeight(this.el,this.scroller.el)},c.prototype._eventStoreToSegs=function(t,i,n){return this.eventRangesToSegs(e.sliceEventStore(t,i,this.props.dateProfile.activeRange,this.context.nextDayThreshold).fg,n)},c.prototype.eventRangesToSegs=function(t,e){for(var i=[],n=0,o=t;n<o.length;n++){var r=o[n];i.push.apply(i,this.eventRangeToSegs(r,e))}return i},c.prototype.eventRangeToSegs=function(t,i){for(var n,o,r=this.context,s=r.dateEnv,a=r.nextDayThreshold,l=t.range,c=t.def.allDay,d=[],h=0;h<i.length;h++)if((n=e.intersectRanges(l,i[h]))&&(o={component:this,eventRange:t,start:n.start,end:n.end,isStart:t.isStart&&n.start.valueOf()===l.start.valueOf(),isEnd:t.isEnd&&n.end.valueOf()===l.end.valueOf(),dayIndex:h},d.push(o),!o.isEnd&&!c&&h+1<i.length&&l.end<s.add(i[h+1].start,a))){o.end=l.end,o.isEnd=!0;break}return d},c.prototype.renderEmptyMessage=function(){this.contentEl.innerHTML='<div class="fc-list-empty-wrap2"><div class="fc-list-empty-wrap1"><div class="fc-list-empty">'+e.htmlEscape(this.context.options.noEventsMessage)+"</div></div></div>"},c.prototype.renderSegList=function(t){for(var i,n,o=this.context.theme,r=this.groupSegsByDay(t),s=e.htmlToElement('<table class="fc-list-table '+o.getClass("tableList")+'"><tbody></tbody></table>'),a=s.querySelector("tbody"),l=0;l<r.length;l++)if(i=r[l])for(a.appendChild(this.buildDayHeaderRow(this.dayDates[l])),i=this.eventRenderer.sortEventSegs(i),n=0;n<i.length;n++)a.appendChild(i[n].el);this.contentEl.innerHTML="",this.contentEl.appendChild(s)},c.prototype.groupSegsByDay=function(t){for(var e,i=[],n=0;n<t.length;n++)(i[(e=t[n]).dayIndex]||(i[e.dayIndex]=[])).push(e);return i},c.prototype.buildDayHeaderRow=function(t){var i=this.context,n=i.theme,o=i.dateEnv,r=i.options,s=e.createFormatter(r.listDayFormat),a=e.createFormatter(r.listDayAltFormat);return e.createElement("tr",{className:"fc-list-heading","data-date":o.formatIso(t,{omitTime:!0})},'<td class="'+(n.getClass("tableListHeading")||n.getClass("widgetHeader"))+'" colspan="3">'+(s?e.buildGotoAnchorHtml(r,o,t,{class:"fc-list-heading-main"},e.htmlEscape(o.format(t,s))):"")+(a?e.buildGotoAnchorHtml(r,o,t,{class:"fc-list-heading-alt"},e.htmlEscape(o.format(t,a))):"")+"</td>")},c);function c(t,i){var n=a.call(this,t,i)||this;n.computeDateVars=e.memoize(d),n.eventStoreToSegs=e.memoize(n._eventStoreToSegs),n.renderSkeleton=e.memoizeRendering(n._renderSkeleton,n._unrenderSkeleton);var o=n.eventRenderer=new r(n);return n.renderContent=e.memoizeRendering(o.renderSegs.bind(o),o.unrender.bind(o),[n.renderSkeleton]),n}function d(t){for(var i=e.startOfDay(t.renderRange.start),n=t.renderRange.end,o=[],r=[];i<n;)o.push(i),r.push({start:i,end:e.addDays(i,1)}),i=e.addDays(i,1);return{dayDates:o,dayRanges:r}}l.prototype.fgSegSelector=".fc-list-item";var h=e.createPlugin({views:{list:{class:l,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDayAltFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDayAltFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDayAltFormat:{weekday:"long"}}}});t.ListView=l,t.default=h,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@fullcalendar/core"),require("@fullcalendar/daygrid")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core","@fullcalendar/daygrid"],e):e((t=t||self).FullCalendarTimeGrid={},t.FullCalendar,t.FullCalendarDayGrid)}(this,(function(t,e,i){"use strict";var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function o(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var r,s=function(){return(s=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},a=(o(l,r=e.FgEventRenderer),l.prototype.renderSegs=function(t,i,n){r.prototype.renderSegs.call(this,t,i,n),this.fullTimeFormat=e.createFormatter({hour:"numeric",minute:"2-digit",separator:this.context.options.defaultRangeSeparator})},l.prototype.attachSegs=function(t,e){for(var i=this.timeGrid.groupSegsByCol(t),n=0;n<i.length;n++)i[n]=this.sortEventSegs(i[n]);this.segsByCol=i,this.timeGrid.attachSegsByCol(i,this.timeGrid.fgContainerEls)},l.prototype.detachSegs=function(t){t.forEach((function(t){e.removeElement(t.el)})),this.segsByCol=null},l.prototype.computeSegSizes=function(t){var e=this.timeGrid,i=this.segsByCol,n=e.colCnt;if(e.computeSegVerticals(t),i)for(var o=0;o<n;o++)this.computeSegHorizontals(i[o])},l.prototype.assignSegSizes=function(t){var e=this.timeGrid,i=this.segsByCol,n=e.colCnt;if(e.assignSegVerticals(t),i)for(var o=0;o<n;o++)this.assignSegCss(i[o])},l.prototype.computeEventTimeFormat=function(){return{hour:"numeric",minute:"2-digit",meridiem:!1}},l.prototype.computeDisplayEventEnd=function(){return!0},l.prototype.renderSegHtml=function(t,i){var n,o,r,s,a,l=t.eventRange,c=l.def,d=l.ui,h=c.allDay,u=e.computeEventDraggable(this.context,c,d),p=t.isStart&&e.computeEventStartResizable(this.context,c,d),f=t.isEnd&&e.computeEventEndResizable(this.context,c,d),g=this.getSegClasses(t,u,p||f,i),m=e.cssToStr(this.getSkinCss(d));return g.unshift("fc-time-grid-event"),e.isMultiDayRange(l.range)?(t.isStart||t.isEnd)&&(n=t.start,o=t.end,r=this._getTimeText(n,o,h),s=this._getTimeText(n,o,h,this.fullTimeFormat),a=this._getTimeText(n,o,h,null,!1)):(r=this.getTimeText(l),s=this.getTimeText(l,this.fullTimeFormat),a=this.getTimeText(l,null,!1)),'<a class="'+g.join(" ")+'"'+(c.url?' href="'+e.htmlEscape(c.url)+'"':"")+(m?' style="'+m+'"':"")+'><div class="fc-content">'+(r?'<div class="fc-time" data-start="'+e.htmlEscape(a)+'" data-full="'+e.htmlEscape(s)+'"><span>'+e.htmlEscape(r)+"</span></div>":"")+(c.title?'<div class="fc-title">'+e.htmlEscape(c.title)+"</div>":"")+"</div>"+(f?'<div class="fc-resizer fc-end-resizer"></div>':"")+"</a>"},l.prototype.computeSegHorizontals=function(t){var e,i,n=function(t){var e,i,n,o=[];for(e=0;e<t.length;e++){for(i=t[e],n=0;n<o.length&&d(i,o[n]).length;n++);i.level=n,(o[n]||(o[n]=[])).push(i)}return o}(t);if(function(t){var e,i,n,o,r;for(e=0;e<t.length;e++)for(i=t[e],n=0;n<i.length;n++)for((o=i[n]).forwardSegs=[],r=e+1;r<t.length;r++)d(o,t[r],o.forwardSegs)}(n),e=n[0]){for(i=0;i<e.length;i++)c(e[i]);for(i=0;i<e.length;i++)this.computeSegForwardBack(e[i],0,0)}},l.prototype.computeSegForwardBack=function(t,e,i){var n,o=t.forwardSegs;if(void 0===t.forwardCoord)for(o.length?(this.sortForwardSegs(o),this.computeSegForwardBack(o[0],e+1,i),t.forwardCoord=o[0].backwardCoord):t.forwardCoord=1,t.backwardCoord=t.forwardCoord-(t.forwardCoord-i)/(e+1),n=0;n<o.length;n++)this.computeSegForwardBack(o[n],0,t.forwardCoord)},l.prototype.sortForwardSegs=function(t){var i=t.map(h),n=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(this.context.eventOrderSpecs);return i.sort((function(t,i){return e.compareByFieldSpecs(t,i,n)})),i.map((function(t){return t._seg}))},l.prototype.assignSegCss=function(t){for(var i=0,n=t;i<n.length;i++){var o=n[i];e.applyStyle(o.el,this.generateSegCss(o)),0<o.level&&o.el.classList.add("fc-time-grid-event-inset"),o.eventRange.def.title&&o.bottom-o.top<30&&o.el.classList.add("fc-short")}},l.prototype.generateSegCss=function(t){var e,i,n=this.context.options.slotEventOverlap,o=t.backwardCoord,r=t.forwardCoord,s=this.timeGrid.generateSegVerticalCss(t),a=this.context.isRtl;return n&&(r=Math.min(1,o+2*(r-o))),i=a?(e=1-r,o):(e=o,1-r),s.zIndex=t.level+1,s.left=100*e+"%",s.right=100*i+"%",n&&t.forwardPressure&&(s[a?"marginLeft":"marginRight"]=20),s},l);function l(t){var e=r.call(this)||this;return e.timeGrid=t,e}function c(t){var e,i,n=t.forwardSegs,o=0;if(void 0===t.forwardPressure){for(e=0;e<n.length;e++)c(i=n[e]),o=Math.max(o,1+i.forwardPressure);t.forwardPressure=o}}function d(t,e,i){void 0===i&&(i=[]);for(var n,o,r=0;r<e.length;r++)n=t,o=e[r],n.bottom>o.top&&n.top<o.bottom&&i.push(e[r]);return i}function h(t){var i=e.buildSegCompareObj(t);return i.forwardPressure=t.forwardPressure,i.backwardCoord=t.backwardCoord,i}var u,p=(o(f,u=a),f.prototype.attachSegs=function(t,e){this.segsByCol=this.timeGrid.groupSegsByCol(t),this.timeGrid.attachSegsByCol(this.segsByCol,this.timeGrid.mirrorContainerEls),this.sourceSeg=e.sourceSeg},f.prototype.generateSegCss=function(t){var e,i=u.prototype.generateSegCss.call(this,t),n=this.sourceSeg;return n&&n.col===t.col&&(e=u.prototype.generateSegCss.call(this,n),i.left=e.left,i.right=e.right,i.marginLeft=e.marginLeft,i.marginRight=e.marginRight),i},f);function f(){return null!==u&&u.apply(this,arguments)||this}var g,m=(o(v,g=e.FillRenderer),v.prototype.attachSegs=function(t,e){var i,n=this.timeGrid;return"bgEvent"===t?i=n.bgContainerEls:"businessHours"===t?i=n.businessContainerEls:"highlight"===t&&(i=n.highlightContainerEls),n.attachSegsByCol(n.groupSegsByCol(e),i),e.map((function(t){return t.el}))},v.prototype.computeSegSizes=function(t){this.timeGrid.computeSegVerticals(t)},v.prototype.assignSegSizes=function(t){this.timeGrid.assignSegVerticals(t)},v);function v(t){var e=g.call(this)||this;return e.timeGrid=t,e}var y,b=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],x=(o(w,y=e.DateComponent),w.prototype._processOptions=function(t){var i,n=t.slotDuration,o=t.snapDuration,r=(n=e.createDuration(n),o=o?e.createDuration(o):n,e.wholeDivideDurations(n,o));null===r&&(o=n,r=1),this.slotDuration=n,this.snapDuration=o,this.snapsPerSlot=r,i=t.slotLabelFormat,Array.isArray(i)&&(i=i[i.length-1]),this.labelFormat=e.createFormatter(i||{hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"}),i=t.slotLabelInterval,this.labelInterval=i?e.createDuration(i):this.computeLabelInterval(n)},w.prototype.computeLabelInterval=function(t){for(var i,n,o=b.length-1;0<=o;o--)if(i=e.createDuration(b[o]),null!==(n=e.wholeDivideDurations(i,t))&&1<n)return i;return t},w.prototype.render=function(t,e){this.processOptions(e.options);var i=t.cells;this.colCnt=i.length,this.renderSkeleton(e.theme),this.renderSlats(t.dateProfile),this.renderColumns(t.cells,t.dateProfile),this.renderBusinessHours(e,t.businessHourSegs),this.renderDateSelection(t.dateSelectionSegs),this.renderFgEvents(e,t.fgEventSegs),this.renderBgEvents(e,t.bgEventSegs),this.renderEventSelection(t.eventSelection),this.renderEventDrag(t.eventDrag),this.renderEventResize(t.eventResize)},w.prototype.destroy=function(){y.prototype.destroy.call(this),this.renderSlats.unrender(),this.renderColumns.unrender(),this.renderSkeleton.unrender()},w.prototype.updateSize=function(t){var e=this.fillRenderer,i=this.eventRenderer,n=this.mirrorRenderer;(t||this.isSlatSizesDirty)&&(this.buildSlatPositions(),this.isSlatSizesDirty=!1),(t||this.isColSizesDirty)&&(this.buildColPositions(),this.isColSizesDirty=!1),e.computeSizes(t),i.computeSizes(t),n.computeSizes(t),e.assignSizes(t),i.assignSizes(t),n.assignSizes(t)},w.prototype._renderSkeleton=function(t){var e=this.el;e.innerHTML='<div class="fc-bg"></div><div class="fc-slats"></div><hr class="fc-divider '+t.getClass("widgetHeader")+'" style="display:none" />',this.rootBgContainerEl=e.querySelector(".fc-bg"),this.slatContainerEl=e.querySelector(".fc-slats"),this.bottomRuleEl=e.querySelector(".fc-divider")},w.prototype._renderSlats=function(t){var i=this.context.theme;this.slatContainerEl.innerHTML='<table class="'+i.getClass("tableGrid")+'">'+this.renderSlatRowHtml(t)+"</table>",this.slatEls=e.findElements(this.slatContainerEl,"tr"),this.slatPositions=new e.PositionCache(this.el,this.slatEls,!1,!0),this.isSlatSizesDirty=!0},w.prototype.renderSlatRowHtml=function(t){for(var i,n,o,r=this.context,s=r.dateEnv,a=r.theme,l=r.isRtl,c="",d=e.startOfDay(t.renderRange.start),h=t.minTime,u=e.createDuration(0);e.asRoughMs(h)<e.asRoughMs(t.maxTime);)i=s.add(d,h),n=null!==e.wholeDivideDurations(u,this.labelInterval),o='<td class="fc-axis fc-time '+a.getClass("widgetContent")+'">'+(n?"<span>"+e.htmlEscape(s.format(i,this.labelFormat))+"</span>":"")+"</td>",c+='<tr data-time="'+e.formatIsoTimeString(i)+'"'+(n?"":' class="fc-minor"')+">"+(l?"":o)+'<td class="'+a.getClass("widgetContent")+'"></td>'+(l?o:"")+"</tr>",h=e.addDurations(h,this.slotDuration),u=e.addDurations(u,this.slotDuration);return c},w.prototype._renderColumns=function(t,n){var o=this.context,r=o.calendar,s=o.view,a=o.isRtl,l=o.theme,c=o.dateEnv,d=new i.DayBgRow(this.context);this.rootBgContainerEl.innerHTML='<table class="'+l.getClass("tableGrid")+'">'+d.renderHtml({cells:t,dateProfile:n,renderIntroHtml:this.renderProps.renderBgIntroHtml})+"</table>",this.colEls=e.findElements(this.el,".fc-day, .fc-disabled-day");for(var h=0;h<this.colCnt;h++)r.publiclyTrigger("dayRender",[{date:c.toDate(t[h].date),el:this.colEls[h],view:s}]);a&&this.colEls.reverse(),this.colPositions=new e.PositionCache(this.el,this.colEls,!0,!1),this.renderContentSkeleton(),this.isColSizesDirty=!0},w.prototype._unrenderColumns=function(){this.unrenderContentSkeleton()},w.prototype.renderContentSkeleton=function(){var t,i=this.context.isRtl,n=[];n.push(this.renderProps.renderIntroHtml());for(var o=0;o<this.colCnt;o++)n.push('<td><div class="fc-content-col"><div class="fc-event-container fc-mirror-container"></div><div class="fc-event-container"></div><div class="fc-highlight-container"></div><div class="fc-bgevent-container"></div><div class="fc-business-container"></div></div></td>');i&&n.reverse(),t=this.contentSkeletonEl=e.htmlToElement('<div class="fc-content-skeleton"><table><tr>'+n.join("")+"</tr></table></div>"),this.colContainerEls=e.findElements(t,".fc-content-col"),this.mirrorContainerEls=e.findElements(t,".fc-mirror-container"),this.fgContainerEls=e.findElements(t,".fc-event-container:not(.fc-mirror-container)"),this.bgContainerEls=e.findElements(t,".fc-bgevent-container"),this.highlightContainerEls=e.findElements(t,".fc-highlight-container"),this.businessContainerEls=e.findElements(t,".fc-business-container"),i&&(this.colContainerEls.reverse(),this.mirrorContainerEls.reverse(),this.fgContainerEls.reverse(),this.bgContainerEls.reverse(),this.highlightContainerEls.reverse(),this.businessContainerEls.reverse()),this.el.appendChild(t)},w.prototype.unrenderContentSkeleton=function(){e.removeElement(this.contentSkeletonEl)},w.prototype.groupSegsByCol=function(t){for(var e=[],i=0;i<this.colCnt;i++)e.push([]);for(i=0;i<t.length;i++)e[t[i].col].push(t[i]);return e},w.prototype.attachSegsByCol=function(t,e){for(var i,n,o=0;o<this.colCnt;o++)for(i=t[o],n=0;n<i.length;n++)e[o].appendChild(i[n].el)},w.prototype.getNowIndicatorUnit=function(){return"minute"},w.prototype.renderNowIndicator=function(t,i){if(this.colContainerEls){for(var n,o=this.computeDateTop(i),r=[],s=0;s<t.length;s++){var a=e.createElement("div",{className:"fc-now-indicator fc-now-indicator-line"});a.style.top=o+"px",this.colContainerEls[t[s].col].appendChild(a),r.push(a)}0<t.length&&((n=e.createElement("div",{className:"fc-now-indicator fc-now-indicator-arrow"})).style.top=o+"px",this.contentSkeletonEl.appendChild(n),r.push(n)),this.nowIndicatorEls=r}},w.prototype.unrenderNowIndicator=function(){this.nowIndicatorEls&&(this.nowIndicatorEls.forEach(e.removeElement),this.nowIndicatorEls=null)},w.prototype.getTotalSlatHeight=function(){return this.slatContainerEl.getBoundingClientRect().height},w.prototype.computeDateTop=function(t,i){return i=i||e.startOfDay(t),this.computeTimeTop(e.createDuration(t.valueOf()-i.valueOf()))},w.prototype.computeTimeTop=function(t){var i,n,o=this.slatEls.length,r=this.props.dateProfile,s=(t.milliseconds-e.asRoughMs(r.minTime))/e.asRoughMs(this.slotDuration);return s=Math.max(0,s),s=Math.min(o,s),i=Math.floor(s),n=s-(i=Math.min(i,o-1)),this.slatPositions.tops[i]+this.slatPositions.getHeight(i)*n},w.prototype.computeSegVerticals=function(t){for(var e,i,n=this.context.options.timeGridEventMinHeight,o=0;o<t.length;o++)e=t[o],i=this.props.cells[e.col].date,e.top=this.computeDateTop(e.start,i),e.bottom=Math.max(e.top+n,this.computeDateTop(e.end,i))},w.prototype.assignSegVerticals=function(t){for(var i,n=0;n<t.length;n++)i=t[n],e.applyStyle(i.el,this.generateSegVerticalCss(i))},w.prototype.generateSegVerticalCss=function(t){return{top:t.top,bottom:-t.bottom}},w.prototype.buildPositionCaches=function(){this.buildColPositions(),this.buildSlatPositions()},w.prototype.buildColPositions=function(){this.colPositions.build()},w.prototype.buildSlatPositions=function(){this.slatPositions.build()},w.prototype.positionToHit=function(t,i){var n=this.context.dateEnv,o=this.snapsPerSlot,r=this.slatPositions,s=this.colPositions,a=s.leftToIndex(t),l=r.topToIndex(i);if(null!=a&&null!=l){var c=r.tops[l],d=r.getHeight(l),h=(i-c)/d,u=l*o+Math.floor(h*o),p=this.props.cells[a].date,f=e.addDurations(this.props.dateProfile.minTime,e.multiplyDuration(this.snapDuration,u)),g=n.add(p,f);return{col:a,dateSpan:{range:{start:g,end:n.add(g,this.snapDuration)},allDay:!1},dayEl:this.colEls[a],relativeRect:{left:s.lefts[a],right:s.rights[a],top:c,bottom:c+d}}}},w.prototype._renderEventDrag=function(t){t&&(this.eventRenderer.hideByHash(t.affectedInstances),t.isEvent?this.mirrorRenderer.renderSegs(this.context,t.segs,{isDragging:!0,sourceSeg:t.sourceSeg}):this.fillRenderer.renderSegs("highlight",this.context,t.segs))},w.prototype._unrenderEventDrag=function(t){t&&(this.eventRenderer.showByHash(t.affectedInstances),t.isEvent?this.mirrorRenderer.unrender(this.context,t.segs,{isDragging:!0,sourceSeg:t.sourceSeg}):this.fillRenderer.unrender("highlight",this.context))},w.prototype._renderEventResize=function(t){t&&(this.eventRenderer.hideByHash(t.affectedInstances),this.mirrorRenderer.renderSegs(this.context,t.segs,{isResizing:!0,sourceSeg:t.sourceSeg}))},w.prototype._unrenderEventResize=function(t){t&&(this.eventRenderer.showByHash(t.affectedInstances),this.mirrorRenderer.unrender(this.context,t.segs,{isResizing:!0,sourceSeg:t.sourceSeg}))},w.prototype._renderDateSelection=function(t){t&&(this.context.options.selectMirror?this.mirrorRenderer.renderSegs(this.context,t,{isSelecting:!0}):this.fillRenderer.renderSegs("highlight",this.context,t))},w.prototype._unrenderDateSelection=function(t){t&&(this.context.options.selectMirror?this.mirrorRenderer.unrender(this.context,t,{isSelecting:!0}):this.fillRenderer.unrender("highlight",this.context))},w);function w(t,i){var n=y.call(this,t)||this;n.isSlatSizesDirty=!1,n.isColSizesDirty=!1,n.processOptions=e.memoize(n._processOptions),n.renderSkeleton=e.memoizeRendering(n._renderSkeleton),n.renderSlats=e.memoizeRendering(n._renderSlats,null,[n.renderSkeleton]),n.renderColumns=e.memoizeRendering(n._renderColumns,n._unrenderColumns,[n.renderSkeleton]),n.renderProps=i;var o=n.renderColumns,r=n.eventRenderer=new a(n),s=n.fillRenderer=new m(n);return n.mirrorRenderer=new p(n),n.renderBusinessHours=e.memoizeRendering(s.renderSegs.bind(s,"businessHours"),s.unrender.bind(s,"businessHours"),[o]),n.renderDateSelection=e.memoizeRendering(n._renderDateSelection,n._unrenderDateSelection,[o]),n.renderFgEvents=e.memoizeRendering(r.renderSegs.bind(r),r.unrender.bind(r),[o]),n.renderBgEvents=e.memoizeRendering(s.renderSegs.bind(s,"bgEvent"),s.unrender.bind(s,"bgEvent"),[o]),n.renderEventSelection=e.memoizeRendering(r.selectByInstanceId.bind(r),r.unselectByInstanceId.bind(r),[n.renderFgEvents]),n.renderEventDrag=e.memoizeRendering(n._renderEventDrag,n._unrenderEventDrag,[o]),n.renderEventResize=e.memoizeRendering(n._renderEventResize,n._unrenderEventResize,[o]),n}var S,C=(o(k,S=e.Splitter),k.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},k.prototype.getKeysForDateSpan=function(t){return t.allDay?["allDay"]:["timed"]},k.prototype.getKeysForEventDef=function(t){return t.allDay?e.hasBgRendering(t)?["timed","allDay"]:["allDay"]:["timed"]},k);function k(){return null!==S&&S.apply(this,arguments)||this}var _,T=e.createFormatter({week:"short"}),D=(o(E,_=e.View),E.prototype.render=function(t,e){_.prototype.render.call(this,t,e),this.renderSkeleton(e)},E.prototype.destroy=function(){_.prototype.destroy.call(this),this.renderSkeleton.unrender()},E.prototype._renderSkeleton=function(t){this.el.classList.add("fc-timeGrid-view"),this.el.innerHTML=this.renderSkeletonHtml(),this.scroller=new e.ScrollComponent("hidden","auto");var n=this.scroller.el;this.el.querySelector(".fc-body > tr > td").appendChild(n),n.classList.add("fc-time-grid-container");var o,r=e.createElement("div",{className:"fc-time-grid"});n.appendChild(r),this.timeGrid=new x(r,{renderBgIntroHtml:this.renderTimeGridBgIntroHtml,renderIntroHtml:this.renderTimeGridIntroHtml}),t.options.allDaySlot&&(this.dayGrid=new i.DayGrid(this.el.querySelector(".fc-day-grid"),{renderNumberIntroHtml:this.renderDayGridIntroHtml,renderBgIntroHtml:this.renderDayGridBgIntroHtml,renderIntroHtml:this.renderDayGridIntroHtml,colWeekNumbersVisible:!1,cellWeekNumbersVisible:!1}),o=this.el.querySelector(".fc-divider"),this.dayGrid.bottomCoordPadding=o.getBoundingClientRect().height)},E.prototype._unrenderSkeleton=function(){this.el.classList.remove("fc-timeGrid-view"),this.timeGrid.destroy(),this.dayGrid&&this.dayGrid.destroy(),this.scroller.destroy()},E.prototype.renderSkeletonHtml=function(){var t=this.context,e=t.theme,i=t.options;return'<table class="'+e.getClass("tableGrid")+'">'+(i.columnHeader?'<thead class="fc-head"><tr><td class="fc-head-container '+e.getClass("widgetHeader")+'">&nbsp;</td></tr></thead>':"")+'<tbody class="fc-body"><tr><td class="'+e.getClass("widgetContent")+'">'+(i.allDaySlot?'<div class="fc-day-grid"></div><hr class="fc-divider '+e.getClass("widgetHeader")+'" />':"")+"</td></tr></tbody></table>"},E.prototype.getNowIndicatorUnit=function(){return this.timeGrid.getNowIndicatorUnit()},E.prototype.unrenderNowIndicator=function(){this.timeGrid.unrenderNowIndicator()},E.prototype.updateSize=function(t,e,i){_.prototype.updateSize.call(this,t,e,i),this.timeGrid.updateSize(t),this.dayGrid&&this.dayGrid.updateSize(t)},E.prototype.updateBaseSize=function(t,i,n){var o,r,s,a,l=this;this.axisWidth=e.matchCellWidths(e.findElements(this.el,".fc-axis")),this.timeGrid.colEls?(a=e.findElements(this.el,".fc-row").filter((function(t){return!l.scroller.el.contains(t)})),this.timeGrid.bottomRuleEl.style.display="none",this.scroller.clear(),a.forEach(e.uncompensateScroll),this.dayGrid&&(this.dayGrid.removeSegPopover(),(o=this.context.options.eventLimit)&&"number"!=typeof o&&(o=5),o&&this.dayGrid.limitRows(o)),n||(r=this.computeScrollerHeight(i),this.scroller.setHeight(r),((s=this.scroller.getScrollbarWidths()).left||s.right)&&(a.forEach((function(t){e.compensateScroll(t,s)})),r=this.computeScrollerHeight(i),this.scroller.setHeight(r)),this.scroller.lockOverflow(s),this.timeGrid.getTotalSlatHeight()<r&&(this.timeGrid.bottomRuleEl.style.display=""))):n||(r=this.computeScrollerHeight(i),this.scroller.setHeight(r))},E.prototype.computeScrollerHeight=function(t){return t-e.subtractInnerElHeight(this.el,this.scroller.el)},E.prototype.computeDateScroll=function(t){var e=this.timeGrid.computeTimeTop(t);return(e=Math.ceil(e))&&e++,{top:e}},E.prototype.queryDateScroll=function(){return{top:this.scroller.getScrollTop()}},E.prototype.applyDateScroll=function(t){void 0!==t.top&&this.scroller.setScrollTop(t.top)},E.prototype.axisStyleAttr=function(){return null!=this.axisWidth?'style="width:'+this.axisWidth+'px"':""},E);function E(){var t=null!==_&&_.apply(this,arguments)||this;return t.splitter=new C,t.renderSkeleton=e.memoizeRendering(t._renderSkeleton,t._unrenderSkeleton),t.renderHeadIntroHtml=function(){var i,n=t.context,o=n.theme,r=n.dateEnv,s=n.options,a=t.props.dateProfile.renderRange,l=e.diffDays(a.start,a.end);return s.weekNumbers?(i=r.format(a.start,T),'<th class="fc-axis fc-week-number '+o.getClass("widgetHeader")+'" '+t.axisStyleAttr()+">"+e.buildGotoAnchorHtml(s,r,{date:a.start,type:"week",forceOff:1<l},e.htmlEscape(i))+"</th>"):'<th class="fc-axis '+o.getClass("widgetHeader")+'" '+t.axisStyleAttr()+"></th>"},t.renderTimeGridBgIntroHtml=function(){return'<td class="fc-axis '+t.context.theme.getClass("widgetContent")+'" '+t.axisStyleAttr()+"></td>"},t.renderTimeGridIntroHtml=function(){return'<td class="fc-axis" '+t.axisStyleAttr()+"></td>"},t.renderDayGridBgIntroHtml=function(){var i=t.context,n=i.theme,o=i.options;return'<td class="fc-axis '+n.getClass("widgetContent")+'" '+t.axisStyleAttr()+"><span>"+e.getAllDayHtml(o)+"</span></td>"},t.renderDayGridIntroHtml=function(){return'<td class="fc-axis" '+t.axisStyleAttr()+"></td>"},t}D.prototype.usesMinMaxTime=!0;var A,I=(o(P,A=e.DateComponent),P.prototype.firstContext=function(t){t.calendar.registerInteractiveComponent(this,{el:this.timeGrid.el})},P.prototype.destroy=function(){A.prototype.destroy.call(this),this.context.calendar.unregisterInteractiveComponent(this)},P.prototype.render=function(t,e){var i=this.context.dateEnv,n=t.dateProfile,o=t.dayTable,r=this.dayRanges=this.buildDayRanges(o,n,i);this.timeGrid.receiveProps(s({},this.slicer.sliceProps(t,n,null,e.calendar,this.timeGrid,r),{dateProfile:n,cells:o.cells[0]}),e)},P.prototype.renderNowIndicator=function(t){this.timeGrid.renderNowIndicator(this.slicer.sliceNowDate(t,this.timeGrid,this.dayRanges),t)},P.prototype.buildPositionCaches=function(){this.timeGrid.buildPositionCaches()},P.prototype.queryHit=function(t,e){var i=this.timeGrid.positionToHit(t,e);if(i)return{component:this.timeGrid,dateSpan:i.dateSpan,dayEl:i.dayEl,rect:{left:i.relativeRect.left,right:i.relativeRect.right,top:i.relativeRect.top,bottom:i.relativeRect.bottom},layer:0}},P);function P(t){var i=A.call(this,t.el)||this;return i.buildDayRanges=e.memoize(M),i.slicer=new R,i.timeGrid=t,i}function M(t,e,i){for(var n=[],o=0,r=t.headerDates;o<r.length;o++){var s=r[o];n.push({start:i.add(s,e.minTime),end:i.add(s,e.maxTime)})}return n}var L,R=(o(O,L=e.Slicer),O.prototype.sliceRange=function(t,i){for(var n=[],o=0;o<i.length;o++){var r=e.intersectRanges(t,i[o]);r&&n.push({start:r.start,end:r.end,isStart:r.start.valueOf()===t.start.valueOf(),isEnd:r.end.valueOf()===t.end.valueOf(),col:o})}return n},O);function O(){return null!==L&&L.apply(this,arguments)||this}var F,N=(o(H,F=D),H.prototype.render=function(t,e){F.prototype.render.call(this,t,e);var i=this.props,n=i.dateProfile,o=i.dateProfileGenerator,r=e.nextDayThreshold,a=this.buildDayTable(n,o),l=this.splitter.splitProps(t);this.header&&this.header.receiveProps({dateProfile:n,dates:a.headerDates,datesRepDistinctDays:!0,renderIntroHtml:this.renderHeadIntroHtml},e),this.simpleTimeGrid.receiveProps(s({},l.timed,{dateProfile:n,dayTable:a}),e),this.simpleDayGrid&&this.simpleDayGrid.receiveProps(s({},l.allDay,{dateProfile:n,dayTable:a,nextDayThreshold:r,isRigid:!1}),e),this.startNowIndicator(n,o)},H.prototype._renderSkeleton=function(t){F.prototype._renderSkeleton.call(this,t),t.options.columnHeader&&(this.header=new e.DayHeader(this.el.querySelector(".fc-head-container"))),this.simpleTimeGrid=new I(this.timeGrid),this.dayGrid&&(this.simpleDayGrid=new i.SimpleDayGrid(this.dayGrid))},H.prototype._unrenderSkeleton=function(){F.prototype._unrenderSkeleton.call(this),this.header&&this.header.destroy(),this.simpleTimeGrid.destroy(),this.simpleDayGrid&&this.simpleDayGrid.destroy()},H.prototype.renderNowIndicator=function(t){this.simpleTimeGrid.renderNowIndicator(t)},H);function H(){var t=null!==F&&F.apply(this,arguments)||this;return t.buildDayTable=e.memoize(z),t}function z(t,i){var n=new e.DaySeries(t.renderRange,i);return new e.DayTable(n,!1)}var B=e.createPlugin({defaultView:"timeGridWeek",views:{timeGrid:{class:N,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});t.AbstractTimeGridView=D,t.TimeGrid=x,t.TimeGridSlicer=R,t.TimeGridView=N,t.buildDayRanges=M,t.buildDayTable=z,t.default=B,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],e):e((t=t||self).FullCalendarInteraction={},t.FullCalendar)}(this,(function(t,e){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function n(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};e.config.touchMouseIgnoreWait=500;var r=0,s=0,a=!1,l=(c.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--s||window.removeEventListener("touchmove",d,{passive:!1})},c.prototype.tryStart=function(t){var i=this.querySubjectEl(t),n=t.target;return!(!i||this.handleSelector&&!e.elementClosest(n,this.handleSelector)||(this.subjectEl=i,this.downEl=n,this.isDragging=!0,this.wasTouchScroll=!1))},c.prototype.cleanup=function(){a=!1,this.isDragging=!1,this.subjectEl=null,this.downEl=null,this.destroyScrollWatch()},c.prototype.querySubjectEl=function(t){return this.selector?e.elementClosest(t.target,this.selector):this.containerEl},c.prototype.shouldIgnoreMouse=function(){return r||this.isTouchDragging},c.prototype.cancelTouchScroll=function(){this.isDragging&&(a=!0)},c.prototype.initScrollWatch=function(t){this.shouldWatchScroll&&(this.recordCoords(t),window.addEventListener("scroll",this.handleScroll,!0))},c.prototype.recordCoords=function(t){this.shouldWatchScroll&&(this.prevPageX=t.pageX,this.prevPageY=t.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},c.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},c.prototype.createEventFromMouse=function(t,e){var i=0,n=0;return e?(this.origPageX=t.pageX,this.origPageY=t.pageY):(i=t.pageX-this.origPageX,n=t.pageY-this.origPageY),{origEvent:t,isTouch:!1,subjectEl:this.subjectEl,pageX:t.pageX,pageY:t.pageY,deltaX:i,deltaY:n}},c.prototype.createEventFromTouch=function(t,e){var i,n=t.touches,o=0,r=0,s=n&&n.length?(i=n[0].pageX,n[0].pageY):(i=t.pageX,t.pageY);return e?(this.origPageX=i,this.origPageY=s):(o=i-this.origPageX,r=s-this.origPageY),{origEvent:t,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:s,deltaX:o,deltaY:r}},c);function c(t){var i=this;this.subjectEl=null,this.downEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(t){var e,n;i.shouldIgnoreMouse()||0!==(n=t).button||n.ctrlKey||!i.tryStart(t)||(e=i.createEventFromMouse(t,!0),i.emitter.trigger("pointerdown",e),i.initScrollWatch(e),i.shouldIgnoreMove||document.addEventListener("mousemove",i.handleMouseMove),document.addEventListener("mouseup",i.handleMouseUp))},this.handleMouseMove=function(t){var e=i.createEventFromMouse(t);i.recordCoords(e),i.emitter.trigger("pointermove",e)},this.handleMouseUp=function(t){document.removeEventListener("mousemove",i.handleMouseMove),document.removeEventListener("mouseup",i.handleMouseUp),i.emitter.trigger("pointerup",i.createEventFromMouse(t)),i.cleanup()},this.handleTouchStart=function(t){var e,n;i.tryStart(t)&&(i.isTouchDragging=!0,e=i.createEventFromTouch(t,!0),i.emitter.trigger("pointerdown",e),i.initScrollWatch(e),n=t.target,i.shouldIgnoreMove||n.addEventListener("touchmove",i.handleTouchMove),n.addEventListener("touchend",i.handleTouchEnd),n.addEventListener("touchcancel",i.handleTouchEnd),window.addEventListener("scroll",i.handleTouchScroll,!0))},this.handleTouchMove=function(t){var e=i.createEventFromTouch(t);i.recordCoords(e),i.emitter.trigger("pointermove",e)},this.handleTouchEnd=function(t){var n;i.isDragging&&((n=t.target).removeEventListener("touchmove",i.handleTouchMove),n.removeEventListener("touchend",i.handleTouchEnd),n.removeEventListener("touchcancel",i.handleTouchEnd),window.removeEventListener("scroll",i.handleTouchScroll,!0),i.emitter.trigger("pointerup",i.createEventFromTouch(t)),i.cleanup(),i.isTouchDragging=!1,r++,setTimeout((function(){r--}),e.config.touchMouseIgnoreWait))},this.handleTouchScroll=function(){i.wasTouchScroll=!0},this.handleScroll=function(t){var e,n;i.shouldIgnoreMove||(e=window.pageXOffset-i.prevScrollX+i.prevPageX,n=window.pageYOffset-i.prevScrollY+i.prevPageY,i.emitter.trigger("pointermove",{origEvent:t,isTouch:i.isTouchDragging,subjectEl:i.subjectEl,pageX:e,pageY:n,deltaX:e-i.origPageX,deltaY:n-i.origPageY}))},this.containerEl=t,this.emitter=new e.EmitterMixin,t.addEventListener("mousedown",this.handleMouseDown),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),s++||window.addEventListener("touchmove",d,{passive:!1})}function d(t){a&&t.preventDefault()}var h=(u.prototype.start=function(t,e,i){this.sourceEl=t,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=e-window.pageXOffset,this.origScreenY=i-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},u.prototype.handleMove=function(t,e){this.deltaX=t-window.pageXOffset-this.origScreenX,this.deltaY=e-window.pageYOffset-this.origScreenY,this.updateElPosition()},u.prototype.setIsVisible=function(t){t?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=t,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=t)},u.prototype.stop=function(t,e){function i(){n.cleanup(),e()}var n=this;t&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(i,this.revertDuration):setTimeout(i,0)},u.prototype.doRevertAnimation=function(t,i){var n=this.mirrorEl,o=this.sourceEl.getBoundingClientRect();n.style.transition="top "+i+"ms,left "+i+"ms",e.applyStyle(n,{left:o.left,top:o.top}),e.whenTransitionDone(n,(function(){n.style.transition="",t()}))},u.prototype.cleanup=function(){this.mirrorEl&&(e.removeElement(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},u.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&e.applyStyle(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},u.prototype.getMirrorEl=function(){var t=this.sourceElRect,i=this.mirrorEl;return i||((i=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),i.classList.add("fc-dragging"),e.applyStyle(i,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:t.right-t.left,height:t.bottom-t.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(i)),i},u);function u(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}var p,f=(n(g,p=e.ScrollController),g.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},g.prototype.getScrollTop=function(){return this.scrollTop},g.prototype.getScrollLeft=function(){return this.scrollLeft},g.prototype.setScrollTop=function(t){this.scrollController.setScrollTop(t),this.doesListening||(this.scrollTop=Math.max(Math.min(t,this.getMaxScrollTop()),0),this.handleScrollChange())},g.prototype.setScrollLeft=function(t){this.scrollController.setScrollLeft(t),this.doesListening||(this.scrollLeft=Math.max(Math.min(t,this.getMaxScrollLeft()),0),this.handleScrollChange())},g.prototype.getClientWidth=function(){return this.clientWidth},g.prototype.getClientHeight=function(){return this.clientHeight},g.prototype.getScrollWidth=function(){return this.scrollWidth},g.prototype.getScrollHeight=function(){return this.scrollHeight},g.prototype.handleScrollChange=function(){},g);function g(t,e){var i=p.call(this)||this;return i.handleScroll=function(){i.scrollTop=i.scrollController.getScrollTop(),i.scrollLeft=i.scrollController.getScrollLeft(),i.handleScrollChange()},i.scrollController=t,i.doesListening=e,i.scrollTop=i.origScrollTop=t.getScrollTop(),i.scrollLeft=i.origScrollLeft=t.getScrollLeft(),i.scrollWidth=t.getScrollWidth(),i.scrollHeight=t.getScrollHeight(),i.clientWidth=t.getClientWidth(),i.clientHeight=t.getClientHeight(),i.clientRect=i.computeClientRect(),i.doesListening&&i.getEventTarget().addEventListener("scroll",i.handleScroll),i}var m,v=(n(y,m=f),y.prototype.getEventTarget=function(){return this.scrollController.el},y.prototype.computeClientRect=function(){return e.computeInnerRect(this.scrollController.el)},y);function y(t,i){return m.call(this,new e.ElementScrollController(t),i)||this}var b,x=(n(w,b=f),w.prototype.getEventTarget=function(){return window},w.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},w.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},w);function w(t){return b.call(this,new e.WindowScrollController,t)||this}var S="function"==typeof performance?performance.now:Date.now,C=(k.prototype.start=function(t,e){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(t,e))},k.prototype.handleMove=function(t,e){var i,n,o,r;this.isEnabled&&(i=t-window.pageXOffset,n=e-window.pageYOffset,o=null===this.pointerScreenY?0:n-this.pointerScreenY,r=null===this.pointerScreenX?0:i-this.pointerScreenX,o<0?this.everMovedUp=!0:0<o&&(this.everMovedDown=!0),r<0?this.everMovedLeft=!0:0<r&&(this.everMovedRight=!0),this.pointerScreenX=i,this.pointerScreenY=n,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(S())))},k.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var t=0,e=this.scrollCaches;t<e.length;t++)e[t].destroy();this.scrollCaches=null}},k.prototype.requestAnimation=function(t){this.msSinceRequest=t,requestAnimationFrame(this.animate)},k.prototype.handleSide=function(t,e){var i=t.scrollCache,n=this.edgeThreshold,o=n-t.distance,r=o*o/(n*n)*this.maxVelocity*e,s=1;switch(t.name){case"left":s=-1;case"right":i.setScrollLeft(i.getScrollLeft()+r*s);break;case"top":s=-1;case"bottom":i.setScrollTop(i.getScrollTop()+r*s)}},k.prototype.computeBestEdge=function(t,e){for(var i=this.edgeThreshold,n=null,o=0,r=this.scrollCaches;o<r.length;o++){var s=r[o],a=s.clientRect,l=t-a.left,c=a.right-t,d=e-a.top,h=a.bottom-e;0<=l&&0<=c&&0<=d&&0<=h&&(d<=i&&this.everMovedUp&&s.canScrollUp()&&(!n||n.distance>d)&&(n={scrollCache:s,name:"top",distance:d}),h<=i&&this.everMovedDown&&s.canScrollDown()&&(!n||n.distance>h)&&(n={scrollCache:s,name:"bottom",distance:h}),l<=i&&this.everMovedLeft&&s.canScrollLeft()&&(!n||n.distance>l)&&(n={scrollCache:s,name:"left",distance:l}),c<=i&&this.everMovedRight&&s.canScrollRight()&&(!n||n.distance>c)&&(n={scrollCache:s,name:"right",distance:c}))}return n},k.prototype.buildCaches=function(){return this.queryScrollEls().map((function(t){return t===window?new x(!1):new v(t,!1)}))},k.prototype.queryScrollEls=function(){for(var t=[],e=0,i=this.scrollQuery;e<i.length;e++){var n=i[e];"object"==typeof n?t.push(n):t.push.apply(t,Array.prototype.slice.call(document.querySelectorAll(n)))}return t},k);function k(){var t=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){var e,i;t.isAnimating&&((e=t.computeBestEdge(t.pointerScreenX+window.pageXOffset,t.pointerScreenY+window.pageYOffset))?(i=S(),t.handleSide(e,(i-t.msSinceRequest)/1e3),t.requestAnimation(i)):t.isAnimating=!1)}}var _,T=(n(D,_=e.ElementDragging),D.prototype.destroy=function(){this.pointer.destroy()},D.prototype.startDelay=function(t){var e=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){e.delayTimeoutId=null,e.handleDelayEnd(t)}),this.delay):this.handleDelayEnd(t)},D.prototype.handleDelayEnd=function(t){this.isDelayEnded=!0,this.tryStartDrag(t)},D.prototype.handleDistanceSurpassed=function(t){this.isDistanceSurpassed=!0,this.tryStartDrag(t)},D.prototype.tryStartDrag=function(t){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(t.pageX,t.pageY),this.emitter.trigger("dragstart",t),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},D.prototype.tryStopDrag=function(t){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,t))},D.prototype.stopDrag=function(t){this.isDragging=!1,this.emitter.trigger("dragend",t)},D.prototype.setIgnoreMove=function(t){this.pointer.shouldIgnoreMove=t},D.prototype.setMirrorIsVisible=function(t){this.mirror.setIsVisible(t)},D.prototype.setMirrorNeedsRevert=function(t){this.mirrorNeedsRevert=t},D.prototype.setAutoScrollEnabled=function(t){this.autoScroller.isEnabled=t},D);function D(t){var i=_.call(this,t)||this;i.delay=null,i.minDistance=0,i.touchScrollAllowed=!0,i.mirrorNeedsRevert=!1,i.isInteracting=!1,i.isDragging=!1,i.isDelayEnded=!1,i.isDistanceSurpassed=!1,i.delayTimeoutId=null,i.onPointerDown=function(t){i.isDragging||(i.isInteracting=!0,i.isDelayEnded=!1,i.isDistanceSurpassed=!1,e.preventSelection(document.body),e.preventContextMenu(document.body),t.isTouch||t.origEvent.preventDefault(),i.emitter.trigger("pointerdown",t),i.pointer.shouldIgnoreMove||(i.mirror.setIsVisible(!1),i.mirror.start(t.subjectEl,t.pageX,t.pageY),i.startDelay(t),i.minDistance||i.handleDistanceSurpassed(t)))},i.onPointerMove=function(t){var e,n,o;i.isInteracting&&(i.emitter.trigger("pointermove",t),i.isDistanceSurpassed||(e=i.minDistance)*e<=(n=t.deltaX)*n+(o=t.deltaY)*o&&i.handleDistanceSurpassed(t),i.isDragging&&("scroll"!==t.origEvent.type&&(i.mirror.handleMove(t.pageX,t.pageY),i.autoScroller.handleMove(t.pageX,t.pageY)),i.emitter.trigger("dragmove",t)))},i.onPointerUp=function(t){i.isInteracting&&(i.isInteracting=!1,e.allowSelection(document.body),e.allowContextMenu(document.body),i.emitter.trigger("pointerup",t),i.isDragging&&(i.autoScroller.stop(),i.tryStopDrag(t)),i.delayTimeoutId&&(clearTimeout(i.delayTimeoutId),i.delayTimeoutId=null))};var n=i.pointer=new l(t);return n.emitter.on("pointerdown",i.onPointerDown),n.emitter.on("pointermove",i.onPointerMove),n.emitter.on("pointerup",i.onPointerUp),i.mirror=new h,i.autoScroller=new C,i}var E=(A.prototype.destroy=function(){for(var t=0,e=this.scrollCaches;t<e.length;t++)e[t].destroy()},A.prototype.computeLeft=function(){for(var t=this.origRect.left,e=0,i=this.scrollCaches;e<i.length;e++){var n=i[e];t+=n.origScrollLeft-n.getScrollLeft()}return t},A.prototype.computeTop=function(){for(var t=this.origRect.top,e=0,i=this.scrollCaches;e<i.length;e++){var n=i[e];t+=n.origScrollTop-n.getScrollTop()}return t},A.prototype.isWithinClipping=function(t,i){for(var n,o={left:t,top:i},r=0,s=this.scrollCaches;r<s.length;r++){var a=s[r];if("HTML"!==(n=a.getEventTarget().tagName)&&"BODY"!==n&&!e.pointInsideRect(o,a.clientRect))return!1}return!0},A);function A(t){this.origRect=e.computeRect(t),this.scrollCaches=e.getClippingParents(t).map((function(t){return new v(t,!0)}))}var I=(P.prototype.processFirstCoord=function(t){var i,n={left:t.pageX,top:t.pageY},o=n,r=t.subjectEl;r!==document&&(i=e.computeRect(r),o=e.constrainPoint(o,i));var s,a=this.initialHit=this.queryHitForOffset(o.left,o.top);a?(this.useSubjectCenter&&i&&(s=e.intersectRects(i,a.rect))&&(o=e.getRectCenter(s)),this.coordAdjust=e.diffPoints(o,n)):this.coordAdjust={left:0,top:0}},P.prototype.handleMove=function(t,e){var i=this.queryHitForOffset(t.pageX+this.coordAdjust.left,t.pageY+this.coordAdjust.top);!e&&M(this.movingHit,i)||(this.movingHit=i,this.emitter.trigger("hitupdate",i,!1,t))},P.prototype.prepareHits=function(){this.offsetTrackers=e.mapHash(this.droppableStore,(function(t){return t.component.buildPositionCaches(),new E(t.el)}))},P.prototype.releaseHits=function(){var t=this.offsetTrackers;for(var e in t)t[e].destroy();this.offsetTrackers={}},P.prototype.queryHitForOffset=function(t,i){var n=this.droppableStore,o=this.offsetTrackers,r=null;for(var s in n){var a,l,c,d,h,u,p,f,g=n[s].component,m=o[s];m.isWithinClipping(t,i)&&(c=t-(a=m.computeLeft()),d=i-(l=m.computeTop()),u=(h=m.origRect).right-h.left,p=h.bottom-h.top,0<=c&&c<u&&0<=d&&d<p&&(!(f=g.queryHit(c,d,u,p))||g.props.dateProfile&&!e.rangeContainsRange(g.props.dateProfile.activeRange,f.dateSpan.range)||r&&!(f.layer>r.layer)||(f.rect.left+=a,f.rect.right+=a,f.rect.top+=l,f.rect.bottom+=l,r=f)))}return r},P);function P(t,i){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(t){var e=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(t),n.initialHit||!n.requireInitial?(e.setIgnoreMove(!1),n.emitter.trigger("pointerdown",t)):e.setIgnoreMove(!0)},this.handleDragStart=function(t){n.emitter.trigger("dragstart",t),n.handleMove(t,!0)},this.handleDragMove=function(t){n.emitter.trigger("dragmove",t),n.handleMove(t)},this.handlePointerUp=function(t){n.releaseHits(),n.emitter.trigger("pointerup",t)},this.handleDragEnd=function(t){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,t),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",t)},this.droppableStore=i,t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragstart",this.handleDragStart),t.emitter.on("dragmove",this.handleDragMove),t.emitter.on("pointerup",this.handlePointerUp),t.emitter.on("dragend",this.handleDragEnd),this.dragging=t,this.emitter=new e.EmitterMixin}function M(t,i){return!t&&!i||Boolean(t)===Boolean(i)&&e.isDateSpansEqual(t.dateSpan,i.dateSpan)}var L,R=(n(O,L=e.Interaction),O.prototype.destroy=function(){this.dragging.destroy()},O);function O(t){var i=L.call(this,t)||this;i.handlePointerDown=function(t){var e=i.dragging;e.setIgnoreMove(!i.component.isValidDateDownEl(e.pointer.downEl))},i.handleDragEnd=function(t){var e,n,o,r=i.component.context,s=r.calendar,a=r.view;i.dragging.pointer.wasTouchScroll||(n=(e=i.hitDragging).initialHit,o=e.finalHit,n&&o&&M(n,o)&&s.triggerDateClick(n.dateSpan,n.dayEl,a,t.origEvent))};var n=t.component;i.dragging=new T(n.el),i.dragging.autoScroller.isEnabled=!1;var o=i.hitDragging=new I(i.dragging,e.interactionSettingsToStore(t));return o.emitter.on("pointerdown",i.handlePointerDown),o.emitter.on("dragend",i.handleDragEnd),i}var F,N=(n(H,F=e.Interaction),H.prototype.destroy=function(){this.dragging.destroy()},H);function H(t){var i=F.call(this,t)||this;i.dragSelection=null,i.handlePointerDown=function(t){var e=i.component,n=i.dragging,o=e.context.options.selectable&&e.isValidDateDownEl(t.origEvent.target);n.setIgnoreMove(!o),n.delay=t.isTouch?function(t){var e=t.context.options,i=e.selectLongPressDelay;return null==i&&(i=e.longPressDelay),i}(e):null},i.handleDragStart=function(t){i.component.context.calendar.unselect(t)},i.handleHitUpdate=function(t,n){var r=i.component.context.calendar,s=null,a=!1;t&&((s=function(t,i,n){var r=t.dateSpan,s=i.dateSpan,a=[r.range.start,r.range.end,s.range.start,s.range.end];a.sort(e.compareNumbers);for(var l={},c=0,d=n;c<d.length;c++){var h=(0,d[c])(t,i);if(!1===h)return null;h&&o(l,h)}return l.range={start:a[0],end:a[3]},l.allDay=r.allDay,l}(i.hitDragging.initialHit,t,r.pluginSystem.hooks.dateSelectionTransformers))&&i.component.isDateSelectionValid(s)||(a=!0,s=null)),s?r.dispatch({type:"SELECT_DATES",selection:s}):n||r.dispatch({type:"UNSELECT_DATES"}),a?e.disableCursor():e.enableCursor(),n||(i.dragSelection=s)},i.handlePointerUp=function(t){i.dragSelection&&(i.component.context.calendar.triggerDateSelect(i.dragSelection,t),i.dragSelection=null)};var n=t.component,r=n.context.options,s=i.dragging=new T(n.el);s.touchScrollAllowed=!1,s.minDistance=r.selectMinDistance||0,s.autoScroller.isEnabled=r.dragScroll;var a=i.hitDragging=new I(i.dragging,e.interactionSettingsToStore(t));return a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),i}var z,B=(n($,z=e.Interaction),$.prototype.destroy=function(){this.dragging.destroy()},$.prototype.displayDrag=function(t,i){var n=this.component.context.calendar,o=this.receivingCalendar;o&&o!==t&&(o===n?o.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:i.affectedEvents,mutatedEvents:e.createEmptyEventStore(),isEvent:!0,origSeg:i.origSeg}}):o.dispatch({type:"UNSET_EVENT_DRAG"})),t&&t.dispatch({type:"SET_EVENT_DRAG",state:i})},$.prototype.clearDrag=function(){var t=this.component.context.calendar,e=this.receivingCalendar;e&&e.dispatch({type:"UNSET_EVENT_DRAG"}),t!==e&&t.dispatch({type:"UNSET_EVENT_DRAG"})},$.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingCalendar=null,this.validMutation=null,this.mutatedRelevantEvents=null},$.SELECTOR=".fc-draggable, .fc-resizable",$);function $(t){var i=z.call(this,t)||this;i.subjectSeg=null,i.isDragging=!1,i.eventRange=null,i.relevantEvents=null,i.receivingCalendar=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(t){var n=t.origEvent.target,o=i.component,r=i.dragging,s=r.mirror,a=o.context.options,l=o.context.calendar,c=i.subjectSeg=e.getElSeg(t.subjectEl),d=(i.eventRange=c.eventRange).instance.instanceId;i.relevantEvents=e.getRelevantEvents(l.state.eventStore,d),r.minDistance=t.isTouch?0:a.eventDragMinDistance,r.delay=t.isTouch&&d!==o.props.eventSelection?function(t){var e=t.context.options,i=e.eventLongPressDelay;return null==i&&(i=e.longPressDelay),i}(o):null,s.parentNode=l.el,s.revertDuration=a.dragRevertDuration;var h=o.isValidSegDownEl(n)&&!e.elementClosest(n,".fc-resizer");r.setIgnoreMove(!h),i.isDragging=h&&t.subjectEl.classList.contains("fc-draggable")},i.handleDragStart=function(t){var n=i.component.context,o=n.calendar,r=i.eventRange,s=r.instance.instanceId;t.isTouch?s!==i.component.props.eventSelection&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:s}):o.dispatch({type:"UNSELECT_EVENT"}),i.isDragging&&(o.unselect(t),o.publiclyTrigger("eventDragStart",[{el:i.subjectSeg.el,event:new e.EventApi(o,r.def,r.instance),jsEvent:t.origEvent,view:n.view}]))},i.handleHitUpdate=function(t,n){var o,r,s,a,l,c,d,h,u,p;i.isDragging&&(o=i.relevantEvents,r=i.hitDragging.initialHit,s=i.component.context.calendar,l=a=u=null,c=!1,d={affectedEvents:o,mutatedEvents:e.createEmptyEventStore(),isEvent:!0,origSeg:i.subjectSeg},t&&(u=(h=t.component).context.calendar,p=h.context.options,s===u||p.editable&&p.droppable?(a=function(t,i,n){var o=t.dateSpan,r=i.dateSpan,s=o.range.start,a=r.range.start,l={};o.allDay!==r.allDay&&(l.allDay=r.allDay,l.hasEnd=i.component.context.options.allDayMaintainDuration,r.allDay&&(s=e.startOfDay(s)));var c=e.diffDates(s,a,t.component.context.dateEnv,t.component===i.component?t.component.largeUnit:null);c.milliseconds&&(l.allDay=!1);for(var d={datesDelta:c,standardProps:l},h=0,u=n;h<u.length;h++)(0,u[h])(d,t,i);return d}(r,t,u.pluginSystem.hooks.eventDragMutationMassagers))&&(l=e.applyMutationToEventStore(o,u.eventUiBases,a,u),d.mutatedEvents=l,h.isInteractionValid(d)||(c=!0,l=a=null,d.mutatedEvents=e.createEmptyEventStore())):u=null),i.displayDrag(u,d),c?e.disableCursor():e.enableCursor(),n||(s===u&&M(r,t)&&(a=null),i.dragging.setMirrorNeedsRevert(!a),i.dragging.setMirrorIsVisible(!t||!document.querySelector(".fc-mirror")),i.receivingCalendar=u,i.validMutation=a,i.mutatedRelevantEvents=l))},i.handlePointerUp=function(){i.isDragging||i.cleanup()},i.handleDragEnd=function(t){if(i.isDragging){var n,r=i.component.context,s=r.calendar,a=r.view,l=i.receivingCalendar,c=i.validMutation,d=i.eventRange.def,h=i.eventRange.instance,u=new e.EventApi(s,d,h),p=i.relevantEvents,f=i.mutatedRelevantEvents,g=i.hitDragging.finalHit;if(i.clearDrag(),s.publiclyTrigger("eventDragStop",[{el:i.subjectSeg.el,event:u,jsEvent:t.origEvent,view:a}]),c)if(l===s){s.dispatch({type:"MERGE_EVENTS",eventStore:f});for(var m={},v=0,y=s.pluginSystem.hooks.eventDropTransformers;v<y.length;v++){var b=y[v];o(m,b(c,s))}var x=o({},m,{el:t.subjectEl,delta:c.datesDelta,oldEvent:u,event:new e.EventApi(s,f.defs[d.defId],h?f.instances[h.instanceId]:null),revert:function(){s.dispatch({type:"MERGE_EVENTS",eventStore:p})},jsEvent:t.origEvent,view:a});s.publiclyTrigger("eventDrop",[x])}else l&&(s.publiclyTrigger("eventLeave",[{draggedEl:t.subjectEl,event:u,view:a}]),s.dispatch({type:"REMOVE_EVENT_INSTANCES",instances:i.mutatedRelevantEvents.instances}),l.dispatch({type:"MERGE_EVENTS",eventStore:i.mutatedRelevantEvents}),t.isTouch&&l.dispatch({type:"SELECT_EVENT",eventInstanceId:h.instanceId}),n=o({},l.buildDatePointApi(g.dateSpan),{draggedEl:t.subjectEl,jsEvent:t.origEvent,view:g.component}),l.publiclyTrigger("drop",[n]),l.publiclyTrigger("eventReceive",[{draggedEl:t.subjectEl,event:new e.EventApi(l,f.defs[d.defId],f.instances[h.instanceId]),view:g.component}]));else s.publiclyTrigger("_noEventDrop")}i.cleanup()};var n=i.component,r=n.context.options,s=i.dragging=new T(n.el);s.pointer.selector=$.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=r.dragScroll;var a=i.hitDragging=new I(i.dragging,e.interactionSettingsStore);return a.useSubjectCenter=t.useEventCenter,a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),a.emitter.on("dragend",i.handleDragEnd),i}var j,W=(n(Y,j=e.Interaction),Y.prototype.destroy=function(){this.dragging.destroy()},Y.prototype.querySeg=function(t){return e.getElSeg(e.elementClosest(t.subjectEl,this.component.fgSegSelector))},Y);function Y(t){var i=j.call(this,t)||this;i.draggingSeg=null,i.eventRange=null,i.relevantEvents=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(t){var e=i.component,n=i.querySeg(t),o=i.eventRange=n.eventRange;i.dragging.minDistance=e.context.options.eventDragMinDistance,i.dragging.setIgnoreMove(!i.component.isValidSegDownEl(t.origEvent.target)||t.isTouch&&i.component.props.eventSelection!==o.instance.instanceId)},i.handleDragStart=function(t){var n=i.component.context,o=n.calendar,r=n.view,s=i.eventRange;i.relevantEvents=e.getRelevantEvents(o.state.eventStore,i.eventRange.instance.instanceId),i.draggingSeg=i.querySeg(t),o.unselect(),o.publiclyTrigger("eventResizeStart",[{el:i.draggingSeg.el,event:new e.EventApi(o,s.def,s.instance),jsEvent:t.origEvent,view:r}])},i.handleHitUpdate=function(t,n,r){var s=i.component.context.calendar,a=i.relevantEvents,l=i.hitDragging.initialHit,c=i.eventRange.instance,d=null,h=null,u=!1,p={affectedEvents:a,mutatedEvents:e.createEmptyEventStore(),isEvent:!0,origSeg:i.draggingSeg};t&&(d=function(t,i,n,r,s){for(var a=t.component.context.dateEnv,l=t.dateSpan.range.start,c=i.dateSpan.range.start,d=e.diffDates(l,c,a,t.component.largeUnit),h={},u=0,p=s;u<p.length;u++){var f=(0,p[u])(t,i);if(!1===f)return null;f&&o(h,f)}if(n){if(a.add(r.start,d)<r.end)return h.startDelta=d,h}else if(a.add(r.end,d)>r.start)return h.endDelta=d,h;return null}(l,t,r.subjectEl.classList.contains("fc-start-resizer"),c.range,s.pluginSystem.hooks.eventResizeJoinTransforms)),d&&(h=e.applyMutationToEventStore(a,s.eventUiBases,d,s),p.mutatedEvents=h,i.component.isInteractionValid(p)||(u=!0,h=d=null,p.mutatedEvents=null)),h?s.dispatch({type:"SET_EVENT_RESIZE",state:p}):s.dispatch({type:"UNSET_EVENT_RESIZE"}),u?e.disableCursor():e.enableCursor(),n||(d&&M(l,t)&&(d=null),i.validMutation=d,i.mutatedRelevantEvents=h)},i.handleDragEnd=function(t){var n=i.component.context,o=n.calendar,r=n.view,s=i.eventRange.def,a=i.eventRange.instance,l=new e.EventApi(o,s,a),c=i.relevantEvents,d=i.mutatedRelevantEvents;o.publiclyTrigger("eventResizeStop",[{el:i.draggingSeg.el,event:l,jsEvent:t.origEvent,view:r}]),i.validMutation?(o.dispatch({type:"MERGE_EVENTS",eventStore:d}),o.publiclyTrigger("eventResize",[{el:i.draggingSeg.el,startDelta:i.validMutation.startDelta||e.createDuration(0),endDelta:i.validMutation.endDelta||e.createDuration(0),prevEvent:l,event:new e.EventApi(o,d.defs[s.defId],a?d.instances[a.instanceId]:null),revert:function(){o.dispatch({type:"MERGE_EVENTS",eventStore:c})},jsEvent:t.origEvent,view:r}])):o.publiclyTrigger("_noEventResize"),i.draggingSeg=null,i.relevantEvents=null,i.validMutation=null};var n=t.component,r=i.dragging=new T(n.el);r.pointer.selector=".fc-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;var s=i.hitDragging=new I(i.dragging,e.interactionSettingsToStore(t));return s.emitter.on("pointerdown",i.handlePointerDown),s.emitter.on("dragstart",i.handleDragStart),s.emitter.on("hitupdate",i.handleHitUpdate),s.emitter.on("dragend",i.handleDragEnd),i}var X=(V.prototype.destroy=function(){this.calendar.off("select",this.onSelect),this.documentPointer.destroy()},V);function V(t){var i=this;this.isRecentPointerDateSelect=!1,this.onSelect=function(t){t.jsEvent&&(i.isRecentPointerDateSelect=!0)},this.onDocumentPointerUp=function(t){var n,o,r=i.calendar,s=i.documentPointer,a=r.state;s.wasTouchScroll||(a.dateSelection&&!i.isRecentPointerDateSelect&&(n=r.viewOpt("unselectAuto"),o=r.viewOpt("unselectCancel"),!n||n&&e.elementClosest(s.downEl,o)||r.unselect(t)),a.eventSelection&&!e.elementClosest(s.downEl,B.SELECTOR)&&r.dispatch({type:"UNSELECT_EVENT"})),i.isRecentPointerDateSelect=!1},this.calendar=t;var n=this.documentPointer=new l(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerup",this.onDocumentPointerUp),t.on("select",this.onSelect)}var q=(U.prototype.buildDragMeta=function(t){return"object"==typeof this.suppliedDragMeta?e.parseDragMeta(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?e.parseDragMeta(this.suppliedDragMeta(t)):(i=function(t){var i=e.config.dataAttrPrefix,n=(i?i+"-":"")+"event";return t.getAttribute("data-"+n)||""}(t),n=i?JSON.parse(i):{create:!1},e.parseDragMeta(n));var i,n},U.prototype.displayDrag=function(t,e){var i=this.receivingCalendar;i&&i!==t&&i.dispatch({type:"UNSET_EVENT_DRAG"}),t&&t.dispatch({type:"SET_EVENT_DRAG",state:e})},U.prototype.clearDrag=function(){this.receivingCalendar&&this.receivingCalendar.dispatch({type:"UNSET_EVENT_DRAG"})},U.prototype.canDropElOnCalendar=function(t,i){var n=i.opt("dropAccept");return"function"==typeof n?n(t):"string"!=typeof n||!n||Boolean(e.elementMatches(t,n))},U);function U(t,i){var n=this;this.receivingCalendar=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(t){n.dragMeta=n.buildDragMeta(t.subjectEl)},this.handleHitUpdate=function(t,i,r){var s=n.hitDragging.dragging,a=null,l=null,c=!1,d={affectedEvents:e.createEmptyEventStore(),mutatedEvents:e.createEmptyEventStore(),isEvent:n.dragMeta.create,origSeg:null};t&&(a=t.component.context.calendar,n.canDropElOnCalendar(r.subjectEl,a)&&(l=function(t,i,n){for(var r=o({},i.leftoverProps),s=0,a=n.pluginSystem.hooks.externalDefTransforms;s<a.length;s++){var l=a[s];o(r,l(t,i))}var c=e.parseEventDef(r,i.sourceId,t.allDay,n.opt("forceEventDuration")||Boolean(i.duration),n),d=t.range.start;t.allDay&&i.startTime&&(d=n.dateEnv.add(d,i.startTime));var h=i.duration?n.dateEnv.add(d,i.duration):n.getDefaultEventEnd(t.allDay,d);return{def:c,instance:e.createEventInstance(c.defId,{start:d,end:h})}}(t.dateSpan,n.dragMeta,a),d.mutatedEvents=e.eventTupleToStore(l),(c=!e.isInteractionValid(d,a))&&(d.mutatedEvents=e.createEmptyEventStore(),l=null))),n.displayDrag(a,d),s.setMirrorIsVisible(i||!l||!document.querySelector(".fc-mirror")),c?e.disableCursor():e.enableCursor(),i||(s.setMirrorNeedsRevert(!l),n.receivingCalendar=a,n.droppableEvent=l)},this.handleDragEnd=function(t){var i,r,s,a,l=n.receivingCalendar,c=n.droppableEvent;n.clearDrag(),l&&c&&(r=(i=n.hitDragging.finalHit).component.context.view,s=n.dragMeta,a=o({},l.buildDatePointApi(i.dateSpan),{draggedEl:t.subjectEl,jsEvent:t.origEvent,view:r}),l.publiclyTrigger("drop",[a]),s.create&&(l.dispatch({type:"MERGE_EVENTS",eventStore:e.eventTupleToStore(c)}),t.isTouch&&l.dispatch({type:"SELECT_EVENT",eventInstanceId:c.instance.instanceId}),l.publiclyTrigger("eventReceive",[{draggedEl:t.subjectEl,event:new e.EventApi(l,c.def,c.instance),view:r}]))),n.receivingCalendar=null,n.droppableEvent=null};var r=this.hitDragging=new I(t,e.interactionSettingsStore);r.requireInitial=!1,r.emitter.on("dragstart",this.handleDragStart),r.emitter.on("hitupdate",this.handleHitUpdate),r.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=i}e.config.dataAttrPrefix="";var G=(Z.prototype.destroy=function(){this.dragging.destroy()},Z);function Z(t,i){var n=this;void 0===i&&(i={}),this.handlePointerDown=function(t){var i=n.dragging,o=n.settings,r=o.minDistance,s=o.longPressDelay;i.minDistance=null!=r?r:t.isTouch?0:e.globalDefaults.eventDragMinDistance,i.delay=t.isTouch?null!=s?s:e.globalDefaults.longPressDelay:0},this.handleDragStart=function(t){t.isTouch&&n.dragging.delay&&t.subjectEl.classList.contains("fc-event")&&n.dragging.mirror.getMirrorEl().classList.add("fc-selected")},this.settings=i;var o=this.dragging=new T(t);o.touchScrollAllowed=!1,null!=i.itemSelector&&(o.pointer.selector=i.itemSelector),null!=i.appendTo&&(o.mirror.parentNode=i.appendTo),o.emitter.on("pointerdown",this.handlePointerDown),o.emitter.on("dragstart",this.handleDragStart),new q(o,i.eventData)}var K,Q=(n(J,K=e.ElementDragging),J.prototype.destroy=function(){this.pointer.destroy()},J.prototype.setIgnoreMove=function(t){this.shouldIgnoreMove=t},J.prototype.setMirrorIsVisible=function(t){var e;t?this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null):(e=this.mirrorSelector?document.querySelector(this.mirrorSelector):null)&&((this.currentMirrorEl=e).style.visibility="hidden")},J);function J(t){var e=K.call(this,t)||this;e.shouldIgnoreMove=!1,e.mirrorSelector="",e.currentMirrorEl=null,e.handlePointerDown=function(t){e.emitter.trigger("pointerdown",t),e.shouldIgnoreMove||e.emitter.trigger("dragstart",t)},e.handlePointerMove=function(t){e.shouldIgnoreMove||e.emitter.trigger("dragmove",t)},e.handlePointerUp=function(t){e.emitter.trigger("pointerup",t),e.shouldIgnoreMove||e.emitter.trigger("dragend",t)};var i=e.pointer=new l(t);return i.emitter.on("pointerdown",e.handlePointerDown),i.emitter.on("pointermove",e.handlePointerMove),i.emitter.on("pointerup",e.handlePointerUp),e}var tt=(et.prototype.destroy=function(){this.dragging.destroy()},et);function et(t,e){var i=document;e=t===document||t instanceof Element?(i=t,e||{}):t||{};var n=this.dragging=new Q(i);"string"==typeof e.itemSelector?n.pointer.selector=e.itemSelector:i===document&&(n.pointer.selector="[data-event]"),"string"==typeof e.mirrorSelector&&(n.mirrorSelector=e.mirrorSelector),new q(n,e.eventData)}var it=e.createPlugin({componentInteractions:[R,N,B,W],calendarInteractions:[X],elementDraggingImpl:T});t.Draggable=G,t.FeaturefulElementDragging=T,t.PointerDragging=l,t.ThirdPartyDraggable=tt,t.default=it,Object.defineProperty(t,"__esModule",{value:!0})})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],e):e((t=t||self).FullCalendarBootstrap={},t.FullCalendar)}(this,(function(t,e){"use strict";var i,n,o,r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},s=(i=e.Theme,r(n=l,o=i),n.prototype=null===o?Object.create(o):(a.prototype=o.prototype,new a),l);function a(){this.constructor=n}function l(){return null!==i&&i.apply(this,arguments)||this}s.prototype.classes={widget:"fc-bootstrap",tableGrid:"table-bordered",tableList:"table",tableListHeading:"table-active",buttonGroup:"btn-group",button:"btn btn-default",buttonActive:"active",today:"alert alert-info",popover:"card card-primary",popoverHeader:"card-header",popoverContent:"card-body",headerRow:"table-bordered",dayRow:"table-bordered",listView:"card card-primary"},s.prototype.baseIconClass="fal",s.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},s.prototype.iconOverrideOption="bootstrapFontAwesome",s.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",s.prototype.iconOverridePrefix="fa-";var c=e.createPlugin({themeClasses:{bootstrap:s}});t.BootstrapTheme=s,t.default=c,Object.defineProperty(t,"__esModule",{value:!0})})),function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?n(Object(o),!0).forEach((function(e){i(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function s(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(t){if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(t,e):void 0}}(t))){var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}var a,l=86400,c=function(t,e){if(null===t)return null;if("number"!=typeof e.step)return t;var i=t%(60*e.step);return(i-=(e.minTime||0)%(60*e.step))>=30*e.step?t+=60*e.step-i:t-=i,function(t,e){return t==l&&e.show2400?t:t%l}(t,e)},d={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,lang:{},maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:c,scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0},h={am:"am",pm:"pm",AM:"AM",PM:"PM",decimal:".",mins:"mins",hr:"hr",hrs:"hrs"},u=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=t.extractAttrOptions(e,Object.keys(d));this.settings=this.parseSettings(o(o(o({},d),i),n))}var i,n,r;return i=t,r=[{key:"extractAttrOptions",value:function(t,e){var i,n={},o=s(e);try{for(o.s();!(i=o.n()).done;){var r=i.value;r in t.dataset&&(n[r]=t.dataset[r])}}catch(t){o.e(t)}finally{o.f()}return n}}],(n=[{key:"time2int",value:function(t){if(""===t||null==t)return null;if(t instanceof Date)return 3600*t.getHours()+60*t.getMinutes()+t.getSeconds();if("string"!=typeof t)return t;"a"!=(t=t.toLowerCase().replace(/[\s\.]/g,"")).slice(-1)&&"p"!=t.slice(-1)||(t+="m");var e=t.match(/^(([^0-9]*))?([0-9]?[0-9])(\W?([0-5][0-9]))?(\W+([0-5][0-9]))?(([^0-9]*))$/);if(!e)return null;var i=parseInt(1*e[3],10),n=e[2]||e[9],o=i,r=1*e[5]||0,s=1*e[7]||0;if(i<=12&&n){var a=(n=n.trim())==this.settings.lang.pm||n==this.settings.lang.PM;o=12==i?a?12:0:i+(a?12:0)}else if(3600*i+60*r+s>=l+(this.settings.show2400?1:0)){if(!1===this.settings.wrapHours)return null;o=i%24}var c=3600*o+60*r+s;if(i<12&&!n&&this.settings._twelveHourTime&&this.settings.scrollDefault){var d=c-this.settings.scrollDefault();d<0&&d>=-43200&&(c=(c+43200)%l)}return c}},{key:"parseSettings",value:function(t){var e=this;if(t.lang=o(o({},h),t.lang),this.settings=t,t.minTime&&(t.minTime=this.time2int(t.minTime)),t.maxTime&&(t.maxTime=this.time2int(t.maxTime)),t.durationTime&&"function"!=typeof t.durationTime&&(t.durationTime=this.time2int(t.durationTime)),"now"==t.scrollDefault)t.scrollDefault=function(){return t.roundingFunction(e.time2int(new Date),t)};else if(t.scrollDefault&&"function"!=typeof t.scrollDefault){var i=t.scrollDefault;t.scrollDefault=function(){return t.roundingFunction(e.time2int(i),t)}}else t.minTime&&(t.scrollDefault=function(){return t.roundingFunction(t.minTime,t)});if("string"==typeof t.timeFormat&&t.timeFormat.match(/[gh]/)&&(t._twelveHourTime=!0),!1===t.showOnFocus&&-1!=t.showOn.indexOf("focus")&&t.showOn.splice(t.showOn.indexOf("focus"),1),t.disableTimeRanges||(t.disableTimeRanges=[]),t.disableTimeRanges.length>0){for(var n in t.disableTimeRanges)t.disableTimeRanges[n]=[this.time2int(t.disableTimeRanges[n][0]),this.time2int(t.disableTimeRanges[n][1])];for(t.disableTimeRanges=t.disableTimeRanges.sort((function(t,e){return t[0]-e[0]})),n=t.disableTimeRanges.length-1;n>0;n--)t.disableTimeRanges[n][0]<=t.disableTimeRanges[n-1][1]&&(t.disableTimeRanges[n-1]=[Math.min(t.disableTimeRanges[n][0],t.disableTimeRanges[n-1][0]),Math.max(t.disableTimeRanges[n][1],t.disableTimeRanges[n-1][1])],t.disableTimeRanges.splice(n,1))}return t}}])&&e(i.prototype,n),r&&e(i,r),t}();a=function(e){var i={},n={init:function(t){return this.each((function(){var o=e(this),s=new u(this,t),a=s.settings;if(i=a.lang,o.data("timepicker-settings",a),o.data("timepicker-obj",s),o.addClass("ui-timepicker-input"),a.useSelect)r(o);else{if(o.prop("autocomplete","off"),a.showOn)for(var l in a.showOn)o.on(a.showOn[l]+".timepicker",n.show);o.on("change.timepicker",g),o.on("keydown.timepicker",b),o.on("keyup.timepicker",x),a.disableTextInput&&o.on("keydown.timepicker",y),o.on("cut.timepicker",x),o.on("paste.timepicker",x),g.call(o.get(0),null,"initial")}}))},show:function(t){var i=e(this),s=i.data("timepicker-settings"),a=i.data("timepicker-obj");if(t&&t.preventDefault(),s.useSelect)i.data("timepicker-list").focus();else{h(i)&&i.blur();var l=i.data("timepicker-list");if(!i.prop("readonly")&&(l&&0!==l.length&&"function"!=typeof s.durationTime||(r(i),l=i.data("timepicker-list")),!o(l))){i.data("ui-timepicker-value",i.val()),f(i,l),n.hide(),"number"==typeof s.listWidth&&(console.log(s.listWidth),l.width(i.outerWidth()*s.listWidth)),l.show();var c={};s.orientation.match(/r/)?c.left=i.offset().left+i.outerWidth()-l.outerWidth()+parseInt(l.css("marginLeft").replace("px",""),10):s.orientation.match(/l/)?c.left=i.offset().left+parseInt(l.css("marginLeft").replace("px",""),10):s.orientation.match(/c/)&&(c.left=i.offset().left+(i.outerWidth()-l.outerWidth())/2+parseInt(l.css("marginLeft").replace("px",""),10)),"t"==(s.orientation.match(/t/)?"t":s.orientation.match(/b/)?"b":i.offset().top+i.outerHeight(!0)+l.outerHeight()>e(window).height()+e(window).scrollTop()?"t":"b")?(l.addClass("ui-timepicker-positioned-top"),c.top=i.offset().top-l.outerHeight()+parseInt(l.css("marginTop").replace("px",""),10)):(l.removeClass("ui-timepicker-positioned-top"),c.top=i.offset().top+i.outerHeight()+parseInt(l.css("marginTop").replace("px",""),10)),l.offset(c);var u=l.find(".ui-timepicker-selected");if(!u.length){var g=a.time2int(m(i));null!==g?u=p(i,l,g):s.scrollDefault&&(u=p(i,l,s.scrollDefault()))}if(u.length&&!u.hasClass("ui-timepicker-disabled")||(u=l.find("li:not(.ui-timepicker-disabled):first")),u&&u.length){var v=l.scrollTop()+u.position().top-u.outerHeight();l.scrollTop(v)}else l.scrollTop(0);return s.stopScrollPropagation&&e(document).on("wheel.ui-timepicker",".ui-timepicker-wrapper",(function(t){t.preventDefault();var i=e(this).scrollTop();e(this).scrollTop(i+t.originalEvent.deltaY)})),e(document).on("touchstart.ui-timepicker mousedown.ui-timepicker",d),e(window).on("resize.ui-timepicker",d),s.closeOnWindowScroll&&e(document).on("scroll.ui-timepicker",d),i.trigger("showTimepicker"),this}}},hide:function(t){var i=e(this),n=i.data("timepicker-settings");return n&&n.useSelect&&i.blur(),e(".ui-timepicker-wrapper").each((function(){var t=e(this);if(o(t)){var i=t.data("timepicker-input"),n=i.data("timepicker-settings");n&&n.selectOnBlur&&w(i),t.hide(),i.trigger("hideTimepicker")}})),this},option:function(i,n){return"string"==typeof i&&void 0===n?e(this).data("timepicker-settings")[i]:this.each((function(){var o=e(this),s=o.data("timepicker-settings"),a=o.data("timepicker-obj"),l=o.data("timepicker-list");"object"==t(i)?s=e.extend(s,i):"string"==typeof i&&(s[i]=n),s=a.parseSettings(s),o.data("timepicker-settings",s),g.call(o.get(0),{type:"change"},"initial"),l&&(l.remove(),o.data("timepicker-list",!1)),s.useSelect&&r(o)}))},getSecondsFromMidnight:function(){return e(this).data("timepicker-obj").time2int(m(this))},getTime:function(t){var i=e(this),n=i.data("timepicker-obj"),o=m(i);if(!o)return null;var r=n.time2int(o);if(null===r)return null;t||(t=new Date);var s=new Date(t);return s.setHours(r/3600),s.setMinutes(r%3600/60),s.setSeconds(r%60),s.setMilliseconds(0),s},isVisible:function(){var t=this.data("timepicker-list");return!(!t||!o(t))},setTime:function(t){var e=this,i=e.data("timepicker-settings"),n=e.data("timepicker-obj");if(i.forceRoundTime)var o=a(n.time2int(t),i);else o=C(n.time2int(t),i);return t&&null===o&&i.noneOption&&(o=t),v(e,o,"initial"),g.call(e.get(0),{type:"change"},"initial"),e.data("timepicker-list")&&f(e,e.data("timepicker-list")),this},remove:function(){var t=this;if(t.hasClass("ui-timepicker-input")){var e=t.data("timepicker-settings");return t.removeAttr("autocomplete","off"),t.removeClass("ui-timepicker-input"),t.removeData("timepicker-settings"),t.off(".timepicker"),t.data("timepicker-list")&&t.data("timepicker-list").remove(),e.useSelect&&t.show(),t.removeData("timepicker-list"),this}}};function o(t){var e=t[0];return e.offsetWidth>0&&e.offsetHeight>0}function r(t){var i=t.data("timepicker-settings"),o=t.data("timepicker-list"),r=t.data("timepicker-obj");if(o&&o.length&&(o.remove(),t.data("timepicker-list",!1)),i.useSelect){o=e("<select />",{class:"ui-timepicker-select"}),t.attr("name")&&o.attr("name","ui-timepicker-"+t.attr("name"));var d=o}else o=e("<ul />",{class:"ui-timepicker-list"}),(d=e("<div />",{class:"ui-timepicker-wrapper",tabindex:-1})).css({display:"none",position:"absolute"}).append(o);if(i.noneOption)if(!0===i.noneOption&&(i.noneOption=i.useSelect?"Time...":"None"),e.isArray(i.noneOption)){for(var u in i.noneOption)if(parseInt(u,10)==u){var p=s(i.noneOption[u],i.useSelect);o.append(p)}}else p=s(i.noneOption,i.useSelect),o.append(p);i.className&&d.addClass(i.className),null===i.minTime&&null===i.durationTime||!i.showDuration||("function"==typeof i.step||i.step,d.addClass("ui-timepicker-with-duration"),d.addClass("ui-timepicker-step-"+i.step));var g=i.minTime;"function"==typeof i.durationTime?g=r.time2int(i.durationTime()):null!==i.durationTime&&(g=i.durationTime);var m=null!==i.minTime?i.minTime:0,y=null!==i.maxTime?i.maxTime:m+l-1;y<m&&(y+=l),86399===y&&"string"===e.type(i.timeFormat)&&i.show2400&&(y=l);var b=i.disableTimeRanges,x=0,k=b.length,_=i.step;"function"!=typeof _&&(_=function(){return i.step}),u=m;for(var T=0;u<=y;u+=60*_(++T)){var D,E=u,A=C(E,i);if(i.useSelect?(D=e("<option />",{value:A})).text(A):((D=e("<li />")).addClass(E%l<43200?"ui-timepicker-am":"ui-timepicker-pm"),D.data("time",c(E,i)),D.text(A)),(null!==i.minTime||null!==i.durationTime)&&i.showDuration){var I=S(u-g,i.step);if(i.useSelect)D.text(D.text()+" ("+I+")");else{var P=e("<span />",{class:"ui-timepicker-duration"});P.text(" ("+I+")"),D.append(P)}}x<k&&(E>=b[x][1]&&(x+=1),b[x]&&E>=b[x][0]&&E<b[x][1]&&(i.useSelect?D.prop("disabled",!0):D.addClass("ui-timepicker-disabled"))),o.append(D)}if(d.data("timepicker-input",t),t.data("timepicker-list",d),i.useSelect)t.val()&&o.val(a(r.time2int(t.val()),i)),o.on("focus",(function(){e(this).data("timepicker-input").trigger("showTimepicker")})),o.on("blur",(function(){e(this).data("timepicker-input").trigger("hideTimepicker")})),o.on("change",(function(){v(t,e(this).val(),"select")})),v(t,o.val(),"initial"),t.hide().after(o);else{var M=i.appendTo;"string"==typeof M?M=e(M):"function"==typeof M&&(M=M(t)),M.append(d),f(t,o),o.on("mousedown click","li",(function(i){t.off("focus.timepicker"),t.on("focus.timepicker-ie-hack",(function(){t.off("focus.timepicker-ie-hack"),t.on("focus.timepicker",n.show)})),h(t)||t[0].focus(),o.find("li").removeClass("ui-timepicker-selected"),e(this).addClass("ui-timepicker-selected"),w(t)&&(t.trigger("hideTimepicker"),o.on("mouseup.timepicker click.timepicker","li",(function(t){o.off("mouseup.timepicker click.timepicker"),d.hide()})))}))}}function s(i,n){var o,r,s;return"object"==t(i)?(o=i.label,r=i.className,s=i.value):"string"==typeof i?(o=i,s=""):e.error("Invalid noneOption value"),n?e("<option />",{value:s,class:r,text:o}):e("<li />",{class:r,text:o}).data("time",String(s))}function a(t,e){if(null!==(t=e.roundingFunction(t,e)))return C(t,e)}function d(t){if(t.target!=window){var i=e(t.target);i.closest(".ui-timepicker-input").length||i.closest(".ui-timepicker-wrapper").length||(n.hide(),e(document).unbind(".ui-timepicker"),e(window).unbind(".ui-timepicker"))}}function h(t){var e=t.data("timepicker-settings");return(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&e.disableTouchKeyboard}function p(t,i,n){if(!n&&0!==n)return!1;var o=t.data("timepicker-settings"),r=!1;return n=o.roundingFunction(n,o),i.find("li").each((function(t,i){var o=e(i);if("number"==typeof o.data("time"))return o.data("time")==n?(r=o,!1):void 0})),r}function f(t,e){e.find("li").removeClass("ui-timepicker-selected");var i=t.data("timepicker-settings"),n=t.data("timepicker-obj").time2int(m(t));if(null!==n){var o=p(t,e,n);if(o){var r=o.offset().top-e.offset().top;(r+o.outerHeight()>e.outerHeight()||r<0)&&e.scrollTop(e.scrollTop()+o.position().top-o.outerHeight()),(i.forceRoundTime||o.data("time")===n)&&o.addClass("ui-timepicker-selected")}}}function g(t,i){if("timepicker"!=i){var n=e(this);if(""!==this.value){if(!n.is(":focus")||t&&"change"==t.type){var o=n.data("timepicker-settings"),r=n.data("timepicker-obj").time2int(this.value);if(null!==r){var s=!1;if(null!==o.minTime&&null!==o.maxTime&&(r<o.minTime||r>o.maxTime)&&(s=!0),e.each(o.disableTimeRanges,(function(){if(r>=this[0]&&r<this[1])return s=!0,!1})),o.forceRoundTime){var a=o.roundingFunction(r,o);a!=r&&(r=a,i=null)}var l=C(r,o);s?(v(n,l,"error")||t&&"change"==t.type)&&n.trigger("timeRangeError"):v(n,l,i)}else n.trigger("timeFormatError")}}else v(n,null,i)}}function m(t){return t.is("input")?t.val():t.data("ui-timepicker-value")}function v(t,e,i){if(t.is("input")){null===e&&""==t.val()||t.val(e);var n=t.data("timepicker-settings"),o=t.data("timepicker-obj");n.useSelect&&"select"!=i&&t.data("timepicker-list")&&t.data("timepicker-list").val(a(o.time2int(e),n))}return t.data("ui-timepicker-value")!=e?(t.data("ui-timepicker-value",e),"select"==i?t.trigger("selectTime").trigger("changeTime").trigger("change","timepicker"):-1==["error","initial"].indexOf(i)&&t.trigger("changeTime"),!0):(-1==["error","initial"].indexOf(i)&&t.trigger("selectTime"),!1)}function y(t){switch(t.keyCode){case 13:case 9:return;default:t.preventDefault()}}function b(t){var i=e(this),r=i.data("timepicker-list");if(!r||!o(r)){if(40!=t.keyCode)return!0;n.show.call(i.get(0)),r=i.data("timepicker-list"),h(i)||i.focus()}switch(t.keyCode){case 13:return w(i)&&(g.call(i.get(0),{type:"change"}),n.hide.apply(this)),t.preventDefault(),!1;case 38:var s=r.find(".ui-timepicker-selected");return s.length?s.is(":first-child")||(s.removeClass("ui-timepicker-selected"),s.prev().addClass("ui-timepicker-selected"),s.prev().position().top<s.outerHeight()&&r.scrollTop(r.scrollTop()-s.outerHeight())):(r.find("li").each((function(t,i){if(e(i).position().top>0)return s=e(i),!1})),s.addClass("ui-timepicker-selected")),!1;case 40:return 0===(s=r.find(".ui-timepicker-selected")).length?(r.find("li").each((function(t,i){if(e(i).position().top>0)return s=e(i),!1})),s.addClass("ui-timepicker-selected")):s.is(":last-child")||(s.removeClass("ui-timepicker-selected"),s.next().addClass("ui-timepicker-selected"),s.next().position().top+2*s.outerHeight()>r.outerHeight()&&r.scrollTop(r.scrollTop()+s.outerHeight())),!1;case 27:r.find("li").removeClass("ui-timepicker-selected"),n.hide();break;case 9:n.hide();break;default:return!0}}function x(t){var i=e(this),n=i.data("timepicker-list"),r=i.data("timepicker-settings");if(!n||!o(n)||r.disableTextInput)return!0;if("paste"!==t.type&&"cut"!==t.type)switch(t.keyCode){case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 65:case 77:case 80:case 186:case 8:case 46:r.typeaheadHighlight?f(i,n):n.hide()}else setTimeout((function(){r.typeaheadHighlight?f(i,n):n.hide()}),0)}function w(t){var e=t.data("timepicker-settings"),i=null,n=t.data("timepicker-list").find(".ui-timepicker-selected");return!n.hasClass("ui-timepicker-disabled")&&(n.length&&(i=n.data("time")),null!==i&&("string"!=typeof i&&(i=C(i,e)),v(t,i,"select")),!0)}function S(t,e){t=Math.abs(t);var n,o,r=Math.round(t/60),s=[];return r<60?s=[r,i.mins]:(n=Math.floor(r/60),o=r%60,30==e&&30==o&&(n+=i.decimal+5),s.push(n),s.push(1==n?i.hr:i.hrs),30!=e&&o&&(s.push(o),s.push(i.mins))),s.join(" ")}function C(t,n){if("number"!=typeof t)return null;var o=parseInt(t%60),r=parseInt(t/60%60),s=parseInt(t/3600%24),a=new Date(1970,0,2,s,r,o,0);if(isNaN(a.getTime()))return null;if("function"===e.type(n.timeFormat))return n.timeFormat(a);for(var c,d,h="",u=0;u<n.timeFormat.length;u++)switch(d=n.timeFormat.charAt(u)){case"a":h+=a.getHours()>11?i.pm:i.am;break;case"A":h+=a.getHours()>11?i.PM:i.AM;break;case"g":h+=0==(c=a.getHours()%12)?"12":c;break;case"G":c=a.getHours(),t===l&&(c=n.show2400?24:0),h+=c;break;case"h":0!=(c=a.getHours()%12)&&c<10&&(c="0"+c),h+=0===c?"12":c;break;case"H":c=a.getHours(),t===l&&(c=n.show2400?24:0),h+=c>9?c:"0"+c;break;case"i":h+=(r=a.getMinutes())>9?r:"0"+r;break;case"s":h+=(o=a.getSeconds())>9?o:"0"+o;break;case"\\":u++,h+=n.timeFormat.charAt(u);break;default:h+=d}return h}e.fn.timepicker=function(i){return this.length?n[i]?this.hasClass("ui-timepicker-input")?n[i].apply(this,Array.prototype.slice.call(arguments,1)):this:"object"!==t(i)&&i?void e.error("Method "+i+" does not exist on jQuery.timepicker"):n.init.apply(this,arguments):this},e.fn.timepicker.defaults={appendTo:"body",className:null,closeOnWindowScroll:!1,disableTextInput:!1,disableTimeRanges:[],disableTouchKeyboard:!1,durationTime:null,forceRoundTime:!1,listWidth:null,maxTime:null,minTime:null,noneOption:!1,orientation:"l",roundingFunction:function(t,e){if(null===t)return null;if("number"!=typeof e.step)return t;var i=t%(60*e.step);return(i-=(e.minTime||0)%(60*e.step))>=30*e.step?t+=60*e.step-i:t-=i,_moduloSeconds(t,e)},scrollDefault:null,selectOnBlur:!1,show2400:!1,showDuration:!1,showOn:["click","focus"],showOnFocus:!0,step:30,stopScrollPropagation:!1,timeFormat:"g:ia",typeaheadHighlight:!0,useSelect:!1,wrapHours:!0}},"object"===("undefined"==typeof exports?"undefined":t(exports))&&exports&&"object"===("undefined"==typeof module?"undefined":t(module))&&module&&module.exports===exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(),function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).dragula=t()}((function(){return function t(e,i,n){function o(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[s]={exports:{}};e[s][0].call(d.exports,(function(t){return o(e[s][1][t]||t)}),d,d.exports,t,e,i,n)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e,i){"use strict";function n(t){var e=o[t];return e?e.lastIndex=0:o[t]=e=new RegExp(r+t+s,"g"),e}var o={},r="(?:^|\\s)",s="(?:\\s|$)";e.exports={add:function(t,e){var i=t.className;i.length?n(e).test(i)||(t.className+=" "+e):t.className=e},rm:function(t,e){t.className=t.className.replace(n(e)," ").trim()}}},{}],2:[function(t,e,i){(function(i){"use strict";function n(t,e,n,o){i.navigator.pointerEnabled?y[e](t,{mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"}[n],o):i.navigator.msPointerEnabled?y[e](t,{mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"}[n],o):(y[e](t,{mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"}[n],o),y[e](t,n,o))}function o(t){if(void 0!==t.touches)return t.touches.length;if(void 0!==t.which&&0!==t.which)return t.which;if(void 0!==t.buttons)return t.buttons;var e=t.button;return void 0!==e?1&e?1:2&e?3:4&e?2:0:void 0}function r(t){var e=t.getBoundingClientRect();return{left:e.left+s("scrollLeft","pageXOffset"),top:e.top+s("scrollTop","pageYOffset")}}function s(t,e){return void 0!==i[e]?i[e]:w.clientHeight?w[t]:x.body[t]}function a(t,e,i){var n,o=t||{},r=o.className;return o.className+=" gu-hide",n=x.elementFromPoint(e,i),o.className=r,n}function l(){return!1}function c(){return!0}function d(t){return t.width||t.right-t.left}function h(t){return t.height||t.bottom-t.top}function u(t){return t.parentNode===x?null:t.parentNode}function p(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName||f(t)}function f(t){return!!t&&"false"!==t.contentEditable&&("true"===t.contentEditable||f(u(t)))}function g(t){return t.nextElementSibling||function(){var e=t;do{e=e.nextSibling}while(e&&1!==e.nodeType);return e}()}function m(t,e){var i=function(t){return t.targetTouches&&t.targetTouches.length?t.targetTouches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t}(e),n={pageX:"clientX",pageY:"clientY"};return t in n&&!(t in i)&&n[t]in i&&(t=n[t]),i[t]}var v=t("contra/emitter"),y=t("crossvent"),b=t("./classes"),x=document,w=x.documentElement;e.exports=function(t,e){function i(t){return-1!==et.containers.indexOf(t)||tt.isContainer(t)}function s(t){var e=t?"remove":"add";n(w,e,"mousedown",k),n(w,e,"mouseup",I)}function f(t){n(w,t?"remove":"add","mousemove",_)}function S(t){var e=t?"remove":"add";y[e](w,"selectstart",C),y[e](w,"click",C)}function C(t){Q&&t.preventDefault()}function k(t){if(V=t.clientX,q=t.clientY,1===o(t)&&!t.metaKey&&!t.ctrlKey){var e=t.target,i=T(e);i&&(Q=i,f(),"mousedown"===t.type&&(p(e)?e.focus():t.preventDefault()))}}function _(t){if(Q){if(0===o(t))return void I({});if(void 0===t.clientX||t.clientX!==V||void 0===t.clientY||t.clientY!==q){if(tt.ignoreInputTextSelection){var e=m("clientX",t),i=m("clientY",t);if(p(x.elementFromPoint(e,i)))return}var n=Q;f(!0),S(),E(),D(n);var s=r(W);Y=m("pageX",t)-s.left,X=m("pageY",t)-s.top,b.add(Z||W,"gu-transit"),H(),N(t)}}}function T(t){if(!(et.dragging&&$||i(t))){for(var e=t;u(t)&&!1===i(u(t));){if(tt.invalid(t,e))return;if(!(t=u(t)))return}var n=u(t);if(n&&!tt.invalid(t,e)&&tt.moves(t,n,e,g(t)))return{item:t,source:n}}}function D(t){(function(t,e){return"boolean"==typeof tt.copy?tt.copy:tt.copy(t,e)})(t.item,t.source)&&(Z=t.item.cloneNode(!0),et.emit("cloned",Z,t.item,"copy")),j=t.source,W=t.item,U=G=g(t.item),et.dragging=!0,et.emit("drag",W,j)}function E(){if(et.dragging){var t=Z||W;P(t,u(t))}}function A(){Q=!1,f(!0),S(!0)}function I(t){if(A(),et.dragging){var e=Z||W,i=m("clientX",t),n=m("clientY",t),o=F(a($,i,n),i,n);o&&(Z&&tt.copySortSource||!Z||o!==j)?P(e,o):tt.removeOnSpill?M():L()}}function P(t,e){var i=u(t);Z&&tt.copySortSource&&e===j&&i.removeChild(W),O(e)?et.emit("cancel",t,j,j):et.emit("drop",t,e,j,G),R()}function M(){if(et.dragging){var t=Z||W,e=u(t);e&&e.removeChild(t),et.emit(Z?"cancel":"remove",t,e,j),R()}}function L(t){if(et.dragging){var e=arguments.length>0?t:tt.revertOnSpill,i=Z||W,n=u(i),o=O(n);!1===o&&e&&(Z?n&&n.removeChild(Z):j.insertBefore(i,U)),o||e?et.emit("cancel",i,j,j):et.emit("drop",i,n,j,G),R()}}function R(){var t=Z||W;A(),$&&(b.rm(tt.mirrorContainer,"gu-unselectable"),n(w,"remove","mousemove",N),u($).removeChild($),$=null),t&&b.rm(t,"gu-transit"),K&&clearTimeout(K),et.dragging=!1,J&&et.emit("out",t,J,j),et.emit("dragend",t),j=W=Z=U=G=K=J=null}function O(t,e){var i;return i=void 0!==e?e:$?G:g(Z||W),t===j&&i===U}function F(t,e,n){function o(){if(!1===i(r))return!1;var o=z(r,t),s=B(r,o,e,n);return!!O(r,s)||tt.accepts(W,r,j,s)}for(var r=t;r&&!o();)r=u(r);return r}function N(t){function e(t){et.emit(t,s,J,j)}if($){t.preventDefault();var i=m("clientX",t),n=m("clientY",t),o=i-Y,r=n-X;$.style.left=o+"px",$.style.top=r+"px";var s=Z||W,l=a($,i,n),c=F(l,i,n),d=null!==c&&c!==J;(d||null===c)&&(J&&e("out"),J=c,d&&e("over"));var h=u(s);if(c===j&&Z&&!tt.copySortSource)return void(h&&h.removeChild(s));var p,f=z(c,l);if(null!==f)p=B(c,f,i,n);else{if(!0!==tt.revertOnSpill||Z)return void(Z&&h&&h.removeChild(s));p=U,c=j}(null===p&&d||p!==s&&p!==g(s))&&(G=p,c.insertBefore(s,p),et.emit("shadow",s,c,j))}}function H(){if(!$){var t=W.getBoundingClientRect();($=W.cloneNode(!0)).style.width=d(t)+"px",$.style.height=h(t)+"px",b.rm($,"gu-transit"),b.add($,"gu-mirror"),tt.mirrorContainer.appendChild($),n(w,"add","mousemove",N),b.add(tt.mirrorContainer,"gu-unselectable"),et.emit("cloned",$,W,"mirror")}}function z(t,e){for(var i=e;i!==t&&u(i)!==t;)i=u(i);return i===w?null:i}function B(t,e,i,n){var o="horizontal"===tt.direction,r=e!==t?function(){var t=e.getBoundingClientRect();return function(t){return t?g(e):e}(o?i>t.left+d(t)/2:n>t.top+h(t)/2)}():function(){var e,r,s,a=t.children.length;for(e=0;a>e;e++){if(s=(r=t.children[e]).getBoundingClientRect(),o&&s.left+s.width/2>i)return r;if(!o&&s.top+s.height/2>n)return r}return null}();return r}1===arguments.length&&!1===Array.isArray(t)&&(e=t,t=[]);var $,j,W,Y,X,V,q,U,G,Z,K,Q,J=null,tt=e||{};void 0===tt.moves&&(tt.moves=c),void 0===tt.accepts&&(tt.accepts=c),void 0===tt.invalid&&(tt.invalid=function(){return!1}),void 0===tt.containers&&(tt.containers=t||[]),void 0===tt.isContainer&&(tt.isContainer=l),void 0===tt.copy&&(tt.copy=!1),void 0===tt.copySortSource&&(tt.copySortSource=!1),void 0===tt.revertOnSpill&&(tt.revertOnSpill=!1),void 0===tt.removeOnSpill&&(tt.removeOnSpill=!1),void 0===tt.direction&&(tt.direction="vertical"),void 0===tt.ignoreInputTextSelection&&(tt.ignoreInputTextSelection=!0),void 0===tt.mirrorContainer&&(tt.mirrorContainer=x.body);var et=v({containers:tt.containers,start:function(t){var e=T(t);e&&D(e)},end:E,cancel:L,remove:M,destroy:function(){s(!0),I({})},canMove:function(t){return!!T(t)},dragging:!1});return!0===tt.removeOnSpill&&et.on("over",(function(t){b.rm(t,"gu-hide")})).on("out",(function(t){et.dragging&&b.add(t,"gu-hide")})),s(),et}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(t,e,i){e.exports=function(t,e){return Array.prototype.slice.call(t,e)}},{}],4:[function(t,e,i){"use strict";var n=t("ticky");e.exports=function(t,e,i){t&&n((function(){t.apply(i||null,e||[])}))}},{ticky:9}],5:[function(t,e,i){"use strict";var n=t("atoa"),o=t("./debounce");e.exports=function(t,e){var i=e||{},r={};return void 0===t&&(t={}),t.on=function(e,i){return r[e]?r[e].push(i):r[e]=[i],t},t.once=function(e,i){return i._once=!0,t.on(e,i),t},t.off=function(e,i){var n=arguments.length;if(1===n)delete r[e];else if(0===n)r={};else{var o=r[e];if(!o)return t;o.splice(o.indexOf(i),1)}return t},t.emit=function(){var e=n(arguments);return t.emitterSnapshot(e.shift()).apply(this,e)},t.emitterSnapshot=function(e){var s=(r[e]||[]).slice(0);return function(){var r=n(arguments),a=this||t;if("error"===e&&!1!==i.throws&&!s.length)throw 1===r.length?r[0]:r;return s.forEach((function(n){i.async?o(n,r,a):n.apply(a,r),n._once&&t.off(e,n)})),t}},t}},{"./debounce":4,atoa:3}],6:[function(t,e,i){(function(i){"use strict";function n(t,e,n){return function(e){var o=e||i.event;o.target=o.target||o.srcElement,o.preventDefault=o.preventDefault||function(){o.returnValue=!1},o.stopPropagation=o.stopPropagation||function(){o.cancelBubble=!0},o.which=o.which||o.keyCode,n.call(t,o)}}function o(t,e,i){var n=function(t,e,i){var n,o;for(n=0;n<d.length;n++)if((o=d[n]).element===t&&o.type===e&&o.fn===i)return n}(t,e,i);if(n){var o=d[n].wrapper;return d.splice(n,1),o}}var r=t("custom-event"),s=t("./eventmap"),a=i.document,l=function(t,e,i,n){return t.addEventListener(e,i,n)},c=function(t,e,i,n){return t.removeEventListener(e,i,n)},d=[];i.addEventListener||(l=function(t,e,i){return t.attachEvent("on"+e,function(t,e,i){var r=o(t,e,i)||n(t,0,i);return d.push({wrapper:r,element:t,type:e,fn:i}),r}(t,e,i))},c=function(t,e,i){var n=o(t,e,i);return n?t.detachEvent("on"+e,n):void 0}),e.exports={add:l,remove:c,fabricate:function(t,e,i){var n=-1===s.indexOf(e)?new r(e,{detail:i}):function(){var t;return a.createEvent?(t=a.createEvent("Event")).initEvent(e,!0,!0):a.createEventObject&&(t=a.createEventObject()),t}();t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("on"+e,n)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(t,e,i){(function(t){"use strict";var i=[],n="",o=/^on/;for(n in t)o.test(n)&&i.push(n.slice(2));e.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(t,e,i){(function(t){var i=t.CustomEvent;e.exports=function(){try{var t=new i("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?i:"function"==typeof document.createEvent?function(t,e){var i=document.createEvent("CustomEvent");return e?i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):i.initCustomEvent(t,!1,!1,void 0),i}:function(t,e){var i=document.createEventObject();return i.type=t,e?(i.bubbles=Boolean(e.bubbles),i.cancelable=Boolean(e.cancelable),i.detail=e.detail):(i.bubbles=!1,i.cancelable=!1,i.detail=void 0),i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(t,e,i){var n;n="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){setTimeout(t,0)},e.exports=n},{}]},{},[2])(2)})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Pristine=e()}(this,(function(){"use strict";var t={required:"This field is required",email:"This field requires a valid e-mail address",number:"This field requires a number",url:"This field requires a valid website URL",tel:"This field requires a valid telephone number",maxlength:"This fields length must be < ${1}",minlength:"This fields length must be > ${1}",min:"Minimum value for this field is ${1}",max:"Maximum value for this field is ${1}",pattern:"Input must match the pattern ${1}"};function e(t){var e=arguments;return this.replace(/\${([^{}]*)}/g,(function(t,i){return e[i]}))}function i(t){return t.pristine.self.form.querySelectorAll('input[name="'+t.getAttribute("name")+'"]:checked').length}var n={classTo:"form-group",errorClass:"has-danger",successClass:"has-success",errorTextParent:"form-group",errorTextTag:"div",errorTextClass:"text-help"},o=["required","min","max","minlength","maxlength","pattern"],r={},s=function(e,i){i.name=e,i.msg||(i.msg=t[e]),void 0===i.priority&&(i.priority=1),r[e]=i};function a(t,i,s){var a=this;function l(t,e,i,n){var o=r[i];if(o&&(t.push(o),n)){var s=n.split(",");s.unshift(null),e[i]=s}}function c(t){var i=[],n=!0;for(var o in t.validators){var r=t.validators[o],s=t.params[r.name]?t.params[r.name]:[];if(s[0]=t.input.value,!r.fn.apply(t.input,s)){n=!1;var a=t.messages[r.name]||r.msg;if(i.push(e.apply(a,s)),!0===r.halt)break}}return t.errors=i,n}function d(t){if(t.errorElements)return t.errorElements;var e=function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.input,a.config.classTo),i=null,n=null;return(i=a.config.classTo===a.config.errorTextParent?e:e.querySelector(a.errorTextParent))&&((n=i.querySelector(".pristine-error"))||((n=document.createElement(a.config.errorTextTag)).className="pristine-error "+a.config.errorTextClass,i.appendChild(n),n.pristineDisplay=n.style.display)),t.errorElements=[e,n]}function h(t){var e=d(t),i=e[0],n=e[1];i&&(i.classList.remove(a.config.successClass),i.classList.add(a.config.errorClass)),n&&(n.innerHTML=t.errors.join("<br/>"),n.style.display=n.pristineDisplay||"")}function u(t){var e=function(t){var e=d(t),i=e[0],n=e[1];return i&&(i.classList.remove(a.config.errorClass),i.classList.remove(a.config.successClass)),n&&(n.innerHTML="",n.style.display="none"),e}(t)[0];e&&e.classList.add(a.config.successClass)}return function(t,e,i){t.setAttribute("novalidate","true"),a.form=t,a.config=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t}(e||{},n),a.live=!(!1===i),a.fields=Array.from(t.querySelectorAll("input:not([type^=hidden]):not([type^=submit]), select, textarea")).map(function(t){var e=[],i={},n={};return[].forEach.call(t.attributes,(function(t){if(/^data-pristine-/.test(t.name)){var r=t.name.substr(14);if(r.endsWith("-message"))return void(n[r.slice(0,r.length-8)]=t.value);"type"===r&&(r=t.value),l(e,i,r,t.value)}else~o.indexOf(t.name)?l(e,i,t.name,t.value):"type"===t.name&&l(e,i,t.value)})),e.sort((function(t,e){return e.priority-t.priority})),a.live&&t.addEventListener(~["radio","checkbox"].indexOf(t.getAttribute("type"))?"change":"input",function(t){a.validate(t.target)}.bind(a)),t.pristine={input:t,validators:e,params:i,messages:n,self:a}}.bind(a))}(t,i,s),a.validate=function(t,e){e=t&&!0===e||!0===t;var i=a.fields;!0!==t&&!1!==t&&(t instanceof HTMLElement?i=[t.pristine]:(t instanceof NodeList||t instanceof(window.$||Array)||t instanceof Array)&&(i=Array.from(t).map((function(t){return t.pristine}))));var n=!0;for(var o in i){var r=i[o];c(r)?!e&&u(r):(n=!1,!e&&h(r))}return n},a.getErrors=function(t){if(!t){for(var e=[],i=0;i<a.fields.length;i++){var n=a.fields[i];n.errors.length&&e.push({input:n.input,errors:n.errors})}return e}return t.length?t[0].pristine.errors:t.pristine.errors},a.addValidator=function(t,e,i,n,o){t instanceof HTMLElement?(t.pristine.validators.push({fn:e,msg:i,priority:n,halt:o}),t.pristine.validators.sort((function(t,e){return e.priority-t.priority}))):console.warn("The parameter elem must be a dom element")},a.addError=function(t,e){(t=t.length?t[0]:t).pristine.errors.push(e),h(t.pristine)},a.reset=function(){for(var t in a.fields)a.fields[t].errorElements=null;Array.from(a.form.querySelectorAll(".pristine-error")).map((function(t){t.parentNode.removeChild(t)})),Array.from(a.form.querySelectorAll("."+a.config.classTo)).map((function(t){t.classList.remove(a.config.successClass),t.classList.remove(a.config.errorClass)}))},a.destroy=function(){a.reset(),a.fields.forEach((function(t){delete t.input.pristine})),a.fields=[]},a.setGlobalConfig=function(t){n=t},a}return s("text",{fn:function(t){return!0},priority:0}),s("required",{fn:function(t){return"radio"===this.type||"checkbox"===this.type?i(this):void 0!==t&&""!==t},priority:99,halt:!0}),s("email",{fn:function(t){return!t||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}}),s("number",{fn:function(t){return!t||!isNaN(parseFloat(t))},priority:2}),s("integer",{fn:function(t){return t&&/^\d+$/.test(t)}}),s("minlength",{fn:function(t,e){return!t||t.length>=parseInt(e)}}),s("maxlength",{fn:function(t,e){return!t||t.length<=parseInt(e)}}),s("min",{fn:function(t,e){return!t||("checkbox"===this.type?i(this)>=parseInt(e):parseFloat(t)>=parseFloat(e))}}),s("max",{fn:function(t,e){return!t||("checkbox"===this.type?i(this)<=parseInt(e):parseFloat(t)<=parseFloat(e))}}),s("pattern",{fn:function(t,e){var i=e.match(new RegExp("^/(.*?)/([gimy]*)$"));return!t||new RegExp(i[1],i[2]).test(t)}}),a.addValidator=function(t,e,i,n,o){s(t,{fn:e,msg:i,priority:n,halt:o})},a})),function(t,e,i,n){t.fn.quicksearch=function(i,n){var o,r,s,a,l="",c=this,d=t.extend({delay:100,selector:null,stripeRows:null,loader:null,noResults:"",matchedResultsCount:0,bind:"keyup",onBefore:function(){},onAfter:function(){},show:function(){this.style.display=""},hide:function(){this.style.display="none"},prepareQuery:function(t){return t.toLowerCase().split(" ")},testQuery:function(t,e,i){for(var n=0;n<t.length;n+=1)if(-1===e.indexOf(t[n]))return!1;return!0}},n);return this.go=function(){for(var t=0,e=0,i=!0,n=d.prepareQuery(l),o=0===l.replace(" ","").length,a=(t=0,s.length);t<a;t++)o||d.testQuery(n,r[t],s[t])?(d.show.apply(s[t]),i=!1,e++):d.hide.apply(s[t]);return i?this.results(!1):(this.results(!0),this.stripe()),this.matchedResultsCount=e,this.loader(!1),d.onAfter(),this},this.search=function(t){l=t,c.trigger()},this.currentMatchedResults=function(){return this.matchedResultsCount},this.stripe=function(){if("object"==typeof d.stripeRows&&null!==d.stripeRows){var e=d.stripeRows.join(" "),i=d.stripeRows.length;a.not(":hidden").each((function(n){t(this).removeClass(e).addClass(d.stripeRows[n%i])}))}return this},this.strip_html=function(e){var i=e.replace(new RegExp("<[^<]+>","g"),"");return t.trim(i.toLowerCase())},this.results=function(e){return"string"==typeof d.noResults&&""!==d.noResults&&(e?t(d.noResults).hide():t(d.noResults).show()),this},this.loader=function(e){return"string"==typeof d.loader&&""!==d.loader&&(e?t(d.loader).show():t(d.loader).hide()),this},this.cache=function(){a=t(i),"string"==typeof d.noResults&&""!==d.noResults&&(a=a.not(d.noResults));var e="string"==typeof d.selector?a.find(d.selector):t(i).not(d.noResults);return r=e.map((function(){return c.strip_html(this.innerHTML)})),s=a.map((function(){return this})),l=l||this.val()||"",this.go()},this.trigger=function(){return this.loader(!0),d.onBefore(),e.clearTimeout(o),o=e.setTimeout((function(){c.go()}),d.delay),this},this.cache(),this.results(!0),this.stripe(),this.loader(!1),this.each((function(){t(this).on(d.bind,(function(){l=t(this).val(),c.trigger()}))}))}}(jQuery,this,document),function(t){"use strict";var e=function(e,i){this.options=i,this.$element=t(e),this.$container=t("<div/>",{class:"ms-container"}),this.$selectableContainer=t("<div/>",{class:"ms-selectable"}),this.$selectionContainer=t("<div/>",{class:"ms-selection"}),this.$selectableUl=t("<ul/>",{class:"ms-list",tabindex:"-1"}),this.$selectionUl=t("<ul/>",{class:"ms-list",tabindex:"-1"}),this.scrollTo=0,this.elemsSelector="li:visible:not(.ms-optgroup-label,.ms-optgroup-container,."+i.disabledClass+")"};e.prototype={constructor:e,init:function(){var e=this,i=this.$element;if(0===i.next(".ms-container").length){i.css({position:"absolute",left:"-9999px"}),i.attr("id",i.attr("id")?i.attr("id"):Math.ceil(1e3*Math.random())+"multiselect"),this.$container.attr("id","ms-"+i.attr("id")),this.$container.addClass(e.options.cssClass),i.find("option").each((function(){e.generateLisFromOption(this)})),this.$selectionUl.find(".ms-optgroup-label").hide(),e.options.selectableHeader&&e.$selectableContainer.append(e.options.selectableHeader),e.$selectableContainer.append(e.$selectableUl),e.options.selectableFooter&&e.$selectableContainer.append(e.options.selectableFooter),e.options.selectionHeader&&e.$selectionContainer.append(e.options.selectionHeader),e.$selectionContainer.append(e.$selectionUl),e.options.selectionFooter&&e.$selectionContainer.append(e.options.selectionFooter),e.$container.append(e.$selectableContainer),e.$container.append(e.$selectionContainer),i.after(e.$container),e.activeMouse(e.$selectableUl),e.activeKeyboard(e.$selectableUl);var n=e.options.dblClick?"dblclick":"click";e.$selectableUl.on(n,".ms-elem-selectable",(function(){e.select(t(this).data("ms-value"))})),e.$selectionUl.on(n,".ms-elem-selection",(function(){e.deselect(t(this).data("ms-value"))})),e.activeMouse(e.$selectionUl),e.activeKeyboard(e.$selectionUl),i.on("focus",(function(){e.$selectableUl.focus()}))}var o=i.find("option:selected").map((function(){return t(this).val()})).get();e.select(o,"init"),"function"==typeof e.options.afterInit&&e.options.afterInit.call(this,this.$container)},generateLisFromOption:function(e,i,n){for(var o=this,r=o.$element,s="",a=t(e),l=0;l<e.attributes.length;l++){var c=e.attributes[l];"value"!==c.name&&"disabled"!==c.name&&(s+=c.name+'="'+c.value+'" ')}var d=t("<li "+s+"><span>"+o.escapeHTML(a.text())+"</span></li>"),h=d.clone(),u=a.val(),p=o.sanitize(u);d.data("ms-value",u).addClass("ms-elem-selectable").attr("id",p+"-selectable"),h.data("ms-value",u).addClass("ms-elem-selection").attr("id",p+"-selection").hide(),(a.prop("disabled")||r.prop("disabled"))&&(h.addClass(o.options.disabledClass),d.addClass(o.options.disabledClass));var f=a.parent("optgroup");if(f.length>0){var g=f.attr("label"),m=o.sanitize(g),v=o.$selectableUl.find("#optgroup-selectable-"+m),y=o.$selectionUl.find("#optgroup-selection-"+m);if(0===v.length){var b='<li class="ms-optgroup-container"></li>',x='<ul class="ms-optgroup"><li class="ms-optgroup-label"><span>'+g+"</span></li></ul>";v=t(b),y=t(b),v.attr("id","optgroup-selectable-"+m),y.attr("id","optgroup-selection-"+m),v.append(t(x)),y.append(t(x)),o.options.selectableOptgroup&&(v.find(".ms-optgroup-label").on("click",(function(){var e=f.children(":not(:selected, :disabled)").map((function(){return t(this).val()})).get();o.select(e)})),y.find(".ms-optgroup-label").on("click",(function(){var e=f.children(":selected:not(:disabled)").map((function(){return t(this).val()})).get();o.deselect(e)}))),o.$selectableUl.append(v),o.$selectionUl.append(y)}i=void 0===i?v.find("ul").children().length:i+1,d.insertAt(i,v.children()),h.insertAt(i,y.children())}else i=void 0===i?o.$selectableUl.children().length:i,d.insertAt(i,o.$selectableUl),h.insertAt(i,o.$selectionUl)},addOption:function(e){var i=this;void 0!==e.value&&null!==e.value&&(e=[e]),t.each(e,(function(e,n){if(void 0!==n.value&&null!==n.value&&0===i.$element.find("option[value='"+n.value+"']").length){var o=t('<option value="'+n.value+'">'+n.text+"</option>"),r=(e=parseInt(void 0===n.index?i.$element.children().length:n.index),void 0===n.nested?i.$element:t("optgroup[label='"+n.nested+"']"));o.insertAt(e,r),i.generateLisFromOption(o.get(0),e,n.nested)}}))},escapeHTML:function(e){return t("<div>").text(e).html()},activeKeyboard:function(e){var i=this;e.on("focus",(function(){t(this).addClass("ms-focus")})).on("blur",(function(){t(this).removeClass("ms-focus")})).on("keydown",(function(n){switch(n.which){case 40:case 38:return n.preventDefault(),n.stopPropagation(),void i.moveHighlight(t(this),38===n.which?-1:1);case 37:case 39:return n.preventDefault(),n.stopPropagation(),void i.switchList(e);case 9:if(i.$element.is("[tabindex]")){n.preventDefault();var o=parseInt(i.$element.attr("tabindex"),10);return o=n.shiftKey?o-1:o+1,void t('[tabindex="'+o+'"]').focus()}n.shiftKey&&i.$element.trigger("focus")}if(t.inArray(n.which,i.options.keySelect)>-1)return n.preventDefault(),n.stopPropagation(),void i.selectHighlighted(e)}))},moveHighlight:function(t,e){var i=t.find(this.elemsSelector),n=i.filter(".ms-hover"),o=null,r=i.first().outerHeight(),s=t.height();if(this.$container.prop("id"),i.removeClass("ms-hover"),1===e){if(0===(o=n.nextAll(this.elemsSelector).first()).length)if((l=n.parent()).hasClass("ms-optgroup")){var a=l.parent().next(":visible");o=a.length>0?a.find(this.elemsSelector).first():i.first()}else o=i.first()}else if(-1===e){var l;if(0===(o=n.prevAll(this.elemsSelector).first()).length)if((l=n.parent()).hasClass("ms-optgroup")){var c=l.parent().prev(":visible");o=c.length>0?c.find(this.elemsSelector).last():i.last()}else o=i.last()}if(o.length>0){o.addClass("ms-hover");var d=t.scrollTop()+o.position().top-s/2+r/2;t.scrollTop(d)}},selectHighlighted:function(t){var e=t.find(this.elemsSelector),i=e.filter(".ms-hover").first();i.length>0&&(t.parent().hasClass("ms-selectable")?this.select(i.data("ms-value")):this.deselect(i.data("ms-value")),e.removeClass("ms-hover"))},switchList:function(t){t.blur(),this.$container.find(this.elemsSelector).removeClass("ms-hover"),t.parent().hasClass("ms-selectable")?this.$selectionUl.focus():this.$selectableUl.focus()},activeMouse:function(e){var i=this;this.$container.on("mouseenter",i.elemsSelector,(function(){t(this).parents(".ms-container").find(i.elemsSelector).removeClass("ms-hover"),t(this).addClass("ms-hover")})),this.$container.on("mouseleave",i.elemsSelector,(function(){t(this).parents(".ms-container").find(i.elemsSelector).removeClass("ms-hover")}))},refresh:function(){this.destroy(),this.$element.multiSelect(this.options)},destroy:function(){t("#ms-"+this.$element.attr("id")).remove(),this.$element.off("focus"),this.$element.css("position","").css("left",""),this.$element.removeData("multiselect")},select:function(e,i){"string"==typeof e&&(e=[e]);var n=this,o=this.$element,r=t.map(e,(function(t){return n.sanitize(t)})),s=this.$selectableUl.find("#"+r.join("-selectable, #")+"-selectable").filter(":not(."+n.options.disabledClass+")"),a=this.$selectionUl.find("#"+r.join("-selection, #")+"-selection").filter(":not(."+n.options.disabledClass+")"),l=o.find("option:not(:disabled)").filter((function(){return t.inArray(this.value,e)>-1}));if("init"===i&&(s=this.$selectableUl.find("#"+r.join("-selectable, #")+"-selectable"),a=this.$selectionUl.find("#"+r.join("-selection, #")+"-selection")),s.length>0){s.addClass("ms-selected").hide(),a.addClass("ms-selected").show(),l.prop("selected",!0),n.$container.find(n.elemsSelector).removeClass("ms-hover");var c=n.$selectableUl.children(".ms-optgroup-container");if(c.length>0)c.each((function(){var e=t(this).find(".ms-elem-selectable");e.length===e.filter(".ms-selected").length&&t(this).find(".ms-optgroup-label").hide()})),n.$selectionUl.children(".ms-optgroup-container").each((function(){t(this).find(".ms-elem-selection").filter(".ms-selected").length>0&&t(this).find(".ms-optgroup-label").show()}));else if(n.options.keepOrder&&"init"!==i){var d=n.$selectionUl.find(".ms-selected");d.length>1&&d.last().get(0)!=a.get(0)&&a.insertAfter(d.last())}"init"!==i&&(o.trigger("change"),"function"==typeof n.options.afterSelect&&n.options.afterSelect.call(this,e))}},deselect:function(e){"string"==typeof e&&(e=[e]);var i=this,n=this.$element,o=t.map(e,(function(t){return i.sanitize(t)})),r=this.$selectableUl.find("#"+o.join("-selectable, #")+"-selectable"),s=this.$selectionUl.find("#"+o.join("-selection, #")+"-selection").filter(".ms-selected").filter(":not(."+i.options.disabledClass+")"),a=n.find("option").filter((function(){return t.inArray(this.value,e)>-1}));if(s.length>0){r.removeClass("ms-selected").show(),s.removeClass("ms-selected").hide(),a.prop("selected",!1),i.$container.find(i.elemsSelector).removeClass("ms-hover");var l=i.$selectableUl.children(".ms-optgroup-container");l.length>0&&(l.each((function(){t(this).find(".ms-elem-selectable").filter(":not(.ms-selected)").length>0&&t(this).find(".ms-optgroup-label").show()})),i.$selectionUl.children(".ms-optgroup-container").each((function(){0===t(this).find(".ms-elem-selection").filter(".ms-selected").length&&t(this).find(".ms-optgroup-label").hide()}))),n.trigger("change"),"function"==typeof i.options.afterDeselect&&i.options.afterDeselect.call(this,e)}},select_all:function(){var e=this.$element,i=e.val();if(e.find('option:not(":disabled")').prop("selected",!0),this.$selectableUl.find(".ms-elem-selectable").filter(":not(."+this.options.disabledClass+")").addClass("ms-selected").hide(),this.$selectionUl.find(".ms-optgroup-label").show(),this.$selectableUl.find(".ms-optgroup-label").hide(),this.$selectionUl.find(".ms-elem-selection").filter(":not(."+this.options.disabledClass+")").addClass("ms-selected").show(),this.$selectionUl.focus(),e.trigger("change"),"function"==typeof this.options.afterSelect){var n=t.grep(e.val(),(function(e){return t.inArray(e,i)<0}));this.options.afterSelect.call(this,n)}},deselect_all:function(){var t=this.$element,e=t.val();t.find("option").prop("selected",!1),this.$selectableUl.find(".ms-elem-selectable").removeClass("ms-selected").show(),this.$selectionUl.find(".ms-optgroup-label").hide(),this.$selectableUl.find(".ms-optgroup-label").show(),this.$selectionUl.find(".ms-elem-selection").removeClass("ms-selected").hide(),this.$selectableUl.focus(),t.trigger("change"),"function"==typeof this.options.afterDeselect&&this.options.afterDeselect.call(this,e)},sanitize:function(t){var e,i,n=0;if(0==t.length)return n;for(e=0,i=t.length;e<i;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return n}},t.fn.multiSelect=function(){var i=arguments[0],n=arguments;return this.each((function(){var o=t(this),r=o.data("multiselect"),s=t.extend({},t.fn.multiSelect.defaults,o.data(),"object"==typeof i&&i);r||o.data("multiselect",r=new e(this,s)),"string"==typeof i?r[i](n[1]):r.init()}))},t.fn.multiSelect.defaults={keySelect:[32],selectableOptgroup:!1,disabledClass:"disabled",dblClick:!1,keepOrder:!1,cssClass:""},t.fn.multiSelect.Constructor=e,t.fn.insertAt=function(t,e){return this.each((function(){0===t?e.prepend(this):e.children().eq(t-1).after(this)}))}}(window.jQuery),function(){var t,e;window.SmsCounter=e=function(){function t(){}return t.gsm7bitChars="@£$¥èéùìòÇ\\nØø\\rÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !\\\"#¤%&'()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà",t.gsm7bitExChar="\\^{}\\\\\\[~\\]|€",t.gsm7bitRegExp=RegExp("^["+t.gsm7bitChars+"]*$"),t.gsm7bitExRegExp=RegExp("^["+t.gsm7bitChars+t.gsm7bitExChar+"]*$"),t.gsm7bitExOnlyRegExp=RegExp("^[\\"+t.gsm7bitExChar+"]*$"),t.GSM_7BIT="GSM_7BIT",t.GSM_7BIT_EX="GSM_7BIT_EX",t.UTF16="UTF16",t.messageLength={GSM_7BIT:160,GSM_7BIT_EX:160,UTF16:70},t.multiMessageLength={GSM_7BIT:153,GSM_7BIT_EX:153,UTF16:67},t.count=function(t){var e,i,n,o,r;return e=this.detectEncoding(t),i=t.length,e===this.GSM_7BIT_EX&&(i+=this.countGsm7bitEx(t)),i>(o=this.messageLength[e])&&(o=this.multiMessageLength[e]),0==(r=o*(n=Math.ceil(i/o))-i)&&0==n&&(r=o),{encoding:e,length:i,per_message:o,remaining:r,messages:n}},t.detectEncoding=function(t){switch(!1){case null==t.match(this.gsm7bitRegExp):return this.GSM_7BIT;case null==t.match(this.gsm7bitExRegExp):return this.GSM_7BIT_EX;default:return this.UTF16}},t.countGsm7bitEx=function(t){var e;return function(){var i,n,o;for(o=[],i=0,n=t.length;i<n;i++)null!=(e=t[i]).match(this.gsm7bitExOnlyRegExp)&&o.push(e);return o}.call(this).length},t}(),"undefined"!=typeof jQuery&&null!==jQuery&&((t=jQuery).fn.countSms=function(i){var n,o;return o=this,i=t(i),n=function(){var t,n,r,s;for(n in s=[],t=e.count(o.val()))r=t[n],s.push(i.find("."+n).text(r));return s},this.on("keyup",n),n()})}.call(this),function(t,e,i,n){"use strict";var o="datepaginator",r=function(e,i){this._element=e,this.$element=t(e),this._init(i)};r.defaults={fillWidth:!0,highlightSelectedDate:!0,highlightToday:!0,hint:"dddd, Do MMMM YYYY",injectStyle:!0,itemWidth:35,navItemWidth:20,offDays:"Sat,Sun",offDaysFormat:"ddd",onSelectedDateChanged:null,selectedDate:moment().clone().startOf("day"),selectedDateFormat:"YYYY-MM-DD",selectedItemWidth:140,showCalendar:!0,showOffDays:!0,showStartOfWeek:!0,size:n,startOfWeek:"Mon",startOfWeekFormat:"ddd",squareEdges:!1,text:"ddd<br/>Do",textSelected:"dddd<br/>Do, MMMM YYYY",useBootstrap2:!1,width:0,startDate:moment(new Date(-864e13)),startDateFormat:"YYYY-MM-DD",endDate:moment(new Date(864e13)),endDateFormat:"YYYY-MM-DD"},r.prototype={setSelectedDate:function(t,e){this._setSelectedDate(moment(t,e||this.options.selectedDateFormat)),this._render()},remove:function(){this._destroy(),t.removeData(this,"plugin_"+o)},_init:function(e){this.options=t.extend({},r.defaults,e),this.options.width?this.options.fillWidth=!1:(this.options.width=this.$element.width(),this.options.fillWidth=!0),"string"==typeof this.options.startDate&&(this.options.startDate=moment(this.options.startDate,this.options.startDateFormat).clone().startOf("day")),"string"==typeof this.options.endDate&&(this.options.endDate=moment(this.options.endDate,this.options.endDateFormat).clone().startOf("day")),"string"==typeof this.options.selectedDate&&(this.options.selectedDate=moment(this.options.selectedDate,this.options.selectedDateFormat).clone().startOf("day")),this.options.selectedDate.isBefore(this.options.startDate)&&(this.options.selectedDate=this.options.startDate.clone()),this.options.selectedDate.isAfter(this.options.endDate)&&(this.options.selectedDate=this.options.endDate.clone()),"small"===this.options.size?this.options.size="sm":"large"===this.options.size&&(this.options.size="lg"),this._destroy(),this._subscribeEvents(),this._render()},_unsubscribeEvents:function(){this.$element.off("click"),this.$element.off("selectedDateChanged")},_subscribeEvents:function(){this._unsubscribeEvents(),this.$element.on("click",t.proxy(this._clickedHandler,this)),"function"==typeof this.options.onSelectedDateChanged&&this.$element.on("selectedDateChanged",this.options.onSelectedDateChanged),this.options.fillWidth&&t(e).on("resize",t.proxy(this._resize,this))},_destroy:function(){this.initialized&&(this.$calendar&&this.$calendar.datepicker("remove"),this.$wrapper.remove(),this.$wrapper=null,this._unsubscribeEvents()),this.initialized=!1},_clickedHandler:function(e){e.preventDefault();var i=t(e.target),n=i.attr("class");-1!=n.indexOf("dp-nav-left")?this._back():-1!=n.indexOf("dp-nav-right")?this._forward():-1!=n.indexOf("dp-item")&&this._select(i.attr("data-moment"))},_setSelectedDate:function(t){t.isSame(this.options.selectedDate)||t.isBefore(this.options.startDate)||t.isAfter(this.options.endDate)||(this.options.selectedDate=t.startOf("day"),this.$element.trigger("selectedDateChanged",[t.clone()]))},_back:function(){this._setSelectedDate(this.options.selectedDate.clone().subtract("day",1)),this._render()},_forward:function(){this._setSelectedDate(this.options.selectedDate.clone().add("day",1)),this._render()},_select:function(t){this._setSelectedDate(moment(t,this.options.selectedDateFormat)),this._render()},_calendarSelect:function(t){this._setSelectedDate(moment(t.date)),this._render()},_resize:function(){this.options.width=this.$element.width(),this._render()},_render:function(){var e=this;this.initialized?this.$calendar&&this.$calendar.datepicker("remove"):(this.$element.addClass(this.options.useBootstrap2?"pagination":"").removeClass("datepaginator datepaginator-sm datepaginator-lg").addClass("sm"===this.options.size?"datepaginator-sm":"lg"===this.options.size?"datepaginator-lg":"datepaginator"),this.$wrapper=t(this._template.list),this.$leftNav=t(this._template.navItem).addClass("dp-nav-left").addClass("sm"===this.options.size?"dp-nav-sm":"lg"===this.options.size?"dp-nav-lg":"").addClass(this.options.squareEdges?"dp-nav-square-edges":"").append(t(this._template.icon).addClass("fa-angle-left").addClass("dp-nav-left")).width(this.options.navItemWidth),this.$rightNav=t(this._template.navItem).addClass("dp-nav-right").addClass("sm"===this.options.size?"dp-nav-sm":"lg"===this.options.size?"dp-nav-lg":"").addClass(this.options.squareEdges?"dp-nav-square-edges":"").append(t(this._template.icon).addClass("fa-angle-right").addClass("dp-nav-right")).width(this.options.navItemWidth),this.$calendar=this.options.showCalendar?t(this._template.calendar):n,this._injectStyle(),this.initialized=!0);var i=this._buildData();this.$element.empty().append(this.$wrapper.empty()),this.$leftNav.removeClass("dp-no-select").attr("title",""),i.isSelectedStartDate&&this.$leftNav.addClass("dp-no-select").attr("title","Start of valid date range"),this.$wrapper.append(t(e._template.listItem).append(this.$leftNav)),t.each(i.items,(function(i,n){var o=t(e._template.dateItem).attr("data-moment",n.m).attr("title",n.hint).width(n.itemWidth);n.isSelected&&e.options.highlightSelectedDate&&o.addClass("dp-selected"),n.isToday&&e.options.highlightToday&&o.addClass("dp-today"),n.isStartOfWeek&&e.options.showStartOfWeek&&o.addClass("dp-divider"),n.isOffDay&&e.options.showOffDays&&o.addClass("dp-off"),n.isSelected&&e.options.showCalendar&&o.append(e.$calendar),"sm"===e.options.size?o.addClass("dp-item-sm"):"lg"===e.options.size&&o.addClass("dp-item-lg"),n.isValid||o.addClass("dp-no-select"),o.append(n.text),e.$wrapper.append(t(e._template.listItem).append(o))})),this.$rightNav.removeClass("dp-no-select").attr("title",""),i.isSelectedEndDate&&this.$rightNav.addClass("dp-no-select").attr("title","End of valid date range"),this.$wrapper.append(t(e._template.listItem).append(this.$rightNav)),this.$calendar&&this.$calendar.datepicker({autoclose:!0,forceParse:!0,startView:0,minView:0,todayHighlight:!0,startDate:this.options.startDate.toDate(),endDate:this.options.endDate.toDate()}).datepicker("update",this.options.selectedDate.toDate()).on("changeDate",t.proxy(this._calendarSelect,this))},_injectStyle:function(){this.options.injectStyle&&!i.getElementById("bootstrap-datepaginator-style")&&t('<style type="text/css" id="bootstrap-datepaginator-style">'+this._css+"</style>").appendTo("head")},_buildData:function(){for(var t=this.options.width-(this.options.selectedItemWidth-this.options.itemWidth+2*this.options.navItemWidth),e=Math.floor(t/this.options.itemWidth),i=parseInt(e/2),n=Math.floor(t/e),o=Math.floor(this.options.selectedItemWidth+(t-e*n)),r=moment().startOf("day"),s=this.options.selectedDate.clone().subtract("days",i),a=this.options.selectedDate.clone().add("days",e-i),l={isSelectedStartDate:!!this.options.selectedDate.isSame(this.options.startDate),isSelectedEndDate:!!this.options.selectedDate.isSame(this.options.endDate),items:[]},c=s;c.isBefore(a);c.add("days",1)){var d=!(!c.isSame(this.options.startDate)&&!c.isAfter(this.options.startDate)||!c.isSame(this.options.endDate)&&!c.isBefore(this.options.endDate));l.items[l.items.length]={m:c.clone().format(this.options.selectedDateFormat),isValid:d,isSelected:!!c.isSame(this.options.selectedDate),isToday:!!c.isSame(r),isOffDay:-1!==this.options.offDays.split(",").indexOf(c.format(this.options.offDaysFormat)),isStartOfWeek:-1!==this.options.startOfWeek.split(",").indexOf(c.format(this.options.startOfWeekFormat)),text:c.isSame(this.options.selectedDate)?c.format(this.options.textSelected):c.format(this.options.text),hint:d?c.format(this.options.hint):"Invalid date",itemWidth:c.isSame(this.options.selectedDate)?o:n}}return l},_template:{list:'<ul class="pagination"></ul>',listItem:'<li class="page-item"></li>',navItem:'<a href="#" class="dp-nav page-link"></a>',dateItem:'<a href="#" class="dp-item page-link"></a>',icon:'<i class="fal"></i>',calendar:'<i id="dp-calendar" class="fal fa-calendar-alt"></i>'},_css:".datepaginator{font-size:12px;height:60px}.datepaginator-sm{font-size:10px;height:40px}.datepaginator-lg{font-size:14px;height:80px}.pagination{margin:0;padding:0;white-space:nowrap}.dp-nav{height:60px;padding:22px 0!important;width:20px;margin:0!important;text-align:center}.dp-nav-square-edges{border-radius:0!important}.dp-item{height:60px;padding:13px 0!important;width:35px;margin:0!important;border-left-style:hidden!important;text-align:center}.dp-item-sm{height:40px!important;padding:5px!important}.dp-item-lg{height:80px!important;padding:22px 0!important}.dp-nav-sm{height:40px!important;padding:11px 0!important}.dp-nav-lg{height:80px!important;padding:33px 0!important}a.dp-nav-right{border-left-style:hidden!important}.dp-divider{border-left:2px solid #ddd!important}.dp-off{background-color:#F0F0F0!important}.dp-no-select{color:#ccc!important;background-color:#F0F0F0!important}.dp-no-select:hover{background-color:#F0F0F0!important}.dp-today{background-color:#88B5DB!important;color:#fff!important}.dp-selected{background-color:#428bca!important;color:#fff!important;width:140px}#dp-calendar{padding:3px 5px 0 0!important;margin-right:3px;position:absolute;right:0;top:10}"};var s=function(t){e.console&&e.console.error(t)};t.fn[o]=function(e,i){return this.each((function(){var n=t.data(this,"plugin_"+o);"string"==typeof e?n?t.isFunction(n[e])&&"_"!==e.charAt(0)?("string"==typeof i&&(i=[i]),n[e].apply(n,i)):s("No such method : "+e):s("Not initialized, can not call method : "+e):n?n._init(e):t.data(this,"plugin_"+o,new r(this,e))}))}}(jQuery,window,document);var myapp_config={VERSION:"4.5.1",root_:$("body"),root_logo:$(".page-sidebar > .page-logo"),throttleDelay:450,filterDelay:150,thisDevice:null,isMobile:/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()),mobileMenuTrigger:null,mobileResolutionTrigger:992,isWebkit:1==(!!window.chrome&&!!window.chrome.webstore)||Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0==1,isChrome:/chrom(e|ium)/.test(navigator.userAgent.toLowerCase()),isIE:window.navigator.userAgent.indexOf("Trident/")>0==1,debugState:!1,rippleEffect:!0,mythemeAnchor:"#mytheme",activateLastTab:!0,navAnchor:$("#clx-primary-navigation"),navHooks:$("#clx-navigation-menu"),navAccordion:!0,navInitalized:"js-nav-built",navFilterInput:$("#nav_filter_input"),navHorizontalWrapperId:"clx-navigation-menu-wrapper",navSpeed:500,mythemeColorProfileID:$("#js-color-profile"),navClosedSign:"fal fa-angle-down",navOpenedSign:"fal fa-angle-up",appIconPrefix:"fal",appDateHook:$(".js-get-date"),storeLocally:!0,jsArray:[]};!function(t){t.fn.extend({navigation:function(e){var i=t.extend({accordion:!0,animate:"easeOutExpo",speed:200,closedSign:"[+]",openedSign:"[-]",initClass:"js-nav-built"},e),n=t(this);n.hasClass(i.initClass)?myapp_config.debugState&&console.log(n.get(0)+" this menu already exists"):(n.addClass(i.initClass),n.find("li").each((function(){0!==t(this).find("ul").length&&(t(this).find("a:first").append("<b class='collapse-sign'>"+i.closedSign+"</b>"),"#"==t(this).find("a:first").attr("href")&&t(this).find("a:first").click((function(){return!1})))})),n.find("li.active").each((function(){t(this).parents("ul").parent("li").find("a:first").attr("aria-expanded",!0).find("b:first").html(i.openedSign)})),n.find("li a").on("mousedown",(function(e){0!==t(this).parent().find("ul").length&&(i.accordion&&(t(this).parent().find("ul").is(":visible")||(parents=t(this).parent().parents("ul"),visible=n.find("ul:visible"),visible.each((function(e){var n=!0;parents.each((function(t){if(parents[t]==visible[e])return n=!1,!1})),n&&t(this).parent().find("ul")!=visible[e]&&t(visible[e]).slideUp(i.speed+300,i.animate,(function(){t(this).parent("li").removeClass("open").find("a:first").attr("aria-expanded",!1).find("b:first").html(i.closedSign),myapp_config.debugState&&console.log("nav item closed")}))})))),t(this).parent().find("ul:first").is(":visible")&&!t(this).parent().find("ul:first").hasClass("active")?t(this).parent().find("ul:first").slideUp(i.speed+100,i.animate,(function(){t(this).parent("li").removeClass("open").find("a:first").attr("aria-expanded",!1).find("b:first").delay(i.speed).html(i.closedSign),myapp_config.debugState&&console.log("nav item closed")})):t(this).parent().find("ul:first").slideDown(i.speed,i.animate,(function(){t(this).parent("li").addClass("open").find("a:first").attr("aria-expanded",!0).find("b:first").delay(i.speed).html(i.openedSign),myapp_config.debugState&&console.log("nav item opened")})))})))},navigationDestroy:function(){self=t(this),self.hasClass(myapp_config.navInitalized)?(self.find("li").removeClass("active open"),self.find("li a").off("mousedown").removeClass("active").removeAttr("aria-expanded").find(".collapse-sign").remove(),self.removeClass(myapp_config.navInitalized).find("ul").removeAttr("style"),myapp_config.debugState&&console.log(self.get(0)+" destroyed")):console.log("menu does not exist")}})}(jQuery,window,document),function(t){function e(e,i){var n=t(e),o=e;function r(t){void 0!==i[t]&&i[t].call(o)}return i=t.extend({},t.fn.menuSlider.defaults,i),function(){n.css("margin-left","0px"),n.wrap('<div id="'+i.wrapperId+'" class="nav-menu-wrapper d-flex flex-grow-1 width-0 overflow-hidden"></div>'),t("#"+i.wrapperId).before('<a href="#" id="'+i.wrapperId+'-left-btn" class="d-flex align-items-center justify-content-center width-4 btn mt-1 mb-1 mr-2 ml-1 p-0 fs-xxl text-primary"><i class="fal fa-angle-left"></i></a>'),t("#"+i.wrapperId).after('<a href="#" id="'+i.wrapperId+'-right-btn" class="d-flex align-items-center justify-content-center width-4 btn mt-1 mb-1 mr-1 ml-2 p-0 fs-xxl text-primary"><i class="fal fa-angle-right"></i></a>'),t.map(n.children("li:not(.nav-title)"),(function(e){return t(e).outerWidth(!0)}));var e,o,s,a,l=function(){e=t("#"+i.wrapperId).outerWidth(),s=t.map(n.children("li:not(.nav-title)"),(function(e){return t(e).outerWidth(!0)})).reduce((function(t,e){return t+e}),0),o=parseFloat(n.css("margin-left"))};t("#"+i.wrapperId+"-left-btn").click((function(t){l(),o<0?a=Math.min(o+e,0):(a=o,console.log("left end")),n.css({marginLeft:a}),t.preventDefault()})),t("#"+i.wrapperId+"-right-btn").click((function(t){l(),-o+e<s?a=Math.max(o-e,-(s-e)):(a=o,console.log("right end")),n.css({marginLeft:a}),t.preventDefault()})),r("onInit")}(),{option:function(t,e){if(!e)return i[t];i[t]=e},destroy:function(e){n.each((function(){var e=t(this);e.css("margin-left","0px"),e.unwrap(parent),e.prev().off().remove(),e.next().off().remove(),r("onDestroy"),e.removeData("plugin_menuSlider")}))}}}t.fn.menuSlider=function(i){if("string"==typeof arguments[0]){var n,o=arguments[0],r=Array.prototype.slice.call(arguments,1);return this.each((function(){if(!t.data(this,"plugin_menuSlider")||"function"!=typeof t.data(this,"plugin_menuSlider")[o])throw new Error("Method "+o+" does not exist on jQuery.menuSlider");n=t.data(this,"plugin_menuSlider")[o].apply(this,r)})),void 0!==n?n:this}if("object"==typeof i||!i)return this.each((function(){t.data(this,"plugin_menuSlider")||t.data(this,"plugin_menuSlider",new e(this,i))}))},t.fn.menuSlider.defaults={onInit:function(){},onDestroy:function(){},element:myapp_config.navHooks,wrapperId:myapp_config.navHorizontalWrapperId}}(jQuery);var initApp=function(t){return t.listFilter=function(t,e,i){i?$(i).addClass("clx-filterable-list"):$(t).addClass("clx-filterable-list"),$(e).change((function(){var e=$(this).val().toLowerCase(),i=$(t).next().filter(".js-filter-message");return e.length>1?($(t).find($("[data-filter-tags]:not([data-filter-tags*='"+e+"'])")).parentsUntil(t).removeClass("js-filter-show").addClass("js-filter-hide"),$(t).find($("[data-filter-tags*='"+e+"']")).parentsUntil(t).removeClass("js-filter-hide").addClass("js-filter-show"),i&&i.text("showing "+$(t).find("li.js-filter-show").length+" from "+$(t).find("[data-filter-tags]").length+" total")):($(t).find("[data-filter-tags]").parentsUntil(t).removeClass("js-filter-hide js-filter-show"),i&&i.text("")),!1})).keyup($.debounce(myapp_config.filterDelay,(function(t){$(this).change()})))},t.loadScript=function(t,e){if(myapp_config.jsArray[t])myapp_config.debugState&&console.log("This script was already loaded: "+t);else{var i=jQuery.Deferred(),n=document.getElementsByTagName("body")[0],o=document.createElement("script");o.type="text/javascript",o.src=t,o.onload=function(){i.resolve()},n.appendChild(o),myapp_config.jsArray[t]=i.promise()}myapp_config.jsArray[t].then((function(){"function"==typeof e&&e()}))},t.saveSettings=function(){"undefined"!=typeof saveSettings&&$.isFunction(saveSettings)&&myapp_config.storeLocally?(initApp.accessIndicator(),saveSettings(),myapp_config.debugState&&console.log("Theme settings: \n"+localStorage.getItem("themeSettings"))):console.log("save function does not exist")},t.updateTheme=function(t,e){$.get(base_url+"settings/set_color/"+t,(function(t){location.reload()}))},t.resetSettings=function(){myapp_config.root_.removeClass((function(t,e){return(e.match(/(^|\s)(nav-|header-|footer-|mod-|display-)\S+/g)||[]).join(" ")})),$(myapp_config.mythemeAnchor).attr("href",""),initApp.checkNavigationOrientation(),initApp.saveSettings(),myapp_config.debugState&&console.log("App reset successful")},t.factoryReset=function(){initApp.playSound("media/sound","messagebox"),$(".js-modal-settings").modal("hide"),"undefined"!=typeof bootbox?bootbox.confirm({title:"<i class='"+myapp_config.appIconPrefix+" fa-exclamation-triangle text-warning mr-2'></i> You are about to reset all of your localStorage settings",message:"<span><strong>Warning:</strong> This action is not reversable. You will lose all your layout settings.</span>",centerVertical:!0,swapButtonOrder:!0,buttons:{confirm:{label:"Factory Reset",className:"btn-warning shadow-0"},cancel:{label:"Cancel",className:"btn-success"}},className:"modal-alert",closeButton:!1,callback:function(t){1==t&&(localStorage.clear(),initApp.resetSettings(),location.reload())}}):confirm("You are about to reset all of your localStorage to null state. Do you wish to continue?")&&(localStorage.clear(),initApp.resetSettings(),location.reload()),myapp_config.debugState&&console.log("App reset successful")},t.accessIndicator=function(){myapp_config.root_.addClass("saving").delay(600).queue((function(){return $(this).removeClass("saving").dequeue(),!0}))},t.pushSettings=function(t,e){return 0!=e&&localStorage.setItem("themeSettings",""),myapp_config.root_.addClass(t),initApp.checkNavigationOrientation(),0!=e&&initApp.saveSettings(),t},t.removeSettings=function(t){if(null!=t){var e=initApp.getSettings().replace(t,"");myapp_config.root_.removeClass((function(t,e){return(e.match(/(^|\s)(nav-|header-|footer-|mod-|display-)\S+/g)||[]).join(" ")})),initApp.pushSettings(e)}else console.log("ERROR: You must specify the class you need to remove")},t.getSettings=function(){return myapp_config.root_.attr("class").split(/[^\w-]+/).filter((function(t){return/^(nav|header|footer|mod|display)-/i.test(t)})).join(" ")},t.playSound=function(t,e){var i=document.createElement("audio");navigator.userAgent.match("Firefox/")?i.setAttribute("src",t+"/"+e+".ogg"):i.setAttribute("src",t+"/"+e+".mp3"),i.addEventListener("load",(function(){i.play()}),!0),i.pause(),i.play()},t.detectBrowserType=function(){return myapp_config.isChrome?(myapp_config.root_.addClass("chrome webkit"),"chrome webkit"):myapp_config.isWebkit?(myapp_config.root_.addClass("webkit"),"webkit"):myapp_config.isIE?(myapp_config.root_.addClass("ie"),"ie"):void 0},t.addDeviceType=function(){return myapp_config.isMobile?(myapp_config.root_.addClass("mobile"),myapp_config.thisDevice="mobile"):(myapp_config.root_.addClass("desktop"),myapp_config.thisDevice="desktop"),myapp_config.thisDevice},t.windowScrollEvents=function(){myapp_config.root_.is(".nav-function-hidden.clx-fixed-header:not(.clx-navigation-type-top)")&&"desktop"===myapp_config.thisDevice?myapp_config.root_logo.css({top:$(window).scrollTop()}):myapp_config.root_.is(".clx-fixed-header:not(.clx-navigation-type-top):not(.nav-function-hidden)")&&"desktop"===myapp_config.thisDevice&&myapp_config.root_logo.attr("style","")},t.checkNavigationOrientation=function(){switch(!0){case myapp_config.root_.hasClass("clx-fixed-navigation")&&!myapp_config.root_.is(".clx-navigation-type-top, .nav-function-minify, .mod-main-boxed")&&"desktop"===myapp_config.thisDevice:void 0!==$.fn.slimScroll?(myapp_config.navAnchor.slimScroll({height:"100%",color:"#fff",size:"4px",distance:"4px",railOpacity:.4,wheelStep:10}),document.getElementById(myapp_config.navHorizontalWrapperId)&&(myapp_config.navHooks.menuSlider("destroy"),myapp_config.debugState&&console.log("----top controls destroyed")),myapp_config.debugState&&console.log("slimScroll created")):console.log("$.fn.slimScroll...NOT FOUND");break;case myapp_config.navAnchor.parent().hasClass("slimScrollDiv")&&"desktop"===myapp_config.thisDevice&&void 0!==$.fn.slimScroll:myapp_config.navAnchor.slimScroll({destroy:!0}),myapp_config.navAnchor.attr("style",""),events=jQuery._data(myapp_config.navAnchor[0],"events"),events&&jQuery._removeData(myapp_config.navAnchor[0],"events"),myapp_config.debugState&&console.log("slimScroll destroyed")}switch(!0){case $.fn.menuSlider&&myapp_config.root_.hasClass("clx-navigation-type-top")&&0==$("#clx-navigation-menu-wrapper").length&&!myapp_config.root_.hasClass("mobile-view-activated"):myapp_config.navHooks.menuSlider({element:myapp_config.navHooks,wrapperId:myapp_config.navHorizontalWrapperId}),myapp_config.debugState&&console.log("----top controls created -- case 1");break;case myapp_config.root_.hasClass("clx-navigation-type-top")&&1==$("#clx-navigation-menu-wrapper").length&&myapp_config.root_.hasClass("mobile-view-activated"):myapp_config.navHooks.menuSlider("destroy"),myapp_config.debugState&&console.log("----top controls destroyed -- case 2");break;case!myapp_config.root_.hasClass("clx-navigation-type-top")&&1==$("#clx-navigation-menu-wrapper").length:myapp_config.navHooks.menuSlider("destroy"),myapp_config.debugState&&console.log("----top controls destroyed -- case 3")}},t.buildNavigation=function(t){if($.fn.navigation)return $(t).navigation({accordion:myapp_config.navAccordion,speed:myapp_config.navSpeed,closedSign:'<em class="'+myapp_config.navClosedSign+'"></em>',openedSign:'<em class="'+myapp_config.navOpenedSign+'"></em>',initClass:myapp_config.navInitalized}),t;myapp_config.debugState&&console.log("WARN: navigation plugin missing")},t.destroyNavigation=function(t){if($.fn.navigation)return $(t).navigationDestroy(),t;myapp_config.debugState&&console.log("WARN: navigation plugin missing")},t.appForms=function(t,e,i){$(t).each((function(){var i=$(this).find(".form-control");i.on("focus",(function(){!function(t,e,i){$(t).parents(e).addClass(i)}(this,t,e)})),i.on("blur",(function(){!function(t,e,i){$(t).parents(e).removeClass(i)}(this,t,e)}))}))},t.mobileCheckActivation=function(){return window.innerWidth<myapp_config.mobileResolutionTrigger?(myapp_config.root_.addClass("mobile-view-activated"),myapp_config.mobileMenuTrigger=!0):(myapp_config.root_.removeClass("mobile-view-activated"),myapp_config.mobileMenuTrigger=!1),myapp_config.debugState&&console.log("mobileCheckActivation on "+$(window).width()+" | activated: "+myapp_config.mobileMenuTrigger),myapp_config.mobileMenuTrigger},t.toggleVisibility=function(t){var e=document.getElementById(t);"block"==e.style.display?e.style.display="none":e.style.display="block"},t.domReadyMisc=function(){if($(".custom-file input").change((function(t){for(var e=[],i=0;i<$(this)[0].files.length;i++)e.push($(this)[0].files[i].name);$(this).next(".custom-file-label").html(e.join(", "))})),$(".modal-backdrop-transparent").on("show.bs.modal",(function(t){setTimeout((function(){$(".modal-backdrop").addClass("modal-backdrop-transparent")}))})),myapp_config.appDateHook.length){var t=new Date,e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t.getDay()]+", "+["January","February","March","April","May","June","July","August","September","October","November","December"][t.getMonth()]+" "+t.getDate()+", "+t.getFullYear();myapp_config.appDateHook.text(e)}if(initApp.checkNavigationOrientation(),myapp_config.activateLastTab){var i=localStorage.getItem("lastTab");$('a[data-toggle="tab"]').on("shown.bs.tab",(function(t){localStorage.setItem("lastTab",$(this).attr("href"))})),i&&$('[href="'+i+'"]').tab("show")}if(void 0!==$.fn.slimScroll&&"desktop"===myapp_config.thisDevice?($(".custom-scroll:not(.disable-slimscroll) >:first-child").slimscroll({height:$(this).data("scrollHeight")||"100%",size:$(this).data("scrollSize")||"4px",position:$(this).data("scrollPosition")||"right",color:$(this).data("scrollColor")||"rgba(0,0,0,0.6)",alwaysVisible:$(this).data("scrollAlwaysVisible")||!1,distance:$(this).data("scrollDistance")||"4px",railVisible:$(this).data("scrollRailVisible")||!1,railColor:$(this).data("scrollRailColor")||"#fafafa",allowPageScroll:!1,disableFadeOut:!1}),myapp_config.debugState&&console.log("%c✔ SlimScroll plugin active","color: #148f32")):(console.log("WARN! $.fn.slimScroll not loaded or user is on desktop"),myapp_config.root_.addClass("no-slimscroll")),void 0!==initApp.listFilter&&$.isFunction(initApp.listFilter)&&$("[data-listfilter]").length){var n=$("[data-listfilter]").attr("id"),o=$("[data-listfilter]").attr("data-listfilter");initApp.listFilter(o,"#"+n)}if(void 0!==$.fn.tooltip&&$('[data-toggle="tooltip"]').length&&$('[data-toggle="tooltip"]').tooltip(),void 0!==$.fn.popover&&$('[data-toggle="popover"]').length&&($.fn.tooltip.Constructor.Default.whiteList,$('[data-toggle="popover"]').popover({sanitize:!1})),$(document).on("click",".dropdown-menu:not(.js-auto-close):not(.note-dropdown-menu)",(function(t){t.stopPropagation()})),window.Waves&&myapp_config.rippleEffect?(Waves.attach(".nav-menu:not(.js-waves-off) a, .btn:not(.js-waves-off):not(.btn-switch), .js-waves-on",["waves-themed"]),Waves.init(),myapp_config.debugState&&console.log("%c✔ Waves plugin active","color: #148f32")):myapp_config.debugState&&console.log("%c✘ Waves plugin inactive! ","color: #fd3995"),myapp_config.root_.on("click touchend","[data-action]",(function(t){var e=$(this).data("action");switch(!0){case"toggle"===e:var i=$(this).attr("data-target")||myapp_config.root_,n=$(this).attr("data-class"),o=$(this).attr("data-focus");-1!==n.indexOf("mod-bg-")&&$(i).removeClass((function(t,e){return(e.match(/(^|\s)mod-bg-\S+/g)||[]).join(" ")})),$(i).toggleClass(n),$(this).hasClass("dropdown-item")&&$(this).toggleClass("active"),null!=o&&setTimeout((function(){$("#"+o).focus()}),200),"undefined"==typeof classHolder&&null==classHolder||(initApp.checkNavigationOrientation(),initApp.saveSettings());break;case"toggle-swap"===e:i=$(this).attr("data-target"),n=$(this).attr("data-class"),$(i).removeClass().addClass(n),n.startsWith("root-text")&&($("[data-class]").removeClass("active"),$('[data-class="'+n+'"]').addClass("active")),$.post(base_url+"settings/save-font-size",{size:n});break;case"toggle-replace"===e:i=$(this).attr("data-target")||myapp_config.root_;var r=$(this).attr("data-replaceclass");n=$(this).attr("data-class")||"",savetoLocal=$(this).attr("data-savetolocal")||!0,$(i).removeClass(r).addClass(n),!0===savetoLocal&&initApp.saveSettings();break;case"panel-collapse"===e:(s=$(this).closest(".panel")).children(".panel-container").collapse("toggle").on("show.bs.collapse",(function(){s.removeClass("panel-collapsed"),myapp_config.debugState&&console.log("panel id:"+s.attr("id")+" | action: uncollapsed")})).on("hidden.bs.collapse",(function(){s.addClass("panel-collapsed"),myapp_config.debugState&&console.log("panel id:"+s.attr("id")+" | action: collapsed")}));break;case"panel-fullscreen"===e:(s=$(this).closest(".panel")).toggleClass("panel-fullscreen"),myapp_config.root_.toggleClass("panel-fullscreen"),myapp_config.debugState&&console.log("panel id:"+s.attr("id")+" | action: fullscreen");break;case"panel-close"===e:var s=$(this).closest(".panel"),a=function(){s.fadeOut(500,(function(){$(this).remove(),myapp_config.debugState&&console.log("panel id:"+s.attr("id")+" | action: removed")}))};"undefined"!=typeof bootbox?(initApp.playSound("media/sound","messagebox"),bootbox.confirm({title:"<i class='"+myapp_config.appIconPrefix+" fa-times-circle text-danger mr-2'></i> Do you wish to delete panel <span class='fw-500'>&nbsp;'"+s.children(".panel-hdr").children("h2").text().trim()+"'&nbsp;</span>?",message:"<span><strong>Warning:</strong> This action cannot be undone!</span>",centerVertical:!0,swapButtonOrder:!0,buttons:{confirm:{label:"Yes",className:"btn-danger shadow-0"},cancel:{label:"No",className:"btn-default"}},className:"modal-alert",closeButton:!1,callback:function(t){1==t&&a()}})):confirm("Do you wish to delete panel "+s.children(".panel-hdr").children("h2").text().trim()+"?")&&a();break;case"theme-update"===e:initApp.updateTheme($(this).attr("data-theme"),$(this).attr("data-themesave"));break;case"app-reset"===e:initApp.resetSettings();break;case"factory-reset"===e:initApp.factoryReset();break;case"app-print"===e:window.print();break;case"app-loadscript"===e:var l=$(this).attr("data-loadurl"),c=$(this).attr("data-loadfunction");initApp.loadScript(l,c);break;case"lang"===e:var d=$(this).attr("data-lang").toString();$.i18n?i18n.setLng(d,(function(){$("[data-i18n]").i18n(),$("[data-lang]").removeClass("active"),$(this).addClass("active")})):initApp.loadScript("js/i18n/i18n.js",(function(){$.i18n.init({resGetPath:"media/data/__lng__.json",load:"unspecific",fallbackLng:!1,lng:d},(function(t){$("[data-i18n]").i18n(),$("[data-lang]").removeClass("active"),$('[data-lang="'+d+'"]').addClass("active")}))}));break;case"app-fullscreen"===e:document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?(document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),myapp_config.debugState&&console.log("%capp fullscreen toggle inactive! ","color: #ed1c24")):(document.documentElement.requestFullscreen?document.documentElement.requestFullscreen():document.documentElement.msRequestFullscreen?document.documentElement.msRequestFullscreen():document.documentElement.mozRequestFullScreen?document.documentElement.mozRequestFullScreen():document.documentElement.webkitRequestFullscreen&&document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT),myapp_config.debugState&&console.log("app fullscreen toggle active"));break;case"playsound"===e:var h=$(this).attr("data-soundpath")||"media/sound/",u=$(this).attr("data-soundfile");initApp.playSound(h,u)}$(this).tooltip("hide"),myapp_config.debugState&&console.log("data-action clicked: "+e),t.stopPropagation(),t.preventDefault()})),navigator.userAgent.match(/IEMobile\/10\.0/)){var r=document.createElement("style");r.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.head.appendChild(r)}myapp_config.debugState&&console.log("%c✔ Finished app.init() v"+myapp_config.VERSION+"\n---------------------------","color: #148f32")},t}({}),layouts=function(t){return t.errorMessage=function(t){console.log("('"+t+"') is not a valid entry, enter 'on' or 'off'")},t.fixedHeader=function(t){"on"===t?initApp.pushSettings("clx-fixed-header"):"off"===t?initApp.removeSettings("clx-fixed-header"):layouts.errorMessage(t)},t.fixedNavigation=function(t){"on"===t?initApp.pushSettings("clx-fixed-navigation"):"off"===t?initApp.removeSettings("clx-fixed-navigation"):layouts.errorMessage(t)},t.minifyNavigation=function(t){"on"===t?initApp.pushSettings("nav-function-minify"):"off"===t?initApp.removeSettings("nav-function-minify"):layouts.errorMessage(t)},t.hideNavigation=function(t){"on"===t?initApp.pushSettings("nav-function-hidden"):"off"===t?initApp.removeSettings("nav-function-hidden"):layouts.errorMessage(t)},t.horizontalNavigation=function(t){"on"===t?initApp.pushSettings("clx-navigation-type-top"):"off"===t?initApp.removeSettings("clx-navigation-type-top"):layouts.errorMessage(t)},t.fixedFooter=function(t){"on"===t?initApp.pushSettings("footer-function-fixed"):"off"===t?initApp.removeSettings("footer-function-fixed"):layouts.errorMessage(t)},t.boxed=function(t){"on"===t?initApp.pushSettings("mod-main-boxed"):"off"===t?initApp.removeSettings("mod-main-boxed"):layouts.errorMessage(t)},t.pushContent=function(t){"on"===t?initApp.pushSettings("nav-mobile-push"):"off"===t?initApp.removeSettings("nav-mobile-push"):layouts.errorMessage(t)},t.overlay=function(t){"on"===t?initApp.pushSettings("nav-mobile-no-overlay"):"off"===t?initApp.removeSettings("nav-mobile-no-overlay"):layouts.errorMessage(t)},t.offCanvas=function(t){"on"===t?initApp.pushSettings("nav-mobile-slide-out"):"off"===t?initApp.removeSettings("nav-mobile-slide-out"):layouts.errorMessage(t)},t.bigFonts=function(t){"on"===t?initApp.pushSettings("mod-bigger-font"):"off"===t?initApp.removeSettings("mod-bigger-font"):layouts.errorMessage(t)},t.highContrast=function(t){"on"===t?initApp.pushSettings("mod-high-contrast"):"off"===t?initApp.removeSettings("mod-high-contrast"):layouts.errorMessage(t)},t.colorblind=function(t){"on"===t?initApp.pushSettings("mod-color-blind"):"off"===t?initApp.removeSettings("mod-color-blind"):layouts.errorMessage(t)},t.preloadInside=function(t){"on"===t?initApp.pushSettings("mod-pace-custom"):"off"===t?initApp.removeSettings("mod-pace-custom"):layouts.errorMessage(t)},t.panelIcons=function(t){"on"===t?initApp.pushSettings("mod-panel-icon"):"off"===t?initApp.removeSettings("mod-panel-icon"):layouts.errorMessage(t)},t.cleanBackground=function(t){"on"===t?initApp.pushSettings("mod-clean-page-bg"):"off"===t?initApp.removeSettings("mod-clean-page-bg"):layouts.errorMessage(t)},t.hideNavIcons=function(t){"on"===t?initApp.pushSettings("mod-hide-nav-icons"):"off"===t?initApp.removeSettings("mod-hide-nav-icons"):layouts.errorMessage(t)},t.noAnimation=function(t){"on"===t?initApp.pushSettings("mod-disable-animation"):"off"===t?initApp.removeSettings("mod-disable-animation"):layouts.errorMessage(t)},t.hideInfoCard=function(t){"on"===t?initApp.pushSettings("mod-hide-info-card"):"off"===t?initApp.removeSettings("mod-hide-info-card"):layouts.errorMessage(t)},t.leanSubheader=function(t){"on"===t?initApp.pushSettings("mod-lean-subheader"):"off"===t?initApp.removeSettings("mod-lean-subheader"):layouts.errorMessage(t)},t.hierarchicalNav=function(t){"on"===t?initApp.pushSettings("mod-nav-link"):"off"===t?initApp.removeSettings("mod-nav-link"):layouts.errorMessage(t)},t.darkNav=function(t){"on"===t?initApp.pushSettings("mod-nav-dark"):"off"===t?initApp.removeSettings("mod-nav-dark"):layouts.errorMessage(t)},t.theme=function(t,e){initApp.updateTheme(t,e)},t.mode=function(t){switch(!0){case"default"===t:initApp.removeSettings("mod-skin-light",!1),initApp.removeSettings("mod-skin-dark",!0);break;case"light"===t:initApp.removeSettings("mod-skin-dark",!1),initApp.pushSettings("mod-skin-light",!0);break;case"dark"===t:initApp.removeSettings("mod-skin-light",!1),initApp.pushSettings("mod-skin-dark",!0);break;default:console.log("('"+t+"') is not a valid entry, enter 'default', 'light', or 'dark'")}},t}({});$(window).resize($.throttle(myapp_config.throttleDelay,(function(t){initApp.mobileCheckActivation(),initApp.checkNavigationOrientation()}))),$(window).scroll($.throttle(myapp_config.throttleDelay,(function(t){}))),$(window).on("scroll",initApp.windowScrollEvents),document.addEventListener("DOMContentLoaded",(function(){initApp.addDeviceType(),initApp.detectBrowserType(),initApp.mobileCheckActivation(),initApp.buildNavigation(myapp_config.navHooks),initApp.listFilter(myapp_config.navHooks,myapp_config.navFilterInput,myapp_config.navAnchor),initApp.domReadyMisc(),initApp.appForms(".input-group","has-length","has-disabled")})),$(window).on("orientationchange",(function(t){myapp_config.debugState&&console.log("orientationchange event")}));var color=function(){return 0===$(myapp_config.mythemeColorProfileID).length?{primary:{_50:"#ccbfdf",_100:"#beaed7",_200:"#b19dce",_300:"#a38cc6",_400:"#967bbd",_500:"#886ab5",_600:"#7a59ad",_700:"#6e4e9e",_800:"#62468d",_900:"#563d7c"},success:{_50:"#7aece0",_100:"#63e9db",_200:"#4de5d5",_300:"#37e2d0",_400:"#21dfcb",_500:"#1dc9b7",_600:"#1ab3a3",_700:"#179c8e",_800:"#13867a",_900:"#107066"},info:{_50:"#9acffa",_100:"#82c4f8",_200:"#6ab8f7",_300:"#51adf6",_400:"#39a1f4",_500:"#2196F3",_600:"#0d8aee",_700:"#0c7cd5",_800:"#0a6ebd",_900:"#0960a5"},warning:{_50:"#ffebc1",_100:"#ffe3a7",_200:"#ffdb8e",_300:"#ffd274",_400:"#ffca5b",_500:"#ffc241",_600:"#ffba28",_700:"#ffb20e",_800:"#f4a500",_900:"#da9400"},danger:{_50:"#feb7d9",_100:"#fe9ecb",_200:"#fe85be",_300:"#fe6bb0",_400:"#fd52a3",_500:"#fd3995",_600:"#fd2087",_700:"#fc077a",_800:"#e7026e",_900:"#ce0262"},fusion:{_50:"#909090",_100:"#838383",_200:"#767676",_300:"#696969",_400:"#5d5d5d",_500:"#505050",_600:"#434343",_700:"#363636",_800:"#2a2a2a",_900:"#1d1d1d"}}:{primary:{_50:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-50").css("color"))||"#ccbfdf",_100:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-100").css("color"))||"#beaed7",_200:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-200").css("color"))||"#b19dce",_300:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-300").css("color"))||"#a38cc6",_400:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-400").css("color"))||"#967bbd",_500:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-500").css("color"))||"#886ab5",_600:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-600").css("color"))||"#7a59ad",_700:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-700").css("color"))||"#6e4e9e",_800:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-800").css("color"))||"#62468d",_900:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-primary-900").css("color"))||"#563d7c"},success:{_50:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-50").css("color"))||"#7aece0",_100:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-100").css("color"))||"#63e9db",_200:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-200").css("color"))||"#4de5d5",_300:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-300").css("color"))||"#37e2d0",_400:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-400").css("color"))||"#21dfcb",_500:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-500").css("color"))||"#1dc9b7",_600:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-600").css("color"))||"#1ab3a3",_700:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-700").css("color"))||"#179c8e",_800:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-800").css("color"))||"#13867a",_900:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-success-900").css("color"))||"#107066"},info:{_50:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-50").css("color"))||"#9acffa",_100:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-100").css("color"))||"#82c4f8",_200:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-200").css("color"))||"#6ab8f7",_300:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-300").css("color"))||"#51adf6",_400:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-400").css("color"))||"#39a1f4",_500:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-500").css("color"))||"#2196F3",_600:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-600").css("color"))||"#0d8aee",_700:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-700").css("color"))||"#0c7cd5",_800:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-800").css("color"))||"#0a6ebd",_900:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-info-900").css("color"))||"#0960a5"},warning:{_50:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-50").css("color"))||"#ffebc1",_100:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-100").css("color"))||"#ffe3a7",_200:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-200").css("color"))||"#ffdb8e",_300:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-300").css("color"))||"#ffd274",_400:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-400").css("color"))||"#ffca5b",_500:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-500").css("color"))||"#ffc241",_600:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-600").css("color"))||"#ffba28",_700:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-700").css("color"))||"#ffb20e",_800:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-800").css("color"))||"#f4a500",_900:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-warning-900").css("color"))||"#da9400"},danger:{_50:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-50").css("color"))||"#feb7d9",_100:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-100").css("color"))||"#fe9ecb",_200:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-200").css("color"))||"#fe85be",_300:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-300").css("color"))||"#fe6bb0",_400:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-400").css("color"))||"#fd52a3",_500:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-500").css("color"))||"#fd3995",_600:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-600").css("color"))||"#fd2087",_700:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-700").css("color"))||"#fc077a",_800:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-800").css("color"))||"#e7026e",_900:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-danger-900").css("color"))||"#ce0262"},fusion:{_50:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-50").css("color"))||"#909090",_100:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-100").css("color"))||"#838383",_200:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-200").css("color"))||"#767676",_300:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-300").css("color"))||"#696969",_400:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-400").css("color"))||"#5d5d5d",_500:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-500").css("color"))||"#505050",_600:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-600").css("color"))||"#434343",_700:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-700").css("color"))||"#363636",_800:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-800").css("color"))||"#2a2a2a",_900:rgb2hex(myapp_config.mythemeColorProfileID.find(".color-fusion-900").css("color"))||"#1d1d1d"}}};function confirmThenGoToUrl(t,e){t.preventDefault(),Swal.fire({title:clx.i18n.are_you_sure,icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:clx.i18n.yes,cancelButtonText:clx.i18n.no}).then((t=>{t.value&&(window.location=clx.base_url+e)}))}function appNumberFormat(t,e,i,n){var o=isFinite(+t)?+t:0,r=isFinite(+e)?Math.abs(e):0,s=void 0===n?",":n,a=void 0===i?".":i,l=(r?function(t,e){var i=Math.pow(10,e);return Math.round(t*i)/i}(o,r):Math.round(o)).toString().split(".");return l[0].length>3&&(l[0]=l[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(l[1]||"").length<r&&(l[1]=l[1]||"",l[1]+=new Array(r-l[1].length+1).join("0")),l.join(a)}function appFormatCurrency(t,e){let i=e.symbol,n=e.decimal_mark,o=e.thousands_separator,r="",s="";return e.symbol_first?r=i+" ":s=" "+i,r+appNumberFormat(t,2,n,o)+s}function appParseAmount(t,e,i){let n=2;return""===t?0:(void 0!==i&&(n=i),t=","===e.decimal_mark?(t=t.split(".").join("")).replace(",","."):t.replace(",",""),parseFloat(t).toFixed(n))}(()=>{var t={955:()=>{!function(t,e,i,n){"use strict";if(t.console=t.console||{info:function(t){}},i)if(i.fn.fancybox)console.info("fancyBox already initialized");else{var o,r,s,a,l={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:i.noop,beforeLoad:i.noop,afterLoad:i.noop,beforeShow:i.noop,afterShow:i.noop,beforeClose:i.noop,afterClose:i.noop,onActivate:i.noop,onDeactivate:i.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},c=i(t),d=i(e),h=0,u=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)},p=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)},f=function(){var t,i=e.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(i.style[t]!==n)return o[t];return"transitionend"}(),g=function(t){return t&&t.length&&t[0].offsetHeight},m=function(t,e){var n=i.extend(!0,{},t,e);return i.each(e,(function(t,e){i.isArray(e)&&(n[t]=e)})),n},v=function(t,e,n){var o=this;o.opts=m({index:n},i.fancybox.defaults),i.isPlainObject(e)&&(o.opts=m(o.opts,e)),i.fancybox.isMobile&&(o.opts=m(o.opts,o.opts.mobile)),o.id=o.opts.id||++h,o.currIndex=parseInt(o.opts.index,10)||0,o.prevIndex=null,o.prevPos=null,o.currPos=0,o.firstRun=!0,o.group=[],o.slides={},o.addContent(t),o.group.length&&o.init()};i.extend(v.prototype,{init:function(){var n,o,r=this,s=r.group[r.currIndex].opts;s.closeExisting&&i.fancybox.close(!0),i("body").addClass("fancybox-active"),!i.fancybox.getInstance()&&!1!==s.hideScrollbar&&!i.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(i("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(t.innerWidth-e.documentElement.clientWidth)+"px;}</style>"),i("body").addClass("compensate-for-scrollbar")),o="",i.each(s.buttons,(function(t,e){o+=s.btnTpl[e]||""})),n=i(r.translate(r,s.baseTpl.replace("{{buttons}}",o).replace("{{arrows}}",s.btnTpl.arrowLeft+s.btnTpl.arrowRight))).attr("id","fancybox-container-"+r.id).addClass(s.baseClass).data("FancyBox",r).appendTo(s.parentEl),r.$refs={container:n},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach((function(t){r.$refs[t]=n.find(".fancybox-"+t)})),r.trigger("onInit"),r.activate(),r.jumpTo(r.currIndex)},translate:function(t,e){var i=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,(function(t,e){return i[e]===n?t:i[e]}))},addContent:function(t){var e,o=this,r=i.makeArray(t);i.each(r,(function(t,e){var r,s,a,l,c,d={},h={};i.isPlainObject(e)?(d=e,h=e.opts||e):"object"===i.type(e)&&i(e).length?(h=(r=i(e)).data()||{},(h=i.extend(!0,{},h,h.options)).$orig=r,d.src=o.opts.src||h.src||r.attr("href"),d.type||d.src||(d.type="inline",d.src=e)):d={type:"html",src:e+""},d.opts=i.extend(!0,{},o.opts,h),i.isArray(h.buttons)&&(d.opts.buttons=h.buttons),i.fancybox.isMobile&&d.opts.mobile&&(d.opts=m(d.opts,d.opts.mobile)),s=d.type||d.opts.type,l=d.src||"",!s&&l&&((a=l.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(s="video",d.opts.video.format||(d.opts.video.format="video/"+("ogv"===a[1]?"ogg":a[1]))):l.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":l.match(/\.(pdf)((\?|#).*)?$/i)?(s="iframe",d=i.extend(!0,d,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===l.charAt(0)&&(s="inline")),s?d.type=s:o.trigger("objectNeedsType",d),d.contentType||(d.contentType=i.inArray(d.type,["html","inline","ajax"])>-1?"html":d.type),d.index=o.group.length,"auto"==d.opts.smallBtn&&(d.opts.smallBtn=i.inArray(d.type,["html","inline","ajax"])>-1),"auto"===d.opts.toolbar&&(d.opts.toolbar=!d.opts.smallBtn),d.$thumb=d.opts.$thumb||null,d.opts.$trigger&&d.index===o.opts.index&&(d.$thumb=d.opts.$trigger.find("img:first"),d.$thumb.length&&(d.opts.$orig=d.opts.$trigger)),d.$thumb&&d.$thumb.length||!d.opts.$orig||(d.$thumb=d.opts.$orig.find("img:first")),d.$thumb&&!d.$thumb.length&&(d.$thumb=null),d.thumb=d.opts.thumb||(d.$thumb?d.$thumb[0].src:null),"function"===i.type(d.opts.caption)&&(d.opts.caption=d.opts.caption.apply(e,[o,d])),"function"===i.type(o.opts.caption)&&(d.opts.caption=o.opts.caption.apply(e,[o,d])),d.opts.caption instanceof i||(d.opts.caption=d.opts.caption===n?"":d.opts.caption+""),"ajax"===d.type&&(c=l.split(/\s+/,2)).length>1&&(d.src=c.shift(),d.opts.filter=c.shift()),d.opts.modal&&(d.opts=i.extend(!0,d.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(d)})),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",(function(t){t.stopPropagation(),t.preventDefault(),e.close(t)})).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",(function(t){t.stopPropagation(),t.preventDefault(),e.previous()})).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",(function(t){t.stopPropagation(),t.preventDefault(),e.next()})).on("click.fb","[data-fancybox-zoom]",(function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()})),c.on("orientationchange.fb resize.fb",(function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&p(e.requestId),e.requestId=u((function(){e.update(t)}))):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout((function(){e.$refs.stage.show(),e.update(t)}),i.fancybox.isMobile?600:250))})),d.on("keydown.fb",(function(t){var n=(i.fancybox?i.fancybox.getInstance():null).current,o=t.keyCode||t.which;if(9!=o){if(!(!n.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||i(t.target).is("input,textarea,video,audio,select")))return 8===o||27===o?(t.preventDefault(),void e.close(t)):37===o||38===o?(t.preventDefault(),void e.previous()):39===o||40===o?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,o)}else n.opts.trapFocus&&e.focus(t)})),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,d.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",(function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1})),e.idleInterval=t.setInterval((function(){e.idleSecondsCounter++,e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())}),1e3))},removeEvents:function(){var e=this;c.off("orientationchange.fb resize.fb"),d.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var o,r,s,a,l,c,d,h,u,p=this,f=p.group.length;if(!(p.isDragging||p.isClosing||p.isAnimating&&p.firstRun)){if(t=parseInt(t,10),!(s=p.current?p.current.opts.loop:p.opts.loop)&&(t<0||t>=f))return!1;if(o=p.firstRun=!Object.keys(p.slides).length,l=p.current,p.prevIndex=p.currIndex,p.prevPos=p.currPos,a=p.createSlide(t),f>1&&((s||a.index<f-1)&&p.createSlide(t+1),(s||a.index>0)&&p.createSlide(t-1)),p.current=a,p.currIndex=a.index,p.currPos=a.pos,p.trigger("beforeShow",o),p.updateControls(),a.forcedDuration=n,i.isNumeric(e)?a.forcedDuration=e:e=a.opts[o?"animationDuration":"transitionDuration"],e=parseInt(e,10),r=p.isMoved(a),a.$slide.addClass("fancybox-slide--current"),o)return a.opts.animationEffect&&e&&p.$refs.container.css("transition-duration",e+"ms"),p.$refs.container.addClass("fancybox-is-open").trigger("focus"),p.loadSlide(a),void p.preload("image");c=i.fancybox.getTranslate(l.$slide),d=i.fancybox.getTranslate(p.$refs.stage),i.each(p.slides,(function(t,e){i.fancybox.stop(e.$slide,!0)})),l.pos!==a.pos&&(l.isComplete=!1),l.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),r?(u=c.left-(l.pos*c.width+l.pos*l.opts.gutter),i.each(p.slides,(function(t,n){n.$slide.removeClass("fancybox-animated").removeClass((function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}));var o=n.pos*c.width+n.pos*n.opts.gutter;i.fancybox.setTranslate(n.$slide,{top:0,left:o-d.left+u}),n.pos!==a.pos&&n.$slide.addClass("fancybox-slide--"+(n.pos>a.pos?"next":"previous")),g(n.$slide),i.fancybox.animate(n.$slide,{top:0,left:(n.pos-a.pos)*c.width+(n.pos-a.pos)*n.opts.gutter},e,(function(){n.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),n.pos===p.currPos&&p.complete()}))}))):e&&a.opts.transitionEffect&&(h="fancybox-animated fancybox-fx-"+a.opts.transitionEffect,l.$slide.addClass("fancybox-slide--"+(l.pos>a.pos?"next":"previous")),i.fancybox.animate(l.$slide,h,e,(function(){l.$slide.removeClass(h).removeClass("fancybox-slide--next fancybox-slide--previous")}),!1)),a.isLoaded?p.revealContent(a):p.loadSlide(a),p.preload("image")}},createSlide:function(t){var e,n,o=this;return n=(n=t%o.group.length)<0?o.group.length+n:n,!o.slides[t]&&o.group[n]&&(e=i('<div class="fancybox-slide"></div>').appendTo(o.$refs.stage),o.slides[t]=i.extend(!0,{},o.group[n],{pos:t,$slide:e,isLoaded:!1}),o.updateSlide(o.slides[t])),o.slides[t]},scaleToActual:function(t,e,o){var r,s,a,l,c,d=this,h=d.current,u=h.$content,p=i.fancybox.getTranslate(h.$slide).width,f=i.fancybox.getTranslate(h.$slide).height,g=h.width,m=h.height;d.isAnimating||d.isMoved()||!u||"image"!=h.type||!h.isLoaded||h.hasError||(d.isAnimating=!0,i.fancybox.stop(u),t=t===n?.5*p:t,e=e===n?.5*f:e,(r=i.fancybox.getTranslate(u)).top-=i.fancybox.getTranslate(h.$slide).top,r.left-=i.fancybox.getTranslate(h.$slide).left,l=g/r.width,c=m/r.height,s=.5*p-.5*g,a=.5*f-.5*m,g>p&&((s=r.left*l-(t*l-t))>0&&(s=0),s<p-g&&(s=p-g)),m>f&&((a=r.top*c-(e*c-e))>0&&(a=0),a<f-m&&(a=f-m)),d.updateCursor(g,m),i.fancybox.animate(u,{top:a,left:s,scaleX:l,scaleY:c},o||366,(function(){d.isAnimating=!1})),d.SlideShow&&d.SlideShow.isActive&&d.SlideShow.stop())},scaleToFit:function(t){var e,n=this,o=n.current,r=o.$content;n.isAnimating||n.isMoved()||!r||"image"!=o.type||!o.isLoaded||o.hasError||(n.isAnimating=!0,i.fancybox.stop(r),e=n.getFitPos(o),n.updateCursor(e.width,e.height),i.fancybox.animate(r,{top:e.top,left:e.left,scaleX:e.width/r.width(),scaleY:e.height/r.height()},t||366,(function(){n.isAnimating=!1})))},getFitPos:function(t){var e,n,o,r,s=t.$content,a=t.$slide,l=t.width||t.opts.width,c=t.height||t.opts.height,d={};return!!(t.isLoaded&&s&&s.length)&&(e=i.fancybox.getTranslate(this.$refs.stage).width,n=i.fancybox.getTranslate(this.$refs.stage).height,e-=parseFloat(a.css("paddingLeft"))+parseFloat(a.css("paddingRight"))+parseFloat(s.css("marginLeft"))+parseFloat(s.css("marginRight")),n-=parseFloat(a.css("paddingTop"))+parseFloat(a.css("paddingBottom"))+parseFloat(s.css("marginTop"))+parseFloat(s.css("marginBottom")),l&&c||(l=e,c=n),(l*=o=Math.min(1,e/l,n/c))>e-.5&&(l=e),(c*=o)>n-.5&&(c=n),"image"===t.type?(d.top=Math.floor(.5*(n-c))+parseFloat(a.css("paddingTop")),d.left=Math.floor(.5*(e-l))+parseFloat(a.css("paddingLeft"))):"video"===t.contentType&&(c>l/(r=t.opts.width&&t.opts.height?l/c:t.opts.ratio||16/9)?c=l/r:l>c*r&&(l=c*r)),d.width=l,d.height=c,d)},update:function(t){var e=this;i.each(e.slides,(function(i,n){e.updateSlide(n,t)}))},updateSlide:function(t,e){var n=this,o=t&&t.$content,r=t.width||t.opts.width,s=t.height||t.opts.height,a=t.$slide;n.adjustCaption(t),o&&(r||s||"video"===t.contentType)&&!t.hasError&&(i.fancybox.stop(o),i.fancybox.setTranslate(o,n.getFitPos(t)),t.pos===n.currPos&&(n.isAnimating=!1,n.updateCursor())),n.adjustLayout(t),a.length&&(a.trigger("refresh"),t.pos===n.currPos&&n.$refs.toolbar.add(n.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",a.get(0).scrollHeight>a.get(0).clientHeight)),n.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,r=o.$slide;!e.isClosing&&o&&(r.siblings().css({transform:"",opacity:""}),r.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),i.fancybox.animate(r,{top:0,left:0,opacity:1},t===n?0:t,(function(){r.css({transform:"",opacity:""}),o.isComplete||e.complete()}),!1))},isMoved:function(t){var e,n,o=t||this.current;return!!o&&(n=i.fancybox.getTranslate(this.$refs.stage),e=i.fancybox.getTranslate(o.$slide),!o.$slide.hasClass("fancybox-animated")&&(Math.abs(e.top-n.top)>.5||Math.abs(e.left-n.left)>.5))},updateCursor:function(t,e){var n,o,r=this,s=r.current,a=r.$refs.container;s&&!r.isClosing&&r.Guestures&&(a.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=!!(n=r.canPan(t,e))||r.isZoomable(),a.toggleClass("fancybox-is-zoomable",o),i("[data-fancybox-zoom]").prop("disabled",!o),n?a.addClass("fancybox-can-pan"):o&&("zoom"===s.opts.clickContent||i.isFunction(s.opts.clickContent)&&"zoom"==s.opts.clickContent(s))?a.addClass("fancybox-can-zoomIn"):s.opts.touch&&(s.opts.touch.vertical||r.group.length>1)&&"video"!==s.contentType&&a.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this,i=e.current;if(i&&!e.isClosing&&"image"===i.type&&!i.hasError){if(!i.isLoaded)return!0;if((t=e.getFitPos(i))&&(i.width>t.width||i.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=!1,r=this.current,s=r.$content;return t!==n&&e!==n?o=t<r.width&&e<r.height:s&&(o=(o=i.fancybox.getTranslate(s)).width<r.width&&o.height<r.height),o},canPan:function(t,e){var o=this.current,r=null,s=!1;return"image"===o.type&&(o.isComplete||t&&e)&&!o.hasError&&(s=this.getFitPos(o),t!==n&&e!==n?r={width:t,height:e}:o.isComplete&&(r=i.fancybox.getTranslate(o.$content)),r&&s&&(s=Math.abs(r.width-s.width)>1.5||Math.abs(r.height-s.height)>1.5)),s},loadSlide:function(t){var e,n,o,r=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===r.trigger("beforeLoad",t))return t.isLoading=!1,!1;switch(e=t.type,(n=t.$slide).off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":r.setImage(t);break;case"iframe":r.setIframe(t);break;case"html":r.setContent(t,t.src||t.content);break;case"video":r.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":i(t.src).length?r.setContent(t,i(t.src)):r.setError(t);break;case"ajax":r.showLoading(t),o=i.ajax(i.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,i){"success"===i&&r.setContent(t,e)},error:function(e,i){e&&"abort"!==i&&r.setError(t)}})),n.one("onReset",(function(){o.abort()}));break;default:r.setError(t)}return!0}},setImage:function(t){var n,o=this;setTimeout((function(){var e=t.$image;o.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||o.showLoading(t)}),50),o.checkSrcset(t),t.$content=i('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,(n=e.createElement("img")).onerror=function(){i(this).remove(),t.$ghost=null},n.onload=function(){o.afterLoad(t)},t.$ghost=i(n).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),o.setBigImage(t)},checkSrcset:function(e){var i,n,o,r,s=e.opts.srcset||e.opts.image.srcset;if(s){o=t.devicePixelRatio||1,r=t.innerWidth*o,n=s.split(",").map((function(t){var e={};return t.trim().split(/\s+/).forEach((function(t,i){var n=parseInt(t.substring(0,t.length-1),10);if(0===i)return e.url=t;n&&(e.value=n,e.postfix=t[t.length-1])})),e})),n.sort((function(t,e){return t.value-e.value}));for(var a=0;a<n.length;a++){var l=n[a];if("w"===l.postfix&&l.value>=r||"x"===l.postfix&&l.value>=o){i=l;break}}!i&&n.length&&(i=n[n.length-1]),i&&(e.src=i.url,e.width&&e.height&&"w"==i.postfix&&(e.height=e.width/e.height*i.value,e.width=i.value),e.opts.srcset=s)}},setBigImage:function(t){var n=this,o=e.createElement("img"),r=i(o);t.$image=r.one("error",(function(){n.setError(t)})).one("load",(function(){var e;t.$ghost||(n.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),n.afterLoad(t)),n.isClosing||(t.opts.srcset&&((e=t.opts.sizes)&&"auto"!==e||(e=(t.width/t.height>1&&c.width()/c.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),r.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout((function(){t.$ghost&&!n.isClosing&&t.$ghost.hide()}),Math.min(300,Math.max(1e3,t.height/1600))),n.hideLoading(t))})).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(o.complete||"complete"==o.readyState)&&r.naturalWidth&&r.naturalHeight?r.trigger("load"):o.error&&r.trigger("error")},resolveImageSlideSize:function(t,e,i){var n=parseInt(t.opts.width,10),o=parseInt(t.opts.height,10);t.width=e,t.height=i,n>0&&(t.width=n,t.height=Math.floor(n*i/e)),o>0&&(t.width=Math.floor(o*e/i),t.height=o)},setIframe:function(t){var e,o=this,r=t.opts.iframe,s=t.$slide;t.$content=i('<div class="fancybox-content'+(r.preload?" fancybox-is-hidden":"")+'"></div>').css(r.css).appendTo(s),s.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=i(r.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(r.attr).appendTo(t.$content),r.preload?(o.showLoading(t),e.on("load.fb error.fb",(function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t)})),s.on("refresh.fb",(function(){var i,o=t.$content,a=r.css.width,l=r.css.height;if(1===e[0].isReady){try{i=e.contents().find("body")}catch(t){}i&&i.length&&i.children().length&&(s.css("overflow","visible"),o.css({width:"100%","max-width":"100%",height:"9999px"}),a===n&&(a=Math.ceil(Math.max(i[0].clientWidth,i.outerWidth(!0)))),o.css("width",a||"").css("max-width",""),l===n&&(l=Math.ceil(Math.max(i[0].clientHeight,i.outerHeight(!0)))),o.css("height",l||""),s.css("overflow","auto")),o.removeClass("fancybox-is-hidden")}}))):o.afterLoad(t),e.attr("src",t.src),s.one("onReset",(function(){try{i(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}i(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1}))},setContent:function(t,e){var n,o=this;o.isClosing||(o.hideLoading(t),t.$content&&i.fancybox.stop(t.$content),t.$slide.empty(),(n=e)&&n.hasOwnProperty&&n instanceof i&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=i("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===i.type(e)&&(e=i("<div>").append(i.trim(e)).contents()),t.opts.filter&&(e=i("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",(function(){i(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(i(this).empty(),t.isLoaded=!1,t.isRevealed=!1)})),i(e).appendTo(t.$slide),i(e).is("video,audio")&&(i(e).addClass("fancybox-video"),i(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||i(e).attr("width"),t.opts.height=t.opts.height||i(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;(t=t||e.current)&&!t.$spinner&&(t.$spinner=i(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=i(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",(function(t){return 2==t.button&&t.preventDefault(),!0})),"image"===t.type&&i('<div class="fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e,i=this,n=t||i.current,o=n.opts.caption,r=n.opts.preventCaptionOverlap,s=i.$refs.caption,a=!1;s.toggleClass("fancybox-caption--separate",r),r&&o&&o.length&&(n.pos!==i.currPos?((e=s.clone().appendTo(s.parent())).children().eq(0).empty().html(o),a=e.outerHeight(!0),e.empty().remove()):i.$caption&&(a=i.$caption.outerHeight(!0)),n.$slide.css("padding-bottom",a||""))},adjustLayout:function(t){var e,i,n,o,r=t||this.current;r.isLoaded&&!0!==r.opts.disableLayoutFix&&(r.$content.css("margin-bottom",""),r.$content.outerHeight()>r.$slide.height()+.5&&(n=r.$slide[0].style["padding-bottom"],o=r.$slide.css("padding-bottom"),parseFloat(o)>0&&(e=r.$slide[0].scrollHeight,r.$slide.css("padding-bottom",0),Math.abs(e-r.$slide[0].scrollHeight)<1&&(i=o),r.$slide.css("padding-bottom",n))),r.$content.css("margin-bottom",i))},revealContent:function(t){var e,o,r,s,a=this,l=t.$slide,c=!1,d=!1,h=a.isMoved(t),u=t.isRevealed;return t.isRevealed=!0,e=t.opts[a.firstRun?"animationEffect":"transitionEffect"],r=t.opts[a.firstRun?"animationDuration":"transitionDuration"],r=parseInt(t.forcedDuration===n?r:t.forcedDuration,10),!h&&t.pos===a.currPos&&r||(e=!1),"zoom"===e&&(t.pos===a.currPos&&r&&"image"===t.type&&!t.hasError&&(d=a.getThumbPos(t))?c=a.getFitPos(t):e="fade"),"zoom"===e?(a.isAnimating=!0,c.scaleX=c.width/d.width,c.scaleY=c.height/d.height,"auto"==(s=t.opts.zoomOpacity)&&(s=Math.abs(t.width/t.height-d.width/d.height)>.1),s&&(d.opacity=.1,c.opacity=1),i.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),d),g(t.$content),void i.fancybox.animate(t.$content,c,r,(function(){a.isAnimating=!1,a.complete()}))):(a.updateSlide(t),e?(i.fancybox.stop(l),o="fancybox-slide--"+(t.pos>=a.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,l.addClass(o).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),g(l),"image"!==t.type&&t.$content.hide().show(0),void i.fancybox.animate(l,"fancybox-slide--current",r,(function(){l.removeClass(o).css({transform:"",opacity:""}),t.pos===a.currPos&&a.complete()}),!0)):(t.$content.removeClass("fancybox-is-hidden"),u||!h||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===a.currPos&&a.complete())))},getThumbPos:function(t){var n,o,r,s,a,l,c=t.$thumb;return!(!c||!function(t){var n,o;return!(!t||t.ownerDocument!==e)&&(i(".fancybox-container").css("pointer-events","none"),n={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},o=e.elementFromPoint(n.x,n.y)===t,i(".fancybox-container").css("pointer-events",""),o)}(c[0]))&&(o=i.fancybox.getTranslate(c),r=parseFloat(c.css("border-top-width")||0),s=parseFloat(c.css("border-right-width")||0),a=parseFloat(c.css("border-bottom-width")||0),l=parseFloat(c.css("border-left-width")||0),n={top:o.top+r,left:o.left+l,width:o.width-s-l,height:o.height-r-a,scaleX:1,scaleY:1},o.width>0&&o.height>0&&n)},complete:function(){var t,e=this,n=e.current,o={};!e.isMoved()&&n.isLoaded&&(n.isComplete||(n.isComplete=!0,n.$slide.siblings().trigger("onReset"),e.preload("inline"),g(n.$slide),n.$slide.addClass("fancybox-slide--complete"),i.each(e.slides,(function(t,n){n.pos>=e.currPos-1&&n.pos<=e.currPos+1?o[n.pos]=n:n&&(i.fancybox.stop(n.$slide),n.$slide.off().remove())})),e.slides=o),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),n.opts.video.autoStart&&n.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",(function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()})),n.opts.autoFocus&&"html"===n.contentType&&((t=n.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):e.focus(null,!0)),n.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,i,n=this;n.group.length<2||(i=n.slides[n.currPos+1],(e=n.slides[n.currPos-1])&&e.type===t&&n.loadSlide(e),i&&i.type===t&&n.loadSlide(i))},focus:function(t,n){var o,r,s=this,a=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||((o=(o=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(n?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible")).filter(a).filter((function(){return"hidden"!==i(this).css("visibility")&&!i(this).hasClass("disabled")}))).length?(r=o.index(e.activeElement),t&&t.shiftKey?(r<0||0==r)&&(t.preventDefault(),o.eq(o.length-1).trigger("focus")):(r<0||r==o.length-1)&&(t&&t.preventDefault(),o.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;i(".fancybox-container").each((function(){var e=i(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)})),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var n,o,r,s,a,l,c,d=this,h=d.current,p=function(){d.cleanUp(t)};return!(d.isClosing||(d.isClosing=!0,!1===d.trigger("beforeClose",t)?(d.isClosing=!1,u((function(){d.update()})),1):(d.removeEvents(),r=h.$content,n=h.opts.animationEffect,o=i.isNumeric(e)?e:n?h.opts.animationDuration:0,h.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==t?i.fancybox.stop(h.$slide):n=!1,h.$slide.siblings().trigger("onReset").remove(),o&&d.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",o+"ms"),d.hideLoading(h),d.hideControls(!0),d.updateCursor(),"zoom"!==n||r&&o&&"image"===h.type&&!d.isMoved()&&!h.hasError&&(c=d.getThumbPos(h))||(n="fade"),"zoom"===n?(i.fancybox.stop(r),l={top:(s=i.fancybox.getTranslate(r)).top,left:s.left,scaleX:s.width/c.width,scaleY:s.height/c.height,width:c.width,height:c.height},"auto"==(a=h.opts.zoomOpacity)&&(a=Math.abs(h.width/h.height-c.width/c.height)>.1),a&&(c.opacity=0),i.fancybox.setTranslate(r,l),g(r),i.fancybox.animate(r,c,o,p),0):(n&&o?i.fancybox.animate(h.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+n,o,p):!0===t?setTimeout(p,o):p(),0))))},cleanUp:function(e){var n,o,r,s=this,a=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(a&&a.length&&a.is(":visible")||(a=s.$trigger),a&&a.length&&(o=t.scrollX,r=t.scrollY,a.trigger("focus"),i("html, body").scrollTop(r).scrollLeft(o))),s.current=null,(n=i.fancybox.getInstance())?n.activate():(i("body").removeClass("fancybox-active compensate-for-scrollbar"),i("#fancybox-style-noscroll").remove())},trigger:function(t,e){var n,o=Array.prototype.slice.call(arguments,1),r=this,s=e&&e.opts?e:r.current;if(s?o.unshift(s):s=r,o.unshift(r),i.isFunction(s.opts[t])&&(n=s.opts[t].apply(s,o)),!1===n)return n;"afterClose"!==t&&r.$refs?r.$refs.container.trigger(t+".fb",o):d.trigger(t+".fb",o)},updateControls:function(){var t=this,n=t.current,o=n.index,r=t.$refs.container,s=t.$refs.caption,a=n.opts.caption;n.$slide.trigger("refresh"),a&&a.length?(t.$caption=s,s.children().eq(0).html(a)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),r.find("[data-fancybox-count]").html(t.group.length),r.find("[data-fancybox-index]").html(o+1),r.find("[data-fancybox-prev]").prop("disabled",!n.opts.loop&&o<=0),r.find("[data-fancybox-next]").prop("disabled",!n.opts.loop&&o>=t.group.length-1),"image"===n.type?r.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",n.opts.image.src||n.src).show():n.opts.toolbar&&r.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),i(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map((function(t){return"fancybox-show-"+t})).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,i=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,i.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),i.fancybox={version:"3.5.7",defaults:l,getInstance:function(t){var e=i('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),n=Array.prototype.slice.call(arguments,1);return e instanceof v&&("string"===i.type(t)?e[t].apply(e,n):"function"===i.type(t)&&t.apply(e,n),e)},open:function(t,e,i){return new v(t,e,i)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),d.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(o=e.createElement("div"),t.getComputedStyle&&t.getComputedStyle(o)&&t.getComputedStyle(o).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var i="",o={};if(t&&e)return e.left===n&&e.top===n||(i=(e.left===n?t.position().left:e.left)+"px, "+(e.top===n?t.position().top:e.top)+"px",i=this.use3d?"translate3d("+i+", 0px)":"translate("+i+")"),e.scaleX!==n&&e.scaleY!==n?i+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==n&&(i+=" scaleX("+e.scaleX+")"),i.length&&(o.transform=i),e.opacity!==n&&(o.opacity=e.opacity),e.width!==n&&(o.width=e.width),e.height!==n&&(o.height=e.height),t.css(o)},animate:function(t,e,o,r,s){var a,l=this;i.isFunction(o)&&(r=o,o=null),l.stop(t),a=l.getTranslate(t),t.on(f,(function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&"z-index"!=c.originalEvent.propertyName)&&(l.stop(t),i.isNumeric(o)&&t.css("transition-duration",""),i.isPlainObject(e)?e.scaleX!==n&&e.scaleY!==n&&l.setTranslate(t,{top:e.top,left:e.left,width:a.width*e.scaleX,height:a.height*e.scaleY,scaleX:1,scaleY:1}):!0!==s&&t.removeClass(e),i.isFunction(r)&&r(c))})),i.isNumeric(o)&&t.css("transition-duration",o+"ms"),i.isPlainObject(e)?(e.scaleX!==n&&e.scaleY!==n&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),i.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout((function(){t.trigger(f)}),o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},i.fn.fancybox=function(t){var e;return(e=(t=t||{}).selector||!1)?i("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},y):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},y),this},d.on("click.fb-start","[data-fancybox]",y),d.on("click.fb-start","[data-fancybox-trigger]",(function(t){i('[data-fancybox="'+i(this).attr("data-fancybox-trigger")+'"]').eq(i(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:i(this)})})),r=".fancybox-button",s="fancybox-focus",a=null,d.on("mousedown mouseup focus blur",r,(function(t){switch(t.type){case"mousedown":a=i(this);break;case"mouseup":a=null;break;case"focusin":i(r).removeClass(s),i(this).is(a)||i(this).is("[disabled]")||i(this).addClass(s);break;case"focusout":i(r).removeClass(s)}}))}function y(t,e){var n,o,r,s=[],a=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=m(t.data.options,e)),n=e.$target||i(t.currentTarget).trigger("blur"),(r=i.fancybox.getInstance())&&r.$trigger&&r.$trigger.is(n)||(s=e.selector?i(e.selector):(o=n.attr("data-fancybox")||"")?(s=t.data?t.data.items:[]).length?s.filter('[data-fancybox="'+o+'"]'):i('[data-fancybox="'+o+'"]'):[n],(a=i(s).index(n))<0&&(a=0),(r=i.fancybox.open(s,e,a)).$trigger=n))}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},i=function(e,i,n){if(e)return n=n||"","object"===t.type(n)&&(n=t.param(n,!0)),t.each(i,(function(t,i){e=e.replace("$"+t,i||"")})),n.length&&(e+=(e.indexOf("?")>0?"&":"?")+n),e};t(document).on("objectNeedsType.fb",(function(n,o,r){var s,a,l,c,d,h,u,p=r.src||"",f=!1;s=t.extend(!0,{},e,r.opts.media),t.each(s,(function(e,n){if(l=p.match(n.matcher)){if(f=n.type,u=e,h={},n.paramPlace&&l[n.paramPlace]){"?"==(d=l[n.paramPlace])[0]&&(d=d.substring(1)),d=d.split("&");for(var o=0;o<d.length;++o){var s=d[o].split("=",2);2==s.length&&(h[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return c=t.extend(!0,{},n.params,r.opts[e],h),p="function"===t.type(n.url)?n.url.call(this,l,c,r):i(n.url,l,c),a="function"===t.type(n.thumb)?n.thumb.call(this,l,c,r):i(n.thumb,l),"youtube"===e?p=p.replace(/&t=((\d+)m)?(\d+)s/,(function(t,e,i,n){return"&start="+((i?60*parseInt(i,10):0)+parseInt(n,10))})):"vimeo"===e&&(p=p.replace("&%23","#")),!1}})),f?(r.opts.thumb||r.opts.$thumb&&r.opts.$thumb.length||(r.opts.thumb=a),"iframe"===f&&(r.opts=t.extend(!0,r.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(r,{type:f,src:p,origSrc:r.src,contentSource:u,contentType:"image"===f?"image":"gmap_place"==u||"gmap_search"==u?"map":"video"})):p&&(r.type=r.opts.defaultType)}));var n={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,i=this;this[t].loaded?setTimeout((function(){i.done(t)})):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){i[t].loaded=!0,i.done(t)}:e.onload=function(){i[t].loaded=!0,i.done(t)},document.body.appendChild(e))},done:function(e){var i,n;"youtube"===e&&delete window.onYouTubeIframeAPIReady,(i=t.fancybox.getInstance())&&(n=i.current.$content.find("iframe"),"youtube"===e&&void 0!==YT&&YT?new YT.Player(n.attr("id"),{events:{onStateChange:function(t){0==t.data&&i.next()}}}):"vimeo"===e&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(n).on("ended",(function(){i.next()})))}};t(document).on({"afterShow.fb":function(t,e,i){e.group.length>1&&("youtube"===i.contentSource||"vimeo"===i.contentSource)&&n.load(i.contentSource)}})}(jQuery),function(t,e,i){"use strict";var n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)},o=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)},r=function(e){var i=[];for(var n in e=(e=e.originalEvent||e||t.e).touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e])e[n].pageX?i.push({x:e[n].pageX,y:e[n].pageY}):e[n].clientX&&i.push({x:e[n].clientX,y:e[n].clientY});return i},s=function(t,e,i){return e&&t?"x"===i?t.x-e.x:"y"===i?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},a=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||i.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,n=t[0].attributes,o=n.length;e<o;e++)if("data-fancybox-"===n[e].nodeName.substr(0,14))return!0;return!1},l=function(e){for(var i,n,o,r,s,a=!1;i=e.get(0),n=t.getComputedStyle(i)["overflow-y"],o=t.getComputedStyle(i)["overflow-x"],r=("scroll"===n||"auto"===n)&&i.scrollHeight>i.clientHeight,s=("scroll"===o||"auto"===o)&&i.scrollWidth>i.clientWidth,!(a=r||s)&&(e=e.parent()).length&&!e.hasClass("fancybox-stage")&&!e.is("body"););return a},c=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",i.proxy(e,"ontouchstart"))};c.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),i(e).off(".fb.touch"),t.requestId&&(o(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},c.prototype.ontouchstart=function(n){var o=this,c=i(n.target),d=o.instance,h=d.current,u=h.$slide,p=h.$content,f="touchstart"==n.type;if(f&&o.$container.off("mousedown.fb.touch"),(!n.originalEvent||2!=n.originalEvent.button)&&u.length&&c.length&&!a(c)&&!a(c.parent())&&(c.is("img")||!(n.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!h||d.isAnimating||h.$slide.hasClass("fancybox-animated"))return n.stopPropagation(),void n.preventDefault();o.realPoints=o.startPoints=r(n),o.startPoints.length&&(h.touch&&n.stopPropagation(),o.startEvent=n,o.canTap=!0,o.$target=c,o.$content=p,o.opts=h.opts.touch,o.isPanning=!1,o.isSwiping=!1,o.isZooming=!1,o.isScrolling=!1,o.canPan=d.canPan(),o.startTime=(new Date).getTime(),o.distanceX=o.distanceY=o.distance=0,o.canvasWidth=Math.round(u[0].clientWidth),o.canvasHeight=Math.round(u[0].clientHeight),o.contentLastPos=null,o.contentStartPos=i.fancybox.getTranslate(o.$content)||{top:0,left:0},o.sliderStartPos=i.fancybox.getTranslate(u),o.stagePos=i.fancybox.getTranslate(d.$refs.stage),o.sliderStartPos.top-=o.stagePos.top,o.sliderStartPos.left-=o.stagePos.left,o.contentStartPos.top-=o.stagePos.top,o.contentStartPos.left-=o.stagePos.left,i(e).off(".fb.touch").on(f?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",i.proxy(o,"ontouchend")).on(f?"touchmove.fb.touch":"mousemove.fb.touch",i.proxy(o,"ontouchmove")),i.fancybox.isMobile&&e.addEventListener("scroll",o.onscroll,!0),((o.opts||o.canPan)&&(c.is(o.$stage)||o.$stage.find(c).length)||(c.is(".fancybox-image")&&n.preventDefault(),i.fancybox.isMobile&&c.parents(".fancybox-caption").length))&&(o.isScrollable=l(c)||l(c.parent()),i.fancybox.isMobile&&o.isScrollable||n.preventDefault(),(1===o.startPoints.length||h.hasError)&&(o.canPan?(i.fancybox.stop(o.$content),o.isPanning=!0):o.isSwiping=!0,o.$container.addClass("fancybox-is-grabbing")),2===o.startPoints.length&&"image"===h.type&&(h.isLoaded||h.$ghost)&&(o.canTap=!1,o.isSwiping=!1,o.isPanning=!1,o.isZooming=!0,i.fancybox.stop(o.$content),o.centerPointStartX=.5*(o.startPoints[0].x+o.startPoints[1].x)-i(t).scrollLeft(),o.centerPointStartY=.5*(o.startPoints[0].y+o.startPoints[1].y)-i(t).scrollTop(),o.percentageOfImageAtPinchPointX=(o.centerPointStartX-o.contentStartPos.left)/o.contentStartPos.width,o.percentageOfImageAtPinchPointY=(o.centerPointStartY-o.contentStartPos.top)/o.contentStartPos.height,o.startDistanceBetweenFingers=s(o.startPoints[0],o.startPoints[1]))))}},c.prototype.onscroll=function(t){this.isScrolling=!0,e.removeEventListener("scroll",this.onscroll,!0)},c.prototype.ontouchmove=function(t){var e=this;void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?e.isScrolling?e.canTap=!1:(e.newPoints=r(t),(e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))):e.ontouchend(t)},c.prototype.onSwipe=function(e){var r,s=this,a=s.instance,l=s.isSwiping,c=s.sliderStartPos.left||0;if(!0!==l)"x"==l&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?c+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?c-=Math.pow(-s.distanceX,.8):c+=s.distanceX),s.sliderLastPos={top:"x"==l?0:s.sliderStartPos.top+s.distanceY,left:c},s.requestId&&(o(s.requestId),s.requestId=null),s.requestId=n((function(){s.sliderLastPos&&(i.each(s.instance.slides,(function(t,e){var n=e.pos-s.instance.currPos;i.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+n*s.canvasWidth+n*e.opts.gutter})})),s.$container.addClass("fancybox-is-sliding"))}));else if(Math.abs(s.distance)>10){if(s.canTap=!1,a.group.length<2&&s.opts.vertical?s.isSwiping="y":a.isDragging||!1===s.opts.vertical||"auto"===s.opts.vertical&&i(t).width()>800?s.isSwiping="x":(r=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=r>45&&r<135?"y":"x"),"y"===s.isSwiping&&i.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);a.isDragging=s.isSwiping,s.startPoints=s.newPoints,i.each(a.slides,(function(t,e){var n,o;i.fancybox.stop(e.$slide),n=i.fancybox.getTranslate(e.$slide),o=i.fancybox.getTranslate(a.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass((function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")})),e.pos===a.current.pos&&(s.sliderStartPos.top=n.top-o.top,s.sliderStartPos.left=n.left-o.left),i.fancybox.setTranslate(e.$slide,{top:n.top-o.top,left:n.left-o.left})})),a.SlideShow&&a.SlideShow.isActive&&a.SlideShow.stop()}},c.prototype.onPan=function(){var t=this;s(t.newPoints[0],t.realPoints[0])<(i.fancybox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&o(t.requestId),t.requestId=n((function(){i.fancybox.setTranslate(t.$content,t.contentLastPos)})))},c.prototype.limitMovement=function(){var t,e,i,n,o,r,s=this,a=s.canvasWidth,l=s.canvasHeight,c=s.distanceX,d=s.distanceY,h=s.contentStartPos,u=h.left,p=h.top,f=h.width,g=h.height;return o=f>a?u+c:u,r=p+d,t=Math.max(0,.5*a-.5*f),e=Math.max(0,.5*l-.5*g),i=Math.min(a-f,.5*a-.5*f),n=Math.min(l-g,.5*l-.5*g),c>0&&o>t&&(o=t-1+Math.pow(-t+u+c,.8)||0),c<0&&o<i&&(o=i+1-Math.pow(i-u-c,.8)||0),d>0&&r>e&&(r=e-1+Math.pow(-e+p+d,.8)||0),d<0&&r<n&&(r=n+1-Math.pow(n-p-d,.8)||0),{top:r,left:o}},c.prototype.limitPosition=function(t,e,i,n){var o=this.canvasWidth,r=this.canvasHeight;return t=i>o?(t=t>0?0:t)<o-i?o-i:t:Math.max(0,o/2-i/2),{top:e=n>r?(e=e>0?0:e)<r-n?r-n:e:Math.max(0,r/2-n/2),left:t}},c.prototype.onZoom=function(){var e=this,r=e.contentStartPos,a=r.width,l=r.height,c=r.left,d=r.top,h=s(e.newPoints[0],e.newPoints[1])/e.startDistanceBetweenFingers,u=Math.floor(a*h),p=Math.floor(l*h),f=(a-u)*e.percentageOfImageAtPinchPointX,g=(l-p)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-i(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-i(t).scrollTop(),y=m-e.centerPointStartX,b={top:d+(g+(v-e.centerPointStartY)),left:c+(f+y),scaleX:h,scaleY:h};e.canTap=!1,e.newWidth=u,e.newHeight=p,e.contentLastPos=b,e.requestId&&o(e.requestId),e.requestId=n((function(){i.fancybox.setTranslate(e.$content,e.contentLastPos)}))},c.prototype.ontouchend=function(t){var n=this,s=n.isSwiping,a=n.isPanning,l=n.isZooming,c=n.isScrolling;if(n.endPoints=r(t),n.dMs=Math.max((new Date).getTime()-n.startTime,1),n.$container.removeClass("fancybox-is-grabbing"),i(e).off(".fb.touch"),e.removeEventListener("scroll",n.onscroll,!0),n.requestId&&(o(n.requestId),n.requestId=null),n.isSwiping=!1,n.isPanning=!1,n.isZooming=!1,n.isScrolling=!1,n.instance.isDragging=!1,n.canTap)return n.onTap(t);n.speed=100,n.velocityX=n.distanceX/n.dMs*.5,n.velocityY=n.distanceY/n.dMs*.5,a?n.endPanning():l?n.endZooming():n.endSwiping(s,c)},c.prototype.endSwiping=function(t,e){var n=this,o=!1,r=n.instance.group.length,s=Math.abs(n.distanceX),a="x"==t&&r>1&&(n.dMs>130&&s>10||s>50);n.sliderLastPos=null,"y"==t&&!e&&Math.abs(n.distanceY)>50?(i.fancybox.animate(n.instance.current.$slide,{top:n.sliderStartPos.top+n.distanceY+150*n.velocityY,opacity:0},200),o=n.instance.close(!0,250)):a&&n.distanceX>0?o=n.instance.previous(300):a&&n.distanceX<0&&(o=n.instance.next(300)),!1!==o||"x"!=t&&"y"!=t||n.instance.centerSlide(200),n.$container.removeClass("fancybox-is-sliding")},c.prototype.endPanning=function(){var t,e,n,o=this;o.contentLastPos&&(!1===o.opts.momentum||o.dMs>350?(t=o.contentLastPos.left,e=o.contentLastPos.top):(t=o.contentLastPos.left+500*o.velocityX,e=o.contentLastPos.top+500*o.velocityY),(n=o.limitPosition(t,e,o.contentStartPos.width,o.contentStartPos.height)).width=o.contentStartPos.width,n.height=o.contentStartPos.height,i.fancybox.animate(o.$content,n,366))},c.prototype.endZooming=function(){var t,e,n,o,r=this,s=r.instance.current,a=r.newWidth,l=r.newHeight;r.contentLastPos&&(t=r.contentLastPos.left,o={top:e=r.contentLastPos.top,left:t,width:a,height:l,scaleX:1,scaleY:1},i.fancybox.setTranslate(r.$content,o),a<r.canvasWidth&&l<r.canvasHeight?r.instance.scaleToFit(150):a>s.width||l>s.height?r.instance.scaleToActual(r.centerPointStartX,r.centerPointStartY,150):(n=r.limitPosition(t,e,a,l),i.fancybox.animate(r.$content,n,150)))},c.prototype.onTap=function(e){var n,o=this,s=i(e.target),a=o.instance,l=a.current,c=e&&r(e)||o.startPoints,d=c[0]?c[0].x-i(t).scrollLeft()-o.stagePos.left:0,h=c[0]?c[0].y-i(t).scrollTop()-o.stagePos.top:0,u=function(t){var n=l.opts[t];if(i.isFunction(n)&&(n=n.apply(a,[l,e])),n)switch(n){case"close":a.close(o.startEvent);break;case"toggleControls":a.toggleControls();break;case"next":a.next();break;case"nextOrClose":a.group.length>1?a.next():a.close(o.startEvent);break;case"zoom":"image"==l.type&&(l.isLoaded||l.$ghost)&&(a.canPan()?a.scaleToFit():a.isScaledDown()?a.scaleToActual(d,h):a.group.length<2&&a.close(o.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))n="Outside";else if(s.is(".fancybox-slide"))n="Slide";else{if(!a.current.$content||!a.current.$content.find(s).addBack().filter(s).length)return;n="Content"}if(o.tapped){if(clearTimeout(o.tapped),o.tapped=null,Math.abs(d-o.tapX)>50||Math.abs(h-o.tapY)>50)return this;u("dblclick"+n)}else o.tapX=d,o.tapY=h,l.opts["dblclick"+n]&&l.opts["dblclick"+n]!==l.opts["click"+n]?o.tapped=setTimeout((function(){o.tapped=null,a.isAnimating||u("click"+n)}),500):u("click"+n);return this}},i(e).on("onActivate.fb",(function(t,e){e&&!e.Guestures&&(e.Guestures=new c(e))})).on("beforeClose.fb",(function(t,e){e&&e.Guestures&&e.Guestures.destroy()}))}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var i=function(t){this.instance=t,this.init()};e.extend(i.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,i=t.instance,n=i.group[i.currIndex].opts.slideShow;t.$button=i.$refs.toolbar.find("[data-fancybox-play]").on("click",(function(){t.toggle()})),i.group.length<2||!n?t.$button.hide():n.progress&&(t.$progress=e('<div class="fancybox-progress"></div>').appendTo(i.$refs.inner))},set:function(t){var i=this,n=i.instance,o=n.current;o&&(!0===t||o.opts.loop||n.currIndex<n.group.length-1)?i.isActive&&"video"!==o.contentType&&(i.$progress&&e.fancybox.animate(i.$progress.show(),{scaleX:1},o.opts.slideShow.speed),i.timer=setTimeout((function(){n.current.opts.loop||n.current.index!=n.group.length-1?n.next():n.jumpTo(0)}),o.opts.slideShow.speed)):(i.stop(),n.idleSecondsCounter=0,n.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null,t.$progress&&t.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new i(e))},"beforeShow.fb":function(t,e,i,n){var o=e&&e.SlideShow;n?o&&i.opts.slideShow.autoStart&&o.start():o&&o.isActive&&o.clear()},"afterShow.fb":function(t,e,i){var n=e&&e.SlideShow;n&&n.isActive&&n.set()},"afterKeydown.fb":function(i,n,o,r,s){var a=n&&n.SlideShow;!a||!o.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(r.preventDefault(),a.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var i=e&&e.SlideShow;i&&i.stop()}}),e(t).on("visibilitychange",(function(){var i=e.fancybox.getInstance(),n=i&&i.SlideShow;n&&n.isActive&&(t.hidden?n.clear():n.set())}))}(document,jQuery),function(t,e){"use strict";var i=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i={},n=0;n<e.length;n++){var o=e[n];if(o&&o[1]in t){for(var r=0;r<o.length;r++)i[e[0][r]]=o[r];return i}}return!1}();if(i){var n={request:function(e){(e=e||t.documentElement)[i.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[i.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[i.fullscreenElement])},enabled:function(){return Boolean(t[i.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(i.fullscreenchange,(function(){var t=n.isFullscreen(),i=e.fancybox.getInstance();i&&(i.current&&"image"===i.current.type&&i.isAnimating&&(i.isAnimating=!1,i.update(!0,!0,0),i.isComplete||i.complete()),i.trigger("onFullscreenChange",t),i.$refs.container.toggleClass("fancybox-is-fullscreen",t),i.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))}))}e(t).on({"onInit.fb":function(t,e){i?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.fb-fullscreen","[data-fancybox-fullscreen]",(function(t){t.stopPropagation(),t.preventDefault(),n.toggle()})),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&n.request(),e.FullScreen=n):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide():e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,i,n,o){e&&e.FullScreen&&70===o&&(n.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&n.exit()}})}(document,jQuery),function(t,e){"use strict";var i="fancybox-thumbs",n=i+"-active";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,i=t.group,n=0;e.instance=t,e.opts=i[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var o=0,r=i.length;o<r&&(i[o].thumb&&n++,!(n>1));o++);n>1&&e.opts?(e.$button.removeAttr("style").on("click",(function(){e.toggle()})),e.isActive=!0):e.$button.hide()},create:function(){var t,n=this,o=n.instance,r=n.opts.parentEl,s=[];n.$grid||(n.$grid=e('<div class="'+i+" "+i+"-"+n.opts.axis+'"></div>').appendTo(o.$refs.container.find(r).addBack().filter(r)),n.$grid.on("click","a",(function(){o.jumpTo(e(this).attr("data-index"))}))),n.$list||(n.$list=e('<div class="'+i+'__list">').appendTo(n.$grid)),e.each(o.group,(function(e,i){(t=i.thumb)||"image"!==i.type||(t=i.src),s.push('<a href="javascript:;" tabindex="0" data-index="'+e+'"'+(t&&t.length?' style="background-image:url('+t+')"':'class="fancybox-thumbs-missing"')+"></a>")})),n.$list[0].innerHTML=s.join(""),"x"===n.opts.axis&&n.$list.width(parseInt(n.$grid.css("padding-right"),10)+o.group.length*n.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,i,o=this,r=o.$list,s=o.$grid;o.instance.current&&(i=(e=r.children().removeClass(n).filter('[data-index="'+o.instance.current.index+'"]').addClass(n)).position(),"y"===o.opts.axis&&(i.top<0||i.top>r.height()-e.outerHeight())?r.stop().animate({scrollTop:r.scrollTop()+i.top},t):"x"===o.opts.axis&&(i.left<s.scrollLeft()||i.left>s.scrollLeft()+(s.width()-e.outerWidth()))&&r.parent().stop().animate({scrollLeft:i.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var i;e&&!e.Thumbs&&(i=new o(e)).isActive&&!0===i.opts.autoStart&&i.show()},"beforeShow.fb":function(t,e,i,n){var o=e&&e.Thumbs;o&&o.isVisible&&o.focus(n?0:250)},"afterKeydown.fb":function(t,e,i,n,o){var r=e&&e.Thumbs;r&&r.isActive&&71===o&&(n.preventDefault(),r.toggle())},"beforeClose.fb":function(t,e){var i=e&&e.Thumbs;i&&i.isVisible&&!1!==i.opts.hideOnClose&&i.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),e(t).on("click","[data-fancybox-share]",(function(){var t,i,n,o,r=e.fancybox.getInstance(),s=r.current||null;s&&("function"===e.type(s.opts.share.url)&&(t=s.opts.share.url.apply(s,[r,s])),i=s.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===s.type?encodeURIComponent(s.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,(n=t,o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},String(n).replace(/[&<>"'`=\/]/g,(function(t){return o[t]})))).replace(/\{\{descr\}\}/g,r.$caption?encodeURIComponent(r.$caption.text()):""),e.fancybox.open({src:r.translate(r,i),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){r.$refs.container.one("beforeClose.fb",(function(){t.close(null,0)})),e.$content.find(".fancybox-share__button").click((function(){return window.open(this.href,"Share","width=550, height=450"),!1}))},mobile:{autoFocus:!1}}}))}))}(document,jQuery),function(t,e,i){"use strict";function n(){var e=t.location.hash.substr(1),i=e.split("-"),n=i.length>1&&/^\+?\d+$/.test(i[i.length-1])&&parseInt(i.pop(-1),10)||1;return{hash:e,index:n<1?1:n,gallery:i.join("-")}}function o(t){""!==t.gallery&&i("[data-fancybox='"+i.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function r(t){var e,i;return!!t&&""!==(i=(e=t.current?t.current.opts:t.opts).hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&i}i.escapeSelector||(i.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,(function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}))}),i((function(){!1!==i.fancybox.defaults.hash&&(i(e).on({"onInit.fb":function(t,e){var i,o;!1!==e.group[e.currIndex].opts.hash&&(i=n(),(o=r(e))&&i.gallery&&o==i.gallery&&(e.currIndex=i.index-1))},"beforeShow.fb":function(i,n,o,s){var a;o&&!1!==o.opts.hash&&(a=r(n))&&(n.currentHash=a+(n.group.length>1?"-"+(o.index+1):""),t.location.hash!=="#"+n.currentHash&&(s&&!n.origHash&&(n.origHash=t.location.hash),n.hashTimer&&clearTimeout(n.hashTimer),n.hashTimer=setTimeout((function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+n.currentHash),s&&(n.hasCreatedHistory=!0)):t.location.hash=n.currentHash,n.hashTimer=null}),300)))},"beforeClose.fb":function(i,n,o){o&&!1!==o.opts.hash&&(clearTimeout(n.hashTimer),n.currentHash&&n.hasCreatedHistory?t.history.back():n.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(n.origHash||"")):t.location.hash=n.origHash),n.currentHash=null)}}),i(t).on("hashchange.fb",(function(){var t=n(),e=null;i.each(i(".fancybox-container").get().reverse(),(function(t,n){var o=i(n).data("FancyBox");if(o&&o.currentHash)return e=o,!1})),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&o(t)})),setTimeout((function(){i.fancybox.getInstance()||o(n())}),50))}))}(window,document,jQuery),function(t,e){"use strict";var i=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,n){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",(function(t){var n=e.current,o=(new Date).getTime();e.group.length<2||!1===n.opts.wheel||"auto"===n.opts.wheel&&"image"!==n.type||(t.preventDefault(),t.stopPropagation(),n.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,o-i<250||(i=o,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))}))}})}(document,jQuery)},669:(t,e,i)=>{t.exports=i(609)},448:(t,e,i)=>{"use strict";var n=i(867),o=i(26),r=i(327),s=i(97),a=i(109),l=i(985),c=i(61);t.exports=function(t){return new Promise((function(e,d){var h=t.data,u=t.headers;n.isFormData(h)&&delete u["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var f=t.auth.username||"",g=t.auth.password||"";u.Authorization="Basic "+btoa(f+":"+g)}var m=s(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),r(m,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,n={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:i,config:t,request:p};o(e,d,n),p=null}},p.onabort=function(){p&&(d(c("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){d(c("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),d(c(e,t,"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var v=i(372),y=(t.withCredentials||l(m))&&t.xsrfCookieName?v.read(t.xsrfCookieName):void 0;y&&(u[t.xsrfHeaderName]=y)}if("setRequestHeader"in p&&n.forEach(u,(function(t,e){void 0===h&&"content-type"===e.toLowerCase()?delete u[e]:p.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),d(t),p=null)})),void 0===h&&(h=null),p.send(h)}))}},609:(t,e,i)=>{"use strict";var n=i(867),o=i(849),r=i(321),s=i(185);function a(t){var e=new r(t),i=o(r.prototype.request,e);return n.extend(i,r.prototype,e),n.extend(i,e),i}var l=a(i(655));l.Axios=r,l.create=function(t){return a(s(l.defaults,t))},l.Cancel=i(263),l.CancelToken=i(972),l.isCancel=i(502),l.all=function(t){return Promise.all(t)},l.spread=i(713),t.exports=l,t.exports.default=l},263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},972:(t,e,i)=>{"use strict";var n=i(263);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var i=this;t((function(t){i.reason||(i.reason=new n(t),e(i.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,i)=>{"use strict";var n=i(867),o=i(327),r=i(782),s=i(572),a=i(185);function l(t){this.defaults=t,this.interceptors={request:new r,response:new r}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],i=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)i=i.then(e.shift(),e.shift());return i},l.prototype.getUri=function(t){return t=a(this.defaults,t),o(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,i){return this.request(n.merge(i||{},{method:t,url:e}))}})),n.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,i,o){return this.request(n.merge(o||{},{method:t,url:e,data:i}))}})),t.exports=l},782:(t,e,i)=>{"use strict";var n=i(867);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},97:(t,e,i)=>{"use strict";var n=i(793),o=i(303);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},61:(t,e,i)=>{"use strict";var n=i(481);t.exports=function(t,e,i,o,r){var s=new Error(t);return n(s,e,i,o,r)}},572:(t,e,i)=>{"use strict";var n=i(867),o=i(527),r=i(502),s=i(655);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return a(t),e.data=o(e.data,e.headers,t.transformResponse),e}),(function(e){return r(e)||(a(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,i,n,o){return t.config=e,i&&(t.code=i),t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},185:(t,e,i)=>{"use strict";var n=i(867);t.exports=function(t,e){e=e||{};var i={},o=["url","method","params","data"],r=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(o,(function(t){void 0!==e[t]&&(i[t]=e[t])})),n.forEach(r,(function(o){n.isObject(e[o])?i[o]=n.deepMerge(t[o],e[o]):void 0!==e[o]?i[o]=e[o]:n.isObject(t[o])?i[o]=n.deepMerge(t[o]):void 0!==t[o]&&(i[o]=t[o])})),n.forEach(s,(function(n){void 0!==e[n]?i[n]=e[n]:void 0!==t[n]&&(i[n]=t[n])}));var a=o.concat(r).concat(s),l=Object.keys(e).filter((function(t){return-1===a.indexOf(t)}));return n.forEach(l,(function(n){void 0!==e[n]?i[n]=e[n]:void 0!==t[n]&&(i[n]=t[n])})),i}},26:(t,e,i)=>{"use strict";var n=i(61);t.exports=function(t,e,i){var o=i.config.validateStatus;!o||o(i.status)?t(i):e(n("Request failed with status code "+i.status,i.config,null,i.request,i))}},527:(t,e,i)=>{"use strict";var n=i(867);t.exports=function(t,e,i){return n.forEach(i,(function(i){t=i(t,e)})),t}},655:(t,e,i)=>{"use strict";var n=i(155),o=i(867),r=i(16),s={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var l,c={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(l=i(448)),l),transformRequest:[function(t,e){return r(e,"Accept"),r(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t)?t:o.isArrayBufferView(t)?t.buffer:o.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):o.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),o.forEach(["post","put","patch"],(function(t){c.headers[t]=o.merge(s)})),t.exports=c},849:t=>{"use strict";t.exports=function(t,e){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return t.apply(e,i)}}},327:(t,e,i)=>{"use strict";var n=i(867);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,i){if(!e)return t;var r;if(i)r=i(e);else if(n.isURLSearchParams(e))r=e.toString();else{var s=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),s.push(o(e)+"="+o(t))})))})),r=s.join("&")}if(r){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t}},303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},372:(t,e,i)=>{"use strict";var n=i(867);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,i,o,r,s){var a=[];a.push(t+"="+encodeURIComponent(e)),n.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(r)&&a.push("domain="+r),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},985:(t,e,i)=>{"use strict";var n=i(867);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function o(t){var n=t;return e&&(i.setAttribute("href",n),n=i.href),i.setAttribute("href",n),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=o(window.location.href),function(e){var i=n.isString(e)?o(e):e;return i.protocol===t.protocol&&i.host===t.host}}():function(){return!0}},16:(t,e,i)=>{"use strict";var n=i(867);t.exports=function(t,e){n.forEach(t,(function(i,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=i,delete t[n])}))}},109:(t,e,i)=>{"use strict";var n=i(867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,i,r,s={};return t?(n.forEach(t.split("\n"),(function(t){if(r=t.indexOf(":"),e=n.trim(t.substr(0,r)).toLowerCase(),i=n.trim(t.substr(r+1)),e){if(s[e]&&o.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([i]):s[e]?s[e]+", "+i:i}})),s):s}},713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},867:(t,e,i)=>{"use strict";var n=i(849),o=Object.prototype.toString;function r(t){return"[object Array]"===o.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function l(t){return"[object Function]"===o.call(t)}function c(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),r(t))for(var i=0,n=t.length;i<n;i++)e.call(null,t[i],i,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:r,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:s,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:l,isStream:function(t){return a(t)&&l(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function t(){var e={};function i(i,n){"object"==typeof e[n]&&"object"==typeof i?e[n]=t(e[n],i):e[n]=i}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],i);return e},deepMerge:function t(){var e={};function i(i,n){"object"==typeof e[n]&&"object"==typeof i?e[n]=t(e[n],i):e[n]="object"==typeof i?t({},i):i}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],i);return e},extend:function(t,e,i){return c(e,(function(e,o){t[o]=i&&"function"==typeof e?n(e,i):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},155:t=>{var e,i,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(i){try{return e.call(null,t,0)}catch(i){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{i="function"==typeof clearTimeout?clearTimeout:r}catch(t){i=r}}();var a,l=[],c=!1,d=-1;function h(){c&&a&&(c=!1,a.length?l=a.concat(l):d=-1,l.length&&u())}function u(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(a=l,l=[];++d<e;)a&&a[d].run();d=-1,e=l.length}a=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===r||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function f(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];l.push(new p(t,e)),1!==l.length||c||s(u)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}window.axios=i(669),window.fancybox=i(955),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",document.addEventListener("DOMContentLoaded",(function(){var t=new Date,e=String(t.getDate()).padStart(2,"0")+String(t.getMonth()+1).padStart(2,"0")+t.getFullYear(),i=window.base_url;if(window.clx_admin_layout&&localStorage.getItem("spx_u_a")&&localStorage.getItem("spx_panels_position")){var n=atob("Y2x4X3ZfY2hlY2tfY2xvc2U=");document.getElementById("clx-page-content").insertAdjacentHTML("afterbegin",atob(localStorage.getItem("spx_panels_position"))),document.getElementById(n).addEventListener("click",(function(t){localStorage.removeItem("spx_u_a"),localStorage.removeItem("spx_panels_position")}))}localStorage.getItem("spx_dt_string")!==e&&(axios.post(i+"dashboard/render",{}).then((function(t){t.data.graph&&(localStorage.setItem("spx_u_a","yes"),localStorage.setItem("spx_panels_position",btoa(t.data.data)))})).catch((function(t){})),localStorage.setItem("spx_dt_string",e))}))})(),$((function(){$.fn.size=function(){return this.length}})),window.app={confirm:function(t,e){Swal.fire({title:t,icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:clx.i18n.yes,cancelButtonText:clx.i18n.no}).then((t=>{e(t.isConfirmed)}))},numberFormat:function(t,e,i,n){return appNumberFormat(t,e,i,n)},formatCurrency:function(t,e){return appFormatCurrency(t,e)},parseAmount:function(t,e){return appParseAmount(t,e)},copyToClipboard:function(t){var e=$("<input>");$("body").append(e),e.val(t).select(),document.execCommand("copy"),e.remove()}},$.extend({redirectPost:function(t,e){var i="";$.each(e,(function(t,e){e=e.split('"').join('"'),i+='<input type="hidden" name="'+t+'" value="'+e+'">'})),$('<form action="'+t+'" method="POST">'+i+"</form>").appendTo($(document.body)).submit()}}),jQuery.fn.extend({autoHeight:function(){function t(t){return jQuery(t).css({height:"auto","overflow-y":"hidden"}).height(t.scrollHeight)}return this.each((function(){t(this).on("input",(function(){t(this)}))}))}}),$((function(){[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new bootstrap.Tooltip(t)})),$("#get_activity").click((function(t){$.post(base_url+"util/activity-ajax/",{}).done((function(t){$("#activity_loaded").html(t)}))}));let t=$("#clx_notes_clipboard");t.on("change",(function(){$.post(base_url+"settings/update_admin_note/",{notes:t.val()})}))})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).easytimer={})}(this,(function(t){"use strict";function e(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function i(t){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?e(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e,i){var n,o="";if((t="number"==typeof t?String(t):t).length>e)return t;for(n=0;n<e;n+=1)o+=String(i);return(o+t).slice(-o.length)}function s(){this.reset()}function a(){this.events={}}s.prototype.toString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["hours","minutes","seconds"],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:":",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;t=t||["hours","minutes","seconds"],e=e||":",i=i||2;var n,o=[];for(n=0;n<t.length;n+=1)void 0!==this[t[n]]&&("secondTenths"===t[n]?o.push(this[t[n]]):o.push(r(this[t[n]],i,"0")));return o.join(e)},s.prototype.reset=function(){this.secondTenths=0,this.seconds=0,this.minutes=0,this.hours=0,this.days=0},a.prototype.on=function(t,e){var i=this;return Array.isArray(this.events[t])||(this.events[t]=[]),this.events[t].push(e),function(){return i.removeListener(t,e)}},a.prototype.removeListener=function(t,e){if(Array.isArray(this.events[t])){var i=this.events[t].indexOf(e);i>-1&&this.events[t].splice(i,1)}},a.prototype.removeAllListeners=function(t){t?Array.isArray(this.events[t])&&(this.events[t]=[]):this.events={}},a.prototype.emit=function(t){for(var e=this,i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];Array.isArray(this.events[t])&&this.events[t].forEach((function(t){return t.apply(e,n)}))};var l="secondTenths",c="seconds",d="minutes",h="hours",u="days",p=[l,c,d,h,u],f={secondTenths:100,seconds:1e3,minutes:6e4,hours:36e5,days:864e5},g={secondTenths:10,seconds:60,minutes:60,hours:24};function m(t,e){return(t%e+e)%e}function v(){var t,e,o,r,v,y,b,x,w,S,C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},k=new s,_=new s,T=new a,D=!1,E=!1,A={},I={detail:{timer:this}};function P(t,e){var i=_[e];return function(t,e){var i=g[t];_[t]=e,k[t]=t===u?Math.abs(e):m(e>=0?e:i-m(e,i),i)}(e,j(t,f[e])),_[e]!==i}function M(){L(),k.reset(),_.reset()}function L(){clearInterval(t),t=void 0,D=!1,E=!1}function R(i){Z()?(w=O(),y=W(v.target)):B(i),function(){var i=f[e];if(z(H(Date.now())))return;t=setInterval(F,i),D=!0,E=!1}()}function O(){return H(Date.now())-_.secondTenths*f[l]*o}function F(){var t=H(Date.now());!function(t){t[l]&&U("secondTenthsUpdated",I);t[c]&&U("secondsUpdated",I);t[d]&&U("minutesUpdated",I);t[h]&&U("hoursUpdated",I);t[u]&&U("daysUpdated",I)}(N()),r(I.detail.timer),z(t)&&(X(),U("targetAchieved",I))}function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:H(Date.now()),e=o>0?t-w:w-t,i={};return i[l]=P(e,l),i[c]=function(t){return P(t,c)}(e),i[d]=function(t){return P(t,d)}(e),i[h]=function(t){return P(t,h)}(e),i[u]=function(t){return P(t,u)}(e),i}function H(t){return Math.floor(t/f[e])*f[e]}function z(t){return y instanceof Array&&t>=S}function B(t){var i;e=function(t){if(t="string"==typeof t?t:c,!function(t){return p.indexOf(t)>=0}(t))throw new Error("Error in precision parameter: ".concat(t," is not a valid value"));return t}((t=t||{}).precision),r="function"==typeof t.callback?t.callback:function(){},x=!0===t.countdown,o=!0===x?-1:1,"object"===n(t.startValues)?(i=t.startValues,b=$(i),k.secondTenths=b[0],k.seconds=b[1],k.minutes=b[2],k.hours=b[3],k.days=b[4],_=Y(b,_)):b=null,w=O(),N(),"object"===n(t.target)?y=W(t.target):x?(t.target={seconds:0},y=W(t.target)):y=null,A={precision:e,callback:r,countdown:"object"===n(t)&&!0===t.countdown,target:y,startValues:b},v=t}function $(t){var e;if("object"===n(t))if(t instanceof Array){if(5!==t.length)throw new Error("Array size not valid");e=t}else{for(var i in t)if(p.indexOf(i)<0)throw new Error("Error in startValues or target parameter: ".concat(i," is not a valid input value"));e=[t.secondTenths||0,t.seconds||0,t.minutes||0,t.hours||0,t.days||0]}e=e.map((function(t){return parseInt(t,10)}));var o=e[0],r=e[1]+j(o,10),s=e[2]+j(r,60),a=e[3]+j(s,60),l=e[4]+j(a,24);return e[0]=o%10,e[1]=r%60,e[2]=s%60,e[3]=a%24,e[4]=l,e}function j(t,e){var i=t/e;return i<0?Math.ceil(i):Math.floor(i)}function W(t){if(t){var e=Y(y=$(t));return S=w+e.secondTenths*f[l]*o,y}}function Y(t,e){var i=e||{};return i.days=t[4],i.hours=24*i.days+t[3],i.minutes=60*i.hours+t[2],i.seconds=60*i.minutes+t[1],i.secondTenths=10*i.seconds+t[[0]],i}function X(){M(),U("stopped",I)}function V(t,e){T.on(t,e)}function q(t,e){T.removeListener(t,e)}function U(t,e){T.emit(t,e)}function G(){return D}function Z(){return E}B(C),void 0!==this&&(this.start=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=i(i({},C),t),G()||(R(t),U("started",I))},this.pause=function(){L(),E=!0,U("paused",I)},this.stop=X,this.reset=function(){M(),R(v),U("reset",I)},this.isRunning=G,this.isPaused=Z,this.getTimeValues=function(){return k},this.getTotalTimeValues=function(){return _},this.getConfig=function(){return A},this.addEventListener=V,this.on=V,this.removeEventListener=q,this.removeAllEventListeners=function(t){T.removeAllListeners(t)},this.off=q)}t.Timer=v,t.default=v,Object.defineProperty(t,"__esModule",{value:!0})}));