snipe-it/public/js/build/vendor.js
2021-07-06 15:15:28 -07:00

2 lines
605 KiB
JavaScript

if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");!function(t){"use strict";function e(e,i){if(this.element=e,this.options=i,this.$overlay=t(i.overlayTemplate),""===i.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()}var i="lte.boxrefresh",n={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',onLoadStart:function(){},onLoadDone:function(t){return t}};function s(s){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,a=new e(o,r))}if("string"==typeof a){if(void 0===a[s])throw new Error("No method named "+s);a[s]()}})}e.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(t(this)),t.get(this.options.source,this.options.params,function(e){this.options.loadInContent&&t(this.element).find(this.options.content).html(e),this.options.onLoadDone.call(t(this),e),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},e.prototype._setUpListeners=function(){t(this.element).on("click",this.options.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},e.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},e.prototype._removeOverlay=function(){t(this.$overlay).remove()};var o=t.fn.boxRefresh;t.fn.boxRefresh=s,t.fn.boxRefresh.Constructor=e,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=o,this},t(window).on("load",function(){t('[data-widget="box-refresh"]').each(function(){s.call(t(this))})})}(jQuery),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this._setUpListeners()}var i="lte.boxwidget",n={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},s=".box-header",o=".box-body",a=".box-footer",r=".box-tools",l="collapsed-box";function h(s){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,a=new e(o,r))}if("string"==typeof s){if(void 0===a[s])throw new Error("No method named "+s);a[s]()}})}e.prototype.toggle=function(){t(this.element).is(".collapsed-box")?this.expand():this.collapse()},e.prototype.expand=function(){var e=t.Event("expanded.boxwidget"),i=t.Event("expanding.boxwidget"),n=this.options.collapseIcon,h=this.options.expandIcon;t(this.element).removeClass(l),t(this.element).children(s+", "+o+", "+a).children(r).find("."+h).removeClass(h).addClass(n),t(this.element).children(o+", "+a).slideDown(this.options.animationSpeed,function(){t(this.element).trigger(e)}.bind(this)).trigger(i)},e.prototype.collapse=function(){var e=t.Event("collapsed.boxwidget"),i=t.Event("collapsing.boxwidget"),n=this.options.collapseIcon,h=this.options.expandIcon;t(this.element).children(s+", "+o+", "+a).children(r).find("."+n).removeClass(n).addClass(h),t(this.element).children(o+", "+a).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(l),t(this.element).trigger(e)}.bind(this)).trigger(i)},e.prototype.remove=function(){var e=t.Event("removed.boxwidget"),i=t.Event("removing.boxwidget");t(this.element).slideUp(this.options.animationSpeed,function(){t(this.element).trigger(e),t(this.element).remove()}.bind(this)).trigger(i)},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.collapseTrigger,function(i){return i&&i.preventDefault(),e.toggle(t(this)),!1}),t(this.element).on("click",this.options.removeTrigger,function(i){return i&&i.preventDefault(),e.remove(t(this)),!1})};var u=t.fn.boxWidget;t.fn.boxWidget=h,t.fn.boxWidget.Constructor=e,t.fn.boxWidget.noConflict=function(){return t.fn.boxWidget=u,this},t(window).on("load",function(){t(".box").each(function(){h.call(t(this))})})}(jQuery),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this.hasBindedResize=!1,this.init()}var i="lte.controlsidebar",n={controlsidebarSlide:!0},s=".control-sidebar",o='[data-toggle="control-sidebar"]',a=".control-sidebar-open",r="control-sidebar-open",l="control-sidebar-hold-transition";function h(s){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,a=new e(o,r))}"string"==typeof s&&a.toggle()})}e.prototype.init=function(){t(this.element).is(o)||t(this).on("click",this.toggle),this.fix(),t(window).resize(function(){this.fix()}.bind(this))},e.prototype.toggle=function(e){e&&e.preventDefault(),this.fix(),t(s).is(a)||t("body").is(a)?this.collapse():this.expand()},e.prototype.expand=function(){t(s).show(),this.options.controlsidebarSlide?t(s).addClass(r):t("body").addClass(l).addClass(r).delay(50).queue(function(){t("body").removeClass(l),t(this).dequeue()}),t(this.element).trigger(t.Event("expanded.controlsidebar"))},e.prototype.collapse=function(){this.options.controlsidebarSlide?t(s).removeClass(r):t("body").addClass(l).removeClass(r).delay(50).queue(function(){t("body").removeClass(l),t(this).dequeue()}),t(s).fadeOut(),t(this.element).trigger(t.Event("collapsed.controlsidebar"))},e.prototype.fix=function(){t("body").is(".layout-boxed")&&this._fixForBoxed(t(".control-sidebar-bg"))},e.prototype._fixForBoxed=function(e){e.css({position:"absolute",height:t(".wrapper").height()})};var u=t.fn.controlSidebar;t.fn.controlSidebar=h,t.fn.controlSidebar.Constructor=e,t.fn.controlSidebar.noConflict=function(){return t.fn.controlSidebar=u,this},t(document).on("click",o,function(e){e&&e.preventDefault(),h.call(t(this),"toggle")})}(jQuery),function(t){"use strict";function e(t){this.element=t}var i="lte.directchat";function n(n){return this.each(function(){var s=t(this),o=s.data(i);o||s.data(i,o=new e(s)),"string"==typeof n&&o.toggle(s)})}e.prototype.toggle=function(t){t.parents(".direct-chat").first().toggleClass("direct-chat-contacts-open")};var s=t.fn.directChat;t.fn.directChat=n,t.fn.directChat.Constructor=e,t.fn.directChat.noConflict=function(){return t.fn.directChat=s,this},t(document).on("click",'[data-widget="chat-pane-toggle"]',function(e){e&&e.preventDefault(),n.call(t(this),"toggle")})}(jQuery),function(t){"use strict";function e(t){this.options=t,this.init()}var i="lte.pushmenu",n={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},s='[data-toggle="push-menu"]',o=".sidebar-mini",a="sidebar-collapse",r="sidebar-open",l="sidebar-expanded-on-hover",h="expanded.pushMenu",u="collapsed.pushMenu";function c(s){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,a=new e(r))}"toggle"===s&&a.toggle()})}e.prototype.init=function(){(this.options.expandOnHover||t("body").is(o+".fixed"))&&(this.expandOnHover(),t("body").addClass("sidebar-mini-expand-feature")),t(".content-wrapper").click(function(){t(window).width()<=this.options.collapseScreenSize&&t("body").hasClass(r)&&this.close()}.bind(this)),t(".sidebar-form .form-control").click(function(t){t.stopPropagation()})},e.prototype.toggle=function(){var e=t(window).width(),i=!t("body").hasClass(a);e<=this.options.collapseScreenSize&&(i=t("body").hasClass(r)),i?this.close():this.open()},e.prototype.open=function(){t(window).width()>this.options.collapseScreenSize?t("body").removeClass(a).trigger(t.Event(h)):t("body").addClass(r).trigger(t.Event(h))},e.prototype.close=function(){t(window).width()>this.options.collapseScreenSize?t("body").addClass(a).trigger(t.Event(u)):t("body").removeClass(r+" "+a).trigger(t.Event(u))},e.prototype.expandOnHover=function(){t(".main-sidebar").hover(function(){t("body").is(o+".sidebar-collapse")&&t(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){t("body").is(".sidebar-expanded-on-hover")&&this.collapse()}.bind(this))},e.prototype.expand=function(){setTimeout(function(){t("body").removeClass(a).addClass(l)},this.options.expandTransitionDelay)},e.prototype.collapse=function(){setTimeout(function(){t("body").removeClass(l).addClass(a)},this.options.expandTransitionDelay)};var d=t.fn.pushMenu;t.fn.pushMenu=c,t.fn.pushMenu.Constructor=e,t.fn.pushMenu.noConflict=function(){return t.fn.pushMenu=d,this},t(document).on("click",s,function(e){e.preventDefault(),c.call(t(this),"toggle")}),t(window).on("load",function(){c.call(t(s))})}(jQuery),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this._setUpListeners()}var i="lte.todolist",n={onCheck:function(t){return t},onUnCheck:function(t){return t}},s={data:'[data-widget="todo-list"]'};function o(s){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,a=new e(o,r))}if("string"==typeof a){if(void 0===a[s])throw new Error("No method named "+s);a[s]()}})}e.prototype.toggle=function(t){t.parents(s.li).first().toggleClass("done"),t.prop("checked")?this.check(t):this.unCheck(t)},e.prototype.check=function(t){this.options.onCheck.call(t)},e.prototype.unCheck=function(t){this.options.onUnCheck.call(t)},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("change ifChanged","input:checkbox",function(){e.toggle(t(this))})};var a=t.fn.todoList;t.fn.todoList=o,t.fn.todoList.Constructor=e,t.fn.todoList.noConflict=function(){return t.fn.todoList=a,this},t(window).on("load",function(){t(s.data).each(function(){o.call(t(this))})})}(jQuery),function(t){"use strict";function e(e,i){this.element=e,this.options=i,t(this.element).addClass(l),t(s+a,this.element).addClass(r),this._setUpListeners()}var i="lte.tree",n={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},s=".treeview",o=".treeview-menu",a=".active",r="menu-open",l="tree";function h(s){return this.each(function(){var o=t(this);if(!o.data(i)){var a=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,new e(o,a))}})}e.prototype.toggle=function(t,e){var i=t.next(o),n=t.parent(),a=n.hasClass(r);n.is(s)&&(this.options.followLink&&"#"!==t.attr("href")||e.preventDefault(),a?this.collapse(i,n):this.expand(i,n))},e.prototype.expand=function(e,i){var n=t.Event("expanded.tree");if(this.options.accordion){var s=i.siblings(".menu-open, .active"),a=s.children(o);this.collapse(a,s)}i.addClass(r),e.stop().slideDown(this.options.animationSpeed,function(){t(this.element).trigger(n),i.height("auto")}.bind(this))},e.prototype.collapse=function(e,i){var n=t.Event("collapsed.tree");i.removeClass(r),e.stop().slideUp(this.options.animationSpeed,function(){t(this.element).trigger(n),i.find(s).removeClass(r).find(o).hide()}.bind(this))},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.trigger,function(i){e.toggle(t(this),i)})};var u=t.fn.tree;t.fn.tree=h,t.fn.tree.Constructor=e,t.fn.tree.noConflict=function(){return t.fn.tree=u,this},t(window).on("load",function(){t('[data-widget="tree"]').each(function(){h.call(t(this))})})}(jQuery),function(t){"use strict";function e(t){this.options=t,this.bindedResize=!1,this.activate()}var i="lte.layout",n={slimscroll:!0,resetHeight:!0},s=".wrapper",o=".content-wrapper",a=".main-header",r=".sidebar",l=".sidebar-menu",h="fixed";function u(s){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof s&&s);o.data(i,a=new e(r))}if("string"==typeof s){if(void 0===a[s])throw new Error("No method named "+s);a[s]()}})}e.prototype.activate=function(){this.fix(),this.fixSidebar(),t("body").removeClass("hold-transition"),this.options.resetHeight&&t("body, html, "+s).css({height:"auto","min-height":"100%"}),this.bindedResize||(t(window).resize(function(){this.fix(),this.fixSidebar(),t(".main-header .logo, "+r).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),t(l).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),t(l).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},e.prototype.fix=function(){t(".layout-boxed > "+s).css("overflow","hidden");var e=t(".main-footer").outerHeight()||0,i=t(a).outerHeight()||0,n=i+e,l=t(window).height(),u=t(r).outerHeight()||0;if(t("body").hasClass(h))t(o).css("min-height",l-e);else{var c;c=u+i<=l?(t(o).css("min-height",l-n),l-n):(t(o).css("min-height",u),u);var d=t(".control-sidebar");void 0!==d&&d.height()>c&&t(o).css("min-height",d.height())}},e.prototype.fixSidebar=function(){t("body").hasClass(h)?this.options.slimscroll&&void 0!==t.fn.slimScroll&&0===t(".main-sidebar").find("slimScrollDiv").length&&t(r).slimScroll({height:t(window).height()-t(a).height()+"px"}):void 0!==t.fn.slimScroll&&t(r).slimScroll({destroy:!0}).height("auto")};var c=t.fn.layout;t.fn.layout=u,t.fn.layout.Constuctor=e,t.fn.layout.noConflict=function(){return t.fn.layout=c,this},t(window).on("load",function(){u.call(t("body"))})}(jQuery),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.Tether=e()}(this,function(){"use strict";var t=function(){function t(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)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=void 0;void 0===i&&(i={modules:[]});var n=null;function s(t){var e=t.getBoundingClientRect(),i={};for(var n in e)i[n]=e[n];try{if(t.ownerDocument!==document){var o=t.ownerDocument.defaultView.frameElement;if(o){var a=s(o);i.top+=a.top,i.bottom+=a.top,i.left+=a.left,i.right+=a.left}}}catch(t){}return i}function o(t){var e=(getComputedStyle(t)||{}).position,i=[];if("fixed"===e)return[t];for(var n=t;(n=n.parentNode)&&n&&1===n.nodeType;){var s=void 0;try{s=getComputedStyle(n)}catch(t){}if(null==s)return i.push(n),i;var o=s,a=o.overflow,r=o.overflowX,l=o.overflowY;/(auto|scroll|overlay)/.test(a+l+r)&&("absolute"!==e||["relative","absolute","fixed"].indexOf(s.position)>=0)&&i.push(n)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}var a,r=(a=0,function(){return++a}),l={},h=function(){var t=n;t&&document.body.contains(t)||((t=document.createElement("div")).setAttribute("data-tether-id",r()),g(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),n=t);var e=t.getAttribute("data-tether-id");return void 0===l[e]&&(l[e]=s(t),k(function(){delete l[e]})),l[e]};function u(){n&&document.body.removeChild(n),n=null}function c(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var i=e.documentElement,n=s(t),o=h();return n.top-=o.top,n.left-=o.left,void 0===n.width&&(n.width=document.body.scrollWidth-n.left-n.right),void 0===n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-i.clientTop,n.left=n.left-i.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function d(t){return t.offsetParent||document.documentElement}var f=null;function p(){if(f)return f;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");g(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;i===n&&(n=e.clientWidth),document.body.removeChild(e);var s=i-n;return f={width:s,height:s}}function g(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var i in e)({}).hasOwnProperty.call(e,i)&&(t[i]=e[i])}),t}function m(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var i=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=_(t).replace(i," ");y(t,n)}}function v(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{m(t,e);var i=_(t)+" "+e;y(t,i)}}function b(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=_(t);return new RegExp("(^| )"+e+"( |$)","gi").test(i)}function _(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function y(t,e){t.setAttribute("class",e)}function x(t,e,i){i.forEach(function(i){-1===e.indexOf(i)&&b(t,i)&&m(t,i)}),e.forEach(function(e){b(t,e)||v(t,e)})}var w=[],k=function(t){w.push(t)},C=function(){for(var t=void 0;t=w.pop();)t()},D=function(){function i(){e(this,i)}return t(i,[{key:"on",value:function(t,e,i){var n=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:i,once:n})}},{key:"once",value:function(t,e,i){this.on(t,e,i,!0)}},{key:"off",value:function(t,e){if(void 0!==this.bindings&&void 0!==this.bindings[t])if(void 0===e)delete this.bindings[t];else for(var i=0;i<this.bindings[t].length;)this.bindings[t][i].handler===e?this.bindings[t].splice(i,1):++i}},{key:"trigger",value:function(t){if(void 0!==this.bindings&&this.bindings[t]){for(var e=0,i=arguments.length,n=Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];for(;e<this.bindings[t].length;){var o=this.bindings[t][e],a=o.handler,r=o.ctx,l=o.once,h=r;void 0===h&&(h=this),a.apply(h,n),l?this.bindings[t].splice(e,1):++e}}}}]),i}();i.Utils={getActualBoundingClientRect:s,getScrollParents:o,getBounds:c,getOffsetParent:d,extend:g,addClass:v,removeClass:m,hasClass:b,updateClasses:x,defer:k,flush:C,uniqueId:r,Evented:D,getScrollBarSize:p,removeUtilElements:u};var M=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,s=!1,o=void 0;try{for(var a,r=t[Symbol.iterator]();!(n=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){s=!0,o=t}finally{try{!n&&r.return&&r.return()}finally{if(s)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=(t=function(){function t(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)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),function(t,e,i){for(var n=!0;n;){var s=t,o=e,a=i;n=!1,null===s&&(s=Function.prototype);var r=Object.getOwnPropertyDescriptor(s,o);if(void 0!==r){if("value"in r)return r.value;var l=r.get;if(void 0===l)return;return l.call(a)}var h=Object.getPrototypeOf(s);if(null===h)return;t=h,e=o,i=a,n=!0,r=h=void 0}});function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}if(void 0===i)throw new Error("You must include the utils.js file before tether.js");var o=(K=i.Utils).getScrollParents,d=(c=K.getBounds,K.getOffsetParent),v=(g=K.extend,K.addClass),m=K.removeClass,p=(x=K.updateClasses,k=K.defer,C=K.flush,K.getScrollBarSize),u=K.removeUtilElements;function T(t,e){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+i>=e&&e>=t-i}var I,P,A,F,O=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],i=0;i<e.length;++i){var n=e[i];if(void 0!==t.style[n])return n}}(),E=[],N=function(){E.forEach(function(t){t.position(!1)}),C()};function z(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}I=null,P=null,A=null,F=function t(){if(void 0!==P&&P>16)return P=Math.min(P-16,250),void(A=setTimeout(t,250));void 0!==I&&z()-I<10||(null!=A&&(clearTimeout(A),A=null),I=z(),N(),P=z()-I)},"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,F)});var L={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},R={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},W=function(t){var e=t.left,i=t.top;return void 0!==R[t.left]&&(e=R[t.left]),void 0!==R[t.top]&&(i=R[t.top]),{left:e,top:i}};function B(){for(var t={top:0,left:0},e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.forEach(function(e){var i=e.top,n=e.left;"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=i,t.left+=n}),t}function V(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}var U=function(t){var e=t.split(" "),i=M(e,2);return{top:i[0],left:i[1]}},j=U,Y=function(n){function s(t){var n=this;e(this,s),S(Object.getPrototypeOf(s.prototype),"constructor",this).call(this),this.position=this.position.bind(this),E.push(this),this.history=[],this.setOptions(t,!1),i.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(n)}),this.position()}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(s,D),t(s,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,i=arguments.length<=1||void 0===arguments[1]||arguments[1];this.options=g({offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},t);var n=this.options,s=n.element,a=n.target,r=n.targetModifier;if(this.element=s,this.target=a,this.targetModifier=r,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),v(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&v(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=j(this.options.targetAttachment),this.attachment=j(this.options.attachment),this.offset=U(this.options.offset),this.targetOffset=U(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=o(this.target),!1!==this.options.enabled&&this.enable(i)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return c(this.target);if("visible"===this.targetModifier)return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:((o={height:(t=c(this.target)).height,width:t.width,top:t.top,left:t.left}).height=Math.min(o.height,t.height-(pageYOffset-t.top)),o.height=Math.min(o.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),o.height=Math.min(innerHeight,o.height),o.height-=2,o.width=Math.min(o.width,t.width-(pageXOffset-t.left)),o.width=Math.min(o.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),o.width=Math.min(innerWidth,o.width),o.width-=2,o.top<pageYOffset&&(o.top=pageYOffset),o.left<pageXOffset&&(o.left=pageXOffset),o);if("scroll-handle"===this.targetModifier){var t=void 0,e=this.target;e===document.body?(e=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=c(e);var i=getComputedStyle(e),n=0;(e.scrollWidth>e.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body)&&(n=15);var s=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-n,o={width:15,height:.975*s*(s/e.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},a=0;s<408&&this.target===document.body&&(a=-11e-5*Math.pow(s,2)-.00727*s+22.58),this.target!==document.body&&(o.height=Math.max(o.height,24));var r=this.target.scrollTop/(e.scrollHeight-s);return o.top=r*(s-o.height-a)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(o.height=Math.max(o.height,24)),o}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&v(this.target,this.getClass("enabled")),v(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;m(this.target,this.getClass("enabled")),m(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),E.forEach(function(e,i){e===t&&E.splice(i,1)}),0===E.length&&u()}},{key:"updateAttachClasses",value:function(t,e){var i=this;t=t||this.attachment,e=e||this.targetAttachment;void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);var s=[];["left","top","bottom","right","middle","center"].forEach(function(t){s.push(i.getClass("element-attached")+"-"+t),s.push(i.getClass("target-attached")+"-"+t)}),k(function(){void 0!==i._addAttachClasses&&(x(i.element,i._addAttachClasses,s),!1!==i.options.addTargetClasses&&x(i.target,i._addAttachClasses,s),delete i._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=function(t,e){var i=t.left,n=t.top;return"auto"===i&&(i=L[e.left]),"auto"===n&&(n=H[e.top]),{left:i,top:n}}(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var s=this.cache("element-bounds",function(){return c(t.element)}),o=s.width,a=s.height;if(0===o&&0===a&&void 0!==this.lastSize){var r=this.lastSize;o=r.width,a=r.height}else this.lastSize={width:o,height:a};var l=this.cache("target-bounds",function(){return t.getTargetBounds()}),h=l,u=V(W(this.attachment),{width:o,height:a}),f=V(W(n),h),g=V(this.offset,{width:o,height:a}),m=V(this.targetOffset,h);u=B(u,g),f=B(f,m);for(var v=l.left+f.left-u.left,b=l.top+f.top-u.top,_=0;_<i.modules.length;++_){var y=i.modules[_].position.call(this,{left:v,top:b,targetAttachment:n,targetPos:l,elementPos:s,offset:u,targetOffset:f,manualOffset:g,manualTargetOffset:m,scrollbarSize:D,attachment:this.attachment});if(!1===y)return!1;void 0!==y&&"object"==typeof y&&(b=y.top,v=y.left)}var x={page:{top:b,left:v},viewport:{top:b-pageYOffset,bottom:pageYOffset-b-a+innerHeight,left:v-pageXOffset,right:pageXOffset-v-o+innerWidth}},w=this.target.ownerDocument,k=w.defaultView,D=void 0;return k.innerHeight>w.documentElement.clientHeight&&(D=this.cache("scrollbar-size",p),x.viewport.bottom-=D.height),k.innerWidth>w.documentElement.clientWidth&&(D=this.cache("scrollbar-size",p),x.viewport.right-=D.width),-1!==["","static"].indexOf(w.body.style.position)&&-1!==["","static"].indexOf(w.body.parentElement.style.position)||(x.page.bottom=w.body.scrollHeight-b-a,x.page.right=w.body.scrollWidth-v-o),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return d(t.target)}),i=t.cache("target-offsetparent-bounds",function(){return c(e)}),n=getComputedStyle(e),s=i,o={};if(["Top","Left","Bottom","Right"].forEach(function(t){o[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),i.right=w.body.scrollWidth-i.left-s.width+o.right,i.bottom=w.body.scrollHeight-i.top-s.height+o.bottom,x.page.top>=i.top+o.top&&x.page.bottom>=i.bottom&&x.page.left>=i.left+o.left&&x.page.right>=i.right){var a=e.scrollTop,r=e.scrollLeft;x.offset={top:x.page.top-i.top+a-o.top,left:x.page.left-i.left+r-o.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&C(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var i={};for(var n in t)for(var s in i[n]={},t[n]){for(var o=!1,a=0;a<this.history.length;++a){var r=this.history[a];if(void 0!==r[n]&&!T(r[n][s],t[n][s])){o=!0;break}}o||(i[n][s]=!0)}var l,h,u={top:"",left:"",right:"",bottom:""},c=function(t,i){if(!1!==(void 0!==e.options.optimizations?e.options.optimizations.gpu:null)){var n=void 0,s=void 0;t.top?(u.top=0,n=i.top):(u.bottom=0,n=-i.bottom),t.left?(u.left=0,s=i.left):(u.right=0,s=-i.right),"number"==typeof window.devicePixelRatio&&devicePixelRatio%1==0&&(s=Math.round(s*devicePixelRatio)/devicePixelRatio,n=Math.round(n*devicePixelRatio)/devicePixelRatio),u[O]="translateX("+s+"px) translateY("+n+"px)","msTransform"!==O&&(u[O]+=" translateZ(0)")}else t.top?u.top=i.top+"px":u.bottom=i.bottom+"px",t.left?u.left=i.left+"px":u.right=i.right+"px"},f=!1;if((i.page.top||i.page.bottom)&&(i.page.left||i.page.right)?(u.position="absolute",c(i.page,t.page)):(i.viewport.top||i.viewport.bottom)&&(i.viewport.left||i.viewport.right)?(u.position="fixed",c(i.viewport,t.viewport)):void 0!==i.offset&&i.offset.top&&i.offset.left?function(){u.position="absolute";var n=e.cache("target-offsetparent",function(){return d(e.target)});d(e.element)!==n&&k(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),c(i.offset,t.offset),f=!0}():(u.position="absolute",c({top:!0,left:!0},t.page)),!f)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var p=!0,m=this.element.parentNode;m&&1===m.nodeType&&"BODY"!==m.tagName&&(h=void 0,((h=(l=m).ownerDocument).fullscreenElement||h.webkitFullscreenElement||h.mozFullScreenElement||h.msFullscreenElement)!==l);){if("static"!==getComputedStyle(m).position){p=!1;break}m=m.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var v={},b=!1;for(var s in u){var _=u[s];this.element.style[s]!==_&&(b=!0,v[s]=_)}b&&k(function(){g(e.element.style,v),e.trigger("repositioned")})}}}]),s}();Y.modules=[],i.position=N;var q=g(Y,i),g=(M=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,s=!1,o=void 0;try{for(var a,r=t[Symbol.iterator]();!(n=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){s=!0,o=t}finally{try{!n&&r.return&&r.return()}finally{if(s)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=(K=i.Utils).getBounds,K.extend),$=(x=K.updateClasses,k=K.defer,["left","top","right","bottom"]);i.modules.push({position:function(t){var e=this,i=t.top,n=t.left,s=t.targetAttachment;if(!this.options.constraints)return!0;var o=this.cache("element-bounds",function(){return c(e.element)}),a=o.height,r=o.width;if(0===r&&0===a&&void 0!==this.lastSize){var l=this.lastSize;r=l.width,a=l.height}var h=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=h.height,d=h.width,f=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,i=t.pinnedClass;e&&f.push(e),i&&f.push(i)}),f.forEach(function(t){["left","top","right","bottom"].forEach(function(e){f.push(t+"-"+e)})});var p=[],m=g({},s),v=g({},this.attachment);return this.options.constraints.forEach(function(t){var o=t.to,l=t.attachment,h=t.pin;void 0===l&&(l="");var f=void 0,g=void 0;if(l.indexOf(" ")>=0){var b=l.split(" "),_=M(b,2);g=_[0],f=_[1]}else f=g=l;var y=function(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),void 0!==e.nodeType&&function(){var t=e,i=c(e),n=i,s=getComputedStyle(e);if(e=[n.left,n.top,i.width+n.left,i.height+n.top],t.ownerDocument!==document){var o=t.ownerDocument.defaultView;e[0]+=o.pageXOffset,e[1]+=o.pageYOffset,e[2]+=o.pageXOffset,e[3]+=o.pageYOffset}$.forEach(function(t,i){"Top"===(t=t[0].toUpperCase()+t.substr(1))||"Left"===t?e[i]+=parseFloat(s["border"+t+"Width"]):e[i]-=parseFloat(s["border"+t+"Width"])})}(),e}(e,o);"target"!==g&&"both"!==g||(i<y[1]&&"top"===m.top&&(i+=u,m.top="bottom"),i+a>y[3]&&"bottom"===m.top&&(i-=u,m.top="top")),"together"===g&&("top"===m.top&&("bottom"===v.top&&i<y[1]?(i+=u,m.top="bottom",i+=a,v.top="top"):"top"===v.top&&i+a>y[3]&&i-(a-u)>=y[1]&&(i-=a-u,m.top="bottom",v.top="bottom")),"bottom"===m.top&&("top"===v.top&&i+a>y[3]?(i-=u,m.top="top",i-=a,v.top="bottom"):"bottom"===v.top&&i<y[1]&&i+(2*a-u)<=y[3]&&(i+=a-u,m.top="top",v.top="top")),"middle"===m.top&&(i+a>y[3]&&"top"===v.top?(i-=a,v.top="bottom"):i<y[1]&&"bottom"===v.top&&(i+=a,v.top="top"))),"target"!==f&&"both"!==f||(n<y[0]&&"left"===m.left&&(n+=d,m.left="right"),n+r>y[2]&&"right"===m.left&&(n-=d,m.left="left")),"together"===f&&(n<y[0]&&"left"===m.left?"right"===v.left?(n+=d,m.left="right",n+=r,v.left="left"):"left"===v.left&&(n+=d,m.left="right",n-=r,v.left="right"):n+r>y[2]&&"right"===m.left?"left"===v.left?(n-=d,m.left="left",n-=r,v.left="right"):"right"===v.left&&(n-=d,m.left="left",n+=r,v.left="left"):"center"===m.left&&(n+r>y[2]&&"left"===v.left?(n-=r,v.left="right"):n<y[0]&&"right"===v.left&&(n+=r,v.left="left"))),"element"!==g&&"both"!==g||(i<y[1]&&"bottom"===v.top&&(i+=a,v.top="top"),i+a>y[3]&&"top"===v.top&&(i-=a,v.top="bottom")),"element"!==f&&"both"!==f||(n<y[0]&&("right"===v.left?(n+=r,v.left="left"):"center"===v.left&&(n+=r/2,v.left="left")),n+r>y[2]&&("left"===v.left?(n-=r,v.left="right"):"center"===v.left&&(n-=r/2,v.left="right"))),"string"==typeof h?h=h.split(",").map(function(t){return t.trim()}):!0===h&&(h=["top","left","right","bottom"]),h=h||[];var x,w,k=[],C=[];i<y[1]&&(h.indexOf("top")>=0?(i=y[1],k.push("top")):C.push("top")),i+a>y[3]&&(h.indexOf("bottom")>=0?(i=y[3]-a,k.push("bottom")):C.push("bottom")),n<y[0]&&(h.indexOf("left")>=0?(n=y[0],k.push("left")):C.push("left")),n+r>y[2]&&(h.indexOf("right")>=0?(n=y[2]-r,k.push("right")):C.push("right")),k.length&&(x=void 0,x=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),p.push(x),k.forEach(function(t){p.push(x+"-"+t)})),C.length&&(w=void 0,w=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),p.push(w),C.forEach(function(t){p.push(w+"-"+t)})),(k.indexOf("left")>=0||k.indexOf("right")>=0)&&(v.left=m.left=!1),(k.indexOf("top")>=0||k.indexOf("bottom")>=0)&&(v.top=m.top=!1),m.top===s.top&&m.left===s.left&&v.top===e.attachment.top&&v.left===e.attachment.left||(e.updateAttachClasses(v,m),e.trigger("update",{attachment:v,targetAttachment:m}))}),k(function(){!1!==e.options.addTargetClasses&&x(e.target,p,f),x(e.element,p,f)}),{top:i,left:n}}});var K,c=(K=i.Utils).getBounds,x=K.updateClasses;k=K.defer;i.modules.push({position:function(t){var e=this,i=t.top,n=t.left,s=this.cache("element-bounds",function(){return c(e.element)}),o=s.height,a=s.width,r=this.getTargetBounds(),l=i+o,h=n+a,u=[];i<=r.bottom&&l>=r.top&&["left","right"].forEach(function(t){var e=r[t];e!==n&&e!==h||u.push(t)}),n<=r.right&&h>=r.left&&["top","bottom"].forEach(function(t){var e=r[t];e!==i&&e!==l||u.push(t)});var d=[],f=[];return d.push(this.getClass("abutted")),["left","top","right","bottom"].forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),u.length&&f.push(this.getClass("abutted")),u.forEach(function(t){f.push(e.getClass("abutted")+"-"+t)}),k(function(){!1!==e.options.addTargetClasses&&x(e.target,f,d),x(e.element,f,d)}),!0}});M=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,s=!1,o=void 0;try{for(var a,r=t[Symbol.iterator]();!(n=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){s=!0,o=t}finally{try{!n&&r.return&&r.return()}finally{if(s)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return i.modules.push({position:function(t){var e=t.top,i=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:i}));var s=void 0,o=void 0;if("string"==typeof n){(n=n.split(" "))[1]=n[1]||n[0];var a=M(n,2);s=a[0],o=a[1],s=parseFloat(s,10),o=parseFloat(o,10)}else s=n.top,o=n.left;return{top:e+=s,left:i+=o}}}}),q}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){t.ui=t.ui||{};t.ui.version="1.12.1";var e,i=0,n=Array.prototype.slice;t.cleanData=(e=t.cleanData,function(i){var n,s,o;for(o=0;null!=(s=i[o]);o++)try{(n=t._data(s,"events"))&&n.remove&&t(s).triggerHandler("remove")}catch(t){}e(i)}),t.widget=function(e,i,n){var s,o,a,r={},l=e.split(".")[0],h=l+"-"+(e=e.split(".")[1]);return n||(n=i,i=t.Widget),t.isArray(n)&&(n=t.extend.apply(null,[{}].concat(n))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},s=t[l][e],o=t[l][e]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,s,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),(a=new i).options=t.widget.extend({},a.options),t.each(n,function(e,n){t.isFunction(n)?r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=s,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}():r[e]=n}),o.prototype=t.widget.extend(a,{widgetEventPrefix:s&&a.widgetEventPrefix||e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),s?(t.each(s._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,o,i._proto)}),delete s._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,o=n.call(arguments,1),a=0,r=o.length;a<r;a++)for(i in o[a])s=o[a][i],o[a].hasOwnProperty(i)&&void 0!==s&&(t.isPlainObject(s)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):e[i]=s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=n.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,n=t.data(this,s);return"instance"===o?(l=n,!1):n?t.isFunction(n[o])&&"_"!==o.charAt(0)?(i=n[o].apply(n,r))!==n&&void 0!==i?(l=i&&i.jquery?l.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+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,s);e?(e.option(o||{}),e._init&&e._init()):t.data(this,s,new i(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var n,s,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},n=e.split("."),e=n.shift(),n.length){for(s=a[e]=t.widget.extend({},this.options[e]),o=0;o<n.length-1;o++)s[n[o]]=s[n[o]]||{},s=s[n[o]];if(e=n.pop(),1===arguments.length)return void 0===s[e]?null:s[e];s[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,n,s;for(i in e)s=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&s&&s.length&&(n=t(s.get()),this._removeClass(s,i),n.addClass(this._classes({element:n,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var i=[],n=this;function s(s,o){var a,r;for(r=0;r<s.length;r++)a=n.classesElementLookup[s[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[s[r]]=a,i.push(s[r]),o&&e.classes[s[r]]&&i.push(e.classes[s[r]])}return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&s(e.keys.match(/\S+/g)||[],!0),e.extra&&s(e.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(n,s){-1!==t.inArray(e.target,s)&&(i.classesElementLookup[n]=t(s.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){n="boolean"==typeof n?n:i;var s="string"==typeof t||null===t,o={extra:s?e:i,keys:s?t:e,element:s?this.element:t,add:n};return o.element.toggleClass(this._classes(o),n),this},_on:function(e,i,n){var s,o=this;"boolean"!=typeof e&&(n=i,i=e,e=!1),n?(i=s=t(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),t.each(n,function(n,a){function r(){if(e||!0!==o.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,u=l[2];u?s.on(h,u,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(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){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,n){var s,o,a=this.options[e];if(n=n||{},(i=t.Event(i)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(t.isFunction(a)&&!1===a.apply(this.element[0],[i].concat(n))||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(n,s,o){var a;"string"==typeof s&&(s={effect:s});var r=s?!0===s||"number"==typeof s?i:s.effect||i:e;"number"==typeof(s=s||{})&&(s={duration:s}),a=!t.isEmptyObject(s),s.complete=o,s.delay&&n.delay(s.delay),a&&t.effects&&t.effects.effect[r]?n[e](s):r!==e&&n[r]?n[r](s.duration,s.easing,o):n.queue(function(i){t(this)[e](),o&&o.call(n[0]),i()})}});t.widget;!function(){var e,i=Math.max,n=Math.abs,s=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,r=/^\w+/,l=/%$/,h=t.fn.position;function u(t,e,i){return[parseFloat(t[0])*(l.test(t[0])?e/100:1),parseFloat(t[1])*(l.test(t[1])?i/100:1)]}function c(e,i){return parseInt(t.css(e,i),10)||0}t.position={scrollbarWidth:function(){if(void 0!==e)return e;var i,n,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),i=o.offsetWidth,s.css("overflow","scroll"),i===(n=o.offsetWidth)&&(n=s[0].clientWidth),s.remove(),e=i-n},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:s?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]),s=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:s,offset:!n&&!s?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return h.apply(this,arguments);e=t.extend({},e);var l,d,f,p,g,m,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),x=t.position.getScrollInfo(y),w=(e.collision||"flip").split(" "),k={};return m=9===(b=(v=_)[0]).nodeType?{width:v.width(),height:v.height(),offset:{top:0,left:0}}:t.isWindow(b)?{width:v.width(),height:v.height(),offset:{top:v.scrollTop(),left:v.scrollLeft()}}:b.preventDefault?{width:0,height:0,offset:{top:b.pageY,left:b.pageX}}:{width:v.outerWidth(),height:v.outerHeight(),offset:v.offset()},_[0].preventDefault&&(e.at="left top"),d=m.width,f=m.height,p=m.offset,g=t.extend({},p),t.each(["my","at"],function(){var t,i,n=(e[this]||"").split(" ");1===n.length&&(n=s.test(n[0])?n.concat(["center"]):o.test(n[0])?["center"].concat(n):["center","center"]),n[0]=s.test(n[0])?n[0]:"center",n[1]=o.test(n[1])?n[1]:"center",t=a.exec(n[0]),i=a.exec(n[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[r.exec(n[0])[0],r.exec(n[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===e.at[0]?g.left+=d:"center"===e.at[0]&&(g.left+=d/2),"bottom"===e.at[1]?g.top+=f:"center"===e.at[1]&&(g.top+=f/2),l=u(k.at,d,f),g.left+=l[0],g.top+=l[1],this.each(function(){var s,o,a=t(this),r=a.outerWidth(),h=a.outerHeight(),m=c(this,"marginLeft"),v=c(this,"marginTop"),b=r+m+c(this,"marginRight")+x.width,C=h+v+c(this,"marginBottom")+x.height,D=t.extend({},g),M=u(k.my,a.outerWidth(),a.outerHeight());"right"===e.my[0]?D.left-=r:"center"===e.my[0]&&(D.left-=r/2),"bottom"===e.my[1]?D.top-=h:"center"===e.my[1]&&(D.top-=h/2),D.left+=M[0],D.top+=M[1],s={marginLeft:m,marginTop:v},t.each(["left","top"],function(i,n){t.ui.position[w[i]]&&t.ui.position[w[i]][n](D,{targetWidth:d,targetHeight:f,elemWidth:r,elemHeight:h,collisionPosition:s,collisionWidth:b,collisionHeight:C,offset:[l[0]+M[0],l[1]+M[1]],my:e.my,at:e.at,within:y,elem:a})}),e.using&&(o=function(t){var s=p.left-D.left,o=s+d-r,l=p.top-D.top,u=l+f-h,c={target:{element:_,left:p.left,top:p.top,width:d,height:f},element:{element:a,left:D.left,top:D.top,width:r,height:h},horizontal:o<0?"left":s>0?"right":"center",vertical:u<0?"top":l>0?"bottom":"middle"};d<r&&n(s+o)<d&&(c.horizontal="center"),f<h&&n(l+u)<f&&(c.vertical="middle"),i(n(s),n(o))>i(n(l),n(u))?c.important="horizontal":c.important="vertical",e.using.call(this,t,c)}),a.offset(t.extend(D,{using:o}))})},t.ui.position={fit:{left:function(t,e){var n,s=e.within,o=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=o-r,h=r+e.collisionWidth-a-o;e.collisionWidth>a?l>0&&h<=0?(n=t.left+l+e.collisionWidth-a-o,t.left+=l-n):t.left=h>0&&l<=0?o:l>h?o+a-e.collisionWidth:o:l>0?t.left+=l:h>0?t.left-=h:t.left=i(t.left-r,t.left)},top:function(t,e){var n,s=e.within,o=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=o-r,h=r+e.collisionHeight-a-o;e.collisionHeight>a?l>0&&h<=0?(n=t.top+l+e.collisionHeight-a-o,t.top+=l-n):t.top=h>0&&l<=0?o:l>h?o+a-e.collisionHeight:o:l>0?t.top+=l:h>0?t.top-=h:t.top=i(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,o=e.within,a=o.offset.left+o.scrollLeft,r=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,h=t.left-e.collisionPosition.marginLeft,u=h-l,c=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];u<0?((i=t.left+d+f+p+e.collisionWidth-r-a)<0||i<n(u))&&(t.left+=d+f+p):c>0&&((s=t.left-e.collisionPosition.marginLeft+d+f+p-l)>0||n(s)<c)&&(t.left+=d+f+p)},top:function(t,e){var i,s,o=e.within,a=o.offset.top+o.scrollTop,r=o.height,l=o.isWindow?o.scrollTop:o.offset.top,h=t.top-e.collisionPosition.marginTop,u=h-l,c=h+e.collisionHeight-r-l,d="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,p=-2*e.offset[1];u<0?((s=t.top+d+f+p+e.collisionHeight-r-a)<0||s<n(u))&&(t.top+=d+f+p):c>0&&((i=t.top-e.collisionPosition.marginTop+d+f+p-l)>0||n(i)<c)&&(t.top+=d+f+p)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}();var s;t.ui.position,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])}}),t.fn.extend({disableSelection:(s="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(s+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});t.ui.focusable=function(e,i){var n,s,o,a,r,l=e.nodeName.toLowerCase();return"area"===l?(s=(n=e.parentNode).name,!(!e.href||!s||"map"!==n.nodeName.toLowerCase())&&((o=t("img[usemap='#"+s+"']")).length>0&&o.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(a=!e.disabled)&&(r=t(e).closest("fieldset")[0])&&(a=!r.disabled):a="a"===l&&e.href||i,a&&t(e).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}(t(e)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}});t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){var n="Width"===i?["Left","Right"]:["Top","Bottom"],s=i.toLowerCase(),o={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};function a(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}t.fn["inner"+i]=function(e){return void 0===e?o["inner"+i].call(this):this.each(function(){t(this).css(s,a(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?o["outer"+i].call(this,e):this.each(function(){t(this).css(s,a(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))});t.ui.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.ui.escapeSelector=(o=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g,function(t){return t.replace(o,"\\$1")}),t.fn.labels=function(){var e,i,n,s,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),(n=this.attr("id"))&&(o=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(n)+"']",s=s.add(o.find(i).addBack(i))),this.pushStack(s))},t.fn.scrollParent=function(e){var i=this.css("position"),n="absolute"===i,s=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return(!n||"static"!==e.css("position"))&&s.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),n=null!=i;return(!n||i>=0)&&t.ui.focusable(e,n)}}),t.fn.extend({uniqueId:(a=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var o,a,r=!1;t(document).on("mouseup",function(){r=!1});t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("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.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!r){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,s=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!s&&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.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),r=!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)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)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){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("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)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,r=!1,e.preventDefault()},_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.ui.plugin={add:function(e,i,n){var s,o=t.ui[e].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(t,e,i,n){var s,o=t.plugins[e];if(o&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(s=0;s<o.length;s++)t.options[o[s][0]]&&o[s][1].apply(t.element,i)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")};t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",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._addClass("ui-draggable"),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._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),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=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"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._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(new t.Event("mouseup",e)),!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.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):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._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper),s=n?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_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,s=this.options,o=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(n=(i=t(s.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=s.containment:this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.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()||o.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,s,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&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]&&(h=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]&&(h=i[3]+this.offset.click.top)),a.grid&&(s=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-a.grid[1]:s+a.grid[1]:s,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?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:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_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 s=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,s))})},stop:function(e,i,n){var s=t.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,t.each(n.sortables,function(){this.isOver?(this.isOver=0,n.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(e),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",e,s))})},drag:function(e,i,n){t.each(n.sortables,function(){var s=!1,o=this;o.positionAbs=n.positionAbs,o.helperProportions=n.helperProportions,o.offset.click=n.offset.click,o._intersectsWith(o.containerCache)&&(s=!0,t.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(s=!1),s})),s?(o.isOver||(o.isOver=1,n._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=n.offset.click.top,o.offset.click.left=n.offset.click.left,o.offset.parent.left-=n.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=n.offset.parent.top-o.offset.parent.top,n._trigger("toSortable",e),n.dropped=o.element,t.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,o.fromOutside=n),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.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 s=t("body"),o=n.options;s.css("cursor")&&(o._cursor=s.css("cursor")),s.css("cursor",o.cursor)},stop:function(e,i,n){var s=n.options;s._cursor&&t("body").css("cursor",s._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,n){var s=t(i.helper),o=n.options;s.css("opacity")&&(o._opacity=s.css("opacity")),s.css("opacity",o.opacity)},stop:function(e,i,n){var s=n.options;s._opacity&&t(i.helper).css("opacity",s._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 s=n.options,o=!1,a=n.scrollParentNotHidden[0],r=n.document[0];a!==r&&"HTML"!==a.tagName?(s.axis&&"x"===s.axis||(n.overflowOffset.top+a.offsetHeight-e.pageY<s.scrollSensitivity?a.scrollTop=o=a.scrollTop+s.scrollSpeed:e.pageY-n.overflowOffset.top<s.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(n.overflowOffset.left+a.offsetWidth-e.pageX<s.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+s.scrollSpeed:e.pageX-n.overflowOffset.left<s.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(r).scrollTop()<s.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<s.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(r).scrollLeft()<s.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<s.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+s.scrollSpeed)))),!1!==o&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(n,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,n){var s=n.options;n.snapElements=[],t(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.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 s,o,a,r,l,h,u,c,d,f,p=n.options,g=p.snapTolerance,m=i.offset.left,v=m+n.helperProportions.width,b=i.offset.top,_=b+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)h=(l=n.snapElements[d].left-n.margins.left)+n.snapElements[d].width,c=(u=n.snapElements[d].top-n.margins.top)+n.snapElements[d].height,v<l-g||m>h+g||_<u-g||b>c+g||!t.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==p.snapMode&&(s=Math.abs(u-_)<=g,o=Math.abs(c-b)<=g,a=Math.abs(l-v)<=g,r=Math.abs(h-m)<=g,s&&(i.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h}).left)),f=s||o||a||r,"outer"!==p.snapMode&&(s=Math.abs(u-b)<=g,o=Math.abs(c-_)<=g,a=Math.abs(l-m)<=g,r=Math.abs(h-v)<=g,s&&(i.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),o&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),r&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(s||o||a||r||f)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,t.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=s||o||a||r||f)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,n){var s,o=n.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(s=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",s+e)}),this.css("zIndex",s+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,n){var s=t(i.helper),o=n.options;s.css("zIndex")&&(o._zIndex=s.css("zIndex")),s.css("zIndex",o.zIndex)},stop:function(e,i,n){var s=n.options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}});t.ui.draggable;t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!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._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)},_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._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),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._addHoverClass(),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._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var n=i||t.ui.ddmanager.current,s=!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)&&l(n,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e))return s=!0,!1}),!s&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),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}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var l=t.ui.intersect=function(){function t(t,e,i){return t>=e&&t<e+i}return function(e,i,n,s){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,l=a+e.helperProportions.height,h=i.offset.left,u=i.offset.top,c=h+i.proportions().width,d=u+i.proportions().height;switch(n){case"fit":return h<=o&&r<=c&&u<=a&&l<=d;case"intersect":return h<o+e.helperProportions.width/2&&r-e.helperProportions.width/2<c&&u<a+e.helperProportions.height/2&&l-e.helperProportions.height/2<d;case"pointer":return t(s.pageY,u,i.proportions().height)&&t(s.pageX,h,i.proportions().width);case"touch":return(a>=u&&a<=d||l>=u&&l<=d||a<u&&l>d)&&(o>=h&&o<=c||r>=h&&r<=c||o<h&&r>c);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var n,s,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(n=0;n<o.length;n++)if(!(o[n].options.disabled||e&&!o[n].accept.call(o[n].element[0],e.currentItem||e.element))){for(s=0;s<r.length;s++)if(r[s]===o[n].element[0]){o[n].proportions().height=0;continue t}o[n].visible="none"!==o[n].element.css("display"),o[n].visible&&("mousedown"===a&&o[n]._activate.call(o[n],i),o[n].offset=o[n].element.offset(),o[n].proportions({width:o[n].element[0].offsetWidth,height:o[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&&l(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").on("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,s,o,a=l(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(s=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===s})).length&&((n=t(o[0]).droppable("instance")).greedyChild="isover"===r)),n&&"isover"===r&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),n&&"isout"===r&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});t.ui.droppable;t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var n,s=i&&"left"===i?"scrollLeft":"scrollTop";return e[s]>0||(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,n=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){i.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,n,s,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)s="ui-resizable-"+(e=t.trim(n[i])),o=t("<div>"),this._addClass(o,"ui-resizable-handle "+s),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,n,s,o;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(s,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,n,s=!1;for(i in this.handles)((n=t(this.handles[i])[0])===e.target||t.contains(n,e.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(e){var i,n,s,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,n,s=this.originalMousePosition,o=this.axis,a=e.pageX-s.left||0,r=e.pageY-s.top||0,l=this._change[o];return this._updatePrevProperties(),!!l&&(i=l.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,n,s,o,a,r,l,h=this.options;return this._helper&&(s=(n=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:this.sizeDiff.height,o=n?0:this.sizeDiff.width,a={width:this.helper.width()-o,height:this.helper.height()-s},r=parseFloat(this.element.css("left"))+(this.position.left-this.originalPosition.left)||null,l=parseFloat(this.element.css("top"))+(this.position.top-this.originalPosition.top)||null,h.animate||this.element.css(t.extend(a,{top:l,left:r})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,n,s,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,s=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),i<o.maxWidth&&(o.maxWidth=i),s<o.maxHeight&&(o.maxHeight=s)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,s=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),s&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),n&&h&&(t.left=r-e.maxWidth),a&&u&&(t.top=l-e.minHeight),s&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],n=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],s=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(n[e])||0,i[e]+=parseFloat(s[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize;return{top:this.originalPosition.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),a=o&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,l={width:i.size.width-r,height:i.size.height-a},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,u=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,u&&h?{top:u,left:h}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&t(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,n,s,o,a,r,l=t(this).resizable("instance"),h=l.options,u=l.element,c=h.containment,d=c instanceof t?c.get(0):/parent/.test(c)?u.parent().get(0):c;d&&(l.containerElement=t(d),/document/.test(c)||c===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){i[t]=l._num(e.css("padding"+n))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},n=l.containerOffset,s=l.containerSize.height,o=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:o,r=l._hasScroll(d)?d.scrollHeight:s,l.parentData={element:d,left:n.left,top:n.top,width:a,height:r}))},resize:function(e){var i,n,s,o,a=t(this).resizable("instance"),r=a.options,l=a.containerOffset,h=a.position,u=a._aspectRatio||e.shiftKey,c={top:0,left:0},d=a.containerElement,f=!0;d[0]!==document&&/static/.test(d.css("position"))&&(c=l),h.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-c.left),u&&(a.size.height=a.size.width/a.aspectRatio,f=!1),a.position.left=r.helper?l.left:0),h.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),u&&(a.size.width=a.size.height*a.aspectRatio,f=!1),a.position.top=a._helper?l.top:0),s=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),s&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-c.left:a.offset.left-l.left)),n=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-c.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,u&&(a.size.height=a.size.width/a.aspectRatio,f=!1)),n+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-n,u&&(a.size.width=a.size.height*a.aspectRatio,f=!1)),f||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,n=e.containerOffset,s=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),l=a.outerWidth()-e.sizeDiff.width,h=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-s.left-n.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-s.left-n.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance").options;t(e.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var n=t(this).resizable("instance"),s=n.options,o=n.originalSize,a=n.originalPosition,r={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-a.top||0,left:n.position.left-a.left||0};t(s.alsoResize).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),s={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(s[e]=i||null)}),e.css(s)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),n=i.options,s=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,h=l[0]||1,u=l[1]||1,c=Math.round((s.width-o.width)/h)*h,d=Math.round((s.height-o.height)/u)*u,f=o.width+c,p=o.height+d,g=n.maxWidth&&n.maxWidth<f,m=n.maxHeight&&n.maxHeight<p,v=n.minWidth&&n.minWidth>f,b=n.minHeight&&n.minHeight>p;n.grid=l,v&&(f+=h),b&&(p+=u),g&&(f-=h),m&&(p-=u),/^(se|s|e)$/.test(r)?(i.size.width=f,i.size.height=p):/^(ne)$/.test(r)?(i.size.width=f,i.size.height=p,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=f,i.size.height=p,i.position.left=a.left-c):((p-u<=0||f-h<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),p-u>0?(i.size.height=p,i.position.top=a.top-d):(p=u-e.height,i.size.height=p,i.position.top=a.top+o.height-p),f-h>0?(i.size.width=f,i.position.left=a.left-c):(f=h-e.width,i.size.width=f,i.position.left=a.left+o.width-f))}});t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),n=i.offset(),s={left:n.left-e.elementPos.left,top:n.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:s.left,top:s.top,right:s.left+i.outerWidth(),bottom:s.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,n=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(n.filter,this.element[0]),this._trigger("start",e),t(n.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=t.data(this,"selectable-item");n.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element}))}),t(e.target).parents().addBack().each(function(){var n,s=t.data(this,"selectable-item");if(s)return n=!e.metaKey&&!e.ctrlKey||!s.$element.hasClass("ui-selected"),i._removeClass(s.$element,n?"ui-unselecting":"ui-selected")._addClass(s.$element,n?"ui-selecting":"ui-unselecting"),s.unselecting=!n,s.selecting=n,s.selected=n,n?i._trigger("selecting",e,{selecting:s.element}):i._trigger("unselecting",e,{unselecting:s.element}),!1}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,n=this,s=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,l=e.pageY;return o>r&&(i=r,r=o,o=i),a>l&&(i=l,l=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:l-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1,u={};i&&i.element!==n.element[0]&&(u.left=i.left+n.elementPos.left,u.right=i.right+n.elementPos.left,u.top=i.top+n.elementPos.top,u.bottom=i.bottom+n.elementPos.top,"touch"===s.tolerance?h=!(u.left>r||u.right<o||u.top>l||u.bottom<a):"fit"===s.tolerance&&(h=u.left>o&&u.right<r&&u.top>a&&u.bottom<l),h?(i.selected&&(n._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(n._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(n._addClass(i.$element,"ui-selecting"),i.selecting=!0,n._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,n._addClass(i.$element,"ui-selected"),i.selected=!0):(n._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",e,{unselected:n.element})}),t(".ui-selecting",this.element[0]).each(function(){var n=t.data(this,"selectable-item");i._removeClass(n.$element,"ui-selecting")._addClass(n.$element,"ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",e,{selected:n.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",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._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(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){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,s=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,o.widgetName+"-item")===o)return n=t(this),!1}),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),!!n&&(!(this.options.handle&&!i&&(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(s=!0)}),!s))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,n){var s,o,a=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,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.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(s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,s,o,a=this.options,r=!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<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),!1!==r&&t.ui.ddmanager&&!a.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(s=(n=this.items[i]).item[0],(o=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===s||t.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],s))){if(this.direction=1===o?"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,s=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=s.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(a,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"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,s=n+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,u=this.offset.click.left,c="x"===this.options.axis||n+h>r&&n+h<l,d="y"===this.options.axis||e+u>o&&e+u<a,f=c&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?f:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<n+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,i,n="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!n||!s)&&(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?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(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&i||"left"===s&&!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,s,o,a=[],r=[],l=this._connectWith();if(l&&e)for(i=l.length-1;i>=0;i--)for(n=(s=t(l[i],this.document[0])).length-1;n>=0;n--)(o=t.data(s[n],this.widgetFullName))&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function h(){a.push(this)}for(r.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=r.length-1;i>=0;i--)r[i][0].each(h);return t(a)},_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,s,o,a,r,l,h,u=this.items,c=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=(s=t(d[i],this.document[0])).length-1;n>=0;n--)(o=t.data(s[n],this.widgetFullName))&&o!==this&&!o.options.disabled&&(c.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=c.length-1;i>=0;i--)for(a=c[i][1],n=0,h=(r=c[i][0]).length;n<h;n++)(l=t(r[n])).data(this.widgetName+"-item",a),u.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var i,n,s,o;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]||(s=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=s.outerWidth(),n.height=s.outerHeight()),o=s.offset(),n.left=o.left,n.top=o.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--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.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(),s=t("<"+n+">",e.document[0]);return e._addClass(s,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(s,"ui-sortable-helper"),"tbody"===n?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(s)):"tr"===n?e._createTrPlaceholder(e.currentItem,s):"img"===n&&s.attr("src",e.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(t,s){i&&!n.forcePlaceholderSize||(s.height()||s.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),s.width()||s.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,s,o,a,r,l,h,u,c,d=null,f=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(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],f=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(s=1e4,o=null,a=(u=d.floating||this._isFloating(this.currentItem))?"left":"top",r=u?"width":"height",c=u?"pageX":"pageY",n=this.items.length-1;n>=0;n--)t.contains(this.containers[f].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[a],h=!1,e[c]-l>this.items[n][r]/2&&(h=!0),Math.abs(e[c]-l)<s&&(s=Math.abs(e[c]-l),o=this.items[n],this.direction=h?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[f].element,!0),this._trigger("change",e,this._uiHash()),this.containers[f]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].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,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(e=t(s.containment)[0],i=t(s.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,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*n}},_generatePosition:function(e){var i,n,s=this.options,o=e.pageX,a=e.pageY,r="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(r[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]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),s.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1],a=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-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=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-s.grid[0]:n+s.grid[0]:n)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:r.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 s=this.counter;this._delay(function(){s===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),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function s(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(s("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(s("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}}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,n=this.options.icons;n&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,n.header)._addClass(i,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,n=this.headers.length,s=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[n-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,n=i.heightStyle,s=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),n=e.next(),s=n.uniqueId().attr("id");e.attr("aria-controls",s),n.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===n?(e=s.height(),this.element.siblings(":visible").each(function(){var i=t(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,n,s=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],l=r&&s.collapsible,h=l?t():a.next(),u=o.next(),c={oldHeader:o,oldPanel:u,newHeader:l?t():a,newPanel:h};e.preventDefault(),r&&!s.collapsible||!1===this._trigger("beforeActivate",e,c)||(s.active=!l&&this.headers.index(a),this.active=r?t():a,this._toggle(c),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),s.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,s.icons.activeHeader)._addClass(i,null,s.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),s.icons&&(n=a.children(".ui-accordion-header-icon"),this._removeClass(n,null,s.icons.header)._addClass(n,null,s.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,e):(n.hide(),i.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var n,s,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},c=h&&u.down||u,d=function(){a._toggleComplete(i)};return"number"==typeof c&&(o=c),"string"==typeof c&&(s=c),s=s||c.easing||u.easing,o=o||c.duration||u.duration,e.length?t.length?(n=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:s,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:s,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===l&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(n-e.outerHeight()-r),r=0)}})):e.animate(this.hideProps,o,s,d):t.animate(this.showProps,o,s,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),n=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),n=t(e.currentTarget);i[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,n,s,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,n=this.previousFilter||"",o=!1,s=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),s===n?o=!0:s=n+s,i=this._filterMenuItems(s),(i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i).length||(s=String.fromCharCode(e.keyCode),i=this._filterMenuItems(s)),i.length?(this.focus(e,i),this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,n,s,o=this,a=this.options.icons.submenu,r=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=r.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),n=t("<span>").data("ui-menu-submenu-caret",!0);o._addClass(n,"ui-menu-icon","ui-icon "+a),i.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),(e=r.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=t(this);o._isDivider(e)&&o._addClass(e,"ui-menu-divider","ui-widget-content")}),s=(n=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(s,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,n,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),s=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,s,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,s=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),s<0?this.activeMenu.scrollTop(o+s):s+r>a&&this.activeMenu.scrollTop(o+s-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this._removeClass(n.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[e]()),this.focus(i,n)},nextPage:function(e){var i,n,s;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-n-s<0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var i,n,s;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return(i=t(this)).offset().top-n+s>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}});t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,n,s=this.element[0].nodeName.toLowerCase(),o="textarea"===s,a="input"===s;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return e=!0,n=!0,void(i=!0);e=!1,n=!1,i=!1;var o=t.ui.keyCode;switch(s.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",s);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",s);break;case o.UP:e=!0,this._keyEvent("previous",s);break;case o.DOWN:e=!0,this._keyEvent("next",s);break;case o.ENTER:this.menu.active&&(e=!0,s.preventDefault(),this.menu.select(s));break;case o.TAB:this.menu.active&&this.menu.select(s);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||n.preventDefault());if(!i){var s=t.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),this._change(t))}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var n,s;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});s=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:s})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value),(n=i.item.attr("aria-label")||s.value)&&t.trim(n).length&&(this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(e,i){var n=i.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,n=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,n){n(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,s){n.xhr&&n.xhr.abort(),n.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){s(t)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),n=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||i||n)||(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var n=this;t.each(i,function(t,i){n._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var n=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return n.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}});t.ui.autocomplete;var h=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(n,s){var o,a={};if(s)return"controlgroupLabel"===n?((o=e.element.find(s)).each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),void(i=i.concat(o.get()))):void(t.fn[n]&&(a=e["_"+n+"Options"]?e["_"+n+"Options"]("middle"):{classes:{}},e.element.find(s).each(function(){var s=t(this),o=s[n]("instance"),r=t.widget.extend({},a);if("button"!==n||!s.parent(".ui-spinner").length){o||(o=s[n]()[n]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),s[n](r);var l=s[n]("widget");t.data(l[0],"ui-controlgroup-data",o||s[n]("instance")),i.push(l[0])}})))}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this).data("ui-controlgroup-data");i&&i[e]&&i[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,n={classes:{}};return n.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],n},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var n={};return t.each(e,function(s){var o=i.options.classes[s]||"";o=t.trim(o.replace(h,"")),n[s]=(o+" "+e[s]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,n){var s=e[n]().data("ui-controlgroup-data");if(s&&i["_"+s.widgetName+"Options"]){var o=i["_"+s.widgetName+"Options"](1===e.length?"only":n);o.classes=i._resolveClassesValues(o.classes,s),s.element[s.widgetName](o)}else i._updateCornerClass(e[n](),n)}),this._callChildMethod("refresh"))}});t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,n=this,s=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(s.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(s.disabled=e),s},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,i="input[name='"+t.ui.escapeSelector(e)+"']";return e?(this.form.length?t(this.form[0].elements).filter(i):t(i).filter(function(){return 0===t(this).form().length})).not(this.element):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);t.ui.checkboxradio;t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var n="iconPosition"!==e,s=n?this.options.iconPosition:i,o="top"===s||"bottom"===s;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,i),this._attachIcon(s),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(s))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var u;t.ui.button;function c(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=d(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function d(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,f)}function f(){t.datepicker._isDisabledDatepicker(u.inline?u.dpDiv.parent()[0]:u.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function p(e,i){for(var n in t.extend(e,i),i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"1.12.1"}}),t.extend(c.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return p(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,s,o;s="div"===(n=e.nodeName.toLowerCase())||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(o=this._newInst(t(e),s)).settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):s&&this._inlineDatepicker(e,o)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?d(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,s,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),"focus"!==(n=this._get(i,"showOn"))&&"both"!==n||e.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(s=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:s,title:s}):s)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,s,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,n=0,s=0;s<t.length;s++)t[s].length>i&&(i=t[s].length,n=s);return n},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,s,o){var a,r,l,h,u,c=this._dialogInst;return c||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),(c=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},t.data(this._dialogInput[0],"datepicker",c)),p(c.settings,s||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(r=document.documentElement.clientWidth,l=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[r/2-100+h,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",c),this},_destroyDatepicker:function(e){var i,n=t(e),s=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||n.removeClass(this.markerClassName).empty(),u===s&&(u=null))},_enableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||((n=s.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||((n=s.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,n){var s,o,a,r,l=this._getInst(e);if(2===arguments.length&&"string"==typeof i)return"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null;s=i||{},"string"==typeof i&&((s={})[i]=n),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(l,"min"),r=this._getMinMaxDate(l,"max"),p(l.settings,s),null!==a&&void 0!==s.dateFormat&&void 0===s.minDate&&(l.settings.minDate=this._formatDate(l,a)),null!==r&&void 0!==s.dateFormat&&void 0===s.maxDate&&(l.settings.maxDate=this._formatDate(l,r)),"disabled"in s&&(s.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,n,s,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return(s=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv))[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,s[0]),(i=t.datepicker._get(o,"onSelect"))?(n=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[n,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,n,s=t.datepicker._getInst(e.target);if(t.datepicker._get(s,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!i||i.indexOf(n)>-1},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(t){}return!0},_showDatepicker:function(e){var i,n,s,o,a,r,l;("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),t.datepicker._isDisabledDatepicker(e)||t.datepicker._lastInput===e)||(i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),!1!==(s=(n=t.datepicker._get(i,"beforeShow"))?n.apply(e,[e,i]):{})&&(p(i.settings,s),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),o=!1,t(e).parents().each(function(){return!(o|="fixed"===t(this).css("position"))}),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),a=t.datepicker._checkOffset(i,a,o),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":o?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(r=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[r]?i.dpDiv.show(r,t.datepicker._get(i,"showOptions"),l):i.dpDiv[r||"show"](r?l:null),t.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),t.datepicker._curInst=i)))},_updateDatepicker:function(e){this.maxRows=4,u=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,n=this._getNumberOfMonths(e),s=n[1],o=e.dpDiv.find("."+this._dayOverClass+" a");o.length>0&&f.apply(o.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var s=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?s-a:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,n=this._getInst(e),s=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[s?"previousSibling":"nextSibling"];return[(i=t(e).offset()).left,i.top]},_hideDatepicker:function(e){var i,n,s,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),s=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),n,s):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,(o=this._get(a,"onClose"))&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===n)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var s=t(e),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var s=t(e),o=this._getInst(s[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(e,i,n,s){var o,a=t(e);t(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||((o=this._getInst(a[0])).selectedDay=o.currentDay=t("a",s).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,s=t(e),o=this._getInst(s[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),(n=this._get(o,"onSelect"))?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,n,s,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),s=this.formatDate(i,n,this._getFormatConfig(e)),t(o).val(s))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var s,o,a,r,l=0,h=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),c=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,p=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,b=-1,_=!1,y=function(t){var i=s+1<e.length&&e.charAt(s+1)===t;return i&&s++,i},x=function(t){var e=y(t),n="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,s=new RegExp("^\\d{"+("y"===t?n:1)+","+n+"}"),o=i.substring(l).match(s);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},w=function(e,n,s){var o=-1,a=t.map(y(e)?s:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var n=e[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return o=e[0],l+=n.length,!1}),-1!==o)return o+1;throw"Unknown name at position "+l},k=function(){if(i.charAt(l)!==e.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<e.length;s++)if(_)"'"!==e.charAt(s)||y("'")?k():_=!1;else switch(e.charAt(s)){case"d":v=x("d");break;case"D":w("D",c,d);break;case"o":b=x("o");break;case"m":m=x("m");break;case"M":m=w("M",f,p);break;case"y":g=x("y");break;case"@":g=(r=new Date(x("@"))).getFullYear(),m=r.getMonth()+1,v=r.getDate();break;case"!":g=(r=new Date((x("!")-this._ticksTo1970)/1e4)).getFullYear(),m=r.getMonth()+1,v=r.getDate();break;case"'":y("'")?k():_=!0;break;default:k()}if(l<i.length&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=u?0:-100)),b>-1)for(m=1,v=b;;){if(v<=(o=this._getDaysInMonth(g,m-1)))break;m++,v-=o}if((r=this._daylightSavingAdjust(new Date(g,m-1,v))).getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+1<t.length&&t.charAt(n+1)===e;return i&&n++,i},h=function(t,e,i){var n=""+e;if(l(t))for(;n.length<i;)n="0"+n;return n},u=function(t,e,i,n){return l(t)?n[e]:i[e]},c="",d=!1;if(e)for(n=0;n<t.length;n++)if(d)"'"!==t.charAt(n)||l("'")?c+=t.charAt(n):d=!1;else switch(t.charAt(n)){case"d":c+=h("d",e.getDate(),2);break;case"D":c+=u("D",e.getDay(),s,o);break;case"o":c+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=h("m",e.getMonth()+1,2);break;case"M":c+=u("M",e.getMonth(),a,r);break;case"y":c+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?c+="'":d=!0;break;default:c+=t.charAt(n)}return c},_possibleChars:function(t){var e,i="",n=!1,s=function(i){var n=e+1<t.length&&t.charAt(e+1)===i;return n&&e++,n};for(e=0;e<t.length;e++)if(n)"'"!==t.charAt(e)||s("'")?i+=t.charAt(e):n=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),n=t.lastVal=t.input?t.input.val():null,s=this._getDefaultDate(t),o=s,a=this._getFormatConfig(t);try{o=this.parseDate(i,n,a)||s}catch(t){n=e?"":n}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=n?o.getDate():0,t.currentMonth=n?o.getMonth():0,t.currentYear=n?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,n){var s=null==i||""===i?n:"string"==typeof i?function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(t){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,s=n.getFullYear(),o=n.getMonth(),a=n.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=r.exec(i);l;){switch(l[2]||"d"){case"d":case"D":a+=parseInt(l[1],10);break;case"w":case"W":a+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(s,o));break;case"y":case"Y":s+=parseInt(l[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(s,o))}l=r.exec(i)}return new Date(s,o,a)}(i):"number"==typeof i?isNaN(i)?n:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(i):new Date(i.getTime());return(s=s&&"Invalid Date"===s.toString()?n:s)&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,s=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),s===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,s,o,a,r,l,h,u,c,d,f,p,g,m,v,b,_,y,x,w,k,C,D,M,S,T,I,P,A,F,O,E,N,z,L,H,R,W=new Date,B=this._daylightSavingAdjust(new Date(W.getFullYear(),W.getMonth(),W.getDate())),V=this._get(t,"isRTL"),U=this._get(t,"showButtonPanel"),j=this._get(t,"hideIfNoPrevNext"),Y=this._get(t,"navigationAsDateFormat"),q=this._getNumberOfMonths(t),$=this._get(t,"showCurrentAtPos"),K=this._get(t,"stepMonths"),X=1!==q[0]||1!==q[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),Z=this._getMinMaxDate(t,"max"),J=t.drawMonth-$,tt=t.drawYear;if(J<0&&(J+=12,tt--),Z)for(e=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-q[0]*q[1]+1,Z.getDate())),e=Q&&e<Q?Q:e;this._daylightSavingAdjust(new Date(tt,J,1))>e;)--J<0&&(J=11,tt--);for(t.drawMonth=J,t.drawYear=tt,i=this._get(t,"prevText"),i=Y?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,J-K,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,tt,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>":j?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"e":"w")+"'>"+i+"</span></a>",s=this._get(t,"nextText"),s=Y?this.formatDate(s,this._daylightSavingAdjust(new Date(tt,J+K,1)),this._getFormatConfig(t)):s,o=this._canAdjustMonth(t,1,tt,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+s+"</span></a>":j?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(V?"w":"e")+"'>"+s+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=Y?this.formatDate(a,r,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(V?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(V?"":l)+"</div>":"",u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,c=this._get(t,"showWeek"),d=this._get(t,"dayNames"),f=this._get(t,"dayNamesMin"),p=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),b=this._get(t,"selectOtherMonths"),_=this._getDefaultDate(t),y="",w=0;w<q[0];w++){for(k="",this.maxRows=4,C=0;C<q[1];C++){if(D=this._daylightSavingAdjust(new Date(tt,J,t.selectedDay)),M=" ui-corner-all",S="",X){if(S+="<div class='ui-datepicker-group",q[1]>1)switch(C){case 0:S+=" ui-datepicker-group-first",M=" ui-corner-"+(V?"right":"left");break;case q[1]-1:S+=" ui-datepicker-group-last",M=" ui-corner-"+(V?"left":"right");break;default:S+=" ui-datepicker-group-middle",M=""}S+="'>"}for(S+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+M+"'>"+(/all|left/.test(M)&&0===w?V?o:n:"")+(/all|right/.test(M)&&0===w?V?n:o:"")+this._generateMonthYearHeader(t,J,tt,Q,Z,w>0||C>0,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",T=c?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;x<7;x++)T+="<th scope='col'"+((x+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[I=(x+u)%7]+"'>"+f[I]+"</span></th>";for(S+=T+"</tr></thead><tbody>",P=this._getDaysInMonth(tt,J),tt===t.selectedYear&&J===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,P)),A=(this._getFirstDayOfMonth(tt,J)-u+7)%7,F=Math.ceil((A+P)/7),O=X&&this.maxRows>F?this.maxRows:F,this.maxRows=O,E=this._daylightSavingAdjust(new Date(tt,J,1-A)),N=0;N<O;N++){for(S+="<tr>",z=c?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(E)+"</td>":"",x=0;x<7;x++)L=m?m.apply(t.input?t.input[0]:null,[E]):[!0,""],R=(H=E.getMonth()!==J)&&!b||!L[0]||Q&&E<Q||Z&&E>Z,z+="<td class='"+((x+u+6)%7>=5?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(E.getTime()===D.getTime()&&J===t.selectedMonth&&t._keyEvent||_.getTime()===E.getTime()&&_.getTime()===D.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!v?"":" "+L[1]+(E.getTime()===G.getTime()?" "+this._currentClass:"")+(E.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(H&&!v||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+(H&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===B.getTime()?" ui-state-highlight":"")+(E.getTime()===G.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()+1),E=this._daylightSavingAdjust(E);S+=z+"</tr>"}++J>11&&(J=0,tt++),k+=S+="</tbody></table>"+(X?"</div>"+(q[0]>0&&C===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}y+=k}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,n,s,o,a,r){var l,h,u,c,d,f,p,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),b=this._get(t,"showMonthAfterYear"),_="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=n&&n.getFullYear()===i,h=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=n.getMonth())&&(!h||u<=s.getMonth())&&(y+="<option value='"+u+"'"+(u===e?" selected='selected'":"")+">"+r[u]+"</option>");y+="</select>"}if(b||(_+=y+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)_+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(c=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=(f=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(c[0]),g=Math.max(p,f(c[1]||"")),p=n?Math.max(p,n.getFullYear()):p,g=s?Math.min(g,s.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=g;p++)t.yearshtml+="<option value='"+p+"'"+(p===i?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",_+=t.yearshtml,t.yearshtml=null}return _+=this._get(t,"yearSuffix"),b&&(_+=(!o&&m&&v?"":"&#xa0;")+y),_+="</div>"},_adjustInstDate:function(t,e,i){var n=t.selectedYear+("Y"===i?e:0),s=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,s))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,s,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),s=i&&e<i?i:e;return n&&s>n?n:s},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var s=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(e<0?e:s[0]*s[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,s=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=n),i[1].match(/[+\-].*/)&&(r+=n)),(!s||e.getTime()>=s.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||e.getFullYear()<=r)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new c,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1";t.datepicker;t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var n=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,s);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),n=!0),n&&!i&&this._trigger("focus",e),n},open:function(){var e=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");e.target!==s[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){s.trigger("focus")}),e.preventDefault()):(this._delay(function(){n.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(t.each(i,function(i,n){var s,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),s=n.click,o={icon:n.icon,iconPosition:n.iconPosition,showLabel:n.showLabel,icons:n.icons,text:n.text},delete n.click,delete n.icon,delete n.iconPosition,delete n.showLabel,delete n.icons,"boolean"==typeof n.text&&delete n.text,t("<button></button>",n).button(o).appendTo(e.uiButtonSet).on("click",function(){s.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var e=this,i=this.options;function n(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,s){e._addClass(t(this),"ui-dialog-dragging"),e._blockFrames(),e._trigger("dragStart",i,n(s))},drag:function(t,i){e._trigger("drag",t,n(i))},stop:function(s,o){var a=o.offset.left-e.document.scrollLeft(),r=o.offset.top-e.document.scrollTop();i.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(r>=0?"+":"")+r,of:e.window},e._removeClass(t(this),"ui-dialog-dragging"),e._unblockFrames(),e._trigger("dragStop",s,n(o))}})},_makeResizable:function(){var e=this,i=this.options,n=i.resizable,s=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:o,start:function(i,n){e._addClass(t(this),"ui-dialog-resizing"),e._blockFrames(),e._trigger("resizeStart",i,a(n))},resize:function(t,i){e._trigger("resize",t,a(i))},stop:function(n,s){var o=e.uiDialog.offset(),r=o.left-e.document.scrollLeft(),l=o.top-e.document.scrollTop();i.height=e.uiDialog.height(),i.width=e.uiDialog.width(),i.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" top"+(l>=0?"+":"")+l,of:e.window},e._removeClass(t(this),"ui-dialog-resizing"),e._unblockFrames(),e._trigger("resizeStop",n,a(s))}}).css("position",s)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,n=!1,s={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(n=!0),t in i.resizableRelatedOptions&&(s[t]=e)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(e,i){var n,s,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&((n=o.is(":data(ui-draggable)"))&&!i&&o.draggable("destroy"),!n&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&((s=o.is(":data(ui-resizable)"))&&!i&&o.resizable("destroy"),s&&"string"==typeof i&&o.resizable("option","handles",i),s||!1===i||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});t.ui.dialog,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var n=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&n.index!==e.focusIndex&&(e._trigger("focus",t,{item:n}),e.isOpen||e._select(n,t)),e.focusIndex=n.index,e.button.attr("aria-activedescendant",e.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var n=this,s="";t.each(i,function(i,o){var a;o.optgroup!==s&&(a=t("<li>",{text:o.optgroup}),n._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),s=o.optgroup),n._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var n=t("<li>"),s=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(s,i.label),n.append(s).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var i,n,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(n="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,n=[];e.each(function(e,s){n.push(i._parseOption(t(s),e))}),this.items=n},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,s=this.element.find(".ui-slider-handle"),o=[];for(i=n.values&&n.values.length||1,s.length>i&&(s.slice(i).remove(),s=s.slice(0,i)),e=s.length;e<i;e++)o.push("<span tabindex='0'></span>");this.handles=s.add(t(o.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,n,s,o,a,r,l,h=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-h.values(e));(s>i||s===i&&(e===h._lastChangedValue||h.values(e)===u.min))&&(s=i,o=t(this),a=e)}),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),r=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-r.left-o.width()/2,top:e.pageY-r.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,s,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(n=i/e)>1&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),o=this._valueMin()+n*s,this._trimAlignValue(o)},_uiHash:function(t,e,i){var n={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(n.value=void 0!==e?e:this.values(t),n.values=i||this.values()),n},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var n,s=this.value(),o=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),s=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(n,i):Math.max(n,i)),o[e]=i),i!==s&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var n,s,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,s=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,s=0;switch("range"===e&&!0===this.options.range&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(s=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=s-1;n>=0;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,n,s,o,a=this.options.range,r=this.options,l=this,h=!this._animateOff&&r.animate,u={};this._hasMultipleValues()?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===n&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===n&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===n&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),i=o!==s?(n-s)/(o-s)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,n,s,o=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,o)))return}switch(s=this.options.step,i=n=this._hasMultipleValues()?this.values(o):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;n=this._trimAlignValue(i+s);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;n=this._trimAlignValue(i-s)}this._slide(e,o,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}});function g(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,n){var s=i.attr(n);null!=s&&s.length&&(e[n]=s)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){var i;function n(){this.element[0]===t.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=i,this._delay(function(){this.previous=i}))}i=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return i=t-(e=null!==n.min?n.min:0),t=e+(i=Math.round(i/n.step)*n.step),t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&t<n.min?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,n,s;if("culture"===t||"numberFormat"===t)return i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(n=this.buttons.first().find(".ui-icon"),this._removeClass(n,null,this.options.icons.up),this._addClass(n,null,e.up),s=this.buttons.last().find(".ui-icon"),this._removeClass(s,null,this.options.icons.down),this._addClass(s,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:g(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:g(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:g(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:g(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:g(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());g(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var m;t.ui.spinner;t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(m=/#.*$/,function(t){var e,i;e=t.href.replace(m,""),i=location.href.replace(m,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return t.hash.length>1&&e===i}),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===e&&(n&&this.tabs.each(function(i,s){if(t(s).attr("aria-controls")===n)return e=i,!1}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==e&&-1!==e||(e=!!this.tabs.length&&0)),!1!==e&&-1===(e=this.tabs.index(this.tabs.eq(e)))&&(e=!i&&0),!i&&!1===e&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:s=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,s),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){var n=this.tabs.length-1;for(;-1!==t.inArray((e>n&&(e=0),e<0&&(e=n),e),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,n=this.anchors,s=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,n){var s,o,a,r=t(n).uniqueId().attr("id"),l=t(n).closest("li"),h=l.attr("aria-controls");e._isLocal(n)?(a=(s=n.hash).substring(1),o=e.element.find(e._sanitizeSelector(s))):(s="#"+(a=l.attr("aria-controls")||t({}).uniqueId()[0].id),(o=e.element.find(s)).length||(o=e._createPanel(a)).insertAfter(e.panels[i-1]||e.tablist),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),h&&l.data("ui-tabs-aria-controls",h),l.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(s.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,n,s;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),s=0;n=this.tabs[s];s++)i=t(n),!0===e||-1!==t.inArray(s,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,n=this.active,s=t(e.currentTarget).closest("li"),o=s[0]===n[0],a=o&&i.collapsible,r=a?t():this._getPanelForTab(s),l=n.length?this._getPanelForTab(n):t(),h={oldTab:n,oldPanel:l,newTab:a?t():s,newPanel:r};e.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||!1===this._trigger("beforeActivate",e,h)||(i.active=!a&&this.tabs.index(s),this.active=o?t():s,this.xhr&&this.xhr.abort(),l.length||r.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),r.length&&this.load(this.tabs.index(s),e),this._toggle(e,h))},_toggle:function(e,i){var n=this,s=i.newPanel,o=i.oldPanel;function a(){n.running=!1,n._trigger("activate",e,i)}function r(){n._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&n.options.show?n._show(s,n.options.show,a):(s.show(),a())}this.running=!0,o.length&&this.options.hide?this._hide(o,this.options.hide,function(){n._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o.hide(),r()),o.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&o.length?i.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return!1===e?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;!1!==i&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(!0!==i){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var n=this,s=this.tabs.eq(e),o=s.find(".ui-tabs-anchor"),a=this._getPanelForTab(s),r={tab:s,panel:a},l=function(t,e){"abort"===e&&n.panels.stop(!1,!0),n._removeClass(s,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(s,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,s){setTimeout(function(){a.html(t),n._trigger("load",i,r),l(s,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,i,n){var s=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return s._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),!1!==t.uiBackCompat&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});t.ui.tabs;t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),s=t.inArray(i,n);-1!==s&&n.splice(s,1),e.removeData("ui-tooltip-id"),(n=t.trim(n.join(" ")))?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var n=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var s=t.Event("blur");s.target=s.currentTarget=n.element[0],e.close(s,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&((e=t.Event("blur")).target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._registerCloseHandlers(e,n),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,s=this,o=e?e.type:null;if("string"==typeof n||n.nodeType||n.jquery)return this._open(e,t,n);(i=n.call(t[0],function(i){s._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}))&&this._open(e,t,i)},_open:function(e,i,n){var s,o,a,r,l=t.extend({},this.options.position);function h(t){l.of=t,o.is(":hidden")||o.position(l)}n&&((s=this._find(i))?s.tooltip.find(".ui-tooltip-content").html(n):(i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),s=this._tooltip(i),o=s.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),(r=t("<div>").html(o.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),r.removeAttr("id").find("[id]").removeAttr("id"),r.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:h}),h(e)):o.position(t.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){o.is(":visible")&&(h(l.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:o})))},_registerCloseHandlers:function(e,i){var n={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var n=t.Event(e);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(n.mouseleave="close"),e&&"focusin"!==e.type||(n.focusout="close"),this._on(!0,i,n)},close:function(e){var i,n=this,s=t(e?e.currentTarget:this.element),o=this._find(s);o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(t(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),n=t("<div>").appendTo(i),s=i.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[s]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,n){var s=t.Event("blur"),o=n.element;s.target=s.currentTarget=o[0],e.close(s,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});t.ui.tooltip;var v,b="ui-effects-animated",_=t;t.effects={effect:{}},function(t,e){var i,n=/^([\-+])=\s*(\d+\.?\d*)/,s=[{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]]}}],o=t.Color=function(e,i,n,s){return new t.Color.fn.parse(e,i,n,s)},a={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"}}}},r={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},l=o.support={},h=t("<p>")[0],u=t.each;function c(t,e,i){var n=r[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 d(e){var n=o(),r=n._rgba=[];return e=e.toLowerCase(),u(s,function(t,i){var s,o=i.re.exec(e),l=o&&i.parse(o),h=i.space||"rgba";if(l)return s=n[h](l),n[a[h].cache]=s[a[h].cache],r=n._rgba=s._rgba,!1}),r.length?("0,0,0,0"===r.join()&&t.extend(r,i.transparent),n):i[e]}function f(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}h.style.cssText="background-color:rgba(1,1,1,.5)",l.rgba=h.style.backgroundColor.indexOf("rgba")>-1,u(a,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),o.fn=t.extend(o.prototype,{parse:function(e,n,s,r){if(void 0===e)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=t(e).css(n),n=void 0);var l=this,h=t.type(e),f=this._rgba=[];return void 0!==n&&(e=[e,n,s,r],h="array"),"string"===h?this.parse(d(e)||i._default):"array"===h?(u(a.rgba.props,function(t,i){f[i.idx]=c(e[i.idx],i)}),this):"object"===h?(u(a,e instanceof o?function(t,i){e[i.cache]&&(l[i.cache]=e[i.cache].slice())}:function(i,n){var s=n.cache;u(n.props,function(t,i){if(!l[s]&&n.to){if("alpha"===t||null==e[t])return;l[s]=n.to(l._rgba)}l[s][i.idx]=c(e[t],i,!0)}),l[s]&&t.inArray(null,l[s].slice(0,3))<0&&(l[s][3]=1,n.from&&(l._rgba=n.from(l[s])))}),this):void 0},is:function(t){var e=o(t),i=!0,n=this;return u(a,function(t,s){var o,a=e[s.cache];return a&&(o=n[s.cache]||s.to&&s.to(n._rgba)||[],u(s.props,function(t,e){if(null!=a[e.idx])return i=a[e.idx]===o[e.idx]})),i}),i},_space:function(){var t=[],e=this;return u(a,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var i=o(t),n=i._space(),s=a[n],l=0===this.alpha()?o("transparent"):this,h=l[s.cache]||s.to(l._rgba),d=h.slice();return i=i[s.cache],u(s.props,function(t,n){var s=n.idx,o=h[s],a=i[s],l=r[n.type]||{};null!==a&&(null===o?d[s]=a:(l.mod&&(a-o>l.mod/2?o+=l.mod:o-a>l.mod/2&&(o-=l.mod)),d[s]=c((a-o)*e+o,n)))}),this[n](d)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),s=o(e)._rgba;return o(t.map(i,function(t,e){return(1-n)*s[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()}}),o.fn.parse.prototype=o.fn,a.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,s=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(n,s,o),l=Math.min(n,s,o),h=r-l,u=r+l,c=.5*u;return e=l===r?0:n===r?60*(s-o)/h+360:s===r?60*(o-n)/h+120:60*(n-s)/h+240,i=0===h?0:c<=.5?h/u:h/(2-u),[Math.round(e)%360,i,c,null==a?1:a]},a.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],s=t[3],o=n<=.5?n*(1+i):n+i-n*i,a=2*n-o;return[Math.round(255*f(a,o,e+1/3)),Math.round(255*f(a,o,e)),Math.round(255*f(a,o,e-1/3)),s]},u(a,function(e,i){var s=i.props,a=i.cache,r=i.to,l=i.from;o.fn[e]=function(e){if(r&&!this[a]&&(this[a]=r(this._rgba)),void 0===e)return this[a].slice();var i,n=t.type(e),h="array"===n||"object"===n?e:arguments,d=this[a].slice();return u(s,function(t,e){var i=h["object"===n?t:e.idx];null==i&&(i=d[e.idx]),d[e.idx]=c(i,e)}),l?((i=o(l(d)))[a]=d,i):o(d)},u(s,function(i,s){o.fn[i]||(o.fn[i]=function(o){var a,r=t.type(o),l="alpha"===i?this._hsla?"hsla":"rgba":e,h=this[l](),u=h[s.idx];return"undefined"===r?u:("function"===r&&(o=o.call(this,u),r=t.type(o)),null==o&&s.empty?this:("string"===r&&(a=n.exec(o))&&(o=u+parseFloat(a[2])*("+"===a[1]?1:-1)),h[s.idx]=o,this[l](h)))})})}),o.hook=function(e){var i=e.split(" ");u(i,function(e,i){t.cssHooks[i]={set:function(e,n){var s,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(s=d(n)))){if(n=o(s||n),!l.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(t){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=o(e.elem,i),e.end=o(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},o.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return u(["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"}}(_),function(){var e,i=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function s(e){var i,n,s=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(n=s.length;n--;)"string"==typeof s[i=s[n]]&&(o[t.camelCase(i)]=s[i]);else for(i in s)"string"==typeof s[i]&&(o[i]=s[i]);return o}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)&&(_.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(e,o,a,r){var l=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",h=l.children?a.find("*").addBack():a;h=h.map(function(){return{el:t(this),start:s(this)}}),(o=function(){t.each(i,function(t,i){e[i]&&a[i+"Class"](e[i])})})(),h=h.map(function(){return this.end=s(this.el[0]),this.diff=function(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||!t.fx.step[s]&&isNaN(parseFloat(o))||(a[s]=o));return a}(this.start,this.end),this}),a.attr("class",r),h=h.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,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addClass:(e=t.fn.addClass,function(i,n,s,o){return n?t.effects.animateClass.call(this,{add:i},n,s,o):e.apply(this,arguments)}),removeClass:function(e){return function(i,n,s,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,s,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,s,o,a){return"boolean"==typeof n||void 0===n?s?t.effects.animateClass.call(this,n?{add:i}:{remove:i},s,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,s,o)}}(t.fn.toggleClass),switchClass:function(e,i,n,s,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,s,o)}})}(),function(){var e;function i(e,i,n,s){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(s=n,n=i,i={}),t.isFunction(n)&&(s=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=s||i.complete,e}function n(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))}function s(t,e){var i=e.outerWidth(),n=e.outerHeight(),s=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,n,0];return{top:parseFloat(s[1])||0,right:"auto"===s[2]?i:parseFloat(s[2]),bottom:"auto"===s[3]?n:parseFloat(s[3]),left:parseFloat(s[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=(e=t.expr.filters.animated,function(i){return!!t(i).data(b)||e(i)})),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,n=e.length;i<n;i++)null!==e[i]&&t.data("ui-effects-"+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,n=0,s=e.length;n<s;n++)null!==e[n]&&(i=t.data("ui-effects-"+e[n]),t.css(e[n],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},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}),s={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("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(s),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).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,s="vertical"!==i?(e||100)/100:1;return{height:t.height()*s,width:t.width()*n,outerHeight:t.outerHeight()*s,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data("ui-effects-style",t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data("ui-effects-style")||"",t.removeData("ui-effects-style")},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),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}},createPlaceholder:function(e){var i,n=e.css("position"),s=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data("ui-effects-placeholder",i)),e.css({position:n,left:s.left,top:s.top}),i},removePlaceholder:function(t){var e="ui-effects-placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,n,s){return s=s||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(s[i]=o[0]*n+o[1])}),s}}),t.fn.extend({effect:function(){var e=i.apply(this,arguments),n=t.effects.effect[e.effect],s=n.mode,o=e.queue,a=o||"fx",r=e.complete,l=e.mode,h=[],u=function(e){var i=t(this),n=t.effects.mode(i,l)||s;i.data(b,!0),h.push(n),s&&("show"===n||n===s&&"hide"===n)&&i.show(),s&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};if(t.fx.off||!n)return l?this[l](e.duration,r):this.each(function(){r&&r.call(this)});function c(i){var o=t(this);function a(){t.isFunction(r)&&r.call(o[0]),t.isFunction(i)&&i()}e.mode=h.shift(),!1===t.uiBackCompat||s?"none"===e.mode?(o[l](),a()):n.call(o[0],e,function(){o.removeData(b),t.effects.cleanUp(o),"hide"===e.mode&&o.hide(),a()}):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):n.call(o[0],e,a)}return!1===o?this.each(u).each(c):this.queue(a,u).queue(a,c)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var s=i.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var s=i.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var s=i.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}}(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},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var n=t(this),s=t(e.to),o="fixed"===s.css("position"),a=t("body"),r=o?a.scrollTop():0,l=o?a.scrollLeft():0,h=s.offset(),u={top:h.top-r,left:h.left-l,height:s.innerHeight(),width:s.innerWidth()},c=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:c.top-r,left:c.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),v={},t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){v[e]=function(e){return Math.pow(e,t+2)}}),t.extend(v,{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(v,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,t.effects.define("blind","hide",function(e,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=t(this),o=e.direction||"up",a=s.cssClip(),r={clip:t.extend({},a)},l=t.effects.createPlaceholder(s);r.clip[n[o][0]]=r.clip[n[o][1]],"show"===e.mode&&(s.cssClip(r.clip),l&&l.css(t.effects.clipToBox(r)),r.clip=a),l&&l.animate(t.effects.clipToBox(r),e.duration,e.easing),s.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var n,s,o,a=t(this),r=e.mode,l="hide"===r,h="show"===r,u=e.direction||"up",c=e.distance,d=e.times||5,f=2*d+(h||l?1:0),p=e.duration/f,g=e.easing,m="up"===u||"down"===u?"top":"left",v="up"===u||"left"===u,b=0,_=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),c||(c=a["top"===m?"outerHeight":"outerWidth"]()/3),h&&((s={opacity:1})[m]=o,a.css("opacity",0).css(m,v?2*-c:2*c).animate(s,p,g)),l&&(c/=Math.pow(2,d-1)),(s={})[m]=o;b<d;b++)(n={})[m]=(v?"-=":"+=")+c,a.animate(n,p,g).animate(s,p,g),c=l?2*c:c/2;l&&((n={opacity:0})[m]=(v?"-=":"+=")+c,a.animate(n,p,g)),a.queue(i),t.effects.unshift(a,_,f+1)}),t.effects.define("clip","hide",function(e,i){var n,s={},o=t(this),a=e.direction||"vertical",r="both"===a,l=r||"horizontal"===a,h=r||"vertical"===a;n=o.cssClip(),s.clip={top:h?(n.bottom-n.top)/2:n.top,right:l?(n.right-n.left)/2:n.right,bottom:h?(n.bottom-n.top)/2:n.bottom,left:l?(n.right-n.left)/2:n.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(s.clip),s.clip=n),o.animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var n,s=t(this),o="show"===e.mode,a=e.direction||"left",r="up"===a||"down"===a?"top":"left",l="up"===a||"left"===a?"-=":"+=",h="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(s),n=e.distance||s["top"===r?"outerHeight":"outerWidth"](!0)/2,u[r]=l+n,o&&(s.css(u),u[r]=h+n,u.opacity=1),s.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){var n,s,o,a,r,l,h=e.pieces?Math.round(Math.sqrt(e.pieces)):3,u=h,c=t(this),d="show"===e.mode,f=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/u),g=Math.ceil(c.outerHeight()/h),m=[];function v(){m.push(this),m.length===h*u&&(c.css({visibility:"visible"}),t(m).remove(),i())}for(n=0;n<h;n++)for(a=f.top+n*g,l=n-(h-1)/2,s=0;s<u;s++)o=f.left+s*p,r=s-(u-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-n*g}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:g,left:o+(d?r*p:0),top:a+(d?l*g:0),opacity:d?0:1}).animate({left:o+(d?0:r*p),top:a+(d?0:l*g),opacity:d?1:0},e.duration||500,e.easing,v)}),t.effects.define("fade","toggle",function(e,i){var n="show"===e.mode;t(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var n=t(this),s=e.mode,o="show"===s,a="hide"===s,r=e.size||15,l=/([0-9]+)%/.exec(r),h=!!e.horizFirst?["right","bottom"]:["bottom","right"],u=e.duration/2,c=t.effects.createPlaceholder(n),d=n.cssClip(),f={clip:t.extend({},d)},p={clip:t.extend({},d)},g=[d[h[0]],d[h[1]]],m=n.queue().length;l&&(r=parseInt(l[1],10)/100*g[a?0:1]),f.clip[h[0]]=r,p.clip[h[0]]=r,p.clip[h[1]]=0,o&&(n.cssClip(p.clip),c&&c.css(t.effects.clipToBox(p)),p.clip=d),n.queue(function(i){c&&c.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(p),u,e.easing),i()}).animate(f,u,e.easing).animate(p,u,e.easing).queue(i),t.effects.unshift(n,m,4)}),t.effects.define("highlight","show",function(e,i){var n=t(this),s={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(s.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var n,s,o,a=t(this),r=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=e.mode,c="effect"!==u,d=e.scale||"both",f=e.origin||["middle","center"],p=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),v=e.from||m,b=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===u&&(o=v,v=b,b=o),s={from:{y:v.height/m.height,x:v.width/m.width},to:{y:b.height/m.height,x:b.width/m.width}},"box"!==d&&"both"!==d||(s.from.y!==s.to.y&&(v=t.effects.setTransition(a,l,s.from.y,v),b=t.effects.setTransition(a,l,s.to.y,b)),s.from.x!==s.to.x&&(v=t.effects.setTransition(a,h,s.from.x,v),b=t.effects.setTransition(a,h,s.to.x,b))),"content"!==d&&"both"!==d||s.from.y!==s.to.y&&(v=t.effects.setTransition(a,r,s.from.y,v),b=t.effects.setTransition(a,r,s.to.y,b)),f&&(n=t.effects.getBaseline(f,m),v.top=(m.outerHeight-v.outerHeight)*n.y+g.top,v.left=(m.outerWidth-v.outerWidth)*n.x+g.left,b.top=(m.outerHeight-b.outerHeight)*n.y+g.top,b.left=(m.outerWidth-b.outerWidth)*n.x+g.left),a.css(v),"content"!==d&&"both"!==d||(l=l.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),n=t.effects.scaledDimensions(i),o={height:n.height*s.from.y,width:n.width*s.from.x,outerHeight:n.outerHeight*s.from.y,outerWidth:n.outerWidth*s.from.x},a={height:n.height*s.to.y,width:n.width*s.to.x,outerHeight:n.height*s.to.y,outerWidth:n.width*s.to.x};s.from.y!==s.to.y&&(o=t.effects.setTransition(i,l,s.from.y,o),a=t.effects.setTransition(i,l,s.to.y,a)),s.from.x!==s.to.x&&(o=t.effects.setTransition(i,h,s.from.x,o),a=t.effects.setTransition(i,h,s.to.x,a)),c&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){c&&t.effects.restoreStyle(i)})})),a.animate(b,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===b.opacity&&a.css("opacity",v.opacity),c||(a.css("position","static"===p?"relative":p).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var n=t(this),s=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==s?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var n=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,n,i)}),t.effects.define("pulsate","show",function(e,i){var n=t(this),s=e.mode,o="show"===s,a=o||"hide"===s,r=2*(e.times||5)+(a?1:0),l=e.duration/r,h=0,u=1,c=n.queue().length;for(!o&&n.is(":visible")||(n.css("opacity",0).show(),h=1);u<r;u++)n.animate({opacity:h},l,e.easing),h=1-h;n.animate({opacity:h},l,e.easing),n.queue(i),t.effects.unshift(n,c,r+1)}),t.effects.define("shake",function(e,i){var n=1,s=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,l=2*r+1,h=Math.round(e.duration/l),u="up"===o||"down"===o?"top":"left",c="up"===o||"left"===o,d={},f={},p={},g=s.queue().length;for(t.effects.createPlaceholder(s),d[u]=(c?"-=":"+=")+a,f[u]=(c?"+=":"-=")+2*a,p[u]=(c?"-=":"+=")+2*a,s.animate(d,h,e.easing);n<r;n++)s.animate(f,h,e.easing).animate(p,h,e.easing);s.animate(f,h,e.easing).animate(d,h/2,e.easing).queue(i),t.effects.unshift(s,g,l+1)}),t.effects.define("slide","show",function(e,i){var n,s,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",u="up"===l||"left"===l,c=e.distance||o["top"===h?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),n=o.cssClip(),s=o.position()[h],d[h]=(u?-1:1)*c+s,d.clip=o.cssClip(),d.clip[a[l][1]]=d.clip[a[l][0]],"show"===r&&(o.cssClip(d.clip),o.css(h,d[h]),d.clip=n,d[h]=s),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});!1!==t.uiBackCompat&&t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})}),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 s,o,a,r,l,h,u,c,d="<div></div>",f=30,p=!1,g=e(this);if(g.parent().hasClass(n.wrapperClass)){var m=g.scrollTop();if(w=g.siblings("."+n.barClass),x=g.siblings("."+n.railClass),M(),e.isPlainObject(i)){if("height"in i&&"auto"==i.height){g.parent().css("height","auto"),g.css("height","auto");var v=g.parent().parent().height();g.parent().css("height",v),g.css("height",v)}else if("height"in i){var b=i.height;g.parent().css("height",b),g.css("height",b)}if("scrollTo"in i)m=parseInt(n.scrollTo);else if("scrollBy"in i)m+=parseInt(n.scrollBy);else if("destroy"in i)return w.remove(),x.remove(),void g.unwrap();D(m,!1,!0)}}else if(!(e.isPlainObject(i)&&"destroy"in i)){n.height="auto"==n.height?g.parent().height():n.height;var _=e(d).addClass(n.wrapperClass).css({position:"relative",overflow:"hidden",width:n.width,height:n.height});g.css({overflow:"hidden",width:n.width,height:n.height});var y,x=e(d).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}),w=e(d).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}),k="right"==n.position?{right:n.distance}:{left:n.distance};x.css(k),w.css(k),g.wrap(_),g.parent().append(w),g.parent().append(x),n.railDraggable&&w.bind("mousedown",function(i){var n=e(document);return a=!0,t=parseFloat(w.css("top")),pageY=i.pageY,n.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY,w.css("top",currTop),D(0,w.position().top,!1)}),n.bind("mouseup.slimscroll",function(t){a=!1,T(),n.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(t){return t.stopPropagation(),t.preventDefault(),!1}),x.hover(function(){S()},function(){T()}),w.hover(function(){o=!0},function(){o=!1}),g.hover(function(){s=!0,S(),T()},function(){s=!1,T()}),g.bind("touchstart",function(t,e){t.originalEvent.touches.length&&(l=t.originalEvent.touches[0].pageY)}),g.bind("touchmove",function(t){(p||t.originalEvent.preventDefault(),t.originalEvent.touches.length)&&(D((l-t.originalEvent.touches[0].pageY)/n.touchScrollStep,!0),l=t.originalEvent.touches[0].pageY)}),M(),"bottom"===n.start?(w.css({top:g.outerHeight()-w.outerHeight()}),D(0,!0)):"top"!==n.start&&(D(e(n.start).position().top,null,!0),n.alwaysVisible||w.hide()),y=this,window.addEventListener?(y.addEventListener("DOMMouseScroll",C,!1),y.addEventListener("mousewheel",C,!1)):document.attachEvent("onmousewheel",C)}function C(t){if(s){var i=0;(t=t||window.event).wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3);var o=t.target||t.srcTarget||t.srcElement;e(o).closest("."+n.wrapperClass).is(g.parent())&&D(i,!0),t.preventDefault&&!p&&t.preventDefault(),p||(t.returnValue=!1)}}function D(t,e,i){p=!1;var s=t,o=g.outerHeight()-w.outerHeight();if(e&&(s=parseInt(w.css("top"))+t*parseInt(n.wheelStep)/100*w.outerHeight(),s=Math.min(Math.max(s,0),o),s=t>0?Math.ceil(s):Math.floor(s),w.css({top:s+"px"})),s=(u=parseInt(w.css("top"))/(g.outerHeight()-w.outerHeight()))*(g[0].scrollHeight-g.outerHeight()),i){var a=(s=t)/g[0].scrollHeight*g.outerHeight();a=Math.min(Math.max(a,0),o),w.css({top:a+"px"})}g.scrollTop(s),g.trigger("slimscrolling",~~s),S(),T()}function M(){h=Math.max(g.outerHeight()/g[0].scrollHeight*g.outerHeight(),f),w.css({height:h+"px"});var t=h==g.outerHeight()?"none":"block";w.css({display:t})}function S(){if(M(),clearTimeout(r),u==~~u){if(p=n.allowPageScroll,c!=u){var t=0==~~u?"top":"bottom";g.trigger("slimscroll",t)}}else p=!1;c=u,h>=g.outerHeight()?p=!0:(w.stop(!0,!0).fadeIn("fast"),n.railVisible&&x.stop(!0,!0).fadeIn("fast"))}function T(){n.alwaysVisible||(r=setTimeout(function(){n.disableFadeOut&&s||o||a||(w.fadeOut("slow"),x.fadeOut("slow"))},1e3))}}),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery),function(t,e){"use strict";t.ajaxPrefilter(function(t,e,i){if(t.iframe)return t.originalURL=t.url,"iframe"}),t.ajaxTransport("iframe",function(e,i,n){var s=null,o=null,a="iframe-"+t.now(),r=t(e.files).filter(":file:enabled"),l=null;function h(){r.each(function(e,i){var n=t(i);n.data("clone").replaceWith(n)}),s.remove(),o.one("load",function(){o.remove()}),o.attr("src","javascript:false;")}if(e.dataTypes.shift(),e.data=i.data,r.length)return s=t("<form enctype='multipart/form-data' method='post'></form>").hide().attr({action:e.originalURL,target:a}),"string"==typeof e.data&&e.data.length>0&&t.error("data must not be serialized"),t.each(e.data||{},function(e,i){t.isPlainObject(i)&&(e=i.name,i=i.value),t("<input type='hidden' />").attr({name:e,value:i}).appendTo(s)}),t("<input type='hidden' value='IFrame' name='X-Requested-With' />").appendTo(s),l=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", */*; q=0.01":""):e.accepts["*"],t("<input type='hidden' name='X-HTTP-Accept'>").attr("value",l).appendTo(s),r.after(function(e){var i=t(this),n=i.clone().prop("disabled",!0);return i.data("clone",n),n}).next(),r.appendTo(s),{send:function(e,i){(o=t("<iframe src='javascript:false;' name='"+a+"' id='"+a+"' style='display:none'></iframe>")).one("load",function(){o.one("load",function(){var t=this.contentWindow?this.contentWindow.document:this.contentDocument?this.contentDocument:this.document,e=t.documentElement?t.documentElement:t.body,n=e.getElementsByTagName("textarea")[0],s=n&&n.getAttribute("data-type")||null,o=n&&n.getAttribute("data-status")||200,a=n&&n.getAttribute("data-statusText")||"OK",r={html:e.innerHTML,text:s?n.value:e?e.textContent||e.innerText:null};h(),i(o,a,r,s?"Content-Type: "+s:null)}),s[0].submit()}),t("body").append(s,o)},abort:function(){null!==o&&(o.unbind("load").attr("src","javascript:false;"),h())}}})}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],t):"object"==typeof exports?t(require("jquery"),require("./vendor/jquery.ui.widget")):t(window.jQuery)}(function(t){"use strict";function e(e){var i="dragover"===e;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var s=n.dataTransfer;s&&-1!==t.inArray("Files",s.types)&&!1!==this._trigger(e,t.Event(e,{delegatedEvent:n}))&&(n.preventDefault(),i&&(s.dropEffect="copy"))}}t.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||t('<input type="file"/>').prop("disabled")),t.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,uniqueFilenames:void 0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(e,i){return e=this.messages[e]||e.toString(),i&&t.each(i,function(t,i){e=e.replace("{"+t+"}",i)}),e},formData:function(t){return t.serializeArray()},add:function(e,i){if(e.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&t(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:t.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var n=t-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(e-this.loaded)*(1e3/n)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===t.type(e.formData)?e.formData(e.form):t.isArray(e.formData)?e.formData:"object"===t.type(e.formData)?(i=[],t.each(e.formData,function(t,e){i.push({name:t,value:e})}),i):[]},_getTotal:function(e){var i=0;return t.each(e,function(t,e){i+=e.size||1}),i},_initProgressObject:function(e){var i={loaded:0,total:0,bitrate:0};e._progress?t.extend(e._progress,i):e._progress=i},_initResponseObject:function(t){var e;if(t._response)for(e in t._response)t._response.hasOwnProperty(e)&&delete t._response[e];else t._response={}},_onProgress:function(e,i){if(e.lengthComputable){var n,s=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&s-i._time<i.progressInterval&&e.loaded!==e.total)return;i._time=s,n=Math.floor(e.loaded/e.total*(i.chunkSize||i._progress.total))+(i.uploadedBytes||0),this._progress.loaded+=n-i._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(s,this._progress.loaded,i.bitrateInterval),i._progress.loaded=i.loaded=n,i._progress.bitrate=i.bitrate=i._bitrateTimer.getBitrate(s,n,i.bitrateInterval),this._trigger("progress",t.Event("progress",{delegatedEvent:e}),i),this._trigger("progressall",t.Event("progressall",{delegatedEvent:e}),this._progress)}},_initProgressListener:function(e){var i=this,n=e.xhr?e.xhr():t.ajaxSettings.xhr();n.upload&&(t(n.upload).bind("progress",function(t){var n=t.originalEvent;t.lengthComputable=n.lengthComputable,t.loaded=n.loaded,t.total=n.total,i._onProgress(t,e)}),e.xhr=function(){return n})},_deinitProgressListener:function(e){var i=e.xhr?e.xhr():t.ajaxSettings.xhr();i.upload&&t(i.upload).unbind("progress")},_isInstanceOf:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"},_getUniqueFilename:function(t,e){return e[t=String(t)]?(t=t.replace(/(?: \(([\d]+)\))?(\.[^.]+)?$/,function(t,e,i){return" ("+(e?Number(e)+1:1)+")"+(i||"")}),this._getUniqueFilename(t,e)):(e[t]=!0,t)},_initXHRData:function(e){var i,n=this,s=e.files[0],o=e.multipart||!t.support.xhrFileUpload,a="array"===t.type(e.paramName)?e.paramName[0]:e.paramName;e.headers=t.extend({},e.headers),e.contentRange&&(e.headers["Content-Range"]=e.contentRange),o&&!e.blob&&this._isInstanceOf("File",s)||(e.headers["Content-Disposition"]='attachment; filename="'+encodeURI(s.uploadName||s.name)+'"'),o?t.support.xhrFormDataFileUpload&&(e.postMessage?(i=this._getFormData(e),e.blob?i.push({name:a,value:e.blob}):t.each(e.files,function(n,s){i.push({name:"array"===t.type(e.paramName)&&e.paramName[n]||a,value:s})})):(n._isInstanceOf("FormData",e.formData)?i=e.formData:(i=new FormData,t.each(this._getFormData(e),function(t,e){i.append(e.name,e.value)})),e.blob?i.append(a,e.blob,s.uploadName||s.name):t.each(e.files,function(s,o){if(n._isInstanceOf("File",o)||n._isInstanceOf("Blob",o)){var r=o.uploadName||o.name;e.uniqueFilenames&&(r=n._getUniqueFilename(r,e.uniqueFilenames)),i.append("array"===t.type(e.paramName)&&e.paramName[s]||a,o,r)}})),e.data=i):(e.contentType=s.type||"application/octet-stream",e.data=e.blob||s),e.blob=null},_initIframeSettings:function(e){var i=t("<a></a>").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&i&&i!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},_getParamName:function(e){var i=t(e.fileInput),n=e.paramName;return n?t.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var e=t(this),i=e.prop("name")||"files[]",s=(e.prop("files")||[1]).length;s;)n.push(i),s-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===t.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var i=t.extend({},this.options,e);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,i,n){var s=t.Deferred(),o=s.promise();return i=i||this.options.context||o,!0===e?s.resolveWith(i,n):!1===e&&s.rejectWith(i,n),o.abort=s.promise,this._enhancePromise(o)},_addConvenienceMethods:function(e,i){var n=this,s=function(e){return t.Deferred().resolveWith(n,e).promise()};i.process=function(e,o){return(e||o)&&(i._processQueue=this._processQueue=(this._processQueue||s([this])).then(function(){return i.errorThrown?t.Deferred().rejectWith(n,[i]).promise():s(arguments)}).then(e,o)),this._processQueue||s([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",t.Event("submit",{delegatedEvent:e}),this)&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(e,i){e.uploadedBytes=e.uploadedBytes||0;var n,s,o=this,a=e.files[0],r=a.size,l=e.uploadedBytes,h=e.maxChunkSize||r,u=this._blobSlice,c=t.Deferred(),d=c.promise();return!(!(this._isXHRUpload(e)&&u&&(l||("function"===t.type(h)?h(e):h)<r))||e.data)&&(!!i||(l>=r?(a.error=e.i18n("uploadedBytes"),this._getXHRPromise(!1,e.context,[null,"error",a.error])):(s=function(){var i=t.extend({},e),d=i._progress.loaded;i.blob=u.call(a,l,l+("function"===t.type(h)?h(i):h),a.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+r,o._trigger("chunkbeforesend",null,i),o._initXHRData(i),o._initProgressListener(i),n=(!1!==o._trigger("chunksend",null,i)&&t.ajax(i)||o._getXHRPromise(!1,i.context)).done(function(n,a,h){l=o._getUploadedBytes(h)||l+i.chunkSize,d+i.chunkSize-i._progress.loaded&&o._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),e.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=a,i.jqXHR=h,o._trigger("chunkdone",null,i),o._trigger("chunkalways",null,i),l<r?s():c.resolveWith(i.context,[n,a,h])}).fail(function(t,e,n){i.jqXHR=t,i.textStatus=e,i.errorThrown=n,o._trigger("chunkfail",null,i),o._trigger("chunkalways",null,i),c.rejectWith(i.context,[t,e,n])}).always(function(){o._deinitProgressListener(i)})},this._enhancePromise(d),d.abort=function(){return n.abort()},s(),d)))},_beforeSend:function(t,e){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(e),this._initProgressObject(e),e._progress.loaded=e.loaded=e.uploadedBytes||0,e._progress.total=e.total=this._getTotal(e.files)||1,e._progress.bitrate=e.bitrate=0,this._active+=1,this._progress.loaded+=e.loaded,this._progress.total+=e.total},_onDone:function(e,i,n,s){var o=s._progress.total,a=s._response;s._progress.loaded<o&&this._onProgress(t.Event("progress",{lengthComputable:!0,loaded:o,total:o}),s),a.result=s.result=e,a.textStatus=s.textStatus=i,a.jqXHR=s.jqXHR=n,this._trigger("done",null,s)},_onFail:function(t,e,i,n){var s=n._response;n.recalculateProgress&&(this._progress.loaded-=n._progress.loaded,this._progress.total-=n._progress.total),s.jqXHR=n.jqXHR=t,s.textStatus=n.textStatus=e,s.errorThrown=n.errorThrown=i,this._trigger("fail",null,n)},_onAlways:function(t,e,i,n){this._trigger("always",null,n)},_onSend:function(e,i){i.submit||this._addConvenienceMethods(e,i);var n,s,o,a,r=this,l=r._getAJAXSettings(i),h=function(){return r._sending+=1,l._bitrateTimer=new r._BitrateTimer,n=n||((s||!1===r._trigger("send",t.Event("send",{delegatedEvent:e}),l))&&r._getXHRPromise(!1,l.context,s)||r._chunkedUpload(l)||t.ajax(l)).done(function(t,e,i){r._onDone(t,e,i,l)}).fail(function(t,e,i){r._onFail(t,e,i,l)}).always(function(t,e,i){if(r._deinitProgressListener(l),r._onAlways(t,e,i,l),r._sending-=1,r._active-=1,l.limitConcurrentUploads&&l.limitConcurrentUploads>r._sending)for(var n=r._slots.shift();n;){if("pending"===r._getDeferredState(n)){n.resolve();break}n=r._slots.shift()}0===r._active&&r._trigger("stop")})};return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=t.Deferred(),this._slots.push(o),a=o.then(h)):(this._sequence=this._sequence.then(h,h),a=this._sequence),a.abort=function(){return s=[void 0,"abort","abort"],n?n.abort():(o&&o.rejectWith(l.context,s),h())},this._enhancePromise(a)):h()},_onAdd:function(e,i){var n,s,o,a,r=this,l=!0,h=t.extend({},this.options,i),u=i.files,c=u.length,d=h.limitMultiFileUploads,f=h.limitMultiFileUploadSize,p=h.limitMultiFileUploadSizeOverhead,g=0,m=this._getParamName(h),v=0;if(!c)return!1;if(f&&void 0===u[0].size&&(f=void 0),(h.singleFileUploads||d||f)&&this._isXHRUpload(h))if(h.singleFileUploads||f||!d)if(!h.singleFileUploads&&f)for(o=[],n=[],a=0;a<c;a+=1)g+=u[a].size+p,(a+1===c||g+u[a+1].size+p>f||d&&a+1-v>=d)&&(o.push(u.slice(v,a+1)),(s=m.slice(v,a+1)).length||(s=m),n.push(s),v=a+1,g=0);else n=m;else for(o=[],n=[],a=0;a<c;a+=d)o.push(u.slice(a,a+d)),(s=m.slice(a,a+d)).length||(s=m),n.push(s);else o=[u],n=[m];return i.originalFiles=u,t.each(o||u,function(s,a){var h=t.extend({},i);return h.files=o?a:[a],h.paramName=n[s],r._initResponseObject(h),r._initProgressObject(h),r._addConvenienceMethods(e,h),l=r._trigger("add",t.Event("add",{delegatedEvent:e}),h)}),l},_replaceFileInput:function(e){var i=e.fileInput,n=i.clone(!0),s=i.is(document.activeElement);e.fileInputClone=n,t("<form></form>").append(n)[0].reset(),i.after(n).detach(),s&&n.focus(),t.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?n[0]:e}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,i){var n,s=this,o=t.Deferred(),a=[],r=function(t){t&&!t.entry&&(t.entry=e),o.resolve([t])},l=function(){n.readEntries(function(t){t.length?(a=a.concat(t),l()):function(t){s._handleFileTreeEntries(t,i+e.name+"/").done(function(t){o.resolve(t)}).fail(r)}(a)},r)};return i=i||"",e.isFile?e._file?(e._file.relativePath=i,o.resolve(e._file)):e.file(function(t){t.relativePath=i,o.resolve(t)},r):e.isDirectory?(n=e.createReader(),l()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,i){var n=this;return t.when.apply(t,t.map(e,function(t){return n._handleFileTreeEntry(t,i)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){var i=(e=e||{}).items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(t.map(i,function(t){var e;return t.webkitGetAsEntry?((e=t.webkitGetAsEntry())&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){var i,n,s=(e=t(e)).prop("webkitEntries")||e.prop("entries");if(s&&s.length)return this._handleFileTreeEntries(s);if((i=t.makeArray(e.prop("files"))).length)void 0===i[0].name&&i[0].fileName&&t.each(i,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(!(n=e.prop("value")))return t.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return t.Deferred().resolve(i).promise()},_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var i=this,n={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(n.fileInput).always(function(s){n.files=s,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",t.Event("change",{delegatedEvent:e}),n)&&i._onAdd(e,n)})},_onPaste:function(e){var i=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(t.each(i,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",t.Event("paste",{delegatedEvent:e}),n)&&this._onAdd(e,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,n=e.dataTransfer,s={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){s.files=n,!1!==i._trigger("drop",t.Event("drop",{delegatedEvent:e}),s)&&i._onAdd(e,s)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),t.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,i){var n=-1!==t.inArray(e,this._specialOptions);n&&this._destroyEventHandlers(),this._super(e,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_getRegExp:function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},_isRegExpOption:function(e,i){return"url"!==e&&"string"===t.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var e=this,i=this.options,n=this.element.data();t.each(this.element[0].attributes,function(t,s){var o,a=s.name.toLowerCase();/^data-/.test(a)&&(a=a.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),o=n[a],e._isRegExpOption(a,o)&&(o=e._getRegExp(o)),i[a]=o)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,n,s=this,o=t.Deferred(),a=o.promise();return a.abort=function(){return n=!0,i?i.abort():(o.reject(null,"abort","abort"),a)},this._getFileInputFiles(e.fileInput).always(function(t){n||(t.length?(e.files=t,(i=s._onSend(null,e)).then(function(t,e,i){o.resolve(t,e,i)},function(t,e,i){o.reject(t,e,i)})):o.reject())}),this._enhancePromise(a)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.colorpicker&&e(jQuery)}(0,function(t){"use strict";var e=function(i,n,s,o,a){this.fallbackValue=s?"string"==typeof s?this.parse(s):s:null,this.fallbackFormat=o||"rgba",this.hexNumberSignPrefix=!0===a,this.value=this.fallbackValue,this.origFormat=null,this.predefinedColors=n||{},this.colors=t.extend({},e.webColors,this.predefinedColors),i&&(void 0!==i.h?this.value=i:this.setColor(String(i))),this.value||(this.value={h:0,s:0,b:0,a:1})};e.webColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},e.prototype={constructor:e,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(t){this.value=t},_sanitizeNumber:function(t){return"number"==typeof t?t:isNaN(t)||null===t||""===t||void 0===t?1:""===t?0:void 0!==t.toLowerCase?(t.match(/^\./)&&(t="0"+t),Math.ceil(100*parseFloat(t))/100):1},isTransparent:function(t){return!(!t||!("string"==typeof t||t instanceof String))&&("transparent"===(t=t.toLowerCase().trim())||t.match(/#?00000000/)||t.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(t){return 0===t.r&&0===t.g&&0===t.b&&0===t.a},setColor:function(t){if(t=t.toLowerCase().trim()){if(this.isTransparent(t))return this.value={h:0,s:0,b:0,a:0},!0;var e=this.parse(t);e?(this.value=this.value={h:e.h,s:e.s,b:e.b,a:e.a},this.origFormat||(this.origFormat=e.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(t){this.value.h=1-t},setSaturation:function(t){this.value.s=t},setBrightness:function(t){this.value.b=1-t},setAlpha:function(t){this.value.a=Math.round(parseInt(100*(1-t),10)/100*100)/100},toRGB:function(t,e,i,n){var s,o,a,r,l;return 0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a),t=(t*=360)%360/60,s=o=a=i-(l=i*e),s+=[l,r=l*(1-Math.abs(t%2-1)),0,0,r,l][t=~~t],o+=[r,l,l,r,0,0][t],a+=[0,0,r,l,l,r][t],{r:Math.round(255*s),g:Math.round(255*o),b:Math.round(255*a),a:n}},toHex:function(t,e,i,n,s){arguments.length<=1&&(e=this.value.h,i=this.value.s,n=this.value.b,s=this.value.a);var o="#",a=this.toRGB(e,i,n,s);return this.rgbaIsTransparent(a)?"transparent":(t||(o=this.hexNumberSignPrefix?"#":""),o+((1<<24)+(parseInt(a.r)<<16)+(parseInt(a.g)<<8)+parseInt(a.b)).toString(16).slice(1))},toHSL:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a);var s=t,o=(2-e)*i,a=e*i;return a/=o>0&&o<=1?o:2-o,o/=2,a>1&&(a=1),{h:isNaN(s)?0:s,s:isNaN(a)?0:a,l:isNaN(o)?0:o,a:isNaN(n)?0:n}},toAlias:function(t,e,i,n){var s,o=0===arguments.length?this.toHex(!0):this.toHex(!0,t,e,i,n),a="alias"===this.origFormat?o:this.toString(!1,this.origFormat);for(var r in this.colors)if((s=this.colors[r].toLowerCase().trim())===o||s===a)return r;return!1},RGBtoHSB:function(t,e,i,n){var s,o,a,r;return t/=255,e/=255,i/=255,s=((s=0===(r=(a=Math.max(t,e,i))-Math.min(t,e,i))?null:a===t?(e-i)/r:a===e?(i-t)/r+2:(t-e)/r+4)+360)%6*60/360,o=0===r?0:r/a,{h:this._sanitizeNumber(s),s:o,b:a,a:this._sanitizeNumber(n)}},HueToRGB:function(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t},HSLtoRGB:function(t,e,i,n){var s;e<0&&(e=0);var o=2*i-(s=i<=.5?i*(1+e):i+e-i*e),a=t+1/3,r=t,l=t-1/3;return[Math.round(255*this.HueToRGB(o,s,a)),Math.round(255*this.HueToRGB(o,s,r)),Math.round(255*this.HueToRGB(o,s,l)),this._sanitizeNumber(n)]},parse:function(e){if("string"!=typeof e)return this.fallbackValue;if(0===arguments.length)return!1;var i,n,s=this,o=!1,a=void 0!==this.colors[e];return a&&(e=this.colors[e].toLowerCase().trim()),t.each(this.stringParsers,function(t,r){var l=r.re.exec(e);return!(i=l&&r.parse.apply(s,[l]))||(o={},n=a?"alias":r.format?r.format:s.getValidFallbackFormat(),(o=n.match(/hsla?/)?s.RGBtoHSB.apply(s,s.HSLtoRGB.apply(s,i)):s.RGBtoHSB.apply(s,i))instanceof Object&&(o.format=n),!1)}),o},getValidFallbackFormat:function(){var t=["rgba","rgb","hex","hsla","hsl"];return this.origFormat&&-1!==t.indexOf(this.origFormat)?this.origFormat:this.fallbackFormat&&-1!==t.indexOf(this.fallbackFormat)?this.fallbackFormat:"rgba"},toString:function(t,i,n){n=n||!1;var s=!1;switch(i=i||this.origFormat||this.fallbackFormat){case"rgb":return s=this.toRGB(),this.rgbaIsTransparent(s)?"transparent":"rgb("+s.r+","+s.g+","+s.b+")";case"rgba":return"rgba("+(s=this.toRGB()).r+","+s.g+","+s.b+","+s.a+")";case"hsl":return s=this.toHSL(),"hsl("+Math.round(360*s.h)+","+Math.round(100*s.s)+"%,"+Math.round(100*s.l)+"%)";case"hsla":return s=this.toHSL(),"hsla("+Math.round(360*s.h)+","+Math.round(100*s.s)+"%,"+Math.round(100*s.l)+"%,"+s.a+")";case"hex":return this.toHex(t);case"alias":return!1===(s=this.toAlias())?this.toString(t,this.getValidFallbackFormat()):n&&!(s in e.webColors)&&s in this.predefinedColors?this.predefinedColors[s]:s;default:return s}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(t){return[t[1],t[2],t[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",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*)?\)/,format:"rgba",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),1]}}],colorNameToHex:function(t){return void 0!==this.colors[t.toLowerCase()]&&this.colors[t.toLowerCase()]}};var i={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",fallbackColor:!1,fallbackFormat:"hex",hexNumberSignPrefix:!0,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div><div class="colorpicker-selectors"></div></div>',align:"right",customClass:null,colorSelectors:null},n=function(e,n){this.element=t(e).addClass("colorpicker-element"),this.options=t.extend(!0,{},i,this.element.data(),n),this.component=this.options.component,this.component=!1!==this.component&&this.element.find(this.component),this.component&&0===this.component.length&&(this.component=!1),this.container=!0===this.options.container?this.element:this.options.container,this.container=!1!==this.container&&t(this.container),this.input=this.element.is("input")?this.element:!!this.options.input&&this.element.find(this.options.input),this.input&&0===this.input.length&&(this.input=!1),this.color=this.createColor(!1!==this.options.color?this.options.color:this.getValue()),this.format=!1!==this.options.format?this.options.format:this.color.origFormat,!1!==this.options.color&&(this.updateInput(this.color),this.updateData(this.color)),this.disabled=!1;var s=this.picker=t(this.options.template);if(this.options.customClass&&s.addClass(this.options.customClass),this.options.inline?s.addClass("colorpicker-inline colorpicker-visible"):s.addClass("colorpicker-hidden"),this.options.horizontal&&s.addClass("colorpicker-horizontal"),-1===["rgba","hsla","alias"].indexOf(this.format)&&!1!==this.options.format&&"transparent"!==this.getValue()||s.addClass("colorpicker-with-alpha"),"right"===this.options.align&&s.addClass("colorpicker-right"),!0===this.options.inline&&s.addClass("colorpicker-no-arrow"),this.options.colorSelectors){var o=this,a=o.picker.find(".colorpicker-selectors");a.length>0&&(t.each(this.options.colorSelectors,function(e,i){var n=t("<i />").addClass("colorpicker-selectors-color").css("background-color",i).data("class",e).data("alias",e);n.on("mousedown.colorpicker touchstart.colorpicker",function(e){e.preventDefault(),o.setValue("alias"===o.format?t(this).data("alias"):t(this).css("background-color"))}),a.append(n)}),a.show().addClass("colorpicker-visible"))}s.on("mousedown.colorpicker touchstart.colorpicker",t.proxy(function(t){t.target===t.currentTarget&&t.preventDefault()},this)),s.find(".colorpicker-saturation, .colorpicker-hue, .colorpicker-alpha").on("mousedown.colorpicker touchstart.colorpicker",t.proxy(this.mousedown,this)),s.appendTo(this.container?this.container:t("body")),!1!==this.input&&(this.input.on({"keyup.colorpicker":t.proxy(this.keyup,this)}),this.input.on({"input.colorpicker":t.proxy(this.change,this)}),!1===this.component&&this.element.on({"focus.colorpicker":t.proxy(this.show,this)}),!1===this.options.inline&&this.element.on({"focusout.colorpicker":t.proxy(this.hide,this)})),!1!==this.component&&this.component.on({"click.colorpicker":t.proxy(this.show,this)}),!1===this.input&&!1===this.component&&this.element.on({"click.colorpicker":t.proxy(this.show,this)}),!1!==this.input&&!1!==this.component&&"color"===this.input.attr("type")&&this.input.on({"click.colorpicker":t.proxy(this.show,this),"focus.colorpicker":t.proxy(this.show,this)}),this.update(),t(t.proxy(function(){this.element.trigger("create")},this))};n.Color=e,n.prototype={constructor:n,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker","color").off(".colorpicker"),!1!==this.input&&this.input.off(".colorpicker"),!1!==this.component&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(!1!==this.options.inline||this.options.container)return!1;var t=this.container&&this.container[0]!==window.document.body?"position":"offset",e=this.component||this.element,i=e[t]();"right"===this.options.align&&(i.left-=this.picker.outerWidth()-e.outerWidth()),this.picker.css({top:i.top+e.outerHeight(),left:i.left})},show:function(e){this.isDisabled()||(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),t(window).on("resize.colorpicker",t.proxy(this.reposition,this)),!e||this.hasInput()&&"color"!==this.input.attr("type")||e.stopPropagation&&e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!this.component&&this.input||!1!==this.options.inline||t(window.document).on({"mousedown.colorpicker":t.proxy(this.hide,this)}),this.element.trigger({type:"showPicker",color:this.color}))},hide:function(e){if(void 0!==e&&e.target&&(t(e.currentTarget).parents(".colorpicker").length>0||t(e.target).parents(".colorpicker").length>0))return!1;this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),t(window).off("resize.colorpicker",this.reposition),t(window.document).off({"mousedown.colorpicker":this.hide}),this.update(),this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(t){return t=t||this.color.toString(!1,this.format),this.element.data("color",t),t},updateInput:function(t){return t=t||this.color.toString(!1,this.format),!1!==this.input&&(this.input.prop("value",t),this.input.trigger("change")),t},updatePicker:function(t){void 0!==t&&(this.color=this.createColor(t));var e=!1===this.options.horizontal?this.options.sliders:this.options.slidersHorz,i=this.picker.find("i");if(0!==i.length)return!1===this.options.horizontal?(e=this.options.sliders,i.eq(1).css("top",e.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",e.alpha.maxTop*(1-this.color.value.a))):(e=this.options.slidersHorz,i.eq(1).css("left",e.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",e.alpha.maxLeft*(1-this.color.value.a))),i.eq(0).css({top:e.saturation.maxTop-this.color.value.b*e.saturation.maxTop,left:this.color.value.s*e.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(!0,this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex(!0)),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(!0,this.format)),t},updateComponent:function(t){var e;if(e=void 0!==t?this.createColor(t):this.color,!1!==this.component){var i=this.component.find("i").eq(0);i.length>0?i.css({backgroundColor:e.toString(!0,this.format)}):this.component.css({backgroundColor:e.toString(!0,this.format)})}return e.toString(!1,this.format)},update:function(t){var e;return!1===this.getValue(!1)&&!0!==t||(e=this.updateComponent(),this.updateInput(e),this.updateData(e),this.updatePicker()),e},setValue:function(t){this.color=this.createColor(t),this.update(!0),this.element.trigger({type:"changeColor",color:this.color,value:t})},createColor:function(t){return new e(t||null,this.options.colorSelectors,this.options.fallbackColor?this.options.fallbackColor:this.color,this.options.fallbackFormat,this.options.hexNumberSignPrefix)},getValue:function(t){var e;return t=void 0===t?this.options.fallbackColor:t,void 0!==(e=this.hasInput()?this.input.val():this.element.data("color"))&&""!==e&&null!==e||(e=t),e},hasInput:function(){return!1!==this.input},isDisabled:function(){return this.disabled},disable:function(){return this.hasInput()&&this.input.prop("disabled",!0),this.disabled=!0,this.element.trigger({type:"disable",color:this.color,value:this.getValue()}),!0},enable:function(){return this.hasInput()&&this.input.prop("disabled",!1),this.disabled=!1,this.element.trigger({type:"enable",color:this.color,value:this.getValue()}),!0},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(e){!e.pageX&&!e.pageY&&e.originalEvent&&e.originalEvent.touches&&(e.pageX=e.originalEvent.touches[0].pageX,e.pageY=e.originalEvent.touches[0].pageY),e.stopPropagation(),e.preventDefault();var i=t(e.target).closest("div"),n=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!i.is(".colorpicker")){if(i.is(".colorpicker-saturation"))this.currentSlider=t.extend({},n.saturation);else if(i.is(".colorpicker-hue"))this.currentSlider=t.extend({},n.hue);else{if(!i.is(".colorpicker-alpha"))return!1;this.currentSlider=t.extend({},n.alpha)}var s=i.offset();this.currentSlider.guide=i.find("i")[0].style,this.currentSlider.left=e.pageX-s.left,this.currentSlider.top=e.pageY-s.top,this.mousePointer={left:e.pageX,top:e.pageY},t(window.document).on({"mousemove.colorpicker":t.proxy(this.mousemove,this),"touchmove.colorpicker":t.proxy(this.mousemove,this),"mouseup.colorpicker":t.proxy(this.mouseup,this),"touchend.colorpicker":t.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(t){!t.pageX&&!t.pageY&&t.originalEvent&&t.originalEvent.touches&&(t.pageX=t.originalEvent.touches[0].pageX,t.pageY=t.originalEvent.touches[0].pageY),t.stopPropagation(),t.preventDefault();var e=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((t.pageX||this.mousePointer.left)-this.mousePointer.left))),i=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((t.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=e+"px",this.currentSlider.guide.top=i+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,e/this.currentSlider.maxLeft),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,i/this.currentSlider.maxTop),!1!==this.options.format||"setAlpha"!==this.currentSlider.callTop&&"setAlpha"!==this.currentSlider.callLeft||(1!==this.color.value.a?(this.format="rgba",this.color.origFormat="rgba"):(this.format="hex",this.color.origFormat="hex")),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(e){return e.stopPropagation(),e.preventDefault(),t(window.document).off({"mousemove.colorpicker":this.mousemove,"touchmove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup,"touchend.colorpicker":this.mouseup}),!1},change:function(t){this.color=this.createColor(this.input.val()),this.color.origFormat&&!1===this.options.format&&(this.format=this.color.origFormat),!1!==this.getValue(!1)&&(this.updateData(),this.updateComponent(),this.updatePicker()),this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})},keyup:function(t){38===t.keyCode?(this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0)):40===t.keyCode&&(this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0)),this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})}},t.colorpicker=n,t.fn.colorpicker=function(e){var i=Array.prototype.slice.call(arguments,1),s=1===this.length,o=null,a=this.each(function(){var s=t(this),a=s.data("colorpicker");a||(a=new n(this,"object"==typeof e?e:{}),s.data("colorpicker",a)),"string"==typeof e?t.isFunction(a[e])?o=a[e].apply(a,i):(i.length&&(a[e]=i[0]),o=a[e]):o=s});return s?o:a},t.fn.colorpicker.constructor=n}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t,e){function i(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var t=new Date;return i(t.getFullYear(),t.getMonth(),t.getDate())}function s(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function o(i,n){return function(){return n!==e&&t.fn.datepicker.deprecated(n),this[i].apply(this,arguments)}}var a,r=(a={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),i=0,n=this.length;i<n;i++)if(0<=this[i].valueOf()-e&&this[i].valueOf()-e<864e5)return i;return-1},remove:function(t){this.splice(t,1)},replace:function(e){e&&(t.isArray(e)||(e=[e]),this.clear(),this.push.apply(this,e))},clear:function(){this.length=0},copy:function(){var t=new r;return t.replace(this),t}},function(){var e=[];return e.push.apply(e,arguments),t.extend(e,a),e}),l=function(e,i){t.data(e,"datepicker",this),this._events=[],this._secondaryEvents=[],this._process_options(i),this.dates=new r,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=t(e),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=t(g.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(t,e){return Number(e)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};l.prototype={constructor:l,_resolveViewName:function(e){return t.each(g.viewModes,function(i,n){if(e===i||-1!==t.inArray(e,n.names))return e=i,!1}),e},_resolveDaysOfWeek:function(e){return t.isArray(e)||(e=e.split(/[,\s]*/)),t.map(e,Number)},_check_template:function(i){try{return i!==e&&""!==i&&((i.match(/[<>]/g)||[]).length<=0||t(i).length>0)}catch(t){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var s=this.o=t.extend({},this._o),o=s.language;p[o]||(o=o.split("-")[0],p[o]||(o=d.language)),s.language=o,s.startView=this._resolveViewName(s.startView),s.minViewMode=this._resolveViewName(s.minViewMode),s.maxViewMode=this._resolveViewName(s.maxViewMode),s.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,s.startView)),!0!==s.multidate&&(s.multidate=Number(s.multidate)||!1,!1!==s.multidate&&(s.multidate=Math.max(0,s.multidate))),s.multidateSeparator=String(s.multidateSeparator),s.weekStart%=7,s.weekEnd=(s.weekStart+6)%7;var a=g.parseFormat(s.format);s.startDate!==-1/0&&(s.startDate?s.startDate instanceof Date?s.startDate=this._local_to_utc(this._zero_time(s.startDate)):s.startDate=g.parseDate(s.startDate,a,s.language,s.assumeNearbyYear):s.startDate=-1/0),s.endDate!==1/0&&(s.endDate?s.endDate instanceof Date?s.endDate=this._local_to_utc(this._zero_time(s.endDate)):s.endDate=g.parseDate(s.endDate,a,s.language,s.assumeNearbyYear):s.endDate=1/0),s.daysOfWeekDisabled=this._resolveDaysOfWeek(s.daysOfWeekDisabled||[]),s.daysOfWeekHighlighted=this._resolveDaysOfWeek(s.daysOfWeekHighlighted||[]),s.datesDisabled=s.datesDisabled||[],t.isArray(s.datesDisabled)||(s.datesDisabled=s.datesDisabled.split(",")),s.datesDisabled=t.map(s.datesDisabled,function(t){return g.parseDate(t,a,s.language,s.assumeNearbyYear)});var r=String(s.orientation).toLowerCase().split(/\s+/g),l=s.orientation.toLowerCase();if(r=t.grep(r,function(t){return/^auto|left|right|top|bottom$/.test(t)}),s.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===r.length)switch(r[0]){case"top":case"bottom":s.orientation.y=r[0];break;case"left":case"right":s.orientation.x=r[0]}else l=t.grep(r,function(t){return/^left|right$/.test(t)}),s.orientation.x=l[0]||"auto",l=t.grep(r,function(t){return/^top|bottom$/.test(t)}),s.orientation.y=l[0]||"auto";else;if(s.defaultViewDate instanceof Date||"string"==typeof s.defaultViewDate)s.defaultViewDate=g.parseDate(s.defaultViewDate,a,s.language,s.assumeNearbyYear);else if(s.defaultViewDate){var h=s.defaultViewDate.year||(new Date).getFullYear(),u=s.defaultViewDate.month||0,c=s.defaultViewDate.day||1;s.defaultViewDate=i(h,u,c)}else s.defaultViewDate=n()},_applyEvents:function(t){for(var i,n,s,o=0;o<t.length;o++)i=t[o][0],2===t[o].length?(n=e,s=t[o][1]):3===t[o].length&&(n=t[o][1],s=t[o][2]),i.on(s,n)},_unapplyEvents:function(t){for(var i,n,s,o=0;o<t.length;o++)i=t[o][0],2===t[o].length?(s=e,n=t[o][1]):3===t[o].length&&(s=t[o][1],n=t[o][2]),i.off(n,s)},_buildEvents:function(){var e={keyup:t.proxy(function(e){-1===t.inArray(e.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:t.proxy(this.keydown,this),paste:t.proxy(this.paste,this)};!0===this.o.showOnFocus&&(e.focus=t.proxy(this.show,this)),this.isInput?this._events=[[this.element,e]]:this.component&&this.inputField.length?this._events=[[this.inputField,e],[this.component,{click:t.proxy(this.show,this)}]]:this._events=[[this.element,{click:t.proxy(this.show,this),keydown:t.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:t.proxy(function(t){this._focused_from=t.target},this)}],[this.element,{blur:t.proxy(function(t){this._focused_from=t.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":t.proxy(function(t){this.update(t.date)},this)}]),this._secondaryEvents=[[this.picker,{click:t.proxy(this.click,this)}],[this.picker,".prev, .next",{click:t.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:t.proxy(this.dayCellClick,this)}],[t(window),{resize:t.proxy(this.place,this)}],[t(document),{"mousedown touchstart":t.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).length||this.picker.is(t.target)||this.picker.find(t.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(e,i){var n=i||this.dates.get(-1),s=this._utc_to_local(n);this.element.trigger({type:e,date:s,viewMode:this.viewMode,dates:t.map(this.dates,this._utc_to_local),format:t.proxy(function(t,e){0===arguments.length?(t=this.dates.length-1,e=this.o.format):"string"==typeof t&&(e=t,t=this.dates.length-1),e=e||this.o.format;var i=this.dates.get(t);return g.formatDate(i,e,this.o.language)},this)})},show:function(){if(!(this.inputField.is(":disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&t(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(e){var i;if(e.originalEvent.clipboardData&&e.originalEvent.clipboardData.types&&-1!==t.inArray("text/plain",e.originalEvent.clipboardData.types))i=e.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;i=window.clipboardData.getData("Text")}this.setDate(i),this.update(),e.preventDefault()},_utc_to_local:function(t){if(!t)return t;var e=new Date(t.getTime()+6e4*t.getTimezoneOffset());return e.getTimezoneOffset()!==t.getTimezoneOffset()&&(e=new Date(t.getTime()+6e4*e.getTimezoneOffset())),e},_local_to_utc:function(t){return t&&new Date(t.getTime()-6e4*t.getTimezoneOffset())},_zero_time:function(t){return t&&new Date(t.getFullYear(),t.getMonth(),t.getDate())},_zero_utc_time:function(t){return t&&i(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},getDates:function(){return t.map(this.dates,this._utc_to_local)},getUTCDates:function(){return t.map(this.dates,function(t){return new Date(t)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var t=this.dates.get(-1);return t!==e?new Date(t):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,e),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,t.map(e,this._utc_to_local)),this},setDate:o("setDates"),setUTCDate:o("setUTCDates"),remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var t=this.getFormattedDate();return this.inputField.val(t),this},getFormattedDate:function(i){i===e&&(i=this.o.format);var n=this.o.language;return t.map(this.dates,function(t){return g.formatDate(t,i,n)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(t){return this._process_options({startDate:t}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(t){return this._process_options({endDate:t}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(t){return this._process_options({daysOfWeekDisabled:t}),this.update(),this},setDaysOfWeekHighlighted:function(t){return this._process_options({daysOfWeekHighlighted:t}),this.update(),this},setDatesDisabled:function(t){return this._process_options({datesDisabled:t}),this.update(),this},place:function(){if(this.isInline)return this;var e=this.picker.outerWidth(),i=this.picker.outerHeight(),n=t(this.o.container),s=n.width(),o="body"===this.o.container?t(document).scrollTop():n.scrollTop(),a=n.offset(),r=[0];this.element.parents().each(function(){var e=t(this).css("z-index");"auto"!==e&&0!==Number(e)&&r.push(Number(e))});var l=Math.max.apply(Math,r)+this.o.zIndexOffset,h=this.component?this.component.parent().offset():this.element.offset(),u=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),d=h.left-a.left,f=h.top-a.top;"body"!==this.o.container&&(f+=o),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(d-=e-c)):h.left<0?(this.picker.addClass("datepicker-orient-left"),d-=h.left-10):d+e>s?(this.picker.addClass("datepicker-orient-right"),d+=c-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p=this.o.orientation.y;if("auto"===p&&(p=-o+f-i<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+p),"top"===p?f-=i+parseInt(this.picker.css("padding-top")):f+=u,this.o.rtl){var g=s-(d+c);this.picker.css({top:f,right:g,zIndex:l})}else this.picker.css({top:f,left:d,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),i=[],n=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)},this)),n=!0):(i=(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy(function(t){return g.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),i=t.grep(i,t.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+='<th class="cw">&#160;</th>');e<this.o.weekStart+7;)i+='<th class="dow',-1!==t.inArray(e,this.o.daysOfWeekDisabled)&&(i+=" disabled"),i+='">'+p[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),e="",i=0;i<12;i++)e+='<span class="month'+(t&&t.getMonth()===i?" focused":"")+'">'+p[this.o.language].monthsShort[i]+"</span>";this.picker.find(".datepicker-months td").html(e)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var i=[],o=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),r=n();return e.getUTCFullYear()<o||e.getUTCFullYear()===o&&e.getUTCMonth()<a?i.push("old"):(e.getUTCFullYear()>o||e.getUTCFullYear()===o&&e.getUTCMonth()>a)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&s(e,r)&&i.push("today"),-1!==this.dates.contains(e)&&i.push("active"),this.dateWithinRange(e)||i.push("disabled"),this.dateIsDisabled(e)&&i.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(e>this.range[0]&&e<this.range[this.range.length-1]&&i.push("range"),-1!==t.inArray(e.valueOf(),this.range)&&i.push("selected"),e.valueOf()===this.range[0]&&i.push("range-start"),e.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,n,s,o,a,r,l){for(var h,u,c,d="",f=s/10,p=this.picker.find(i),g=Math.floor(o/s)*s,m=g+9*f,v=Math.floor(this.viewDate.getFullYear()/f)*f,b=t.map(this.dates,function(t){return Math.floor(t.getUTCFullYear()/f)*f}),_=g-f;_<=m+f;_+=f)h=[n],u=null,_===g-f?h.push("old"):_===m+f&&h.push("new"),-1!==t.inArray(_,b)&&h.push("active"),(_<a||_>r)&&h.push("disabled"),_===v&&h.push("focused"),l!==t.noop&&((c=l(new Date(_,0,1)))===e?c={}:"boolean"==typeof c?c={enabled:c}:"string"==typeof c&&(c={classes:c}),!1===c.enabled&&h.push("disabled"),c.classes&&(h=h.concat(c.classes.split(/\s+/))),c.tooltip&&(u=c.tooltip)),d+='<span class="'+h.join(" ")+'"'+(u?' title="'+u+'"':"")+">"+_+"</span>";p.find(".datepicker-switch").text(g+"-"+m),p.find("td").html(d)},fill:function(){var s,o,a=new Date(this.viewDate),r=a.getUTCFullYear(),l=a.getUTCMonth(),h=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,u=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,c=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,d=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,f=p[this.o.language].today||p.en.today||"",m=p[this.o.language].clear||p.en.clear||"",v=p[this.o.language].titleFormat||p.en.titleFormat,b=n(),_=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&b>=this.o.startDate&&b<=this.o.endDate&&!this.weekOfDateIsDisabled(b);if(!isNaN(r)&&!isNaN(l)){this.picker.find(".datepicker-days .datepicker-switch").text(g.formatDate(a,v,this.o.language)),this.picker.find("tfoot .today").text(f).css("display",_?"table-cell":"none"),this.picker.find("tfoot .clear").text(m).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var y=i(r,l,0),x=y.getUTCDate();y.setUTCDate(x-(y.getUTCDay()-this.o.weekStart+7)%7);var w=new Date(y);y.getUTCFullYear()<100&&w.setUTCFullYear(y.getUTCFullYear()),w.setUTCDate(w.getUTCDate()+42),w=w.valueOf();for(var k,C,D=[];y.valueOf()<w;){if((k=y.getUTCDay())===this.o.weekStart&&(D.push("<tr>"),this.o.calendarWeeks)){var M=new Date(+y+(this.o.weekStart-k-7)%7*864e5),S=new Date(Number(M)+(11-M.getUTCDay())%7*864e5),T=new Date(Number(T=i(S.getUTCFullYear(),0,1))+(11-T.getUTCDay())%7*864e5),I=(S-T)/864e5/7+1;D.push('<td class="cw">'+I+"</td>")}(C=this.getClassNames(y)).push("day");var P=y.getUTCDate();this.o.beforeShowDay!==t.noop&&((o=this.o.beforeShowDay(this._utc_to_local(y)))===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&C.push("disabled"),o.classes&&(C=C.concat(o.classes.split(/\s+/))),o.tooltip&&(s=o.tooltip),o.content&&(P=o.content)),C=t.isFunction(t.uniqueSort)?t.uniqueSort(C):t.unique(C),D.push('<td class="'+C.join(" ")+'"'+(s?' title="'+s+'"':"")+' data-date="'+y.getTime().toString()+'">'+P+"</td>"),s=null,k===this.o.weekEnd&&D.push("</tr>"),y.setUTCDate(y.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(D.join(""));var A=p[this.o.language].monthsTitle||p.en.monthsTitle||"Months",F=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?A:r).end().find("tbody span").removeClass("active");if(t.each(this.dates,function(t,e){e.getUTCFullYear()===r&&F.eq(e.getUTCMonth()).addClass("active")}),(r<h||r>c)&&F.addClass("disabled"),r===h&&F.slice(0,u).addClass("disabled"),r===c&&F.slice(d+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var O=this;t.each(F,function(i,n){var s=new Date(r,i,1),o=O.o.beforeShowMonth(s);o===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1!==o.enabled||t(n).hasClass("disabled")||t(n).addClass("disabled"),o.classes&&t(n).addClass(o.classes),o.tooltip&&t(n).prop("title",o.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,r,h,c,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,r,h,c,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,r,h,c,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,i=new Date(this.viewDate),n=i.getUTCFullYear(),s=i.getUTCMonth(),o=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,a=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,r=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,h=1;switch(this.viewMode){case 4:h*=10;case 3:h*=10;case 2:h*=10;case 1:t=Math.floor(n/h)*h<=o,e=Math.floor(n/h)*h+h>r;break;case 0:t=n<=o&&s<=a,e=n>=r&&s>=l}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(e){var s,o,a;e.preventDefault(),e.stopPropagation(),(s=t(e.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),s.hasClass("today")&&!s.hasClass("day")&&(this.setViewMode(0),this._setDate(n(),"linked"===this.o.todayBtn?null:"view")),s.hasClass("clear")&&this.clearDates(),s.hasClass("disabled")||(s.hasClass("month")||s.hasClass("year")||s.hasClass("decade")||s.hasClass("century"))&&(this.viewDate.setUTCDate(1),1,1===this.viewMode?(a=s.parent().find("span").index(s),o=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(a)):(a=0,o=Number(s.text()),this.viewDate.setUTCFullYear(o)),this._trigger(g.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(i(o,a,1)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(e){var i=t(e.currentTarget).data("date"),n=new Date(i);this.o.updateViewDate&&(n.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),n.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(n)},navArrowsClick:function(e){var i=t(e.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(i*=12*g.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,i),this._trigger(g.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):!1===this.o.multidate?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),(!e&&this.o.updateViewDate||"view"===e)&&(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var i=new Date(t);return i.setUTCDate(t.getUTCDate()+e),i},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!(i=t)||isNaN(i.getTime()))return this.o.defaultViewDate;var i;if(!e)return t;var n,s,o=new Date(t.valueOf()),a=o.getUTCDate(),r=o.getUTCMonth(),l=Math.abs(e);if(e=e>0?1:-1,1===l)s=-1===e?function(){return o.getUTCMonth()===r}:function(){return o.getUTCMonth()!==n},n=r+e,o.setUTCMonth(n),n=(n+12)%12;else{for(var h=0;h<l;h++)o=this.moveMonth(o,e);n=o.getUTCMonth(),o.setUTCDate(a),s=function(){return n!==o.getUTCMonth()}}for(;s();)o.setUTCDate(--a),o.setUTCMonth(n);return o},moveYear:function(t,e){return this.moveMonth(t,12*e)},moveAvailableDate:function(t,e,i){do{if(t=this[i](t,e),!this.dateWithinRange(t))return!1;i="moveDay"}while(this.dateIsDisabled(t));return t},weekOfDateIsDisabled:function(e){return-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(e){return this.weekOfDateIsDisabled(e)||t.grep(this.o.datesDisabled,function(t){return s(e,t)}).length>0},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":visible")){var e,i,n=!1,s=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(i=this.moveAvailableDate(s,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(i=this.moveAvailableDate(s,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?i=this.moveAvailableDate(s,e,"moveDay"):this.weekOfDateIsDisabled(s)||(i=this.moveAvailableDate(s,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(s,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(s,e,"moveYear")),i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;s=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(s),n=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}n&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation())},setViewMode:function(t){this.viewMode=t,this.picker.children("div").hide().filter(".datepicker-"+g.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var h=function(e,i){t.data(e,"datepicker",this),this.element=t(e),this.inputs=t.map(i.inputs,function(t){return t.jquery?t[0]:t}),delete i.inputs,this.keepEmptyValues=i.keepEmptyValues,delete i.keepEmptyValues,c.call(t(this.inputs),i).on("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,function(e){return t.data(e,"datepicker")}),this.updateDates()};h.prototype={updateDates:function(){this.dates=t.map(this.pickers,function(t){return t.getUTCDate()}),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,function(t){return t.valueOf()});t.each(this.pickers,function(t,i){i.setRange(e)})},clearDates:function(){t.each(this.pickers,function(t,e){e.clearDates()})},dateUpdated:function(i){if(!this.updating){this.updating=!0;var n=t.data(i.target,"datepicker");if(n!==e){var s=n.getUTCDate(),o=this.keepEmptyValues,a=t.inArray(i.target,this.inputs),r=a-1,l=a+1,h=this.inputs.length;if(-1!==a){if(t.each(this.pickers,function(t,e){e.getUTCDate()||e!==n&&o||e.setUTCDate(s)}),s<this.dates[r])for(;r>=0&&s<this.dates[r];)this.pickers[r--].setUTCDate(s);else if(s>this.dates[l])for(;l<h&&s>this.dates[l];)this.pickers[l++].setUTCDate(s);this.updateDates(),delete this.updating}}}},destroy:function(){t.map(this.pickers,function(t){t.destroy()}),t(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var u=t.fn.datepicker,c=function(i){var n,s=Array.apply(null,arguments);if(s.shift(),this.each(function(){var e=t(this),o=e.data("datepicker"),a="object"==typeof i&&i;if(!o){var r=function(e,i){var n=t(e).data(),s={},o=new RegExp("^"+i.toLowerCase()+"([A-Z])");function a(t,e){return e.toLowerCase()}for(var r in i=new RegExp("^"+i.toLowerCase()),n)i.test(r)&&(s[r.replace(o,a)]=n[r]);return s}(this,"date"),u=function(e){var i={};if(p[e]||(e=e.split("-")[0],p[e])){var n=p[e];return t.each(f,function(t,e){e in n&&(i[e]=n[e])}),i}}(t.extend({},d,r,a).language),c=t.extend({},d,u,r,a);e.hasClass("input-daterange")||c.inputs?(t.extend(c,{inputs:c.inputs||e.find("input").toArray()}),o=new h(this,c)):o=new l(this,c),e.data("datepicker",o)}"string"==typeof i&&"function"==typeof o[i]&&(n=o[i].apply(o,s))}),n===e||n instanceof l||n instanceof h)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return n};t.fn.datepicker=c;var d=t.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,beforeShowYear:t.noop,beforeShowDecade:t.noop,beforeShowCentury:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"&#x00AB;",rightArrow:"&#x00BB;"},showWeekDays:!0},f=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=l;var p=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],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"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},g={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),i=t.match(this.validParts);if(!e||!e.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:e,parts:i}},parseDate:function(i,s,o,a){if(!i)return e;if(i instanceof Date)return i;if("string"==typeof s&&(s=g.parseFormat(s)),s.toValue)return s.toValue(i,s,o);var r,h,u,c,d,f={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},m={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(i in m&&(i=m[i]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(i)){for(r=i.match(/([\-+]\d+)([dmwy])/gi),i=new Date,c=0;c<r.length;c++)h=r[c].match(/([\-+]\d+)([dmwy])/i),u=Number(h[1]),d=f[h[2].toLowerCase()],i=l.prototype[d](i,u);return l.prototype._zero_utc_time(i)}r=i&&i.match(this.nonpunctuation)||[];var v,b,_={},y=["yyyy","yy","M","MM","m","mm","d","dd"],x={yyyy:function(t,e){return t.setUTCFullYear(a?(!0===(n=a)&&(n=10),(i=e)<100&&(i+=2e3)>(new Date).getFullYear()+n&&(i-=100),i):e);var i,n},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};x.yy=x.yyyy,x.M=x.MM=x.mm=x.m,x.dd=x.d,i=n();var w=s.parts.slice();function k(){var t=this.slice(0,r[c].length),e=r[c].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(r.length!==w.length&&(w=t(w).filter(function(e,i){return-1!==t.inArray(i,y)}).toArray()),r.length===w.length){var C,D,M;for(c=0,C=w.length;c<C;c++){if(v=parseInt(r[c],10),h=w[c],isNaN(v))switch(h){case"MM":b=t(p[o].months).filter(k),v=t.inArray(b[0],p[o].months)+1;break;case"M":b=t(p[o].monthsShort).filter(k),v=t.inArray(b[0],p[o].monthsShort)+1}_[h]=v}for(c=0;c<y.length;c++)(M=y[c])in _&&!isNaN(_[M])&&(D=new Date(i),x[M](D,_[M]),isNaN(D)||(i=D))}return i},formatDate:function(e,i,n){if(!e)return"";if("string"==typeof i&&(i=g.parseFormat(i)),i.toDisplay)return i.toDisplay(e,i,n);var s={d:e.getUTCDate(),D:p[n].daysShort[e.getUTCDay()],DD:p[n].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:p[n].monthsShort[e.getUTCMonth()],MM:p[n].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,e=[];for(var o=t.extend([],i.separators),a=0,r=i.parts.length;a<=r;a++)o.length&&e.push(o.shift()),e.push(s[i.parts[a]]);return e.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+d.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+d.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};g.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+g.headTemplate+"<tbody></tbody>"+g.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=g,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=u,this},t.fn.datepicker.version="1.9.0",t.fn.datepicker.deprecated=function(t){var e=window.console;e&&e.warn&&e.warn("DEPRECATED: "+t)},t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(e){var i=t(this);i.data("datepicker")||(e.preventDefault(),c.call(i,"show"))}),t(function(){c.call(t('[data-provide="datepicker-inline"]'))})}),function(t){"use strict";var e=function(){function t(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)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();!function(t){var i="ekkoLightbox",n=t.fn[i],s={title:"",footer:"",maxWidth:9999,maxHeight:9999,showArrows:!0,wrapping:!0,type:null,alwaysShowClose:!1,loadingMessage:'<div class="ekko-lightbox-loader"><div><div></div><div></div></div></div>',leftArrow:"<span>&#10094;</span>",rightArrow:"<span>&#10095;</span>",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},o=function(){function i(e,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),this._config=t.extend({},s,n),this._$modalArrows=null,this._galleryIndex=0,this._galleryName=null,this._padding=null,this._border=null,this._titleIsShown=!1,this._footerIsShown=!1,this._wantedWidth=0,this._wantedHeight=0,this._touchstartX=0,this._touchendX=0,this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1),this._$element=e instanceof jQuery?e:t(e),this._isBootstrap3=3==t.fn.modal.Constructor.VERSION[0];var a='<h4 class="modal-title">'+(this._config.title||"&nbsp;")+"</h4>",r='<button type="button" class="close" data-dismiss="modal" aria-label="'+this._config.strings.close+'"><span aria-hidden="true">&times;</span></button>',l='<div class="modal-dialog" role="document"><div class="modal-content">'+('<div class="modal-header'+(this._config.title||this._config.alwaysShowClose?"":" hide")+'">'+(this._isBootstrap3?r+a:a+r)+"</div>")+'<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"></div><div class="ekko-lightbox-item fade"></div></div></div>'+('<div class="modal-footer'+(this._config.footer?"":" hide")+'">'+(this._config.footer||"&nbsp;")+"</div>")+"</div></div>";t(this._config.doc.body).append('<div id="'+this._modalId+'" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">'+l+"</div>"),this._$modal=t("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName&&(this._$galleryItems=t(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),t(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">'+this._config.leftArrow+'</a><a href="#">'+this._config.rightArrow+"</a></div>"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(t){return t.preventDefault(),o.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(t){return t.preventDefault(),o.navigateRight()}),this.updateNavigation())),this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return o._toggleLoading(!0),o._handle(),o._config.onShown.call(o)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return o._galleryName&&(t(document).off("keydown.ekkoLightbox"),t(window).off("resize.ekkoLightbox")),o._$modal.remove(),o._config.onHidden.call(o)}).modal(this._config),t(window).on("resize.ekkoLightbox",function(){o._resize(o._wantedWidth,o._wantedHeight)}),this._$lightboxContainer.on("touchstart",function(){o._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){o._touchendX=event.changedTouches[0].screenX,o._swipeGesure()})}return e(i,null,[{key:"Default",get:function(){return s}}]),e(i,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(e){if(e<0||e>this._$galleryItems.length-1)return this;this._galleryIndex=e,this.updateNavigation(),this._$element=t(this._$galleryItems.get(this._galleryIndex)),this._handle()}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var t=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?t.find("a:first-child").addClass("disabled"):t.find("a:first-child").removeClass("disabled"),this._galleryIndex===this._$galleryItems.length-1?t.find("a:last-child").addClass("disabled"):t.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(t){return 39===(t=t||window.event).keyCode?this.navigateRight():37===t.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(t,e){return!(e=e||!1)&&this._isImage(t)&&(e="image"),!e&&this._getYoutubeId(t)&&(e="youtube"),!e&&this._getVimeoId(t)&&(e="vimeo"),!e&&this._getInstagramId(t)&&(e="instagram"),(!e||["image","youtube","vimeo","instagram","video","url"].indexOf(e)<0)&&(e="url"),e}},{key:"_isImage",value:function(t){return t&&t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var t=this,e=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(e=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){t._$lightboxBodyTwo.hasClass("in")||t._$lightboxBodyTwo.empty(),t._$lightboxBodyOne.hasClass("in")||t._$lightboxBodyOne.empty()},500),e.addClass("in show"),e}},{key:"_handle",value:function(){var t=this._containerToUse();this._updateTitleAndFooter();var e=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(e,this._$element.attr("data-type")||!1);if(["image","youtube","vimeo","instagram","video","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(e,t),this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(e,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(e),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(e),t);break;case"video":this._showHtml5Video(e,t);break;default:this._loadRemoteContent(e,t)}return this}},{key:"_getYoutubeId",value:function(t){if(!t)return!1;var e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!e||11!==e[2].length)&&e[2]}},{key:"_getVimeoId",value:function(t){return!!(t&&t.indexOf("vimeo")>0)&&t}},{key:"_getInstagramId",value:function(t){return!!(t&&t.indexOf("instagram")>0)&&t}},{key:"_toggleLoading",value:function(e){return(e=e||!1)?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),t(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),t(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(t){return parseInt(this._$modalDialog.css(t),10)+parseInt(this._$modalContent.css(t),10)+parseInt(this._$modalBody.css(t),10)}},{key:"_updateTitleAndFooter",value:function(){var t=this._$element.data("title")||"",e=this._$element.data("footer")||"";return this._titleIsShown=!1,t||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(t||"&nbsp;")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,e?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(e)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(t,e){var i=this._getYoutubeId(t),n=t.indexOf("&")>0?t.substr(t.indexOf("&")):"",s=this._$element.data("width")||560,o=this._$element.data("height")||s/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+i+"?badge=0&autoplay=1&html5=1"+n,s,o,e)}},{key:"_showVimeoVideo",value:function(t,e){var i=this._$element.data("width")||500,n=this._$element.data("height")||i/(560/315);return this._showVideoIframe(t+"?autoplay=1",i,n,e)}},{key:"_showInstagramVideo",value:function(t,e){var i=this._$element.data("width")||612,n=i+80;return t="/"!==t.substr(-1)?t+"/":t,e.html('<iframe width="'+i+'" height="'+n+'" src="'+t+'embed/" frameborder="0" allowfullscreen></iframe>'),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(t,e,i,n){return i=i||e,n.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="'+e+'" height="'+i+'" src="'+t+'" frameborder="0" allowfullscreen class="embed-responsive-item"></iframe></div>'),this._resize(e,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(t,e){var i=this._$element.data("width")||560,n=this._$element.data("height")||i/(560/315);return e.html('<div class="embed-responsive embed-responsive-16by9"><video width="'+i+'" height="'+n+'" src="'+t+'" preload="auto" autoplay controls class="embed-responsive-item"></video></div>'),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(e,i){var n=this,s=this._$element.data("width")||560,o=this._$element.data("height")||560,a=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),a||this._isExternal(e)?(i.html('<iframe src="'+e+'" frameborder="0" allowfullscreen></iframe>'),this._config.onContentLoaded.call(this)):i.load(e,t.proxy(function(){return n._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(s,o),this}},{key:"_isExternal",value:function(t){var e=t.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&e[1].length>0&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&e[2].length>0&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(t){return console.error(t),this._containerToUse().html(t),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(e,i){if(this._$galleryItems){var n=t(this._$galleryItems.get(e),!1);if(void 0!==n){var s=n.attr("data-remote")||n.attr("href");return("image"===n.attr("data-type")||this._isImage(s))&&this._preloadImage(s,!1),i>0?this._preloadImageByIndex(e+1,i-1):void 0}}}},{key:"_preloadImage",value:function(e,i){var n=this;i=i||!1;var s,o=new Image;return i&&(s=setTimeout(function(){i.append(n._config.loadingMessage)},200),o.onload=function(){s&&clearTimeout(s),s=null;var e=t("<img />");return e.attr("src",o.src),e.addClass("img-fluid"),e.css("width","100%"),i.html(e),n._$modalArrows&&n._$modalArrows.css("display",""),n._resize(o.width,o.height),n._toggleLoading(!1),n._config.onContentLoaded.call(n)},o.onerror=function(){return n._toggleLoading(!1),n._error(n._config.strings.fail+" "+e)}),o.src=e,o}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(e,i){i=i||e,this._wantedWidth=e,this._wantedHeight=i;var n=e/i,s=this._padding.left+this._padding.right+this._border.left+this._border.right,o=this._config.doc.body.clientWidth>575?20:0,a=this._config.doc.body.clientWidth>575?0:20,r=Math.min(e+s,this._config.doc.body.clientWidth-o,this._config.maxWidth);e+s>r?(i=(r-s-a)/n,e=r):e+=s;var l=0,h=0;this._footerIsShown&&(h=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(l=this._$modalHeader.outerHeight(!0)||67);var u=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,c=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),d=Math.min(i,t(window).height()-u-c-l-h,this._config.maxHeight-u-l-h);i>d&&(e=Math.ceil(d*n)+s),this._$lightboxContainer.css("height",d),this._$modalDialog.css("flex",1).css("maxWidth",e);var f=this._$modal.data("bs.modal");if(f)try{f._handleUpdate()}catch(t){f.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(e){var n=this;return e=e||{},this.each(function(){var s=t(n),o=t.extend({},i.Default,s.data(),"object"==typeof e&&e);new i(n,o)})}}]),i}();t.fn[i]=o._jQueryInterface,t.fn[i].Constructor=o,t.fn[i].noConflict=function(){return t.fn[i]=n,o._jQueryInterface}}(jQuery)}(jQuery),function(t){var e="iCheck",i=e+"-helper",n="radio",s="checked",o="un"+s,a="disabled",r="determinate",l="in"+r,h="update",u="type",c="touchbegin.i touchend.i",d="addClass",f="removeClass",p="trigger",g="label",m="cursor",v=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);function b(t,e,i){var o=t[0],c=/er/.test(i)?l:/bl/.test(i)?a:s,d=i==h?{checked:o[s],disabled:o[a],indeterminate:"true"==t.attr(l)||"false"==t.attr(r)}:o[c];if(/^(ch|di|in)/.test(i)&&!d)_(t,c);else if(/^(un|en|de)/.test(i)&&d)y(t,c);else if(i==h)for(var f in d)d[f]?_(t,f,!0):y(t,f,!0);else e&&"toggle"!=i||(e||t[p]("ifClicked"),d?o[u]!==n&&y(t,c):_(t,c))}function _(h,c,p){var g=h[0],v=h.parent(),b=c==s,_=c==l,x=c==a,D=_?r:b?o:"enabled",M=w(h,D+k(g[u])),S=w(h,c+k(g[u]));if(!0!==g[c]){if(!p&&c==s&&g[u]==n&&g.name){var T=h.closest("form"),I='input[name="'+g.name+'"]';(I=T.length?T.find(I):t(I)).each(function(){this!==g&&t(this).data(e)&&y(t(this),c)})}_?(g[c]=!0,g[s]&&y(h,s,"force")):(p||(g[c]=!0),b&&g[l]&&y(h,l,!1)),C(h,b,c,p)}g[a]&&w(h,m,!0)&&v.find("."+i).css(m,"default"),v[d](S||w(h,c)||""),v.attr("role")&&!_&&v.attr("aria-"+(x?a:s),"true"),v[f](M||w(h,D)||"")}function y(t,e,n){var h=t[0],c=t.parent(),p=e==s,g=e==l,v=e==a,b=g?r:p?o:"enabled",_=w(t,b+k(h[u])),y=w(t,e+k(h[u]));!1!==h[e]&&(!g&&n&&"force"!=n||(h[e]=!1),C(t,p,b,n)),!h[a]&&w(t,m,!0)&&c.find("."+i).css(m,"pointer"),c[f](y||w(t,e)||""),c.attr("role")&&!g&&c.attr("aria-"+(v?a:s),"false"),c[d](_||w(t,b)||"")}function x(i,n){i.data(e)&&(i.parent().html(i.attr("style",i.data(e).s||"")),n&&i[p](n),i.off(".i").unwrap(),t(g+'[for="'+i[0].id+'"]').add(i.closest(g)).off(".i"))}function w(t,i,n){if(t.data(e))return t.data(e).o[i+(n?"":"Class")]}function k(t){return t.charAt(0).toUpperCase()+t.slice(1)}function C(t,e,i,n){n||(e&&t[p]("ifToggled"),t[p]("ifChanged")[p]("if"+k(i)))}t.fn[e]=function(o,r){var m='input[type="checkbox"], input[type="'+n+'"]',w=t(),k=function(e){e.each(function(){var e=t(this);w=e.is(m)?w.add(e):w.add(e.find(m))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(o))return o=o.toLowerCase(),k(this),w.each(function(){var e=t(this);"destroy"==o?x(e,"ifDestroyed"):b(e,!0,o),t.isFunction(r)&&r()});if("object"!=typeof o&&o)return this;var C=t.extend({checkedClass:s,disabledClass:a,indeterminateClass:l,labelHover:!0},o),D=C.handle,M=C.hoverClass||"hover",S=C.focusClass||"focus",T=C.activeClass||"active",I=!!C.labelHover,P=C.labelHoverClass||"hover",A=0|(""+C.increaseArea).replace("%","");return"checkbox"!=D&&D!=n||(m='input[type="'+D+'"]'),A<-50&&(A=-50),k(this),w.each(function(){var o=t(this);x(o);var r,l=this,m=l.id,w=-A+"%",k=100+2*A+"%",D={position:"absolute",top:w,left:w,display:"block",width:k,height:k,margin:0,padding:0,background:"#fff",border:0,opacity:0},F=v?{position:"absolute",visibility:"hidden"}:A?D:{position:"absolute",opacity:0},O="checkbox"==l[u]?C.checkboxClass||"icheckbox":C.radioClass||"i"+n,E=t(g+'[for="'+m+'"]').add(o.closest(g)),N=!!C.aria,z=e+"-"+Math.random().toString(36).substr(2,6),L='<div class="'+O+'" '+(N?'role="'+l[u]+'" ':"");N&&E.each(function(){L+='aria-labelledby="',this.id?L+=this.id:(this.id=z,L+=z),L+='"'}),L=o.wrap(L+"/>")[p]("ifCreated").parent().append(C.insert),r=t('<ins class="'+i+'"/>').css(D).appendTo(L),o.data(e,{o:C,s:o.attr("style")}).css(F),C.inheritClass&&L[d](l.className||""),C.inheritID&&m&&L.attr("id",e+"-"+m),"static"==L.css("position")&&L.css("position","relative"),b(o,!0,h),E.length&&E.on("click.i mouseover.i mouseout.i "+c,function(e){var i=e[u],n=t(this);if(!l[a]){if("click"==i){if(t(e.target).is("a"))return;b(o,!1,!0)}else I&&(/ut|nd/.test(i)?(L[f](M),n[f](P)):(L[d](M),n[d](P)));if(!v)return!1;e.stopPropagation()}}),o.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(t){var e=t[u],i=t.keyCode;return"click"!=e&&("keydown"==e&&32==i?(l[u]==n&&l[s]||(l[s]?y(o,s):_(o,s)),!1):void("keyup"==e&&l[u]==n?!l[s]&&_(o,s):/us|ur/.test(e)&&L["blur"==e?f:d](S)))}),r.on("click mousedown mouseup mouseover mouseout "+c,function(t){var e=t[u],i=/wn|up/.test(e)?T:M;if(!l[a]){if("click"==e?b(o,!1,!0):(/wn|er|in/.test(e)?L[d](i):L[f](i+" "+T),E.length&&I&&i==M&&E[/ut|nd/.test(e)?f:d](P)),!v)return!1;t.stopPropagation()}})})}}(window.jQuery||window.Zepto),function(t){var e=[],i=[],n=[],s=[],o={init:function(a,r){for(var l=t.extend({bind:"click",passwordElement:null,displayElement:null,passwordLength:16,uppercase:!0,lowercase:!0,numbers:!0,specialChars:!0,additionalSpecialChars:[],onPasswordGenerated:function(t){}},a),h=48;h<58;h++)e.push(h);for(h=65;h<91;h++)i.push(h);for(h=97;h<123;h++)n.push(h);return s=[33,35,64,36,38,42,91,93,123,125,92,47,63,58,59,95,45].concat(l.additionalSpecialChars),this.each(function(){t(this).bind(l.bind,function(t){t.preventDefault(),o.generatePassword(l)})})},generatePassword:function(o){var r=new Array,l=o.uppercase+o.lowercase+o.numbers+o.specialChars,h=0,u=new Array,c=Math.floor(o.passwordLength/l);if(o.uppercase){for(var d=0;d<c;d++)r.push(String.fromCharCode(i[a(0,i.length-1)]));u=u.concat(i),h++}if(o.numbers){for(d=0;d<c;d++)r.push(String.fromCharCode(e[a(0,e.length-1)]));u=u.concat(e),h++}if(o.specialChars){for(d=0;d<c;d++)r.push(String.fromCharCode(s[a(0,s.length-1)]));u=u.concat(s),h++}var f=o.passwordLength-h*c;if(o.lowercase)for(d=0;d<f;d++)r.push(String.fromCharCode(n[a(0,n.length-1)]));else for(d=0;d<f;d++)r.push(String.fromCharCode(u[a(0,u.length-1)]));r=function(t){for(var e,i,n=t.length;n;e=parseInt(Math.random()*n),i=t[--n],t[n]=t[e],t[e]=i);return t}(r).join(""),null!==o.passwordElement&&t(o.passwordElement).val(r),null!==o.displayElement&&(t(o.displayElement).is("input")?t(o.displayElement).val(r):t(o.displayElement).text(r)),o.onPasswordGenerated(r)}};function a(t,e){return Math.floor(Math.random()*(e-t+1)+t)}t.fn.pGenerator=function(e){return o[e]?o[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist on jQuery.pGenerator"):o.init.apply(this,arguments)}}(jQuery),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],function(t){return e(function(){try{return t("moment")}catch(t){}}())}):(t=t||self).Chart=e(t.moment)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e,i={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=(function(t){var e={};for(var n in i)i.hasOwnProperty(n)&&(e[i[n]]=n);var s=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var o in s)if(s.hasOwnProperty(o)){if(!("channels"in s[o]))throw new Error("missing channels property: "+o);if(!("labels"in s[o]))throw new Error("missing channel labels property: "+o);if(s[o].labels.length!==s[o].channels)throw new Error("channel and label counts mismatch: "+o);var a=s[o].channels,r=s[o].labels;delete s[o].channels,delete s[o].labels,Object.defineProperty(s[o],"channels",{value:a}),Object.defineProperty(s[o],"labels",{value:r})}s.rgb.hsl=function(t){var e,i,n=t[0]/255,s=t[1]/255,o=t[2]/255,a=Math.min(n,s,o),r=Math.max(n,s,o),l=r-a;return r===a?e=0:n===r?e=(s-o)/l:s===r?e=2+(o-n)/l:o===r&&(e=4+(n-s)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(a+r)/2,[e,100*(r===a?0:i<=.5?l/(r+a):l/(2-r-a)),100*i]},s.rgb.hsv=function(t){var e,i,n,s,o,a=t[0]/255,r=t[1]/255,l=t[2]/255,h=Math.max(a,r,l),u=h-Math.min(a,r,l),c=function(t){return(h-t)/6/u+.5};return 0===u?s=o=0:(o=u/h,e=c(a),i=c(r),n=c(l),a===h?s=n-i:r===h?s=1/3+e-n:l===h&&(s=2/3+i-e),s<0?s+=1:s>1&&(s-=1)),[360*s,100*o,100*h]},s.rgb.hwb=function(t){var e=t[0],i=t[1],n=t[2];return[s.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(i,n))),100*(n=1-1/255*Math.max(e,Math.max(i,n)))]},s.rgb.cmyk=function(t){var e,i=t[0]/255,n=t[1]/255,s=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-s)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-s-e)/(1-e)||0),100*e]},s.rgb.keyword=function(t){var n=e[t];if(n)return n;var s,o,a,r=1/0;for(var l in i)if(i.hasOwnProperty(l)){var h=i[l],u=(o=t,a=h,Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));u<r&&(r=u,s=l)}return s},s.keyword.rgb=function(t){return i[t]},s.rgb.xyz=function(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},s.rgb.lab=function(t){var e=s.rgb.xyz(t),i=e[0],n=e[1],o=e[2];return n/=100,o/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},s.hsl.rgb=function(t){var e,i,n,s,o,a=t[0]/360,r=t[1]/100,l=t[2]/100;if(0===r)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+r):l+r-l*r),s=[0,0,0];for(var h=0;h<3;h++)(n=a+1/3*-(h-1))<0&&n++,n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,s[h]=255*o;return s},s.hsl.hsv=function(t){var e=t[0],i=t[1]/100,n=t[2]/100,s=i,o=Math.max(n,.01);return i*=(n*=2)<=1?n:2-n,s*=o<=1?o:2-o,[e,100*(0===n?2*s/(o+s):2*i/(n+i)),100*((n+i)/2)]},s.hsv.rgb=function(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,s=Math.floor(e)%6,o=e-Math.floor(e),a=255*n*(1-i),r=255*n*(1-i*o),l=255*n*(1-i*(1-o));switch(n*=255,s){case 0:return[n,l,a];case 1:return[r,n,a];case 2:return[a,n,l];case 3:return[a,r,n];case 4:return[l,a,n];case 5:return[n,a,r]}},s.hsv.hsl=function(t){var e,i,n,s=t[0],o=t[1]/100,a=t[2]/100,r=Math.max(a,.01);return n=(2-o)*a,i=o*r,[s,100*(i=(i/=(e=(2-o)*r)<=1?e:2-e)||0),100*(n/=2)]},s.hwb.rgb=function(t){var e,i,n,s,o,a,r,l=t[0]/360,h=t[1]/100,u=t[2]/100,c=h+u;switch(c>1&&(h/=c,u/=c),n=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(n=1-n),s=h+n*((i=1-u)-h),e){default:case 6:case 0:o=i,a=s,r=h;break;case 1:o=s,a=i,r=h;break;case 2:o=h,a=i,r=s;break;case 3:o=h,a=s,r=i;break;case 4:o=s,a=h,r=i;break;case 5:o=i,a=h,r=s}return[255*o,255*a,255*r]},s.cmyk.rgb=function(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,s=t[3]/100;return[255*(1-Math.min(1,e*(1-s)+s)),255*(1-Math.min(1,i*(1-s)+s)),255*(1-Math.min(1,n*(1-s)+s))]},s.xyz.rgb=function(t){var e,i,n,s=t[0]/100,o=t[1]/100,a=t[2]/100;return i=-.9689*s+1.8758*o+.0415*a,n=.0557*s+-.204*o+1.057*a,e=(e=3.2406*s+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]},s.xyz.lab=function(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},s.lab.xyz=function(t){var e,i,n,s=t[0];e=t[1]/500+(i=(s+16)/116),n=i-t[2]/200;var o=Math.pow(i,3),a=Math.pow(e,3),r=Math.pow(n,3);return i=o>.008856?o:(i-16/116)/7.787,e=a>.008856?a:(e-16/116)/7.787,n=r>.008856?r:(n-16/116)/7.787,[e*=95.047,i*=100,n*=108.883]},s.lab.lch=function(t){var e,i=t[0],n=t[1],s=t[2];return(e=360*Math.atan2(s,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+s*s),e]},s.lch.lab=function(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]},s.rgb.ansi16=function(t){var e=t[0],i=t[1],n=t[2],o=1 in arguments?arguments[1]:s.rgb.hsv(t)[2];if(0===(o=Math.round(o/50)))return 30;var a=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(e/255));return 2===o&&(a+=60),a},s.hsv.ansi16=function(t){return s.rgb.ansi16(s.hsv.rgb(t),t[2])},s.rgb.ansi256=function(t){var e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},s.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},s.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var i;return t-=16,[Math.floor(t/36)/5*255,Math.floor((i=t%36)/6)/5*255,i%6/5*255]},s.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},s.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var i=e[0];3===e[0].length&&(i=i.split("").map(function(t){return t+t}).join(""));var n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},s.rgb.hcg=function(t){var e,i=t[0]/255,n=t[1]/255,s=t[2]/255,o=Math.max(Math.max(i,n),s),a=Math.min(Math.min(i,n),s),r=o-a;return e=r<=0?0:o===i?(n-s)/r%6:o===n?2+(s-i)/r:4+(i-n)/r+4,e/=6,[360*(e%=1),100*r,100*(r<1?a/(1-r):0)]},s.hsl.hcg=function(t){var e=t[1]/100,i=t[2]/100,n=1,s=0;return(n=i<.5?2*e*i:2*e*(1-i))<1&&(s=(i-.5*n)/(1-n)),[t[0],100*n,100*s]},s.hsv.hcg=function(t){var e=t[1]/100,i=t[2]/100,n=e*i,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],100*n,100*s]},s.hcg.rgb=function(t){var e=t[0]/360,i=t[1]/100,n=t[2]/100;if(0===i)return[255*n,255*n,255*n];var s,o=[0,0,0],a=e%1*6,r=a%1,l=1-r;switch(Math.floor(a)){case 0:o[0]=1,o[1]=r,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=r;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=r,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return s=(1-i)*n,[255*(i*o[0]+s),255*(i*o[1]+s),255*(i*o[2]+s)]},s.hcg.hsv=function(t){var e=t[1]/100,i=e+t[2]/100*(1-e),n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},s.hcg.hsl=function(t){var e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},s.hcg.hwb=function(t){var e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},s.hwb.hcg=function(t){var e=t[1]/100,i=1-t[2]/100,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],100*n,100*s]},s.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},s.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},s.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},s.gray.hsl=s.gray.hsv=function(t){return[0,0,t[0]]},s.gray.hwb=function(t){return[0,100,t[0]]},s.gray.cmyk=function(t){return[0,0,0,t[0]]},s.gray.lab=function(t){return[t[0],0,0]},s.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},s.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}(e={exports:{}},e.exports),e.exports);n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function s(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,s=0;s<i;s++)t[e[s]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;)for(var s=i.pop(),o=Object.keys(n[s]),a=o.length,r=0;r<a;r++){var l=o[r],h=e[l];-1===h.distance&&(h.distance=e[s].distance+1,h.parent=s,i.unshift(l))}return e}function o(t,e){return function(i){return e(t(i))}}function a(t,e){for(var i=[e[t].parent,t],s=n[e[t].parent][t],a=e[t].parent;e[a].parent;)i.unshift(e[a].parent),s=o(n[e[a].parent][a],s),a=e[a].parent;return s.conversion=i,s}var r={};Object.keys(n).forEach(function(t){r[t]={},Object.defineProperty(r[t],"channels",{value:n[t].channels}),Object.defineProperty(r[t],"labels",{value:n[t].labels});var e=function(t){for(var e=s(t),i={},n=Object.keys(e),o=n.length,r=0;r<o;r++){var l=n[r];null!==e[l].parent&&(i[l]=a(l,e))}return i}(t);Object.keys(e).forEach(function(i){var n=e[i];r[t][i]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var i=t(e);if("object"==typeof i)for(var n=i.length,s=0;s<n;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}(n),r[t][i].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)})});var l=r,h={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:c,getHsla:d,getRgb:function(t){var e=c(t);return e&&e.slice(0,3)},getHsl:function(t){var e=d(t);return e&&e.slice(0,3)},getHwb:f,getAlpha:function(t){var e=c(t);if(e)return e[3];if(e=d(t))return e[3];if(e=f(t))return e[3]},hexString:function(t,e){var e=void 0!==e&&3===t.length?e:t[3];return"#"+b(t[0])+b(t[1])+b(t[2])+(e>=0&&e<1?b(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:p,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+s+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return m(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:m,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return _[t.slice(0,3)]}};function c(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3,4})$/i),s="";if(n){s=(n=n[1])[3];for(var o=0;o<e.length;o++)e[o]=parseInt(n[o]+n[o],16);s&&(i=Math.round(parseInt(s+s,16)/255*100)/100)}else if(n=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){s=n[2],n=n[1];for(o=0;o<e.length;o++)e[o]=parseInt(n.slice(2*o,2*o+2),16);s&&(i=Math.round(parseInt(s,16)/255*100)/100)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=parseInt(n[o+1]);i=parseFloat(n[4])}else if(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=Math.round(2.55*parseFloat(n[o+1]));i=parseFloat(n[4])}else if(n=t.match(/(\w+)/)){if("transparent"==n[1])return[0,0,0,0];if(!(e=h[n[1]]))return}for(o=0;o<e.length;o++)e[o]=v(e[o],0,255);return i=i||0==i?v(i,0,1):1,e[3]=i,e}}function d(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[v(parseInt(e[1]),0,360),v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(i)?1:i,0,1)]}}}function f(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[v(parseInt(e[1]),0,360),v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(i)?1:i,0,1)]}}}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function g(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function v(t,e,i){return Math.min(Math.max(e,t),i)}function b(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var _={};for(var y in h)_[h[y]]=y;var x=function(t){return t instanceof x?t:this instanceof x?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=u.getRgba(t))?this.setValues("rgb",e):(e=u.getHsla(t))?this.setValues("hsl",e):(e=u.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new x(t);var e};x.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=t,n=void 0===e?.5:e,s=2*n-1,o=this.alpha()-i.alpha(),a=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,r=1-a;return this.rgb(a*this.red()+r*i.red(),a*this.green()+r*i.green(),a*this.blue()+r*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new x,n=this.values,s=i.values;for(var o in n)n.hasOwnProperty(o)&&(t=n[o],"[object Array]"===(e={}.toString.call(t))?s[o]=t.slice(0):"[object Number]"===e?s[o]=t:console.error("unexpected color value:",t));return i}},x.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},x.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},x.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},x.prototype.setValues=function(t,e){var i,n,s=this.values,o=this.spaces,a=this.maxes,r=1;if(this.valid=!0,"alpha"===t)r=e;else if(e.length)s[t]=e.slice(0,t.length),r=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)s[t][i]=e[t.charAt(i)];r=e.a}else if(void 0!==e[o[t][0]]){var h=o[t];for(i=0;i<t.length;i++)s[t][i]=e[h[i]];r=e.alpha}if(s.alpha=Math.max(0,Math.min(1,void 0===r?s.alpha:r)),"alpha"===t)return!1;for(i=0;i<t.length;i++)n=Math.max(0,Math.min(a[t][i],s[t][i])),s[t][i]=Math.round(n);for(var u in o)u!==t&&(s[u]=l[t][u](s[t]));return!0},x.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},x.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=x);var w=x;function k(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var C,D={noop:function(){},uid:(C=0,function(){return C++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return D.valueOrDefault(D.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var s,o,a;if(D.isArray(t))if(o=t.length,n)for(s=o-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<o;s++)e.call(i,t[s],s);else if(D.isObject(t))for(o=(a=Object.keys(t)).length,s=0;s<o;s++)e.call(i,t[a[s]],a[s])},arrayEquals:function(t,e){var i,n,s,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(s=t[i],o=e[i],s instanceof Array&&o instanceof Array){if(!D.arrayEquals(s,o))return!1}else if(s!==o)return!1;return!0},clone:function(t){if(D.isArray(t))return t.map(D.clone);if(D.isObject(t)){for(var e=Object.create(t),i=Object.keys(t),n=i.length,s=0;s<n;++s)e[i[s]]=D.clone(t[i[s]]);return e}return t},_merger:function(t,e,i,n){if(k(t)){var s=e[t],o=i[t];D.isObject(s)&&D.isObject(o)?D.merge(s,o,n):e[t]=D.clone(o)}},_mergerIf:function(t,e,i){if(k(t)){var n=e[t],s=i[t];D.isObject(n)&&D.isObject(s)?D.mergeIf(n,s):e.hasOwnProperty(t)||(e[t]=D.clone(s))}},merge:function(t,e,i){var n,s,o,a,r,l=D.isArray(e)?e:[e],h=l.length;if(!D.isObject(t))return t;for(n=(i=i||{}).merger||D._merger,s=0;s<h;++s)if(e=l[s],D.isObject(e))for(r=0,a=(o=Object.keys(e)).length;r<a;++r)n(o[r],t,e,i);return t},mergeIf:function(t,e){return D.merge(t,e,{merger:D._mergerIf})},extend:Object.assign||function(t){return D.merge(t,[].slice.call(arguments,1),{merger:function(t,e,i){e[t]=i[t]}})},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=D.inherits,t&&D.extend(i.prototype,t),i.__super__=e.prototype,i},_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')}},M=D;D.callCallback=D.callback,D.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},D.getValueOrDefault=D.valueOrDefault,D.getValueAtIndexOrDefault=D.valueAtIndexOrDefault;var S={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce: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},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},T={effects:S};M.easingEffects=S;var I=Math.PI,P=I/180,A=2*I,F=I/2,O=I/4,E=2*I/3,N={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,s,o){if(o){var a=Math.min(o,s/2,n/2),r=e+a,l=i+a,h=e+n-a,u=i+s-a;t.moveTo(e,l),r<h&&l<u?(t.arc(r,l,a,-I,-F),t.arc(h,l,a,-F,0),t.arc(h,u,a,0,F),t.arc(r,u,a,F,I)):r<h?(t.moveTo(r,i),t.arc(h,l,a,-F,F),t.arc(r,l,a,F,I+F)):l<u?(t.arc(r,l,a,-I,0),t.arc(r,u,a,0,I)):t.arc(r,l,a,-I,I),t.closePath(),t.moveTo(e,i)}else t.rect(e,i,n,s)},drawPoint:function(t,e,i,n,s,o){var a,r,l,h,u,c=(o||0)*P;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(a=e.toString())||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(n,s),t.rotate(c),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(i)||i<=0)){switch(t.beginPath(),e){default:t.arc(n,s,i,0,A),t.closePath();break;case"triangle":t.moveTo(n+Math.sin(c)*i,s-Math.cos(c)*i),c+=E,t.lineTo(n+Math.sin(c)*i,s-Math.cos(c)*i),c+=E,t.lineTo(n+Math.sin(c)*i,s-Math.cos(c)*i),t.closePath();break;case"rectRounded":h=i-(u=.516*i),r=Math.cos(c+O)*h,l=Math.sin(c+O)*h,t.arc(n-r,s-l,u,c-I,c-F),t.arc(n+l,s-r,u,c-F,c),t.arc(n+r,s+l,u,c,c+F),t.arc(n-l,s+r,u,c+F,c+I),t.closePath();break;case"rect":if(!o){h=Math.SQRT1_2*i,t.rect(n-h,s-h,2*h,2*h);break}c+=O;case"rectRot":r=Math.cos(c)*i,l=Math.sin(c)*i,t.moveTo(n-r,s-l),t.lineTo(n+l,s-r),t.lineTo(n+r,s+l),t.lineTo(n-l,s+r),t.closePath();break;case"crossRot":c+=O;case"cross":r=Math.cos(c)*i,l=Math.sin(c)*i,t.moveTo(n-r,s-l),t.lineTo(n+r,s+l),t.moveTo(n+l,s-r),t.lineTo(n-l,s+r);break;case"star":r=Math.cos(c)*i,l=Math.sin(c)*i,t.moveTo(n-r,s-l),t.lineTo(n+r,s+l),t.moveTo(n+l,s-r),t.lineTo(n-l,s+r),c+=O,r=Math.cos(c)*i,l=Math.sin(c)*i,t.moveTo(n-r,s-l),t.lineTo(n+r,s+l),t.moveTo(n+l,s-r),t.lineTo(n-l,s+r);break;case"line":r=Math.cos(c)*i,l=Math.sin(c)*i,t.moveTo(n-r,s-l),t.lineTo(n+r,s+l);break;case"dash":t.moveTo(n,s),t.lineTo(n+Math.cos(c)*i,s+Math.sin(c)*i)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){var s=i.steppedLine;if(s){if("middle"===s){var o=(e.x+i.x)/2;t.lineTo(o,n?i.y:e.y),t.lineTo(o,n?e.y:i.y)}else"after"===s&&!n||"after"!==s&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}else i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}},z=N;M.clear=N.clear,M.drawRoundedRectangle=function(t){t.beginPath(),N.roundedRect.apply(N,arguments)};var L={_set:function(t,e){return M.merge(this[t]||(this[t]={}),e)}};L._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var H=L,R=M.valueOrDefault;var W={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,n,s;return M.isObject(t)?(e=+t.top||0,i=+t.right||0,n=+t.bottom||0,s=+t.left||0):e=i=n=s=+t||0,{top:e,right:i,bottom:n,left:s,height:e+n,width:s+i}},_parseFont:function(t){var e=H.global,i=R(t.fontSize,e.defaultFontSize),n={family:R(t.fontFamily,e.defaultFontFamily),lineHeight:M.options.toLineHeight(R(t.lineHeight,e.defaultLineHeight),i),size:i,style:R(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return n.string=function(t){return!t||M.isNullOrUndef(t.size)||M.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n},resolve:function(t,e,i,n){var s,o,a,r=!0;for(s=0,o=t.length;s<o;++s)if(void 0!==(a=t[s])&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&M.isArray(a)&&(a=a[i],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}},B={_factorize:function(t){var e,i=[],n=Math.sqrt(t);for(e=1;e<n;e++)t%e==0&&(i.push(e),i.push(t/e));return n===(0|n)&&i.push(n),i.sort(function(t,e){return t-e}).pop(),i},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e}},V=B;M.log10=B.log10;var U=M,j=T,Y=z,q=W,$=V,K={getRtlAdapter:function(t,e,i){return t?function(t,e){return{x:function(i){return t+t+e-i},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,i):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var i,n;"ltr"!==e&&"rtl"!==e||(n=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};U.easing=j,U.canvas=Y,U.options=q,U.math=$,U.rtl=K;var X=function(t){U.extend(this,t),this.initialize.apply(this,arguments)};U.extend(X.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=U.extend({},t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,n=e._start,s=e._view;return i&&1!==t?(s||(s=e._view={}),n||(n=e._start={}),function(t,e,i,n){var s,o,a,r,l,h,u,c,d,f=Object.keys(i);for(s=0,o=f.length;s<o;++s)if(h=i[a=f[s]],e.hasOwnProperty(a)||(e[a]=h),(r=e[a])!==h&&"_"!==a[0]){if(t.hasOwnProperty(a)||(t[a]=r),(u=typeof h)==typeof(l=t[a]))if("string"===u){if((c=w(l)).valid&&(d=w(h)).valid){e[a]=d.mix(c,n).rgbString();continue}}else if(U.isFinite(l)&&U.isFinite(h)){e[a]=l+(h-l)*n;continue}e[a]=h}}(n,s,i,t),e):(e._view=U.extend({},i),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return U.isNumber(this._model.x)&&U.isNumber(this._model.y)}}),X.extend=U.inherits;var G=X,Q=G.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=Q;Object.defineProperty(Q.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Q.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),H._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:U.noop,onComplete:U.noop}});var J={animations:[],request:null,addAnimation:function(t,e,i,n){var s,o,a=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=i,n||(t.animating=!0),s=0,o=a.length;s<o;++s)if(a[s].chart===t)return void(a[s]=e);a.push(e),1===a.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=U.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=U.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,i,n,s=this.animations,o=0;o<s.length;)e=(t=s[o]).chart,i=t.numSteps,n=Math.floor((Date.now()-t.startTime)/t.duration*i)+1,t.currentStep=Math.min(n,i),U.callback(t.render,[e,t],e),U.callback(t.onAnimationProgress,[t],e),t.currentStep>=i?(U.callback(t.onAnimationComplete,[t],e),e.animating=!1,s.splice(o,1)):++o}},tt=U.options.resolve,et=["push","pop","shift","splice","unshift"];function it(t,e){var i=t._chartjs;if(i){var n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(et.forEach(function(e){delete t[e]}),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};U.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var i=this;i.chart=t,i.index=e,i.linkScales(),i.addElements(),i._type=i.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,i=e.scales,n=this.getDataset(),s=e.options.scales;null!==t.xAxisID&&t.xAxisID in i&&!n.xAxisID||(t.xAxisID=n.xAxisID||s.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in i&&!n.yAxisID||(t.yAxisID=n.yAxisID||s.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&it(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],s=i.data;for(t=0,e=n.length;t<e;++t)s[t]=s[t]||this.createMetaData(t);i.dataset=i.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,i=this,n=i.getDataset(),s=n.data||(n.data=[]);i._data!==s&&(i._data&&it(i._data,i),s&&Object.isExtensible(s)&&(e=i,(t=s)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),et.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),s=n.apply(this,e);return U.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),s}})}))),i._data=s),i.resyncElements()},_configure:function(){this._config=U.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,i){"_meta"!==t&&"data"!==t&&U._merger(t,e,i)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:U.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,s=0;s<n;++s)i[s].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},getStyle:function(t){var e,i=this.getMeta(),n=i.dataset;return this._configure(),n&&void 0===t?e=this._resolveDatasetElementOptions(n||{}):(t=t||0,e=this._resolveDataElementOptions(i.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var i,n,s,o,a=this,r=a.chart,l=a._config,h=t.custom||{},u=r.options.elements[a.datasetElementType.prototype._type]||{},c=a._datasetElementOptions,d={},f={chart:r,dataset:a.getDataset(),datasetIndex:a.index,hover:e};for(i=0,n=c.length;i<n;++i)s=c[i],o=e?"hover"+s.charAt(0).toUpperCase()+s.slice(1):s,d[s]=tt([h[o],l[o],u[o]],f);return d},_resolveDataElementOptions:function(t,e){var i=this,n=t&&t.custom,s=i._cachedDataOpts;if(s&&!n)return s;var o,a,r,l,h=i.chart,u=i._config,c=h.options.elements[i.dataElementType.prototype._type]||{},d=i._dataElementOptions,f={},p={chart:h,dataIndex:e,dataset:i.getDataset(),datasetIndex:i.index},g={cacheable:!n};if(n=n||{},U.isArray(d))for(a=0,r=d.length;a<r;++a)f[l=d[a]]=tt([n[l],u[l],c[l]],p,e,g);else for(a=0,r=(o=Object.keys(d)).length;a<r;++a)f[l=o[a]]=tt([n[l],u[d[l]],u[l],c[l]],p,e,g);return g.cacheable&&(i._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){U.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},s=t._model,o=U.getHoverColor;t.$previousStyle={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth},s.backgroundColor=tt([n.hoverBackgroundColor,e.hoverBackgroundColor,o(s.backgroundColor)],void 0,i),s.borderColor=tt([n.hoverBorderColor,e.hoverBorderColor,o(s.borderColor)],void 0,i),s.borderWidth=tt([n.hoverBorderWidth,e.hoverBorderWidth,s.borderWidth],void 0,i)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,i,n,s,o,a=this.getMeta().dataset,r={};if(a){for(o=a._model,s=this._resolveDatasetElementOptions(a,!0),t=0,e=(n=Object.keys(s)).length;t<e;++t)r[i=n[t]]=o[i],o[i]=s[i];a.$previousStyle=r}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):n>i&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),nt.extend=U.inherits;var st=nt,ot=2*Math.PI;function at(t,e){var i=e.startAngle,n=e.endAngle,s=e.pixelMargin,o=s/e.outerRadius,a=e.x,r=e.y;t.beginPath(),t.arc(a,r,e.outerRadius,i-o,n+o),e.innerRadius>s?(o=s/e.innerRadius,t.arc(a,r,e.innerRadius-s,n+o,i-o,!0)):t.arc(a,r,s,n+Math.PI/2,i-Math.PI/2),t.closePath(),t.clip()}function rt(t,e,i){var n="inner"===e.borderAlign;n?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),i.fullCircles&&function(t,e,i,n){var s,o=i.endAngle;for(n&&(i.endAngle=i.startAngle+ot,at(t,i),i.endAngle=o,i.endAngle===i.startAngle&&i.fullCircles&&(i.endAngle+=ot,i.fullCircles--)),t.beginPath(),t.arc(i.x,i.y,i.innerRadius,i.startAngle+ot,i.startAngle,!0),s=0;s<i.fullCircles;++s)t.stroke();for(t.beginPath(),t.arc(i.x,i.y,e.outerRadius,i.startAngle,i.startAngle+ot),s=0;s<i.fullCircles;++s)t.stroke()}(t,e,i,n),n&&at(t,i),t.beginPath(),t.arc(i.x,i.y,e.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),t.stroke()}H._set("global",{elements:{arc:{backgroundColor:H.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var lt=G.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var i=this._view;if(i){for(var n=U.getAngleFromPoint(i,{x:t,y:e}),s=n.angle,o=n.distance,a=i.startAngle,r=i.endAngle;r<a;)r+=ot;for(;s>r;)s-=ot;for(;s<a;)s+=ot;var l=s>=a&&s<=r,h=o>=i.innerRadius&&o<=i.outerRadius;return l&&h}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t,e=this._chart.ctx,i=this._view,n="inner"===i.borderAlign?.33:0,s={x:i.x,y:i.y,innerRadius:i.innerRadius,outerRadius:Math.max(i.outerRadius-n,0),pixelMargin:n,startAngle:i.startAngle,endAngle:i.endAngle,fullCircles:Math.floor(i.circumference/ot)};if(e.save(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,s.fullCircles){for(s.endAngle=s.startAngle+ot,e.beginPath(),e.arc(s.x,s.y,s.outerRadius,s.startAngle,s.endAngle),e.arc(s.x,s.y,s.innerRadius,s.endAngle,s.startAngle,!0),e.closePath(),t=0;t<s.fullCircles;++t)e.fill();s.endAngle=s.startAngle+i.circumference%ot}e.beginPath(),e.arc(s.x,s.y,s.outerRadius,s.startAngle,s.endAngle),e.arc(s.x,s.y,s.innerRadius,s.endAngle,s.startAngle,!0),e.closePath(),e.fill(),i.borderWidth&&rt(e,i,s),e.restore()}}),ht=U.valueOrDefault,ut=H.global.defaultColor;H._set("global",{elements:{line:{tension:.4,backgroundColor:ut,borderWidth:3,borderColor:ut,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ct=G.extend({_type:"line",draw:function(){var t,e,i,n=this,s=n._view,o=n._chart.ctx,a=s.spanGaps,r=n._children.slice(),l=H.global,h=l.elements.line,u=-1,c=n._loop;if(r.length){if(n._loop){for(t=0;t<r.length;++t)if(e=U.previousItem(r,t),!r[t]._view.skip&&e._view.skip){r=r.slice(t).concat(r.slice(0,t)),c=a;break}c&&r.push(r[0])}for(o.save(),o.lineCap=s.borderCapStyle||h.borderCapStyle,o.setLineDash&&o.setLineDash(s.borderDash||h.borderDash),o.lineDashOffset=ht(s.borderDashOffset,h.borderDashOffset),o.lineJoin=s.borderJoinStyle||h.borderJoinStyle,o.lineWidth=ht(s.borderWidth,h.borderWidth),o.strokeStyle=s.borderColor||l.defaultColor,o.beginPath(),(i=r[0]._view).skip||(o.moveTo(i.x,i.y),u=0),t=1;t<r.length;++t)i=r[t]._view,e=-1===u?U.previousItem(r,t):r[u],i.skip||(u!==t-1&&!a||-1===u?o.moveTo(i.x,i.y):U.canvas.lineTo(o,e._view,i),u=t);c&&o.closePath(),o.stroke(),o.restore()}}}),dt=U.valueOrDefault,ft=H.global.defaultColor;function pt(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}H._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ft,borderColor:ft,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var gt=G.extend({_type:"point",inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:pt,inXRange:pt,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,i=this._chart.ctx,n=e.pointStyle,s=e.rotation,o=e.radius,a=e.x,r=e.y,l=H.global,h=l.defaultColor;e.skip||(void 0===t||U.canvas._isPointInArea(e,t))&&(i.strokeStyle=e.borderColor||h,i.lineWidth=dt(e.borderWidth,l.elements.point.borderWidth),i.fillStyle=e.backgroundColor||h,U.canvas.drawPoint(i,n,o,a,r,s))}}),mt=H.global.defaultColor;function vt(t){return t&&void 0!==t.width}function bt(t){var e,i,n,s,o;return vt(t)?(o=t.width/2,e=t.x-o,i=t.x+o,n=Math.min(t.y,t.base),s=Math.max(t.y,t.base)):(o=t.height/2,e=Math.min(t.x,t.base),i=Math.max(t.x,t.base),n=t.y-o,s=t.y+o),{left:e,top:n,right:i,bottom:s}}function _t(t,e,i){return t===e?i:t===i?e:t}function yt(t,e,i){var n,s,o,a,r=t.borderWidth,l=function(t){var e=t.borderSkipped,i={};return e?(t.horizontal?t.base>t.x&&(e=_t(e,"left","right")):t.base<t.y&&(e=_t(e,"bottom","top")),i[e]=!0,i):i}(t);return U.isObject(r)?(n=+r.top||0,s=+r.right||0,o=+r.bottom||0,a=+r.left||0):n=s=o=a=+r||0,{t:l.top||n<0?0:n>i?i:n,r:l.right||s<0?0:s>e?e:s,b:l.bottom||o<0?0:o>i?i:o,l:l.left||a<0?0:a>e?e:a}}function xt(t,e,i){var n=null===e,s=null===i,o=!(!t||n&&s)&&bt(t);return o&&(n||e>=o.left&&e<=o.right)&&(s||i>=o.top&&i<=o.bottom)}H._set("global",{elements:{rectangle:{backgroundColor:mt,borderColor:mt,borderSkipped:"bottom",borderWidth:0}}});var wt=G.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,i=function(t){var e=bt(t),i=e.right-e.left,n=e.bottom-e.top,s=yt(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n},inner:{x:e.left+s.l,y:e.top+s.t,w:i-s.l-s.r,h:n-s.t-s.b}}}(e),n=i.outer,s=i.inner;t.fillStyle=e.backgroundColor,t.fillRect(n.x,n.y,n.w,n.h),n.w===s.w&&n.h===s.h||(t.save(),t.beginPath(),t.rect(n.x,n.y,n.w,n.h),t.clip(),t.fillStyle=e.borderColor,t.rect(s.x,s.y,s.w,s.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var i=this._view;return vt(i)?xt(i,t,null):xt(i,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,i=this._view;return vt(i)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return vt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),kt={},Ct=lt,Dt=ct,Mt=gt,St=wt;kt.Arc=Ct,kt.Line=Dt,kt.Point=Mt,kt.Rectangle=St;var Tt=U._deprecated,It=U.valueOrDefault;function Pt(t,e,i){var n,s,o=i.barThickness,a=e.stackCount,r=e.pixels[t],l=U.isNullOrUndef(o)?function(t,e){var i,n,s,o,a=t._length;for(s=1,o=e.length;s<o;++s)a=Math.min(a,Math.abs(e[s]-e[s-1]));for(s=0,o=t.getTicks().length;s<o;++s)n=t.getPixelForTick(s),a=s>0?Math.min(a,Math.abs(n-i)):a,i=n;return a}(e.scale,e.pixels):-1;return U.isNullOrUndef(o)?(n=l*i.categoryPercentage,s=i.barPercentage):(n=o*a,s=1),{chunk:n/a,ratio:s,start:r-n/2}}H._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),H._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var At=st.extend({dataElementType:kt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,i=this;st.prototype.initialize.apply(i,arguments),(t=i.getMeta()).stack=i.getDataset().stack,t.bar=!0,e=i._getIndexScale().options,Tt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Tt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Tt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Tt("bar chart",i._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Tt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this,s=n.getMeta(),o=n.getDataset(),a=n._resolveDataElementOptions(t,e);t._xScale=n.getScaleForId(s.xAxisID),t._yScale=n.getScaleForId(s.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderSkipped:a.borderSkipped,borderWidth:a.borderWidth,datasetLabel:o.label,label:n.chart.data.labels[e]},U.isArray(o.data[e])&&(t._model.borderSkipped=null),n._updateElementGeometry(t,e,i,a),t.pivot()},_updateElementGeometry:function(t,e,i,n){var s=this,o=t._model,a=s._getValueScale(),r=a.getBasePixel(),l=a.isHorizontal(),h=s._ruler||s.getRuler(),u=s.calculateBarValuePixels(s.index,e,n),c=s.calculateBarIndexPixels(s.index,e,h,n);o.horizontal=l,o.base=i?r:u.base,o.x=l?i?r:u.head:c.center,o.y=l?c.center:i?r:u.head,o.height=l?c.size:void 0,o.width=l?void 0:c.size},_getStacks:function(t){var e,i,n=this._getIndexScale(),s=n._getMatchingVisibleMetas(this._type),o=n.options.stacked,a=s.length,r=[];for(e=0;e<a&&(i=s[e],(!1===o||-1===r.indexOf(i.stack)||void 0===o&&void 0===i.stack)&&r.push(i.stack),i.index!==t);++e);return r},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i=this._getIndexScale(),n=[];for(t=0,e=this.getMeta().data.length;t<e;++t)n.push(i.getPixelForValue(null,t,this.index));return{pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this.getStackCount(),scale:i}},calculateBarValuePixels:function(t,e,i){var n,s,o,a,r,l,h,u=this.chart,c=this._getValueScale(),d=c.isHorizontal(),f=u.data.datasets,p=c._getMatchingVisibleMetas(this._type),g=c._parseValue(f[t].data[e]),m=i.minBarLength,v=c.options.stacked,b=this.getMeta().stack,_=void 0===g.start?0:g.max>=0&&g.min>=0?g.min:g.max,y=void 0===g.start?g.end:g.max>=0&&g.min>=0?g.max-g.min:g.min-g.max,x=p.length;if(v||void 0===v&&void 0!==b)for(n=0;n<x&&(s=p[n]).index!==t;++n)s.stack===b&&(o=void 0===(h=c._parseValue(f[s.index].data[e])).start?h.end:h.min>=0&&h.max>=0?h.max:h.min,(g.min<0&&o<0||g.max>=0&&o>0)&&(_+=o));return a=c.getPixelForValue(_),l=(r=c.getPixelForValue(_+y))-a,void 0!==m&&Math.abs(l)<m&&(l=m,r=y>=0&&!d||y<0&&d?a-m:a+m),{size:l,base:a,head:r,center:r+l/2}},calculateBarIndexPixels:function(t,e,i,n){var s="flex"===n.barThickness?function(t,e,i){var n,s=e.pixels,o=s[t],a=t>0?s[t-1]:null,r=t<s.length-1?s[t+1]:null,l=i.categoryPercentage;return null===a&&(a=o-(null===r?e.end-e.start:r-o)),null===r&&(r=o+o-a),n=o-(o-Math.min(a,r))/2*l,{chunk:Math.abs(r-a)/2*l/e.stackCount,ratio:i.barPercentage,start:n}}(e,i,n):Pt(e,i,n),o=this.getStackIndex(t,this.getMeta().stack),a=s.start+s.chunk*o+s.chunk/2,r=Math.min(It(n.maxBarThickness,1/0),s.chunk*s.ratio);return{base:a-r/2,head:a+r/2,center:a,size:r}},draw:function(){var t=this.chart,e=this._getValueScale(),i=this.getMeta().data,n=this.getDataset(),s=i.length,o=0;for(U.canvas.clipArea(t.ctx,t.chartArea);o<s;++o){var a=e._parseValue(n.data[o]);isNaN(a.min)||isNaN(a.max)||i[o].draw()}U.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=U.extend({},st.prototype._resolveDataElementOptions.apply(this,arguments)),e=this._getIndexScale().options,i=this._getValueScale().options;return t.barPercentage=It(e.barPercentage,t.barPercentage),t.barThickness=It(e.barThickness,t.barThickness),t.categoryPercentage=It(e.categoryPercentage,t.categoryPercentage),t.maxBarThickness=It(e.maxBarThickness,t.maxBarThickness),t.minBarLength=It(i.minBarLength,t.minBarLength),t}}),Ft=U.valueOrDefault,Ot=U.options.resolve;H._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}});var Et=st.extend({dataElementType:kt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,i=e.getMeta().data;U.each(i,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,s=n.getMeta(),o=t.custom||{},a=n.getScaleForId(s.xAxisID),r=n.getScaleForId(s.yAxisID),l=n._resolveDataElementOptions(t,e),h=n.getDataset().data[e],u=n.index,c=i?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof h?h:NaN,e,u),d=i?r.getBasePixel():r.getPixelForValue(h,e,u);t._xScale=a,t._yScale=r,t._options=l,t._datasetIndex=u,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:i?0:l.radius,skip:o.skip||isNaN(c)||isNaN(d),x:c,y:d},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options,n=U.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ft(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Ft(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Ft(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},_resolveDataElementOptions:function(t,e){var i=this,n=i.chart,s=i.getDataset(),o=t.custom||{},a=s.data[e]||{},r=st.prototype._resolveDataElementOptions.apply(i,arguments),l={chart:n,dataIndex:e,dataset:s,datasetIndex:i.index};return i._cachedDataOpts===r&&(r=U.extend({},r)),r.radius=Ot([o.radius,a.r,i._config.radius,n.options.elements.point.radius],l,e),r}}),Nt=U.valueOrDefault,zt=Math.PI,Lt=2*zt,Ht=zt/2;H._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,i,n,s=document.createElement("ul"),o=t.data,a=o.datasets,r=o.labels;if(s.setAttribute("class",t.id+"-legend"),a.length)for(e=0,i=a[0].data.length;e<i;++e)(n=s.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[e],r[e]&&n.appendChild(document.createTextNode(r[e]));return s.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var s=t.getDatasetMeta(0),o=s.controller.getStyle(n);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(e.datasets[0].data[n])||s.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,s,o=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i<n;++i)(s=a.getDatasetMeta(i)).data[o]&&(s.data[o].hidden=!s.data[o].hidden);a.update()}},cutoutPercentage:50,rotation:-Ht,circumference:Lt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return U.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}});var Rt=st.extend({dataElementType:kt.Arc,linkScales:U.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e,i,n,s,o=this,a=o.chart,r=a.chartArea,l=a.options,h=1,u=1,c=0,d=0,f=o.getMeta(),p=f.data,g=l.cutoutPercentage/100||0,m=l.circumference,v=o._getRingWeight(o.index);if(m<Lt){var b=l.rotation%Lt,_=(b+=b>=zt?-Lt:b<-zt?Lt:0)+m,y=Math.cos(b),x=Math.sin(b),w=Math.cos(_),k=Math.sin(_),C=b<=0&&_>=0||_>=Lt,D=b<=Ht&&_>=Ht||_>=Lt+Ht,M=b<=-Ht&&_>=-Ht||_>=zt+Ht,S=b===-zt||_>=zt?-1:Math.min(y,y*g,w,w*g),T=M?-1:Math.min(x,x*g,k,k*g),I=C?1:Math.max(y,y*g,w,w*g),P=D?1:Math.max(x,x*g,k,k*g);h=(I-S)/2,u=(P-T)/2,c=-(I+S)/2,d=-(P+T)/2}for(n=0,s=p.length;n<s;++n)p[n]._options=o._resolveDataElementOptions(p[n],n);for(a.borderWidth=o.getMaxBorderWidth(),e=(r.right-r.left-a.borderWidth)/h,i=(r.bottom-r.top-a.borderWidth)/u,a.outerRadius=Math.max(Math.min(e,i)/2,0),a.innerRadius=Math.max(a.outerRadius*g,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(o._getVisibleDatasetWeightTotal()||1),a.offsetX=c*a.outerRadius,a.offsetY=d*a.outerRadius,f.total=o.calculateTotal(),o.outerRadius=a.outerRadius-a.radiusLength*o._getRingWeightOffset(o.index),o.innerRadius=Math.max(o.outerRadius-a.radiusLength*v,0),n=0,s=p.length;n<s;++n)o.updateElement(p[n],n,t)},updateElement:function(t,e,i){var n=this,s=n.chart,o=s.chartArea,a=s.options,r=a.animation,l=(o.left+o.right)/2,h=(o.top+o.bottom)/2,u=a.rotation,c=a.rotation,d=n.getDataset(),f=i&&r.animateRotate?0:t.hidden?0:n.calculateCircumference(d.data[e])*(a.circumference/Lt),p=i&&r.animateScale?0:n.innerRadius,g=i&&r.animateScale?0:n.outerRadius,m=t._options||{};U.extend(t,{_datasetIndex:n.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+s.offsetX,y:h+s.offsetY,startAngle:u,endAngle:c,circumference:f,outerRadius:g,innerRadius:p,label:U.valueAtIndexOrDefault(d.label,e,s.data.labels[e])}});var v=t._model;i&&r.animateRotate||(v.startAngle=0===e?a.rotation:n.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return U.each(i.data,function(i,s){t=e.data[s],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Lt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,i,n,s,o,a,r,l,h=0,u=this.chart;if(!t)for(e=0,i=u.data.datasets.length;e<i;++e)if(u.isDatasetVisible(e)){t=(n=u.getDatasetMeta(e)).data,e!==this.index&&(o=n.controller);break}if(!t)return 0;for(e=0,i=t.length;e<i;++e)s=t[e],o?(o._configure(),a=o._resolveDataElementOptions(s,e)):a=s._options,"inner"!==a.borderAlign&&(r=a.borderWidth,h=(l=a.hoverBorderWidth)>(h=r>h?r:h)?l:h);return h},setHoverStyle:function(t){var e=t._model,i=t._options,n=U.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Nt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Nt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Nt(i.hoverBorderWidth,i.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e},_getRingWeight:function(t){return Math.max(Nt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});H._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),H._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Wt=At.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Bt=U.valueOrDefault,Vt=U.options.resolve,Ut=U.canvas._isPointInArea;function jt(t,e){var i=t&&t.options.ticks||{},n=i.reverse,s=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:s,end:n?s:o}}H._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Yt=st.extend({datasetElementType:kt.Line,dataElementType:kt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,i,n=this,s=n.getMeta(),o=s.dataset,a=s.data||[],r=n.chart.options,l=n._config,h=n._showLine=Bt(l.showLine,r.showLines);for(n._xScale=n.getScaleForId(s.xAxisID),n._yScale=n.getScaleForId(s.yAxisID),h&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=n._yScale,o._datasetIndex=n.index,o._children=a,o._model=n._resolveDatasetElementOptions(o),o.pivot()),e=0,i=a.length;e<i;++e)n.updateElement(a[e],e,t);for(h&&0!==o._model.tension&&n.updateBezierControlPoints(),e=0,i=a.length;e<i;++e)a[e].pivot()},updateElement:function(t,e,i){var n,s,o=this,a=o.getMeta(),r=t.custom||{},l=o.getDataset(),h=o.index,u=l.data[e],c=o._xScale,d=o._yScale,f=a.dataset._model,p=o._resolveDataElementOptions(t,e);n=c.getPixelForValue("object"==typeof u?u:NaN,e,h),s=i?d.getBasePixel():o.calculatePointY(u,e,h),t._xScale=c,t._yScale=d,t._options=p,t._datasetIndex=h,t._index=e,t._model={x:n,y:s,skip:r.skip||isNaN(n)||isNaN(s),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:Bt(r.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(t){var e,i,n,s,o,a,r,l,h,u,c,d=this,f=d._config,p=t.custom||{},g=d.chart.options,m=g.elements.line,v=st.prototype._resolveDatasetElementOptions.apply(d,arguments);return v.spanGaps=Bt(f.spanGaps,g.spanGaps),v.tension=Bt(f.lineTension,m.tension),v.steppedLine=Vt([p.steppedLine,f.steppedLine,m.stepped]),v.clip=(e=Bt(f.clip,(a=d._xScale,r=d._yScale,l=v.borderWidth,u=jt(a,h=l/2),{top:(c=jt(r,h)).end,right:u.end,bottom:c.start,left:u.start})),U.isObject(e)?(i=e.top,n=e.right,s=e.bottom,o=e.left):i=n=s=o=e,{top:i,right:n,bottom:s,left:o}),v},calculatePointY:function(t,e,i){var n,s,o,a,r,l,h,u=this.chart,c=this._yScale,d=0,f=0;if(c.options.stacked){for(r=+c.getRightValue(t),h=(l=u._getSortedVisibleDatasetMetas()).length,n=0;n<h&&(o=l[n]).index!==i;++n)s=u.data.datasets[o.index],"line"===o.type&&o.yAxisID===c.id&&((a=+c.getRightValue(s.data[e]))<0?f+=a||0:d+=a||0);return r<0?c.getPixelForValue(f+r):c.getPixelForValue(d+r)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,s=this.chart,o=this.getMeta(),a=o.dataset._model,r=s.chartArea,l=o.data||[];function h(t,e,i){return Math.max(Math.min(t,i),e)}if(a.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===a.cubicInterpolationMode)U.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)i=l[t]._model,n=U.splineCurve(U.previousItem(l,t)._model,i,U.nextItem(l,t)._model,a.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(s.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)i=l[t]._model,Ut(i,r)&&(t>0&&Ut(l[t-1]._model,r)&&(i.controlPointPreviousX=h(i.controlPointPreviousX,r.left,r.right),i.controlPointPreviousY=h(i.controlPointPreviousY,r.top,r.bottom)),t<l.length-1&&Ut(l[t+1]._model,r)&&(i.controlPointNextX=h(i.controlPointNextX,r.left,r.right),i.controlPointNextY=h(i.controlPointNextY,r.top,r.bottom)))},draw:function(){var t,e=this.chart,i=this.getMeta(),n=i.data||[],s=e.chartArea,o=e.canvas,a=0,r=n.length;for(this._showLine&&(t=i.dataset._model.clip,U.canvas.clipArea(e.ctx,{left:!1===t.left?0:s.left-t.left,right:!1===t.right?o.width:s.right+t.right,top:!1===t.top?0:s.top-t.top,bottom:!1===t.bottom?o.height:s.bottom+t.bottom}),i.dataset.draw(),U.canvas.unclipArea(e.ctx));a<r;++a)n[a].draw(s)},setHoverStyle:function(t){var e=t._model,i=t._options,n=U.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Bt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Bt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Bt(i.hoverBorderWidth,i.borderWidth),e.radius=Bt(i.hoverRadius,i.radius)}}),qt=U.options.resolve;H._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,i,n,s=document.createElement("ul"),o=t.data,a=o.datasets,r=o.labels;if(s.setAttribute("class",t.id+"-legend"),a.length)for(e=0,i=a[0].data.length;e<i;++e)(n=s.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[0].backgroundColor[e],r[e]&&n.appendChild(document.createTextNode(r[e]));return s.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var s=t.getDatasetMeta(0),o=s.controller.getStyle(n);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,hidden:isNaN(e.datasets[0].data[n])||s.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,s,o=e.index,a=this.chart;for(i=0,n=(a.data.datasets||[]).length;i<n;++i)(s=a.getDatasetMeta(i)).data[o].hidden=!s.data[o].hidden;a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var $t=st.extend({dataElementType:kt.Arc,linkScales:U.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,i,n,s=this,o=s.getDataset(),a=s.getMeta(),r=s.chart.options.startAngle||0,l=s._starts=[],h=s._angles=[],u=a.data;for(s._updateRadius(),a.count=s.countVisibleElements(),e=0,i=o.data.length;e<i;e++)l[e]=r,n=s._computeAngle(e),h[e]=n,r+=n;for(e=0,i=u.length;e<i;++e)u[e]._options=s._resolveDataElementOptions(u[e],e),s.updateElement(u[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,i=e.chartArea,n=e.options,s=Math.min(i.right-i.left,i.bottom-i.top);e.outerRadius=Math.max(s/2,0),e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,i){var n=this,s=n.chart,o=n.getDataset(),a=s.options,r=a.animation,l=s.scale,h=s.data.labels,u=l.xCenter,c=l.yCenter,d=a.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(o.data[e]),p=n._starts[e],g=p+(t.hidden?0:n._angles[e]),m=r.animateScale?0:l.getDistanceFromCenterForValue(o.data[e]),v=t._options||{};U.extend(t,{_datasetIndex:n.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:u,y:c,innerRadius:0,outerRadius:i?m:f,startAngle:i&&r.animateRotate?d:p,endAngle:i&&r.animateRotate?d:g,label:U.valueAtIndexOrDefault(h,e,h[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return U.each(e.data,function(e,n){isNaN(t.data[n])||e.hidden||i++}),i},setHoverStyle:function(t){var e=t._model,i=t._options,n=U.getHoverColor,s=U.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=s(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=s(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=s(i.hoverBorderWidth,i.borderWidth)},_computeAngle:function(t){var e=this,i=this.getMeta().count,n=e.getDataset(),s=e.getMeta();if(isNaN(n.data[t])||s.data[t].hidden)return 0;var o={chart:e.chart,dataIndex:t,dataset:n,datasetIndex:e.index};return qt([e.chart.options.elements.arc.angle,2*Math.PI/i],o,t)}});H._set("pie",U.clone(H.doughnut)),H._set("pie",{cutoutPercentage:0});var Kt=Rt,Xt=U.valueOrDefault;H._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Gt=st.extend({datasetElementType:kt.Line,dataElementType:kt.Point,linkScales:U.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,i,n=this,s=n.getMeta(),o=s.dataset,a=s.data||[],r=n.chart.scale,l=n._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=r,o._datasetIndex=n.index,o._children=a,o._loop=!0,o._model=n._resolveDatasetElementOptions(o),o.pivot(),e=0,i=a.length;e<i;++e)n.updateElement(a[e],e,t);for(n.updateBezierControlPoints(),e=0,i=a.length;e<i;++e)a[e].pivot()},updateElement:function(t,e,i){var n=this,s=t.custom||{},o=n.getDataset(),a=n.chart.scale,r=a.getPointPositionForValue(e,o.data[e]),l=n._resolveDataElementOptions(t,e),h=n.getMeta().dataset._model,u=i?a.xCenter:r.x,c=i?a.yCenter:r.y;t._scale=a,t._options=l,t._datasetIndex=n.index,t._index=e,t._model={x:u,y:c,skip:s.skip||isNaN(u)||isNaN(c),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Xt(s.tension,h?h.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this._config,e=this.chart.options,i=st.prototype._resolveDatasetElementOptions.apply(this,arguments);return i.spanGaps=Xt(t.spanGaps,e.spanGaps),i.tension=Xt(t.lineTension,e.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,i,n,s=this.getMeta(),o=this.chart.chartArea,a=s.data||[];function r(t,e,i){return Math.max(Math.min(t,i),e)}for(s.dataset._model.spanGaps&&(a=a.filter(function(t){return!t._model.skip})),t=0,e=a.length;t<e;++t)i=a[t]._model,n=U.splineCurve(U.previousItem(a,t,!0)._model,i,U.nextItem(a,t,!0)._model,i.tension),i.controlPointPreviousX=r(n.previous.x,o.left,o.right),i.controlPointPreviousY=r(n.previous.y,o.top,o.bottom),i.controlPointNextX=r(n.next.x,o.left,o.right),i.controlPointNextY=r(n.next.y,o.top,o.bottom)},setHoverStyle:function(t){var e=t._model,i=t._options,n=U.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Xt(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=Xt(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=Xt(i.hoverBorderWidth,i.borderWidth),e.radius=Xt(i.hoverRadius,i.radius)}});H._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),H._set("global",{datasets:{scatter:{showLine:!1}}});var Qt={bar:At,bubble:Et,doughnut:Rt,horizontalBar:Wt,line:Yt,polarArea:$t,pie:Kt,radar:Gt,scatter:Yt};function Zt(t,e){return t.native?{x:t.x,y:t.y}:U.getRelativePosition(t,e)}function Jt(t,e){var i,n,s,o,a,r,l=t._getSortedVisibleDatasetMetas();for(n=0,o=l.length;n<o;++n)for(s=0,a=(i=l[n].data).length;s<a;++s)(r=i[s])._view.skip||e(r)}function te(t,e){var i=[];return Jt(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function ee(t,e,i,n){var s=Number.POSITIVE_INFINITY,o=[];return Jt(t,function(t){if(!i||t.inRange(e.x,e.y)){var a=t.getCenterPoint(),r=n(e,a);r<s?(o=[t],s=r):r===s&&o.push(t)}}),o}function ie(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var s=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function ne(t,e,i){var n=Zt(e,t);i.axis=i.axis||"x";var s=ie(i.axis),o=i.intersect?te(t,n):ee(t,n,!1,s),a=[];return o.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[o[0]._index];e&&!e._view.skip&&a.push(e)}),a):[]}var se={modes:{single:function(t,e){var i=Zt(e,t),n=[];return Jt(t,function(t){if(t.inRange(i.x,i.y))return n.push(t),n}),n.slice(0,1)},label:ne,index:ne,dataset:function(t,e,i){var n=Zt(e,t);i.axis=i.axis||"xy";var s=ie(i.axis),o=i.intersect?te(t,n):ee(t,n,!1,s);return o.length>0&&(o=t.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(t,e){return ne(t,e,{intersect:!1})},point:function(t,e){return te(t,Zt(e,t))},nearest:function(t,e,i){var n=Zt(e,t);i.axis=i.axis||"xy";var s=ie(i.axis);return ee(t,n,i.intersect,s)},x:function(t,e,i){var n=Zt(e,t),s=[],o=!1;return Jt(t,function(t){t.inXRange(n.x)&&s.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(s=[]),s},y:function(t,e,i){var n=Zt(e,t),s=[],o=!1;return Jt(t,function(t){t.inYRange(n.y)&&s.push(t),t.inRange(n.x,n.y)&&(o=!0)}),i.intersect&&!o&&(s=[]),s}}},oe=U.extend;function ae(t,e){return U.where(t,function(t){return t.pos===e})}function re(t,e){return t.sort(function(t,i){var n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight})}function le(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function he(t,e,i){var n,s,o=i.box,a=t.maxPadding;if(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?o.height:o.width,t[i.pos]+=i.size,o.getPadding){var r=o.getPadding();a.top=Math.max(a.top,r.top),a.left=Math.max(a.left,r.left),a.bottom=Math.max(a.bottom,r.bottom),a.right=Math.max(a.right,r.right)}if(n=e.outerWidth-le(a,t,"left","right"),s=e.outerHeight-le(a,t,"top","bottom"),n!==t.w||s!==t.h){t.w=n,t.h=s;var l=i.horizontal?[n,t.w]:[s,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function ue(t,e){var i=e.maxPadding;function n(t){var n={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){n[t]=Math.max(e[t],i[t])}),n}return n(t?["left","right"]:["top","bottom"])}function ce(t,e,i){var n,s,o,a,r,l,h=[];for(n=0,s=t.length;n<s;++n)(a=(o=t[n]).box).update(o.width||e.w,o.height||e.h,ue(o.horizontal,e)),he(e,i,o)&&(l=!0,h.length&&(r=!0)),a.fullWidth||h.push(o);return r&&ce(h,e,i)||l}function de(t,e,i){var n,s,o,a,r=i.padding,l=e.x,h=e.y;for(n=0,s=t.length;n<s;++n)a=(o=t[n]).box,o.horizontal?(a.left=a.fullWidth?r.left:e.left,a.right=a.fullWidth?i.outerWidth-r.right:e.left+e.w,a.top=h,a.bottom=h+a.height,a.width=a.right-a.left,h=a.bottom):(a.left=l,a.right=l+a.width,a.top=e.top,a.bottom=e.top+e.h,a.height=a.bottom-a.top,l=a.right);e.x=l,e.y=h}H._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var fe,pe={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,s=["fullWidth","position","weight"],o=s.length,a=0;a<o;++a)n=s[a],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,e,i){if(t){var n=t.options.layout||{},s=U.options.toPadding(n.padding),o=e-s.width,a=i-s.height,r=function(t){var e=function(t){var e,i,n,s=[];for(e=0,i=(t||[]).length;e<i;++e)n=t[e],s.push({index:e,box:n,pos:n.position,horizontal:n.isHorizontal(),weight:n.weight});return s}(t),i=re(ae(e,"left"),!0),n=re(ae(e,"right")),s=re(ae(e,"top"),!0),o=re(ae(e,"bottom"));return{leftAndTop:i.concat(s),rightAndBottom:n.concat(o),chartArea:ae(e,"chartArea"),vertical:i.concat(n),horizontal:s.concat(o)}}(t.boxes),l=r.vertical,h=r.horizontal,u=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:o,vBoxMaxWidth:o/2/l.length,hBoxMaxHeight:a/2}),c=oe({maxPadding:oe({},s),w:o,h:a,x:s.left,y:s.top},s);!function(t,e){var i,n,s;for(i=0,n=t.length;i<n;++i)(s=t[i]).width=s.horizontal?s.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,s.height=s.horizontal&&e.hBoxMaxHeight}(l.concat(h),u),ce(l,c,u),ce(h,c,u)&&ce(l,c,u),function(t){var e=t.maxPadding;function i(i){var n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(c),de(r.leftAndTop,c,u),c.x+=c.w,c.y+=c.h,de(r.rightAndBottom,c,u),t.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h},U.each(r.chartArea,function(e){var i=e.box;oe(i,t.chartArea),i.update(c.w,c.h)})}}},ge=(fe=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&fe.default||fe,me="$chartjs",ve="chartjs-size-monitor",be="chartjs-render-monitor",_e="chartjs-render-animation",ye=["animationstart","webkitAnimationStart"],xe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function we(t,e){var i=U.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var ke=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Ce(t,e,i){t.addEventListener(e,i,ke)}function De(t,e,i){t.removeEventListener(e,i,ke)}function Me(t,e,i,n,s){return{type:t,chart:e,native:s||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function Se(t){var e=document.createElement("div");return e.className=t||"",e}function Te(t,e,i){var n,s,o,a,r=t[me]||(t[me]={}),l=r.resizer=function(t){var e=Se(ve),i=Se(ve+"-expand"),n=Se(ve+"-shrink");i.appendChild(Se()),n.appendChild(Se()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};var s=function(){e._reset(),t()};return Ce(i,"scroll",s.bind(i,"expand")),Ce(n,"scroll",s.bind(n,"shrink")),e}((n=function(){if(r.resizer){var n=i.options.maintainAspectRatio&&t.parentNode,s=n?n.clientWidth:0;e(Me("resize",i)),n&&n.clientWidth<s&&i.canvas&&e(Me("resize",i))}},o=!1,a=[],function(){a=Array.prototype.slice.call(arguments),s=s||this,o||(o=!0,U.requestAnimFrame.call(window,function(){o=!1,n.apply(s,a)}))}));!function(t,e){var i=t[me]||(t[me]={}),n=i.renderProxy=function(t){t.animationName===_e&&e()};U.each(ye,function(e){Ce(t,e,n)}),i.reflow=!!t.offsetParent,t.classList.add(be)}(t,function(){if(r.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}})}function Ie(t){var e=t[me]||{},i=e.resizer;delete e.resizer,function(t){var e=t[me]||{},i=e.renderProxy;i&&(U.each(ye,function(e){De(t,e,i)}),delete e.renderProxy),t.classList.remove(be)}(t),i&&i.parentNode&&i.parentNode.removeChild(i)}var Pe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var i=t[me]||(t[me]={});if(!i.containsStyles){i.containsStyles=!0,e="/* Chart.js */\n"+e;var n=document.createElement("style");n.setAttribute("type","text/css"),n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(e.host?e:document.head,ge)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(this._ensureLoaded(t),function(t,e){var i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t[me]={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===s||""===s){var o=we(t,"width");void 0!==o&&(t.width=o)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var a=we(t,"height");void 0!==o&&(t.height=a)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[me]){var i=e[me].initial;["height","width"].forEach(function(t){var n=i[t];U.isNullOrUndef(n)?e.removeAttribute(t):e.setAttribute(t,n)}),U.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e[me]}},addEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var s=i[me]||(i[me]={});Ce(n,e,(s.proxies||(s.proxies={}))[t.id+"_"+e]=function(e){i(function(t,e){var i=xe[t.type]||t.type,n=U.getRelativePosition(t,e);return Me(i,e,n.x,n.y,t)}(e,t))})}else Te(n,i,t)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var s=((i[me]||{}).proxies||{})[t.id+"_"+e];s&&De(n,e,s)}else Ie(n)}};U.addEvent=Ce,U.removeEvent=De;var Ae=Pe._enabled?Pe:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Fe=U.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ae);H._set("global",{plugins:{}});var Oe={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,s,o,a,r,l=this.descriptors(t),h=l.length;for(n=0;n<h;++n)if("function"==typeof(r=(o=(s=l[n]).plugin)[e])&&((a=[t].concat(i||[])).push(s.options),!1===r.apply(o,a)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],n=[],s=t&&t.config||{},o=s.options&&s.options.plugins||{};return this._plugins.concat(s.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,s=o[e];!1!==s&&(!0===s&&(s=U.clone(H.global.plugins[e])),i.push(t),n.push({plugin:t,options:s||{}}))}}),e.descriptors=n,e.id=this._cacheId,n},_invalidate:function(t){delete t.$plugins}},Ee={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=U.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?U.merge(Object.create(null),[H.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=U.extend(this.defaults[t],e))},addScalesToLayout:function(t){U.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,pe.addBox(t,e)})}},Ne=U.valueOrDefault,ze=U.rtl.getRtlAdapter;H._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:U.noop,title:function(t,e){var i="",n=e.labels,s=n?n.length:0;if(t.length>0){var o=t[0];o.label?i=o.label:o.xLabel?i=o.xLabel:s>0&&o.index<s&&(i=n[o.index])}return i},afterTitle:U.noop,beforeBody:U.noop,beforeLabel:U.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),U.isNullOrUndef(t.value)?i+=t.yLabel:i+=t.value,i},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:U.noop,afterBody:U.noop,beforeFooter:U.noop,footer:U.noop,afterFooter:U.noop}}});var Le={average:function(t){if(!t.length)return!1;var e,i,n=0,s=0,o=0;for(e=0,i=t.length;e<i;++e){var a=t[e];if(a&&a.hasValue()){var r=a.tooltipPosition();n+=r.x,s+=r.y,++o}}return{x:n/o,y:s/o}},nearest:function(t,e){var i,n,s,o=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var l=t[i];if(l&&l.hasValue()){var h=l.getCenterPoint(),u=U.distanceBetweenPoints(e,h);u<r&&(r=u,s=l)}}if(s){var c=s.tooltipPosition();o=c.x,a=c.y}return{x:o,y:a}}};function He(t,e){return e&&(U.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Re(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function We(t){var e=H.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Ne(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Ne(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Ne(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Ne(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Ne(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Ne(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Ne(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Ne(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Ne(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Be(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ve(t){return He([],Re(t))}var Ue=G.extend({initialize:function(){this._model=We(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),i=t.title.apply(this,arguments),n=t.afterTitle.apply(this,arguments),s=[];return s=He(s,Re(e)),s=He(s,Re(i)),s=He(s,Re(n))},getBeforeBody:function(){return Ve(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var i=this,n=i._options.callbacks,s=[];return U.each(t,function(t){var o={before:[],lines:[],after:[]};He(o.before,Re(n.beforeLabel.call(i,t,e))),He(o.lines,n.label.call(i,t,e)),He(o.after,Re(n.afterLabel.call(i,t,e))),s.push(o)}),s},getAfterBody:function(){return Ve(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),i=t.footer.apply(this,arguments),n=t.afterFooter.apply(this,arguments),s=[];return s=He(s,Re(e)),s=He(s,Re(i)),s=He(s,Re(n))},update:function(t){var e,i,n,s,o,a,r,l,h,u,c=this,d=c._options,f=c._model,p=c._model=We(d),g=c._active,m=c._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},_={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(g.length){p.opacity=1;var x=[],w=[];y=Le[d.position].call(c,g,c._eventPosition);var k=[];for(e=0,i=g.length;e<i;++e)k.push((n=g[e],s=void 0,o=void 0,a=void 0,r=void 0,l=void 0,h=void 0,u=void 0,s=n._xScale,o=n._yScale||n._scale,a=n._index,r=n._datasetIndex,l=n._chart.getDatasetMeta(r).controller,h=l._getIndexScale(),u=l._getValueScale(),{xLabel:s?s.getLabelForIndex(a,r):"",yLabel:o?o.getLabelForIndex(a,r):"",label:h?""+h.getLabelForIndex(a,r):"",value:u?""+u.getLabelForIndex(a,r):"",index:a,datasetIndex:r,x:n._model.x,y:n._model.y}));d.filter&&(k=k.filter(function(t){return d.filter(t,m)})),d.itemSort&&(k=k.sort(function(t,e){return d.itemSort(t,e,m)})),U.each(k,function(t){x.push(d.callbacks.labelColor.call(c,t,c._chart)),w.push(d.callbacks.labelTextColor.call(c,t,c._chart))}),p.title=c.getTitle(k,m),p.beforeBody=c.getBeforeBody(k,m),p.body=c.getBody(k,m),p.afterBody=c.getAfterBody(k,m),p.footer=c.getFooter(k,m),p.x=y.x,p.y=y.y,p.caretPadding=d.caretPadding,p.labelColors=x,p.labelTextColors=w,p.dataPoints=k,_=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,s=0,o=e.body,a=o.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=e.beforeBody.length+e.afterBody.length;var r=e.title.length,l=e.footer.length,h=e.titleFontSize,u=e.bodyFontSize,c=e.footerFontSize;n+=r*h,n+=r?(r-1)*e.titleSpacing:0,n+=r?e.titleMarginBottom:0,n+=a*u,n+=a?(a-1)*e.bodySpacing:0,n+=l?e.footerMarginTop:0,n+=l*c,n+=l?(l-1)*e.footerSpacing:0;var d=0,f=function(t){s=Math.max(s,i.measureText(t).width+d)};return i.font=U.fontString(h,e._titleFontStyle,e._titleFontFamily),U.each(e.title,f),i.font=U.fontString(u,e._bodyFontStyle,e._bodyFontFamily),U.each(e.beforeBody.concat(e.afterBody),f),d=e.displayColors?u+2:0,U.each(o,function(t){U.each(t.before,f),U.each(t.lines,f),U.each(t.after,f)}),d=0,i.font=U.fontString(c,e._footerFontStyle,e._footerFontFamily),U.each(e.footer,f),{width:s+=2*e.xPadding,height:n}}(this,p),b=function(t,e,i,n){var s=t.x,o=t.y,a=t.caretSize,r=t.caretPadding,l=t.cornerRadius,h=i.xAlign,u=i.yAlign,c=a+r,d=l+r;return"right"===h?s-=e.width:"center"===h&&((s-=e.width/2)+e.width>n.width&&(s=n.width-e.width),s<0&&(s=0)),"top"===u?o+=c:o-="bottom"===u?e.height+c:e.height/2,"center"===u?"left"===h?s+=c:"right"===h&&(s-=c):"left"===h?s-=d:"right"===h&&(s+=d),{x:s,y:o}}(p,_,v=function(t,e){var i,n,s,o,a,r=t._model,l=t._chart,h=t._chart.chartArea,u="center",c="center";r.y<e.height?c="top":r.y>l.height-e.height&&(c="bottom");var d=(h.left+h.right)/2,f=(h.top+h.bottom)/2;"center"===c?(i=function(t){return t<=d},n=function(t){return t>d}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),s=function(t){return t+e.width+r.caretSize+r.caretPadding>l.width},o=function(t){return t-e.width-r.caretSize-r.caretPadding<0},a=function(t){return t<=f?"top":"bottom"},i(r.x)?(u="left",s(r.x)&&(u="center",c=a(r.y))):n(r.x)&&(u="right",o(r.x)&&(u="center",c=a(r.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:c}}(this,_),c._chart)}else p.opacity=0;return p.xAlign=v.xAlign,p.yAlign=v.yAlign,p.x=b.x,p.y=b.y,p.width=_.width,p.height=_.height,p.caretX=y.x,p.caretY=y.y,c._model=p,t&&d.custom&&d.custom.call(c,p),c},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,s=this.getCaretPosition(t,e,n);i.lineTo(s.x1,s.y1),i.lineTo(s.x2,s.y2),i.lineTo(s.x3,s.y3)},getCaretPosition:function(t,e,i){var n,s,o,a,r,l,h=i.caretSize,u=i.cornerRadius,c=i.xAlign,d=i.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===d)r=p+m/2,"left"===c?(s=(n=f)-h,o=n,a=r+h,l=r-h):(s=(n=f+g)+h,o=n,a=r-h,l=r+h);else if("left"===c?(n=(s=f+u+h)-h,o=s+h):"right"===c?(n=(s=f+g-u-h)-h,o=s+h):(n=(s=i.caretX)-h,o=s+h),"top"===d)r=(a=p)-h,l=a;else{r=(a=p+m)+h,l=a;var v=o;o=n,n=v}return{x1:n,x2:s,x3:o,y1:a,y2:r,y3:l}},drawTitle:function(t,e,i){var n,s,o,a=e.title,r=a.length;if(r){var l=ze(e.rtl,e.x,e.width);for(t.x=Be(e,e._titleAlign),i.textAlign=l.textAlign(e._titleAlign),i.textBaseline="middle",n=e.titleFontSize,s=e.titleSpacing,i.fillStyle=e.titleFontColor,i.font=U.fontString(n,e._titleFontStyle,e._titleFontFamily),o=0;o<r;++o)i.fillText(a[o],l.x(t.x),t.y+n/2),t.y+=n+s,o+1===r&&(t.y+=e.titleMarginBottom-s)}},drawBody:function(t,e,i){var n,s,o,a,r,l,h,u,c=e.bodyFontSize,d=e.bodySpacing,f=e._bodyAlign,p=e.body,g=e.displayColors,m=0,v=g?Be(e,"left"):0,b=ze(e.rtl,e.x,e.width),_=function(e){i.fillText(e,b.x(t.x+m),t.y+c/2),t.y+=c+d},y=b.textAlign(f);for(i.textAlign=f,i.textBaseline="middle",i.font=U.fontString(c,e._bodyFontStyle,e._bodyFontFamily),t.x=Be(e,y),i.fillStyle=e.bodyFontColor,U.each(e.beforeBody,_),m=g&&"right"!==y?"center"===f?c/2+1:c+2:0,r=0,h=p.length;r<h;++r){for(n=p[r],s=e.labelTextColors[r],o=e.labelColors[r],i.fillStyle=s,U.each(n.before,_),l=0,u=(a=n.lines).length;l<u;++l){if(g){var x=b.x(v);i.fillStyle=e.legendColorBackground,i.fillRect(b.leftForLtr(x,c),t.y,c,c),i.lineWidth=1,i.strokeStyle=o.borderColor,i.strokeRect(b.leftForLtr(x,c),t.y,c,c),i.fillStyle=o.backgroundColor,i.fillRect(b.leftForLtr(b.xPlus(x,1),c-2),t.y+1,c-2,c-2),i.fillStyle=s}_(a[l])}U.each(n.after,_)}m=0,U.each(e.afterBody,_),t.y-=d},drawFooter:function(t,e,i){var n,s,o=e.footer,a=o.length;if(a){var r=ze(e.rtl,e.x,e.width);for(t.x=Be(e,e._footerAlign),t.y+=e.footerMarginTop,i.textAlign=r.textAlign(e._footerAlign),i.textBaseline="middle",n=e.footerFontSize,i.fillStyle=e.footerFontColor,i.font=U.fontString(n,e._footerFontStyle,e._footerFontFamily),s=0;s<a;++s)i.fillText(o[s],r.x(t.x),t.y+n/2),t.y+=n+e.footerSpacing}},drawBackground:function(t,e,i,n){i.fillStyle=e.backgroundColor,i.strokeStyle=e.borderColor,i.lineWidth=e.borderWidth;var s=e.xAlign,o=e.yAlign,a=t.x,r=t.y,l=n.width,h=n.height,u=e.cornerRadius;i.beginPath(),i.moveTo(a+u,r),"top"===o&&this.drawCaret(t,n),i.lineTo(a+l-u,r),i.quadraticCurveTo(a+l,r,a+l,r+u),"center"===o&&"right"===s&&this.drawCaret(t,n),i.lineTo(a+l,r+h-u),i.quadraticCurveTo(a+l,r+h,a+l-u,r+h),"bottom"===o&&this.drawCaret(t,n),i.lineTo(a+u,r+h),i.quadraticCurveTo(a,r+h,a,r+h-u),"center"===o&&"left"===s&&this.drawCaret(t,n),i.lineTo(a,r+u),i.quadraticCurveTo(a,r,a+u,r),i.closePath(),i.fill(),e.borderWidth>0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},s=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(t.save(),t.globalAlpha=s,this.drawBackground(n,e,t,i),n.y+=e.yPadding,U.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(n,e,t),this.drawBody(n,e,t),this.drawFooter(n,e,t),U.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:(i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&i._active.reverse()),(e=!U.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}}),je=Le,Ye=Ue;Ye.positioners=je;var qe=U.valueOrDefault;function $e(){return U.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var s,o,a,r=i[t].length;for(e[t]||(e[t]=[]),s=0;s<r;++s)a=i[t][s],o=qe(a.type,"xAxes"===t?"category":"linear"),s>=e[t].length&&e[t].push({}),!e[t][s].type||a.type&&a.type!==e[t][s].type?U.merge(e[t][s],[Ee.getScaleDefaults(o),a]):U.merge(e[t][s],a)}else U._merger(t,e,i,n)}})}function Ke(){return U.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,i,n){var s=e[t]||Object.create(null),o=i[t];"scales"===t?e[t]=$e(s,o):"scale"===t?e[t]=U.merge(s,[Ee.getScaleDefaults(o.type),o]):U._merger(t,e,i,n)}})}function Xe(t,e,i){var n,s=function(t){return t.id===n};do{n=e+i++}while(U.findIndex(t,s)>=0);return n}function Ge(t){return"top"===t||"bottom"===t}function Qe(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}H._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Ze=function(t,e){return this.construct(t,e),this};U.extend(Ze.prototype,{construct:function(t,e){var i=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Ke(H.global,H[t.type],t.options||{}),t}(e);var n=Fe.acquireContext(t,e),s=n&&n.canvas,o=s&&s.height,a=s&&s.width;i.id=U.uid(),i.ctx=n,i.canvas=s,i.config=e,i.width=a,i.height=o,i.aspectRatio=o?a/o:null,i.options=e.options,i._bufferedRender=!1,i._layers=[],i.chart=i,i.controller=i,Ze.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(t){i.config.data=t}}),n&&s?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Oe.notify(t,"beforeInit"),U.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Oe.notify(t,"afterInit"),t},clear:function(){return U.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,s=i.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(U.getMaximumWidth(n))),a=Math.max(0,Math.floor(s?o/s:U.getMaximumHeight(n)));if((e.width!==o||e.height!==a)&&(n.width=e.width=o,n.height=e.height=a,n.style.width=o+"px",n.style.height=a+"px",U.retinaScale(e,i.devicePixelRatio),!t)){var r={width:o,height:a};Oe.notify(e,"resize",[r]),i.onResize&&i.onResize(e,r),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;U.each(e.xAxes,function(t,i){t.id||(t.id=Xe(e.xAxes,"x-axis-",i))}),U.each(e.yAxes,function(t,i){t.id||(t.id=Xe(e.yAxes,"y-axis-",i))}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,i=t.scales||{},n=[],s=Object.keys(i).reduce(function(t,e){return t[e]=!1,t},{});e.scales&&(n=n.concat((e.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),e.scale&&n.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),U.each(n,function(e){var n=e.options,o=n.id,a=qe(n.type,e.dtype);Ge(n.position)!==Ge(e.dposition)&&(n.position=e.dposition),s[o]=!0;var r=null;if(o in i&&i[o].type===a)(r=i[o]).options=n,r.ctx=t.ctx,r.chart=t;else{var l=Ee.getScaleConstructor(a);if(!l)return;r=new l({id:o,type:a,options:n,ctx:t.ctx,chart:t}),i[r.id]=r}r.mergeTicksOptions(),e.isDefault&&(t.scale=r)}),U.each(s,function(t,e){t||delete i[e]}),t.scales=i,Ee.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,i=this,n=[],s=i.data.datasets;for(t=0,e=s.length;t<e;t++){var o=s[t],a=i.getDatasetMeta(t),r=o.type||i.config.type;if(a.type&&a.type!==r&&(i.destroyDatasetMeta(t),a=i.getDatasetMeta(t)),a.type=r,a.order=o.order||0,a.index=t,a.controller)a.controller.updateIndex(t),a.controller.linkScales();else{var l=Qt[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(i,t),n.push(a.controller)}}return n},resetElements:function(){var t=this;U.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n,s,o=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),s=(n=o).options,U.each(n.scales,function(t){pe.removeBox(n,t)}),s=Ke(H.global,H[n.config.type],s),n.options=n.config.options=s,n.ensureScalesHaveIDs(),n.buildOrUpdateScales(),n.tooltip._options=s.tooltips,n.tooltip.initialize(),Oe._invalidate(o),!1!==Oe.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var a=o.buildOrUpdateControllers();for(e=0,i=o.data.datasets.length;e<i;e++)o.getDatasetMeta(e).controller.buildOrUpdateElements();o.updateLayout(),o.options.animation&&o.options.animation.duration&&U.each(a,function(t){t.reset()}),o.updateDatasets(),o.tooltip.initialize(),o.lastActive=[],Oe.notify(o,"afterUpdate"),o._layers.sort(Qe("z","_idx")),o._bufferedRender?o._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:o.render(t)}},updateLayout:function(){var t=this;!1!==Oe.notify(t,"beforeLayout")&&(pe.update(this,this.width,this.height),t._layers=[],U.each(t.boxes,function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())},t),t._layers.forEach(function(t,e){t._idx=e}),Oe.notify(t,"afterScaleUpdate"),Oe.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Oe.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Oe.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==Oe.notify(this,"beforeDatasetUpdate",[i])&&(e.controller._update(),Oe.notify(this,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var i=e.options.animation,n=qe(t.duration,i&&i.duration),s=t.lazy;if(!1!==Oe.notify(e,"beforeRender")){var o=function(t){Oe.notify(e,"afterRender"),U.callback(i&&i.onComplete,[t],e)};if(i&&n){var a=new Z({numSteps:n/16.66,easing:t.easing||i.easing,render:function(t,e){var i=U.easing.effects[e.easing],n=e.currentStep,s=n/e.numSteps;t.draw(i(s),s,n)},onAnimationProgress:i.onProgress,onAnimationComplete:o});J.addAnimation(e,a,n,s)}else e.draw(),o(new Z({numSteps:0,chart:e}));return e}},draw:function(t){var e,i,n=this;if(n.clear(),U.isNullOrUndef(t)&&(t=1),n.transition(t),!(n.width<=0||n.height<=0)&&!1!==Oe.notify(n,"beforeDraw",[t])){for(i=n._layers,e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(n.chartArea);for(n.drawDatasets(t);e<i.length;++e)i[e].draw(n.chartArea);n._drawTooltip(t),Oe.notify(n,"afterDraw",[t])}},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,i,n=[];for(e=0,i=(this.data.datasets||[]).length;e<i;++e)t&&!this.isDatasetVisible(e)||n.push(this.getDatasetMeta(e));return n.sort(Qe("order","index")),n},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,i;if(!1!==Oe.notify(this,"beforeDatasetsDraw",[t])){for(i=(e=this._getSortedVisibleDatasetMetas()).length-1;i>=0;--i)this.drawDataset(e[i],t);Oe.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i={meta:t,index:t.index,easingValue:e};!1!==Oe.notify(this,"beforeDatasetDraw",[i])&&(t.controller.draw(e),Oe.notify(this,"afterDatasetDraw",[i]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==Oe.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),Oe.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return se.modes.single(this,t)},getElementsAtEvent:function(t){return se.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return se.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=se.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return se.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var t,e,i=this,n=i.canvas;for(i.stop(),t=0,e=i.data.datasets.length;t<e;++t)i.destroyDatasetMeta(t);n&&(i.unbindEvents(),U.canvas.clear(i),Fe.releaseContext(i.ctx),i.canvas=null,i.ctx=null),Oe.notify(i,"destroy"),delete Ze.instances[i.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ye({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};U.each(t.options.events,function(n){Fe.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},Fe.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,U.each(e,function(e,i){Fe.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,s,o,a=i?"set":"remove";for(s=0,o=t.length;s<o;++s)(n=t[s])&&this.getDatasetMeta(n._datasetIndex).controller[a+"HoverStyle"](n);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+a+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==Oe.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),Oe.notify(e,"afterEvent",[t]);var s=e._bufferedRequest;return s?e.render(s):n&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,i=this,n=i.options||{},s=n.hover;return i.lastActive=i.lastActive||[],"mouseout"===t.type?i.active=[]:i.active=i.getElementsAtEventForMode(t,s.mode,s),U.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,s.mode,!1),i.active.length&&s.mode&&i.updateHoverStyle(i.active,s.mode,!0),e=!U.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),Ze.instances={};var Je=Ze;Ze.Controller=Ze,Ze.types={},U.configMerge=Ke,U.scaleMerge=$e;function ti(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function ei(t){this.options=t||{}}U.extend(ei.prototype,{formats:ti,parse:ti,format:ti,add:ti,diff:ti,startOf:ti,endOf:ti,_create:function(t){return t}}),ei.override=function(t){U.extend(ei.prototype,t)};var ii={_date:ei},ni={formatters:{values:function(t){return U.isArray(t)?t:""+t},linear:function(t,e,i){var n=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(n)>1&&t!==Math.floor(t)&&(n=t-Math.floor(t));var s=U.log10(Math.abs(n)),o="";if(0!==t)if(Math.max(Math.abs(i[0]),Math.abs(i[i.length-1]))<1e-4){var a=U.log10(Math.abs(t)),r=Math.floor(a)-Math.floor(s);r=Math.max(Math.min(r,20),0),o=t.toExponential(r)}else{var l=-1*Math.floor(s);l=Math.max(Math.min(l,20),0),o=t.toFixed(l)}else o="0";return o},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(U.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}},si=U.isArray,oi=U.isNullOrUndef,ai=U.valueOrDefault,ri=U.valueAtIndexOrDefault;function li(t,e,i){var n,s=t.getTicks().length,o=Math.min(e,s-1),a=t.getPixelForTick(o),r=t._startPixel,l=t._endPixel;if(!(i&&(n=1===s?Math.max(a-r,l-a):0===e?(t.getPixelForTick(1)-a)/2:(a-t.getPixelForTick(o-1))/2,(a+=o<e?n:-n)<r-1e-6||a>l+1e-6)))return a}function hi(t,e,i,n){var s,o,a,r,l,h,u,c,d,f,p,g,m,v=i.length,b=[],_=[],y=[],x=0,w=0;for(s=0;s<v;++s){if(r=i[s].label,l=i[s].major?e.major:e.minor,t.font=h=l.string,u=n[h]=n[h]||{data:{},gc:[]},c=l.lineHeight,d=f=0,oi(r)||si(r)){if(si(r))for(o=0,a=r.length;o<a;++o)p=r[o],oi(p)||si(p)||(d=U.measureText(t,u.data,u.gc,d,p),f+=c)}else d=U.measureText(t,u.data,u.gc,d,r),f=c;b.push(d),_.push(f),y.push(c/2),x=Math.max(d,x),w=Math.max(f,w)}function k(t){return{width:b[t]||0,height:_[t]||0,offset:y[t]||0}}return function(t,e){U.each(t,function(t){var i,n=t.gc,s=n.length/2;if(s>e){for(i=0;i<s;++i)delete t.data[n[i]];n.splice(0,s)}})}(n,v),g=b.indexOf(x),m=_.indexOf(w),{first:k(0),last:k(v-1),widest:k(g),highest:k(m)}}function ui(t){return t.drawTicks?t.tickMarkLength:0}function ci(t){var e,i;return t.display?(e=U.options._parseFont(t),i=U.options.toPadding(t.padding),e.lineHeight+i.height):0}function di(t,e){return U.extend(U.options._parseFont({fontFamily:ai(e.fontFamily,t.fontFamily),fontSize:ai(e.fontSize,t.fontSize),fontStyle:ai(e.fontStyle,t.fontStyle),lineHeight:ai(e.lineHeight,t.lineHeight)}),{color:U.options.resolve([e.fontColor,t.fontColor,H.global.defaultFontColor])})}function fi(t){var e=di(t,t.minor);return{minor:e,major:t.major.enabled?di(t,t.major):e}}function pi(t){var e,i,n,s=[];for(i=0,n=t.length;i<n;++i)void 0!==(e=t[i])._index&&s.push(e);return s}function gi(t,e,i,n){var s,o,a,r,l=ai(i,0),h=Math.min(ai(n,t.length),t.length),u=0;for(e=Math.ceil(e),n&&(e=(s=n-i)/Math.floor(s/e)),r=l;r<0;)u++,r=Math.round(l+u*e);for(o=Math.max(l,0);o<h;o++)a=t[o],o===r?(a._index=o,u++,r=Math.round(l+u*e)):delete a.label}H._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:ni.formatters.values,minor:{},major:{}}});var mi=G.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){U.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,s,o,a,r,l=this,h=l.options.ticks,u=h.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=U.extend({left:0,right:0,top:0,bottom:0},i),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),a=l.buildTicks()||[],(!(a=l.afterBuildTicks(a)||a)||!a.length)&&l.ticks)for(a=[],n=0,s=l.ticks.length;n<s;++n)a.push({value:l.ticks[n],major:!1});return l._ticks=a,r=u<a.length,o=l._convertTicksToLabels(r?function(t,e){for(var i=[],n=t.length/e,s=0,o=t.length;s<o;s+=n)i.push(t[Math.floor(s)]);return i}(a,u):a),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=h.display&&(h.autoSkip||"auto"===h.source)?l._autoSkip(a):a,r&&(o=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=o,l.afterUpdate(),l.minSize},_configure:function(){var t,e,i=this,n=i.options.ticks.reverse;i.isHorizontal()?(t=i.left,e=i.right):(t=i.top,e=i.bottom,n=!n),i._startPixel=t,i._endPixel=e,i._reversePixels=n,i._length=e-t},afterUpdate:function(){U.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){U.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){U.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){U.callback(this.options.beforeDataLimits,[this])},determineDataLimits:U.noop,afterDataLimits:function(){U.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){U.callback(this.options.beforeBuildTicks,[this])},buildTicks:U.noop,afterBuildTicks:function(t){var e=this;return si(t)&&t.length?U.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=U.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){U.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){U.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){U.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,i,n,s,o,a,r=this,l=r.options,h=l.ticks,u=r.getTicks().length,c=h.minRotation||0,d=h.maxRotation,f=c;!r._isVisible()||!h.display||c>=d||u<=1||!r.isHorizontal()?r.labelRotation=c:(e=(t=r._getLabelSizes()).widest.width,i=t.highest.height-t.highest.offset,n=Math.min(r.maxWidth,r.chart.width-e),e+6>(s=l.offset?r.maxWidth/u:n/(u-1))&&(s=n/(u-(l.offset?.5:1)),o=r.maxHeight-ui(l.gridLines)-h.padding-ci(l.scaleLabel),a=Math.sqrt(e*e+i*i),f=U.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/s,1)),Math.asin(Math.min(o/a,1))-Math.asin(i/a))),f=Math.max(c,Math.min(d,f))),r.labelRotation=f)},afterCalculateTickRotation:function(){U.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){U.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=t.chart,n=t.options,s=n.ticks,o=n.scaleLabel,a=n.gridLines,r=t._isVisible(),l="bottom"===n.position,h=t.isHorizontal();if(h?e.width=t.maxWidth:r&&(e.width=ui(a)+ci(o)),h?r&&(e.height=ui(a)+ci(o)):e.height=t.maxHeight,s.display&&r){var u=fi(s),c=t._getLabelSizes(),d=c.first,f=c.last,p=c.widest,g=c.highest,m=.4*u.minor.lineHeight,v=s.padding;if(h){var b=0!==t.labelRotation,_=U.toRadians(t.labelRotation),y=Math.cos(_),x=Math.sin(_),w=x*p.width+y*(g.height-(b?g.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+w+v);var k,C,D=t.getPixelForTick(0)-t.left,M=t.right-t.getPixelForTick(t.getTicks().length-1);b?(k=l?y*d.width+x*d.offset:x*(d.height-d.offset),C=l?x*(f.height-f.offset):y*f.width+x*f.offset):(k=d.width/2,C=f.width/2),t.paddingLeft=Math.max((k-D)*t.width/(t.width-D),0)+3,t.paddingRight=Math.max((C-M)*t.width/(t.width-M),0)+3}else{var S=s.mirror?0:p.width+v+m;e.width=Math.min(t.maxWidth,e.width+S),t.paddingTop=d.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),h?(t.width=t._length=i.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){U.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(oi(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,i,n,s=this;for(s.ticks=t.map(function(t){return t.value}),s.beforeTickToLabelConversion(),e=s.convertTicksToLabels(t)||s.ticks,s.afterTickToLabelConversion(),i=0,n=t.length;i<n;++i)t[i].label=e[i];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=hi(t.ctx,fi(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,i,n,s;return si(t)?(e=+this.getRightValue(t[0]),i=+this.getRightValue(t[1]),n=Math.min(e,i),s=Math.max(e,i)):(e=void 0,i=t=+this.getRightValue(t),n=t,s=t),{min:n,max:s,start:e,end:i}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:U.noop,getPixelForValue:U.noop,getValueForPixel:U.noop,getPixelForTick:function(t){var e=this.options.offset,i=this._ticks.length,n=1/Math.max(i-(e?0:1),1);return t<0||t>i-1?null:this.getPixelForDecimal(t*n+(e?n/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,i,n,s,o=this.options.ticks,a=this._length,r=o.maxTicksLimit||a/this._tickSize()+1,l=o.major.enabled?function(t){var e,i,n=[];for(e=0,i=t.length;e<i;e++)t[e].major&&n.push(e);return n}(t):[],h=l.length,u=l[0],c=l[h-1];if(h>r)return function(t,e,i){var n,s,o=0,a=e[0];for(i=Math.ceil(i),n=0;n<t.length;n++)s=t[n],n===a?(s._index=n,a=e[++o*i]):delete s.label}(t,l,h/r),pi(t);if(n=function(t,e,i,n){var s,o,a,r,l=function(t){var e,i,n=t.length;if(n<2)return!1;for(i=t[0],e=1;e<n;++e)if(t[e]-t[e-1]!==i)return!1;return i}(t),h=(e.length-1)/n;if(!l)return Math.max(h,1);for(a=0,r=(s=U.math._factorize(l)).length-1;a<r;a++)if((o=s[a])>h)return o;return Math.max(h,1)}(l,t,0,r),h>0){for(e=0,i=h-1;e<i;e++)gi(t,n,l[e],l[e+1]);return s=h>1?(c-u)/(h-1):null,gi(t,n,U.isNullOrUndef(s)?0:u-s,u),gi(t,n,c,U.isNullOrUndef(s)?t.length:c+s),pi(t)}return gi(t,n),pi(t)},_tickSize:function(){var t=this.options.ticks,e=U.toRadians(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,r=s?s.highest.height+o:0;return this.isHorizontal()?r*i>a*n?a/i:r/n:r*n<a*i?r/i:a/n},_isVisible:function(){var t,e,i,n=this.chart,s=this.options.display;if("auto"!==s)return!!s;for(t=0,e=n.data.datasets.length;t<e;++t)if(n.isDatasetVisible(t)&&((i=n.getDatasetMeta(t)).xAxisID===this.id||i.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,i,n,s,o,a,r,l,h,u,c,d,f,p,g,m,v,b=this,_=b.chart,y=b.options,x=y.gridLines,w=y.position,k=x.offsetGridLines,C=b.isHorizontal(),D=b._ticksToDraw,M=D.length+(k?1:0),S=ui(x),T=[],I=x.drawBorder?ri(x.lineWidth,0,0):0,P=I/2,A=U._alignPixel,F=function(t){return A(_,t,I)};for("top"===w?(e=F(b.bottom),r=b.bottom-S,h=e-P,c=F(t.top)+P,f=t.bottom):"bottom"===w?(e=F(b.top),c=t.top,f=F(t.bottom)-P,r=e+P,h=b.top+S):"left"===w?(e=F(b.right),a=b.right-S,l=e-P,u=F(t.left)+P,d=t.right):(e=F(b.left),u=t.left,d=F(t.right)-P,a=e+P,l=b.left+S),i=0;i<M;++i)n=D[i]||{},oi(n.label)&&i<D.length||(i===b.zeroLineIndex&&y.offset===k?(p=x.zeroLineWidth,g=x.zeroLineColor,m=x.zeroLineBorderDash||[],v=x.zeroLineBorderDashOffset||0):(p=ri(x.lineWidth,i,1),g=ri(x.color,i,"rgba(0,0,0,0.1)"),m=x.borderDash||[],v=x.borderDashOffset||0),void 0!==(s=li(b,n._index||i,k))&&(o=A(_,s,p),C?a=l=u=d=o:r=h=c=f=o,T.push({tx1:a,ty1:r,tx2:l,ty2:h,x1:u,y1:c,x2:d,y2:f,width:p,color:g,borderDash:m,borderDashOffset:v})));return T.ticksLength=M,T.borderValue=e,T},_computeLabelItems:function(){var t,e,i,n,s,o,a,r,l,h,u,c,d=this,f=d.options,p=f.ticks,g=f.position,m=p.mirror,v=d.isHorizontal(),b=d._ticksToDraw,_=fi(p),y=p.padding,x=ui(f.gridLines),w=-U.toRadians(d.labelRotation),k=[];for("top"===g?(o=d.bottom-x-y,a=w?"left":"center"):"bottom"===g?(o=d.top+x+y,a=w?"right":"center"):"left"===g?(s=d.right-(m?0:x)-y,a=m?"left":"right"):(s=d.left+(m?0:x)+y,a=m?"right":"left"),t=0,e=b.length;t<e;++t)n=(i=b[t]).label,oi(n)||(r=d.getPixelForTick(i._index||t)+p.labelOffset,h=(l=i.major?_.major:_.minor).lineHeight,u=si(n)?n.length:1,v?(s=r,c="top"===g?((w?1:.5)-u)*h:(w?0:.5)*h):(o=r,c=(1-u)*h/2),k.push({x:s,y:o,rotation:w,label:n,font:l,textOffset:c,textAlign:a}));return k},_drawGrid:function(t){var e=this,i=e.options.gridLines;if(i.display){var n,s,o,a,r,l=e.ctx,h=e.chart,u=U._alignPixel,c=i.drawBorder?ri(i.lineWidth,0,0):0,d=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(o=0,a=d.length;o<a;++o)n=(r=d[o]).width,s=r.color,n&&s&&(l.save(),l.lineWidth=n,l.strokeStyle=s,l.setLineDash&&(l.setLineDash(r.borderDash),l.lineDashOffset=r.borderDashOffset),l.beginPath(),i.drawTicks&&(l.moveTo(r.tx1,r.ty1),l.lineTo(r.tx2,r.ty2)),i.drawOnChartArea&&(l.moveTo(r.x1,r.y1),l.lineTo(r.x2,r.y2)),l.stroke(),l.restore());if(c){var f,p,g,m,v=c,b=ri(i.lineWidth,d.ticksLength-1,1),_=d.borderValue;e.isHorizontal()?(f=u(h,e.left,v)-v/2,p=u(h,e.right,b)+b/2,g=m=_):(g=u(h,e.top,v)-v/2,m=u(h,e.bottom,b)+b/2,f=p=_),l.lineWidth=c,l.strokeStyle=ri(i.color,0),l.beginPath(),l.moveTo(f,g),l.lineTo(p,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,i,n,s,o,a,r,l,h=t.ctx,u=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,n=u.length;e<n;++e){if(a=(o=u[e]).font,h.save(),h.translate(o.x,o.y),h.rotate(o.rotation),h.font=a.string,h.fillStyle=a.color,h.textBaseline="middle",h.textAlign=o.textAlign,r=o.label,l=o.textOffset,si(r))for(i=0,s=r.length;i<s;++i)h.fillText(""+r[i],0,l),l+=a.lineHeight;else h.fillText(r,0,l);h.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,i=t.options,n=i.scaleLabel;if(n.display){var s,o,a=ai(n.fontColor,H.global.defaultFontColor),r=U.options._parseFont(n),l=U.options.toPadding(n.padding),h=r.lineHeight/2,u=i.position,c=0;if(t.isHorizontal())s=t.left+t.width/2,o="bottom"===u?t.bottom-h-l.bottom:t.top+h+l.top;else{var d="left"===u;s=d?t.left+h+l.top:t.right-h-l.top,o=t.top+t.height/2,c=d?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(s,o),e.rotate(c),e.textAlign="center",e.textBaseline="middle",e.fillStyle=a,e.font=r.string,e.fillText(n.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&i!==n&&t.draw===t._draw?[{z:n,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:i,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:i,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,i=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter(function(n){return(!t||n.type===t)&&(i?n.xAxisID===e.id:n.yAxisID===e.id)})}});mi.prototype._draw=mi.prototype.draw;var vi=mi,bi=U.isNullOrUndef,_i=vi.extend({determineDataLimits:function(){var t,e=this,i=e._getLabels(),n=e.options.ticks,s=n.min,o=n.max,a=0,r=i.length-1;void 0!==s&&(t=i.indexOf(s))>=0&&(a=t),void 0!==o&&(t=i.indexOf(o))>=0&&(r=t),e.minIndex=a,e.maxIndex=r,e.min=i[a],e.max=i[r]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,i=this.maxIndex;this.ticks=0===e&&i===t.length-1?t:t.slice(e,i+1)},getLabelForIndex:function(t,e){var i=this.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(i.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,i=t.ticks;vi.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),i&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(i.length-(e?0:1),1))},getPixelForValue:function(t,e,i){var n,s,o,a=this;return bi(e)||bi(i)||(t=a.chart.data.datasets[i].data[e]),bi(t)||(n=a.isHorizontal()?t.x:t.y),(void 0!==n||void 0!==t&&isNaN(e))&&(s=a._getLabels(),t=U.valueOrDefault(n,t),e=-1!==(o=s.indexOf(t))?o:e,isNaN(e)&&(e=t)),a.getPixelForDecimal((e-a._startValue)/a._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),yi={position:"bottom"};_i._defaults=yi;var xi=U.noop,wi=U.isNullOrUndef;var ki=vi.extend({getRightValue:function(t){return"string"==typeof t?+t:vi.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=U.sign(t.min),n=U.sign(t.max);i<0&&n<0?t.max=0:i>0&&n>0&&(t.min=0)}var s=void 0!==e.min||void 0!==e.suggestedMin,o=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),s!==o&&t.min>=t.max&&(s?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:xi,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:U.valueOrDefault(e.fixedStepSize,e.stepSize)},s=t.ticks=function(t,e){var i,n,s,o,a=[],r=t.stepSize,l=r||1,h=t.maxTicks-1,u=t.min,c=t.max,d=t.precision,f=e.min,p=e.max,g=U.niceNum((p-f)/h/l)*l;if(g<1e-14&&wi(u)&&wi(c))return[f,p];(o=Math.ceil(p/g)-Math.floor(f/g))>h&&(g=U.niceNum(o*g/h/l)*l),r||wi(d)?i=Math.pow(10,U._decimalPlaces(g)):(i=Math.pow(10,d),g=Math.ceil(g*i)/i),n=Math.floor(f/g)*g,s=Math.ceil(p/g)*g,r&&(!wi(u)&&U.almostWhole(u/g,g/1e3)&&(n=u),!wi(c)&&U.almostWhole(c/g,g/1e3)&&(s=c)),o=(s-n)/g,o=U.almostEquals(o,Math.round(o),g/1e3)?Math.round(o):Math.ceil(o),n=Math.round(n*i)/i,s=Math.round(s*i)/i,a.push(wi(u)?n:u);for(var m=1;m<o;++m)a.push(Math.round((n+m*g)*i)/i);return a.push(wi(c)?s:c),a}(n,t);t.handleDirectionalChanges(),t.max=U.max(s),t.min=U.min(s),e.reverse?(s.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),vi.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,i=e.getTicks(),n=e.min,s=e.max;vi.prototype._configure.call(e),e.options.offset&&i.length&&(n-=t=(s-n)/Math.max(i.length-1,1)/2,s+=t),e._startValue=n,e._endValue=s,e._valueRange=s-n}}),Ci={position:"left",ticks:{callback:ni.formatters.linear}};function Di(t,e,i,n){var s,o,a=t.options,r=function(t,e,i){var n=[i.type,void 0===e&&void 0===i.stack?i.index:"",i.stack].join(".");return void 0===t[n]&&(t[n]={pos:[],neg:[]}),t[n]}(e,a.stacked,i),l=r.pos,h=r.neg,u=n.length;for(s=0;s<u;++s)o=t._parseValue(n[s]),isNaN(o.min)||isNaN(o.max)||i.data[s].hidden||(l[s]=l[s]||0,h[s]=h[s]||0,a.relativePoints?l[s]=100:o.min<0||o.max<0?h[s]+=o.min:l[s]+=o.max)}function Mi(t,e,i){var n,s,o=i.length;for(n=0;n<o;++n)s=t._parseValue(i[n]),isNaN(s.min)||isNaN(s.max)||e.data[n].hidden||(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}var Si=ki.extend({determineDataLimits:function(){var t,e,i,n,s=this,o=s.options,a=s.chart.data.datasets,r=s._getMatchingVisibleMetas(),l=o.stacked,h={},u=r.length;if(s.min=Number.POSITIVE_INFINITY,s.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<u;++t)l=void 0!==(e=r[t]).stack;for(t=0;t<u;++t)i=a[(e=r[t]).index].data,l?Di(s,h,e,i):Mi(s,e,i);U.each(h,function(t){n=t.pos.concat(t.neg),s.min=Math.min(s.min,U.min(n)),s.max=Math.max(s.max,U.max(n))}),s.min=U.isFinite(s.min)&&!isNaN(s.min)?s.min:0,s.max=U.isFinite(s.max)&&!isNaN(s.max)?s.max:1,s.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=U.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),Ti=Ci;Si._defaults=Ti;var Ii=U.valueOrDefault,Pi=U.math.log10;var Ai={position:"left",ticks:{callback:ni.formatters.logarithmic}};function Fi(t,e){return U.isFinite(t)&&t>=0?t:e}var Oi=vi.extend({determineDataLimits:function(){var t,e,i,n,s,o,a=this,r=a.options,l=a.chart,h=l.data.datasets,u=a.isHorizontal();function c(t){return u?t.xAxisID===a.id:t.yAxisID===a.id}a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,a.minNotZero=Number.POSITIVE_INFINITY;var d=r.stacked;if(void 0===d)for(t=0;t<h.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&c(e)&&void 0!==e.stack){d=!0;break}if(r.stacked||d){var f={};for(t=0;t<h.length;t++){var p=[(e=l.getDatasetMeta(t)).type,void 0===r.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&c(e))for(void 0===f[p]&&(f[p]=[]),s=0,o=(n=h[t].data).length;s<o;s++){var g=f[p];i=a._parseValue(n[s]),isNaN(i.min)||isNaN(i.max)||e.data[s].hidden||i.min<0||i.max<0||(g[s]=g[s]||0,g[s]+=i.max)}}U.each(f,function(t){if(t.length>0){var e=U.min(t),i=U.max(t);a.min=Math.min(a.min,e),a.max=Math.max(a.max,i)}})}else for(t=0;t<h.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&c(e))for(s=0,o=(n=h[t].data).length;s<o;s++)i=a._parseValue(n[s]),isNaN(i.min)||isNaN(i.max)||e.data[s].hidden||i.min<0||i.max<0||(a.min=Math.min(i.min,a.min),a.max=Math.max(i.max,a.max),0!==i.min&&(a.minNotZero=Math.min(i.min,a.minNotZero)));a.min=U.isFinite(a.min)?a.min:null,a.max=U.isFinite(a.max)?a.max:null,a.minNotZero=U.isFinite(a.minNotZero)?a.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Fi(e.min,t.min),t.max=Fi(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Pi(t.min))-1),t.max=Math.pow(10,Math.floor(Pi(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Pi(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Pi(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Pi(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),n={min:Fi(e.min),max:Fi(e.max)},s=t.ticks=function(t,e){var i,n,s=[],o=Ii(t.min,Math.pow(10,Math.floor(Pi(e.min)))),a=Math.floor(Pi(e.max)),r=Math.ceil(e.max/Math.pow(10,a));0===o?(i=Math.floor(Pi(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),s.push(o),o=n*Math.pow(10,i)):(i=Math.floor(Pi(o)),n=Math.floor(o/Math.pow(10,i)));var l=i<0?Math.pow(10,Math.abs(i)):1;do{s.push(o),10==++n&&(n=1,l=++i>=0?1:l),o=Math.round(n*Math.pow(10,i)*l)/l}while(i<a||i===a&&n<r);var h=Ii(t.max,o);return s.push(h),s}(n,t);t.max=U.max(s),t.min=U.min(s),e.reverse?(i=!i,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i&&s.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),vi.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Pi(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,i=0;vi.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),i=Ii(t.options.ticks.fontSize,H.global.defaultFontSize)/t._length),t._startValue=Pi(e),t._valueOffset=i,t._valueRange=(Pi(t.max)-Pi(e))/(1-i)},getPixelForValue:function(t){var e=this,i=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(i=(Pi(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(i)},getValueForPixel:function(t){var e=this,i=e.getDecimalForPixel(t);return 0===i&&0===e.min?0:Math.pow(10,e._startValue+(i-e._valueOffset)*e._valueRange)}}),Ei=Ai;Oi._defaults=Ei;var Ni=U.valueOrDefault,zi=U.valueAtIndexOrDefault,Li=U.options.resolve,Hi={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:ni.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Ri(t){var e=t.ticks;return e.display&&t.display?Ni(e.fontSize,H.global.defaultFontSize)+2*e.backdropPaddingY:0}function Wi(t,e,i,n,s){return t===n||t===s?{start:e-i/2,end:e+i/2}:t<n||t>s?{start:e-i,end:e}:{start:e,end:e+i}}function Bi(t){return 0===t||180===t?"center":t<180?"left":"right"}function Vi(t,e,i,n){var s,o,a=i.y+n/2;if(U.isArray(e))for(s=0,o=e.length;s<o;++s)t.fillText(e[s],i.x,a),a+=n;else t.fillText(e,i.x,a)}function Ui(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function ji(t){return U.isNumber(t)?t:0}var Yi=ki.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Ri(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;U.each(e.data.datasets,function(s,o){if(e.isDatasetVisible(o)){var a=e.getDatasetMeta(o);U.each(s.data,function(e,s){var o=+t.getRightValue(e);isNaN(o)||a.data[s].hidden||(i=Math.min(o,i),n=Math.max(o,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Ri(this.options))},convertTicksToLabels:function(){var t=this;ki.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=U.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,i,n,s=U.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},a={};t.ctx.font=s.string,t._pointLabelSizes=[];var r,l,h,u=t.chart.data.labels.length;for(e=0;e<u;e++){n=t.getPointPosition(e,t.drawingArea+5),r=t.ctx,l=s.lineHeight,h=t.pointLabels[e],i=U.isArray(h)?{w:U.longestText(r,r.font,h),h:h.length*l}:{w:r.measureText(h).width,h:l},t._pointLabelSizes[e]=i;var c=t.getIndexAngle(e),d=U.toDegrees(c)%360,f=Wi(d,n.x,i.w,0,180),p=Wi(d,n.y,i.h,90,270);f.start<o.l&&(o.l=f.start,a.l=c),f.end>o.r&&(o.r=f.end,a.r=c),p.start<o.t&&(o.t=p.start,a.t=c),p.end>o.b&&(o.b=p.end,a.b=c)}t.setReductions(t.drawingArea,o,a)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,i){var n=this,s=e.l/Math.sin(i.l),o=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);s=ji(s),o=ji(o),a=ji(a),r=ji(r),n.drawingArea=Math.min(Math.floor(t-(s+o)/2),Math.floor(t-(a+r)/2)),n.setCenterPoint(s,o,a,r)},setCenterPoint:function(t,e,i,n){var s=this,o=s.width-e-s.drawingArea,a=t+s.drawingArea,r=i+s.drawingArea,l=s.height-s.paddingTop-n-s.drawingArea;s.xCenter=Math.floor((a+o)/2+s.left),s.yCenter=Math.floor((r+l)/2+s.top+s.paddingTop)},getIndexAngle:function(t){var e=this.chart,i=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(i<0?i+360:i)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(U.isNullOrUndef(t))return NaN;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,i=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},_drawGrid:function(){var t,e,i,n=this,s=n.ctx,o=n.options,a=o.gridLines,r=o.angleLines,l=Ni(r.lineWidth,a.lineWidth),h=Ni(r.color,a.color);if(o.pointLabels.display&&function(t){var e=t.ctx,i=t.options,n=i.pointLabels,s=Ri(i),o=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),a=U.options._parseFont(n);e.save(),e.font=a.string,e.textBaseline="middle";for(var r=t.chart.data.labels.length-1;r>=0;r--){var l=0===r?s/2:0,h=t.getPointPosition(r,o+l+5),u=zi(n.fontColor,r,H.global.defaultFontColor);e.fillStyle=u;var c=t.getIndexAngle(r),d=U.toDegrees(c);e.textAlign=Bi(d),Ui(d,t._pointLabelSizes[r],h),Vi(e,t.pointLabels[r],h,a.lineHeight)}e.restore()}(n),a.display&&U.each(n.ticks,function(t,i){0!==i&&(e=n.getDistanceFromCenterForValue(n.ticksAsNumbers[i]),function(t,e,i,n){var s,o=t.ctx,a=e.circular,r=t.chart.data.labels.length,l=zi(e.color,n-1),h=zi(e.lineWidth,n-1);if((a||r)&&l&&h){if(o.save(),o.strokeStyle=l,o.lineWidth=h,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),a)o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{s=t.getPointPosition(0,i),o.moveTo(s.x,s.y);for(var u=1;u<r;u++)s=t.getPointPosition(u,i),o.lineTo(s.x,s.y)}o.closePath(),o.stroke(),o.restore()}}(n,a,e,i))}),r.display&&l&&h){for(s.save(),s.lineWidth=l,s.strokeStyle=h,s.setLineDash&&(s.setLineDash(Li([r.borderDash,a.borderDash,[]])),s.lineDashOffset=Li([r.borderDashOffset,a.borderDashOffset,0])),t=n.chart.data.labels.length-1;t>=0;t--)e=n.getDistanceFromCenterForValue(o.ticks.reverse?n.min:n.max),i=n.getPointPosition(t,e),s.beginPath(),s.moveTo(n.xCenter,n.yCenter),s.lineTo(i.x,i.y),s.stroke();s.restore()}},_drawLabels:function(){var t=this,e=t.ctx,i=t.options.ticks;if(i.display){var n,s,o=t.getIndexAngle(0),a=U.options._parseFont(i),r=Ni(i.fontColor,H.global.defaultFontColor);e.save(),e.font=a.string,e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",U.each(t.ticks,function(o,l){(0!==l||i.reverse)&&(n=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),i.showLabelBackdrop&&(s=e.measureText(o).width,e.fillStyle=i.backdropColor,e.fillRect(-s/2-i.backdropPaddingX,-n-a.size/2-i.backdropPaddingY,s+2*i.backdropPaddingX,a.size+2*i.backdropPaddingY)),e.fillStyle=r,e.fillText(o,0,-n))}),e.restore()}},_drawTitle:U.noop}),qi=Hi;Yi._defaults=qi;var $i=U._deprecated,Ki=U.options.resolve,Xi=U.valueOrDefault,Gi=Number.MIN_SAFE_INTEGER||-9007199254740991,Qi=Number.MAX_SAFE_INTEGER||9007199254740991,Zi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ji=Object.keys(Zi);function tn(t,e){return t-e}function en(t){return U.valueOrDefault(t.time.min,t.ticks.min)}function nn(t){return U.valueOrDefault(t.time.max,t.ticks.max)}function sn(t,e,i,n){var s=function(t,e,i){for(var n,s,o,a=0,r=t.length-1;a>=0&&a<=r;){if(s=t[(n=a+r>>1)-1]||null,o=t[n],!s)return{lo:null,hi:o};if(o[e]<i)a=n+1;else{if(!(s[e]>i))return{lo:s,hi:o};r=n-1}}return{lo:o,hi:null}}(t,e,i),o=s.lo?s.hi?s.lo:t[t.length-2]:t[0],a=s.lo?s.hi?s.hi:t[t.length-1]:t[1],r=a[e]-o[e],l=r?(i-o[e])/r:0,h=(a[n]-o[n])*l;return o[n]+h}function on(t,e){var i=t._adapter,n=t.options.time,s=n.parser,o=s||n.format,a=e;return"function"==typeof s&&(a=s(a)),U.isFinite(a)||(a="string"==typeof o?i.parse(a,o):i.parse(a)),null!==a?+a:(s||"function"!=typeof o||(a=o(e),U.isFinite(a)||(a=i.parse(a))),a)}function an(t,e){if(U.isNullOrUndef(e))return null;var i=t.options.time,n=on(t,t.getRightValue(e));return null===n?n:(i.round&&(n=+t._adapter.startOf(n,i.round)),n)}function rn(t,e,i,n){var s,o,a,r=Ji.length;for(s=Ji.indexOf(t);s<r-1;++s)if(a=(o=Zi[Ji[s]]).steps?o.steps:Qi,o.common&&Math.ceil((i-e)/(a*o.size))<=n)return Ji[s];return Ji[r-1]}function ln(t,e,i){var n,s,o=[],a={},r=e.length;for(n=0;n<r;++n)a[s=e[n]]=n,o.push({value:s,major:!1});return 0!==r&&i?function(t,e,i,n){var s,o,a=t._adapter,r=+a.startOf(e[0].value,n),l=e[e.length-1].value;for(s=r;s<=l;s=+a.add(s,1,n))(o=i[s])>=0&&(e[o].major=!0);return e}(t,o,a,i):o}var hn=vi.extend({initialize:function(){this.mergeTicksOptions(),vi.prototype.initialize.call(this)},update:function(){var t=this.options,e=t.time||(t.time={}),i=this._adapter=new ii._date(t.adapters.date);return $i("time scale",e.format,"time.format","time.parser"),$i("time scale",e.min,"time.min","ticks.min"),$i("time scale",e.max,"time.max","ticks.max"),U.mergeIf(e.displayFormats,i.formats()),vi.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),vi.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,s,o,a,r=this,l=r.chart,h=r._adapter,u=r.options,c=u.time.unit||"day",d=Qi,f=Gi,p=[],g=[],m=[],v=r._getLabels();for(t=0,i=v.length;t<i;++t)m.push(an(r,v[t]));for(t=0,i=(l.data.datasets||[]).length;t<i;++t)if(l.isDatasetVisible(t))if(s=l.data.datasets[t].data,U.isObject(s[0]))for(g[t]=[],e=0,n=s.length;e<n;++e)o=an(r,s[e]),p.push(o),g[t][e]=o;else g[t]=m.slice(0),a||(p=p.concat(m),a=!0);else g[t]=[];m.length&&(d=Math.min(d,m[0]),f=Math.max(f,m[m.length-1])),p.length&&(p=i>1?function(t){var e,i,n,s={},o=[];for(e=0,i=t.length;e<i;++e)s[n=t[e]]||(s[n]=!0,o.push(n));return o}(p).sort(tn):p.sort(tn),d=Math.min(d,p[0]),f=Math.max(f,p[p.length-1])),d=an(r,en(u))||d,f=an(r,nn(u))||f,d=d===Qi?+h.startOf(Date.now(),c):d,f=f===Gi?+h.endOf(Date.now(),c)+1:f,r.min=Math.min(d,f),r.max=Math.max(d+1,f),r._table=[],r._timestamps={data:p,datasets:g,labels:m}},buildTicks:function(){var t,e,i,n=this,s=n.min,o=n.max,a=n.options,r=a.ticks,l=a.time,h=n._timestamps,u=[],c=n.getLabelCapacity(s),d=r.source,f=a.distribution;for(h="data"===d||"auto"===d&&"series"===f?h.data:"labels"===d?h.labels:function(t,e,i,n){var s,o=t._adapter,a=t.options,r=a.time,l=r.unit||rn(r.minUnit,e,i,n),h=Ki([r.stepSize,r.unitStepSize,1]),u="week"===l&&r.isoWeekday,c=e,d=[];if(u&&(c=+o.startOf(c,"isoWeek",u)),c=+o.startOf(c,u?"day":l),o.diff(i,e,l)>1e5*h)throw e+" and "+i+" are too far apart with stepSize of "+h+" "+l;for(s=c;s<i;s=+o.add(s,h,l))d.push(s);return s!==i&&"ticks"!==a.bounds||d.push(s),d}(n,s,o,c),"ticks"===a.bounds&&h.length&&(s=h[0],o=h[h.length-1]),s=an(n,en(a))||s,o=an(n,nn(a))||o,t=0,e=h.length;t<e;++t)(i=h[t])>=s&&i<=o&&u.push(i);return n.min=s,n.max=o,n._unit=l.unit||(r.autoSkip?rn(l.minUnit,n.min,n.max,c):function(t,e,i,n,s){var o,a;for(o=Ji.length-1;o>=Ji.indexOf(i);o--)if(a=Ji[o],Zi[a].common&&t._adapter.diff(s,n,a)>=e-1)return a;return Ji[i?Ji.indexOf(i):0]}(n,u.length,l.minUnit,n.min,n.max)),n._majorUnit=r.major.enabled&&"year"!==n._unit?function(t){for(var e=Ji.indexOf(t)+1,i=Ji.length;e<i;++e)if(Zi[Ji[e]].common)return Ji[e]}(n._unit):void 0,n._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var s,o,a,r,l,h=[],u=[e];for(s=0,o=t.length;s<o;++s)(r=t[s])>e&&r<i&&u.push(r);for(u.push(i),s=0,o=u.length;s<o;++s)l=u[s+1],a=u[s-1],r=u[s],void 0!==a&&void 0!==l&&Math.round((l+a)/2)===r||h.push({time:r,pos:s/(o-1)});return h}(n._timestamps.data,s,o,f),n._offsets=function(t,e,i,n,s){var o,a,r=0,l=0;return s.offset&&e.length&&(o=sn(t,"time",e[0],"pos"),r=1===e.length?1-o:(sn(t,"time",e[1],"pos")-o)/2,a=sn(t,"time",e[e.length-1],"pos"),l=1===e.length?a:(a-sn(t,"time",e[e.length-2],"pos"))/2),{start:r,end:l,factor:1/(r+1+l)}}(n._table,u,0,0,a),r.reverse&&u.reverse(),ln(n,u,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i._adapter,s=i.chart.data,o=i.options.time,a=s.labels&&t<s.labels.length?s.labels[t]:"",r=s.datasets[e].data[t];return U.isObject(r)&&(a=i.getRightValue(r)),o.tooltipFormat?n.format(on(i,a),o.tooltipFormat):"string"==typeof a?a:n.format(on(i,a),o.displayFormats.datetime)},tickFormatFunction:function(t,e,i,n){var s=this._adapter,o=this.options,a=o.time.displayFormats,r=a[this._unit],l=this._majorUnit,h=a[l],u=i[e],c=o.ticks,d=l&&h&&u&&u.major,f=s.format(t,n||(d?h:r)),p=d?c.major:c.minor,g=Ki([p.callback,p.userCallback,c.callback,c.userCallback]);return g?g(f,e,i):f},convertTicksToLabels:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(this.tickFormatFunction(t[e].value,e,t));return n},getPixelForOffset:function(t){var e=this._offsets,i=sn(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+i)*e.factor)},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=an(this,t)),null!==n)return this.getPixelForOffset(n)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end,n=sn(this._table,"pos",i,"time");return this._adapter._create(n)},_getLabelSize:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=U.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(n),o=Math.sin(n),a=Xi(e.fontSize,H.global.defaultFontSize);return{w:i*s+a*o,h:i*o+a*s}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,i=e.options.time,n=i.displayFormats,s=n[i.unit]||n.millisecond,o=e.tickFormatFunction(t,0,ln(e,[t],e._majorUnit),s),a=e._getLabelSize(o),r=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h);return e.options.offset&&r--,r>0?r:1}}),un={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};hn._defaults=un;var cn={category:_i,linear:Si,logarithmic:Oi,radialLinear:Yi,time:hn},dn={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};ii._date.override("function"==typeof t?{_id:"moment",formats:function(){return dn},parse:function(e,i){return"string"==typeof e&&"string"==typeof i?e=t(e,i):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,i){return t(e).format(i)},add:function(e,i,n){return t(e).add(i,n).valueOf()},diff:function(e,i,n){return t(e).diff(t(i),n)},startOf:function(e,i,n){return e=t(e),"isoWeek"===i?e.isoWeekday(n).valueOf():e.startOf(i).valueOf()},endOf:function(e,i){return t(e).endOf(i).valueOf()},_create:function(e){return t(e)}}:{}),H._set("global",{plugins:{filler:{propagate:!0}}});var fn={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),s=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=s.length||0;return o?function(t,e){return e<o&&s[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return U.isArray(e)?function(t,i){return e[i]}:function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function pn(t,e,i){var n,s=t._model||{},o=s.fill;if(void 0===o&&(o=!!s.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function gn(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,i,n,s,o,a=t.el._scale,r=a.options,l=a.chart.data.labels.length,h=t.fill,u=[];if(!l)return null;for(e=r.ticks.reverse?a.max:a.min,i=r.ticks.reverse?a.min:a.max,n=a.getPointPositionForValue(0,e),s=0;s<l;++s)o="start"===h||"end"===h?a.getPointPositionForValue(s,"start"===h?e:i):a.getBasePosition(s),r.gridLines.circular&&(o.cx=n.x,o.cy=n.y,o.angle=a.getIndexAngle(s)-Math.PI/2),u.push(o);return u}(t):function(t){var e,i=t.el._model||{},n=t.el._scale||{},s=t.fill,o=null;if(isFinite(s))return null;if("start"===s?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===s?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePixel&&(o=n.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(U.isFinite(o))return{x:(e=n.isHorizontal())?o:null,y:e?null:o}}return null}(t)}function mn(t,e,i){var n,s=t[e].fill,o=[e];if(!i)return s;for(;!1!==s&&-1===o.indexOf(s);){if(!isFinite(s))return s;if(!(n=t[s]))return!1;if(n.visible)return s;o.push(s),s=n.fill}return!1}function vn(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),fn[i](t))}function bn(t){return t&&!t.skip}function _n(t,e,i,n,s){var o,a,r,l;if(n&&s){for(t.moveTo(e[0].x,e[0].y),o=1;o<n;++o)U.canvas.lineTo(t,e[o-1],e[o]);if(void 0===i[0].angle)for(t.lineTo(i[s-1].x,i[s-1].y),o=s-1;o>0;--o)U.canvas.lineTo(t,i[o],i[o-1],!0);else for(a=i[0].cx,r=i[0].cy,l=Math.sqrt(Math.pow(i[0].x-a,2)+Math.pow(i[0].y-r,2)),o=s-1;o>0;--o)t.arc(a,r,l,i[o].angle,i[o-1].angle,!0)}}function yn(t,e,i,n,s,o){var a,r,l,h,u,c,d,f,p=e.length,g=n.spanGaps,m=[],v=[],b=0,_=0;for(t.beginPath(),a=0,r=p;a<r;++a)u=i(h=e[l=a%p]._view,l,n),c=bn(h),d=bn(u),o&&void 0===f&&c&&(r=p+(f=a+1)),c&&d?(b=m.push(h),_=v.push(u)):b&&_&&(g?(c&&m.push(h),d&&v.push(u)):(_n(t,m,v,b,_),b=_=0,m=[],v=[]));_n(t,m,v,b,_),t.closePath(),t.fillStyle=s,t.fill()}var xn={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,s,o,a=(t.data.datasets||[]).length,r=e.propagate,l=[];for(n=0;n<a;++n)o=null,(s=(i=t.getDatasetMeta(n)).dataset)&&s._model&&s instanceof kt.Line&&(o={visible:t.isDatasetVisible(n),fill:pn(s,n,a),chart:t,el:s}),i.$filler=o,l.push(o);for(n=0;n<a;++n)(o=l[n])&&(o.fill=mn(l,n,r),o.boundary=gn(o),o.mapper=vn(o))},beforeDatasetsDraw:function(t){var e,i,n,s,o,a,r,l=t._getSortedVisibleDatasetMetas(),h=t.ctx;for(i=l.length-1;i>=0;--i)(e=l[i].$filler)&&e.visible&&(s=(n=e.el)._view,o=n._children||[],a=e.mapper,r=s.backgroundColor||H.global.defaultColor,a&&r&&o.length&&(U.canvas.clipArea(h,t.chartArea),yn(h,o,a,s,r,n._loop),U.canvas.unclipArea(h)))}},wn=U.rtl.getRtlAdapter,kn=U.noop,Cn=U.valueOrDefault;function Dn(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}H._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,s=n.getDatasetMeta(i);s.hidden=null===s.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,i=t.options.legend||{},n=i.labels&&i.labels.usePointStyle;return t._getSortedDatasetMetas().map(function(i){var s=i.controller.getStyle(n?0:void 0);return{text:e[i.index].label,fillStyle:s.backgroundColor,hidden:!t.isDatasetVisible(i.index),lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:s.borderWidth,strokeStyle:s.borderColor,pointStyle:s.pointStyle,rotation:s.rotation,datasetIndex:i.index}},this)}}},legendCallback:function(t){var e,i,n,s=document.createElement("ul"),o=t.data.datasets;for(s.setAttribute("class",t.id+"-legend"),e=0,i=o.length;e<i;e++)(n=s.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[e].backgroundColor,o[e].label&&n.appendChild(document.createTextNode(o[e].label));return s.outerHTML}});var Mn=G.extend({initialize:function(t){U.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:kn,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:kn,beforeSetDimensions:kn,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:kn,beforeBuildLabels:kn,buildLabels:function(){var t=this,e=t.options.labels||{},i=U.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:kn,beforeFit:kn,fit:function(){var t=this,e=t.options,i=e.labels,n=e.display,s=t.ctx,o=U.options._parseFont(i),a=o.size,r=t.legendHitBoxes=[],l=t.minSize,h=t.isHorizontal();if(h?(l.width=t.maxWidth,l.height=n?10:0):(l.width=n?10:0,l.height=t.maxHeight),n){if(s.font=o.string,h){var u=t.lineWidths=[0],c=0;s.textAlign="left",s.textBaseline="middle",U.each(t.legendItems,function(t,e){var n=Dn(i,a)+a/2+s.measureText(t.text).width;(0===e||u[u.length-1]+n+2*i.padding>l.width)&&(c+=a+i.padding,u[u.length-(e>0?0:1)]=0),r[e]={left:0,top:0,width:n,height:a},u[u.length-1]+=n+i.padding}),l.height+=c}else{var d=i.padding,f=t.columnWidths=[],p=t.columnHeights=[],g=i.padding,m=0,v=0;U.each(t.legendItems,function(t,e){var n=Dn(i,a)+a/2+s.measureText(t.text).width;e>0&&v+a+2*d>l.height&&(g+=m+i.padding,f.push(m),p.push(v),m=0,v=0),m=Math.max(m,n),v+=a+d,r[e]={left:0,top:0,width:n,height:a}}),g+=m,f.push(m),p.push(v),l.width+=g}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:kn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,n=H.global,s=n.defaultColor,o=n.elements.line,a=t.height,r=t.columnHeights,l=t.width,h=t.lineWidths;if(e.display){var u,c=wn(e.rtl,t.left,t.minSize.width),d=t.ctx,f=Cn(i.fontColor,n.defaultFontColor),p=U.options._parseFont(i),g=p.size;d.textAlign=c.textAlign("left"),d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=p.string;var m=Dn(i,g),v=t.legendHitBoxes,b=function(t,n){switch(e.align){case"start":return i.padding;case"end":return t-n;default:return(t-n+i.padding)/2}},_=t.isHorizontal();u=_?{x:t.left+b(l,h[0]),y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+b(a,r[0]),line:0},U.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=g+i.padding;U.each(t.legendItems,function(e,n){var f=d.measureText(e.text).width,p=m+g/2+f,x=u.x,w=u.y;c.setWidth(t.minSize.width),_?n>0&&x+p+i.padding>t.left+t.minSize.width&&(w=u.y+=y,u.line++,x=u.x=t.left+b(l,h[u.line])):n>0&&w+y>t.top+t.minSize.height&&(x=u.x=x+t.columnWidths[u.line]+i.padding,u.line++,w=u.y=t.top+b(a,r[u.line]));var k=c.x(x);!function(t,e,n){if(!(isNaN(m)||m<=0)){d.save();var a=Cn(n.lineWidth,o.borderWidth);if(d.fillStyle=Cn(n.fillStyle,s),d.lineCap=Cn(n.lineCap,o.borderCapStyle),d.lineDashOffset=Cn(n.lineDashOffset,o.borderDashOffset),d.lineJoin=Cn(n.lineJoin,o.borderJoinStyle),d.lineWidth=a,d.strokeStyle=Cn(n.strokeStyle,s),d.setLineDash&&d.setLineDash(Cn(n.lineDash,o.borderDash)),i&&i.usePointStyle){var r=m*Math.SQRT2/2,l=c.xPlus(t,m/2),h=e+g/2;U.canvas.drawPoint(d,n.pointStyle,r,l,h,n.rotation)}else d.fillRect(c.leftForLtr(t,m),e,m,g),0!==a&&d.strokeRect(c.leftForLtr(t,m),e,m,g);d.restore()}}(k,w,e),v[n].left=c.leftForLtr(k,v[n].width),v[n].top=w,function(t,e,i,n){var s=g/2,o=c.xPlus(t,m+s),a=e+s;d.fillText(i.text,o,a),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(o,a),d.lineTo(c.xPlus(o,n),a),d.stroke())}(k,w,e,f),_?u.x+=p+i.padding:u.y+=y}),U.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var i,n,s,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(s=o.legendHitBoxes,i=0;i<s.length;++i)if(t>=(n=s[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return o.legendItems[i];return null},handleEvent:function(t){var e,i=this,n=i.options,s="mouseup"===t.type?"click":t.type;if("mousemove"===s){if(!n.onHover&&!n.onLeave)return}else{if("click"!==s)return;if(!n.onClick)return}e=i._getLegendItemAt(t.x,t.y),"click"===s?e&&n.onClick&&n.onClick.call(i,t.native,e):(n.onLeave&&e!==i._hoveredItem&&(i._hoveredItem&&n.onLeave.call(i,t.native,i._hoveredItem),i._hoveredItem=e),n.onHover&&e&&n.onHover.call(i,t.native,e))}});function Sn(t,e){var i=new Mn({ctx:t.ctx,options:e,chart:t});pe.configure(t,i,e),pe.addBox(t,i),t.legend=i}var Tn={id:"legend",_element:Mn,beforeInit:function(t){var e=t.options.legend;e&&Sn(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(U.mergeIf(e,H.global.legend),i?(pe.configure(t,i,e),i.options=e):Sn(t,e)):i&&(pe.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},In=U.noop;H._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Pn=G.extend({initialize:function(t){U.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:In,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:In,beforeSetDimensions:In,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:In,beforeBuildLabels:In,buildLabels:In,afterBuildLabels:In,beforeFit:In,fit:function(){var t,e=this,i=e.options,n=e.minSize={},s=e.isHorizontal();i.display?(t=(U.isArray(i.text)?i.text.length:1)*U.options._parseFont(i).lineHeight+2*i.padding,e.width=n.width=s?e.maxWidth:t,e.height=n.height=s?t:e.maxHeight):e.width=n.width=e.height=n.height=0},afterFit:In,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,s,o,a=U.options._parseFont(i),r=a.lineHeight,l=r/2+i.padding,h=0,u=t.top,c=t.left,d=t.bottom,f=t.right;e.fillStyle=U.valueOrDefault(i.fontColor,H.global.defaultFontColor),e.font=a.string,t.isHorizontal()?(s=c+(f-c)/2,o=u+l,n=f-c):(s="left"===i.position?c+l:f-l,o=u+(d-u)/2,n=d-u,h=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(s,o),e.rotate(h),e.textAlign="center",e.textBaseline="middle";var p=i.text;if(U.isArray(p))for(var g=0,m=0;m<p.length;++m)e.fillText(p[m],0,g,n),g+=r;else e.fillText(p,0,0,n);e.restore()}}});function An(t,e){var i=new Pn({ctx:t.ctx,options:e,chart:t});pe.configure(t,i,e),pe.addBox(t,i),t.titleBlock=i}var Fn={},On=xn,En=Tn,Nn={id:"title",_element:Pn,beforeInit:function(t){var e=t.options.title;e&&An(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(U.mergeIf(e,H.global.title),i?(pe.configure(t,i,e),i.options=e):An(t,e)):i&&(pe.removeBox(t,i),delete t.titleBlock)}};for(var zn in Fn.filler=On,Fn.legend=En,Fn.title=Nn,Je.helpers=U,function(){function t(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function e(t){return null!=t&&"none"!==t}function i(i,n,s){var o=document.defaultView,a=U._getParentNode(i),r=o.getComputedStyle(i)[n],l=o.getComputedStyle(a)[n],h=e(r),u=e(l),c=Number.POSITIVE_INFINITY;return h||u?Math.min(h?t(r,i,s):c,u?t(l,a,s):c):"none"}U.where=function(t,e){if(U.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return U.each(t,function(t){e(t)&&i.push(t)}),i},U.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,s=t.length;n<s;++n)if(e.call(i,t[n],n,t))return n;return-1},U.findNextWhere=function(t,e,i){U.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var s=t[n];if(e(s))return s}},U.findPreviousWhere=function(t,e,i){U.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var s=t[n];if(e(s))return s}},U.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},U.almostEquals=function(t,e,i){return Math.abs(t-e)<i},U.almostWhole=function(t,e){var i=Math.round(t);return i-e<=t&&i+e>=t},U.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},U.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},U.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},U.toRadians=function(t){return t*(Math.PI/180)},U.toDegrees=function(t){return t*(180/Math.PI)},U._decimalPlaces=function(t){if(U.isFinite(t)){for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}},U.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:s}},U.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},U.aliasPixel=function(t){return t%2==0?0:.5},U._alignPixel=function(t,e,i){var n=t.currentDevicePixelRatio,s=i/2;return Math.round((e-s)*n)/n+s},U.splineCurve=function(t,e,i,n){var s=t.skip?e:t,o=e,a=i.skip?e:i,r=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),l=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),h=r/(r+l),u=l/(r+l),c=n*(h=isNaN(h)?0:h),d=n*(u=isNaN(u)?0:u);return{previous:{x:o.x-c*(a.x-s.x),y:o.y-c*(a.y-s.y)},next:{x:o.x+d*(a.x-s.x),y:o.y+d*(a.y-s.y)}}},U.EPSILON=Number.EPSILON||1e-14,U.splineCurveMonotone=function(t){var e,i,n,s,o,a,r,l,h,u=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),c=u.length;for(e=0;e<c;++e)if(!(n=u[e]).model.skip){if(i=e>0?u[e-1]:null,(s=e<c-1?u[e+1]:null)&&!s.model.skip){var d=s.model.x-n.model.x;n.deltaK=0!==d?(s.model.y-n.model.y)/d:0}!i||i.model.skip?n.mK=n.deltaK:!s||s.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<c-1;++e)n=u[e],s=u[e+1],n.model.skip||s.model.skip||(U.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=s.mK=0:(o=n.mK/n.deltaK,a=s.mK/n.deltaK,(l=Math.pow(o,2)+Math.pow(a,2))<=9||(r=3/Math.sqrt(l),n.mK=o*r*n.deltaK,s.mK=a*r*n.deltaK)));for(e=0;e<c;++e)(n=u[e]).model.skip||(i=e>0?u[e-1]:null,s=e<c-1?u[e+1]:null,i&&!i.model.skip&&(h=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-h,n.model.controlPointPreviousY=n.model.y-h*n.mK),s&&!s.model.skip&&(h=(s.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+h,n.model.controlPointNextY=n.model.y+h*n.mK))},U.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},U.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},U.niceNum=function(t,e){var i=Math.floor(U.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},U.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},U.getRelativePosition=function(t,e){var i,n,s=t.originalEvent||t,o=t.target||t.srcElement,a=o.getBoundingClientRect(),r=s.touches;r&&r.length>0?(i=r[0].clientX,n=r[0].clientY):(i=s.clientX,n=s.clientY);var l=parseFloat(U.getStyle(o,"padding-left")),h=parseFloat(U.getStyle(o,"padding-top")),u=parseFloat(U.getStyle(o,"padding-right")),c=parseFloat(U.getStyle(o,"padding-bottom")),d=a.right-a.left-l-u,f=a.bottom-a.top-h-c;return{x:i=Math.round((i-a.left-l)/d*o.width/e.currentDevicePixelRatio),y:n=Math.round((n-a.top-h)/f*o.height/e.currentDevicePixelRatio)}},U.getConstraintWidth=function(t){return i(t,"max-width","clientWidth")},U.getConstraintHeight=function(t){return i(t,"max-height","clientHeight")},U._calculatePadding=function(t,e,i){return(e=U.getStyle(t,e)).indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)},U._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},U.getMaximumWidth=function(t){var e=U._getParentNode(t);if(!e)return t.clientWidth;var i=e.clientWidth,n=i-U._calculatePadding(e,"padding-left",i)-U._calculatePadding(e,"padding-right",i),s=U.getConstraintWidth(t);return isNaN(s)?n:Math.min(n,s)},U.getMaximumHeight=function(t){var e=U._getParentNode(t);if(!e)return t.clientHeight;var i=e.clientHeight,n=i-U._calculatePadding(e,"padding-top",i)-U._calculatePadding(e,"padding-bottom",i),s=U.getConstraintHeight(t);return isNaN(s)?n:Math.min(n,s)},U.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},U.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var n=t.canvas,s=t.height,o=t.width;n.height=s*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=s+"px",n.style.width=o+"px")}},U.fontString=function(t,e,i){return e+" "+t+"px "+i},U.longestText=function(t,e,i,n){var s=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},o=n.garbageCollect=[],n.font=e),t.font=e;var a,r,l,h,u,c=0,d=i.length;for(a=0;a<d;a++)if(null!=(h=i[a])&&!0!==U.isArray(h))c=U.measureText(t,s,o,c,h);else if(U.isArray(h))for(r=0,l=h.length;r<l;r++)null==(u=h[r])||U.isArray(u)||(c=U.measureText(t,s,o,c,u));var f=o.length/2;if(f>i.length){for(a=0;a<f;a++)delete s[o[a]];o.splice(0,f)}return c},U.measureText=function(t,e,i,n,s){var o=e[s];return o||(o=e[s]=t.measureText(s).width,i.push(s)),o>n&&(n=o),n},U.numberOfLabelLines=function(t){var e=1;return U.each(t,function(t){U.isArray(t)&&t.length>e&&(e=t.length)}),e},U.color=w?function(t){return t instanceof CanvasGradient&&(t=H.global.defaultColor),w(t)}:function(t){return console.error("Color.js not found!"),t},U.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:U.color(t).saturate(.5).darken(.1).rgbString()}}(),Je._adapters=ii,Je.Animation=Z,Je.animationService=J,Je.controllers=Qt,Je.DatasetController=st,Je.defaults=H,Je.Element=G,Je.elements=kt,Je.Interaction=se,Je.layouts=pe,Je.platform=Fe,Je.plugins=Oe,Je.Scale=vi,Je.scaleService=Ee,Je.Ticks=ni,Je.Tooltip=Ye,Je.helpers.each(cn,function(t,e){Je.scaleService.registerScaleType(e,t,t._defaults)}),Fn)Fn.hasOwnProperty(zn)&&Je.plugins.register(Fn[zn]);Je.platform.initialize();var Ln=Je;return"undefined"!=typeof window&&(window.Chart=Je),Je.Chart=Je,Je.Legend=Fn.legend._element,Je.Title=Fn.title._element,Je.pluginService=Je.plugins,Je.PluginBase=Je.Element.extend({}),Je.canvasHelpers=Je.helpers.canvas,Je.layoutService=Je.layouts,Je.LinearScaleBase=ki,Je.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(t){Je[t]=function(e,i){return new Je(e,Je.helpers.merge(i||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}}),Ln}),function(t,e){"function"==typeof define&&define.amd?define([],function(){return t.SignaturePad=e()}):"object"==typeof exports?module.exports=e():t.SignaturePad=e()}(this,function(){return function(t){"use strict";var e=function(t,e){var i=this,n=e||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onEnd=n.onEnd,this.onBegin=n.onBegin,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(i._mouseButtonDown=!0,i._strokeBegin(t))},this._handleMouseMove=function(t){i._mouseButtonDown&&i._strokeUpdate(t)},this._handleMouseUp=function(t){1===t.which&&i._mouseButtonDown&&(i._mouseButtonDown=!1,i._strokeEnd(t))},this._handleTouchStart=function(t){if(1==t.targetTouches.length){var e=t.changedTouches[0];i._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];i._strokeUpdate(e)},this._handleTouchEnd=function(t){t.target===i._canvas&&(t.preventDefault(),i._strokeEnd(t))},this._handleMouseEvents(),this._handleTouchEvents()};e.prototype.clear=function(){var t=this._ctx,e=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._reset()},e.prototype.toDataURL=function(t,e){var i=this._canvas;return i.toDataURL.apply(i,arguments)},e.prototype.fromDataURL=function(t){var e=this,i=new Image,n=window.devicePixelRatio||1,s=this._canvas.width/n,o=this._canvas.height/n;this._reset(),i.src=t,i.onload=function(){e._ctx.drawImage(i,0,0,s,o)},this._isEmpty=!1},e.prototype._strokeUpdate=function(t){var e=this._createPoint(t);this._addPoint(e)},e.prototype._strokeBegin=function(t){this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},e.prototype._strokeDraw=function(t){var e=this._ctx,i="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,i),e.closePath(),e.fill()},e.prototype._strokeEnd=function(t){var e=this.points.length>2,i=this.points[0];!e&&i&&this._strokeDraw(i),"function"==typeof this.onEnd&&this.onEnd(t)},e.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),t.addEventListener("mouseup",this._handleMouseUp)},e.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},e.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},e.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),t.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},e.prototype.isEmpty=function(){return this._isEmpty},e.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._isEmpty=!0,this._ctx.fillStyle=this.penColor},e.prototype._createPoint=function(t){var e=this._canvas.getBoundingClientRect();return new i(t.clientX-e.left,t.clientY-e.top)},e.prototype._addPoint=function(t){var e,i,s,o=this.points;o.push(t),o.length>2&&(3===o.length&&o.unshift(o[0]),e=this._calculateCurveControlPoints(o[0],o[1],o[2]).c2,i=this._calculateCurveControlPoints(o[1],o[2],o[3]).c1,s=new n(o[1],e,i,o[2]),this._addCurve(s),o.shift())},e.prototype._calculateCurveControlPoints=function(t,e,n){var s=t.x-e.x,o=t.y-e.y,a=e.x-n.x,r=e.y-n.y,l=(t.x+e.x)/2,h=(t.y+e.y)/2,u=(e.x+n.x)/2,c=(e.y+n.y)/2,d=Math.sqrt(s*s+o*o),f=Math.sqrt(a*a+r*r),p=f/(d+f),g=u+(l-u)*p,m=c+(h-c)*p,v=e.x-g,b=e.y-m;return{c1:new i(l+v,h+b),c2:new i(u+v,c+b)}},e.prototype._addCurve=function(t){var e,i,n=t.startPoint;e=t.endPoint.velocityFrom(n),e=this.velocityFilterWeight*e+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(e),this._drawCurve(t,this._lastWidth,i),this._lastVelocity=e,this._lastWidth=i},e.prototype._drawPoint=function(t,e,i){var n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1},e.prototype._drawCurve=function(t,e,i){var n,s,o,a,r,l,h,u,c,d,f,p=this._ctx,g=i-e;for(n=Math.floor(t.length()),p.beginPath(),o=0;o<n;o++)l=(r=(a=o/n)*a)*a,d=(c=(u=(h=1-a)*h)*h)*t.startPoint.x,d+=3*u*a*t.control1.x,d+=3*h*r*t.control2.x,d+=l*t.endPoint.x,f=c*t.startPoint.y,f+=3*u*a*t.control1.y,f+=3*h*r*t.control2.y,f+=l*t.endPoint.y,s=e+l*g,this._drawPoint(d,f,s);p.closePath(),p.fill()},e.prototype._strokeWidth=function(t){return Math.max(this.maxWidth/(t+1),this.minWidth)};var i=function(t,e,i){this.x=t,this.y=e,this.time=i||(new Date).getTime()};i.prototype.velocityFrom=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):1},i.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))};var n=function(t,e,i,n){this.startPoint=t,this.control1=e,this.control2=i,this.endPoint=n};return n.prototype.length=function(){var t,e,i,n,s,o,a,r,l=0;for(t=0;t<=10;t++)e=t/10,i=this._point(e,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),n=this._point(e,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y),t>0&&(a=i-s,r=n-o,l+=Math.sqrt(a*a+r*r)),s=i,o=n;return l},n.prototype._point=function(t,e,i,n,s){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+s*t*t*t},e}(document)}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(t.jQuery)}(this,function(t){var e;!function(t,e,i){var n=function(){return!1},s=null,o={numHalted:0,haltValidation:function(e){this.numHalted++,t.formUtils.haltValidation=!0,e.unbind("submit",n).bind("submit",n).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(e){this.numHalted--,0===this.numHalted&&(t.formUtils.haltValidation=!1,e.unbind("submit",n).find('*[type="submit"]').removeClass("disabled").removeAttr("disabled","disabled"))}};function a(t,e){this.$form=t,this.$input=e,this.reset(),e.on("change paste",this.reset.bind(this))}a.prototype.reset=function(){this.haltedFormValidation=!1,this.hasRun=!1,this.isRunning=!1,this.result=void 0},a.prototype.run=function(t,e){return"keyup"===t?null:this.isRunning?(s=t,this.haltedFormValidation||(o.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(s=t,o.haltValidation(this.$form),this.haltedFormValidation=!0,this.isRunning=!0,this.$input.attr("disabled","disabled").addClass("async-validation"),this.$form.addClass("async-validation"),e(function(t){this.done(t)}.bind(this)),null)},a.prototype.done=function(t){this.result=t,this.hasRun=!0,this.isRunning=!1,this.$input.removeAttr("disabled").removeClass("async-validation"),this.$form.removeClass("async-validation"),this.haltedFormValidation&&(o.unHaltValidation(this.$form),"submit"===s?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},a.loadInstance=function(t,e,i){var n,s=e.get(0);return s.asyncValidators||(s.asyncValidators={}),s.asyncValidators[t]?n=s.asyncValidators[t]:(n=new a(i,e),s.asyncValidators[t]=n),n},t.formUtils=t.extend(t.formUtils||{},{asyncValidation:function(t,e,i){return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),a.loadInstance(t,e,i)},addAsyncValidator:function(e){var i=t.extend({},e),n=i.validatorFunction;i.async=!0,i.validatorFunction=function(t,e,s,o,r,l){return a.loadInstance(this.name,e,r).run(l,function(a){n.apply(i,[a,t,e,s,o,r,l])})},this.addValidator(i)}}),t(e).bind("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),i.find("[data-validation]").each(function(){var e=t(this);e.valAttr("async",!1),t.each(t.split(e.attr("data-validation")),function(i,n){var s=t.formUtils.validators["validate_"+n];s&&s.async&&e.valAttr("async","yes")})})})}(t,window),function(t,e){"use strict";t.fn.validateForm=function(e,i){return t.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(e,i,!0)},t(window).on("formValidationPluginInit",function(e,i){!function(e){var i={se:"sv",cz:"cs",dk:"da"};if(e.lang in i){var n=i[e.lang];t.formUtils.warn('Deprecated use of lang code "'+e.lang+'" use "'+n+'" instead'),e.lang=n}}(i),function(e){e&&"custom"===e.errorMessagePosition&&"function"==typeof e.errorMessageCustom&&(t.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),e.submitErrorMessageCallback=function(t,i){e.errorMessageCustom(t,e.language.errorTitle,i,e)})}(i),function(e){if(e.errorMessagePosition&&"object"==typeof e.errorMessagePosition){t.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var i=e.errorMessagePosition;e.errorMessagePosition="top",e.submitErrorMessageCallback=function(){return i}}}(i)}).on("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),function(e){var i=e.find("[data-validation-if-checked]");i.length&&t.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"');i.on("beforeValidation",function(){var i=t(this),n=i.valAttr("if-checked"),s=t('input[name="'+n+'"]',e),o=s.is(":checked"),a=(t.formUtils.getValue(s)||"").toString(),r=i.valAttr("if-checked-value");(!o||r&&r!==a)&&i.valAttr("skipped",!0)})}(i)})}(t),function(t){"use strict";var e={resolveErrorMessage:function(t,e,i,n,s){var o=n.validationErrorMsgAttribute+"-"+i.replace("validate_",""),a=t.attr(o);return a||(a=t.attr(n.validationErrorMsgAttribute))||(a="function"!=typeof e.errorMessageKey?s[e.errorMessageKey]:s[e.errorMessageKey(n)])||(a=e.errorMessage),a},getParentContainer:function(e){if(e.valAttr("error-msg-container"))return t(e.valAttr("error-msg-container"));var i=e.parent();return"checkbox"===e.attr("type")&&e.closest(".checkbox").length?i=e.closest(".checkbox").parent():"radio"===e.attr("type")&&e.closest(".radio").length&&(i=e.closest(".radio").parent()),i.closest(".input-group").length&&(i=i.closest(".input-group").parent()),i},applyInputErrorStyling:function(t,e){t.addClass(e.errorElementClass).removeClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnError).removeClass(e.inputParentClassOnSuccess),""!==e.borderColorOnError&&t.css("border-color",e.borderColorOnError)},applyInputSuccessStyling:function(t,e){t.addClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(t,i){t.removeClass(i.successElementClass).removeClass(i.errorElementClass).css("border-color","");var n=e.getParentContainer(t);if(n.removeClass(i.inputParentClassOnError).removeClass(i.inputParentClassOnSuccess),"function"==typeof i.inlineErrorMessageCallback){var s=i.inlineErrorMessageCallback(t,!1,i);s&&s.html("")}else n.find("."+i.errorMessageClass).remove()},removeAllMessagesAndStyling:function(i,n){if("function"==typeof n.submitErrorMessageCallback){var s=n.submitErrorMessageCallback(i,!1,n);s&&s.html("")}else i.find("."+n.errorMessageClass+".alert").remove();i.find("."+n.errorElementClass+",."+n.successElementClass).each(function(){e.removeInputStylingAndMessage(t(this),n)})},setInlineMessage:function(e,i,n){this.applyInputErrorStyling(e,n);var s,o=document.getElementById(e.attr("name")+"_err_msg"),a=!1,r=function(n){t.formUtils.$win.trigger("validationErrorDisplay",[e,n]),n.html(i)},l=function(){var o=!1;a.find("."+n.errorMessageClass).each(function(){if(this.inputReferer===e[0])return o=t(this),!1}),o?i?r(o):o.remove():""!==i&&(s=t('<div class="'+n.errorMessageClass+' alert"></div>'),r(s),s[0].inputReferer=e[0],a.prepend(s))};if(o)t.formUtils.warn("Using deprecated element reference "+o.id),a=t(o),l();else if("function"==typeof n.inlineErrorMessageCallback){if(!(a=n.inlineErrorMessageCallback(e,i,n)))return;l()}else{var h=this.getParentContainer(e);0===(s=h.find("."+n.errorMessageClass+".help-block")).length&&(s=t("<span></span>").addClass("help-block").addClass(n.errorMessageClass)).appendTo(h),r(s)}},setMessageInTopOfForm:function(e,i,n,s){var o='<div class="{errorMessageClass} alert alert-danger"><strong>{errorTitle}</strong><ul>{fields}</ul></div>',a=!1;if("function"!=typeof n.submitErrorMessageCallback||(a=n.submitErrorMessageCallback(e,i,n))){var r={errorTitle:s.errorTitle,fields:"",errorMessageClass:n.errorMessageClass};t.each(i,function(t,e){r.fields+="<li>"+e+"</li>"}),t.each(r,function(t,e){o=o.replace("{"+t+"}",e)}),a?a.html(o):e.children().eq(0).before(t(o))}}};t.formUtils=t.extend(t.formUtils||{},{dialogs:e})}(t),function(t,e,i){"use strict";var n=0;t.fn.validateOnBlur=function(e,i){var n=this,s=this.find("*[data-validation]");return s.each(function(){var s=t(this);if(s.is("[type=radio]")){var o=n.find('[type=radio][name="'+s.attr("name")+'"]');o.bind("blur.validation",function(){s.validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&o.bind("click.validation",function(){s.validateInputOnBlur(e,i,!0,"click")})}}),s.bind("blur.validation",function(){t(this).validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){t(this).validateInputOnBlur(e,i,!0,"click")}),this},t.fn.validateOnEvent=function(e,i){if(0!==this.length)return("FORM"===this[0].nodeName?this.find("*[data-validation-event]"):this).each(function(){var n=t(this),s=n.valAttr("event");s&&n.unbind(s+".validation").bind(s+".validation",function(n){9!==(n||{}).keyCode&&t(this).validateInputOnBlur(e,i,!0,s)})}),this},t.fn.showHelpOnFocus=function(e){return e||(e="data-validation-help"),this.find("textarea,input").each(function(){var i=t(this),s="jquery_form_help_"+ ++n,o=i.attr(e);i.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),o&&i.addClass("has-help-txt").bind("focus.help",function(){var e=i.parent().find("."+s);0===e.length&&(e=t("<span />").addClass(s).addClass("help").addClass("help-block").text(o).hide(),i.after(e)),e.fadeIn()}).bind("blur.help",function(){t(this).parent().find("."+s).fadeOut("slow")})}),this},t.fn.validate=function(e,i,n){var s=t.extend({},t.formUtils.LANG,n||{});this.each(function(){var n=t(this),o=(n.closest("form").get(0)||{}).validationConfig||t.formUtils.defaultConfig();n.one("validation",function(t,i){"function"==typeof e&&e(i,this,t)}),n.validateInputOnBlur(s,t.extend({},o,i||{}),!0)})},t.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!e.postponedValidation},t.fn.validateInputOnBlur=function(i,n,s,o){if(t.formUtils.eventType=o,this.willPostponeValidation()){var a=this,r=this.valAttr("postpone")||200;return e.postponedValidation=function(){a.validateInputOnBlur(i,n,s,o),e.postponedValidation=!1},setTimeout(function(){e.postponedValidation&&e.postponedValidation()},r),this}i=t.extend({},t.formUtils.LANG,i||{}),t.formUtils.dialogs.removeInputStylingAndMessage(this,n);var l=this,h=l.closest("form"),u=t.formUtils.validateInput(l,i,n,h,o),c=function(){l.validateInputOnBlur(i,n,!1,"blur.revalidated")};return"blur"===o&&l.unbind("validation.revalidate",c).one("validation.revalidate",c),s&&l.removeKeyUpValidation(),u.shouldChangeDisplay&&(u.isValid?t.formUtils.dialogs.applyInputSuccessStyling(l,n):t.formUtils.dialogs.setInlineMessage(l,u.errorMsg,n)),!u.isValid&&s&&l.validateOnKeyUp(i,n),this},t.fn.validateOnKeyUp=function(e,i){return this.each(function(){var n=t(this);n.valAttr("has-keyup-event")||n.valAttr("has-keyup-event","true").bind("keyup.validation",function(t){9!==t.keyCode&&n.validateInputOnBlur(e,i,!1,"keyup")})}),this},t.fn.removeKeyUpValidation=function(){return this.each(function(){t(this).valAttr("has-keyup-event",!1).unbind("keyup.validation")}),this},t.fn.valAttr=function(t,e){return void 0===e?this.attr("data-validation-"+t):!1===e||null===e?this.removeAttr("data-validation-"+t):(t=t.length>0?"-"+t:"",this.attr("data-validation"+t,e))},t.fn.isValid=function(e,i,n){if(t.formUtils.isLoadingModules){var s=this;return setTimeout(function(){s.isValid(e,i,n)},200),null}i=t.extend({},t.formUtils.defaultConfig(),i||{}),e=t.extend({},t.formUtils.LANG,e||{}),n=!1!==n,t.formUtils.errorDisplayPreventedWhenHalted&&(delete t.formUtils.errorDisplayPreventedWhenHalted,n=!1);var o=function(e,s){t.inArray(e,r)<0&&r.push(e),l.push(s),s.valAttr("current-error",e),n&&t.formUtils.dialogs.applyInputErrorStyling(s,i)},a=[],r=[],l=[],h=this;if(n&&t.formUtils.dialogs.removeAllMessagesAndStyling(h,i),h.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var n,s,r=t(this),l=r.attr("type"),u="radio"===l||"checkbox"===l,c=r.attr("name");if(n=c,!("submit"===(s=l)||"button"===s||"reset"===s||t.inArray(n,i.ignore||[])>-1)&&(!u||t.inArray(c,a)<0)){u&&a.push(c);var d=t.formUtils.validateInput(r,e,i,h,"submit");d.isValid?d.isValid&&d.shouldChangeDisplay&&(r.valAttr("current-error",!1),t.formUtils.dialogs.applyInputSuccessStyling(r,i)):o(d.errorMsg,r)}}),"function"==typeof i.onValidate){var u=i.onValidate(h);t.isArray(u)?t.each(u,function(t,e){o(e.message,e.element)}):u&&u.element&&u.message&&o(u.message,u.element)}return t.formUtils.isValidatingEntireForm=!1,l.length>0&&n&&("top"===i.errorMessagePosition?t.formUtils.dialogs.setMessageInTopOfForm(h,r,i,e):t.each(l,function(e,n){t.formUtils.dialogs.setInlineMessage(n,n.valAttr("current-error"),i)}),i.scrollToTopOnError&&t.formUtils.$win.scrollTop(h.offset().top-20)),!n&&t.formUtils.haltValidation&&(t.formUtils.errorDisplayPreventedWhenHalted=!0),0===l.length&&!t.formUtils.haltValidation},t.fn.restrictLength=function(e){return new t.formUtils.lengthRestriction(this,e),this},t.fn.addSuggestions=function(e){var i=!1;return this.find("input").each(function(){var n=t(this);(i=t.split(n.attr("data-suggestions"))).length>0&&!n.hasClass("has-suggestions")&&(t.formUtils.suggest(n,i,e),n.addClass("has-suggestions"))}),this}}(t,window),function(t){"use strict";t.formUtils=t.extend(t.formUtils||{},{isLoadingModules:!1,loadedModules:{},registerLoadedModule:function(e){this.loadedModules[t.trim(e).toLowerCase()]=!0},hasLoadedModule:function(e){return t.trim(e).toLowerCase()in this.loadedModules},loadModules:function(e,i,n){if(t.formUtils.isLoadingModules)setTimeout(function(){t.formUtils.loadModules(e,i,n)},100);else{var s=function(e,i){var s=t.split(e),o=s.length,a=function(){0===--o&&(t.formUtils.isLoadingModules=!1,"function"==typeof n&&n())};o>0&&(t.formUtils.isLoadingModules=!0);var r="?_="+(new Date).getTime(),l=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];t.each(s,function(e,n){if(0===(n=t.trim(n)).length||t.formUtils.hasLoadedModule(n))a();else{var s=i+n+(".js"===n.slice(-3)?"":".js"),o=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([s+(".dev.js"===s.slice(-7)?r:"")],a):(o.type="text/javascript",o.onload=a,o.src=s+(".dev.js"===s.slice(-7)?r:""),o.onerror=function(){t.formUtils.warn("Unable to load form validation module "+s,!0),a()},o.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(a(),this.onload=null,this.onreadystatechange=null)},l.appendChild(o))}})};if(i)s(e,i);else{var o=function(){var i=!1;return t('script[src*="form-validator"]').each(function(){if(!(this.src.split("form-validator")[1].split("node_modules").length>1))return"/"===(i=this.src.substr(0,this.src.lastIndexOf("/"))+"/")&&(i=""),!1}),!1!==i&&(s(e,i),!0)};o()||t(function(){o()||"function"==typeof n&&n()})}}}})}(t),function(t){"use strict";t.split=function(e,i,n){n=void 0===n||!0===n;var s=new RegExp("[,|"+(n?"\\s":"")+"-]\\s*","g");if("function"!=typeof i){if(!e)return[];var o=[];return t.each(e.split(i||s),function(e,i){(i=t.trim(i)).length&&o.push(i)}),o}e&&t.each(e.split(s),function(e,n){if((n=t.trim(n)).length)return i(n,e)})},t.validate=function(e){var i=t.extend(t.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(e=t.extend(i,e||{}),t(window).trigger("formValidationPluginInit",[e]),e.lang&&"en"!==e.lang){var n="lang/"+e.lang+".js";e.modules+=e.modules.length?","+n:n}t(e.form).each(function(i,n){n.validationConfig=e;var s=t(n);s.trigger("formValidationSetup",[s,e]),s.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),s.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),s.bind("submit.validation",function(i){var n=t(this),s=function(){return i.stopImmediatePropagation(),!1};if(t.formUtils.haltValidation)return s();if(t.formUtils.isLoadingModules)return setTimeout(function(){n.trigger("submit.validation")},200),s();var o=n.isValid(e.language,e);return t.formUtils.haltValidation?s():o&&"function"==typeof e.onSuccess?!1===e.onSuccess(n)?s():void 0:o||"function"!=typeof e.onError?!!o||s():(e.onError(n),s())}).bind("reset.validation",function(){t.formUtils.dialogs.removeAllMessagesAndStyling(s,e)}).addClass("has-validation-callback"),e.showHelpOnFocus&&s.showHelpOnFocus(),e.addSuggestions&&s.addSuggestions(),e.validateOnBlur&&(s.validateOnBlur(e.language,e),s.bind("html5ValidationAttrsFound",function(){s.validateOnBlur(e.language,e)})),e.validateOnEvent&&s.validateOnEvent(e.language,e)}),""!==e.modules&&t.formUtils.loadModules(e.modules,null,function(){"function"==typeof e.onModulesLoaded&&e.onModulesLoaded();var i="string"==typeof e.form?t(e.form):e.form;t.formUtils.$win.trigger("validatorsLoaded",[i,e])})}}(t),function(t,e){"use strict";var i=t(e);t.formUtils=t.extend(t.formUtils||{},{$win:i,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'<div class="{errorMessageClass} alert alert-danger">{messages}</div>',messages:"<strong>{errorTitle}</strong><ul>{fields}</ul>",field:"<li>{msg}</li>"},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},sanitizers:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(t){var e=0===t.name.indexOf("validate_")?t.name:"validate_"+t.name;void 0===t.validateOnKeyUp&&(t.validateOnKeyUp=!0),this.validators[e]=t},addSanitizer:function(t){this.sanitizers[t.name]=t},warn:function(t,i){"console"in e?"function"==typeof e.console.warn?e.console.warn(t):"function"==typeof e.console.log&&e.console.log(t):i&&alert(t)},getValue:function(t,e){var i=e?e.find(t):t;if(i.length>0){var n=i.eq(0).attr("type");return"radio"===n||"checkbox"===n?i.filter(":checked").val()||"":i.val()||""}return!1},validateInput:function(e,i,n,s,o){n=n||t.formUtils.defaultConfig(),i=i||t.formUtils.LANG,s.length||(s=e.parent());var a=this.getValue(e);e.valAttr("skipped",!1).one("beforeValidation",function(){(e.attr("disabled")||!e.is(":visible")&&!n.validateHiddenInputs)&&e.valAttr("skipped",1)}).trigger("beforeValidation",[a,i,n]);var r="true"===e.valAttr("optional"),l=!a&&r,h=e.attr(n.validationRuleAttribute),u=!0,c="",d={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!h||l||e.valAttr("skipped"))return d.shouldChangeDisplay=n.addValidClassOnAll,d;var f=e.valAttr("ignore");return f&&t.each(f.split(""),function(t,e){a=a.replace(new RegExp("\\"+e,"g"),"")}),t.split(h,function(r){0!==r.indexOf("validate_")&&(r="validate_"+r);var l=t.formUtils.validators[r];if(!l)throw new Error('Using undefined validator "'+r+'". Maybe you have forgotten to load the module that "'+r+'" belongs to?');if("validate_checkbox_group"===r&&(e=s.find('[name="'+e.attr("name")+'"]:eq(0)')),("keyup"!==o||l.validateOnKeyUp)&&(u=l.validatorFunction(a,e,n,i,s,o)),!u)return n.validateOnBlur&&e.validateOnKeyUp(i,n),c=t.formUtils.dialogs.resolveErrorMessage(e,l,r,n,i),!1}),!1===u?(e.trigger("validation",!1),d.errorMsg=c,d.isValid=!1,d.shouldChangeDisplay=!0):null===u?d.shouldChangeDisplay=!1:(e.trigger("validation",!0),d.shouldChangeDisplay=!0),"function"==typeof n.onElementValidate&&null!==c&&n.onElementValidate(d.isValid,e,s,c),e.trigger("afterValidation",[d,o]),d},parseDate:function(e,i,n){var s,o,a,r,l=i.replace(/[a-zA-Z]/gi,"").substring(0,1),h="^",u=i.split(l||null);if(t.each(u,function(t,e){h+=(t>0?"\\"+l:"")+"(\\d{"+e.length+"})"}),h+="$",n){var c=[];t.each(e.split(l),function(t,e){1===e.length&&(e="0"+e),c.push(e)}),e=c.join(l)}if(null===(s=e.match(new RegExp(h))))return!1;var d=function(e,i,n){for(var s=0;s<i.length;s++)if(i[s].substring(0,1)===e)return t.formUtils.parseDateInt(n[s+1]);return-1};return a=d("m",u,s),o=d("d",u,s),r=d("y",u,s),!(2===a&&o>28&&(r%4!=0||r%100==0&&r%400!=0)||2===a&&o>29&&(r%4==0||r%100!=0&&r%400==0)||a>12||0===a)&&(!(this.isShortMonth(a)&&o>30||!this.isShortMonth(a)&&o>31||0===o)&&[r,a,o])},parseDateInt:function(t){return 0===t.indexOf("0")&&(t=t.replace("0","")),parseInt(t,10)},isShortMonth:function(t){return t%2==0&&t<7||t%2!=0&&t>7},lengthRestriction:function(e,i){var n=parseInt(i.text(),10),s=0,o=function(){var t=e.val().length;if(t>n){var o=e.scrollTop();e.val(e.val().substring(0,n)),e.scrollTop(o)}(s=n-t)<0&&(s=0),i.text(s)};t(e).bind("keydown keyup keypress focus blur",o).bind("cut paste",function(){setTimeout(o,100)}),t(document).bind("ready",o)},numericRangeCheck:function(e,i){var n=t.split(i),s=parseInt(i.substr(3),10);return 1===n.length&&-1===i.indexOf("min")&&-1===i.indexOf("max")&&(n=[i,i]),2===n.length&&(e<parseInt(n[0],10)||e>parseInt(n[1],10))?["out",n[0],n[1]]:0===i.indexOf("min")&&e<s?["min",s]:0===i.indexOf("max")&&e>s?["max",s]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(e,n,s){var o={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},a=function(t,e){var i=e.offset();t.css({width:e.outerWidth(),left:i.left+"px",top:i.top+e.outerHeight()+"px"})};s&&t.extend(o,s),o.css.position="absolute",o.css["z-index"]=9999,e.attr("autocomplete","off"),0===this._numSuggestionElements&&i.bind("resize",function(){t(".jquery-form-suggestions").each(function(){var e=t(this),i=e.attr("data-suggest-container");a(e,t(".suggestions-"+i).eq(0))})}),this._numSuggestionElements++;var r=function(e){var i=e.valAttr("suggestion-nr");t.formUtils._selectedSuggestion=null,t.formUtils._previousTypedVal=null,t(".jquery-form-suggestion-"+i).fadeOut("fast")};return e.data("suggestions",n).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){t(this).trigger("keyup"),t.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var i=t(this),n=[],s=t.trim(i.val()).toLocaleLowerCase();if(s!==t.formUtils._previousTypedVal){t.formUtils._previousTypedVal=s;var l=!1,h=i.valAttr("suggestion-nr"),u=t(".jquery-form-suggestion-"+h);if(u.scrollTop(0),""!==s){var c=s.length>2;t.each(i.data("suggestions"),function(t,e){var i=e.toLocaleLowerCase();if(i===s)return n.push("<strong>"+e+"</strong>"),l=!0,!1;(0===i.indexOf(s)||c&&i.indexOf(s)>-1)&&n.push(e.replace(new RegExp(s,"gi"),"<strong>$&</strong>"))})}l||0===n.length&&u.length>0?u.hide():n.length>0&&0===u.length?(u=t("<div></div>").css(o.css).appendTo("body"),e.addClass("suggestions-"+h),u.attr("data-suggest-container",h).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+h)):n.length>0&&!u.is(":visible")&&u.show(),n.length>0&&s.length!==n[0].length&&(a(u,i),u.html(""),t.each(n,function(e,n){t("<div></div>").append(n).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(u).click(function(){i.focus(),i.val(t(this).text()),i.trigger("change"),r(i)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(e){var i,n,s=e.keyCode?e.keyCode:e.which,a=t(this);if(13===s&&null!==t.formUtils._selectedSuggestion){if(i=a.valAttr("suggestion-nr"),(n=t(".jquery-form-suggestion-"+i)).length>0){var l=n.find("div").eq(t.formUtils._selectedSuggestion).text();a.val(l),a.trigger("change"),r(a),e.preventDefault()}}else{i=a.valAttr("suggestion-nr");var h=(n=t(".jquery-form-suggestion-"+i)).children();if(h.length>0&&t.inArray(s,[38,40])>-1){38===s?(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=h.length-1:t.formUtils._selectedSuggestion--,t.formUtils._selectedSuggestion<0&&(t.formUtils._selectedSuggestion=h.length-1)):40===s&&(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=0:t.formUtils._selectedSuggestion++,t.formUtils._selectedSuggestion>h.length-1&&(t.formUtils._selectedSuggestion=0));var u=n.innerHeight(),c=n.scrollTop(),d=n.children().eq(0).outerHeight()*t.formUtils._selectedSuggestion;return(d<c||d>c+u)&&n.scrollTop(d),h.removeClass("active-suggestion").css("background","none").eq(t.formUtils._selectedSuggestion).addClass("active-suggestion").css(o.activeSuggestionCSS),e.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){r(t(this))}),e},LANG:{errorTitle:"Form submission failed!",requiredField:"This is a required field",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badUKNin:"Incorrect UK NIN",badUKUtr:"Incorrect UK UTR Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid",badPlPesel:"The PESEL entered is invalid",badPlNip:"The NIP entered is invalid",badPlRegon:"The REGON entered is invalid",badreCaptcha:"Please confirm that you are not a bot",passwordComplexityStart:"Password must contain at least ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" uppercase letter(s)",passwordComplexityLowercaseInfo:" lowercase letter(s)",passwordComplexitySpecialCharsInfo:" special character(s)",passwordComplexityNumericCharsInfo:" numeric character(s)",passwordComplexityEnd:"."}})}(t,window),(e=t).formUtils.addValidator({name:"email",validatorFunction:function(t){var i=t.toLowerCase().split("@"),n=i[0],s=i[1];if(n&&s){if(0===n.indexOf('"')){var o=n.length;if((n=n.replace(/\"/g,"")).length!==o-2)return!1}return e.formUtils.validators.validate_domain.validatorFunction(i[1])&&0!==n.indexOf(".")&&"."!==n.substring(n.length-1,n.length)&&-1===n.indexOf("..")&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(n)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),e.formUtils.addValidator({name:"domain",validatorFunction:function(t){return t.length>0&&t.length<=253&&!/[^a-zA-Z0-9]/.test(t.slice(-2))&&!/[^a-zA-Z0-9]/.test(t.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(t)&&1===t.split("..").length&&t.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),e.formUtils.addValidator({name:"required",validatorFunction:function(t,i,n,s,o){switch(i.attr("type")){case"checkbox":return i.is(":checked");case"radio":return o.find('input[name="'+i.attr("name")+'"]').filter(":checked").length>0;default:return""!==e.trim(t)}},errorMessage:"",errorMessageKey:function(t){return"top"===t.errorMessagePosition||"function"==typeof t.errorMessagePosition?"requiredFields":"requiredField"}}),e.formUtils.addValidator({name:"length",validatorFunction:function(t,i,n,s){var o=i.valAttr("length"),a=i.attr("type");if(void 0===o)return alert('Please add attribute "data-validation-length" to '+i[0].nodeName+" named "+i.attr("name")),!0;var r,l="file"===a&&void 0!==i.get(0).files?i.get(0).files.length:t.length,h=e.formUtils.numericRangeCheck(l,o);switch(h[0]){case"out":this.errorMessage=s.lengthBadStart+o+s.lengthBadEnd,r=!1;break;case"min":this.errorMessage=s.lengthTooShortStart+h[1]+s.lengthBadEnd,r=!1;break;case"max":this.errorMessage=s.lengthTooLongStart+h[1]+s.lengthBadEnd,r=!1;break;default:r=!0}return r},errorMessage:"",errorMessageKey:""}),e.formUtils.addValidator({name:"url",validatorFunction:function(t){if(/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)){var i=t.split("://")[1],n=i.indexOf("/");return n>-1&&(i=i.substr(0,n)),e.formUtils.validators.validate_domain.validatorFunction(i)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),e.formUtils.addValidator({name:"number",validatorFunction:function(t,e,i){if(""!==t){var n,s,o=e.valAttr("allowing")||"",a=e.valAttr("decimal-separator")||i.decimalSeparator,r=!1,l=e.valAttr("step")||"",h=!1;if((e.attr("data-sanitize")||"").match(/(^|[\s])numberFormat([\s]|$)/i)){if(!window.numeral)throw new ReferenceError("The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.");t.length&&(t=String(numeral().unformat(t)))}if(-1===o.indexOf("number")&&(o+=",number"),-1===o.indexOf("negative")&&0===t.indexOf("-"))return!1;if(o.indexOf("range")>-1&&(n=parseFloat(o.substring(o.indexOf("[")+1,o.indexOf(";"))),s=parseFloat(o.substring(o.indexOf(";")+1,o.indexOf("]"))),r=!0),""!==l&&(h=!0),","===a){if(t.indexOf(".")>-1)return!1;t=t.replace(",",".")}if(""===t.replace(/[0-9-]/g,"")&&(!r||t>=n&&t<=s)&&(!h||t%l==0))return!0;if(o.indexOf("float")>-1&&null!==t.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!r||t>=n&&t<=s)&&(!h||t%l==0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),e.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(t,i,n,s){var o=i.valAttr("allowing"),a="",r=!1;if(o){a="^([a-zA-Z0-9"+o+"]+)$";var l=o.replace(/\\/g,"");l.indexOf(" ")>-1&&(r=!0,l=l.replace(" ",""),l+=s.andSpaces||e.formUtils.LANG.andSpaces),s.badAlphaNumericAndExtraAndSpaces&&s.badAlphaNumericAndExtra?this.errorMessage=r?s.badAlphaNumericAndExtraAndSpaces+l:s.badAlphaNumericAndExtra+l+s.badAlphaNumericExtra:this.errorMessage=s.badAlphaNumeric+s.badAlphaNumericExtra+l}else a="^([a-zA-Z0-9]+)$",this.errorMessage=s.badAlphaNumeric;return new RegExp(a).test(t)},errorMessage:"",errorMessageKey:""}),e.formUtils.addValidator({name:"custom",validatorFunction:function(t,e){return new RegExp(e.valAttr("regexp")).test(t)},errorMessage:"",errorMessageKey:"badCustomVal"}),e.formUtils.addValidator({name:"date",validatorFunction:function(t,i,n){var s=i.valAttr("format")||n.dateFormat||"yyyy-mm-dd",o="false"===i.valAttr("require-leading-zero");return!1!==e.formUtils.parseDate(t,s,o)},errorMessage:"",errorMessageKey:"badDate"}),e.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(t,i,n,s,o){var a=!0,r=i.attr("name"),l=e('input[type=checkbox][name^="'+r+'"]',o),h=l.filter(":checked").length,u=i.valAttr("qty");if(void 0===u){var c=i.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+c+" named "+i.attr("name"))}var d=e.formUtils.numericRangeCheck(h,u);switch(d[0]){case"out":this.errorMessage=s.groupCheckedRangeStart+u+s.groupCheckedEnd,a=!1;break;case"min":this.errorMessage=s.groupCheckedTooFewStart+d[1]+(s.groupCheckedTooFewEnd||s.groupCheckedEnd),a=!1;break;case"max":this.errorMessage=s.groupCheckedTooManyStart+d[1]+(s.groupCheckedTooManyEnd||s.groupCheckedEnd),a=!1;break;default:a=!0}if(!a){var f=function(){l.unbind("click",f),l.filter("*[data-validation]").validateInputOnBlur(s,n,!1,"blur")};l.bind("click",f)}return a}})});var List=function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=11)}([function(t,e,i){var n=i(4),s=/\s+/;Object.prototype.toString;function o(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new o(t)},o.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~n(e,t)||e.push(t),this.el.className=e.join(" "),this},o.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),i=n(e,t);return~i&&e.splice(i,1),this.el.className=e.join(" "),this},o.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},o.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(s);return""===t[0]&&t.shift(),t},o.prototype.has=o.prototype.contains=function(t){return this.list?this.list.contains(t):!!~n(this.array(),t)}},function(t,e,i){var n=window.addEventListener?"addEventListener":"attachEvent",s=window.removeEventListener?"removeEventListener":"detachEvent",o="addEventListener"!==n?"on":"",a=i(5);e.bind=function(t,e,i,s){t=a(t);for(var r=0;r<t.length;r++)t[r][n](o+e,i,s||!1)},e.unbind=function(t,e,i,n){t=a(t);for(var r=0;r<t.length;r++)t[r][s](o+e,i,n||!1)}},function(t,e){t.exports=function(t){return function(e,i,n){var s=this;this._values={},this.found=!1,this.filtered=!1;this.values=function(e,i){if(void 0===e)return s._values;for(var n in e)s._values[n]=e[n];!0!==i&&t.templater.set(s,s.values())},this.show=function(){t.templater.show(s)},this.hide=function(){t.templater.hide(s)},this.matching=function(){return t.filtered&&t.searched&&s.found&&s.filtered||t.filtered&&!t.searched&&s.filtered||!t.filtered&&t.searched&&s.found||!t.filtered&&!t.searched},this.visible=function(){return!(!s.elm||s.elm.parentNode!=t.list)},function(e,i,n){if(void 0===i)n?s.values(e,n):s.values(e);else{s.elm=i;var o=t.templater.get(s,e);s.values(o)}}(e,i,n)}}},function(t,e){t.exports=function(t,e,i,n){return(n=n||{}).test&&n.getElementsByClassName||!n.test&&document.getElementsByClassName?function(t,e,i){return i?t.getElementsByClassName(e)[0]:t.getElementsByClassName(e)}(t,e,i):n.test&&n.querySelector||!n.test&&document.querySelector?function(t,e,i){return e="."+e,i?t.querySelector(e):t.querySelectorAll(e)}(t,e,i):function(t,e,i){for(var n=[],s=t.getElementsByTagName("*"),o=s.length,a=new RegExp("(^|\\s)"+e+"(\\s|$)"),r=0,l=0;r<o;r++)if(a.test(s[r].className)){if(i)return s[r];n[l]=s[r],l++}return n}(t,e,i)}},function(t,e){var i=[].indexOf;t.exports=function(t,e){if(i)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},function(t,e){t.exports=function(t){if(void 0===t)return[];if(null===t)return[null];if(t===window)return[window];if("string"==typeof t)return[t];if(function(t){return"[object Array]"===Object.prototype.toString.call(t)}(t))return t;if("number"!=typeof t.length)return[t];if("function"==typeof t&&t instanceof Function)return[t];for(var e=[],i=0;i<t.length;i++)(Object.prototype.hasOwnProperty.call(t,i)||i in t)&&e.push(t[i]);return e.length?e:[]}},function(t,e){t.exports=function(t){return t=(t=null===(t=void 0===t?"":t)?"":t).toString()}},function(t,e){t.exports=function(t){for(var e,i=Array.prototype.slice.call(arguments,1),n=0;e=i[n];n++)if(e)for(var s in e)t[s]=e[s];return t}},function(t,e){t.exports=function(t){var e=function(i,n,s){var o=i.splice(0,50);s=(s=s||[]).concat(t.add(o)),i.length>0?setTimeout(function(){e(i,n,s)},1):(t.update(),n(s))};return e}},function(t,e){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var i=t.items,n=0,s=i.length;n<s;n++){var o=i[n];e(o)?o.filtered=!0:o.filtered=!1}}return t.update(),t.trigger("filterComplete"),t.visibleItems}}},function(t,e,i){i(0);var n=i(1),s=i(7),o=i(6),a=i(3),r=i(19);t.exports=function(t,e){e=s({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:"fuzzy-search"},e=e||{});var i={search:function(n,s){for(var o=e.multiSearch?n.replace(/ +$/,"").split(/ +/):[n],a=0,r=t.items.length;a<r;a++)i.item(t.items[a],s,o)},item:function(t,e,n){for(var s=!0,o=0;o<n.length;o++){for(var a=!1,r=0,l=e.length;r<l;r++)i.values(t.values(),e[r],n[o])&&(a=!0);a||(s=!1)}t.found=s},values:function(t,i,n){if(t.hasOwnProperty(i)){var s=o(t[i]).toLowerCase();if(r(s,n,e))return!0}return!1}};return n.bind(a(t.listContainer,e.searchClass),"keyup",function(e){var n=e.target||e.srcElement;t.search(n.value,i.search)}),function(e,n){t.search(e,n,i.search)}}},function(t,e,i){var n=i(18),s=i(3),o=i(7),a=i(4),r=i(1),l=i(6),h=i(0),u=i(17),c=i(5);t.exports=function(t,e,d){var f,p=this,g=i(2)(p),m=i(8)(p),v=i(12)(p);f={start:function(){p.listClass="list",p.searchClass="search",p.sortClass="sort",p.page=1e4,p.i=1,p.items=[],p.visibleItems=[],p.matchingItems=[],p.searched=!1,p.filtered=!1,p.searchColumns=void 0,p.handlers={updated:[]},p.valueNames=[],p.utils={getByClass:s,extend:o,indexOf:a,events:r,toString:l,naturalSort:n,classes:h,getAttribute:u,toArray:c},p.utils.extend(p,e),p.listContainer="string"==typeof t?document.getElementById(t):t,p.listContainer&&(p.list=s(p.listContainer,p.listClass,!0),p.parse=i(13)(p),p.templater=i(16)(p),p.search=i(14)(p),p.filter=i(9)(p),p.sort=i(15)(p),p.fuzzySearch=i(10)(p,e.fuzzySearch),this.handlers(),this.items(),this.pagination(),p.update())},handlers:function(){for(var t in p.handlers)p[t]&&p.on(t,p[t])},items:function(){p.parse(p.list),void 0!==d&&p.add(d)},pagination:function(){if(void 0!==e.pagination){!0===e.pagination&&(e.pagination=[{}]),void 0===e.pagination[0]&&(e.pagination=[e.pagination]);for(var t=0,i=e.pagination.length;t<i;t++)v(e.pagination[t])}}},this.reIndex=function(){p.items=[],p.visibleItems=[],p.matchingItems=[],p.searched=!1,p.filtered=!1,p.parse(p.list)},this.toJSON=function(){for(var t=[],e=0,i=p.items.length;e<i;e++)t.push(p.items[e].values());return t},this.add=function(t,e){if(0!==t.length){if(!e){var i=[],n=!1;void 0===t[0]&&(t=[t]);for(var s=0,o=t.length;s<o;s++){var a;n=p.items.length>p.page,a=new g(t[s],void 0,n),p.items.push(a),i.push(a)}return p.update(),i}m(t,e)}},this.show=function(t,e){return this.i=t,this.page=e,p.update(),p},this.remove=function(t,e,i){for(var n=0,s=0,o=p.items.length;s<o;s++)p.items[s].values()[t]==e&&(p.templater.remove(p.items[s],i),p.items.splice(s,1),o--,s--,n++);return p.update(),n},this.get=function(t,e){for(var i=[],n=0,s=p.items.length;n<s;n++){var o=p.items[n];o.values()[t]==e&&i.push(o)}return i},this.size=function(){return p.items.length},this.clear=function(){return p.templater.clear(),p.items=[],p},this.on=function(t,e){return p.handlers[t].push(e),p},this.off=function(t,e){var i=p.handlers[t],n=a(i,e);return n>-1&&i.splice(n,1),p},this.trigger=function(t){for(var e=p.handlers[t].length;e--;)p.handlers[t][e](p);return p},this.reset={filter:function(){for(var t=p.items,e=t.length;e--;)t[e].filtered=!1;return p},search:function(){for(var t=p.items,e=t.length;e--;)t[e].found=!1;return p}},this.update=function(){var t=p.items,e=t.length;p.visibleItems=[],p.matchingItems=[],p.templater.clear();for(var i=0;i<e;i++)t[i].matching()&&p.matchingItems.length+1>=p.i&&p.visibleItems.length<p.page?(t[i].show(),p.visibleItems.push(t[i]),p.matchingItems.push(t[i])):t[i].matching()?(p.matchingItems.push(t[i]),t[i].hide()):t[i].hide();return p.trigger("updated"),p},f.start()}},function(t,e,i){var n=i(0),s=i(1),o=i(11);t.exports=function(t){var e=function(e,s){var o,r=t.matchingItems.length,l=t.i,h=t.page,u=Math.ceil(r/h),c=Math.ceil(l/h),d=s.innerWindow||2,f=s.left||s.outerWindow||0,p=s.right||s.outerWindow||0;p=u-p,e.clear();for(var g=1;g<=u;g++){var m=c===g?"active":"";i.number(g,f,p,c,d)?(o=e.add({page:g,dotted:!1})[0],m&&n(o.elm).add(m),a(o.elm,g,h)):i.dotted(e,g,f,p,c,d,e.size())&&(o=e.add({page:"...",dotted:!0})[0],n(o.elm).add("disabled"))}},i={number:function(t,e,i,n,s){return this.left(t,e)||this.right(t,i)||this.innerWindow(t,n,s)},left:function(t,e){return t<=e},right:function(t,e){return t>e},innerWindow:function(t,e,i){return t>=e-i&&t<=e+i},dotted:function(t,e,i,n,s,o,a){return this.dottedLeft(t,e,i,n,s,o)||this.dottedRight(t,e,i,n,s,o,a)},dottedLeft:function(t,e,i,n,s,o){return e==i+1&&!this.innerWindow(e,s,o)&&!this.right(e,n)},dottedRight:function(t,e,i,n,s,o,a){return!t.items[a-1].values().dotted&&(e==n&&!this.innerWindow(e,s,o)&&!this.right(e,n))}},a=function(e,i,n){s.bind(e,"click",function(){t.show((i-1)*n+1,n)})};return function(i){var n=new o(t.listContainer.id,{listClass:i.paginationClass||"pagination",item:"<li><a class='page' href='javascript:function Z(){Z=\"\"}Z()'></a></li>",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});t.on("updated",function(){e(n,i)}),e(n,i)}}},function(t,e,i){t.exports=function(t){var e=i(2)(t),n=function(i,n){for(var s=0,o=i.length;s<o;s++)t.items.push(new e(n,i[s]))},s=function(e,i){var o=e.splice(0,50);n(o,i),e.length>0?setTimeout(function(){s(e,i)},1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,i=[],n=0,s=e.length;n<s;n++)void 0===e[n].data&&i.push(e[n]);return i}(t.list),i=t.valueNames;t.indexAsync?s(e,i):n(e,i)}}},function(t,e){t.exports=function(t){var e,i,n,s,o={resetList:function(){t.i=1,t.templater.clear(),s=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?i=t[1]:2==t.length&&"function"==typeof t[1]?(i=void 0,s=t[1]):3==t.length?(i=t[1],s=t[2]):i=void 0},setColumns:function(){0!==t.items.length&&void 0===i&&(i=void 0===t.searchColumns?o.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=(e=t.utils.toString(e).toLowerCase()).replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),n=e},toArray:function(t){var e=[];for(var i in t)e.push(i);return e}},a={list:function(){for(var e=0,i=t.items.length;e<i;e++)a.item(t.items[e])},item:function(t){t.found=!1;for(var e=0,n=i.length;e<n;e++)if(a.values(t.values(),i[e]))return void(t.found=!0)},values:function(i,s){return!!(i.hasOwnProperty(s)&&(e=t.utils.toString(i[s]).toLowerCase(),""!==n&&e.search(n)>-1))},reset:function(){t.reset.search(),t.searched=!1}},r=function(e){return t.trigger("searchStart"),o.resetList(),o.setSearchString(e),o.setOptions(arguments),o.setColumns(),""===n?a.reset():(t.searched=!0,s?s(n,i):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",function(e){var i=e.target||e.srcElement;""===i.value&&!t.searched||r(i.value)}),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",function(t){""===(t.target||t.srcElement).value&&r("")}),r}},function(t,e){t.exports=function(t){var e={els:void 0,clear:function(){for(var i=0,n=e.els.length;i<n;i++)t.utils.classes(e.els[i]).remove("asc"),t.utils.classes(e.els[i]).remove("desc")},getOrder:function(e){var i=t.utils.getAttribute(e,"data-order");return"asc"==i||"desc"==i?i:t.utils.classes(e).has("desc")?"asc":t.utils.classes(e).has("asc")?"desc":"asc"},getInSensitive:function(e,i){var n=t.utils.getAttribute(e,"data-insensitive");i.insensitive="false"!==n},setOrder:function(i){for(var n=0,s=e.els.length;n<s;n++){var o=e.els[n];if(t.utils.getAttribute(o,"data-sort")===i.valueName){var a=t.utils.getAttribute(o,"data-order");"asc"==a||"desc"==a?a==i.order&&t.utils.classes(o).add(i.order):t.utils.classes(o).add(i.order)}}}},i=function(){t.trigger("sortStart");var i={},n=arguments[0].currentTarget||arguments[0].srcElement||void 0;n?(i.valueName=t.utils.getAttribute(n,"data-sort"),e.getInSensitive(n,i),i.order=e.getOrder(n)):((i=arguments[1]||i).valueName=arguments[0],i.order=i.order||"asc",i.insensitive=void 0===i.insensitive||i.insensitive),e.clear(),e.setOrder(i);var s,o=i.sortFunction||t.sortFunction||null,a="desc"===i.order?-1:1;s=o?function(t,e){return o(t,e,i)*a}:function(e,n){var s=t.utils.naturalSort;return s.alphabet=t.alphabet||i.alphabet||void 0,!s.alphabet&&i.insensitive&&(s=t.utils.naturalSort.caseInsensitive),s(e.values()[i.valueName],n.values()[i.valueName])*a},t.items.sort(s),t.update(),t.trigger("sortComplete")};return t.handlers.sortStart=t.handlers.sortStart||[],t.handlers.sortComplete=t.handlers.sortComplete||[],e.els=t.utils.getByClass(t.listContainer,t.sortClass),t.utils.events.bind(e.els,"click",i),t.on("searchStart",e.clear),t.on("filterStart",e.clear),i}},function(t,e){var i=function(t){var e,i=this;this.clearSourceItem=function(e,i){for(var n=0,s=i.length;n<s;n++){var o;if(i[n].data)for(var a=0,r=i[n].data.length;a<r;a++)e.setAttribute("data-"+i[n].data[a],"");else i[n].attr&&i[n].name?(o=t.utils.getByClass(e,i[n].name,!0))&&o.setAttribute(i[n].attr,""):(o=t.utils.getByClass(e,i[n],!0))&&(o.innerHTML="");o=void 0}return e},this.getItemSource=function(e){if(void 0===e){for(var i=t.list.childNodes,n=0,s=i.length;n<s;n++)if(void 0===i[n].data)return i[n].cloneNode(!0)}else{if(/<tr[\s>]/g.exec(e)){var o=document.createElement("tbody");return o.innerHTML=e,o.firstChild}if(-1!==e.indexOf("<")){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var r=document.getElementById(t.item);if(r)return r}},this.get=function(e,n){i.create(e);for(var s={},o=0,a=n.length;o<a;o++){var r;if(n[o].data)for(var l=0,h=n[o].data.length;l<h;l++)s[n[o].data[l]]=t.utils.getAttribute(e.elm,"data-"+n[o].data[l]);else n[o].attr&&n[o].name?(r=t.utils.getByClass(e.elm,n[o].name,!0),s[n[o].name]=r?t.utils.getAttribute(r,n[o].attr):""):(r=t.utils.getByClass(e.elm,n[o],!0),s[n[o]]=r?r.innerHTML:"");r=void 0}return s},this.set=function(e,n){var s=function(i,n){var s,o=function(e){for(var i=0,n=t.valueNames.length;i<n;i++)if(t.valueNames[i].data){for(var s=t.valueNames[i].data,o=0,a=s.length;o<a;o++)if(s[o]===e)return{data:e}}else{if(t.valueNames[i].attr&&t.valueNames[i].name&&t.valueNames[i].name==e)return t.valueNames[i];if(t.valueNames[i]===e)return e}}(i);o&&(o.data?e.elm.setAttribute("data-"+o.data,n):o.attr&&o.name?(s=t.utils.getByClass(e.elm,o.name,!0))&&s.setAttribute(o.attr,n):(s=t.utils.getByClass(e.elm,o,!0))&&(s.innerHTML=n),s=void 0)};if(!i.create(e))for(var o in n)n.hasOwnProperty(o)&&s(o,n[o])},this.create=function(t){if(void 0!==t.elm)return!1;if(void 0===e)throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.");var n=e.cloneNode(!0);return n.removeAttribute("id"),t.elm=n,i.set(t,t.values()),!0},this.remove=function(e){e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.show=function(e){i.create(e),t.list.appendChild(e.elm)},this.hide=function(e){void 0!==e.elm&&e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.clear=function(){if(t.list.hasChildNodes())for(;t.list.childNodes.length>=1;)t.list.removeChild(t.list.firstChild)},(e=i.getItemSource(t.item))&&(e=i.clearSourceItem(e,t.valueNames))};t.exports=function(t){return new i(t)}},function(t,e){t.exports=function(t,e){var i=t.getAttribute&&t.getAttribute(e)||null;if(!i)for(var n=t.attributes.length,s=0;s<n;s++)void 0!==e[s]&&e[s].nodeName===e&&(i=e[s].nodeValue);return i}},function(t,e,i){"use strict";var n,s,o=0;function a(t){return t>=48&&t<=57}function r(t,e){for(var i=(t+="").length,n=(e+="").length,r=0,l=0;r<i&&l<n;){var h=t.charCodeAt(r),u=e.charCodeAt(l);if(a(h)){if(!a(u))return h-u;for(var c=r,d=l;48===h&&++c<i;)h=t.charCodeAt(c);for(;48===u&&++d<n;)u=e.charCodeAt(d);for(var f=c,p=d;f<i&&a(t.charCodeAt(f));)++f;for(;p<n&&a(e.charCodeAt(p));)++p;var g=f-c-p+d;if(g)return g;for(;c<f;)if(g=t.charCodeAt(c++)-e.charCodeAt(d++))return g;r=f,l=p}else{if(h!==u)return h<o&&u<o&&-1!==s[h]&&-1!==s[u]?s[h]-s[u]:h-u;++r,++l}}return i-n}r.caseInsensitive=r.i=function(t,e){return r((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(r,{alphabet:{get:function(){return n},set:function(t){s=[];var e=0;if(n=t)for(;e<n.length;e++)s[n.charCodeAt(e)]=e;for(o=s.length,e=0;e<o;e++)void 0===s[e]&&(s[e]=-1)}}}),t.exports=r},function(t,e){t.exports=function(t,e,i){var n=i.location||0,s=i.distance||100,o=i.threshold||.4;if(e===t)return!0;if(e.length>32)return!1;var a=n,r=function(){var t,i={};for(t=0;t<e.length;t++)i[e.charAt(t)]=0;for(t=0;t<e.length;t++)i[e.charAt(t)]|=1<<e.length-t-1;return i}();function l(t,i){var n=t/e.length,o=Math.abs(a-i);return s?n+o/s:o?1:n}var h=o,u=t.indexOf(e,a);-1!=u&&(h=Math.min(l(0,u),h),-1!=(u=t.lastIndexOf(e,a+e.length))&&(h=Math.min(l(0,u),h)));var c,d,f=1<<e.length-1;u=-1;for(var p,g=e.length+t.length,m=0;m<e.length;m++){for(c=0,d=g;c<d;)l(m,a+d)<=h?c=d:g=d,d=Math.floor((g-c)/2+c);g=d;var v=Math.max(1,a-d+1),b=Math.min(a+d,t.length)+e.length,_=Array(b+2);_[b+1]=(1<<m)-1;for(var y=b;y>=v;y--){var x=r[t.charAt(y-1)];if(_[y]=0===m?(_[y+1]<<1|1)&x:(_[y+1]<<1|1)&x|(p[y+1]|p[y])<<1|1|p[y+1],_[y]&f){var w=l(m,y-1);if(w<=h){if(h=w,!((u=y-1)>a))break;v=Math.max(1,2*a-u)}}}if(l(m+1,a)>h)break;p=_}return!(u<0)}}]);